(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="da5af569-02c3-4b9e-b090-1194183d6717",t._sentryDebugIdIdentifier="sentry-dbid-da5af569-02c3-4b9e-b090-1194183d6717")}catch{}})();var m={_mtm:[],install:function(t,e){this._mtm=window._mtm=window._mtm||[],e!==void 0&&e.url!==void 0&&e.id!==void 0&&typeof e.id!="number"&&this.init(e)},init:function(t){this._mtm.push({"mtm.startTime":new Date().getTime(),event:"mtm.Start"});const e=document,n=e.createElement("script"),o=e.getElementsByTagName("script")[0];n.async=!0,n.src=`${t.url}/js/container_${t.id}.js`,o.parentNode.insertBefore(n,o)},bind:function(t){t!==void 0&&t.router!==void 0&&t.router.afterEach((e,n)=>{const o=t.router.options.history||t.router.options,i=o.base.substring(0,o.base.length-1),c=`${window.location.protocol}//${window.location.host}${i}${e.fullPath}`;let r=`${document.title}`,d=null,s=null,a=document.referrer,u=null;t.user!==void 0&&t.user.id!==void 0&&t.user.id!==0&&(d=`${t.user.id.toString()}`),t.user!==void 0&&t.user.account!==void 0&&(s=`${t.user.account.toString()}`),n.name!==null&&(a=`${window.location.protocol}//${window.location.host}${i}${n.fullPath}`),window.performance&&window.performance.timing&&window.performance.timing.domContentLoadedEventEnd&&window.performance.timing.navigationStart&&(u=window.performance.timing.domContentLoadedEventEnd-window.performance.timing.navigationStart),setTimeout(()=>{r=`${document.title}`,this._mtm.push({event:"PageView",currentUrl:c,referrerUrl:a,currentTitle:r,userId:d,userAccount:s,loadTime:u})},500)})},event:function(t,e){let n={event:t};typeof e!="object"&&(e={}),Object.assign(n,e),this._mtm.push(n)},getRandomSerial:function(t,e){let n="";const o=new Date().getTime();return typeof t=="string"&&(n+=`${t}-`),n+=`${Math.floor(o/1e3)}`,typeof e=="string"&&(n+=`-${e}`),n}};export{m as A};
