@v-tilt/browser 1.1.1 → 1.1.3

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.
@@ -147,7 +147,7 @@ export declare const PROP_GEOIP_LONGITUDE = "$geoip_longitude";
147
147
  /** Initial GeoIP properties (set once) */
148
148
  export declare const PROP_INITIAL_GEOIP_PREFIX = "$initial_geoip_";
149
149
  export declare const UTM_PARAMS: readonly ["utm_source", "utm_medium", "utm_campaign", "utm_content", "utm_term", "gclid", "gad_source", "gbraid", "wbraid", "fbclid", "msclkid", "twclid", "li_fat_id", "mc_cid", "igshid", "ttclid"];
150
- export type UTMParam = typeof UTM_PARAMS[number];
150
+ export type UTMParam = (typeof UTM_PARAMS)[number];
151
151
  export declare const PERSISTENCE_RESERVED_PROPERTIES: string[];
152
152
  /**
153
153
  * Person profiles configuration mode
@@ -155,7 +155,7 @@ export declare const PERSISTENCE_RESERVED_PROPERTIES: string[];
155
155
  * - 'identified_only': Only create profiles when user is identified
156
156
  * - 'never': Never create person profiles (events only)
157
157
  */
158
- export type PersonProfilesMode = 'always' | 'identified_only' | 'never';
158
+ export type PersonProfilesMode = "always" | "identified_only" | "never";
159
159
  /** Default API host */
160
160
  export declare const DEFAULT_API_HOST = "https://api.vtilt.io";
161
161
  /** Default flush interval (ms) */
package/dist/main.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";function i(i,e,t,a,r,n,s){try{var o=i[n](s),u=o.value}catch(i){return void t(i)}o.done?e(u):Promise.resolve(u).then(a,r)}function e(e){return function(){var t=this,a=arguments;return new Promise(function(r,n){var s=e.apply(t,a);function o(e){i(s,r,n,o,u,"next",e)}function u(e){i(s,r,n,o,u,"throw",e)}o(void 0)})}}function t(){return t=Object.assign?Object.assign.bind():function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var a in t)({}).hasOwnProperty.call(t,a)&&(i[a]=t[a])}return i},t.apply(null,arguments)}Object.defineProperty(exports,"__esModule",{value:!0});class a{constructor(i){void 0===i&&(i={}),this.config=this.parseConfigFromScript(i)}parseConfigFromScript(i){if(!document.currentScript)return t({token:i.token||""},i);var e=document.currentScript,a=t({token:""},i);if(a.api_host=e.getAttribute("data-api-host")||e.getAttribute("data-host")||i.api_host,a.proxy=e.getAttribute("data-proxy")||i.proxy,a.proxyUrl=e.getAttribute("data-proxy-url")||i.proxyUrl,a.token=e.getAttribute("data-token")||i.token||"",a.projectId=e.getAttribute("data-project-id")||i.projectId||"",a.domain=e.getAttribute("data-domain")||i.domain,a.storage=e.getAttribute("data-storage")||i.storage,a.stringifyPayload="false"!==e.getAttribute("data-stringify-payload"),a.capture_performance="true"===e.getAttribute("data-capture-performance")||i.capture_performance,a.proxy&&a.proxyUrl)throw console.error("Error: Both data-proxy and data-proxy-url are specified. Please use only one of them."),new Error("Both data-proxy and data-proxy-url are specified. Please use only one of them.");for(var r of(a.globalAttributes=t({},i.globalAttributes),Array.from(e.attributes)))r.name.startsWith("data-vt-")&&(a.globalAttributes[r.name.slice(8).replace(/-/g,"_")]=r.value);return a}getConfig(){return t({},this.config)}updateConfig(i){this.config=t({},this.config,i)}}var r="__vt_session",n="__vt_window_id",s="__vt_primary_window",o="__vt_user_state",u="__vt_device_id",c="__vt_anonymous_id",h="__vt_distinct_id",l="__vt_user_properties",d="localStorage",f="localStorage+cookie",A="sessionStorage",v="memory",m="$initial_person_info",p={"Europe/Andorra":"AD","Asia/Dubai":"AE","Asia/Kabul":"AF","America/Antigua":"AG","America/Anguilla":"AI","Europe/Tirane":"AL","Asia/Yerevan":"AM","Africa/Luanda":"AO","Antarctica/Casey":"AQ","Antarctica/Davis":"AQ","Antarctica/DumontDUrville":"AQ","Antarctica/Mawson":"AQ","Antarctica/McMurdo":"AQ","Antarctica/Palmer":"AQ","Antarctica/Rothera":"AQ","Antarctica/Syowa":"AQ","Antarctica/Troll":"AQ","Antarctica/Vostok":"AQ","America/Argentina/Buenos_Aires":"AR","America/Argentina/Catamarca":"AR","America/Argentina/Cordoba":"AR","America/Argentina/Jujuy":"AR","America/Argentina/La_Rioja":"AR","America/Argentina/Mendoza":"AR","America/Argentina/Rio_Gallegos":"AR","America/Argentina/Salta":"AR","America/Argentina/San_Juan":"AR","America/Argentina/San_Luis":"AR","America/Argentina/Tucuman":"AR","America/Argentina/Ushuaia":"AR","Pacific/Pago_Pago":"AS","Europe/Vienna":"AT","Australia/Adelaide":"AU","Australia/Brisbane":"AU","Australia/Broken_Hill":"AU","Australia/Darwin":"AU","Australia/Eucla":"AU","Australia/Hobart":"AU","Australia/Lindeman":"AU","Australia/Lord_Howe":"AU","Australia/Melbourne":"AU","Australia/Perth":"AU","Australia/Sydney":"AU","America/Aruba":"AW","Europe/Mariehamn":"AX","Asia/Baku":"AZ","Europe/Sarajevo":"BA","America/Barbados":"BB","Asia/Dhaka":"BD","Europe/Brussels":"BE","Africa/Ouagadougou":"BF","Europe/Sofia":"BG","Asia/Bahrain":"BH","Africa/Bujumbura":"BI","Africa/Porto-Novo":"BJ","America/St_Barthelemy":"BL","Atlantic/Bermuda":"BM","Asia/Brunei":"BN","America/La_Paz":"BO","America/Kralendijk":"BQ","America/Araguaina":"BR","America/Bahia":"BR","America/Belem":"BR","America/Boa_Vista":"BR","America/Campo_Grande":"BR","America/Cuiaba":"BR","America/Eirunepe":"BR","America/Fortaleza":"BR","America/Maceio":"BR","America/Manaus":"BR","America/Noronha":"BR","America/Porto_Velho":"BR","America/Recife":"BR","America/Rio_Branco":"BR","America/Santarem":"BR","America/Sao_Paulo":"BR","America/Nassau":"BS","Asia/Thimphu":"BT","Africa/Gaborone":"BW","Europe/Minsk":"BY","America/Belize":"BZ","America/Atikokan":"CA","America/Blanc-Sablon":"CA","America/Cambridge_Bay":"CA","America/Creston":"CA","America/Dawson":"CA","America/Dawson_Creek":"CA","America/Edmonton":"CA","America/Fort_Nelson":"CA","America/Glace_Bay":"CA","America/Goose_Bay":"CA","America/Halifax":"CA","America/Inuvik":"CA","America/Iqaluit":"CA","America/Moncton":"CA","America/Nipigon":"CA","America/Pangnirtung":"CA","America/Rainy_River":"CA","America/Rankin_Inlet":"CA","America/Regina":"CA","America/Resolute":"CA","America/St_Johns":"CA","America/Swift_Current":"CA","America/Thunder_Bay":"CA","America/Toronto":"CA","America/Vancouver":"CA","America/Whitehorse":"CA","America/Winnipeg":"CA","America/Yellowknife":"CA","Indian/Cocos":"CC","Africa/Kinshasa":"CD","Africa/Lubumbashi":"CD","Africa/Bangui":"CF","Africa/Brazzaville":"CG","Europe/Zurich":"CH","Africa/Abidjan":"CI","Pacific/Rarotonga":"CK","America/Punta_Arenas":"CL","America/Santiago":"CL","Pacific/Easter":"CL","Africa/Douala":"CM","Asia/Shanghai":"CN","Asia/Urumqi":"CN","America/Bogota":"CO","America/Costa_Rica":"CR","America/Havana":"CU","Atlantic/Cape_Verde":"CV","America/Curacao":"CW","Indian/Christmas":"CX","Asia/Famagusta":"CY","Asia/Nicosia":"CY","Europe/Prague":"CZ","Europe/Berlin":"DE","Europe/Busingen":"DE","Africa/Djibouti":"DJ","Europe/Copenhagen":"DK","America/Dominica":"DM","America/Santo_Domingo":"DO","Africa/Algiers":"DZ","America/Guayaquil":"EC","Pacific/Galapagos":"EC","Europe/Tallinn":"EE","Africa/Cairo":"EG","Africa/El_Aaiun":"EH","Africa/Asmara":"ER","Africa/Ceuta":"ES","Atlantic/Canary":"ES","Europe/Madrid":"ES","Africa/Addis_Ababa":"ET","Europe/Helsinki":"FI","Pacific/Fiji":"FJ","Atlantic/Stanley":"FK","Pacific/Chuuk":"FM","Pacific/Kosrae":"FM","Pacific/Pohnpei":"FM","Atlantic/Faroe":"FO","Europe/Paris":"FR","Africa/Libreville":"GA","Europe/London":"GB","America/Grenada":"GD","Asia/Tbilisi":"GE","America/Cayenne":"GF","Europe/Guernsey":"GG","Africa/Accra":"GH","Europe/Gibraltar":"GI","America/Danmarkshavn":"GL","America/Nuuk":"GL","America/Scoresbysund":"GL","America/Thule":"GL","Africa/Banjul":"GM","Africa/Conakry":"GN","America/Guadeloupe":"GP","Africa/Malabo":"GQ","Europe/Athens":"GR","Atlantic/South_Georgia":"GS","America/Guatemala":"GT","Pacific/Guam":"GU","Africa/Bissau":"GW","America/Guyana":"GY","Asia/Hong_Kong":"HK","America/Tegucigalpa":"HN","Europe/Zagreb":"HR","America/Port-au-Prince":"HT","Europe/Budapest":"HU","Asia/Jakarta":"ID","Asia/Jayapura":"ID","Asia/Makassar":"ID","Asia/Pontianak":"ID","Europe/Dublin":"IE","Asia/Jerusalem":"IL","Europe/Isle_of_Man":"IM","Asia/Kolkata":"IN","Indian/Chagos":"IO","Asia/Baghdad":"IQ","Asia/Tehran":"IR","Atlantic/Reykjavik":"IS","Europe/Rome":"IT","Europe/Jersey":"JE","America/Jamaica":"JM","Asia/Amman":"JO","Asia/Tokyo":"JP","Africa/Nairobi":"KE","Asia/Bishkek":"KG","Asia/Phnom_Penh":"KH","Pacific/Enderbury":"KI","Pacific/Kiritimati":"KI","Pacific/Tarawa":"KI","Indian/Comoro":"KM","America/St_Kitts":"KN","Asia/Pyongyang":"KP","Asia/Seoul":"KR","Asia/Kuwait":"KW","America/Cayman":"KY","Asia/Almaty":"KZ","Asia/Aqtau":"KZ","Asia/Aqtobe":"KZ","Asia/Atyrau":"KZ","Asia/Oral":"KZ","Asia/Qostanay":"KZ","Asia/Qyzylorda":"KZ","Asia/Vientiane":"LA","Asia/Beirut":"LB","America/St_Lucia":"LC","Europe/Vaduz":"LI","Asia/Colombo":"LK","Africa/Monrovia":"LR","Africa/Maseru":"LS","Europe/Vilnius":"LT","Europe/Luxembourg":"LU","Europe/Riga":"LV","Africa/Tripoli":"LY","Africa/Casablanca":"MA","Europe/Monaco":"MC","Europe/Chisinau":"MD","Europe/Podgorica":"ME","America/Marigot":"MF","Indian/Antananarivo":"MG","Pacific/Kwajalein":"MH","Pacific/Majuro":"MH","Europe/Skopje":"MK","Africa/Bamako":"ML","Asia/Yangon":"MM","Asia/Choibalsan":"MN","Asia/Hovd":"MN","Asia/Ulaanbaatar":"MN","Asia/Macau":"MO","Pacific/Saipan":"MP","America/Martinique":"MQ","Africa/Nouakchott":"MR","America/Montserrat":"MS","Europe/Malta":"MT","Indian/Mauritius":"MU","Indian/Maldives":"MV","Africa/Blantyre":"MW","America/Bahia_Banderas":"MX","America/Cancun":"MX","America/Chihuahua":"MX","America/Hermosillo":"MX","America/Matamoros":"MX","America/Mazatlan":"MX","America/Merida":"MX","America/Mexico_City":"MX","America/Monterrey":"MX","America/Ojinaga":"MX","America/Tijuana":"MX","Asia/Kuala_Lumpur":"MY","Asia/Kuching":"MY","Africa/Maputo":"MZ","Africa/Windhoek":"NA","Pacific/Noumea":"NC","Africa/Niamey":"NE","Pacific/Norfolk":"NF","Africa/Lagos":"NG","America/Managua":"NI","Europe/Amsterdam":"NL","Europe/Oslo":"NO","Asia/Kathmandu":"NP","Pacific/Nauru":"NR","Pacific/Niue":"NU","Pacific/Auckland":"NZ","Pacific/Chatham":"NZ","Asia/Muscat":"OM","America/Panama":"PA","America/Lima":"PE","Pacific/Gambier":"PF","Pacific/Marquesas":"PF","Pacific/Tahiti":"PF","Pacific/Bougainville":"PG","Pacific/Port_Moresby":"PG","Asia/Manila":"PH","Asia/Karachi":"PK","Europe/Warsaw":"PL","America/Miquelon":"PM","Pacific/Pitcairn":"PN","America/Puerto_Rico":"PR","Asia/Gaza":"PS","Asia/Hebron":"PS","Atlantic/Azores":"PT","Atlantic/Madeira":"PT","Europe/Lisbon":"PT","Pacific/Palau":"PW","America/Asuncion":"PY","Asia/Qatar":"QA","Indian/Reunion":"RE","Europe/Bucharest":"RO","Europe/Belgrade":"RS","Asia/Anadyr":"RU","Asia/Barnaul":"RU","Asia/Chita":"RU","Asia/Irkutsk":"RU","Asia/Kamchatka":"RU","Asia/Khandyga":"RU","Asia/Krasnoyarsk":"RU","Asia/Magadan":"RU","Asia/Novokuznetsk":"RU","Asia/Novosibirsk":"RU","Asia/Omsk":"RU","Asia/Sakhalin":"RU","Asia/Srednekolymsk":"RU","Asia/Tomsk":"RU","Asia/Ust-Nera":"RU","Asia/Vladivostok":"RU","Asia/Yakutsk":"RU","Asia/Yekaterinburg":"RU","Europe/Astrakhan":"RU","Europe/Kaliningrad":"RU","Europe/Kirov":"RU","Europe/Moscow":"RU","Europe/Samara":"RU","Europe/Saratov":"RU","Europe/Ulyanovsk":"RU","Europe/Volgograd":"RU","Africa/Kigali":"RW","Asia/Riyadh":"SA","Pacific/Guadalcanal":"SB","Indian/Mahe":"SC","Africa/Khartoum":"SD","Europe/Stockholm":"SE","Asia/Singapore":"SG","Atlantic/St_Helena":"SH","Europe/Ljubljana":"SI","Arctic/Longyearbyen":"SJ","Europe/Bratislava":"SK","Africa/Freetown":"SL","Europe/San_Marino":"SM","Africa/Dakar":"SN","Africa/Mogadishu":"SO","America/Paramaribo":"SR","Africa/Juba":"SS","Africa/Sao_Tome":"ST","America/El_Salvador":"SV","America/Lower_Princes":"SX","Asia/Damascus":"SY","Africa/Mbabane":"SZ","America/Grand_Turk":"TC","Africa/Ndjamena":"TD","Indian/Kerguelen":"TF","Africa/Lome":"TG","Asia/Bangkok":"TH","Asia/Dushanbe":"TJ","Pacific/Fakaofo":"TK","Asia/Dili":"TL","Asia/Ashgabat":"TM","Africa/Tunis":"TN","Pacific/Tongatapu":"TO","Europe/Istanbul":"TR","America/Port_of_Spain":"TT","Pacific/Funafuti":"TV","Asia/Taipei":"TW","Africa/Dar_es_Salaam":"TZ","Europe/Kiev":"UA","Europe/Simferopol":"UA","Europe/Uzhgorod":"UA","Europe/Zaporozhye":"UA","Africa/Kampala":"UG","Pacific/Midway":"UM","Pacific/Wake":"UM","America/Adak":"US","America/Anchorage":"US","America/Boise":"US","America/Chicago":"US","America/Denver":"US","America/Detroit":"US","America/Indiana/Indianapolis":"US","America/Indiana/Knox":"US","America/Indiana/Marengo":"US","America/Indiana/Petersburg":"US","America/Indiana/Tell_City":"US","America/Indiana/Vevay":"US","America/Indiana/Vincennes":"US","America/Indiana/Winamac":"US","America/Juneau":"US","America/Kentucky/Louisville":"US","America/Kentucky/Monticello":"US","America/Los_Angeles":"US","America/Menominee":"US","America/Metlakatla":"US","America/New_York":"US","America/Nome":"US","America/North_Dakota/Beulah":"US","America/North_Dakota/Center":"US","America/North_Dakota/New_Salem":"US","America/Phoenix":"US","America/Sitka":"US","America/Yakutat":"US","Pacific/Honolulu":"US","America/Montevideo":"UY","Asia/Samarkand":"UZ","Asia/Tashkent":"UZ","Europe/Vatican":"VA","America/St_Vincent":"VC","America/Caracas":"VE","America/Tortola":"VG","America/St_Thomas":"VI","Asia/Ho_Chi_Minh":"VN","Pacific/Efate":"VU","Pacific/Wallis":"WF","Pacific/Apia":"WS","Asia/Aden":"YE","Indian/Mayotte":"YT","Africa/Johannesburg":"ZA","Africa/Lusaka":"ZM","Africa/Harare":"ZW"};function g(){return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,i=>(+i^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+i/4).toString(16))}function _(i){return!(!i||"string"!=typeof i)&&!(i.length<2||i.length>10240)}function S(i,e,t){if(i)if(Array.isArray(i))i.forEach((i,a)=>{e.call(t,i,a)});else for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&e.call(t,i[a],a)}function y(i,e,t,a){var{capture:r=!1,passive:n=!0}=null!=a?a:{};null==i||i.addEventListener(e,t,{capture:r,passive:n})}function w(i,e){if(!e)return i;for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=e[t]);return i}function b(i){for(var e=arguments.length,t=new Array(e>1?e-1:0),a=1;a<e;a++)t[a-1]=arguments[a];for(var r of t)for(var n of r)i.push(n);return i}var E="undefined"!=typeof window?window:void 0,M="undefined"!=typeof globalThis?globalThis:E,P=null==M?void 0:M.navigator,C=null==M?void 0:M.document,R=null==M?void 0:M.location,T=null==M?void 0:M.fetch,k=(null==M?void 0:M.XMLHttpRequest)&&"withCredentials"in new M.XMLHttpRequest?M.XMLHttpRequest:void 0;null==M||M.AbortController;var U=null==P?void 0:P.userAgent,I=null!=E?E:{};class B{constructor(i,e){void 0===i&&(i="cookie"),this.storageMethod=i,this.domain=e,this.o=void 0,this.A()}v(){return this.storageMethod===d||this.storageMethod===A}m(){return this.v()?this.storageMethod===d?localStorage:sessionStorage:null}S(i){return{value:i,expiry:(new Date).getTime()+18e5}}M(i){var e=this.m();if(e){var t=this.S(i);e.setItem(r,JSON.stringify(t))}}getSessionIdFromCookie(){var i={};return document.cookie.split(";").forEach(function(e){var[t,a]=e.split("=");i[t.trim()]=a}),i[r]||null}setSessionIdFromCookie(i){var e=r+"="+i+"; Max-Age=1800; path=/; secure";this.domain&&(e+="; domain="+this.domain),document.cookie=e}P(i){this.v()?this.M(i):this.setSessionIdFromCookie(i)}C(){var i=this.m();if(i){var e=i.getItem(r);if(!e)return null;var t=null;try{t=JSON.parse(e)}catch(i){return null}return"object"!=typeof t||null===t?null:(new Date).getTime()>t.expiry?(i.removeItem(r),null):t.value}return this.getSessionIdFromCookie()}getSessionId(){var i=this.C();return i||(i=g(),this.P(i)),i}setSessionId(){var i=this.C()||g();return this.P(i),i}R(){var i=this.m();if(i)i.removeItem(r);else{var e="Thu, 01 Jan 1970 00:00:00 UTC";document.cookie=r+"=; expires="+e+"; path=/;",this.domain&&(document.cookie=r+"=; expires="+e+"; path=/; domain="+this.domain+";")}}resetSessionId(){this.R(),this.setSessionId(),this.T(g())}getWindowId(){if(this.o)return this.o;if(this.k()&&E){var i=E.sessionStorage.getItem(n);if(i)return this.o=i,i}var e=g();return this.T(e),e}T(i){i!==this.o&&(this.o=i,this.k()&&E&&E.sessionStorage.setItem(n,i))}k(){if(void 0===E||!E.sessionStorage)return!1;try{var i="__vt_session_storage_test__";return E.sessionStorage.setItem(i,"test"),E.sessionStorage.removeItem(i),!0}catch(i){return!1}}A(){if(this.k()&&E){var i=E.sessionStorage.getItem(s),e=E.sessionStorage.getItem(n);e&&!i?this.o=e:(e&&E.sessionStorage.removeItem(n),this.T(g())),E.sessionStorage.setItem(s,"true"),this.U()}else this.o=g()}U(){E&&this.k()&&y(E,"beforeunload",()=>{E&&E.sessionStorage&&E.sessionStorage.removeItem(s)},{capture:!1})}}function x(i){if(!C)return null;var e=C.createElement("a");return e.href=i,e}function D(i,e){for(var t=((i.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),a=0;a<t.length;a++){var r=t[a].split("=");if(r[0]===e){if(r.length<2)return"";var n=r[1];try{n=decodeURIComponent(n)}catch(i){}return n.replace(/\+/g," ")}}return""}function O(i,e,t){if(!i||!e||!e.length)return i;for(var a=i.split("#"),r=a[0]||"",n=a[1],s=r.split("?"),o=s[1],u=s[0],c=(o||"").split("&"),h=[],l=0;l<c.length;l++){var d=c[l].split("="),f=d[0],A=d.slice(1).join("=");-1!==e.indexOf(f)?h.push(f+"="+t):f&&h.push(f+(A?"="+A:""))}var v=h.join("&");return u+(v?"?"+v:"")+(n?"#"+n:"")}function N(i){return"function"==typeof i}var L="Mobile",K="iOS",G="Android",j="Tablet",F=G+" "+j,V="iPad",q="Apple",H=q+" Watch",W="Safari",z="BlackBerry",J="Samsung",Z=J+"Browser",X=J+" Internet",Q="Chrome",Y=Q+" OS",ii=Q+" "+K,ei="Internet Explorer",ti=ei+" "+L,ai="Opera",ri=ai+" Mini",ni="Edge",si="Microsoft "+ni,oi="Firefox",ui=oi+" "+K,ci="Nintendo",hi="PlayStation",li="Xbox",di=G+" "+L,fi=L+" "+W,Ai="Windows",vi=Ai+" Phone",mi="Nokia",pi="Ouya",gi="Generic",_i=gi+" "+L.toLowerCase(),Si=gi+" "+j.toLowerCase(),yi="Konqueror",wi="(\\d+(\\.\\d+)?)",bi=new RegExp("Version/"+wi),Ei=new RegExp(li,"i"),Mi=new RegExp(hi+" \\w+","i"),Pi=new RegExp(ci+" \\w+","i"),Ci=new RegExp(z+"|PlayBook|BB10","i"),Ri={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"};function Ti(i,e){return i.toLowerCase().includes(e.toLowerCase())}var ki=(i,e)=>e&&Ti(e,q)||function(i){return Ti(i,W)&&!Ti(i,Q)&&!Ti(i,G)}(i),Ui=function(i,e){return e=e||"",Ti(i," OPR/")&&Ti(i,"Mini")?ri:Ti(i," OPR/")?ai:Ci.test(i)?z:Ti(i,"IE"+L)||Ti(i,"WPDesktop")?ti:Ti(i,Z)?X:Ti(i,ni)||Ti(i,"Edg/")?si:Ti(i,"FBIOS")?"Facebook "+L:Ti(i,"UCWEB")||Ti(i,"UCBrowser")?"UC Browser":Ti(i,"CriOS")?ii:Ti(i,"CrMo")||Ti(i,Q)?Q:Ti(i,G)&&Ti(i,W)?di:Ti(i,"FxiOS")?ui:Ti(i.toLowerCase(),yi.toLowerCase())?yi:ki(i,e)?Ti(i,L)?fi:W:Ti(i,oi)?oi:Ti(i,"MSIE")||Ti(i,"Trident/")?ei:Ti(i,"Gecko")?oi:""},Ii={[ti]:[new RegExp("rv:"+wi)],[si]:[new RegExp(ni+"?\\/"+wi)],[Q]:[new RegExp("("+Q+"|CrMo)\\/"+wi)],[ii]:[new RegExp("CriOS\\/"+wi)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+wi)],[W]:[bi],[fi]:[bi],[ai]:[new RegExp("(Opera|OPR)\\/"+wi)],[oi]:[new RegExp(oi+"\\/"+wi)],[ui]:[new RegExp("FxiOS\\/"+wi)],[yi]:[new RegExp("Konqueror[:/]?"+wi,"i")],[z]:[new RegExp(z+" "+wi),bi],[di]:[new RegExp("android\\s"+wi,"i")],[X]:[new RegExp(Z+"\\/"+wi)],[ei]:[new RegExp("(rv:|MSIE )"+wi)],Mozilla:[new RegExp("rv:"+wi)]},Bi=function(i,e){var t=Ui(i,e),a=Ii[t];if(void 0===a)return null;for(var r=0;r<a.length;r++){var n=a[r],s=i.match(n);if(s)return parseFloat(s[s.length-2])}return null},xi=[[new RegExp(li+"; "+li+" (.*?)[);]","i"),i=>[li,i&&i[1]||""]],[new RegExp(ci,"i"),[ci,""]],[new RegExp(hi,"i"),[hi,""]],[Ci,[z,""]],[new RegExp(Ai,"i"),(i,e)=>{if(/Phone/.test(e)||/WPDesktop/.test(e))return[vi,""];if(new RegExp(L).test(e)&&!/IEMobile\b/.test(e))return[Ai+" "+L,""];var t=/Windows NT ([0-9.]+)/i.exec(e);if(t&&t[1]){var a=t[1],r=Ri[a]||"";return/arm/i.test(e)&&(r="RT"),[Ai,r]}return[Ai,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,i=>{if(i&&i[3]){var e=[i[3],i[4],i[5]||"0"];return[K,e.join(".")]}return[K,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,i=>{var e="";return i&&i.length>=3&&(e=void 0===i[2]?i[3]:i[2]),["watchOS",e]}],[new RegExp("("+G+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+G+")","i"),i=>{if(i&&i[2]){var e=[i[2],i[3],i[4]||"0"];return[G,e.join(".")]}return[G,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,i=>{var e=["Mac OS X",""];if(i&&i[1]){var t=[i[1],i[2],i[3]||"0"];e[1]=t.join(".")}return e}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[Y,""]],[/Linux|debian/i,["Linux",""]]],Di=function(i){return Pi.test(i)?ci:Mi.test(i)?hi:Ei.test(i)?li:new RegExp(pi,"i").test(i)?pi:new RegExp("("+vi+"|WPDesktop)","i").test(i)?vi:/iPad/.test(i)?V:/iPod/.test(i)?"iPod Touch":/iPhone/.test(i)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(i)?H:Ci.test(i)?z:/(kobo)\s(ereader|touch)/i.test(i)?"Kobo":new RegExp(mi,"i").test(i)?mi:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(i)||/(kf[a-z]+)( bui|\)).+silk\//i.test(i)?"Kindle Fire":/(Android|ZTE)/i.test(i)?!new RegExp(L).test(i)||/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(i)?/pixel[\daxl ]{1,6}/i.test(i)&&!/pixel c/i.test(i)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(i)||/lmy47v/i.test(i)&&!/QTAQZ3/i.test(i)?G:F:G:new RegExp("(pda|"+L+")","i").test(i)?_i:new RegExp(j,"i").test(i)&&!new RegExp(j+" pc","i").test(i)?Si:""},Oi="https?://(.*)",Ni=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],Li=b(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],Ni),$i="<masked>";function Ki(i){var e=function(i){return i?0===i.search(Oi+"google.([^/?]*)")?"google":0===i.search(Oi+"bing.com")?"bing":0===i.search(Oi+"yahoo.com")?"yahoo":0===i.search(Oi+"duckduckgo.com")?"duckduckgo":null:null}(i),t="yahoo"!==e?"q":"p",a={};if(null!==e){a.$search_engine=e;var r=C?D(C.referrer,t):"";r.length&&(a.ph_keyword=r)}return a}function Gi(){if("undefined"!=typeof navigator)return navigator.language||navigator.userLanguage}function ji(){return(null==C?void 0:C.referrer)||"$direct"}function Fi(){var i;return(null==C?void 0:C.referrer)&&(null===(i=x(C.referrer))||void 0===i?void 0:i.host)||"$direct"}function Vi(i){var e,{r:t,u:a}=i,r={$referrer:t,$referring_domain:null==t?void 0:"$direct"===t?"$direct":null===(e=x(t))||void 0===e?void 0:e.host};if(a){r.$current_url=a;var n=x(a);r.$host=null==n?void 0:n.host,r.$pathname=null==n?void 0:n.pathname;var s=function(i){var e=Li.concat([]),t={};return S(e,function(e){var a=D(i,e);t[e]=a||null}),t}(a);w(r,s)}t&&w(r,Ki(t));return r}function qi(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(i){return}}function Hi(){try{return(new Date).getTimezoneOffset()}catch(i){return}}function Wi(i,e){if(!U)return{};var t,a,r,[n,s]=function(i){for(var e=0;e<xi.length;e++){var[t,a]=xi[e],r=t.exec(i),n=r&&(N(a)?a(r,i):a);if(n)return n}return["",""]}(U);return w(function(i){var e={};for(var t in i)if(Object.prototype.hasOwnProperty.call(i,t)){var a=i[t];null!=a&&""!==a&&(e[t]=a)}return e}({$os:n,$os_version:s,$browser:Ui(U,navigator.vendor),$device:Di(U),$device_type:(a=U,r=Di(a),r===V||r===F||"Kobo"===r||"Kindle Fire"===r||r===Si?j:r===ci||r===li||r===hi||r===pi?"Console":r===H?"Wearable":r?L:"Desktop"),$timezone:qi(),$timezone_offset:Hi()}),{$current_url:O(null==R?void 0:R.href,[],$i),$host:null==R?void 0:R.host,$pathname:null==R?void 0:R.pathname,$raw_user_agent:U.length>1e3?U.substring(0,997)+"...":U,$browser_version:Bi(U,navigator.vendor),$browser_language:Gi(),$browser_language_prefix:(t=Gi(),"string"==typeof t?t.split("-")[0]:void 0),$screen_height:null==E?void 0:E.screen.height,$screen_width:null==E?void 0:E.screen.width,$viewport_height:null==E?void 0:E.innerHeight,$viewport_width:null==E?void 0:E.innerWidth,$lib:"web",$lib_version:"1.0.7",$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})}class zi{constructor(i,e){void 0===i&&(i="localStorage"),this.I=null,this.storageMethod=i,this.domain=e,this.userIdentity=this.loadUserIdentity()}getUserIdentity(){return t({},this.userIdentity)}getDistinctId(){return this.userIdentity.distinct_id}getAnonymousId(){return this.userIdentity.anonymous_id||(this.userIdentity.anonymous_id=this.generateAnonymousId(),this.setStoredValue(c,this.userIdentity.anonymous_id)),this.userIdentity.anonymous_id}getUserProperties(){return t({},this.userIdentity.properties)}identify(i,e,a){if("number"==typeof i&&(i=i.toString(),console.warn("The first argument to vTilt.identify was a number, but it should be a string. It has been converted to a string.")),i)if(this.isDistinctIdStringLike(i))console.error('The string "'+i+'" was set in vTilt.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.');else if("COOKIELESS_SENTINEL_VALUE"!==i){var r=this.userIdentity.distinct_id;if(this.userIdentity.distinct_id=i,!this.userIdentity.device_id){var n=r||this.userIdentity.anonymous_id;this.userIdentity.device_id=n,this.userIdentity.properties=t({},this.userIdentity.properties,{$had_persisted_distinct_id:!0,$device_id:n})}i!==r&&(this.userIdentity.distinct_id=i);var s="anonymous"===this.userIdentity.user_state;i!==r&&s?(this.userIdentity.user_state="identified",e&&(this.userIdentity.properties=t({},this.userIdentity.properties,e)),a&&Object.keys(a).forEach(i=>{i in this.userIdentity.properties||(this.userIdentity.properties[i]=a[i])}),this.saveUserIdentity()):e||a?("anonymous"===this.userIdentity.user_state&&(this.userIdentity.user_state="identified"),e&&(this.userIdentity.properties=t({},this.userIdentity.properties,e)),a&&Object.keys(a).forEach(i=>{i in this.userIdentity.properties||(this.userIdentity.properties[i]=a[i])}),this.saveUserIdentity()):i!==r&&(this.userIdentity.user_state="identified",this.saveUserIdentity())}else console.error('The string "'+i+'" was set in vTilt.identify which indicates an error. This ID is only used as a sentinel value.');else console.error("Unique user id has not been set in vTilt.identify")}setUserProperties(i,e){if(!i&&!e)return!1;var a=this.userIdentity.distinct_id||this.userIdentity.anonymous_id,r=this.getPersonPropertiesHash(a,i,e);return this.I===r?(console.info("VTilt: A duplicate setUserProperties call was made with the same properties. It has been ignored."),!1):(i&&(this.userIdentity.properties=t({},this.userIdentity.properties,i)),e&&Object.keys(e).forEach(i=>{i in this.userIdentity.properties||(this.userIdentity.properties[i]=e[i])}),this.saveUserIdentity(),this.I=r,!0)}getPersonPropertiesHash(i,e,t){return JSON.stringify({distinct_id:i,userPropertiesToSet:e,userPropertiesToSetOnce:t})}reset(i){var e=this.generateAnonymousId(),a=this.userIdentity.device_id,r=i?this.generateDeviceId():a;this.userIdentity={distinct_id:null,anonymous_id:e,device_id:r,properties:{},user_state:"anonymous"},this.I=null,this.saveUserIdentity(),this.userIdentity.properties=t({},this.userIdentity.properties,{$last_vtilt_reset:(new Date).toISOString()}),this.saveUserIdentity()}getEffectiveId(){return this.userIdentity.distinct_id||this.getAnonymousId()}getDeviceId(){return this.userIdentity.device_id}getUserState(){return this.userIdentity.user_state}setDistinctId(i){this.userIdentity.distinct_id=i,this.saveUserIdentity()}setUserState(i){this.userIdentity.user_state=i,this.saveUserIdentity()}updateUserProperties(i,e){i&&(this.userIdentity.properties=t({},this.userIdentity.properties,i)),e&&Object.keys(e).forEach(i=>{i in this.userIdentity.properties||(this.userIdentity.properties[i]=e[i])}),this.saveUserIdentity()}ensureDeviceId(i){this.userIdentity.device_id||(this.userIdentity.device_id=i,this.userIdentity.properties=t({},this.userIdentity.properties,{$had_persisted_distinct_id:!0,$device_id:i}),this.saveUserIdentity())}isDistinctIdStringLikePublic(i){return this.isDistinctIdStringLike(i)}createAlias(i,e){return this.isValidDistinctId(i)?(void 0===e&&(e=this.getDistinctId()||this.getAnonymousId()),this.isValidDistinctId(e)?i===e?(console.warn("alias matches current distinct_id - should use identify instead"),null):{distinct_id:i,original:e}:(console.warn("Invalid original distinct ID"),null)):(console.warn("Invalid alias provided"),null)}isValidDistinctId(i){if(!i||"string"!=typeof i)return!1;var e=i.toLowerCase().trim();return!["null","undefined","false","true","anonymous","anon","user","test","guest","visitor","unknown","none"].includes(e)&&0!==i.trim().length}isDistinctIdStringLike(i){if(!i||"string"!=typeof i)return!1;var e=i.toLowerCase().trim();return["null","undefined","false","true","anonymous","anon","user","test","guest","visitor","unknown","none","demo","example","sample","placeholder"].includes(e)}loadUserIdentity(){var i=this.getStoredValue(c)||this.generateAnonymousId(),e=this.getStoredValue(h)||null,t=this.getStoredValue(u)||this.generateDeviceId(),a=this.getStoredUserProperties(),r=this.getStoredValue(o)||"anonymous";return{distinct_id:e,anonymous_id:i||this.generateAnonymousId(),device_id:t,properties:a,user_state:r}}saveUserIdentity(){this.setStoredValue(c,this.userIdentity.anonymous_id),this.setStoredValue(u,this.userIdentity.device_id),this.setStoredValue(o,this.userIdentity.user_state),this.userIdentity.distinct_id?this.setStoredValue(h,this.userIdentity.distinct_id):this.removeStoredValue(h),this.setStoredUserProperties(this.userIdentity.properties)}generateAnonymousId(){return"anon_"+g()}generateDeviceId(){return"device_"+g()}getStoredValue(i){try{if(this.storageMethod===v)return null;if(this.storageMethod===d||this.storageMethod===f){var e=localStorage.getItem(i);return null!==e?e:this.storageMethod===f?this.getCookieValue(i):null}return this.getCookieValue(i)}catch(i){return console.warn("Failed to access storage:",i),null}}setStoredValue(i,e){try{if(this.storageMethod===v)return;this.storageMethod===d?localStorage.setItem(i,e):this.storageMethod===f?(localStorage.setItem(i,e),this.setCookieValue(i,e)):this.setCookieValue(i,e)}catch(i){console.warn("Failed to save to storage:",i)}}removeStoredValue(i){this.storageMethod!==v&&(this.storageMethod===d?localStorage.removeItem(i):this.storageMethod===f?(localStorage.removeItem(i),this.removeCookieValue(i)):this.removeCookieValue(i))}getStoredUserProperties(){var i=this.getStoredValue(l);if(!i)return{};try{return JSON.parse(i)}catch(i){return{}}}setStoredUserProperties(i){this.setStoredValue(l,JSON.stringify(i))}getCookieValue(i){var e=document.cookie.split(";");for(var t of e){var[a,r]=t.trim().split("=");if(a===i)return decodeURIComponent(r)}return null}setCookieValue(i,e){var t=i+"="+encodeURIComponent(e)+"; Max-Age=31536000; path=/; secure; SameSite=Lax";this.domain&&(t+="; domain="+this.domain),document.cookie=t}removeCookieValue(i){var e=i+"=; Max-Age=0; path=/";this.domain&&(e+="; domain="+this.domain),document.cookie=e}register_once(i,e){var t=this.getStoredUserProperties(),a=!1;for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(r in t||(t[r]=i[r],a=!0));if(e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(n in t||(t[n]=e[n],a=!0));a&&this.setStoredUserProperties(t)}set_initial_person_info(i,e){if(!this.getStoredUserProperties()[m]){var t=function(i,e){var t=i?b([],Ni,e||[]):[],a=null==R?void 0:R.href.substring(0,1e3);return{r:ji().substring(0,1e3),u:a?O(a,t,$i):void 0}}(i,e);this.register_once({[m]:t},void 0)}}get_initial_props(){var i,e,t=this.getStoredUserProperties()[m];return t?(i=Vi(t),e={},S(i,function(i,t){var a;e["$initial_"+(a=String(t),a.startsWith("$")?a.substring(1):a)]=i}),e):{}}update_referrer_info(){var i={$referrer:ji(),$referring_domain:Fi()};this.register_once(i,void 0)}}class Ji{constructor(i,e){if(this.instance=e,i.capture_performance&&E)try{this.webVitals=require("web-vitals"),this.initializeWebVitals()}catch(i){console.warn("web-vitals library not found. Please install it to enable web vitals tracking.",i)}}initializeWebVitals(){if(this.webVitals){var i=i=>{try{if(!(E&&C&&P&&R))return;var{country:e,locale:t}=function(){var i,e;if(!P)return{country:i,locale:e};try{var t=Intl.DateTimeFormat().resolvedOptions().timeZone;i=p[t],e=P.languages&&P.languages.length?P.languages[0]:P.userLanguage||P.language||P.browserLanguage||"en"}catch(i){}return{country:i,locale:e}}();this.instance.capture("web_vital",{name:i.name,value:i.value,delta:i.delta,rating:i.rating,id:i.id,navigationType:i.navigationType,pathname:R.pathname,href:R.href,"user-agent":P.userAgent,locale:t,location:e,referrer:C.referrer})}catch(i){console.error("Error sending web vital:",i)}};this.webVitals.onCLS&&this.webVitals.onCLS(i),this.webVitals.onFCP&&this.webVitals.onFCP(i),this.webVitals.onLCP&&this.webVitals.onLCP(i),this.webVitals.onTTFB&&this.webVitals.onTTFB(i),this.webVitals.onINP&&this.webVitals.onINP(i)}}}function Zi(i,e,t){try{if(!(e in i))return()=>{};var a=i[e],r=t(a);return N(r)&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__vtilt_wrapped__:{enumerable:!1,value:!0}})),i[e]=r,()=>{i[e]=a}}catch(i){return()=>{}}}class Xi{constructor(i){var e;this._instance=i,this.B=(null===(e=null==E?void 0:E.location)||void 0===e?void 0:e.pathname)||""}get isEnabled(){return!0}startIfEnabled(){this.isEnabled&&this.monitorHistoryChanges()}stop(){this.D&&this.D(),this.D=void 0}monitorHistoryChanges(){var i,e;if(E&&R&&(this.B=R.pathname||"",E.history)){var t=this;(null===(i=E.history.pushState)||void 0===i?void 0:i.__vtilt_wrapped__)||Zi(E.history,"pushState",i=>function(e,a,r){i.call(this,e,a,r),t.O("pushState")}),(null===(e=E.history.replaceState)||void 0===e?void 0:e.__vtilt_wrapped__)||Zi(E.history,"replaceState",i=>function(e,a,r){i.call(this,e,a,r),t.O("replaceState")}),this.N()}}O(i){var e;try{var t=null===(e=null==E?void 0:E.location)||void 0===e?void 0:e.pathname;if(!t||!R||!C)return;if(t!==this.B&&this.isEnabled){var a={navigation_type:i};this._instance.capture("$pageview",a)}this.B=t}catch(e){console.error("Error capturing "+i+" pageview",e)}}N(){if(!this.D&&E){var i=()=>{this.O("popstate")};y(E,"popstate",i),this.D=()=>{E&&E.removeEventListener("popstate",i)}}}}var Qi=Uint8Array,Yi=Uint16Array,ie=Int32Array,ee=new Qi([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),te=new Qi([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),ae=new Qi([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),re=function(i,e){for(var t=new Yi(31),a=0;a<31;++a)t[a]=e+=1<<i[a-1];var r=new ie(t[30]);for(a=1;a<30;++a)for(var n=t[a];n<t[a+1];++n)r[n]=n-t[a]<<5|a;return{b:t,r:r}},ne=re(ee,2),se=ne.b,oe=ne.r;se[28]=258,oe[258]=28;for(var ue=re(te,0).r,ce=new Yi(32768),he=0;he<32768;++he){var le=(43690&he)>>1|(21845&he)<<1;le=(61680&(le=(52428&le)>>2|(13107&le)<<2))>>4|(3855&le)<<4,ce[he]=((65280&le)>>8|(255&le)<<8)>>1}var de=function(i,e,t){for(var a=i.length,r=0,n=new Yi(e);r<a;++r)i[r]&&++n[i[r]-1];var s,o=new Yi(e);for(r=1;r<e;++r)o[r]=o[r-1]+n[r-1]<<1;if(t){s=new Yi(1<<e);var u=15-e;for(r=0;r<a;++r)if(i[r])for(var c=r<<4|i[r],h=e-i[r],l=o[i[r]-1]++<<h,d=l|(1<<h)-1;l<=d;++l)s[ce[l]>>u]=c}else for(s=new Yi(a),r=0;r<a;++r)i[r]&&(s[r]=ce[o[i[r]-1]++]>>15-i[r]);return s},fe=new Qi(288);for(he=0;he<144;++he)fe[he]=8;for(he=144;he<256;++he)fe[he]=9;for(he=256;he<280;++he)fe[he]=7;for(he=280;he<288;++he)fe[he]=8;var Ae=new Qi(32);for(he=0;he<32;++he)Ae[he]=5;var ve=de(fe,9,0),me=de(Ae,5,0),pe=function(i){return(i+7)/8|0},ge=function(i,e,t){return(null==t||t>i.length)&&(t=i.length),new Qi(i.subarray(e,t))},_e=function(i,e,t){t<<=7&e;var a=e/8|0;i[a]|=t,i[a+1]|=t>>8},Se=function(i,e,t){t<<=7&e;var a=e/8|0;i[a]|=t,i[a+1]|=t>>8,i[a+2]|=t>>16},ye=function(i,e){for(var t=[],a=0;a<i.length;++a)i[a]&&t.push({s:a,f:i[a]});var r=t.length,n=t.slice();if(!r)return{t:Re,l:0};if(1==r){var s=new Qi(t[0].s+1);return s[t[0].s]=1,{t:s,l:1}}t.sort(function(i,e){return i.f-e.f}),t.push({s:-1,f:25001});var o=t[0],u=t[1],c=0,h=1,l=2;for(t[0]={s:-1,f:o.f+u.f,l:o,r:u};h!=r-1;)o=t[t[c].f<t[l].f?c++:l++],u=t[c!=h&&t[c].f<t[l].f?c++:l++],t[h++]={s:-1,f:o.f+u.f,l:o,r:u};var d=n[0].s;for(a=1;a<r;++a)n[a].s>d&&(d=n[a].s);var f=new Yi(d+1),A=we(t[h-1],f,0);if(A>e){a=0;var v=0,m=A-e,p=1<<m;for(n.sort(function(i,e){return f[e.s]-f[i.s]||i.f-e.f});a<r;++a){var g=n[a].s;if(!(f[g]>e))break;v+=p-(1<<A-f[g]),f[g]=e}for(v>>=m;v>0;){var _=n[a].s;f[_]<e?v-=1<<e-f[_]++-1:++a}for(;a>=0&&v;--a){var S=n[a].s;f[S]==e&&(--f[S],++v)}A=e}return{t:new Qi(f),l:A}},we=function(i,e,t){return-1==i.s?Math.max(we(i.l,e,t+1),we(i.r,e,t+1)):e[i.s]=t},be=function(i){for(var e=i.length;e&&!i[--e];);for(var t=new Yi(++e),a=0,r=i[0],n=1,s=function(i){t[a++]=i},o=1;o<=e;++o)if(i[o]==r&&o!=e)++n;else{if(!r&&n>2){for(;n>138;n-=138)s(32754);n>2&&(s(n>10?n-11<<5|28690:n-3<<5|12305),n=0)}else if(n>3){for(s(r),--n;n>6;n-=6)s(8304);n>2&&(s(n-3<<5|8208),n=0)}for(;n--;)s(r);n=1,r=i[o]}return{c:t.subarray(0,a),n:e}},Ee=function(i,e){for(var t=0,a=0;a<e.length;++a)t+=i[a]*e[a];return t},Me=function(i,e,t){var a=t.length,r=pe(e+2);i[r]=255&a,i[r+1]=a>>8,i[r+2]=255^i[r],i[r+3]=255^i[r+1];for(var n=0;n<a;++n)i[r+n+4]=t[n];return 8*(r+4+a)},Pe=function(i,e,t,a,r,n,s,o,u,c,h){_e(e,h++,t),++r[256];for(var l=ye(r,15),d=l.t,f=l.l,A=ye(n,15),v=A.t,m=A.l,p=be(d),g=p.c,_=p.n,S=be(v),y=S.c,w=S.n,b=new Yi(19),E=0;E<g.length;++E)++b[31&g[E]];for(E=0;E<y.length;++E)++b[31&y[E]];for(var M=ye(b,7),P=M.t,C=M.l,R=19;R>4&&!P[ae[R-1]];--R);var T,k,U,I,B=c+5<<3,x=Ee(r,fe)+Ee(n,Ae)+s,D=Ee(r,d)+Ee(n,v)+s+14+3*R+Ee(b,P)+2*b[16]+3*b[17]+7*b[18];if(u>=0&&B<=x&&B<=D)return Me(e,h,i.subarray(u,u+c));if(_e(e,h,1+(D<x)),h+=2,D<x){T=de(d,f,0),k=d,U=de(v,m,0),I=v;var O=de(P,C,0);_e(e,h,_-257),_e(e,h+5,w-1),_e(e,h+10,R-4),h+=14;for(E=0;E<R;++E)_e(e,h+3*E,P[ae[E]]);h+=3*R;for(var N=[g,y],L=0;L<2;++L){var K=N[L];for(E=0;E<K.length;++E){var G=31&K[E];_e(e,h,O[G]),h+=P[G],G>15&&(_e(e,h,K[E]>>5&127),h+=K[E]>>12)}}}else T=ve,k=fe,U=me,I=Ae;for(E=0;E<o;++E){var j=a[E];if(j>255){Se(e,h,T[(G=j>>18&31)+257]),h+=k[G+257],G>7&&(_e(e,h,j>>23&31),h+=ee[G]);var F=31&j;Se(e,h,U[F]),h+=I[F],F>3&&(Se(e,h,j>>5&8191),h+=te[F])}else Se(e,h,T[j]),h+=k[j]}return Se(e,h,T[256]),h+k[256]},Ce=new ie([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Re=new Qi(0),Te=function(){for(var i=new Int32Array(256),e=0;e<256;++e){for(var t=e,a=9;--a;)t=(1&t&&-306674912)^t>>>1;i[e]=t}return i}(),ke=function(i,e,t,a,r){if(!r&&(r={l:1},e.dictionary)){var n=e.dictionary.subarray(-32768),s=new Qi(n.length+i.length);s.set(n),s.set(i,n.length),i=s,r.w=n.length}return function(i,e,t,a,r,n){var s=n.z||i.length,o=new Qi(a+s+5*(1+Math.ceil(s/7e3))+r),u=o.subarray(a,o.length-r),c=n.l,h=7&(n.r||0);if(e){h&&(u[0]=n.r>>3);for(var l=Ce[e-1],d=l>>13,f=8191&l,A=(1<<t)-1,v=n.p||new Yi(32768),m=n.h||new Yi(A+1),p=Math.ceil(t/3),g=2*p,_=function(e){return(i[e]^i[e+1]<<p^i[e+2]<<g)&A},S=new ie(25e3),y=new Yi(288),w=new Yi(32),b=0,E=0,M=n.i||0,P=0,C=n.w||0,R=0;M+2<s;++M){var T=_(M),k=32767&M,U=m[T];if(v[k]=U,m[T]=k,C<=M){var I=s-M;if((b>7e3||P>24576)&&(I>423||!c)){h=Pe(i,u,0,S,y,w,E,P,R,M-R,h),P=b=E=0,R=M;for(var B=0;B<286;++B)y[B]=0;for(B=0;B<30;++B)w[B]=0}var x=2,D=0,O=f,N=k-U&32767;if(I>2&&T==_(M-N))for(var L=Math.min(d,I)-1,K=Math.min(32767,M),G=Math.min(258,I);N<=K&&--O&&k!=U;){if(i[M+x]==i[M+x-N]){for(var j=0;j<G&&i[M+j]==i[M+j-N];++j);if(j>x){if(x=j,D=N,j>L)break;var F=Math.min(N,j-2),V=0;for(B=0;B<F;++B){var q=M-N+B&32767,H=q-v[q]&32767;H>V&&(V=H,U=q)}}}N+=(k=U)-(U=v[k])&32767}if(D){S[P++]=268435456|oe[x]<<18|ue[D];var W=31&oe[x],z=31&ue[D];E+=ee[W]+te[z],++y[257+W],++w[z],C=M+x,++b}else S[P++]=i[M],++y[i[M]]}}for(M=Math.max(M,C);M<s;++M)S[P++]=i[M],++y[i[M]];h=Pe(i,u,c,S,y,w,E,P,R,M-R,h),c||(n.r=7&h|u[h/8|0]<<3,h-=7,n.h=m,n.p=v,n.i=M,n.w=C)}else{for(M=n.w||0;M<s+c;M+=65535){var J=M+65535;J>=s&&(u[h/8|0]=c,J=s),h=Me(u,h+1,i.subarray(M,J))}n.i=s}return ge(o,0,a+pe(h)+r)}(i,null==e.level?6:e.level,null==e.mem?r.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(i.length)))):20:12+e.mem,t,a,r)},Ue=function(i,e,t){for(;t;++e)i[e]=t,t>>>=8};function Ie(i,e){e||(e={});var t=function(){var i=-1;return{p:function(e){for(var t=i,a=0;a<e.length;++a)t=Te[255&t^e[a]]^t>>>8;i=t},d:function(){return~i}}}(),a=i.length;t.p(i);var r,n=ke(i,e,10+((r=e).filename?r.filename.length+1:0),8),s=n.length;return function(i,e){var t=e.filename;if(i[0]=31,i[1]=139,i[2]=8,i[8]=e.level<2?4:9==e.level?2:0,i[9]=3,0!=e.mtime&&Ue(i,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),t){i[3]=8;for(var a=0;a<=t.length;++a)i[a+10]=t.charCodeAt(a)}}(n,e),Ue(n,s-8,t.d()),Ue(n,s-4,a),n}var Be="undefined"!=typeof TextEncoder&&new TextEncoder,xe="undefined"!=typeof TextDecoder&&new TextDecoder;try{xe.decode(Re,{stream:!0})}catch(i){}var De,Oe="text/plain";!function(i){i.GZipJS="gzip-js",i.None="none"}(De||(De={}));var Ne=i=>{var{data:e,compression:t}=i;if(e){var a=(i=>JSON.stringify(i,(i,e)=>"bigint"==typeof e?e.toString():e))(e),r=new Blob([a]).size;if(t===De.GZipJS&&r>=1024)try{var n=Ie(function(i,e){if(Be)return Be.encode(i);for(var t=i.length,a=new Qi(i.length+(i.length>>1)),r=0,n=function(i){a[r++]=i},s=0;s<t;++s){if(r+5>a.length){var o=new Qi(r+8+(t-s<<1));o.set(a),a=o}var u=i.charCodeAt(s);u<128||e?n(u):u<2048?(n(192|u>>6),n(128|63&u)):u>55295&&u<57344?(n(240|(u=65536+(1047552&u)|1023&i.charCodeAt(++s))>>18),n(128|u>>12&63),n(128|u>>6&63),n(128|63&u)):(n(224|u>>12),n(128|u>>6&63),n(128|63&u))}return ge(a,0,r)}(a),{mtime:0}),s=new Blob([n],{type:Oe});if(s.size<.95*r)return{contentType:Oe,body:s,estimatedSize:s.size}}catch(i){}return{contentType:"application/json",body:a,estimatedSize:r}}},Le=[{name:"fetch",available:"undefined"!=typeof fetch,method:i=>{var a=Ne(i);if(a){var{contentType:r,body:n,estimatedSize:s}=a,o=i.compression===De.GZipJS&&r===Oe?i.url+(i.url.includes("?")?"&":"?")+"compression=gzip-js":i.url,u=t({"Content-Type":r},i.headers||{}),c=new AbortController,h=i.timeout?setTimeout(()=>c.abort(),i.timeout):null;fetch(o,{method:i.method||"POST",headers:u,body:n,keepalive:s<52428.8,signal:c.signal}).then(function(){var t=e(function*(e){var t,a=yield e.text(),r={statusCode:e.status,text:a};if(200===e.status)try{r.json=JSON.parse(a)}catch(i){}null===(t=i.callback)||void 0===t||t.call(i,r)});return function(i){return t.apply(this,arguments)}}()).catch(()=>{var e;null===(e=i.callback)||void 0===e||e.call(i,{statusCode:0})}).finally(()=>{h&&clearTimeout(h)})}}},{name:"XHR",available:"undefined"!=typeof XMLHttpRequest,method:i=>{var e=Ne(i);if(e){var{contentType:t,body:a}=e,r=i.compression===De.GZipJS&&t===Oe?i.url+(i.url.includes("?")?"&":"?")+"compression=gzip-js":i.url,n=new XMLHttpRequest;n.open(i.method||"POST",r,!0),i.headers&&Object.entries(i.headers).forEach(i=>{var[e,t]=i;n.setRequestHeader(e,t)}),n.setRequestHeader("Content-Type",t),i.timeout&&(n.timeout=i.timeout),n.onreadystatechange=()=>{var e;if(4===n.readyState){var t={statusCode:n.status,text:n.responseText};if(200===n.status)try{t.json=JSON.parse(n.responseText)}catch(i){}null===(e=i.callback)||void 0===e||e.call(i,t)}},n.onerror=()=>{var e;null===(e=i.callback)||void 0===e||e.call(i,{statusCode:0})},n.send(a)}}},{name:"sendBeacon",available:"undefined"!=typeof navigator&&!!navigator.sendBeacon,method:i=>{var e=Ne(i);if(e){var{contentType:t,body:a}=e;try{var r="string"==typeof a?new Blob([a],{type:t}):a,n=i.compression===De.GZipJS&&t===Oe?i.url+(i.url.includes("?")?"&":"?")+"compression=gzip-js":i.url;navigator.sendBeacon(n,r)}catch(i){}}}}],$e=i=>{var e,t=i.transport||"fetch",a=Le.find(i=>i.name===t&&i.available)||Le.find(i=>i.available);if(!a)return console.error("vTilt: No available transport method"),void(null===(e=i.callback)||void 0===e||e.call(i,{statusCode:0}));a.method(i)};class Ke{constructor(i,e){var t,a,r,n;this.L=!0,this.$=[],this.K=(t=(null==e?void 0:e.flush_interval_ms)||3e3,a=250,r=5e3,n=3e3,"number"!=typeof t||isNaN(t)?n:Math.min(Math.max(t,a),r)),this.G=i}get length(){return this.$.length}enqueue(i){this.$.push(i),this.j||this.F()}unload(){if(this.V(),0!==this.$.length){var i=this.q();for(var e in i){var a=i[e];this.G(t({},a,{transport:"sendBeacon"}))}}}enable(){this.L=!1,this.F()}pause(){this.L=!0,this.V()}flush(){this.V(),this.H(),this.F()}F(){this.L||(this.j=setTimeout(()=>{this.V(),this.H(),this.$.length>0&&this.F()},this.K))}V(){this.j&&(clearTimeout(this.j),this.j=void 0)}H(){if(0!==this.$.length){var i=this.q(),e=Date.now();for(var t in i){var a=i[t];a.events.forEach(i=>{var t=new Date(i.timestamp).getTime();i.$offset=Math.abs(t-e)}),this.G(a)}}}q(){var i={};return this.$.forEach(e=>{var t=e.batchKey||e.url;i[t]||(i[t]={url:e.url,events:[],batchKey:e.batchKey}),i[t].events.push(e.event)}),this.$=[],i}}class Ge{constructor(i){this.W=!1,this.J=3e3,this.$=[],this.Z=!0,this.G=i.sendRequest,this.X=i.sendBeacon,E&&void 0!==P&&"onLine"in P&&(this.Z=P.onLine,y(E,"online",()=>{this.Z=!0,this.Y()}),y(E,"offline",()=>{this.Z=!1}))}get length(){return this.$.length}enqueue(i,e){if(void 0===e&&(e=0),e>=10)console.warn("VTilt: Request failed after 10 retries, giving up");else{var t=function(i){var e=3e3*Math.pow(2,i),t=e/2,a=Math.min(18e5,e),r=(Math.random()-.5)*(a-t);return Math.ceil(a+r)}(e),a=Date.now()+t;this.$.push({retryAt:a,request:i,retriesPerformedSoFar:e+1});var r="VTilt: Enqueued failed request for retry in "+Math.round(t/1e3)+"s";this.Z||(r+=" (Browser is offline)"),console.warn(r),this.W||(this.W=!0,this.ii())}}retriableRequest(i){var t=this;return e(function*(){try{var e=yield t.G(i);200!==e.statusCode&&(e.statusCode<400||e.statusCode>=500)&&t.enqueue(i,0)}catch(e){t.enqueue(i,0)}})()}ii(){this.ei&&clearTimeout(this.ei),this.ei=setTimeout(()=>{this.Z&&this.$.length>0&&this.Y(),this.$.length>0?this.ii():this.W=!1},this.J)}Y(){var i=this,t=Date.now(),a=[],r=[];this.$.forEach(i=>{i.retryAt<t?r.push(i):a.push(i)}),this.$=a,r.forEach(function(){var t=e(function*(e){var{request:t,retriesPerformedSoFar:a}=e;try{var r=yield i.G(t);200!==r.statusCode&&(r.statusCode<400||r.statusCode>=500)&&i.enqueue(t,a)}catch(e){i.enqueue(t,a)}});return function(i){return t.apply(this,arguments)}}())}unload(){this.ei&&(clearTimeout(this.ei),this.ei=void 0),this.$.forEach(i=>{var{request:e}=i;try{this.X(e)}catch(i){console.error("VTilt: Failed to send beacon on unload",i)}}),this.$=[]}}var je="vt_rate_limit";class Fe{constructor(i){var e,t;void 0===i&&(i={}),this.lastEventRateLimited=!1,this.eventsPerSecond=null!==(e=i.eventsPerSecond)&&void 0!==e?e:10,this.eventsBurstLimit=Math.max(null!==(t=i.eventsBurstLimit)&&void 0!==t?t:10*this.eventsPerSecond,this.eventsPerSecond),this.persistence=i.persistence,this.captureWarning=i.captureWarning,this.lastEventRateLimited=this.checkRateLimit(!0).isRateLimited}checkRateLimit(i){var e,t,a,r;void 0===i&&(i=!1);var n=Date.now(),s=null!==(t=null===(e=this.persistence)||void 0===e?void 0:e.get(je))&&void 0!==t?t:{tokens:this.eventsBurstLimit,last:n},o=(n-s.last)/1e3;s.tokens+=o*this.eventsPerSecond,s.last=n,s.tokens>this.eventsBurstLimit&&(s.tokens=this.eventsBurstLimit);var u=s.tokens<1;return u||i||(s.tokens=Math.max(0,s.tokens-1)),!u||this.lastEventRateLimited||i||null===(a=this.captureWarning)||void 0===a||a.call(this,"vTilt client rate limited. Config: "+this.eventsPerSecond+" events/second, "+this.eventsBurstLimit+" burst limit."),this.lastEventRateLimited=u,null===(r=this.persistence)||void 0===r||r.set(je,s),{isRateLimited:u,remainingTokens:s.tokens}}shouldAllowEvent(){return!this.checkRateLimit(!1).isRateLimited}getRemainingTokens(){return this.checkRateLimit(!0).remainingTokens}}var Ve=Array.isArray;class qe{constructor(i){void 0===i&&(i={}),this.__loaded=!1,this.ti=!1,this.ai=null,this.__request_queue=[],this.ri=!1,this.ni=!1,this.configManager=new a(i);var e=this.configManager.getConfig(),t=e.domain;!t&&R&&(t=this.getCurrentDomain()),this.sessionManager=new B(e.storage||"cookie",t),this.userManager=new zi(e.persistence||"localStorage",t),this.webVitalsManager=new Ji(e,this),this.rateLimiter=new Fe({eventsPerSecond:10,eventsBurstLimit:100,captureWarning:i=>{this.si("$$client_ingestion_warning",{$$client_ingestion_warning_message:i})}}),this.retryQueue=new Ge({sendRequest:i=>this.oi(i),sendBeacon:i=>this.ui(i)}),this.requestQueue=new Ke(i=>this.ci(i),{flush_interval_ms:3e3})}init(i,e,t){var a;if(t&&t!==We){var r=null!==(a=He[t])&&void 0!==a?a:new qe;return r._init(i,e,t),He[t]=r,He[We][t]=r,r}return this._init(i,e,t)}_init(i,e,a){if(void 0===e&&(e={}),this.__loaded)return console.warn("vTilt: You have already initialized vTilt! Re-initializing is a no-op"),this;this.updateConfig(t({},e,{projectId:i||e.projectId,name:a})),this.__loaded=!0;var r=this.configManager.getConfig();return this.userManager.set_initial_person_info(r.mask_personal_data_properties,r.custom_personal_data_properties),this.historyAutocapture=new Xi(this),this.historyAutocapture.startIfEnabled(),this.hi(),this.li(),!1!==r.capture_pageview&&this.di(),this}li(){this.requestQueue.enable()}hi(){if(E){var i=()=>{this.requestQueue.unload(),this.retryQueue.unload()};y(E,"beforeunload",i),y(E,"pagehide",i)}}toString(){var i,e=null!==(i=this.configManager.getConfig().name)&&void 0!==i?i:We;return e!==We&&(e=We+"."+e),e}getCurrentDomain(){if(!R)return"";var i=R.protocol,e=R.hostname,t=R.port;return i+"//"+e+(t?":"+t:"")}fi(){var i=this.configManager.getConfig();return!(!i.projectId||!i.token)||(this.ri||(console.warn("VTilt: projectId and token are required for tracking. Events will be skipped until init() or updateConfig() is called with these fields."),this.ri=!0),!1)}buildUrl(){var i=this.configManager.getConfig(),{proxyUrl:e,proxy:t,api_host:a,token:r}=i;return e||(t?t+"/api/tracking?token="+r:a?a.replace(/\/+$/gm,"")+"/api/tracking?token="+r:"/api/tracking?token="+r)}sendRequest(i,e,t){if(this.fi()){if(t&&void 0!==E)if(E.__VTILT_ENQUEUE_REQUESTS)return void this.__request_queue.push({url:i,event:e});this.requestQueue.enqueue({url:i,event:e})}}ci(i){var{transport:e}=i;"sendBeacon"!==e?this.retryQueue.retriableRequest(i):this.ui(i)}oi(i){return new Promise(e=>{var{url:t,events:a}=i,r=1===a.length?a[0]:{events:a},n=this.configManager.getConfig().disable_compression?De.None:De.GZipJS;$e({url:t,data:r,method:"POST",transport:"XHR",compression:n,callback:i=>{e({statusCode:i.statusCode})}})})}ui(i){var{url:e,events:t}=i,a=1===t.length?t[0]:{events:t},r=this.configManager.getConfig().disable_compression?De.None:De.GZipJS;$e({url:e,data:a,method:"POST",transport:"sendBeacon",compression:r})}Ai(i){this.sendRequest(i.url,i.event,!1)}capture(i,e,a){if(this.sessionManager.setSessionId(),P&&P.userAgent&&function(i){return!(i&&"string"==typeof i&&i.length>500)}(P.userAgent)&&((null==a?void 0:a.skip_client_rate_limiting)||this.rateLimiter.shouldAllowEvent())){var r=this.buildUrl(),n=Wi(),s=this.userManager.getUserProperties(),o=this.userManager.get_initial_props(),u=this.sessionManager.getSessionId(),c=this.sessionManager.getWindowId(),h=this.userManager.getAnonymousId(),l={};!this.ni&&Object.keys(o).length>0&&Object.assign(l,o),e.$set_once&&Object.assign(l,e.$set_once);var d=t({},n,s,{$session_id:u,$window_id:c},h?{$anon_distinct_id:h}:{},Object.keys(l).length>0?{$set_once:l}:{},e.$set?{$set:e.$set}:{},e);!this.ni&&Object.keys(o).length>0&&(this.ni=!0),"$pageview"===i&&C&&(d.title=C.title);var f,A,v=this.configManager.getConfig();if(!1!==v.stringifyPayload){if(f=Object.assign({},d,v.globalAttributes),!_(f=JSON.stringify(f)))return}else if(f=Object.assign({},d,v.globalAttributes),!_(JSON.stringify(f)))return;A="$identify"===i?this.userManager.getAnonymousId():this.userManager.getDistinctId()||this.userManager.getAnonymousId();var m={timestamp:(new Date).toISOString(),event:i,project_id:v.projectId||"",domain:v.domain||this.getCurrentDomain(),payload:f,distinct_id:A,anonymous_id:h};this.sendRequest(r,m,!0)}}si(i,e){this.capture(i,e,{skip_client_rate_limiting:!0})}trackEvent(i,e){void 0===e&&(e={}),this.capture(i,e)}identify(i,e,t){if("number"==typeof i&&(i=String(i),console.warn("The first argument to vTilt.identify was a number, but it should be a string. It has been converted to a string.")),i)if(this.userManager.isDistinctIdStringLikePublic(i))console.error('The string "'+i+'" was set in vTilt.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.');else if("COOKIELESS_SENTINEL_VALUE"!==i){var a=this.userManager.getDistinctId(),r=this.userManager.getAnonymousId(),n=this.userManager.getDeviceId(),s="anonymous"===this.userManager.getUserState();if(!n){var o=a||r;this.userManager.ensureDeviceId(o)}i!==a&&s?(this.userManager.setUserState("identified"),this.userManager.updateUserProperties(e,t),this.capture("$identify",{distinct_id:i,$anon_distinct_id:r,$set:e||{},$set_once:t||{}}),this.userManager.setDistinctId(i)):e||t?(s&&this.userManager.setUserState("identified"),this.userManager.updateUserProperties(e,t),this.capture("$set",{$set:e||{},$set_once:t||{}})):i!==a&&(this.userManager.setUserState("identified"),this.userManager.setDistinctId(i))}else console.error('The string "'+i+'" was set in vTilt.identify which indicates an error. This ID is only used as a sentinel value.');else console.error("Unique user id has not been set in vTilt.identify")}setUserProperties(i,e){this.userManager.setUserProperties(i,e)&&this.capture("$set",{$set:i||{},$set_once:e||{}})}resetUser(i){this.sessionManager.resetSessionId(),this.userManager.reset(i)}getUserIdentity(){return this.userManager.getUserIdentity()}getDeviceId(){return this.userManager.getDeviceId()}getUserState(){return this.userManager.getUserState()}createAlias(i,e){var t=this.userManager.createAlias(i,e);t?this.capture("$alias",{$original_id:t.original,$alias_id:t.distinct_id}):i===(e||this.userManager.getDistinctId()||this.userManager.getAnonymousId())&&this.identify(i)}di(){C&&("visible"===C.visibilityState?this.ti||(this.ti=!0,setTimeout(()=>{if(C&&R){this.capture("$pageview",{navigation_type:"initial_load"})}},300),this.ai&&(C.removeEventListener("visibilitychange",this.ai),this.ai=null)):this.ai||(this.ai=()=>{this.di()},y(C,"visibilitychange",this.ai)))}getConfig(){return this.configManager.getConfig()}getSessionId(){return this.sessionManager.getSessionId()}updateConfig(i){this.configManager.updateConfig(i);var e=this.configManager.getConfig(),t=e.domain;!t&&R&&(t=this.getCurrentDomain()),this.sessionManager=new B(e.storage||"cookie",t),this.userManager=new zi(e.persistence||"localStorage",t),this.webVitalsManager=new Ji(e,this)}_execute_array(i){Array.isArray(i)&&i.forEach(i=>{if(i&&Array.isArray(i)&&i.length>0){var e=i[0],t=i.slice(1);if("function"==typeof this[e])try{this[e](...t)}catch(i){console.error("vTilt: Error executing queued call "+e+":",i)}}})}_dom_loaded(){this.__request_queue.forEach(i=>{this.Ai(i)}),this.__request_queue=[],this.li()}}var He={},We="vt",ze=!(void 0!==k||void 0!==T)&&-1===(null==U?void 0:U.indexOf("MSIE"))&&-1===(null==U?void 0:U.indexOf("Mozilla"));null!=E&&(E.__VTILT_ENQUEUE_REQUESTS=ze);var Je,Ze,Xe=function(){function i(){i.done||(i.done=!0,ze=!1,null!=E&&(E.__VTILT_ENQUEUE_REQUESTS=!1),S(He,function(i){i._dom_loaded()}))}C&&"function"==typeof C.addEventListener?"complete"===C.readyState?i():y(C,"DOMContentLoaded",i,{capture:!1}):E&&console.error("Browser doesn't support `document.addEventListener` so vTilt couldn't be initialized")};"undefined"!=typeof window&&window.vt&&Array.isArray(window.vt)&&(Je=He[We]=new qe,(Ze=I.vt)&&S(Ze._i,function(i){if(i&&Ve(i)){var e=Je.init(i[0],i[1],i[2]),t=Ze[i[2]||"vt"]||Ze;e&&e._execute_array(t)}}),I.vt=Je,Xe());var Qe=function(){var i=He[We]=new qe;return Xe(),i}();exports.VTilt=qe,exports.default=Qe,exports.vt=Qe;
1
+ "use strict";function i(i,e,t,a,r,n,s){try{var o=i[n](s),u=o.value}catch(i){return void t(i)}o.done?e(u):Promise.resolve(u).then(a,r)}function e(e){return function(){var t=this,a=arguments;return new Promise(function(r,n){var s=e.apply(t,a);function o(e){i(s,r,n,o,u,"next",e)}function u(e){i(s,r,n,o,u,"throw",e)}o(void 0)})}}function t(){return t=Object.assign?Object.assign.bind():function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var a in t)({}).hasOwnProperty.call(t,a)&&(i[a]=t[a])}return i},t.apply(null,arguments)}Object.defineProperty(exports,"__esModule",{value:!0});class a{constructor(i){void 0===i&&(i={}),this.config=this.parseConfigFromScript(i)}parseConfigFromScript(i){if(!document.currentScript)return t({token:i.token||""},i);var e=document.currentScript,a=t({token:""},i);if(a.api_host=e.getAttribute("data-api-host")||e.getAttribute("data-host")||i.api_host,a.proxy=e.getAttribute("data-proxy")||i.proxy,a.proxyUrl=e.getAttribute("data-proxy-url")||i.proxyUrl,a.token=e.getAttribute("data-token")||i.token||"",a.projectId=e.getAttribute("data-project-id")||i.projectId||"",a.domain=e.getAttribute("data-domain")||i.domain,a.storage=e.getAttribute("data-storage")||i.storage,a.stringifyPayload="false"!==e.getAttribute("data-stringify-payload"),a.capture_performance="true"===e.getAttribute("data-capture-performance")||i.capture_performance,a.proxy&&a.proxyUrl)throw console.error("Error: Both data-proxy and data-proxy-url are specified. Please use only one of them."),new Error("Both data-proxy and data-proxy-url are specified. Please use only one of them.");for(var r of(a.globalAttributes=t({},i.globalAttributes),Array.from(e.attributes)))r.name.startsWith("data-vt-")&&(a.globalAttributes[r.name.slice(8).replace(/-/g,"_")]=r.value);return a}getConfig(){return t({},this.config)}updateConfig(i){this.config=t({},this.config,i)}}var r="__vt_session",n="__vt_window_id",s="__vt_primary_window",o="__vt_user_state",u="__vt_device_id",c="__vt_anonymous_id",h="__vt_distinct_id",l="__vt_user_properties",d="localStorage",f="localStorage+cookie",v="sessionStorage",A="memory",m="$initial_person_info",p={"Europe/Andorra":"AD","Asia/Dubai":"AE","Asia/Kabul":"AF","America/Antigua":"AG","America/Anguilla":"AI","Europe/Tirane":"AL","Asia/Yerevan":"AM","Africa/Luanda":"AO","Antarctica/Casey":"AQ","Antarctica/Davis":"AQ","Antarctica/DumontDUrville":"AQ","Antarctica/Mawson":"AQ","Antarctica/McMurdo":"AQ","Antarctica/Palmer":"AQ","Antarctica/Rothera":"AQ","Antarctica/Syowa":"AQ","Antarctica/Troll":"AQ","Antarctica/Vostok":"AQ","America/Argentina/Buenos_Aires":"AR","America/Argentina/Catamarca":"AR","America/Argentina/Cordoba":"AR","America/Argentina/Jujuy":"AR","America/Argentina/La_Rioja":"AR","America/Argentina/Mendoza":"AR","America/Argentina/Rio_Gallegos":"AR","America/Argentina/Salta":"AR","America/Argentina/San_Juan":"AR","America/Argentina/San_Luis":"AR","America/Argentina/Tucuman":"AR","America/Argentina/Ushuaia":"AR","Pacific/Pago_Pago":"AS","Europe/Vienna":"AT","Australia/Adelaide":"AU","Australia/Brisbane":"AU","Australia/Broken_Hill":"AU","Australia/Darwin":"AU","Australia/Eucla":"AU","Australia/Hobart":"AU","Australia/Lindeman":"AU","Australia/Lord_Howe":"AU","Australia/Melbourne":"AU","Australia/Perth":"AU","Australia/Sydney":"AU","America/Aruba":"AW","Europe/Mariehamn":"AX","Asia/Baku":"AZ","Europe/Sarajevo":"BA","America/Barbados":"BB","Asia/Dhaka":"BD","Europe/Brussels":"BE","Africa/Ouagadougou":"BF","Europe/Sofia":"BG","Asia/Bahrain":"BH","Africa/Bujumbura":"BI","Africa/Porto-Novo":"BJ","America/St_Barthelemy":"BL","Atlantic/Bermuda":"BM","Asia/Brunei":"BN","America/La_Paz":"BO","America/Kralendijk":"BQ","America/Araguaina":"BR","America/Bahia":"BR","America/Belem":"BR","America/Boa_Vista":"BR","America/Campo_Grande":"BR","America/Cuiaba":"BR","America/Eirunepe":"BR","America/Fortaleza":"BR","America/Maceio":"BR","America/Manaus":"BR","America/Noronha":"BR","America/Porto_Velho":"BR","America/Recife":"BR","America/Rio_Branco":"BR","America/Santarem":"BR","America/Sao_Paulo":"BR","America/Nassau":"BS","Asia/Thimphu":"BT","Africa/Gaborone":"BW","Europe/Minsk":"BY","America/Belize":"BZ","America/Atikokan":"CA","America/Blanc-Sablon":"CA","America/Cambridge_Bay":"CA","America/Creston":"CA","America/Dawson":"CA","America/Dawson_Creek":"CA","America/Edmonton":"CA","America/Fort_Nelson":"CA","America/Glace_Bay":"CA","America/Goose_Bay":"CA","America/Halifax":"CA","America/Inuvik":"CA","America/Iqaluit":"CA","America/Moncton":"CA","America/Nipigon":"CA","America/Pangnirtung":"CA","America/Rainy_River":"CA","America/Rankin_Inlet":"CA","America/Regina":"CA","America/Resolute":"CA","America/St_Johns":"CA","America/Swift_Current":"CA","America/Thunder_Bay":"CA","America/Toronto":"CA","America/Vancouver":"CA","America/Whitehorse":"CA","America/Winnipeg":"CA","America/Yellowknife":"CA","Indian/Cocos":"CC","Africa/Kinshasa":"CD","Africa/Lubumbashi":"CD","Africa/Bangui":"CF","Africa/Brazzaville":"CG","Europe/Zurich":"CH","Africa/Abidjan":"CI","Pacific/Rarotonga":"CK","America/Punta_Arenas":"CL","America/Santiago":"CL","Pacific/Easter":"CL","Africa/Douala":"CM","Asia/Shanghai":"CN","Asia/Urumqi":"CN","America/Bogota":"CO","America/Costa_Rica":"CR","America/Havana":"CU","Atlantic/Cape_Verde":"CV","America/Curacao":"CW","Indian/Christmas":"CX","Asia/Famagusta":"CY","Asia/Nicosia":"CY","Europe/Prague":"CZ","Europe/Berlin":"DE","Europe/Busingen":"DE","Africa/Djibouti":"DJ","Europe/Copenhagen":"DK","America/Dominica":"DM","America/Santo_Domingo":"DO","Africa/Algiers":"DZ","America/Guayaquil":"EC","Pacific/Galapagos":"EC","Europe/Tallinn":"EE","Africa/Cairo":"EG","Africa/El_Aaiun":"EH","Africa/Asmara":"ER","Africa/Ceuta":"ES","Atlantic/Canary":"ES","Europe/Madrid":"ES","Africa/Addis_Ababa":"ET","Europe/Helsinki":"FI","Pacific/Fiji":"FJ","Atlantic/Stanley":"FK","Pacific/Chuuk":"FM","Pacific/Kosrae":"FM","Pacific/Pohnpei":"FM","Atlantic/Faroe":"FO","Europe/Paris":"FR","Africa/Libreville":"GA","Europe/London":"GB","America/Grenada":"GD","Asia/Tbilisi":"GE","America/Cayenne":"GF","Europe/Guernsey":"GG","Africa/Accra":"GH","Europe/Gibraltar":"GI","America/Danmarkshavn":"GL","America/Nuuk":"GL","America/Scoresbysund":"GL","America/Thule":"GL","Africa/Banjul":"GM","Africa/Conakry":"GN","America/Guadeloupe":"GP","Africa/Malabo":"GQ","Europe/Athens":"GR","Atlantic/South_Georgia":"GS","America/Guatemala":"GT","Pacific/Guam":"GU","Africa/Bissau":"GW","America/Guyana":"GY","Asia/Hong_Kong":"HK","America/Tegucigalpa":"HN","Europe/Zagreb":"HR","America/Port-au-Prince":"HT","Europe/Budapest":"HU","Asia/Jakarta":"ID","Asia/Jayapura":"ID","Asia/Makassar":"ID","Asia/Pontianak":"ID","Europe/Dublin":"IE","Asia/Jerusalem":"IL","Europe/Isle_of_Man":"IM","Asia/Kolkata":"IN","Indian/Chagos":"IO","Asia/Baghdad":"IQ","Asia/Tehran":"IR","Atlantic/Reykjavik":"IS","Europe/Rome":"IT","Europe/Jersey":"JE","America/Jamaica":"JM","Asia/Amman":"JO","Asia/Tokyo":"JP","Africa/Nairobi":"KE","Asia/Bishkek":"KG","Asia/Phnom_Penh":"KH","Pacific/Enderbury":"KI","Pacific/Kiritimati":"KI","Pacific/Tarawa":"KI","Indian/Comoro":"KM","America/St_Kitts":"KN","Asia/Pyongyang":"KP","Asia/Seoul":"KR","Asia/Kuwait":"KW","America/Cayman":"KY","Asia/Almaty":"KZ","Asia/Aqtau":"KZ","Asia/Aqtobe":"KZ","Asia/Atyrau":"KZ","Asia/Oral":"KZ","Asia/Qostanay":"KZ","Asia/Qyzylorda":"KZ","Asia/Vientiane":"LA","Asia/Beirut":"LB","America/St_Lucia":"LC","Europe/Vaduz":"LI","Asia/Colombo":"LK","Africa/Monrovia":"LR","Africa/Maseru":"LS","Europe/Vilnius":"LT","Europe/Luxembourg":"LU","Europe/Riga":"LV","Africa/Tripoli":"LY","Africa/Casablanca":"MA","Europe/Monaco":"MC","Europe/Chisinau":"MD","Europe/Podgorica":"ME","America/Marigot":"MF","Indian/Antananarivo":"MG","Pacific/Kwajalein":"MH","Pacific/Majuro":"MH","Europe/Skopje":"MK","Africa/Bamako":"ML","Asia/Yangon":"MM","Asia/Choibalsan":"MN","Asia/Hovd":"MN","Asia/Ulaanbaatar":"MN","Asia/Macau":"MO","Pacific/Saipan":"MP","America/Martinique":"MQ","Africa/Nouakchott":"MR","America/Montserrat":"MS","Europe/Malta":"MT","Indian/Mauritius":"MU","Indian/Maldives":"MV","Africa/Blantyre":"MW","America/Bahia_Banderas":"MX","America/Cancun":"MX","America/Chihuahua":"MX","America/Hermosillo":"MX","America/Matamoros":"MX","America/Mazatlan":"MX","America/Merida":"MX","America/Mexico_City":"MX","America/Monterrey":"MX","America/Ojinaga":"MX","America/Tijuana":"MX","Asia/Kuala_Lumpur":"MY","Asia/Kuching":"MY","Africa/Maputo":"MZ","Africa/Windhoek":"NA","Pacific/Noumea":"NC","Africa/Niamey":"NE","Pacific/Norfolk":"NF","Africa/Lagos":"NG","America/Managua":"NI","Europe/Amsterdam":"NL","Europe/Oslo":"NO","Asia/Kathmandu":"NP","Pacific/Nauru":"NR","Pacific/Niue":"NU","Pacific/Auckland":"NZ","Pacific/Chatham":"NZ","Asia/Muscat":"OM","America/Panama":"PA","America/Lima":"PE","Pacific/Gambier":"PF","Pacific/Marquesas":"PF","Pacific/Tahiti":"PF","Pacific/Bougainville":"PG","Pacific/Port_Moresby":"PG","Asia/Manila":"PH","Asia/Karachi":"PK","Europe/Warsaw":"PL","America/Miquelon":"PM","Pacific/Pitcairn":"PN","America/Puerto_Rico":"PR","Asia/Gaza":"PS","Asia/Hebron":"PS","Atlantic/Azores":"PT","Atlantic/Madeira":"PT","Europe/Lisbon":"PT","Pacific/Palau":"PW","America/Asuncion":"PY","Asia/Qatar":"QA","Indian/Reunion":"RE","Europe/Bucharest":"RO","Europe/Belgrade":"RS","Asia/Anadyr":"RU","Asia/Barnaul":"RU","Asia/Chita":"RU","Asia/Irkutsk":"RU","Asia/Kamchatka":"RU","Asia/Khandyga":"RU","Asia/Krasnoyarsk":"RU","Asia/Magadan":"RU","Asia/Novokuznetsk":"RU","Asia/Novosibirsk":"RU","Asia/Omsk":"RU","Asia/Sakhalin":"RU","Asia/Srednekolymsk":"RU","Asia/Tomsk":"RU","Asia/Ust-Nera":"RU","Asia/Vladivostok":"RU","Asia/Yakutsk":"RU","Asia/Yekaterinburg":"RU","Europe/Astrakhan":"RU","Europe/Kaliningrad":"RU","Europe/Kirov":"RU","Europe/Moscow":"RU","Europe/Samara":"RU","Europe/Saratov":"RU","Europe/Ulyanovsk":"RU","Europe/Volgograd":"RU","Africa/Kigali":"RW","Asia/Riyadh":"SA","Pacific/Guadalcanal":"SB","Indian/Mahe":"SC","Africa/Khartoum":"SD","Europe/Stockholm":"SE","Asia/Singapore":"SG","Atlantic/St_Helena":"SH","Europe/Ljubljana":"SI","Arctic/Longyearbyen":"SJ","Europe/Bratislava":"SK","Africa/Freetown":"SL","Europe/San_Marino":"SM","Africa/Dakar":"SN","Africa/Mogadishu":"SO","America/Paramaribo":"SR","Africa/Juba":"SS","Africa/Sao_Tome":"ST","America/El_Salvador":"SV","America/Lower_Princes":"SX","Asia/Damascus":"SY","Africa/Mbabane":"SZ","America/Grand_Turk":"TC","Africa/Ndjamena":"TD","Indian/Kerguelen":"TF","Africa/Lome":"TG","Asia/Bangkok":"TH","Asia/Dushanbe":"TJ","Pacific/Fakaofo":"TK","Asia/Dili":"TL","Asia/Ashgabat":"TM","Africa/Tunis":"TN","Pacific/Tongatapu":"TO","Europe/Istanbul":"TR","America/Port_of_Spain":"TT","Pacific/Funafuti":"TV","Asia/Taipei":"TW","Africa/Dar_es_Salaam":"TZ","Europe/Kiev":"UA","Europe/Simferopol":"UA","Europe/Uzhgorod":"UA","Europe/Zaporozhye":"UA","Africa/Kampala":"UG","Pacific/Midway":"UM","Pacific/Wake":"UM","America/Adak":"US","America/Anchorage":"US","America/Boise":"US","America/Chicago":"US","America/Denver":"US","America/Detroit":"US","America/Indiana/Indianapolis":"US","America/Indiana/Knox":"US","America/Indiana/Marengo":"US","America/Indiana/Petersburg":"US","America/Indiana/Tell_City":"US","America/Indiana/Vevay":"US","America/Indiana/Vincennes":"US","America/Indiana/Winamac":"US","America/Juneau":"US","America/Kentucky/Louisville":"US","America/Kentucky/Monticello":"US","America/Los_Angeles":"US","America/Menominee":"US","America/Metlakatla":"US","America/New_York":"US","America/Nome":"US","America/North_Dakota/Beulah":"US","America/North_Dakota/Center":"US","America/North_Dakota/New_Salem":"US","America/Phoenix":"US","America/Sitka":"US","America/Yakutat":"US","Pacific/Honolulu":"US","America/Montevideo":"UY","Asia/Samarkand":"UZ","Asia/Tashkent":"UZ","Europe/Vatican":"VA","America/St_Vincent":"VC","America/Caracas":"VE","America/Tortola":"VG","America/St_Thomas":"VI","Asia/Ho_Chi_Minh":"VN","Pacific/Efate":"VU","Pacific/Wallis":"WF","Pacific/Apia":"WS","Asia/Aden":"YE","Indian/Mayotte":"YT","Africa/Johannesburg":"ZA","Africa/Lusaka":"ZM","Africa/Harare":"ZW"};function g(){return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,i=>(+i^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+i/4).toString(16))}function _(i){return!(!i||"string"!=typeof i)&&!(i.length<2||i.length>10240)}function S(i,e,t){if(i)if(Array.isArray(i))i.forEach((i,a)=>{e.call(t,i,a)});else for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&e.call(t,i[a],a)}function y(i,e,t,a){var{capture:r=!1,passive:n=!0}=null!=a?a:{};null==i||i.addEventListener(e,t,{capture:r,passive:n})}function w(i,e){if(!e)return i;for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=e[t]);return i}function E(i){for(var e=arguments.length,t=new Array(e>1?e-1:0),a=1;a<e;a++)t[a-1]=arguments[a];for(var r of t)for(var n of r)i.push(n);return i}var M="undefined"!=typeof window?window:void 0,b="undefined"!=typeof globalThis?globalThis:M,P=null==b?void 0:b.navigator,R=null==b?void 0:b.document,C=null==b?void 0:b.location,T=null==b?void 0:b.fetch,k=(null==b?void 0:b.XMLHttpRequest)&&"withCredentials"in new b.XMLHttpRequest?b.XMLHttpRequest:void 0;null==b||b.AbortController;var U=null==P?void 0:P.userAgent,B=null!=M?M:{},I=31536e3;class x{constructor(i){var e;this.memoryStorage=new Map,this.method=i.method,this.domain=i.domain,this.sameSite=i.sameSite||"Lax",this.secure=null!==(e=i.secure)&&void 0!==e?e:"undefined"!=typeof location&&"https:"===location.protocol}get(i){var e;try{if(this.method===A)return null!==(e=this.memoryStorage.get(i))&&void 0!==e?e:null;if(this.usesLocalStorage()){var t=localStorage.getItem(i);return null!==t?t:this.method===f?this.getCookie(i):null}return this.usesSessionStorage()?sessionStorage.getItem(i):this.getCookie(i)}catch(e){return console.warn('[StorageManager] Failed to get "'+i+'":',e),null}}set(i,e,t){try{if(this.method===A)return void this.memoryStorage.set(i,e);if(this.usesLocalStorage())return localStorage.setItem(i,e),void(this.method===f&&this.setCookie(i,e,t||I));if(this.usesSessionStorage())return void sessionStorage.setItem(i,e);this.setCookie(i,e,t||I)}catch(e){console.warn('[StorageManager] Failed to set "'+i+'":',e)}}remove(i){try{if(this.method===A)return void this.memoryStorage.delete(i);if(this.usesLocalStorage())return localStorage.removeItem(i),void(this.method===f&&this.removeCookie(i));if(this.usesSessionStorage())return void sessionStorage.removeItem(i);this.removeCookie(i)}catch(e){console.warn('[StorageManager] Failed to remove "'+i+'":',e)}}getWithExpiry(i){var e=this.get(i);if(!e)return null;try{var t=JSON.parse(e);return t.expiry&&Date.now()>t.expiry?(this.remove(i),null):t.value}catch(i){return null}}setWithExpiry(i,e,a){var r=t({value:e},a?{expiry:Date.now()+a}:{});this.set(i,JSON.stringify(r))}getJSON(i){var e=this.get(i);if(!e)return null;try{return JSON.parse(e)}catch(i){return null}}setJSON(i,e,t){this.set(i,JSON.stringify(e),t)}getCookie(i){if("undefined"==typeof document)return null;var e=document.cookie.split(";");for(var t of e){var[a,...r]=t.trim().split("=");if(a===i){var n=r.join("=");try{return decodeURIComponent(n)}catch(i){return n}}}return null}setCookie(i,e,t){if("undefined"!=typeof document){var a=i+"="+encodeURIComponent(e);a+="; Max-Age="+t,a+="; path=/",a+="; SameSite="+this.sameSite,this.secure&&(a+="; Secure"),this.domain&&(a+="; domain="+this.domain),document.cookie=a}}removeCookie(i){if("undefined"!=typeof document){var e=i+"=; Max-Age=0; path=/";this.domain&&(e+="; domain="+this.domain),document.cookie=e,document.cookie=i+"=; Max-Age=0; path=/"}}usesLocalStorage(){return this.method===d||this.method===f}usesSessionStorage(){return this.method===v}canUseSessionStorage(){if(void 0===M||!(null==M?void 0:M.sessionStorage))return!1;try{var i="__vt_storage_test__";return M.sessionStorage.setItem(i,"test"),M.sessionStorage.removeItem(i),!0}catch(i){return!1}}getSessionStorage(){var i;return this.canUseSessionStorage()&&null!==(i=null==M?void 0:M.sessionStorage)&&void 0!==i?i:null}setMethod(i){this.method=i}getMethod(){return this.method}}class O{constructor(i,e){void 0===i&&(i="cookie"),this.storage=new x({method:i,domain:e,sameSite:"Lax"}),this.o=void 0,this.v()}getSessionId(){var i=this.A();return i||(i=g(),this.m(i)),i}setSessionId(){var i=this.A()||g();return this.m(i),i}resetSessionId(){this.S(),this.setSessionId(),this.M(g())}A(){var i=this.storage.getWithExpiry(r);if(i)return i;var e=this.storage.get(r);if(e)try{var t=JSON.parse(e);return"object"==typeof t&&null!==t&&"value"in t?t.expiry&&Date.now()>t.expiry?(this.storage.remove(r),null):t.value:e}catch(i){return e}return null}m(i){this.storage.setWithExpiry(i,i,18e5),this.storage.set(r,i,1800)}S(){this.storage.remove(r)}getWindowId(){if(this.o)return this.o;var i=this.storage.getSessionStorage();if(i){var e=i.getItem(n);if(e)return this.o=e,e}var t=g();return this.M(t),t}M(i){if(i!==this.o){this.o=i;var e=this.storage.getSessionStorage();e&&e.setItem(n,i)}}v(){var i=this.storage.getSessionStorage();if(i){var e=i.getItem(s),t=i.getItem(n);t&&!e?this.o=t:(t&&i.removeItem(n),this.M(g())),i.setItem(s,"true"),this.P()}else this.o=g()}P(){var i=this.storage.getSessionStorage();M&&i&&y(M,"beforeunload",()=>{var i=this.storage.getSessionStorage();i&&i.removeItem(s)},{capture:!1})}updateStorageMethod(i,e){this.storage=new x({method:i,domain:e,sameSite:"Lax"})}}function N(i){if(!R)return null;var e=R.createElement("a");return e.href=i,e}function D(i,e){for(var t=((i.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),a=0;a<t.length;a++){var r=t[a].split("=");if(r[0]===e){if(r.length<2)return"";var n=r[1];try{n=decodeURIComponent(n)}catch(i){}return n.replace(/\+/g," ")}}return""}function L(i,e,t){if(!i||!e||!e.length)return i;for(var a=i.split("#"),r=a[0]||"",n=a[1],s=r.split("?"),o=s[1],u=s[0],c=(o||"").split("&"),h=[],l=0;l<c.length;l++){var d=c[l].split("="),f=d[0],v=d.slice(1).join("=");-1!==e.indexOf(f)?h.push(f+"="+t):f&&h.push(f+(v?"="+v:""))}var A=h.join("&");return u+(A?"?"+A:"")+(n?"#"+n:"")}function K(i){return"function"==typeof i}var G="Mobile",j="iOS",F="Android",V="Tablet",q=F+" "+V,H="iPad",W="Apple",z=W+" Watch",J="Safari",Z="BlackBerry",X="Samsung",Q=X+"Browser",Y=X+" Internet",ii="Chrome",ei=ii+" OS",ti=ii+" "+j,ai="Internet Explorer",ri=ai+" "+G,ni="Opera",si=ni+" Mini",oi="Edge",ui="Microsoft "+oi,ci="Firefox",hi=ci+" "+j,li="Nintendo",di="PlayStation",fi="Xbox",vi=F+" "+G,Ai=G+" "+J,mi="Windows",pi=mi+" Phone",gi="Nokia",_i="Ouya",Si="Generic",yi=Si+" "+G.toLowerCase(),wi=Si+" "+V.toLowerCase(),Ei="Konqueror",Mi="(\\d+(\\.\\d+)?)",bi=new RegExp("Version/"+Mi),Pi=new RegExp(fi,"i"),Ri=new RegExp(di+" \\w+","i"),Ci=new RegExp(li+" \\w+","i"),Ti=new RegExp(Z+"|PlayBook|BB10","i"),ki={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"};function Ui(i,e){return i.toLowerCase().includes(e.toLowerCase())}var Bi=(i,e)=>e&&Ui(e,W)||function(i){return Ui(i,J)&&!Ui(i,ii)&&!Ui(i,F)}(i),Ii=function(i,e){return e=e||"",Ui(i," OPR/")&&Ui(i,"Mini")?si:Ui(i," OPR/")?ni:Ti.test(i)?Z:Ui(i,"IE"+G)||Ui(i,"WPDesktop")?ri:Ui(i,Q)?Y:Ui(i,oi)||Ui(i,"Edg/")?ui:Ui(i,"FBIOS")?"Facebook "+G:Ui(i,"UCWEB")||Ui(i,"UCBrowser")?"UC Browser":Ui(i,"CriOS")?ti:Ui(i,"CrMo")||Ui(i,ii)?ii:Ui(i,F)&&Ui(i,J)?vi:Ui(i,"FxiOS")?hi:Ui(i.toLowerCase(),Ei.toLowerCase())?Ei:Bi(i,e)?Ui(i,G)?Ai:J:Ui(i,ci)?ci:Ui(i,"MSIE")||Ui(i,"Trident/")?ai:Ui(i,"Gecko")?ci:""},xi={[ri]:[new RegExp("rv:"+Mi)],[ui]:[new RegExp(oi+"?\\/"+Mi)],[ii]:[new RegExp("("+ii+"|CrMo)\\/"+Mi)],[ti]:[new RegExp("CriOS\\/"+Mi)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+Mi)],[J]:[bi],[Ai]:[bi],[ni]:[new RegExp("(Opera|OPR)\\/"+Mi)],[ci]:[new RegExp(ci+"\\/"+Mi)],[hi]:[new RegExp("FxiOS\\/"+Mi)],[Ei]:[new RegExp("Konqueror[:/]?"+Mi,"i")],[Z]:[new RegExp(Z+" "+Mi),bi],[vi]:[new RegExp("android\\s"+Mi,"i")],[Y]:[new RegExp(Q+"\\/"+Mi)],[ai]:[new RegExp("(rv:|MSIE )"+Mi)],Mozilla:[new RegExp("rv:"+Mi)]},Oi=function(i,e){var t=Ii(i,e),a=xi[t];if(void 0===a)return null;for(var r=0;r<a.length;r++){var n=a[r],s=i.match(n);if(s)return parseFloat(s[s.length-2])}return null},Ni=[[new RegExp(fi+"; "+fi+" (.*?)[);]","i"),i=>[fi,i&&i[1]||""]],[new RegExp(li,"i"),[li,""]],[new RegExp(di,"i"),[di,""]],[Ti,[Z,""]],[new RegExp(mi,"i"),(i,e)=>{if(/Phone/.test(e)||/WPDesktop/.test(e))return[pi,""];if(new RegExp(G).test(e)&&!/IEMobile\b/.test(e))return[mi+" "+G,""];var t=/Windows NT ([0-9.]+)/i.exec(e);if(t&&t[1]){var a=t[1],r=ki[a]||"";return/arm/i.test(e)&&(r="RT"),[mi,r]}return[mi,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,i=>{if(i&&i[3]){var e=[i[3],i[4],i[5]||"0"];return[j,e.join(".")]}return[j,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,i=>{var e="";return i&&i.length>=3&&(e=void 0===i[2]?i[3]:i[2]),["watchOS",e]}],[new RegExp("("+F+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+F+")","i"),i=>{if(i&&i[2]){var e=[i[2],i[3],i[4]||"0"];return[F,e.join(".")]}return[F,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,i=>{var e=["Mac OS X",""];if(i&&i[1]){var t=[i[1],i[2],i[3]||"0"];e[1]=t.join(".")}return e}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[ei,""]],[/Linux|debian/i,["Linux",""]]],Di=function(i){return Ci.test(i)?li:Ri.test(i)?di:Pi.test(i)?fi:new RegExp(_i,"i").test(i)?_i:new RegExp("("+pi+"|WPDesktop)","i").test(i)?pi:/iPad/.test(i)?H:/iPod/.test(i)?"iPod Touch":/iPhone/.test(i)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(i)?z:Ti.test(i)?Z:/(kobo)\s(ereader|touch)/i.test(i)?"Kobo":new RegExp(gi,"i").test(i)?gi:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(i)||/(kf[a-z]+)( bui|\)).+silk\//i.test(i)?"Kindle Fire":/(Android|ZTE)/i.test(i)?!new RegExp(G).test(i)||/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(i)?/pixel[\daxl ]{1,6}/i.test(i)&&!/pixel c/i.test(i)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(i)||/lmy47v/i.test(i)&&!/QTAQZ3/i.test(i)?F:q:F:new RegExp("(pda|"+G+")","i").test(i)?yi:new RegExp(V,"i").test(i)&&!new RegExp(V+" pc","i").test(i)?wi:""},Li="https?://(.*)",$i=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],Ki=E(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],$i),Gi="<masked>";function ji(i){var e=function(i){return i?0===i.search(Li+"google.([^/?]*)")?"google":0===i.search(Li+"bing.com")?"bing":0===i.search(Li+"yahoo.com")?"yahoo":0===i.search(Li+"duckduckgo.com")?"duckduckgo":null:null}(i),t="yahoo"!==e?"q":"p",a={};if(null!==e){a.$search_engine=e;var r=R?D(R.referrer,t):"";r.length&&(a.ph_keyword=r)}return a}function Fi(){if("undefined"!=typeof navigator)return navigator.language||navigator.userLanguage}function Vi(){return(null==R?void 0:R.referrer)||"$direct"}function qi(){var i;return(null==R?void 0:R.referrer)&&(null===(i=N(R.referrer))||void 0===i?void 0:i.host)||"$direct"}function Hi(i){var e,{r:t,u:a}=i,r={$referrer:t,$referring_domain:null==t?void 0:"$direct"===t?"$direct":null===(e=N(t))||void 0===e?void 0:e.host};if(a){r.$current_url=a;var n=N(a);r.$host=null==n?void 0:n.host,r.$pathname=null==n?void 0:n.pathname;var s=function(i){var e=Ki.concat([]),t={};return S(e,function(e){var a=D(i,e);t[e]=a||null}),t}(a);w(r,s)}t&&w(r,ji(t));return r}function Wi(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(i){return}}function zi(){try{return(new Date).getTimezoneOffset()}catch(i){return}}function Ji(i,e){if(!U)return{};var t,a,r,[n,s]=function(i){for(var e=0;e<Ni.length;e++){var[t,a]=Ni[e],r=t.exec(i),n=r&&(K(a)?a(r,i):a);if(n)return n}return["",""]}(U);return w(function(i){var e={};for(var t in i)if(Object.prototype.hasOwnProperty.call(i,t)){var a=i[t];null!=a&&""!==a&&(e[t]=a)}return e}({$os:n,$os_version:s,$browser:Ii(U,navigator.vendor),$device:Di(U),$device_type:(a=U,r=Di(a),r===H||r===q||"Kobo"===r||"Kindle Fire"===r||r===wi?V:r===li||r===fi||r===di||r===_i?"Console":r===z?"Wearable":r?G:"Desktop"),$timezone:Wi(),$timezone_offset:zi()}),{$current_url:L(null==C?void 0:C.href,[],Gi),$host:null==C?void 0:C.host,$pathname:null==C?void 0:C.pathname,$raw_user_agent:U.length>1e3?U.substring(0,997)+"...":U,$browser_version:Oi(U,navigator.vendor),$browser_language:Fi(),$browser_language_prefix:(t=Fi(),"string"==typeof t?t.split("-")[0]:void 0),$screen_height:null==M?void 0:M.screen.height,$screen_width:null==M?void 0:M.screen.width,$viewport_height:null==M?void 0:M.innerHeight,$viewport_width:null==M?void 0:M.innerWidth,$lib:"web",$lib_version:"1.0.7",$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})}class Zi{constructor(i,e){void 0===i&&(i="localStorage"),this.R=null,this.storage=new x({method:i,domain:e,sameSite:"Lax"}),this.userIdentity=this.loadUserIdentity()}getUserIdentity(){return t({},this.userIdentity)}getDistinctId(){return this.userIdentity.distinct_id}getAnonymousId(){return this.userIdentity.anonymous_id||(this.userIdentity.anonymous_id=this.generateAnonymousId(),this.storage.set(c,this.userIdentity.anonymous_id,I)),this.userIdentity.anonymous_id}getUserProperties(){return t({},this.userIdentity.properties)}getEffectiveId(){return this.userIdentity.distinct_id||this.getAnonymousId()}getDeviceId(){return this.userIdentity.device_id}getUserState(){return this.userIdentity.user_state}identify(i,e,a){if("number"==typeof i&&(i=i.toString(),console.warn("The first argument to vTilt.identify was a number, but it should be a string. It has been converted to a string.")),i)if(this.isDistinctIdStringLike(i))console.error('The string "'+i+'" was set in vTilt.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.');else if("COOKIELESS_SENTINEL_VALUE"!==i){var r=this.userIdentity.distinct_id;if(this.userIdentity.distinct_id=i,!this.userIdentity.device_id){var n=r||this.userIdentity.anonymous_id;this.userIdentity.device_id=n,this.userIdentity.properties=t({},this.userIdentity.properties,{$had_persisted_distinct_id:!0,$device_id:n})}i!==r&&(this.userIdentity.distinct_id=i);var s="anonymous"===this.userIdentity.user_state;i!==r&&s?(this.userIdentity.user_state="identified",e&&(this.userIdentity.properties=t({},this.userIdentity.properties,e)),a&&Object.keys(a).forEach(i=>{i in this.userIdentity.properties||(this.userIdentity.properties[i]=a[i])}),this.saveUserIdentity()):e||a?("anonymous"===this.userIdentity.user_state&&(this.userIdentity.user_state="identified"),e&&(this.userIdentity.properties=t({},this.userIdentity.properties,e)),a&&Object.keys(a).forEach(i=>{i in this.userIdentity.properties||(this.userIdentity.properties[i]=a[i])}),this.saveUserIdentity()):i!==r&&(this.userIdentity.user_state="identified",this.saveUserIdentity())}else console.error('The string "'+i+'" was set in vTilt.identify which indicates an error. This ID is only used as a sentinel value.');else console.error("Unique user id has not been set in vTilt.identify")}setUserProperties(i,e){if(!i&&!e)return!1;var a=this.userIdentity.distinct_id||this.userIdentity.anonymous_id,r=this.getPersonPropertiesHash(a,i,e);return this.R===r?(console.info("VTilt: A duplicate setUserProperties call was made with the same properties. It has been ignored."),!1):(i&&(this.userIdentity.properties=t({},this.userIdentity.properties,i)),e&&Object.keys(e).forEach(i=>{i in this.userIdentity.properties||(this.userIdentity.properties[i]=e[i])}),this.saveUserIdentity(),this.R=r,!0)}reset(i){var e=this.generateAnonymousId(),a=this.userIdentity.device_id,r=i?this.generateDeviceId():a;this.userIdentity={distinct_id:null,anonymous_id:e,device_id:r,properties:{},user_state:"anonymous"},this.R=null,this.saveUserIdentity(),this.userIdentity.properties=t({},this.userIdentity.properties,{$last_vtilt_reset:(new Date).toISOString()}),this.saveUserIdentity()}setDistinctId(i){this.userIdentity.distinct_id=i,this.saveUserIdentity()}setUserState(i){this.userIdentity.user_state=i,this.saveUserIdentity()}updateUserProperties(i,e){i&&(this.userIdentity.properties=t({},this.userIdentity.properties,i)),e&&Object.keys(e).forEach(i=>{i in this.userIdentity.properties||(this.userIdentity.properties[i]=e[i])}),this.saveUserIdentity()}ensureDeviceId(i){this.userIdentity.device_id||(this.userIdentity.device_id=i,this.userIdentity.properties=t({},this.userIdentity.properties,{$had_persisted_distinct_id:!0,$device_id:i}),this.saveUserIdentity())}createAlias(i,e){return this.isValidDistinctId(i)?(void 0===e&&(e=this.getDistinctId()||this.getAnonymousId()),this.isValidDistinctId(e)?i===e?(console.warn("alias matches current distinct_id - should use identify instead"),null):{distinct_id:i,original:e}:(console.warn("Invalid original distinct ID"),null)):(console.warn("Invalid alias provided"),null)}isDistinctIdStringLikePublic(i){return this.isDistinctIdStringLike(i)}set_initial_person_info(i,e){if(!this.getStoredUserProperties()[m]){var t=function(i,e){var t=i?E([],$i,e||[]):[],a=null==C?void 0:C.href.substring(0,1e3);return{r:Vi().substring(0,1e3),u:a?L(a,t,Gi):void 0}}(i,e);this.register_once({[m]:t},void 0)}}get_initial_props(){var i,e,t=this.getStoredUserProperties()[m];return t?(i=Hi(t),e={},S(i,function(i,t){var a;e["$initial_"+(a=String(t),a.startsWith("$")?a.substring(1):a)]=i}),e):{}}update_referrer_info(){var i={$referrer:Vi(),$referring_domain:qi()};this.register_once(i,void 0)}loadUserIdentity(){var i=this.storage.get(c)||this.generateAnonymousId(),e=this.storage.get(h)||null,t=this.storage.get(u)||this.generateDeviceId(),a=this.getStoredUserProperties(),r=this.storage.get(o)||"anonymous";return{distinct_id:e,anonymous_id:i||this.generateAnonymousId(),device_id:t,properties:a,user_state:r}}saveUserIdentity(){this.storage.set(c,this.userIdentity.anonymous_id,I),this.storage.set(u,this.userIdentity.device_id,I),this.storage.set(o,this.userIdentity.user_state,I),this.userIdentity.distinct_id?this.storage.set(h,this.userIdentity.distinct_id,I):this.storage.remove(h),this.setStoredUserProperties(this.userIdentity.properties)}getStoredUserProperties(){return this.storage.getJSON(l)||{}}setStoredUserProperties(i){this.storage.setJSON(l,i,I)}register_once(i,e){var t=this.getStoredUserProperties(),a=!1;for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(r in t||(t[r]=i[r],a=!0));if(e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(n in t||(t[n]=e[n],a=!0));a&&this.setStoredUserProperties(t)}generateAnonymousId(){return"anon_"+g()}generateDeviceId(){return"device_"+g()}getPersonPropertiesHash(i,e,t){return JSON.stringify({distinct_id:i,userPropertiesToSet:e,userPropertiesToSetOnce:t})}isValidDistinctId(i){if(!i||"string"!=typeof i)return!1;var e=i.toLowerCase().trim();return!["null","undefined","false","true","anonymous","anon","user","test","guest","visitor","unknown","none"].includes(e)&&0!==i.trim().length}isDistinctIdStringLike(i){if(!i||"string"!=typeof i)return!1;var e=i.toLowerCase().trim();return["null","undefined","false","true","anonymous","anon","user","test","guest","visitor","unknown","none","demo","example","sample","placeholder"].includes(e)}updateStorageMethod(i,e){this.storage=new x({method:i,domain:e,sameSite:"Lax"}),this.userIdentity=this.loadUserIdentity()}}class Xi{constructor(i,e){if(this.instance=e,i.capture_performance&&M)try{this.webVitals=require("web-vitals"),this.initializeWebVitals()}catch(i){console.warn("web-vitals library not found. Please install it to enable web vitals tracking.",i)}}initializeWebVitals(){if(this.webVitals){var i=i=>{try{if(!(M&&R&&P&&C))return;var{country:e,locale:t}=function(){var i,e;if(!P)return{country:i,locale:e};try{var t=Intl.DateTimeFormat().resolvedOptions().timeZone;i=p[t],e=P.languages&&P.languages.length?P.languages[0]:P.userLanguage||P.language||P.browserLanguage||"en"}catch(i){}return{country:i,locale:e}}();this.instance.capture("web_vital",{name:i.name,value:i.value,delta:i.delta,rating:i.rating,id:i.id,navigationType:i.navigationType,pathname:C.pathname,href:C.href,"user-agent":P.userAgent,locale:t,location:e,referrer:R.referrer})}catch(i){console.error("Error sending web vital:",i)}};this.webVitals.onCLS&&this.webVitals.onCLS(i),this.webVitals.onFCP&&this.webVitals.onFCP(i),this.webVitals.onLCP&&this.webVitals.onLCP(i),this.webVitals.onTTFB&&this.webVitals.onTTFB(i),this.webVitals.onINP&&this.webVitals.onINP(i)}}}function Qi(i,e,t){try{if(!(e in i))return()=>{};var a=i[e],r=t(a);return K(r)&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__vtilt_wrapped__:{enumerable:!1,value:!0}})),i[e]=r,()=>{i[e]=a}}catch(i){return()=>{}}}class Yi{constructor(i){var e;this._instance=i,this.C=(null===(e=null==M?void 0:M.location)||void 0===e?void 0:e.pathname)||""}get isEnabled(){return!0}startIfEnabled(){this.isEnabled&&this.monitorHistoryChanges()}stop(){this.T&&this.T(),this.T=void 0}monitorHistoryChanges(){var i,e;if(M&&C&&(this.C=C.pathname||"",M.history)){var t=this;(null===(i=M.history.pushState)||void 0===i?void 0:i.__vtilt_wrapped__)||Qi(M.history,"pushState",i=>function(e,a,r){i.call(this,e,a,r),t.k("pushState")}),(null===(e=M.history.replaceState)||void 0===e?void 0:e.__vtilt_wrapped__)||Qi(M.history,"replaceState",i=>function(e,a,r){i.call(this,e,a,r),t.k("replaceState")}),this.U()}}k(i){var e;try{var t=null===(e=null==M?void 0:M.location)||void 0===e?void 0:e.pathname;if(!t||!C||!R)return;if(t!==this.C&&this.isEnabled){var a={navigation_type:i};this._instance.capture("$pageview",a)}this.C=t}catch(e){console.error("Error capturing "+i+" pageview",e)}}U(){if(!this.T&&M){var i=()=>{this.k("popstate")};y(M,"popstate",i),this.T=()=>{M&&M.removeEventListener("popstate",i)}}}}var ie=Uint8Array,ee=Uint16Array,te=Int32Array,ae=new ie([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),re=new ie([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),ne=new ie([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),se=function(i,e){for(var t=new ee(31),a=0;a<31;++a)t[a]=e+=1<<i[a-1];var r=new te(t[30]);for(a=1;a<30;++a)for(var n=t[a];n<t[a+1];++n)r[n]=n-t[a]<<5|a;return{b:t,r:r}},oe=se(ae,2),ue=oe.b,ce=oe.r;ue[28]=258,ce[258]=28;for(var he=se(re,0).r,le=new ee(32768),de=0;de<32768;++de){var fe=(43690&de)>>1|(21845&de)<<1;fe=(61680&(fe=(52428&fe)>>2|(13107&fe)<<2))>>4|(3855&fe)<<4,le[de]=((65280&fe)>>8|(255&fe)<<8)>>1}var ve=function(i,e,t){for(var a=i.length,r=0,n=new ee(e);r<a;++r)i[r]&&++n[i[r]-1];var s,o=new ee(e);for(r=1;r<e;++r)o[r]=o[r-1]+n[r-1]<<1;if(t){s=new ee(1<<e);var u=15-e;for(r=0;r<a;++r)if(i[r])for(var c=r<<4|i[r],h=e-i[r],l=o[i[r]-1]++<<h,d=l|(1<<h)-1;l<=d;++l)s[le[l]>>u]=c}else for(s=new ee(a),r=0;r<a;++r)i[r]&&(s[r]=le[o[i[r]-1]++]>>15-i[r]);return s},Ae=new ie(288);for(de=0;de<144;++de)Ae[de]=8;for(de=144;de<256;++de)Ae[de]=9;for(de=256;de<280;++de)Ae[de]=7;for(de=280;de<288;++de)Ae[de]=8;var me=new ie(32);for(de=0;de<32;++de)me[de]=5;var pe=ve(Ae,9,0),ge=ve(me,5,0),_e=function(i){return(i+7)/8|0},Se=function(i,e,t){return(null==t||t>i.length)&&(t=i.length),new ie(i.subarray(e,t))},ye=function(i,e,t){t<<=7&e;var a=e/8|0;i[a]|=t,i[a+1]|=t>>8},we=function(i,e,t){t<<=7&e;var a=e/8|0;i[a]|=t,i[a+1]|=t>>8,i[a+2]|=t>>16},Ee=function(i,e){for(var t=[],a=0;a<i.length;++a)i[a]&&t.push({s:a,f:i[a]});var r=t.length,n=t.slice();if(!r)return{t:ke,l:0};if(1==r){var s=new ie(t[0].s+1);return s[t[0].s]=1,{t:s,l:1}}t.sort(function(i,e){return i.f-e.f}),t.push({s:-1,f:25001});var o=t[0],u=t[1],c=0,h=1,l=2;for(t[0]={s:-1,f:o.f+u.f,l:o,r:u};h!=r-1;)o=t[t[c].f<t[l].f?c++:l++],u=t[c!=h&&t[c].f<t[l].f?c++:l++],t[h++]={s:-1,f:o.f+u.f,l:o,r:u};var d=n[0].s;for(a=1;a<r;++a)n[a].s>d&&(d=n[a].s);var f=new ee(d+1),v=Me(t[h-1],f,0);if(v>e){a=0;var A=0,m=v-e,p=1<<m;for(n.sort(function(i,e){return f[e.s]-f[i.s]||i.f-e.f});a<r;++a){var g=n[a].s;if(!(f[g]>e))break;A+=p-(1<<v-f[g]),f[g]=e}for(A>>=m;A>0;){var _=n[a].s;f[_]<e?A-=1<<e-f[_]++-1:++a}for(;a>=0&&A;--a){var S=n[a].s;f[S]==e&&(--f[S],++A)}v=e}return{t:new ie(f),l:v}},Me=function(i,e,t){return-1==i.s?Math.max(Me(i.l,e,t+1),Me(i.r,e,t+1)):e[i.s]=t},be=function(i){for(var e=i.length;e&&!i[--e];);for(var t=new ee(++e),a=0,r=i[0],n=1,s=function(i){t[a++]=i},o=1;o<=e;++o)if(i[o]==r&&o!=e)++n;else{if(!r&&n>2){for(;n>138;n-=138)s(32754);n>2&&(s(n>10?n-11<<5|28690:n-3<<5|12305),n=0)}else if(n>3){for(s(r),--n;n>6;n-=6)s(8304);n>2&&(s(n-3<<5|8208),n=0)}for(;n--;)s(r);n=1,r=i[o]}return{c:t.subarray(0,a),n:e}},Pe=function(i,e){for(var t=0,a=0;a<e.length;++a)t+=i[a]*e[a];return t},Re=function(i,e,t){var a=t.length,r=_e(e+2);i[r]=255&a,i[r+1]=a>>8,i[r+2]=255^i[r],i[r+3]=255^i[r+1];for(var n=0;n<a;++n)i[r+n+4]=t[n];return 8*(r+4+a)},Ce=function(i,e,t,a,r,n,s,o,u,c,h){ye(e,h++,t),++r[256];for(var l=Ee(r,15),d=l.t,f=l.l,v=Ee(n,15),A=v.t,m=v.l,p=be(d),g=p.c,_=p.n,S=be(A),y=S.c,w=S.n,E=new ee(19),M=0;M<g.length;++M)++E[31&g[M]];for(M=0;M<y.length;++M)++E[31&y[M]];for(var b=Ee(E,7),P=b.t,R=b.l,C=19;C>4&&!P[ne[C-1]];--C);var T,k,U,B,I=c+5<<3,x=Pe(r,Ae)+Pe(n,me)+s,O=Pe(r,d)+Pe(n,A)+s+14+3*C+Pe(E,P)+2*E[16]+3*E[17]+7*E[18];if(u>=0&&I<=x&&I<=O)return Re(e,h,i.subarray(u,u+c));if(ye(e,h,1+(O<x)),h+=2,O<x){T=ve(d,f,0),k=d,U=ve(A,m,0),B=A;var N=ve(P,R,0);ye(e,h,_-257),ye(e,h+5,w-1),ye(e,h+10,C-4),h+=14;for(M=0;M<C;++M)ye(e,h+3*M,P[ne[M]]);h+=3*C;for(var D=[g,y],L=0;L<2;++L){var K=D[L];for(M=0;M<K.length;++M){var G=31&K[M];ye(e,h,N[G]),h+=P[G],G>15&&(ye(e,h,K[M]>>5&127),h+=K[M]>>12)}}}else T=pe,k=Ae,U=ge,B=me;for(M=0;M<o;++M){var j=a[M];if(j>255){we(e,h,T[(G=j>>18&31)+257]),h+=k[G+257],G>7&&(ye(e,h,j>>23&31),h+=ae[G]);var F=31&j;we(e,h,U[F]),h+=B[F],F>3&&(we(e,h,j>>5&8191),h+=re[F])}else we(e,h,T[j]),h+=k[j]}return we(e,h,T[256]),h+k[256]},Te=new te([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),ke=new ie(0),Ue=function(){for(var i=new Int32Array(256),e=0;e<256;++e){for(var t=e,a=9;--a;)t=(1&t&&-306674912)^t>>>1;i[e]=t}return i}(),Be=function(i,e,t,a,r){if(!r&&(r={l:1},e.dictionary)){var n=e.dictionary.subarray(-32768),s=new ie(n.length+i.length);s.set(n),s.set(i,n.length),i=s,r.w=n.length}return function(i,e,t,a,r,n){var s=n.z||i.length,o=new ie(a+s+5*(1+Math.ceil(s/7e3))+r),u=o.subarray(a,o.length-r),c=n.l,h=7&(n.r||0);if(e){h&&(u[0]=n.r>>3);for(var l=Te[e-1],d=l>>13,f=8191&l,v=(1<<t)-1,A=n.p||new ee(32768),m=n.h||new ee(v+1),p=Math.ceil(t/3),g=2*p,_=function(e){return(i[e]^i[e+1]<<p^i[e+2]<<g)&v},S=new te(25e3),y=new ee(288),w=new ee(32),E=0,M=0,b=n.i||0,P=0,R=n.w||0,C=0;b+2<s;++b){var T=_(b),k=32767&b,U=m[T];if(A[k]=U,m[T]=k,R<=b){var B=s-b;if((E>7e3||P>24576)&&(B>423||!c)){h=Ce(i,u,0,S,y,w,M,P,C,b-C,h),P=E=M=0,C=b;for(var I=0;I<286;++I)y[I]=0;for(I=0;I<30;++I)w[I]=0}var x=2,O=0,N=f,D=k-U&32767;if(B>2&&T==_(b-D))for(var L=Math.min(d,B)-1,K=Math.min(32767,b),G=Math.min(258,B);D<=K&&--N&&k!=U;){if(i[b+x]==i[b+x-D]){for(var j=0;j<G&&i[b+j]==i[b+j-D];++j);if(j>x){if(x=j,O=D,j>L)break;var F=Math.min(D,j-2),V=0;for(I=0;I<F;++I){var q=b-D+I&32767,H=q-A[q]&32767;H>V&&(V=H,U=q)}}}D+=(k=U)-(U=A[k])&32767}if(O){S[P++]=268435456|ce[x]<<18|he[O];var W=31&ce[x],z=31&he[O];M+=ae[W]+re[z],++y[257+W],++w[z],R=b+x,++E}else S[P++]=i[b],++y[i[b]]}}for(b=Math.max(b,R);b<s;++b)S[P++]=i[b],++y[i[b]];h=Ce(i,u,c,S,y,w,M,P,C,b-C,h),c||(n.r=7&h|u[h/8|0]<<3,h-=7,n.h=m,n.p=A,n.i=b,n.w=R)}else{for(b=n.w||0;b<s+c;b+=65535){var J=b+65535;J>=s&&(u[h/8|0]=c,J=s),h=Re(u,h+1,i.subarray(b,J))}n.i=s}return Se(o,0,a+_e(h)+r)}(i,null==e.level?6:e.level,null==e.mem?r.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(i.length)))):20:12+e.mem,t,a,r)},Ie=function(i,e,t){for(;t;++e)i[e]=t,t>>>=8};function xe(i,e){e||(e={});var t=function(){var i=-1;return{p:function(e){for(var t=i,a=0;a<e.length;++a)t=Ue[255&t^e[a]]^t>>>8;i=t},d:function(){return~i}}}(),a=i.length;t.p(i);var r,n=Be(i,e,10+((r=e).filename?r.filename.length+1:0),8),s=n.length;return function(i,e){var t=e.filename;if(i[0]=31,i[1]=139,i[2]=8,i[8]=e.level<2?4:9==e.level?2:0,i[9]=3,0!=e.mtime&&Ie(i,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),t){i[3]=8;for(var a=0;a<=t.length;++a)i[a+10]=t.charCodeAt(a)}}(n,e),Ie(n,s-8,t.d()),Ie(n,s-4,a),n}var Oe="undefined"!=typeof TextEncoder&&new TextEncoder,Ne="undefined"!=typeof TextDecoder&&new TextDecoder;try{Ne.decode(ke,{stream:!0})}catch(i){}var De,Le="text/plain";!function(i){i.GZipJS="gzip-js",i.None="none"}(De||(De={}));var $e=i=>{var{data:e,compression:t}=i;if(e){var a=(i=>JSON.stringify(i,(i,e)=>"bigint"==typeof e?e.toString():e))(e),r=new Blob([a]).size;if(t===De.GZipJS&&r>=1024)try{var n=xe(function(i,e){if(Oe)return Oe.encode(i);for(var t=i.length,a=new ie(i.length+(i.length>>1)),r=0,n=function(i){a[r++]=i},s=0;s<t;++s){if(r+5>a.length){var o=new ie(r+8+(t-s<<1));o.set(a),a=o}var u=i.charCodeAt(s);u<128||e?n(u):u<2048?(n(192|u>>6),n(128|63&u)):u>55295&&u<57344?(n(240|(u=65536+(1047552&u)|1023&i.charCodeAt(++s))>>18),n(128|u>>12&63),n(128|u>>6&63),n(128|63&u)):(n(224|u>>12),n(128|u>>6&63),n(128|63&u))}return Se(a,0,r)}(a),{mtime:0}),s=new Blob([n],{type:Le});if(s.size<.95*r)return{contentType:Le,body:s,estimatedSize:s.size}}catch(i){}return{contentType:"application/json",body:a,estimatedSize:r}}},Ke=[{name:"fetch",available:"undefined"!=typeof fetch,method:i=>{var a=$e(i);if(a){var{contentType:r,body:n,estimatedSize:s}=a,o=i.compression===De.GZipJS&&r===Le?i.url+(i.url.includes("?")?"&":"?")+"compression=gzip-js":i.url,u=t({"Content-Type":r},i.headers||{}),c=new AbortController,h=i.timeout?setTimeout(()=>c.abort(),i.timeout):null;fetch(o,{method:i.method||"POST",headers:u,body:n,keepalive:s<52428.8,signal:c.signal}).then(function(){var t=e(function*(e){var t,a=yield e.text(),r={statusCode:e.status,text:a};if(200===e.status)try{r.json=JSON.parse(a)}catch(i){}null===(t=i.callback)||void 0===t||t.call(i,r)});return function(i){return t.apply(this,arguments)}}()).catch(()=>{var e;null===(e=i.callback)||void 0===e||e.call(i,{statusCode:0})}).finally(()=>{h&&clearTimeout(h)})}}},{name:"XHR",available:"undefined"!=typeof XMLHttpRequest,method:i=>{var e=$e(i);if(e){var{contentType:t,body:a}=e,r=i.compression===De.GZipJS&&t===Le?i.url+(i.url.includes("?")?"&":"?")+"compression=gzip-js":i.url,n=new XMLHttpRequest;n.open(i.method||"POST",r,!0),i.headers&&Object.entries(i.headers).forEach(i=>{var[e,t]=i;n.setRequestHeader(e,t)}),n.setRequestHeader("Content-Type",t),i.timeout&&(n.timeout=i.timeout),n.onreadystatechange=()=>{var e;if(4===n.readyState){var t={statusCode:n.status,text:n.responseText};if(200===n.status)try{t.json=JSON.parse(n.responseText)}catch(i){}null===(e=i.callback)||void 0===e||e.call(i,t)}},n.onerror=()=>{var e;null===(e=i.callback)||void 0===e||e.call(i,{statusCode:0})},n.send(a)}}},{name:"sendBeacon",available:"undefined"!=typeof navigator&&!!navigator.sendBeacon,method:i=>{var e=$e(i);if(e){var{contentType:t,body:a}=e;try{var r="string"==typeof a?new Blob([a],{type:t}):a,n=i.compression===De.GZipJS&&t===Le?i.url+(i.url.includes("?")?"&":"?")+"compression=gzip-js":i.url;navigator.sendBeacon(n,r)}catch(i){}}}}],Ge=i=>{var e,t=i.transport||"fetch",a=Ke.find(i=>i.name===t&&i.available)||Ke.find(i=>i.available);if(!a)return console.error("vTilt: No available transport method"),void(null===(e=i.callback)||void 0===e||e.call(i,{statusCode:0}));a.method(i)};class je{constructor(i,e){var t,a,r,n;this.B=!0,this.I=[],this.O=(t=(null==e?void 0:e.flush_interval_ms)||3e3,a=250,r=5e3,n=3e3,"number"!=typeof t||isNaN(t)?n:Math.min(Math.max(t,a),r)),this.N=i}get length(){return this.I.length}enqueue(i){this.I.push(i),this.D||this.L()}unload(){if(this.$(),0!==this.I.length){var i=this.K();for(var e in i){var a=i[e];this.N(t({},a,{transport:"sendBeacon"}))}}}enable(){this.B=!1,this.L()}pause(){this.B=!0,this.$()}flush(){this.$(),this.G(),this.L()}L(){this.B||(this.D=setTimeout(()=>{this.$(),this.G(),this.I.length>0&&this.L()},this.O))}$(){this.D&&(clearTimeout(this.D),this.D=void 0)}G(){if(0!==this.I.length){var i=this.K(),e=Date.now();for(var t in i){var a=i[t];a.events.forEach(i=>{var t=new Date(i.timestamp).getTime();i.$offset=Math.abs(t-e)}),this.N(a)}}}K(){var i={};return this.I.forEach(e=>{var t=e.batchKey||e.url;i[t]||(i[t]={url:e.url,events:[],batchKey:e.batchKey}),i[t].events.push(e.event)}),this.I=[],i}}class Fe{constructor(i){this.j=!1,this.F=3e3,this.I=[],this.V=!0,this.N=i.sendRequest,this.q=i.sendBeacon,M&&void 0!==P&&"onLine"in P&&(this.V=P.onLine,y(M,"online",()=>{this.V=!0,this.H()}),y(M,"offline",()=>{this.V=!1}))}get length(){return this.I.length}enqueue(i,e){if(void 0===e&&(e=0),e>=10)console.warn("VTilt: Request failed after 10 retries, giving up");else{var t=function(i){var e=3e3*Math.pow(2,i),t=e/2,a=Math.min(18e5,e),r=(Math.random()-.5)*(a-t);return Math.ceil(a+r)}(e),a=Date.now()+t;this.I.push({retryAt:a,request:i,retriesPerformedSoFar:e+1});var r="VTilt: Enqueued failed request for retry in "+Math.round(t/1e3)+"s";this.V||(r+=" (Browser is offline)"),console.warn(r),this.j||(this.j=!0,this.W())}}retriableRequest(i){var t=this;return e(function*(){try{var e=yield t.N(i);200!==e.statusCode&&(e.statusCode<400||e.statusCode>=500)&&t.enqueue(i,0)}catch(e){t.enqueue(i,0)}})()}W(){this.J&&clearTimeout(this.J),this.J=setTimeout(()=>{this.V&&this.I.length>0&&this.H(),this.I.length>0?this.W():this.j=!1},this.F)}H(){var i=this,t=Date.now(),a=[],r=[];this.I.forEach(i=>{i.retryAt<t?r.push(i):a.push(i)}),this.I=a,r.forEach(function(){var t=e(function*(e){var{request:t,retriesPerformedSoFar:a}=e;try{var r=yield i.N(t);200!==r.statusCode&&(r.statusCode<400||r.statusCode>=500)&&i.enqueue(t,a)}catch(e){i.enqueue(t,a)}});return function(i){return t.apply(this,arguments)}}())}unload(){this.J&&(clearTimeout(this.J),this.J=void 0),this.I.forEach(i=>{var{request:e}=i;try{this.q(e)}catch(i){console.error("VTilt: Failed to send beacon on unload",i)}}),this.I=[]}}var Ve="vt_rate_limit";class qe{constructor(i){var e,t;void 0===i&&(i={}),this.lastEventRateLimited=!1,this.eventsPerSecond=null!==(e=i.eventsPerSecond)&&void 0!==e?e:10,this.eventsBurstLimit=Math.max(null!==(t=i.eventsBurstLimit)&&void 0!==t?t:10*this.eventsPerSecond,this.eventsPerSecond),this.persistence=i.persistence,this.captureWarning=i.captureWarning,this.lastEventRateLimited=this.checkRateLimit(!0).isRateLimited}checkRateLimit(i){var e,t,a,r;void 0===i&&(i=!1);var n=Date.now(),s=null!==(t=null===(e=this.persistence)||void 0===e?void 0:e.get(Ve))&&void 0!==t?t:{tokens:this.eventsBurstLimit,last:n},o=(n-s.last)/1e3;s.tokens+=o*this.eventsPerSecond,s.last=n,s.tokens>this.eventsBurstLimit&&(s.tokens=this.eventsBurstLimit);var u=s.tokens<1;return u||i||(s.tokens=Math.max(0,s.tokens-1)),!u||this.lastEventRateLimited||i||null===(a=this.captureWarning)||void 0===a||a.call(this,"vTilt client rate limited. Config: "+this.eventsPerSecond+" events/second, "+this.eventsBurstLimit+" burst limit."),this.lastEventRateLimited=u,null===(r=this.persistence)||void 0===r||r.set(Ve,s),{isRateLimited:u,remainingTokens:s.tokens}}shouldAllowEvent(){return!this.checkRateLimit(!1).isRateLimited}getRemainingTokens(){return this.checkRateLimit(!0).remainingTokens}}var He=Array.isArray;class We{constructor(i){void 0===i&&(i={}),this.__loaded=!1,this.Z=!1,this.X=null,this.__request_queue=[],this.Y=!1,this.ii=!1,this.configManager=new a(i);var e=this.configManager.getConfig(),t=e.domain;!t&&C&&(t=this.getCurrentDomain()),this.sessionManager=new O(e.storage||"cookie",t),this.userManager=new Zi(e.persistence||"localStorage",t),this.webVitalsManager=new Xi(e,this),this.rateLimiter=new qe({eventsPerSecond:10,eventsBurstLimit:100,captureWarning:i=>{this.ei("$$client_ingestion_warning",{$$client_ingestion_warning_message:i})}}),this.retryQueue=new Fe({sendRequest:i=>this.ti(i),sendBeacon:i=>this.ai(i)}),this.requestQueue=new je(i=>this.ri(i),{flush_interval_ms:3e3})}init(i,e,t){var a;if(t&&t!==Je){var r=null!==(a=ze[t])&&void 0!==a?a:new We;return r._init(i,e,t),ze[t]=r,ze[Je][t]=r,r}return this._init(i,e,t)}_init(i,e,a){if(void 0===e&&(e={}),this.__loaded)return console.warn("vTilt: You have already initialized vTilt! Re-initializing is a no-op"),this;this.updateConfig(t({},e,{projectId:i||e.projectId,name:a})),this.__loaded=!0;var r=this.configManager.getConfig();return this.userManager.set_initial_person_info(r.mask_personal_data_properties,r.custom_personal_data_properties),this.historyAutocapture=new Yi(this),this.historyAutocapture.startIfEnabled(),this.ni(),this.si(),!1!==r.capture_pageview&&this.oi(),this}si(){this.requestQueue.enable()}ni(){if(M){var i=()=>{this.requestQueue.unload(),this.retryQueue.unload()};y(M,"beforeunload",i),y(M,"pagehide",i)}}toString(){var i,e=null!==(i=this.configManager.getConfig().name)&&void 0!==i?i:Je;return e!==Je&&(e=Je+"."+e),e}getCurrentDomain(){if(!C)return"";var i=C.protocol,e=C.hostname,t=C.port;return i+"//"+e+(t?":"+t:"")}ui(){var i=this.configManager.getConfig();return!(!i.projectId||!i.token)||(this.Y||(console.warn("VTilt: projectId and token are required for tracking. Events will be skipped until init() or updateConfig() is called with these fields."),this.Y=!0),!1)}buildUrl(){var i=this.configManager.getConfig(),{proxyUrl:e,proxy:t,api_host:a,token:r}=i;return e||(t?t+"/api/tracking?token="+r:a?a.replace(/\/+$/gm,"")+"/api/tracking?token="+r:"/api/tracking?token="+r)}sendRequest(i,e,t){if(this.ui()){if(t&&void 0!==M)if(M.__VTILT_ENQUEUE_REQUESTS)return void this.__request_queue.push({url:i,event:e});this.requestQueue.enqueue({url:i,event:e})}}ri(i){var{transport:e}=i;"sendBeacon"!==e?this.retryQueue.retriableRequest(i):this.ai(i)}ti(i){return new Promise(e=>{var{url:t,events:a}=i,r=1===a.length?a[0]:{events:a},n=this.configManager.getConfig().disable_compression?De.None:De.GZipJS;Ge({url:t,data:r,method:"POST",transport:"XHR",compression:n,callback:i=>{e({statusCode:i.statusCode})}})})}ai(i){var{url:e,events:t}=i,a=1===t.length?t[0]:{events:t},r=this.configManager.getConfig().disable_compression?De.None:De.GZipJS;Ge({url:e,data:a,method:"POST",transport:"sendBeacon",compression:r})}ci(i){this.sendRequest(i.url,i.event,!1)}capture(i,e,a){if(this.sessionManager.setSessionId(),P&&P.userAgent&&function(i){return!(i&&"string"==typeof i&&i.length>500)}(P.userAgent)&&((null==a?void 0:a.skip_client_rate_limiting)||this.rateLimiter.shouldAllowEvent())){var r=this.buildUrl(),n=Ji(),s=this.userManager.getUserProperties(),o=this.userManager.get_initial_props(),u=this.sessionManager.getSessionId(),c=this.sessionManager.getWindowId(),h=this.userManager.getAnonymousId(),l={};!this.ii&&Object.keys(o).length>0&&Object.assign(l,o),e.$set_once&&Object.assign(l,e.$set_once);var d=t({},n,s,{$session_id:u,$window_id:c},h?{$anon_distinct_id:h}:{},Object.keys(l).length>0?{$set_once:l}:{},e.$set?{$set:e.$set}:{},e);!this.ii&&Object.keys(o).length>0&&(this.ii=!0),"$pageview"===i&&R&&(d.title=R.title);var f,v,A=this.configManager.getConfig();if(!1!==A.stringifyPayload){if(f=Object.assign({},d,A.globalAttributes),!_(f=JSON.stringify(f)))return}else if(f=Object.assign({},d,A.globalAttributes),!_(JSON.stringify(f)))return;v="$identify"===i?this.userManager.getAnonymousId():this.userManager.getDistinctId()||this.userManager.getAnonymousId();var m={timestamp:(new Date).toISOString(),event:i,project_id:A.projectId||"",domain:A.domain||this.getCurrentDomain(),payload:f,distinct_id:v,anonymous_id:h};this.sendRequest(r,m,!0)}}ei(i,e){this.capture(i,e,{skip_client_rate_limiting:!0})}trackEvent(i,e){void 0===e&&(e={}),this.capture(i,e)}identify(i,e,t){if("number"==typeof i&&(i=String(i),console.warn("The first argument to vTilt.identify was a number, but it should be a string. It has been converted to a string.")),i)if(this.userManager.isDistinctIdStringLikePublic(i))console.error('The string "'+i+'" was set in vTilt.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.');else if("COOKIELESS_SENTINEL_VALUE"!==i){var a=this.userManager.getDistinctId(),r=this.userManager.getAnonymousId(),n=this.userManager.getDeviceId(),s="anonymous"===this.userManager.getUserState();if(!n){var o=a||r;this.userManager.ensureDeviceId(o)}i!==a&&s?(this.userManager.setUserState("identified"),this.userManager.updateUserProperties(e,t),this.capture("$identify",{distinct_id:i,$anon_distinct_id:r,$set:e||{},$set_once:t||{}}),this.userManager.setDistinctId(i)):e||t?(s&&this.userManager.setUserState("identified"),this.userManager.updateUserProperties(e,t),this.capture("$set",{$set:e||{},$set_once:t||{}})):i!==a&&(this.userManager.setUserState("identified"),this.userManager.setDistinctId(i))}else console.error('The string "'+i+'" was set in vTilt.identify which indicates an error. This ID is only used as a sentinel value.');else console.error("Unique user id has not been set in vTilt.identify")}setUserProperties(i,e){this.userManager.setUserProperties(i,e)&&this.capture("$set",{$set:i||{},$set_once:e||{}})}resetUser(i){this.sessionManager.resetSessionId(),this.userManager.reset(i)}getUserIdentity(){return this.userManager.getUserIdentity()}getDeviceId(){return this.userManager.getDeviceId()}getUserState(){return this.userManager.getUserState()}createAlias(i,e){var t=this.userManager.createAlias(i,e);t?this.capture("$alias",{$original_id:t.original,$alias_id:t.distinct_id}):i===(e||this.userManager.getDistinctId()||this.userManager.getAnonymousId())&&this.identify(i)}oi(){R&&("visible"===R.visibilityState?this.Z||(this.Z=!0,setTimeout(()=>{if(R&&C){this.capture("$pageview",{navigation_type:"initial_load"})}},300),this.X&&(R.removeEventListener("visibilitychange",this.X),this.X=null)):this.X||(this.X=()=>{this.oi()},y(R,"visibilitychange",this.X)))}getConfig(){return this.configManager.getConfig()}getSessionId(){return this.sessionManager.getSessionId()}updateConfig(i){this.configManager.updateConfig(i);var e=this.configManager.getConfig(),t=e.domain;!t&&C&&(t=this.getCurrentDomain()),this.sessionManager=new O(e.storage||"cookie",t),this.userManager=new Zi(e.persistence||"localStorage",t),this.webVitalsManager=new Xi(e,this)}_execute_array(i){Array.isArray(i)&&i.forEach(i=>{if(i&&Array.isArray(i)&&i.length>0){var e=i[0],t=i.slice(1);if("function"==typeof this[e])try{this[e](...t)}catch(i){console.error("vTilt: Error executing queued call "+e+":",i)}}})}_dom_loaded(){this.__request_queue.forEach(i=>{this.ci(i)}),this.__request_queue=[],this.si()}}var ze={},Je="vt",Ze=!(void 0!==k||void 0!==T)&&-1===(null==U?void 0:U.indexOf("MSIE"))&&-1===(null==U?void 0:U.indexOf("Mozilla"));null!=M&&(M.__VTILT_ENQUEUE_REQUESTS=Ze);var Xe,Qe,Ye=function(){function i(){i.done||(i.done=!0,Ze=!1,null!=M&&(M.__VTILT_ENQUEUE_REQUESTS=!1),S(ze,function(i){i._dom_loaded()}))}R&&"function"==typeof R.addEventListener?"complete"===R.readyState?i():y(R,"DOMContentLoaded",i,{capture:!1}):M&&console.error("Browser doesn't support `document.addEventListener` so vTilt couldn't be initialized")};"undefined"!=typeof window&&window.vt&&Array.isArray(window.vt)&&(Xe=ze[Je]=new We,(Qe=B.vt)&&S(Qe._i,function(i){if(i&&He(i)){var e=Xe.init(i[0],i[1],i[2]),t=Qe[i[2]||"vt"]||Qe;e&&e._execute_array(t)}}),B.vt=Xe,Ye());var it=function(){var i=ze[Je]=new We;return Ye(),i}();exports.VTilt=We,exports.default=it,exports.vt=it;
2
2
  //# sourceMappingURL=main.js.map