"use strict";(()=>{function e(e){let t=location.href;if(e){let n=new URL(t);if(n.pathname!==e)return n.pathname=e,n.search="",n.href}return t}var t,n,r,a,o=(r=()=>{},()=>(r&&(a=r(r=0)),a));(t=()=>{o(),function(){let t=e=>e,n=t,r=document,a=r.currentScript,o=((null==a?void 0:a.dataset.endpoint)||null!=a&&a.src.includes("/va/"),null==a?void 0:a.dataset.disableAutoTrack),l=null,i=null,u=!0;function s(e,...t){(null==a?void 0:a.dataset.debug)!=="false"&&console.log(`%c[Vercel Web Analytics]%c ${e}`,"color: rgb(120, 120, 120)","color: inherit",...t)}async function d(e){if(e&&!Array.isArray(e))return{p:e};let t=r.querySelectorAll("[data-flag-values]");if(!a||!t.length)return;let n=new URL(a.src);return n.pathname=n.pathname.replace("/script.js","/flags/script.js"),import(n.href).then(n=>n.gather(t,e))}async function f({type:o,data:u,options:f}){var c,p,h;let v=e(i),w=r.referrer,y={type:o,url:v,payload:u},g=n(y);if(t===n||(!1===g||null===g?s("Page view would be ignored by `beforeSend` because null was returned.",y):s("Event transformed by `beforeSend`",{before:y,after:g})),!1===g||null===g)return;g&&(v=g.url,u=null!=(c=g.payload)?c:u);let b=w.includes(location.host),m={o:v,sv:"0.1.3",sdkn:null!=(p=null==a?void 0:a.dataset.sdkn)?p:void 0,sdkv:null!=(h=null==a?void 0:a.dataset.sdkv)?h:void 0,ts:Date.now(),...l&&{dp:l},...null!=f&&f.withReferrer&&!b?{r:w}:{},..."event"===o&&u&&{en:u.name,ed:u.data},f:await d(null==f?void 0:f.flags).catch(()=>{})};"pageview"===o&&s(`[pageview] ${m.o}`,m),"event"===o&&u&&s(`[event] ${u.name}`,m)}async function c(e={}){return f({type:"pageview",options:{withReferrer:e.withReferrer}})}async function p(e,t,n){{let r="is longer than the 255 character limit and would have been dropped in production.";if(e.length>255){s(`Event "${e}" ${r}`);return}if(t)for(let a of Object.keys(t)){a.length>255&&s(`Property "${a}" ${r}`);let o=t[a];"string"==typeof o&&o.length>255&&s(`Value of property "${a}" ${r}`)}}return f({type:"event",data:{name:e,data:t},options:{withReferrer:!0,flags:null==n?void 0:n.flags}})}function h(e){return e.pathname===new URL(w).pathname}function v(e){let t=e?"string"==typeof e?new URL(e,location.origin):new URL(e.href):null;!t||h(t)||t.hash&&h(t)||c()}s("Debug mode is enabled by default in development. No requests will be sent to the server.");let w=e(),y=()=>{var e;window.va=function(e,t){"beforeSend"===e?n=t:"event"===e?t&&p(t.name,t.data,t.options):"pageview"===e&&t&&(t.route&&(l=t.route),t.path&&(i=t.path),c({withReferrer:u}),u=!1)},null==(e=window.vaq)||e.forEach(([e,t])=>{"function"==typeof t||s("Running queued event",e,t),window.va(e,t)})};(()=>{if(window.vai||(window.vai=!0,y(),o))return;c({withReferrer:!0});let t=history.pushState.bind(history);history.pushState=function(...n){t(...n);try{v(n[2]),w=e()}catch(r){}},window.addEventListener("popstate",function(){v(e()),w=e()})})()}()},()=>(n||t((n={exports:{}}).exports,n),n.exports))()})();