@launchdarkly/session-replay 1.1.26 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { Record as default, LDRecord } from 'highlight.run';
2
- export type { RecordOptions } from 'highlight.run';
1
+ export { Record as default, LDRecord } from '@launchdarkly/o11y';
2
+ export type { RecordOptions } from '@launchdarkly/o11y';
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as o, P as r } from "./index-DqRj8B1G.js";
1
+ import { t as o, P as r } from "./index-QHZJXaVg.js";
2
2
  export {
3
3
  o as LDRecord,
4
4
  r as default
package/dist/index.umd.js CHANGED
@@ -275,7 +275,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):d
275
275
  }
276
276
  }
277
277
  ${vr}
278
- `,bu=(e,t,s,n)=>e();function yu(e,t=bu){return{PushPayload(s,n){return t(r=>e.request(au,s,ne(ne({},n),r)),"PushPayload","mutation",s)},PushSessionEvents(s,n){return t(r=>e.request(Wr,s,ne(ne({},n),r)),"PushSessionEvents","mutation",s)},identifySession(s,n){return t(r=>e.request(cu,s,ne(ne({},n),r)),"identifySession","mutation",s)},addSessionProperties(s,n){return t(r=>e.request(uu,s,ne(ne({},n),r)),"addSessionProperties","mutation",s)},pushMetrics(s,n){return t(r=>e.request(du,s,ne(ne({},n),r)),"pushMetrics","mutation",s)},addSessionFeedback(s,n){return t(r=>e.request(hu,s,ne(ne({},n),r)),"addSessionFeedback","mutation",s)},initializeSession(s,n){return t(r=>e.request(pu,s,ne(ne({},n),r)),"initializeSession","mutation",s)},Ignore(s,n){return t(r=>e.request(mu,s,ne(ne({},n),r)),"Ignore","query",s)},GetSamplingConfig(s,n){return t(r=>e.request(fu,s,ne(ne({},n),r)),"GetSamplingConfig","query",s)}}}function gu(){var e=document.createElement("canvas");return e.getContext&&e.getContext("2d")?e.toDataURL("image/webp").indexOf("data:image/webp")==0:!1}function Zu(){return gu()?{type:"image/webp",quality:.9}:{type:"image/jpeg",quality:.6}}const Su="telemetry.sdk.name",Iu="telemetry.sdk.version",wr=1e3,Xu=1e3*2,Vu=4*60*60*1e3,un=15*60*1e3,kr={normal:{bytes:1e7,time:4*60*1e3},canvas:{bytes:16e6,time:5e3}},Gu=100,Cr="app.highlight.io",xr="https://app.launchdarkly.com",Ru={"observability.ld-stg.launchdarkly.com":"ld-stg.launchdarkly.com","observability.app.launchdarkly.com":"app.launchdarkly.com","observability.app.ld.catamorphic.com":"app.ld.catamorphic.com"},vu="/projects/default",Wu=new RegExp("pub\\.(?<domain>.+)");/*! js-cookie v3.0.8 | MIT */function ns(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)n!=="__proto__"&&(e[n]=s[n])}return e}var wu={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function dn(e,t){function s(r,l,d){if(typeof document<"u"){d=ns({},t,d),typeof d.expires=="number"&&(d.expires=new Date(Date.now()+d.expires*864e5)),d.expires&&(d.expires=d.expires.toUTCString()),r=encodeURIComponent(r).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var f="";for(var h in d)d[h]&&(f+="; "+h,d[h]!==!0&&(f+="="+d[h].split(";")[0]));return document.cookie=r+"="+e.write(l,r)+f}}function n(r){if(!(typeof document>"u"||arguments.length&&!r)){for(var l=document.cookie?document.cookie.split("; "):[],d={},f=0;f<l.length;f++){var h=l[f].split("="),m=h.slice(1).join("=");try{var p=decodeURIComponent(h[0]);if(p in d||(d[p]=e.read(m,p)),r===p)break}catch{}}return r?d[r]:d}}return Object.create({set:s,get:n,remove:function(r,l){s(r,"",ns({},l,{expires:-1}))},withAttributes:function(r){return dn(this.converter,ns({},this.attributes,r))},withConverter:function(r){return dn(ns({},this.converter,r),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var is=dn(wu,{path:"/"}),hn=(e=>(e.CLIENT_ID="highlightClientID",e))(hn||{});let rs="localStorage",pn=!0,ku=class{constructor(){Rt(this,"storage",{})}get length(){return Object.keys(this.storage).length}key(t){var s;return(s=Object.keys(this.storage)[t])!=null?s:null}getItem(t){var s;return(s=this.storage[t])!=null?s:""}setItem(t,s){this.storage[t]=s}removeItem(t){delete this.storage[t]}},Cu=class{getItem(t){var s;return(s=is.get(t))!=null?s:""}setItem(t,s){if(!pn)return;const n=new Date;n.setTime(n.getTime()+un),is.set(t,s,{expires:n})}removeItem(t){pn&&is.remove(t)}keys(){var t;return Object.keys((t=is.get())!=null?t:{})}};const pt=new ku,mt=new Cu,os=()=>{let e=null;if(typeof window>"u")return pt;try{switch(rs){case"localStorage":e=window.localStorage;break;case"sessionStorage":e=window.sessionStorage;break}e||(lt("storage","getPersistentStorage","debug",`persistent storage was not found for mode ${rs}; using global storage`),e=pt)}catch(t){lt("storage","getPersistentStorage","debug","failed to get persistent storage; using global storage",t),e=pt}return e},xu=e=>{rs=e},Tr=e=>{pn=e},Ce=e=>{try{return os().getItem(e)}catch(t){return lt("storage","getItem","debug",`failed to get item ${e}; using global storage`,t),pt.getItem(e)}},He=(e,t)=>{mt.setItem(e,t);try{return os().setItem(e,t)}catch(s){return lt("storage","setItem","debug",`failed to set item ${e}; using global storage`,s),pt.setItem(e,t)}},ls=e=>{mt.removeItem(e);try{return os().removeItem(e)}catch(t){return lt("storage","removeItem","debug",`failed to remove item ${e}; using global storage`,t),pt.removeItem(e)}},Tu=e=>{if(rs==="sessionStorage"){console.warn("highlight.io cannot use local storage; segment integration will not work");return}if(typeof window>"u"){console.warn("highlight.io cannot use local storage (not a window); segment integration will not work");return}const t=window.localStorage.setItem;window.localStorage.setItem=function(){const[s,n]=arguments;e({keyName:s,keyValue:n}),t.apply(this,[s,n])}};var Xe=(e=>(e.SEGMENT_LAST_SENT_HASH_KEY="HIGHLIGHT_SEGMENT_LAST_SENT_HASH_KEY",e.SESSION_ID="sessionID",e.SESSION_DATA="sessionData",e.USER_IDENTIFIER="highlightIdentifier",e.USER_OBJECT="highlightUserObject",e))(Xe||{});const as=e=>`${Xe.SESSION_DATA}_${e}`,Lu=()=>{var e;return typeof globalThis<"u"&&(e=globalThis.persistentSessionSecureID)!=null&&e.length?globalThis.persistentSessionSecureID:Lr()},Nu=e=>{typeof globalThis<"u"&&e!=null&&e.length&&(globalThis.persistentSessionSecureID=e)},Lr=()=>{var e;return(e=Ce(Xe.SESSION_ID))!=null?e:""},kt=e=>{He(Xe.SESSION_ID,e)},Ju=e=>{const t=as(e);return JSON.parse(Ce(t)||"{}")},cs=e=>{e||(e=Lr());let t=Ju(e);if(t&&t.lastPushTime&&Date.now()-t.lastPushTime<un)return t;ls(as(e))},st=function(e){if(!(e!=null&&e.sessionSecureID))return;const t=e.sessionSecureID;Nu(t);const s=as(t);He(s,JSON.stringify(e)),Uu(s)},Yu=function(){const e=mt.getItem(Xe.SESSION_ID);kt(e);const t=as(e),s=mt.getItem(t);try{st(JSON.parse(s))}catch{}};function Uu(e){var t;const s=`${Xe.SESSION_DATA}_`,n=new Set,r=os();for(let l=r.length-1;l>=0;l--){const d=r.key(l);d&&d.startsWith(s)&&d!==e&&n.add(d)}for(const l of mt.keys())l.startsWith(s)&&l!==e&&n.add(l);for(const l of n){let d=!0;try{const f=Ce(l)||mt.getItem(l)||"{}",h=JSON.parse(f),m=(t=h.lastPushTime)!=null?t:h.sessionStartTime;d=m===void 0||Date.now()-m>=un}catch{}d&&(lt("highlightSession","pruneSessionData","debug",`removing session data for stale key ${l}`),ls(l))}}var Nr=(e=>(e.BillingQuotaExceeded="BillingQuotaExceeded",e))(Nr||{});const Fu=3,Mu=1e3,Ou=500,Ku=[Nr.BillingQuotaExceeded.toString()],Eu=e=>{var t;return((t=e.response.errors)==null?void 0:t.find(s=>Ku.includes(s.message)))===void 0},zu=()=>{const e=(t,s,n,r,l=0)=>at(void 0,null,function*(){try{return yield t()}catch(d){if(d instanceof dt&&!Eu(d))throw d;if(l<Fu)return yield new Promise(f=>setTimeout(f,Mu+Ou*Math.pow(2,l))),yield e(t,s,n,r,l+1);throw console.error(`highlight.io: data request failed after ${l} retries`),d}});return e},Jr="feature_flag",Yr="launchdarkly",Hu=`${Jr}.set.id`,Pu=`${Jr}.provider.name`,Du=`${Yr}.application.id`,Bu=`${Yr}.application.version`,Qu="$ld:telemetry:session:init",Ur="$ld:telemetry:track";function Fr(e){return e.includes("%")||e.includes(":")?e.replace(/%/g,"%25").replace(/:/g,"%3A"):e}function Mr(e){return e.kind==="multi"}function Or(e){return Mr(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>`${t}:${Fr(e[t].key)}`).join(":"):"kind"in e&&e.kind==="user"?e.key:"kind"in e?`${e.kind}:${Fr(e.key)}`:e.key}function ju(e){return Mr(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>({[t]:e[t].key})).reduce((t,s)=>ne(ne({},t),s),{}):"kind"in e?{[e.kind]:e.key}:{user:e.key}}let Au=class{constructor(t,s){Rt(this,"client"),Rt(this,"metadata"),this.client=t,this.metadata=s}getHooks(t){return[]}init(t){this.client.track(Qu,{sessionID:t})}recordGauge(t,s){}identify(t,s,n={},r){}error(t,s){}track(t,s){const n=s.event;this.client.track(n?`${Ur}:${n}`:Ur,Bt(ne({},s),{sessionID:t}))}},_u=class extends Bs{constructor(t,s){super(),Rt(this,"client"),this.client=new Au(t,s)}getHooks(t){return[{getMetadata:()=>({name:"highlight.run/ld"}),afterIdentify:(s,n,r)=>(this.load(this.client),n)}]}init(t){return this._bufferCall("init",[t])}recordGauge(t,s){return this._bufferCall("recordGauge",[t,s])}identify(t,s,n={},r){return this._bufferCall("identify",[t,s,n,r])}error(t,s){return this._bufferCall("error",[t,s])}track(t,s){return this._bufferCall("track",[t,s])}};const $u=e=>{e(window.location.href);const t=history.pushState;history.pushState=(l=>function(){var d=l.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),d})(history.pushState);const s=history.replaceState;history.replaceState=(l=>function(){var d=l.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),d})(history.replaceState);const n=()=>{window.dispatchEvent(new Event("locationchange"))};window.addEventListener("popstate",n);const r=function(){e(window.location.href)};return window.addEventListener("locationchange",r),()=>{window.removeEventListener("popstate",n),window.removeEventListener("locationchange",r),history.pushState=t,history.replaceState=s}},qu="10.7.8",ed={version:qu},td=ed.version;function Kr(e,t){return nd(e)}function sd(e){if(e.id.length)return`#${e.id}`;if(e.classList.length){let t=[];for(const s of e.classList)t.push(`.${s}`);return`${e.nodeName.toLowerCase()}${t.join(",")}`}return e.nodeName.toLowerCase()}const nd=e=>{let t="";const s=e.getAttribute("class"),n=e.getAttribute("id");return n&&(t=t.concat(Er(n,"#"))),s&&(t=t.concat(Er(s,"."))),t===""&&(t=t.concat(e.tagName.toLowerCase())),t},Er=(e,t)=>`${t}${e.trim().split(" ").join(t)}`,id=e=>{let t;const s=()=>{clearTimeout(t),t=setTimeout(()=>{var n,r;e({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:(r=(n=window.screen.orientation)==null?void 0:n.angle)!=null?r:0})},500)};return window.addEventListener("resize",s),s(),()=>window.removeEventListener("resize",s)};var zr={exports:{}};/**
278
+ `,bu=(e,t,s,n)=>e();function yu(e,t=bu){return{PushPayload(s,n){return t(r=>e.request(au,s,ne(ne({},n),r)),"PushPayload","mutation",s)},PushSessionEvents(s,n){return t(r=>e.request(Wr,s,ne(ne({},n),r)),"PushSessionEvents","mutation",s)},identifySession(s,n){return t(r=>e.request(cu,s,ne(ne({},n),r)),"identifySession","mutation",s)},addSessionProperties(s,n){return t(r=>e.request(uu,s,ne(ne({},n),r)),"addSessionProperties","mutation",s)},pushMetrics(s,n){return t(r=>e.request(du,s,ne(ne({},n),r)),"pushMetrics","mutation",s)},addSessionFeedback(s,n){return t(r=>e.request(hu,s,ne(ne({},n),r)),"addSessionFeedback","mutation",s)},initializeSession(s,n){return t(r=>e.request(pu,s,ne(ne({},n),r)),"initializeSession","mutation",s)},Ignore(s,n){return t(r=>e.request(mu,s,ne(ne({},n),r)),"Ignore","query",s)},GetSamplingConfig(s,n){return t(r=>e.request(fu,s,ne(ne({},n),r)),"GetSamplingConfig","query",s)}}}function gu(){var e=document.createElement("canvas");return e.getContext&&e.getContext("2d")?e.toDataURL("image/webp").indexOf("data:image/webp")==0:!1}function Zu(){return gu()?{type:"image/webp",quality:.9}:{type:"image/jpeg",quality:.6}}const Su="telemetry.sdk.name",Iu="telemetry.sdk.version",wr=1e3,Xu=1e3*2,Vu=4*60*60*1e3,un=15*60*1e3,kr={normal:{bytes:1e7,time:4*60*1e3},canvas:{bytes:16e6,time:5e3}},Gu=100,Cr="app.highlight.io",xr="https://app.launchdarkly.com",Ru={"observability.ld-stg.launchdarkly.com":"ld-stg.launchdarkly.com","observability.app.launchdarkly.com":"app.launchdarkly.com","observability.app.ld.catamorphic.com":"app.ld.catamorphic.com"},vu="/projects/default",Wu=new RegExp("pub\\.(?<domain>.+)");/*! js-cookie v3.0.8 | MIT */function ns(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)n!=="__proto__"&&(e[n]=s[n])}return e}var wu={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function dn(e,t){function s(r,l,d){if(typeof document<"u"){d=ns({},t,d),typeof d.expires=="number"&&(d.expires=new Date(Date.now()+d.expires*864e5)),d.expires&&(d.expires=d.expires.toUTCString()),r=encodeURIComponent(r).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var f="";for(var h in d)d[h]&&(f+="; "+h,d[h]!==!0&&(f+="="+d[h].split(";")[0]));return document.cookie=r+"="+e.write(l,r)+f}}function n(r){if(!(typeof document>"u"||arguments.length&&!r)){for(var l=document.cookie?document.cookie.split("; "):[],d={},f=0;f<l.length;f++){var h=l[f].split("="),m=h.slice(1).join("=");try{var p=decodeURIComponent(h[0]);if(p in d||(d[p]=e.read(m,p)),r===p)break}catch{}}return r?d[r]:d}}return Object.create({set:s,get:n,remove:function(r,l){s(r,"",ns({},l,{expires:-1}))},withAttributes:function(r){return dn(this.converter,ns({},this.attributes,r))},withConverter:function(r){return dn(ns({},this.converter,r),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var is=dn(wu,{path:"/"}),hn=(e=>(e.CLIENT_ID="highlightClientID",e))(hn||{});let rs="localStorage",pn=!0,ku=class{constructor(){Rt(this,"storage",{})}get length(){return Object.keys(this.storage).length}key(t){var s;return(s=Object.keys(this.storage)[t])!=null?s:null}getItem(t){var s;return(s=this.storage[t])!=null?s:""}setItem(t,s){this.storage[t]=s}removeItem(t){delete this.storage[t]}},Cu=class{getItem(t){var s;return(s=is.get(t))!=null?s:""}setItem(t,s){if(!pn)return;const n=new Date;n.setTime(n.getTime()+un),is.set(t,s,{expires:n})}removeItem(t){pn&&is.remove(t)}keys(){var t;return Object.keys((t=is.get())!=null?t:{})}};const pt=new ku,mt=new Cu,os=()=>{let e=null;if(typeof window>"u")return pt;try{switch(rs){case"localStorage":e=window.localStorage;break;case"sessionStorage":e=window.sessionStorage;break}e||(lt("storage","getPersistentStorage","debug",`persistent storage was not found for mode ${rs}; using global storage`),e=pt)}catch(t){lt("storage","getPersistentStorage","debug","failed to get persistent storage; using global storage",t),e=pt}return e},xu=e=>{rs=e},Tr=e=>{pn=e},Ce=e=>{try{return os().getItem(e)}catch(t){return lt("storage","getItem","debug",`failed to get item ${e}; using global storage`,t),pt.getItem(e)}},He=(e,t)=>{mt.setItem(e,t);try{return os().setItem(e,t)}catch(s){return lt("storage","setItem","debug",`failed to set item ${e}; using global storage`,s),pt.setItem(e,t)}},ls=e=>{mt.removeItem(e);try{return os().removeItem(e)}catch(t){return lt("storage","removeItem","debug",`failed to remove item ${e}; using global storage`,t),pt.removeItem(e)}},Tu=e=>{if(rs==="sessionStorage"){console.warn("highlight.io cannot use local storage; segment integration will not work");return}if(typeof window>"u"){console.warn("highlight.io cannot use local storage (not a window); segment integration will not work");return}const t=window.localStorage.setItem;window.localStorage.setItem=function(){const[s,n]=arguments;e({keyName:s,keyValue:n}),t.apply(this,[s,n])}};var Xe=(e=>(e.SEGMENT_LAST_SENT_HASH_KEY="HIGHLIGHT_SEGMENT_LAST_SENT_HASH_KEY",e.SESSION_ID="sessionID",e.SESSION_DATA="sessionData",e.USER_IDENTIFIER="highlightIdentifier",e.USER_OBJECT="highlightUserObject",e))(Xe||{});const as=e=>`${Xe.SESSION_DATA}_${e}`,Lu=()=>{var e;return typeof globalThis<"u"&&(e=globalThis.persistentSessionSecureID)!=null&&e.length?globalThis.persistentSessionSecureID:Lr()},Nu=e=>{typeof globalThis<"u"&&e!=null&&e.length&&(globalThis.persistentSessionSecureID=e)},Lr=()=>{var e;return(e=Ce(Xe.SESSION_ID))!=null?e:""},kt=e=>{He(Xe.SESSION_ID,e)},Ju=e=>{const t=as(e);return JSON.parse(Ce(t)||"{}")},cs=e=>{e||(e=Lr());let t=Ju(e);if(t&&t.lastPushTime&&Date.now()-t.lastPushTime<un)return t;ls(as(e))},st=function(e){if(!(e!=null&&e.sessionSecureID))return;const t=e.sessionSecureID;Nu(t);const s=as(t);He(s,JSON.stringify(e)),Uu(s)},Yu=function(){const e=mt.getItem(Xe.SESSION_ID);kt(e);const t=as(e),s=mt.getItem(t);try{st(JSON.parse(s))}catch{}};function Uu(e){var t;const s=`${Xe.SESSION_DATA}_`,n=new Set,r=os();for(let l=r.length-1;l>=0;l--){const d=r.key(l);d&&d.startsWith(s)&&d!==e&&n.add(d)}for(const l of mt.keys())l.startsWith(s)&&l!==e&&n.add(l);for(const l of n){let d=!0;try{const f=Ce(l)||mt.getItem(l)||"{}",h=JSON.parse(f),m=(t=h.lastPushTime)!=null?t:h.sessionStartTime;d=m===void 0||Date.now()-m>=un}catch{}d&&(lt("highlightSession","pruneSessionData","debug",`removing session data for stale key ${l}`),ls(l))}}var Nr=(e=>(e.BillingQuotaExceeded="BillingQuotaExceeded",e))(Nr||{});const Fu=3,Mu=1e3,Ou=500,Ku=[Nr.BillingQuotaExceeded.toString()],Eu=e=>{var t;return((t=e.response.errors)==null?void 0:t.find(s=>Ku.includes(s.message)))===void 0},zu=()=>{const e=(t,s,n,r,l=0)=>at(void 0,null,function*(){try{return yield t()}catch(d){if(d instanceof dt&&!Eu(d))throw d;if(l<Fu)return yield new Promise(f=>setTimeout(f,Mu+Ou*Math.pow(2,l))),yield e(t,s,n,r,l+1);throw console.error(`highlight.io: data request failed after ${l} retries`),d}});return e},Jr="feature_flag",Yr="launchdarkly",Hu=`${Jr}.set.id`,Pu=`${Jr}.provider.name`,Du=`${Yr}.application.id`,Bu=`${Yr}.application.version`,Qu="$ld:telemetry:session:init",Ur="$ld:telemetry:track";function Fr(e){return e.includes("%")||e.includes(":")?e.replace(/%/g,"%25").replace(/:/g,"%3A"):e}function Mr(e){return e.kind==="multi"}function Or(e){return Mr(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>`${t}:${Fr(e[t].key)}`).join(":"):"kind"in e&&e.kind==="user"?e.key:"kind"in e?`${e.kind}:${Fr(e.key)}`:e.key}function ju(e){return Mr(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>({[t]:e[t].key})).reduce((t,s)=>ne(ne({},t),s),{}):"kind"in e?{[e.kind]:e.key}:{user:e.key}}let Au=class{constructor(t,s){Rt(this,"client"),Rt(this,"metadata"),this.client=t,this.metadata=s}getHooks(t){return[]}init(t){this.client.track(Qu,{sessionID:t})}recordGauge(t,s){}identify(t,s,n={},r){}error(t,s){}track(t,s){const n=s.event;this.client.track(n?`${Ur}:${n}`:Ur,Bt(ne({},s),{sessionID:t}))}},_u=class extends Bs{constructor(t,s){super(),Rt(this,"client"),this.client=new Au(t,s)}getHooks(t){return[{getMetadata:()=>({name:"highlight.run/ld"}),afterIdentify:(s,n,r)=>(this.load(this.client),n)}]}init(t){return this._bufferCall("init",[t])}recordGauge(t,s){return this._bufferCall("recordGauge",[t,s])}identify(t,s,n={},r){return this._bufferCall("identify",[t,s,n,r])}error(t,s){return this._bufferCall("error",[t,s])}track(t,s){return this._bufferCall("track",[t,s])}};const $u=e=>{e(window.location.href);const t=history.pushState;history.pushState=(l=>function(){var d=l.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),d})(history.pushState);const s=history.replaceState;history.replaceState=(l=>function(){var d=l.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),d})(history.replaceState);const n=()=>{window.dispatchEvent(new Event("locationchange"))};window.addEventListener("popstate",n);const r=function(){e(window.location.href)};return window.addEventListener("locationchange",r),()=>{window.removeEventListener("popstate",n),window.removeEventListener("locationchange",r),history.pushState=t,history.replaceState=s}},qu="1.2.0",ed={version:qu},td=ed.version;function Kr(e,t){return nd(e)}function sd(e){if(e.id.length)return`#${e.id}`;if(e.classList.length){let t=[];for(const s of e.classList)t.push(`.${s}`);return`${e.nodeName.toLowerCase()}${t.join(",")}`}return e.nodeName.toLowerCase()}const nd=e=>{let t="";const s=e.getAttribute("class"),n=e.getAttribute("id");return n&&(t=t.concat(Er(n,"#"))),s&&(t=t.concat(Er(s,"."))),t===""&&(t=t.concat(e.tagName.toLowerCase())),t},Er=(e,t)=>`${t}${e.trim().split(" ").join(t)}`,id=e=>{let t;const s=()=>{clearTimeout(t),t=setTimeout(()=>{var n,r;e({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:(r=(n=window.screen.orientation)==null?void 0:n.angle)!=null?r:0})},500)};return window.addEventListener("resize",s),s(),()=>window.removeEventListener("resize",s)};var zr={exports:{}};/**
279
279
  * @preserve
280
280
  * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013)
281
281
  *