1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,986285,e=>{"use strict";var t="u">typeof window?window:void 0,i="u">typeof globalThis?globalThis:t,s=Array.prototype,r=s.forEach,n=s.indexOf,a=null==i?void 0:i.navigator,o=null==i?void 0:i.document,l=null==i?void 0:i.location,c=null==i?void 0:i.fetch,u=null!=i&&i.XMLHttpRequest&&"withCredentials"in new i.XMLHttpRequest?i.XMLHttpRequest:void 0,h=null==i?void 0:i.AbortController,d=null==a?void 0:a.userAgent,p=null!=t?t:{},g={DEBUG:!1,LIB_VERSION:"1.298.0"};function _(e,t,i,s,r,n,a){try{var o=e[n](a),l=o.value}catch(e){return void i(e)}o.done?t(l):Promise.resolve(l).then(s,r)}function v(e){return function(){var t=this,i=arguments;return new Promise(function(s,r){var n=e.apply(t,i);function a(e){_(n,s,r,a,o,"next",e)}function o(e){_(n,s,r,a,o,"throw",e)}a(void 0)})}}function f(){return(f=Object.assign.bind()).apply(null,arguments)}function m(e,t){if(null==e)return{};var i={};for(var s in e)if(({}).hasOwnProperty.call(e,s)){if(-1!==t.indexOf(s))continue;i[s]=e[s]}return i}var y=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],b=function(e,t){if(void 0===t&&(t=[]),!e)return!1;var i=e.toLowerCase();return y.concat(t).some(e=>{var t=e.toLowerCase();return -1!==i.indexOf(t)})},w=["$snapshot","$pageview","$pageleave","$set","survey dismissed","survey sent","survey shown","$identify","$groupidentify","$create_alias","$$client_ingestion_warning","$web_experiment_applied","$feature_enrollment_update","$feature_flag_called"];function E(e,t){return -1!==e.indexOf(t)}var x=function(e){return e.trim()},k=function(e){return e.replace(/^\$/,"")},S=Array.isArray,P=Object.prototype,F=P.hasOwnProperty,$=P.toString,I=S||function(e){return"[object Array]"===$.call(e)},O=e=>"function"==typeof e,C=e=>e===Object(e)&&!I(e),T=e=>{if(C(e)){for(var t in e)if(F.call(e,t))return!1;return!0}return!1},R=e=>void 0===e,A=e=>"[object String]"==$.call(e),M=e=>A(e)&&0===e.trim().length,D=e=>null===e,L=e=>R(e)||D(e),N=e=>"[object Number]"==$.call(e),j=e=>"[object Boolean]"===$.call(e),H=e=>E(w,e);function U(e){return null===e||"object"!=typeof e}function q(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function B(e){return!R(Event)&&function(e,t){try{return e instanceof t}catch(e){return!1}}(e,Event)}var V=[!0,"true",1,"1","yes"],W=[!1,"false",0,"0","no"];function G(e,t,i,s,r){return t>i&&(s.warn("min cannot be greater than max."),t=i),N(e)?e>i?(s.warn(" cannot be greater than max: "+i+". Using max value instead."),i):e<t?(s.warn(" cannot be less than min: "+t+". Using min value instead."),t):e:(s.warn(" must be a number. using max or fallback. max: "+i+", fallback: "+r),G(r||i,t,i,s))}class z{constructor(e){this.t={},this.i=e.i,this.o=G(e.bucketSize,0,100,e.h),this.m=G(e.refillRate,0,this.o,e.h),this.$=G(e.refillInterval,0,864e5,e.h)}S(e,t){var i=Math.floor((t-e.lastAccess)/this.$);if(i>0){var s=i*this.m;e.tokens=Math.min(e.tokens+s,this.o),e.lastAccess=e.lastAccess+i*this.$}}consumeRateLimit(e){var t,i=Date.now(),s=String(e),r=this.t[s];return r?this.S(r,i):(r={tokens:this.o,lastAccess:i},this.t[s]=r),0===r.tokens||(r.tokens--,0===r.tokens&&(null==(t=this.i)||t.call(this,e)),0===r.tokens)}stop(){this.t={}}}var Y,X,J,K=e=>e instanceof Error;class Z{constructor(e,t,i){void 0===i&&(i=[]),this.coercers=e,this.stackParser=t,this.modifiers=i}buildFromUnknown(e,t){void 0===t&&(t={});var i=t&&t.mechanism||{handled:!0,type:"generic"},s=this.buildCoercingContext(i,t,0).apply(e),r=this.buildParsingContext(),n=this.parseStacktrace(s,r);return{$exception_list:this.convertToExceptionList(n,i),$exception_level:"error"}}modifyFrames(e){var t=this;return v(function*(){for(var i of e)i.stacktrace&&i.stacktrace.frames&&I(i.stacktrace.frames)&&(i.stacktrace.frames=yield t.applyModifiers(i.stacktrace.frames));return e})()}coerceFallback(e){var t;return{type:"Error",value:"Unknown error",stack:null==(t=e.syntheticException)?void 0:t.stack,synthetic:!0}}parseStacktrace(e,t){var i,s;return null!=e.cause&&(i=this.parseStacktrace(e.cause,t)),""!=e.stack&&null!=e.stack&&(s=this.applyChunkIds(this.stackParser(e.stack,+!!e.synthetic),t.chunkIdMap)),f({},e,{cause:i,stack:s})}applyChunkIds(e,t){return e.map(e=>(e.filename&&t&&(e.chunk_id=t[e.filename]),e))}applyCoercers(e,t){for(var i of this.coercers)if(i.match(e))return i.coerce(e,t);return this.coerceFallback(t)}applyModifiers(e){var t=this;return v(function*(){var i=e;for(var s of t.modifiers)i=yield s(i);return i})()}convertToExceptionList(e,t){var i,s,r,n={type:e.type,value:e.value,mechanism:{type:null!=(i=t.type)?i:"generic",handled:null==(s=t.handled)||s,synthetic:null!=(r=e.synthetic)&&r}};e.stack&&(n.stacktrace={type:"raw",frames:e.stack});var a=[n];return null!=e.cause&&a.push(...this.convertToExceptionList(e.cause,f({},t,{handled:!0}))),a}buildParsingContext(){return{chunkIdMap:function(e){var t=globalThis._posthogChunkIds;if(t){var i=Object.keys(t);return J&&i.length===X||(X=i.length,J=i.reduce((i,s)=>{Y||(Y={});var r=Y[s];if(r)i[r[0]]=r[1];else for(var n=e(s),a=n.length-1;a>=0;a--){var o=n[a],l=null==o?void 0:o.filename,c=t[s];if(l&&c){i[l]=c,Y[s]=[l,c];break}}return i},{})),J}}(this.stackParser)}}buildCoercingContext(e,t,i){void 0===i&&(i=0);var s=(i,s)=>
vendor: 12,189 bytes, line 1
1{if(s<=4){var r=this.buildCoercingContext(e,t,s);return this.applyCoercers(i,r)}};return f({},t,{syntheticException:0==i?t.syntheticException:void 0,mechanism:e,apply:e=>s(e,i),next:e=>s(e,i+1)})}}function Q(e,t,i,s,r){var n={platform:e,filename:t,function:"<anonymous>"===i?"?":i,in_app:!0};return R(s)||(n.lineno=s),R(r)||(n.colno=r),n}var ee=(e,t)=>{var i=-1!==e.indexOf("safari-extension"),s=-1!==e.indexOf("safari-web-extension");return i||s?[-1!==e.indexOf("@")?e.split("@")[0]:"?",i?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},et=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,ei=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,es=/\((\S*)(?::(\d+))(?::(\d+))\)/,er=(e,t)=>{var i=et.exec(e);if(i){var[,s,r,n]=i;return Q(t,s,"?",+r,+n)}var a=ei.exec(e);if(a){if(a[2]&&0===a[2].indexOf("eval")){var o=es.exec(a[2]);o&&(a[2]=o[1],a[3]=o[2],a[4]=o[3])}var[l,c]=ee(a[1]||"?",a[2]);return Q(t,c,l,a[3]?+a[3]:void 0,a[4]?+a[4]:void 0)}},en=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ea=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,eo=(e,t)=>{var i=en.exec(e);if(i){if(i[3]&&i[3].indexOf(" > eval")>-1){var s=ea.exec(i[3]);s&&(i[1]=i[1]||"eval",i[3]=s[1],i[4]=s[2],i[5]="")}var r=i[3],n=i[1]||"?";return[n,r]=ee(n,r),Q(t,r,n,i[4]?+i[4]:void 0,i[5]?+i[5]:void 0)}},el=/\(error: (.*)\)/;class ec{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,t){var i=A(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:i?e.stack:void 0,cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return this.isDOMError(e)?"DOMError":"DOMException"}getValue(e){var t=e.name||(this.isDOMError(e)?"DOMError":"DOMException");return e.message?t+": "+e.message:t}isDOMException(e){return q(e,"DOMException")}isDOMError(e){return q(e,"DOMError")}}class eu{match(e){return e instanceof Error}coerce(e,t){return{type:this.getType(e),value:this.getMessage(e,t),stack:this.getStack(e),cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return e.name||e.constructor.name}getMessage(e,t){var i=e.message;return i.error&&"string"==typeof i.error.message?String(i.error.message):String(i)}getStack(e){return e.stacktrace||e.stack||void 0}}class eh{match(e){return q(e,"ErrorEvent")&&null!=e.error}coerce(e,t){var i;return t.apply(e.error)||{type:"ErrorEvent",value:e.message,stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}}var ed=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class ep{match(e){return"string"==typeof e}coerce(e,t){var i,[s,r]=this.getInfos(e);return{type:null!=s?s:"Error",value:null!=r?r:e,stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}getInfos(e){var t="Error",i=e,s=e.match(ed);return s&&(t=s[1],i=s[2]),[t,i]}}var eg=["fatal","error","warning","log","info","debug"];function e_(e,t){void 0===t&&(t=40);var i=Object.keys(e);if(i.sort(),!i.length)return"[object has no keys]";for(var s=i.length;s>0;s--){var r=i.slice(0,s).join(", ");if(!(r.length>t))return s===i.length||r.length<=t?r:r.slice(0,t)+"..."}return""}class ev{match(e){return"object"==typeof e&&null!==e}coerce(e,t){var i,s=this.getErrorPropertyFromObject(e);return s?t.apply(s):{type:this.getType(e),value:this.getValue(e),stack:null==(i=t.syntheticException)?void 0:i.stack,level:this.isSeverityLevel(e.level)?e.level:"error",synthetic:!0}}getType(e){return B(e)?e.constructor.name:"Error"}getValue(e){if("name"in e&&"string"==typeof e.name){var t="'"+e.name+"' captured as exception";return"message"in e&&"string"==typeof e.message&&(t+=" with message: '"+e.message+"'"),t}if("message"in e&&"string"==typeof e.message)return e.message;var i=this.getObjectClassName(e);return(i&&"Object"!==i?"'"+i+"'":"Object")+" captured as exception with keys: "+e_(e)}isSeverityLevel(e){return A(e)&&!M(e)&&eg.indexOf(e)>=0}getErrorPropertyFromObject(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var i=e[t];if(K(i))return i}}getObjectClassName(e){try{var t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){return}}}class ef{match(e){return B(e)}coerce(e,t){var i,s=e.constructor.name;return{type:s,value:s+" captured as exception with keys: "+e_(e),stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}}class em{match(e){return U(e)}coerce(e,t){var i;return{type:"Error",value:"Primitive value captured as exception: "+String(e),stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}}class ey{match(e){return q(e,"PromiseRejectionEvent")}coerce(e,t){var i,s=this.getUnhandledRejectionReason(e);return U(s)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(s),stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}:t.apply(s)}getUnhandledRejectionReason(e){if(U(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch(e){}return e}}var eb=function(e,i){var{debugEnabled:s}=void 0===i?{}:i,r={k:function(i){if(t&&(g.DEBUG||p.POSTHOG_DEBUG||s)&&!R(t.console)&&t.console){for(var r=("__rrweb_original__"in t.console[i])?t.console[i].__rrweb_original__:t.console[i],n=arguments.length,a=Array(n>1?n-1:0),o=1;o<n;o++)a[o-1]=arguments[o];r(e,...a)}},info:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];r.k("log",...t)},warn:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];r.k("warn",...t)},error:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];r.k("error",...t)},critical:function(){for(var t=arguments.length,i=Array(t),s=0;s<t;s++)i[s]=arguments[s];console.error(e,...i)},uninitializedWarning:e=>{r.error("You must initialize PostHog before calling "+e)},createLogger:(t,i)=>eb(e+" "+t,i)};return r},ew=eb("[PostHog.js]"),eE=ew.createLogger,ex=eE("[ExternalScriptsLoader]"),ek=(e,t,i)=>{if(e.config.disable_external_dependency_loading)return ex.warn(t+" was requested but loading of external scripts is disabled."),i("Loading of external scripts is disabled");var s=null==o?void 0:o.querySelectorAll("script");if(s){for(var r,n=0;n<s.length;n++)if(r=function(){if(s[n].src===t){var e=s[n];return e.__posthog_loading_callback_fired?{v:i()}:(e.addEventListener("load",t=>{e.__posthog_loading_callback_fired=!0,i(void 0,t)}),e.onerror=e=>i(e),{v:void 0})}}())return r.v}var a=()=>{if(!o)return i("document not found");var s=o.createElement("script");if(s.type="text/javascript",s.crossOrigin="anonymous",s.src=t,s.onload=e=>{s.__posthog_loading_callback_fired=!0,i(void 0,e)},s.onerror=e=>i(e),e.config.prepare_external_dependency_script&&(s=e.config.prepare_external_dependency_script(s)),!s)return i("prepare_external_dependency_script returned null");var r,n=o.querySelectorAll("body > script");n.length>0?null==(r=n[0].parentNode)||r.insertBefore(s,n[0]):o.body.appendChild(s)};null!=o&&o.body?a():null==o||o.addEventListener("DOMContentLoaded",a)};p.__PosthogExtensions__=p.__PosthogExtensions__||{},p.__PosthogExtensions__.loadExternalDependency=(e,t,i)=>{var s="/static/"+t+".js?v="+e.version;"remote-config"===t&&(s="/array/"+e.config.token+"/config.js"),"toolbar"===t&&(s=s+"&t="+3e5*Math.floor(Date.now()/3e5));var r=e.requestRouter.endpointFor("assets",s);ek(e,r,i)},p.__PosthogExtensions__.loadSiteApp=(e,t,i)=>{var s=e.requestRouter.endpointFor("api",t);ek(e,s,i)};var eS={};function eP(e,t,i){if(I(e)){if(r&&e.forEach===r)e.forEach(t,i);else if("length"in e&&e.length===+e.length){for(var s=0,n=e.length;s<n;s++)if(s in e&&t.call(i,e[s],s)===eS)return}}}function eF(e,t,i){if(!L(e)){if(I(e))return eP(e,t,i);if(e instanceof FormData){for(var s of e.entries())if(t.call(i,s[1],s[0])===eS)return}else for(var r in e)if(F.call(e,r)&&t.call(i,e[r],r)===eS)return}}var e$=function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];return eP(i,function(t){for(var i in t)void 0!==t[i]&&(e[i]=t[i])}),e},eI=function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];return eP(i,function(t){eP(t,function(t){e.push(t)})}),e};function eO(e){for(var t=Object.keys(e),i=t.length,s=Array(i);i--;)s[i]=[t[i],e[t[i]]];return s}var eC=function(e){try{return e()}catch(e){return}},eT=function(e){return function(){try{for(var t=arguments.length,i=Array(t),s=0;s<t;s++)i[s]=arguments[s];return e.apply(this,i)}catch(e){ew.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),ew.critical(e)}}},eR=function(e){var t={};return eF(e,function(e,i){(A(e)&&e.length>0||N(e))&&(t[i]=e)}),t},eA=["herokuapp.com","vercel.app","netlify.app"];function eM(e,t){for(var i=0;i<e.length;i++)if(t(e[i]))return e[i]}function eD(e,t,i,s){var{capture:r=!1,passive:n=!0}=null!=s?s:{};null==e||e.addEventListener(t,i,{capture:r,passive:n})}var eL="$people_distinct_id",eN="__alias",ej="__timers",eH="$autocapture_disabled_server_side",eU="$heatmaps_enabled_server_side",eq="$exception_capture_enabled_server_side",eB="$error_tracking_suppression_rules",eV="$error_tracking_capture_extension_exceptions",eW="$web_vitals_enabled_server_side",eG="$dead_clicks_enabled_server_side",ez="$web_vitals_allowed_metrics",eY="$session_recording_remote_config",eX="$sesid",eJ="$session_is_sampled",eK="$enabled_feature_flags",eZ="$early_access_features",eQ="$feature_flag_details",e0="$stored_person_properties",e1="$stored_group_properties",e2="$surveys",e3="$surveys_activated",e5="$flag_call_reported",e8="$user_state",e6="$client_session_props",e4="$capture_rate_limit",e7="$initial_campaign_params",e9="$initial_referrer_info",te="$initial_person_info",tt="$epp",ti="__POSTHOG_TOOLBAR__",ts="$posthog_cookieless",tr=[eL,eN,"__cmpns",ej,"$session_recording_enabled_server_side",eU,eX,eK,eB,e8,eZ,eQ,e1,e0,e2,e5,e6,e4,e7,e9,tt,te];function tn(e){return e instanceof Element&&(e.id===ti||!(null==e.closest||!e.closest(".toolbar-global-fade-container")))}function ta(e){return!!e&&1===e.nodeType}function to(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function tl(e){return!!e&&3===e.nodeType}function tc(e){return!!e&&11===e.nodeType}function tu(e){return e?x(e).split(/\s+/):[]}function th(e){var i=null==t?void 0:t.location.href;return!!(i&&e&&e.some(e=>i.match(e)))}function td(e){var t="";switch(typeof e.className){case"string":t=e.className;break;case"object":t=(e.className&&"baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:t=""}return tu(t)}function tp(e){return L(e)?null:x(e).split(/(\s+)/).filter(e=>tC(e)).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function tg(e){var t="";return tx(e)&&!tk(e)&&e.childNodes&&e.childNodes.length&&eF(e.childNodes,function(e){var i;tl(e)&&e.textContent&&(t+=null!=(i=tp(e.textContent))?i:"")}),x(t)}function t_(e){var t;return R(e.target)?e.srcElement||null:null!=(t=e.target)&&t.shadowRoot?e.composedPath()[0]||null:e.target||null}var tv=["a","button","form","input","select","textarea","label"];function tf(e,t){if(R(t))return!0;var i,s=function(e){if(t.some(t=>e.matches(t)))return{v:!0}};for(var r of e)if(i=s(r))return i.v;return!1}function tm(e){var t=e.parentNode;return!(!t||!ta(t))&&t}var ty=["next","previous","prev",">","<"],tb=[".ph-no-rageclick",".ph-no-capture"],tw=e=>!e||to(e,"html")||!ta(e),tE=(e,i)=>{if(!t||tw(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var s=!1,r=[e],n=e;n.parentNode&&!to(n,"body");)if(tc(n.parentNode))r.push(n.parentNode.host),n=n.parentNode.host;else{var a=tm(n);if(!a)break;if(i||tv.indexOf(a.tagName.toLowerCase())>-1)s=!0;else{var o=t.getComputedStyle(a);o&&"pointer"===o.getPropertyValue("cursor")&&(s=!0)}r.push(a),n=a}return{parentIsUsefulElement:s,targetElementList:r}};function tx(e){for(var t=e;t.parentNode&&!to(t,"body");t=t.parentNode){var i=td(t);if(E(i,"ph-sensitive")||E(i,"ph-no-capture"))return!1}if(E(td(e),"ph-include"))return!0;var s=e.type||"";if(A(s))switch(s.toLowerCase()){case"hidden":case"password":return!1}
1var r=e.name||e.id||"";return!(A(r)&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(r.replace(/[^a-zA-Z0-9]/g,"")))}function tk(e){return!!(to(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||to(e,"select")||to(e,"textarea")||"true"===e.getAttribute("contenteditable"))}var tS="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",tP=RegExp("^(?:"+tS+")$"),tF=new RegExp(tS),t$="\\d{3}-?\\d{2}-?\\d{4}",tI=RegExp("^("+t$+")$"),tO=RegExp("("+t$+")");function tC(e,t){return void 0===t&&(t=!0),!(L(e)||A(e)&&(e=x(e),(t?tP:tF).test((e||"").replace(/[- ]/g,""))||(t?tI:tO).test(e)))&&!0}function tT(e){var t=tg(e);return tC(t=(t+" "+function e(t){var i="";return t&&t.childNodes&&t.childNodes.length&&eF(t.childNodes,function(t){var s;if(t&&"span"===(null==(s=t.tagName)?void 0:s.toLowerCase()))try{var r=tg(t);i=(i+" "+r).trim(),t.childNodes&&t.childNodes.length&&(i=(i+" "+e(t)).trim())}catch(e){ew.error("[AutoCapture]",e)}}),i}(e)).trim())?t:""}function tR(e){return e.replace(/"|\\"/g,'\\"')}class tA{constructor(e){this.disabled=!1===e;var t=C(e)?e:{};this.thresholdPx=t.threshold_px||30,this.timeoutMs=t.timeout_ms||1e3,this.clickCount=t.click_count||3,this.clicks=[]}isRageClick(e,t,i){if(this.disabled)return!1;var s=this.clicks[this.clicks.length-1];if(s&&Math.abs(e-s.x)+Math.abs(t-s.y)<this.thresholdPx&&i-s.timestamp<this.timeoutMs){if(this.clicks.push({x:e,y:t,timestamp:i}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:e,y:t,timestamp:i}];return!1}}var tM="$copy_autocapture",tD=((tY={}).GZipJS="gzip-js",tY.Base64="base64",tY),tL=e=>{var t=null==o?void 0:o.createElement("a");return R(t)?null:(t.href=e,t)},tN=function(e,t){void 0===t&&(t="&");var i,s,r=[];return eF(e,function(e,t){R(e)||R(t)||"undefined"===t||(i=encodeURIComponent(e instanceof File?e.name:e.toString()),s=encodeURIComponent(t),r[r.length]=s+"="+i)}),r.join(t)},tj=function(e,t){for(var i,s=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),r=0;r<s.length;r++){var n=s[r].split("=");if(n[0]===t){i=n;break}}if(!I(i)||i.length<2)return"";var a=i[1];try{a=decodeURIComponent(a)}catch(e){ew.error("Skipping decoding for malformed query param: "+a)}return a.replace(/\+/g," ")},tH=function(e,t,i){if(!e||!t||!t.length)return e;for(var s=e.split("#"),r=s[0]||"",n=s[1],a=r.split("?"),o=a[1],l=a[0],c=(o||"").split("&"),u=[],h=0;h<c.length;h++){var d=c[h].split("=");I(d)&&(t.includes(d[0])?u.push(d[0]+"="+i):u.push(c[h]))}var p=l;return null!=o&&(p+="?"+u.join("&")),null!=n&&(p+="#"+n),p},tU=function(e,t){var i=e.match(RegExp(t+"=([^&]*)"));return i?i[1]:null},tq=eE("[AutoCapture]");function tB(e,t){return t.length>e?t.slice(0,e)+"...":t}class tV{constructor(e){this.P=!1,this.T=null,this.I=!1,this.instance=e,this.rageclicks=new tA(e.config.rageclick),this.R=null}get F(){var e,t,i=C(this.instance.config.autocapture)?this.instance.config.autocapture:{};return i.url_allowlist=null==(e=i.url_allowlist)?void 0:e.map(e=>new RegExp(e)),i.url_ignorelist=null==(t=i.url_ignorelist)?void 0:t.map(e=>new RegExp(e)),i}C(){if(this.isBrowserSupported()){if(t&&o){var e=e=>{e=e||(null==t?void 0:t.event);try{this.O(e)}catch(e){tq.error("Failed to capture event",e)}};if(eD(o,"submit",e,{capture:!0}),eD(o,"change",e,{capture:!0}),eD(o,"click",e,{capture:!0}),this.F.capture_copied_text){var i=e=>{e=e||(null==t?void 0:t.event),this.O(e,tM)};eD(o,"copy",i,{capture:!0}),eD(o,"cut",i,{capture:!0})}}}else tq.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.P&&(this.C(),this.P=!0)}onRemoteConfig(e){e.elementsChainAsString&&(this.I=e.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[eH]:!!e.autocapture_opt_out}),this.T=!!e.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(e){this.R=e}getElementSelectors(e){var t,i=[];return null==(t=this.R)||t.forEach(t=>{var s=null==o?void 0:o.querySelectorAll(t);
1null==s||s.forEach(s=>{e===s&&i.push(t)})}),i}get isEnabled(){var e,t,i=null==(e=this.instance.persistence)?void 0:e.props[eH];if(D(this.T)&&!j(i)&&!this.instance.M())return!1;var s=null!=(t=this.T)?t:!!i;return!!this.instance.config.autocapture&&!s}O(e,i){if(void 0===i&&(i="$autocapture"),this.isEnabled){var s,r=t_(e);tl(r)&&(r=r.parentNode||null),"$autocapture"===i&&"click"===e.type&&e instanceof MouseEvent&&this.instance.config.rageclick&&null!=(s=this.rageclicks)&&s.isRageClick(e.clientX,e.clientY,e.timeStamp||(new Date).getTime())&&function(e,i){if(!t||tw(e)||(j(i)?(s=!!i&&tb,r=void 0):(s=null!=(n=null==i?void 0:i.css_selector_ignorelist)?n:tb,r=null==i?void 0:i.content_ignorelist),!1===s))return!1;var s,r,n,{targetElementList:a}=tE(e,!1);return!function(e,t){var i;if(!1===e||R(e))return!1;if(!0===e)i=ty;else{if(!I(e))return!1;if(e.length>10)return ew.error("[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching."),!1;i=e.map(e=>e.toLowerCase())}return t.some(e=>{var{safeText:t,ariaLabel:s}=e;return i.some(e=>t.includes(e)||s.includes(e))})}(r,a.map(e=>{var t;return{safeText:tg(e).toLowerCase(),ariaLabel:(null==(t=e.getAttribute("aria-label"))?void 0:t.toLowerCase().trim())||""}}))&&!tf(a,s)}(r,this.instance.config.rageclick)&&this.O(e,"$rageclick");var n=i===tM;if(r&&function(e,i,s,r,n){if(void 0===s&&(s=void 0),!t||tw(e)||null!=(a=s)&&a.url_allowlist&&!th(s.url_allowlist)||null!=(o=s)&&o.url_ignorelist&&th(s.url_ignorelist))return!1;if(null!=(l=s)&&l.dom_event_allowlist){var a,o,l,c,u=s.dom_event_allowlist;if(u&&!u.some(e=>i.type===e))return!1}var{parentIsUsefulElement:h,targetElementList:d}=tE(e,r);if(!function(e,t){var i=null==t?void 0:t.element_allowlist;if(R(i))return!0;var s,r=function(e){if(i.some(t=>e.tagName.toLowerCase()===t))return{v:!0}};for(var n of e)if(s=r(n))return s.v;return!1}(d,s)||!tf(d,null==(c=s)?void 0:c.css_selector_allowlist))return!1;var p=t.getComputedStyle(e);if(p&&"pointer"===p.getPropertyValue("cursor")&&"click"===i.type)return!0;var g=e.tagName.toLowerCase();switch(g){case"html":return!1;case"form":return(n||["submit"]).indexOf(i.type)>=0;case"input":case"select":case"textarea":return(n||["change","click"]).indexOf(i.type)>=0;default:return h?(n||["click"]).indexOf(i.type)>=0:(n||["click"]).indexOf(i.type)>=0&&(tv.indexOf(g)>-1||"true"===e.getAttribute("contenteditable"))}}(r,e,this.F,n,n?["copy","cut"]:void 0)){var{props:a,explicitNoCapture:o}=function(e,i){for(var s,r,{e:n,maskAllElementAttributes:a,maskAllText:o,elementAttributeIgnoreList:l,elementsChainAsString:c}=i,u=[e],h=e;h.parentNode&&!to(h,"body");)tc(h.parentNode)?(u.push(h.parentNode.host),h=h.parentNode.host):(u.push(h.parentNode),h=h.parentNode);var d,p=[],g={},_=!1,v=!1;if(eF(u,e=>{var t=tx(e);"a"===e.tagName.toLowerCase()&&(_=e.getAttribute("href"),_=t&&_&&tC(_)&&_),E(td(e),"ph-no-capture")&&(v=!0),p.push(function(e,t,i,s){var r=e.tagName.toLowerCase(),n={tag_name:r};tv.indexOf(r)>-1&&!i&&("a"===r.toLowerCase()||"button"===r.toLowerCase()?n.$el_text=tB(1024,tT(e)):n.$el_text=tB(1024,tg(e)));var a=td(e);a.length>0&&(n.classes=a.filter(function(e){return""!==e})),eF(e.attributes,function(i){var r;if((!tk(e)||-1!==["name","id","class","aria-label"].indexOf(i.name))&&(null==s||!s.includes(i.name))&&!t&&tC(i.value)&&(!A(r=i.name)||"_ngcontent"!==r.substring(0,10)&&"_nghost"!==r.substring(0,7))){var a=i.value;"class"===i.name&&(a=tu(a).join(" ")),n["attr__"+i.name]=tB(1024,a)}});for(var o=1,l=1,c=e;c=function(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!ta(t))return t}(c);)o++,c.tagName===e.tagName&&l++;return n.nth_child=o,n.nth_of_type=l,n}(e,a,o,l)),e$(g,function(e){if(!tx(e))return{};var t={};return eF(e.attributes,function(e){if(e.name&&0===e.name.indexOf("data-ph-capture-attribute")){var i=e.name.replace("data-ph-capture-attribute-",""),s=e.value;i&&s&&tC(s)&&(t[i]=s)}}),t}(e))}),v)return{props:{},explicitNoCapture:v};if(o||("a"===e.tagName.toLowerCase()||"button"===e.tagName.toLowerCase()?p[0].$el_text=tT(e):p[0].$el_text=tg(e)),_){p[0].attr__href=_;var m,y,b=null==(m=tL(_))?void 0:m.host,w=null==t||null==(y=t.location)?void 0:y.host;b&&w&&b!==w&&(d=_)}return{props:e$({$event_type:n.type,$ce_version:1},c?{}:{$elements:p},{$elements_chain:p.map(e=>{var t,i,s,r={text:null==(i=e.$el_text)?void 0:i.slice(0,400),tag_name:e.tag_name,href:null==(s=e.attr__href)?void 0:s.slice(0,2048),attr_class:(t=e.attr__class)?I(t)?t:tu(t):void 0,attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return eO(e).filter(e=>{var[t]=e;return 0===t.indexOf("attr__")}
vendor: 5,792 bytes, line 1
1).forEach(e=>{var[t,i]=e;return r.attributes[t]=i}),r}).map(e=>{var t,i,s="";if(e.tag_name&&(s+=e.tag_name),e.attr_class)for(var r of(e.attr_class.sort(),e.attr_class))s+="."+r.replace(/"/g,"");var n=f({},e.text?{text:e.text}:{},{"nth-child":null!=(t=e.nth_child)?t:0,"nth-of-type":null!=(i=e.nth_of_type)?i:0},e.href?{href:e.href}:{},e.attr_id?{attr_id:e.attr_id}:{},e.attributes),a={};return eO(n).sort((e,t)=>{var[i]=e,[s]=t;return i.localeCompare(s)}).forEach(e=>{var[t,i]=e;return a[tR(t.toString())]=tR(i.toString())}),s+=":",s+=eO(a).map(e=>{var[t,i]=e;return t+'="'+i+'"'}).join("")}).join(";")},null!=(s=p[0])&&s.$el_text?{$el_text:null==(r=p[0])?void 0:r.$el_text}:{},d&&"click"===n.type?{$external_click_url:d}:{},g)}}(r,{e:e,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.F.element_attribute_ignorelist,elementsChainAsString:this.I});if(o)return!1;var l=this.getElementSelectors(r);if(l&&l.length>0&&(a.$element_selectors=l),i===tM){var c,u=tp(null==t||null==(c=t.getSelection())?void 0:c.toString()),h=e.type||"clipboard";if(!u)return!1;a.$selected_content=u,a.$copy_type=h}return this.instance.capture(i,a),!0}}}isBrowserSupported(){return O(null==o?void 0:o.querySelectorAll)}}Math.trunc||(Math.trunc=function(e){return e<0?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return N(e)&&isFinite(e)&&Math.floor(e)===e});var tW="0123456789abcdef";class tG{constructor(e){if(this.bytes=e,16!==e.length)throw TypeError("not 128-bit length")}static fromFieldsV7(e,t,i,s){if(!Number.isInteger(e)||!Number.isInteger(t)||!Number.isInteger(i)||!Number.isInteger(s)||e<0||t<0||i<0||s<0||e>0xffffffffffff||t>4095||i>0x3fffffff||s>0xffffffff)throw RangeError("invalid field value");var r=new Uint8Array(16);return r[0]=e/0x10000000000,r[1]=e/0x100000000,r[2]=e/0x1000000,r[3]=e/65536,r[4]=e/256,r[5]=e,r[6]=112|t>>>8,r[7]=t,r[8]=128|i>>>24,r[9]=i>>>16,r[10]=i>>>8,r[11]=i,r[12]=s>>>24,r[13]=s>>>16,r[14]=s>>>8,r[15]=s,new tG(r)}toString(){for(var e="",t=0;t<this.bytes.length;t++)e=e+tW.charAt(this.bytes[t]>>>4)+tW.charAt(15&this.bytes[t]),3!==t&&5!==t&&7!==t&&9!==t||(e+="-");if(36!==e.length)throw Error("Invalid UUIDv7 was generated");return e}clone(){return new tG(this.bytes.slice(0))}equals(e){return 0===this.compareTo(e)}compareTo(e){for(var t=0;t<16;t++){var i=this.bytes[t]-e.bytes[t];if(0!==i)return Math.sign(i)}return 0}}class tz{constructor(){this.A=0,this.D=0,this.j=new tK}generate(){var e=this.generateOrAbort();if(R(e)){this.A=0;var t=this.generateOrAbort();if(R(t))throw Error("Could not generate UUID after timestamp reset");return t}return e}generateOrAbort(){var e=Date.now();if(e>this.A)this.A=e,this.L();else{if(!(e+1e4>this.A))return;this.D++,this.D>0x3ffffffffff&&(this.A++,this.L())}return tG.fromFieldsV7(this.A,Math.trunc(this.D/0x40000000),0x3fffffff&this.D,this.j.nextUint32())}L(){this.D=1024*this.j.nextUint32()+(1023&this.j.nextUint32())}}var tY,tX,tJ=e=>{if("u">typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw Error("no cryptographically strong RNG available");for(var t=0;t<e.length;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};t&&!R(t.crypto)&&crypto.getRandomValues&&(tJ=e=>crypto.getRandomValues(e));class tK{constructor(){this.N=new Uint32Array(8),this.U=1/0}nextUint32(){return this.U>=this.N.length&&(tJ(this.N),this.U=0),this.N[this.U++]}}var tZ=()=>tQ().toString(),tQ=()=>(tX||(tX=new tz)).generate(),t0="",t1=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,t2={H:()=>!!o,B:function(e){ew.error("cookieStore error: "+e)},q:function(e){if(o){try{for(var t=e+"=",i=o.cookie.split(";").filter(e=>e.length),s=0;s<i.length;s++){for(var r=i[s];" "==r.charAt(0);)r=r.substring(1,r.length);if(0===r.indexOf(t))return decodeURIComponent(r.substring(t.length,r.length))}}catch(e){}return null}},W:function(e){var t;try{t=JSON.parse(t2.q(e))||{}}catch(e){}return t},G:function(e,t,i,s,r){if(o)try{var n="",a="",l=function(e,t){if(t){var i=function(e,t){if(void 0===t&&(t=o),t0)return t0;if(!t||["localhost","127.0.0.1"].includes(e))return"";for(var i=e.split("."),s=Math.min(i.length,8),r="dmn_chk_"+tZ();!t0&&s--;){var n=i.slice(s).join("."),a=r+"=1;domain=."+n+";path=/";t.cookie=a+";max-age=3",t.cookie.includes(r)&&(t.cookie=a+";max-age=0",t0=n)}return t0}(e);if(!i){var s,r=(s=e.match(t1))?s[0]:"";r!==i&&ew.info("Warning: cookie subdomain discovery mismatch",r,i),i=r}return i?"; domain=."+i:""}return""}(o.location.hostname,s);if(i){var c=new Date;c.setTime(c.getTime()+24*i*36e5),n="; expires="+c.toUTCString()}r&&(a="; secure");var u=e+"="+encodeURIComponent(JSON.stringify(t))+n+"; SameSite=Lax; path=/"+l+a;return u.length>3686.4&&ew.warn("cookieStore warning: large cookie, len="+u.length),o.cookie=u,u}catch(e){return}},V:function(e,t){if(null!=o&&o.cookie)try{t2.G(e,"",-1,t)}catch(e){return}}},t3=null,t5={H:function(){if(!D(t3))return t3;var e=!0;if(R(t))e=!1;else try{var i="__mplssupport__";t5.G(i,"xyz"),'"xyz"'!==t5.q(i)&&(e=!1),t5.V(i)}catch(t){e=!1}return e||ew.error("localStorage unsupported; falling back to cookie store"),t3=e,e},B:function(e){ew.error("localStorage error: "+e)},q:function(e){try{return null==t?void 0:t.localStorage.getItem(e)}catch(e){t5.B(e)}return null},W:function(e){try{return JSON.parse(t5.q(e))||{}}catch(e){}return null},G:function(e,i){try{null==t||t.localStorage.setItem(e,JSON.stringify(i))}catch(e){t5.B(e)}},V:function(e){try{null==t||t.localStorage.removeItem(e)}catch(e){t5.B(e)}}},t8=["distinct_id",eX,eJ,tt,te],t6=f({},t5,{W:function(e){try{var t={};try{t=t2.W(e)||{}}catch(e){}var i=e$(t,JSON.parse(t5.q(e)||"{}"));return t5.G(e,i),i}catch(e){}return null},G:function(e,t,i,s,r,n){try{t5.G(e,t,void 0,void 0,n);var a={};
1t8.forEach(e=>{t[e]&&(a[e]=t[e])}),Object.keys(a).length&&t2.G(e,a,i,s,r,n)}catch(e){t5.B(e)}},V:function(e,i){try{null==t||t.localStorage.removeItem(e),t2.V(e,i)}catch(e){t5.B(e)}}}),t4={},t7={H:function(){return!0},B:function(e){ew.error("memoryStorage error: "+e)},q:function(e){return t4[e]||null},W:function(e){return t4[e]||null},G:function(e,t){t4[e]=t},V:function(e){delete t4[e]}},t9=null,ie={H:function(){if(!D(t9))return t9;if(t9=!0,R(t))t9=!1;else try{var e="__support__";ie.G(e,"xyz"),'"xyz"'!==ie.q(e)&&(t9=!1),ie.V(e)}catch(e){t9=!1}return t9},B:function(e){ew.error("sessionStorage error: ",e)},q:function(e){try{return null==t?void 0:t.sessionStorage.getItem(e)}catch(e){ie.B(e)}return null},W:function(e){try{return JSON.parse(ie.q(e))||null}catch(e){}return null},G:function(e,i){try{null==t||t.sessionStorage.setItem(e,JSON.stringify(i))}catch(e){ie.B(e)}},V:function(e){try{null==t||t.sessionStorage.removeItem(e)}catch(e){ie.B(e)}}},it=((na={})[na.PENDING=-1]="PENDING",na[na.DENIED=0]="DENIED",na[na.GRANTED=1]="GRANTED",na);class ii{constructor(e){this._instance=e}get F(){return this._instance.config}get consent(){return this.J()?it.DENIED:this.K}isOptedOut(){return"always"===this.F.cookieless_mode||this.consent===it.DENIED||this.consent===it.PENDING&&(this.F.opt_out_capturing_by_default||"on_reject"===this.F.cookieless_mode)}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===it.DENIED}optInOut(e){this.Y.G(this.X,+!!e,this.F.cookie_expiration,this.F.cross_subdomain_cookie,this.F.secure_cookie)}reset(){this.Y.V(this.X,this.F.cross_subdomain_cookie)}get X(){var{token:e,opt_out_capturing_cookie_prefix:t,consent_persistence_name:i}=this._instance.config;return i||(t?t+e:"__ph_opt_in_out_"+e)}get K(){var e=this.Y.q(this.X);return E(V,e)?it.GRANTED:E(W,e)?it.DENIED:it.PENDING}get Y(){if(!this.Z){var e=this.F.opt_out_capturing_persistence_type;this.Z="localStorage"===e?t5:t2;var t="localStorage"===e?t2:t5;t.q(this.X)&&(this.Z.q(this.X)||this.optInOut(E(V,t.q(this.X))),t.V(this.X,this.F.cross_subdomain_cookie))}return this.Z}J(){return!!this.F.respect_dnt&&!!eM([null==a?void 0:a.doNotTrack,null==a?void 0:a.msDoNotTrack,p.doNotTrack],e=>E(V,e))}}var is=eE("[Dead Clicks]"),ir=()=>!0,ia=e=>{var t,i=!(null==(t=e.instance.persistence)||!t.get_property(eG)),s=e.instance.config.capture_dead_clicks;return j(s)?s:i};class io{get lazyLoadedDeadClicksAutocapture(){return this.tt}constructor(e,t,i){this.instance=e,this.isEnabled=t,this.onCapture=i,this.startIfEnabled()}onRemoteConfig(e){this.instance.persistence&&this.instance.persistence.register({[eG]:null==e?void 0:e.captureDeadClicks}),this.startIfEnabled()}startIfEnabled(){this.isEnabled(this)&&this.it(()=>{this.et()})}it(e){var t,i;null!=(t=p.__PosthogExtensions__)&&t.initDeadClicksAutocapture&&e(),null==(i=p.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this.instance,"dead-clicks-autocapture",t=>{t?is.error("failed to load script",t):e()})}et(){var e;if(o){if(!this.tt&&null!=(e=p.__PosthogExtensions__)&&e.initDeadClicksAutocapture){var t=C(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};t.__onCapture=this.onCapture,this.tt=p.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,t),this.tt.start(o),is.info("starting...")}}else is.error("`document` not found. Cannot start.")}stop(){this.tt&&(this.tt.stop(),this.tt=void 0,is.info("stopping..."))}}var il=eE("[ExceptionAutocapture]");class ic{constructor(e){var i,s,r;this.rt=()=>{var e;if(t&&this.isEnabled&&null!=(e=p.__PosthogExtensions__)&&e.errorWrappingFunctions){var i=p.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,s=p.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,r=p.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.st&&this.F.capture_unhandled_errors&&(this.st=i(this.captureException.bind(this))),!this.nt&&this.F.capture_unhandled_rejections&&(this.nt=s(this.captureException.bind(this))),!this.ot&&this.F.capture_console_errors&&(this.ot=r(this.captureException.bind(this)))}catch(e){il.error("failed to start",e),this.lt()}}},this._instance=e,this.ut=!(null==(i=this._instance.persistence)||!i.props[eq]),this.F=this.ht(),this.dt=new z({refillRate:null!=(s=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)?s:1,bucketSize:null!=(r=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)?r:10,refillInterval:1e4,h:il}),this.startIfEnabled()}ht(){var e=this._instance.config.capture_exceptions,t={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return C(e)?t=f({},t,e):(R(e)?this.ut:e)&&(t=f({},t,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),t}get isEnabled(){return this.F.capture_console_errors||this.F.capture_unhandled_errors||this.F.capture_unhandled_rejections}startIfEnabled(){this.isEnabled&&(il.info("enabled"),this.it(this.rt))}it(e){var t,i;
vendor: 4,917 bytes, line 1
1null!=(t=p.__PosthogExtensions__)&&t.errorWrappingFunctions&&e(),null==(i=p.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"exception-autocapture",t=>{if(t)return il.error("failed to load script",t);e()})}lt(){var e,t,i;null==(e=this.st)||e.call(this),this.st=void 0,null==(t=this.nt)||t.call(this),this.nt=void 0,null==(i=this.ot)||i.call(this),this.ot=void 0}onRemoteConfig(e){var t=e.autocaptureExceptions;this.ut=!!t,this.F=this.ht(),this._instance.persistence&&this._instance.persistence.register({[eq]:this.ut}),this.startIfEnabled()}captureException(e){var t,i,s=null!=(t=null==e||null==(i=e.$exception_list)||null==(i=i[0])?void 0:i.type)?t:"Exception";this.dt.consumeRateLimit(s)?il.info("Skipping exception capture because of client rate limiting.",{exception:s}):this._instance.exceptions.sendExceptionEvent(e)}}function iu(e,t,i){try{if(!(t in e))return()=>{};var s=e[t],r=i(s);return O(r)&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=r,()=>{e[t]=s}}catch(e){return()=>{}}}class ih{constructor(e){var i;this._instance=e,this.vt=(null==t||null==(i=t.location)?void 0:i.pathname)||""}get isEnabled(){return"history_change"===this._instance.config.capture_pageview}startIfEnabled(){this.isEnabled&&(ew.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.ct&&this.ct(),this.ct=void 0,ew.info("History API monitoring stopped")}monitorHistoryChanges(){var e,i;if(t&&t.history){var s=this;null!=(e=t.history.pushState)&&e.__posthog_wrapped__||iu(t.history,"pushState",e=>function(t,i,r){e.call(this,t,i,r),s.ft("pushState")}),null!=(i=t.history.replaceState)&&i.__posthog_wrapped__||iu(t.history,"replaceState",e=>function(t,i,r){e.call(this,t,i,r),s.ft("replaceState")}),this.gt()}}ft(e){try{var i,s=null==t||null==(i=t.location)?void 0:i.pathname;if(!s)return;s!==this.vt&&this.isEnabled&&this._instance.capture("$pageview",{navigation_type:e}),this.vt=s}catch(t){ew.error("Error capturing "+e+" pageview",t)}}gt(){if(!this.ct){var e=()=>{this.ft("popstate")};eD(t,"popstate",e),this.ct=()=>{t&&t.removeEventListener("popstate",e)}}}}var id=eE("[SegmentIntegration]"),ip="posthog-js";function ig(e,t){var{organization:i,projectId:s,prefix:r,severityAllowList:n=["error"],sendExceptionsToPostHog:a=!0}=void 0===t?{}:t;return t=>{if(!("*"===n||n.includes(t.level))||!e.__loaded)return t;t.tags||(t.tags={});var o,l,c,u,h,d=e.requestRouter.endpointFor("ui","/project/"+e.config.token+"/person/"+e.get_distinct_id());t.tags["PostHog Person URL"]=d,e.sessionRecordingStarted()&&(t.tags["PostHog Recording URL"]=e.get_session_replay_url({withTimestamp:!0}));var p=(null==(o=t.exception)?void 0:o.values)||[],g=p.map(e=>f({},e,{stacktrace:e.stacktrace?f({},e.stacktrace,{type:"raw",frames:(e.stacktrace.frames||[]).map(e=>f({},e,{platform:"web:javascript"}))}):void 0})),_={$exception_message:(null==(l=p[0])?void 0:l.value)||t.message,$exception_type:null==(c=p[0])?void 0:c.type,$exception_level:t.level,$exception_list:g,$sentry_event_id:t.event_id,$sentry_exception:t.exception,$sentry_exception_message:(null==(u=p[0])?void 0:u.value)||t.message,$sentry_exception_type:null==(h=p[0])?void 0:h.type,$sentry_tags:t.tags};return i&&s&&(_.$sentry_url=(r||"https://sentry.io/organizations/")+i+"/issues/?project="+s+"&query="+t.event_id),a&&e.exceptions.sendExceptionEvent(_),t}}class i_{constructor(e,t,i,s,r,n){this.name=ip,this.setupOnce=function(a){a(ig(e,{organization:t,projectId:i,prefix:s,severityAllowList:r,sendExceptionsToPostHog:null==n||n}))}}}var iv=null!=t&&t.location?tU(t.location.hash,"__posthog")||tU(location.hash,"state"):null,im="_postHogToolbarParams",iy=eE("[Toolbar]"),ib=((no=ib||{})[no.UNINITIALIZED=0]="UNINITIALIZED",no[no.LOADING=1]="LOADING",no[no.LOADED=2]="LOADED",no);class iw{constructor(e){this.instance=e}_t(e){p.ph_toolbar_state=e}yt(){var e;return null!=(e=p.ph_toolbar_state)?e:ib.UNINITIALIZED}maybeLoadToolbar(e,i,s){if(void 0===e&&(e=void 0),void 0===i&&(i=void 0),void 0===s&&(s=void 0),!t||!o)return!1;e=null!=e?e:t.location,s=null!=s?s:t.history;try{if(!i){try{t.localStorage.setItem("test","test"),t.localStorage.removeItem("test")}catch(e){return!1}i=null==t?void 0:t.localStorage}var r,n=iv||tU(e.hash,"__posthog")||tU(e.hash,"state"),a=n?eC(()=>JSON.parse(atob(decodeURIComponent(n))))||eC(()=>JSON.parse(decodeURIComponent(n))):null;return a&&"ph_authorize"===a.action?((r=a).source="url",r&&Object.keys(r).length>0&&(a.desiredHash?e.hash=a.desiredHash:s?s.replaceState(s.state,"",e.pathname+e.search):e.hash="")):((r=JSON.parse(i.getItem(im)||"{}")).source="localstorage",delete r.userIntent),!(!r.token||this.instance.config.token!==r.token)&&(this.loadToolbar(r),!0)}catch(e){return!1}}bt(e){var t=p.ph_load_toolbar||p.ph_load_editor;!L(t)&&O(t)?t(e,this.instance):iy.warn("No toolbar load function found")}
1loadToolbar(e){var i,s=!(null==o||!o.getElementById(ti));if(!t||s)return!1;var r="custom"===this.instance.requestRouter.region&&this.instance.config.advanced_disable_toolbar_metrics,n=f({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor("ui")},r?{instrument:!1}:{});return(t.localStorage.setItem(im,JSON.stringify(f({},n,{source:void 0}))),this.yt()===ib.LOADED)?this.bt(n):this.yt()===ib.UNINITIALIZED&&(this._t(ib.LOADING),null==(i=p.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this.instance,"toolbar",e=>{e?(iy.error("[Toolbar] Failed to load",e),this._t(ib.UNINITIALIZED)):(this._t(ib.LOADED),this.bt(n))}),eD(t,"turbolinks:load",()=>{this._t(ib.UNINITIALIZED),this.loadToolbar(n)})),!0}wt(e){return this.loadToolbar(e)}maybeLoadEditor(e,t,i){return void 0===e&&(e=void 0),void 0===t&&(t=void 0),void 0===i&&(i=void 0),this.maybeLoadToolbar(e,t,i)}}var iE=eE("[TracingHeaders]");class ix{constructor(e){this.xt=void 0,this.$t=void 0,this.rt=()=>{var e,t;R(this.xt)&&(null==(e=p.__PosthogExtensions__)||null==(e=e.tracingHeadersPatchFns)||e._patchXHR(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager)),R(this.$t)&&(null==(t=p.__PosthogExtensions__)||null==(t=t.tracingHeadersPatchFns)||t._patchFetch(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager))},this._instance=e}it(e){var t,i;null!=(t=p.__PosthogExtensions__)&&t.tracingHeadersPatchFns&&e(),null==(i=p.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"tracing-headers",t=>{if(t)return iE.error("failed to load script",t);e()})}startIfEnabledOrStop(){var e,t;this._instance.config.__add_tracing_headers?this.it(this.rt):(null==(e=this.xt)||e.call(this),null==(t=this.$t)||t.call(this),this.xt=void 0,this.$t=void 0)}}var ik="Mobile",iS="Android",iP="Tablet",iF=iS+" "+iP,i$="iPad",iI="Apple",iO=iI+" Watch",iC="Safari",iT="BlackBerry",iR="Samsung",iA=iR+"Browser",iM=iR+" Internet",iD="Chrome",iL=iD+" OS",iN=iD+" iOS",ij="Internet Explorer",iH=ij+" "+ik,iU="Opera",iq=iU+" Mini",iB="Edge",iV="Microsoft "+iB,iW="Firefox",iG=iW+" iOS",iz="Nintendo",iY="PlayStation",iX="Xbox",iJ=iS+" "+ik,iK=ik+" "+iC,iZ="Windows",iQ=iZ+" Phone",i0="Nokia",i1="Ouya",i2="Generic",i3=i2+" "+ik.toLowerCase(),i5=i2+" "+iP.toLowerCase(),i8="Konqueror",i6="(\\d+(\\.\\d+)?)",i4=RegExp("Version/"+i6),i7=RegExp(iX,"i"),i9=RegExp(iY+" \\w+","i"),se=RegExp(iz+" \\w+","i"),st=RegExp(iT+"|PlayBook|BB10","i"),si={"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"},ss=function(e,t){var i;return t=t||"",E(e," OPR/")&&E(e,"Mini")?iq:E(e," OPR/")?iU:st.test(e)?iT:E(e,"IE"+ik)||E(e,"WPDesktop")?iH:E(e,iA)?iM:E(e,iB)||E(e,"Edg/")?iV:E(e,"FBIOS")?"Facebook "+ik:E(e,"UCWEB")||E(e,"UCBrowser")?"UC Browser":E(e,"CriOS")?iN:E(e,"CrMo")||E(e,iD)?iD:E(e,iS)&&E(e,iC)?iJ:E(e,"FxiOS")?iG:E(e.toLowerCase(),i8.toLowerCase())?i8:(i=t)&&E(i,iI)||E(e,iC)&&!E(e,iD)&&!E(e,iS)?E(e,ik)?iK:iC:E(e,iW)?iW:E(e,"MSIE")||E(e,"Trident/")?ij:E(e,"Gecko")?iW:""},sr={[iH]:[RegExp("rv:"+i6)],[iV]:[RegExp(iB+"?\\/"+i6)],[iD]:[RegExp("("+iD+"|CrMo)\\/"+i6)],[iN]:[RegExp("CriOS\\/"+i6)],"UC Browser":[RegExp("(UCBrowser|UCWEB)\\/"+i6)],[iC]:[i4],[iK]:[i4],[iU]:[RegExp("(Opera|OPR)\\/"+i6)],[iW]:[RegExp(iW+"\\/"+i6)],[iG]:[RegExp("FxiOS\\/"+i6)],[i8]:[RegExp("Konqueror[:/]?"+i6,"i")],[iT]:[RegExp(iT+" "+i6),i4],[iJ]:[RegExp("android\\s"+i6,"i")],[iM]:[RegExp(iA+"\\/"+i6)],[ij]:[RegExp("(rv:|MSIE )"+i6)],Mozilla:[RegExp("rv:"+i6)]},sn=function(e,t){var i=sr[ss(e,t)];if(R(i))return null;for(var s=0;s<i.length;s++){var r=i[s],n=e.match(r);if(n)return parseFloat(n[n.length-2])}return null},sa=[[RegExp(iX+"; "+iX+" (.*?)[);]","i"),e=>[iX,e&&e[1]||""]],[RegExp(iz,"i"),[iz,""]],[RegExp(iY,"i"),[iY,""]],[st,[iT,""]],[RegExp(iZ,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[iQ,""];if(new RegExp(ik).test(t)&&!/IEMobile\b/.test(t))return[iZ+" "+ik,""];var i=/Windows NT ([0-9.]+)/i.exec(t);if(i&&i[1]){var s=si[i[1]]||"";return/arm/i.test(t)&&(s="RT"),[iZ,s]}return[iZ,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>e&&e[3]?["iOS",[e[3],e[4],e[5]||"0"].join(".")]:["iOS",""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t="";return e&&e.length>=3&&(t=R(e[2])?e[3]:e[2]),["watchOS",t]}],[RegExp("("+iS+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+iS+")","i"),e=>e&&e[2]?[iS,[e[2],e[3],e[4]||"0"].join(".")]:[iS,""]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var t=["Mac OS X",""];if(e&&e[1]){var i=[e[1],e[2],e[3]||"0"];t[1]=i.join(".")}return t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[iL,""]],[/Linux|debian/i,["Linux",""]]],so=function(e){return se.test(e)?iz:i9.test(e)?iY:i7.test(e)?iX:RegExp(i1,"i").test(e)?i1:RegExp("("+iQ+"|WPDesktop)","i").test(e)?iQ:/iPad/.test(e)?i$:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?iO:st.test(e)?iT:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":RegExp(i0,"i").test(e)?i0:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?!new RegExp(ik).test(e)||/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)?/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?iS:iF:iS:RegExp("(pda|"+ik+")","i").test(e)?i3:RegExp(iP,"i").test(e)&&!RegExp(iP+" pc","i").test(e)?i5:""},sl="https?://(.*)",sc=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],su=eI(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],sc),sh="<masked>",sd=["li_fat_id"];function sp(e,t,i){if(!o)return{};var s,r=t?eI([],sc,i||[]):[],n=sg(tH(o.URL,r,sh),e);return e$((s={},eF(sd,function(e){var t=t2.q(e);s[e]=t||null}),s),n)}function sg(e,t){var i=su.concat(t||[]),s={};return eF(i,function(t){var i=tj(e,t);s[t]=i||null}),s}function s_(e){var t=e?0===e.search(sl+"google.([^/?]*)")?"google":0===e.search(sl+"bing.com")?"bing":0===e.search(sl+"yahoo.com")?"yahoo":0===e.search(sl+"duckduckgo.com")?"duckduckgo":null:null,i={};if(!D(t)){i.$search_engine=t;var s=o?tj(o.referrer,"yahoo"!=t?"q":"p"):"";s.length&&(i.ph_keyword=s)}return i}function sv(){return navigator.language||navigator.userLanguage}function sf(){return(null==o?void 0:o.referrer)||"$direct"}function sm(e,t){var i=e?eI([],sc,t||[]):[],s=null==l?void 0:l.href.substring(0,1e3);return{r:sf().substring(0,1e3),u:s?tH(s,i,sh):void 0}}function sy(e){var t,{r:i,u:s}=e,r={$referrer:i,$referring_domain:null==i?void 0:"$direct"==i?"$direct":null==(t=tL(i))?void 0:t.host};
vendor: 6,644 bytes, line 1
1if(s){r.$current_url=s;var n=tL(s);r.$host=null==n?void 0:n.host,r.$pathname=null==n?void 0:n.pathname,e$(r,sg(s))}return i&&e$(r,s_(i)),r}function sb(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}}var sw=eE("[Web Vitals]");class sE{constructor(e){var t;this.Et=!1,this.P=!1,this.N={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.St=()=>{clearTimeout(this.kt),0!==this.N.metrics.length&&(this._instance.capture("$web_vitals",this.N.metrics.reduce((e,t)=>f({},e,{["$web_vitals_"+t.name+"_event"]:f({},t),["$web_vitals_"+t.name+"_value"]:t.value}),{})),this.N={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.Pt=e=>{var t,i=null==(t=this._instance.sessionManager)?void 0:t.checkAndGetSessionAndWindowId(!0);if(R(i))sw.error("Could not read session ID. Dropping metrics!");else{this.N=this.N||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var s=this.Tt();R(s)||(L(null==e?void 0:e.name)||L(null==e?void 0:e.value)?sw.error("Invalid metric received",e):this.It&&e.value>=this.It?sw.error("Ignoring metric with value >= "+this.It,e):(this.N.url!==s&&(this.St(),this.kt=setTimeout(this.St,this.flushToCaptureTimeoutMs)),R(this.N.url)&&(this.N.url=s),this.N.firstMetricTimestamp=R(this.N.firstMetricTimestamp)?Date.now():this.N.firstMetricTimestamp,e.attribution&&e.attribution.interactionTargetElement&&(e.attribution.interactionTargetElement=void 0),this.N.metrics.push(f({},e,{$current_url:s,$session_id:i.sessionId,$window_id:i.windowId,timestamp:Date.now()})),this.N.metrics.length===this.allowedMetrics.length&&this.St()))}},this.rt=()=>{var e,t,i,s,r=p.__PosthogExtensions__;R(r)||R(r.postHogWebVitalsCallbacks)||({onLCP:e,onCLS:t,onFCP:i,onINP:s}=r.postHogWebVitalsCallbacks),e&&t&&i&&s?(this.allowedMetrics.indexOf("LCP")>-1&&e(this.Pt.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&t(this.Pt.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&i(this.Pt.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&s(this.Pt.bind(this)),this.P=!0):sw.error("web vitals callbacks not loaded - not starting")},this._instance=e,this.Et=!(null==(t=this._instance.persistence)||!t.props[eW]),this.startIfEnabled()}get allowedMetrics(){var e,t,i=C(this._instance.config.capture_performance)?null==(e=this._instance.config.capture_performance)?void 0:e.web_vitals_allowed_metrics:void 0;return R(i)?(null==(t=this._instance.persistence)?void 0:t.props[ez])||["CLS","FCP","INP","LCP"]:i}get flushToCaptureTimeoutMs(){return(C(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals_delayed_flush_ms:void 0)||5e3}get It(){var e=C(this._instance.config.capture_performance)&&N(this._instance.config.capture_performance.__web_vitals_max_value)?this._instance.config.capture_performance.__web_vitals_max_value:9e5;return 0<e&&e<=6e4?9e5:e}get isEnabled(){var e=null==l?void 0:l.protocol;if("http:"!==e&&"https:"!==e)return sw.info("Web Vitals are disabled on non-http/https protocols"),!1;var t=C(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals:j(this._instance.config.capture_performance)?this._instance.config.capture_performance:void 0;return j(t)?t:this.Et}startIfEnabled(){this.isEnabled&&!this.P&&(sw.info("enabled, starting..."),this.it(this.rt))}onRemoteConfig(e){var t=C(e.capturePerformance)&&!!e.capturePerformance.web_vitals,i=C(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[eW]:t}),this._instance.persistence.register({[ez]:i})),this.Et=t,this.startIfEnabled()}it(e){var t,i;null!=(t=p.__PosthogExtensions__)&&t.postHogWebVitalsCallbacks&&e(),null==(i=p.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"web-vitals",t=>{t?sw.error("failed to load script",t):e()})}Tt(){var e=t?t.location.href:void 0;if(e){var i=this._instance.config.mask_personal_data_properties,s=this._instance.config.custom_personal_data_properties;return tH(e,i?eI([],sc,s||[]):[],sh)}sw.error("Could not determine current URL")}}var sx=eE("[Heatmaps]");function sk(e){return C(e)&&"clientX"in e&&"clientY"in e&&N(e.clientX)&&N(e.clientY)}class sS{constructor(e){var t;this.Et=!1,this.P=!1,this.Rt=null,this.instance=e,this.Et=!(null==(t=this.instance.persistence)||!t.props[eU]),this.rageclicks=new tA(e.config.rageclick)}get flushIntervalMilliseconds(){var e=5e3;return C(this.instance.config.capture_heatmaps)&&this.instance.config.capture_heatmaps.flush_interval_milliseconds&&(e=this.instance.config.capture_heatmaps.flush_interval_milliseconds),e}get isEnabled(){return R(this.instance.config.capture_heatmaps)?R(this.instance.config.enable_heatmaps)?this.Et:this.instance.config.enable_heatmaps:!1!==this.instance.config.capture_heatmaps}startIfEnabled(){if(this.isEnabled)this.P||(sx.info("starting..."),this.Ft(),this.Ct());else{var e;clearInterval(null!=(e=this.Rt)?e:void 0),this.Ot(),this.getAndClearBuffer()}}onRemoteConfig(e){var t=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[eU]:t}),this.Et=t,this.startIfEnabled()}getAndClearBuffer(){var e=this.N;return this.N=void 0,e}Mt(e){this.At(e.originalEvent,"deadclick")}Ct(){this.Rt&&clearInterval(this.Rt),this.Rt="visible"===(null==o?void 0:o.visibilityState)?setInterval(this.Dt.bind(this),this.flushIntervalMilliseconds):null}Ft(){t&&o&&(this.jt=this.Dt.bind(this),eD(t,"beforeunload",this.jt),this.Lt=e=>this.At(e||(null==t?void 0:t.event)),eD(o,"click",this.Lt,{capture:!0}),this.Nt=e=>this.Ut(e||(null==t?void 0:t.event)),eD(o,"mousemove",this.Nt,{capture:!0}),this.zt=new io(this.instance,ir,this.Mt.bind(this)),this.zt.startIfEnabled(),this.Ht=this.Ct.bind(this),eD(o,"visibilitychange",this.Ht),this.P=!0)}Ot(){var e;t&&o&&(this.jt&&t.removeEventListener("beforeunload",this.jt),this.Lt&&o.removeEventListener("click",this.Lt,{capture:!0}),this.Nt&&o.removeEventListener("mousemove",this.Nt,{capture:!0}),this.Ht&&o.removeEventListener("visibilitychange",this.Ht),clearTimeout(this.Bt),null==(e=this.zt)||e.stop(),this.P=!1)}qt(e,i){var s=this.instance.scrollManager.scrollY(),r=this.instance.scrollManager.scrollX(),n=this.instance.scrollManager.scrollElement(),a=function(e,i,s){for(var r=e;r&&ta(r)&&!to(r,"body")&&r!==s;){if(E(i,null==t?void 0:t.getComputedStyle(r).position))return!0;r=tm(r)}return!1}(t_(e),["fixed","sticky"],n);return{x:e.clientX+(a?0:r),y:e.clientY+(a?0:s),target_fixed:a,type:i}}At(e,t){var i;if(void 0===t&&(t="click"),!tn(e.target)&&sk(e)){var s=this.qt(e,t);null!=(i=this.rageclicks)&&i.isRageClick(e.clientX,e.clientY,(new Date).getTime())&&this.Wt(f({}
vendor: 6,369 bytes, line 1
1,s,{type:"rageclick"})),this.Wt(s)}}Ut(e){!tn(e.target)&&sk(e)&&(clearTimeout(this.Bt),this.Bt=setTimeout(()=>{this.Wt(this.qt(e,"mousemove"))},500))}Wt(e){if(t){var i=t.location.href,s=this.instance.config.mask_personal_data_properties,r=this.instance.config.custom_personal_data_properties,n=tH(i,s?eI([],sc,r||[]):[],sh);this.N=this.N||{},this.N[n]||(this.N[n]=[]),this.N[n].push(e)}}Dt(){this.N&&!T(this.N)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}}class sP{constructor(e){this._instance=e}doPageView(e,i){var s,r=this.Gt(e,i);return this.Vt={pathname:null!=(s=null==t?void 0:t.location.pathname)?s:"",pageViewId:i,timestamp:e},this._instance.scrollManager.resetContext(),r}doPageLeave(e){var t;return this.Gt(e,null==(t=this.Vt)?void 0:t.pageViewId)}doEvent(){var e;return{$pageview_id:null==(e=this.Vt)?void 0:e.pageViewId}}Gt(e,t){var i=this.Vt;if(!i)return{$pageview_id:t};var s={$pageview_id:t,$prev_pageview_id:i.pageViewId},r=this._instance.scrollManager.getContext();if(r&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:n,lastScrollY:a,maxScrollY:o,maxContentHeight:l,lastContentY:c,maxContentY:u}=r;if(!(R(n)||R(a)||R(o)||R(l)||R(c)||R(u))){n=Math.ceil(n),a=Math.ceil(a),o=Math.ceil(o),l=Math.ceil(l),c=Math.ceil(c),u=Math.ceil(u);var h=n<=1?1:G(a/n,0,1,ew),d=n<=1?1:G(o/n,0,1,ew),p=l<=1?1:G(c/l,0,1,ew),g=l<=1?1:G(u/l,0,1,ew);s=e$(s,{$prev_pageview_last_scroll:a,$prev_pageview_last_scroll_percentage:h,$prev_pageview_max_scroll:o,$prev_pageview_max_scroll_percentage:d,$prev_pageview_last_content:c,$prev_pageview_last_content_percentage:p,$prev_pageview_max_content:u,$prev_pageview_max_content_percentage:g})}}return i.pathname&&(s.$prev_pageview_pathname=i.pathname),i.timestamp&&(s.$prev_pageview_duration=(e.getTime()-i.timestamp.getTime())/1e3),s}}var sF=Uint8Array,s$=Uint16Array,sI=Uint32Array,sO=new sF([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]),sC=new sF([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]),sT=new sF([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),sR=function(e,t){for(var i=new s$(31),s=0;s<31;++s)i[s]=t+=1<<e[s-1];var r=new sI(i[30]);for(s=1;s<30;++s)for(var n=i[s];n<i[s+1];++n)r[n]=n-i[s]<<5|s;return[i,r]},sA=sR(sO,2),sM=sA[0],sD=sA[1];sM[28]=258,sD[258]=28;for(var sL=sR(sC,0)[1],sN=new s$(32768),sj=0;sj<32768;++sj){var sH=(43690&sj)>>>1|(21845&sj)<<1;sH=(61680&(sH=(52428&sH)>>>2|(13107&sH)<<2))>>>4|(3855&sH)<<4,sN[sj]=((65280&sH)>>>8|(255&sH)<<8)>>>1}var sU=function(e,t,i){for(var s=e.length,r=0,n=new s$(t);r<s;++r)++n[e[r]-1];var a,o=new s$(t);for(r=0;r<t;++r)o[r]=o[r-1]+n[r-1]<<1;if(i){a=new s$(1<<t);var l=15-t;for(r=0;r<s;++r)if(e[r])for(var c=r<<4|e[r],u=t-e[r],h=o[e[r]-1]++<<u,d=h|(1<<u)-1;h<=d;++h)a[sN[h]>>>l]=c}else for(a=new s$(s),r=0;r<s;++r)a[r]=sN[o[e[r]-1]++]>>>15-e[r];return a},sq=new sF(288);for(sj=0;sj<144;++sj)sq[sj]=8;for(sj=144;sj<256;++sj)sq[sj]=9;for(sj=256;sj<280;++sj)sq[sj]=7;for(sj=280;sj<288;++sj)sq[sj]=8;var sB=new sF(32);for(sj=0;sj<32;++sj)sB[sj]=5;var sV=sU(sq,9,0),sW=sU(sB,5,0),sG=function(e){return(e/8|0)+(7&e&&1)},sz=function(e,t,i){(null==i||i>e.length)&&(i=e.length);var s=new(e instanceof s$?s$:e instanceof sI?sI:sF)(i-t);return s.set(e.subarray(t,i)),s},sY=function(e,t,i){i<<=7&t;var s=t/8|0;e[s]|=i,e[s+1]|=i>>>8},sX=function(e,t,i){i<<=7&t;var s=t/8|0;e[s]|=i,e[s+1]|=i>>>8,e[s+2]|=i>>>16},sJ=function(e,t){for(var i=[],s=0;s<e.length;++s)e[s]&&i.push({s:s,f:e[s]});var r=i.length,n=i.slice();if(!r)return[new sF(0),0];if(1==r){var a=new sF(i[0].s+1);return a[i[0].s]=1,[a,1]}i.sort(function(e,t){return e.f-t.f}),i.push({s:-1,f:25001});var o=i[0],l=i[1],c=0,u=1,h=2;for(i[0]={s:-1,f:o.f+l.f,l:o,r:l};u!=r-1;)o=i[i[c].f<i[h].f?c++:h++],l=i[c!=u&&i[c].f<i[h].f?c++:h++],i[u++]={s:-1,f:o.f+l.f,l:o,r:l};var d=n[0].s;for(s=1;s<r;++s)n[s].s>d&&(d=n[s].s);var p=new s$(d+1),g=sK(i[u-1],p,0);if(g>t){s=0;var _=0,v=g-t,f=1<<v;for(n.sort(function(e,t){return p[t.s]-p[e.s]||e.f-t.f});s<r;++s){var m=n[s].s;if(!(p[m]>t))break;_+=f-(1<<g-p[m]),p[m]=t}for(_>>>=v;_>0;){var y=n[s].s;p[y]<t?_-=1<<t-p[y]++-1:++s}for(;s>=0&&_;--s){var b=n[s].s;p[b]==t&&(--p[b],++_)}g=t}return[new sF(p),g]},sK=function(e,t,i){return -1==e.s?Math.max(sK(e.l,t,i+1),sK(e.r,t,i+1)):t[e.s]=i},sZ=function(e){for(var t=e.length;t&&!e[--t];);for(var i=new s$(++t),s=0,r=e[0],n=1,a=function(e){i[s++]=e},o=1;o<=t;++o)if(e[o]==r&&o!=t)++n;else{if(!r&&n>2){for(;n>138;n-=138)a(32754);n>2&&(a(n>10?n-11<<5|28690:n-3<<5|12305),n=0)}else if(n>3){for(a(r),--n;n>6;n-=6)a(8304);n>2&&(a(n-3<<5|8208),n=0)}for(;n--;)a(r);n=1,r=e[o]}return[i.subarray(0,s),t]},sQ=function(e,t){for(var i=0,s=0;s<t.length;++s)i+=e[s]*t[s];return i},s0=function(e,t,i){var s=i.length,r=sG(t+2);e[r]=255&s,e[r+1]=s>>>8,e[r+2]=255^e[r],e[r+3]=255^e[r+1];for(var n=0;n<s;++n)e[r+n+4]=i[n];return 8*(r+4+s)},s1=function(e,t,i,s,r,n,a,o,l,c,u){sY(t,u++,i),++r[256];for(var h=sJ(r,15),d=h[0],p=h[1],g=sJ(n,15),_=g[0],v=g[1],f=sZ(d),m=f[0],y=f[1],b=sZ(_),w=b[0],E=b[1],x=new s$(19),k=0;k<m.length;++k)x[31&m[k]]++;for(k=0;k<w.length;++k)x[31&w[k]]++;for(var S=sJ(x,7),P=S[0],F=S[1],$=19;$>4&&!P[sT[$-1]];--$);var I,O,C,T,R=c+5<<3,A=sQ(r,sq)+sQ(n,sB)+a,M=sQ(r,d)+sQ(n,_)+a+14+3*$+sQ(x,P)+(2*x[16]+3*x[17]+7*x[18]);if(R<=A&&R<=M)return s0(t,u,e.subarray(l,l+c));if(sY(t,u,1+(M<A)),u+=2,M<A){I=sU(d,p,0),O=d,C=sU(_,v,0),T=_;var D=sU(P,F,0);for(sY(t,u,y-257),sY(t,u+5,E-1),sY(t,u+10,$-4),u+=14,k=0;k<$;++k)sY(t,u+3*k,P[sT[k]]);u+=3*$;for(var L=[m,w],N=0;N<2;++N){var j=L[N];for(k=0;k<j.length;++k){var H=31&j[k];sY(t,u,D[H]),u+=P[H],H>15&&(sY(t,u,j[k]>>>5&127),u+=j[k]>>>12)}}}else I=sV,O=sq,C=sW,T=sB;for(k=0;k<o;++k)if(s[k]>255){sX(t,u,I[(H=s[k]>>>18&31)+257]),u+=O[H+257],H>7&&(sY(t,u,s[k]>>>23&31),u+=sO[H]);var U=31&s[k];sX(t,u,C[U]),u+=T[U],U>3&&(sX(t,u,s[k]>>>5&8191),u+=sC[U])}else sX(t,u,I[s[k]]),u+=O[s[k]];return sX(t,u,I[256]),u+O[256]},s2=new sI([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),s3=function(){for(var e=new sI(256),t=0;t<256;++t){for(var i=t,s=9;--s;)i=(1&i&&0xedb88320)^i>>>1;e[t]=i}return e}(),s5=function(e,t,i){for(;i;++t)e[t]=i,i>>>=8},s8=function(e){var t,i,s,r,n="";for(t=i=0,s=(e=(e+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n")).length,r=0;r<s;r++){var a=e.charCodeAt(r),o=null;a<128?i++:o=a>127&&a<2048?String.fromCharCode(a>>6|192,63&a|128):String.fromCharCode(a>>12|224,a>>
16&63|128,63&a|128),D(o)||(i>t&&(n+=e.substring(t,i)),n+=o,t=i=r+1)}return i>t&&(n+=e.substring(t,e.length)),n},s6=!!u||!!c,s4="text/plain",s7=function(e,t,i){void 0===i&&(i=!0);var s,[r,n]=e.split("?"),a=f({},t),o=null!=(s=null==n?void 0:n.split("&").map(e=>{var t,[s,r]=e.split("="),n=i&&null!=(t=a[s])?t:r;return delete a[s],s+"="+n}))?s:[],l=tN(a);return l&&o.push(l),r+"?"+o.join("&")},s9=(e,t)=>JSON.stringify(e,(e,t)=>"bigint"==typeof t?t.toString():t,t),re=e=>{var{data:t,compression:i}=e;if(t){if(i===tD.GZipJS){var s,r,n,a,o,l,c,u,h=new Blob([(s=function(e){var t=e.length;if("u">typeof TextEncoder)return(new TextEncoder).encode(e);for(var i=new sF(e.length+(e.length>>>1)),s=0,r=function(e){i[s++]=e},n=0;n<t;++n){if(s+5>i.length){var a=new sF(s+8+(t-n<<1));a.set(i),i=a}var o=e.charCodeAt(n);o<128?r(o):(o<2048?r(192|o>>>6):(o>55295&&o<57344?(r(240|(o=65536+(1047552&o)|1023&e.charCodeAt(++n))>>>18),r(128|o>>>12&63)):r(224|o>>>12),r(128|o>>>6&63)),r(128|63&o))}return sz(i,0,s)}(s9(t)),r={mtime:0},n=0xffffffff,a={p:function(e){for(var t=n,i=0;i<e.length;++i)t=s3[255&t^e[i]]^t>>>8;n=t},d:function(){return 0xffffffff^n}},o=s.length,a.p(s),u=(l=10+(r.filename&&r.filename.length+1||0),c=function(e,t,i,s,r){var n=e.length,a=new sF(s+n+5*(1+Math.floor(n/7e3))+8),o=a.subarray(s,a.length-8),l=0;if(!t||n<8)for(var c=0;c<=n;c+=65535){var u=c+65535;u<n?l=s0(o,l,e.subarray(c,u)):(o[c]=r,l=s0(o,l,e.subarray(c,n)))}else{for(var h=s2[t-1],d=h>>>13,p=8191&h,g=(1<<i)-1,_=new s$(32768),v=new s$(g+1),f=Math.ceil(i/3),m=2*f,y=function(t){return(e[t]^e[t+1]<<f^e[t+2]<<m)&g},b=new sI(25e3),w=new s$(288),E=new s$(32),x=0,k=0,S=(c=0,0),P=0,F=0;c<n;++c){var $=y(c),I=32767&c,O=v[$];if(_[I]=O,v[$]=I,P<=c){var C=n-c;if((x>7e3||S>24576)&&C>423){l=s1(e,o,0,b,w,E,k,S,F,c-F,l),S=x=k=0,F=c;for(var T=0;T<286;++T)w[T]=0;for(T=0;T<30;++T)E[T]=0}var R=2,A=0,M=p,D=I-O&32767;if(C>2&&$==y(c-D))for(var L=Math.min(d,C)-1,N=Math.min(32767,c),j=Math.min(258,C);D<=N&&--M&&I!=O;){if(e[c+R]==e[c+R-D]){for(var H=0;H<j&&e[c+H]==e[c+H-D];++H);if(H>R){if(R=H,A=D,H>L)break;var U=Math.min(D,H-2),q=0;for(T=0;T<U;++T){var B=c-D+T+32768&32767,V=B-_[B]+32768&32767;V>q&&(q=V,O=B)}}}D+=(I=O)-(O=_[I])+32768&32767}if(A){b[S++]=0x10000000|sD[R]<<18|sL[A];var W=31&sD[R],G=31&sL[A];k+=sO[W]+sC[G],++w[257+W],++E[G],P=c+R,++x}else b[S++]=e[c],++w[e[c]]}}l=s1(e,o,r,b,w,E,k,S,F,c-F,l)}return sz(a,0,s+sG(l)+8)}(s,null==r.level?6:r.level,null==r.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):12+r.mem,l,!0)).length,function(e,t){var i=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:2*(9==t.level),e[9]=3,0!=t.mtime&&s5(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),i){e[3]=8;for(var s=0;s<=i.length;++s)e[s+10]=i.charCodeAt(s)}}
1(c,r),s5(c,u-8,a.d()),s5(c,u-4,o),c)],{type:s4});return{contentType:s4,body:h,estimatedSize:h.size}}if(i===tD.Base64){let e;var d="data="+encodeURIComponent("string"==typeof(e=function(e){var t,i,s,r,n,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=0,l=0,c="",u=[];if(!e)return e;e=s8(e);do t=(n=e.charCodeAt(o++)<<16|e.charCodeAt(o++)<<8|e.charCodeAt(o++))>>18&63,i=n>>12&63,s=n>>6&63,r=63&n,u[l++]=a.charAt(t)+a.charAt(i)+a.charAt(s)+a.charAt(r);while(o<e.length)switch(c=u.join(""),e.length%3){case 1:c=c.slice(0,-2)+"==";break;case 2:c=c.slice(0,-1)+"="}return c}(s9(t)))?e:s9(e));return{contentType:"application/x-www-form-urlencoded",body:d,estimatedSize:new Blob([d]).size}}var p=s9(t);return{contentType:"application/json",body:p,estimatedSize:new Blob([p]).size}}},rt=[];c&&rt.push({transport:"fetch",method:e=>{var t,i,{contentType:s,body:r,estimatedSize:n}=null!=(t=re(e))?t:{},a=new Headers;eF(e.headers,function(e,t){a.append(t,e)}),s&&a.append("Content-Type",s);var o=e.url,l=null;if(h){var u=new h;l={signal:u.signal,timeout:setTimeout(()=>u.abort(),e.timeout)}}c(o,f({method:(null==e?void 0:e.method)||"GET",headers:a,keepalive:"POST"===e.method&&52428.8>(n||0),body:r,signal:null==(i=l)?void 0:i.signal},e.fetchOptions)).then(t=>t.text().then(i=>{var s={statusCode:t.status,text:i};if(200===t.status)try{s.json=JSON.parse(i)}catch(e){ew.error(e)}null==e.callback||e.callback(s)})).catch(t=>{ew.error(t),null==e.callback||e.callback({statusCode:0,text:t})}).finally(()=>l?clearTimeout(l.timeout):null)}}),u&&rt.push({transport:"XHR",method:e=>{var t,i=new u;i.open(e.method||"GET",e.url,!0);var{contentType:s,body:r}=null!=(t=re(e))?t:{};eF(e.headers,function(e,t){i.setRequestHeader(t,e)}),s&&i.setRequestHeader("Content-Type",s),e.timeout&&(i.timeout=e.timeout),e.disableXHRCredentials||(i.withCredentials=!0),i.onreadystatechange=()=>{if(4===i.readyState){var t={statusCode:i.status,text:i.responseText};if(200===i.status)try{t.json=JSON.parse(i.responseText)}catch(e){}null==e.callback||e.callback(t)}},i.send(r)}}),null!=a&&a.sendBeacon&&rt.push({transport:"sendBeacon",method:e=>{var t=s7(e.url,{beacon:"1"});try{var i,{contentType:s,body:r}=null!=(i=re(e))?i:{},n="string"==typeof r?new Blob([r],{type:s}):r;a.sendBeacon(t,n)}catch(e){}}});var ri=function(e,t){if(!function(e){try{new RegExp(e)}catch(e){return!1}return!0}(t))return!1;try{return new RegExp(t).test(e)}catch(e){return!1}};function rs(e,t,i){return s9({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:i})}var rr={exact:(e,t)=>t.some(t=>e.some(e=>t===e)),is_not:(e,t)=>t.every(t=>e.every(e=>t!==e)),regex:(e,t)=>t.some(t=>e.some(e=>ri(t,e))),not_regex:(e,t)=>t.every(t=>e.every(e=>!ri(t,e))),icontains:(e,t)=>t.map(rn).some(t=>e.map(rn).some(e=>t.includes(e))),not_icontains:(e,t)=>t.map(rn).every(t=>e.map(rn).every(e=>!t.includes(e)))},rn=e=>e.toLowerCase(),ra=eE("[Error tracking]");class ro{constructor(e){var t,i;this.Jt=[],this.Kt=new Z([new ec,new ey,new eh,new eu,new ef,new ev,new ep,new em],function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];return function(t,s){void 0===s&&(s=0);for(var r=[],n=t.split("\n"),a=s;a<n.length;a++){var o=n[a];if(!(o.length>1024)){var l=el.test(o)?o.replace(el,"$1"):o;if(!l.match(/\S*Error: /)){for(var c of i){var u=c(l,e);if(u){r.push(u);break}}if(r.length>=50)break}}}if(!r.length)return[];var h=Array.from(r);return h.reverse(),h.slice(0,50).map(e=>f({},e,{filename:e.filename||(h[h.length-1]||{}).filename,function:e.function||"?"}))}}("web:javascript",er,eo)),this._instance=e,this.Jt=null!=(t=null==(i=this._instance.persistence)?void 0:i.get_property(eB))?t:[]}onRemoteConfig(e){var t,i,s,r=null!=(t=null==(i=e.errorTracking)?void 0:i.suppressionRules)?t:[],n=null==(s=e.errorTracking)?void 0:s.captureExtensionExceptions;this.Jt=r,this._instance.persistence&&this._instance.persistence.register({[eB]:this.Jt,[eV]:n}
vendor: 12,622 bytes, line 1
1)}get Yt(){var e,t=!!this._instance.get_property(eV),i=this._instance.config.error_tracking.captureExtensionExceptions;return null!=(e=null!=i?i:t)&&e}buildProperties(e,t){return this.Kt.buildFromUnknown(e,{syntheticException:null==t?void 0:t.syntheticException,mechanism:{handled:null==t?void 0:t.handled}})}sendExceptionEvent(e){var t=e.$exception_list;if(this.Xt(t)){if(this.Qt(t))return void ra.info("Skipping exception capture because a suppression rule matched");if(!this.Yt&&this.Zt(t))return void ra.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.ti(t))return void ra.info("Skipping exception capture because it was thrown by the PostHog SDK")}return this._instance.capture("$exception",e,{_noTruncate:!0,_batchKey:"exceptionEvent"})}Qt(e){if(0===e.length)return!1;var t=e.reduce((e,t)=>{var{type:i,value:s}=t;return A(i)&&i.length>0&&e.$exception_types.push(i),A(s)&&s.length>0&&e.$exception_values.push(s),e},{$exception_types:[],$exception_values:[]});return this.Jt.some(e=>{var i=e.values.map(e=>{var i,s=rr[e.operator],r=I(e.value)?e.value:[e.value],n=null!=(i=t[e.key])?i:[];return r.length>0&&s(r,n)});return"OR"===e.type?i.some(Boolean):i.every(Boolean)})}Zt(e){return e.flatMap(e=>{var t,i;return null!=(t=null==(i=e.stacktrace)?void 0:i.frames)?t:[]}).some(e=>e.filename&&e.filename.startsWith("chrome-extension://"))}ti(e){if(e.length>0){var t,i,s,r,n=null!=(t=null==(i=e[0].stacktrace)?void 0:i.frames)?t:[],a=n[n.length-1];return null!=(s=null==a||null==(r=a.filename)?void 0:r.includes("posthog.com/static"))&&s}return!1}Xt(e){return!L(e)&&I(e)}}var rl=eE("[FeatureFlags]"),rc=eE("[FeatureFlags]",{debugEnabled:!0}),ru="$active_feature_flags",rh="$override_feature_flags",rd="$feature_flag_payloads",rp="$override_feature_flag_payloads",rg="$feature_flag_request_id",r_=e=>{var t={};for(var[i,s]of eO(e||{}))s&&(t[i]=s);return t},rv=((nl={}).FeatureFlags="feature_flags",nl.Recordings="recordings",nl);class rf{constructor(e){this.ii=!1,this.ei=!1,this.ri=!1,this.si=!1,this.ni=!1,this.oi=!1,this.ai=!1,this._instance=e,this.featureFlagEventHandlers=[]}li(){var e=this._instance.config.evaluation_environments;return null!=e&&e.length?e.filter(e=>{var t=e&&"string"==typeof e&&e.trim().length>0;return t||rl.error("Invalid evaluation environment found:",e,"Expected non-empty string"),t}):[]}ui(){return this.li().length>0}flags(){if(this._instance.config.__preview_remote_config)this.oi=!0;else{var e=!this.hi&&(this._instance.config.advanced_disable_feature_flags||this._instance.config.advanced_disable_feature_flags_on_first_load);this.di({disableFlags:e})}}get hasLoadedFlags(){return this.ei}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var e=this._instance.get_property(eQ),t=this._instance.get_property(rh),i=this._instance.get_property(rp);if(!i&&!t)return e||{};var s=e$({},e||{});for(var r of[...new Set([...Object.keys(i||{}),...Object.keys(t||{})])]){var n,a,o=s[r],l=null==t?void 0:t[r],c=R(l)?null!=(n=null==o?void 0:o.enabled)&&n:!!l,u=R(l)?o.variant:"string"==typeof l?l:void 0,h=null==i?void 0:i[r],d=f({},o,{enabled:c,variant:c?null!=u?u:null==o?void 0:o.variant:void 0});c!==(null==o?void 0:o.enabled)&&(d.original_enabled=null==o?void 0:o.enabled),u!==(null==o?void 0:o.variant)&&(d.original_variant=null==o?void 0:o.variant),h&&(d.metadata=f({},null==o?void 0:o.metadata,{payload:h,original_payload:null==o||null==(a=o.metadata)?void 0:a.payload})),s[r]=d}return this.ii||(rl.warn(" Overriding feature flag details!",{flagDetails:e,overriddenPayloads:i,finalDetails:s}),this.ii=!0),s}getFlagVariants(){var e=this._instance.get_property(eK),t=this._instance.get_property(rh);if(!t)return e||{};for(var i=e$({},e),s=Object.keys(t),r=0;r<s.length;r++)i[s[r]]=t[s[r]];return this.ii||(rl.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:i}),this.ii=!0),i}getFlagPayloads(){var e=this._instance.get_property(rd),t=this._instance.get_property(rp);if(!t)return e||{};for(var i=e$({},e||{}),s=Object.keys(t),r=0;r<s.length;r++)i[s[r]]=t[s[r]];return this.ii||(rl.warn(" Overriding feature flag payloads!",{flagPayloads:e,overriddenPayloads:t,finalPayloads:i}),this.ii=!0),i}reloadFeatureFlags(){this.si||this._instance.config.advanced_disable_feature_flags||this.hi||(this.hi=setTimeout(()=>{this.di()},5))}vi(){clearTimeout(this.hi),this.hi=void 0}ensureFlagsLoaded(){this.ei||this.ri||this.hi||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this.si=e}di(e){var t;if(this.vi(),!this._instance.M())if(this.ri)this.ni=!0;else{var i={token:this._instance.config.token,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:f({},(null==(t=this._instance.persistence)?void 0:t.get_initial_props())||{},this._instance.get_property(e0)||{}),group_properties:this._instance.get_property(e1)};(null!=e&&e.disableFlags||this._instance.config.advanced_disable_feature_flags)&&(i.disable_flags=!0),this.ui()&&(i.evaluation_environments=this.li());var s=this._instance.config.__preview_remote_config,r=this._instance.config.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":"",n=this._instance.requestRouter.endpointFor("flags",(s?"/flags/?v=2":"/flags/?v=2&config=true")+r);s&&(i.timezone=sb()),this.ri=!0,this._instance.ci({method:"POST",url:n,data:i,compression:this._instance.config.disable_compression?void 0:tD.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:e=>{var t,s,r,n=!0;200===e.statusCode&&(this.ni||(this.$anon_distinct_id=void 0),n=!1),this.ri=!1,this.oi||(this.oi=!0,this._instance.fi(null!=(r=e.json)?r:{})),(!i.disable_flags||this.ni)&&((this.ai=!n,e.json&&null!=(s=e.json.quotaLimited)&&s.includes(rv.FeatureFlags))?rl.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset. Please visit https://posthog.com/docs/billing/limits-alerts to learn more."):(i.disable_flags||this.receivedFeatureFlags(null!=(t=e.json)?t:{},n),this.ni&&(this.ni=!1,this.di())))}})}}getFeatureFlag(e,t){if(void 0===t&&(t={}),this.ei||this.getFlags()&&this.getFlags().length>0){var i=this.getFlagVariants()[e],s=""+i,r=this._instance.get_property(rg)||void 0,n=this._instance.get_property(e5)||{};if((t.send_event||!("send_event"in t))&&(!(e in n)||!n[e].includes(s))){I(n[e])?n[e].push(s):n[e]=[s],null==(l=this._instance.persistence)||l.register({[e5]:n});var a=this.getFeatureFlagDetails(e),o={$feature_flag:e,$feature_flag_response:i,$feature_flag_payload:this.getFeatureFlagPayload(e)||null,$feature_flag_request_id:r,$feature_flag_bootstrapped_response:(null==(c=this._instance.config.bootstrap)||null==(c=c.featureFlags)?void 0:c[e])||null,$feature_flag_bootstrapped_payload:(null==(u=this._instance.config.bootstrap)||null==(u=u.featureFlagPayloads)?void 0:u[e])||null,$used_bootstrap_value:!this.ai};R(null==a||null==(h=a.metadata)?void 0:h.version)||(o.$feature_flag_version=a.metadata.version);var l,c,u,h,d,p,g,_,v,f,m=null!=(d=null==a||null==(p=a.reason)?void 0:p.description)?d:null==a||null==(g=a.reason)?void 0:g.code;m&&(o.$feature_flag_reason=m),null!=a&&null!=(_=a.metadata)&&_.id&&(o.$feature_flag_id=a.metadata.id),R(null==a?void 0:a.original_variant)&&R(null==a?void 0:a.original_enabled)||(o.$feature_flag_original_response=R(a.original_variant)?a.original_enabled:a.original_variant),null!=a&&null!=(v=a.metadata)&&v.original_payload&&(o.$feature_flag_original_payload=null==a||null==(f=a.metadata)?void 0:f.original_payload),this._instance.capture("$feature_flag_called",o)}return i}rl.warn('getFeatureFlag for key "'+e+"\" failed. Feature flags didn't load in time.")}getFeatureFlagDetails(e){return this.getFlagsWithDetails()[e]}getFeatureFlagPayload(e){return this.getFlagPayloads()[e]}getRemoteConfigPayload(e,t){var i=this._instance.config.token,s={distinct_id:this._instance.get_distinct_id(),token:i};this.ui()&&(s.evaluation_environments=this.li()),this._instance.ci({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2&config=true"),data:s,compression:this._instance.config.disable_compression?void 0:tD.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:i=>{var s,r=null==(s=i.json)?void 0:s.featureFlagPayloads;t((null==r?void 0:r[e])||void 0)}})}isFeatureEnabled(e,t){if(void 0===t&&(t={}),this.ei||this.getFlags()&&this.getFlags().length>0){var i=this.getFeatureFlag(e,t);return R(i)?void 0:!!i}rl.warn('isFeatureEnabled for key "'+e+"\" failed. Feature flags didn't load in time.")}addFeatureFlagsHandler(e){this.featureFlagEventHandlers.push(e)}removeFeatureFlagsHandler(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(t=>t!==e)}receivedFeatureFlags(e,t){if(this._instance.persistence){this.ei=!0;var i=this.getFlagVariants(),s=this.getFlagPayloads(),r=this.getFlagsWithDetails();!function(e,t,i,s,r){void 0===i&&(i={}),void 0===s&&(s={}),void 0===r&&(r={});var n,a=((n=e.flags)?(e.featureFlags=Object.fromEntries(Object.keys(n).map(e=>{var t;return[e,null!=(t=n[e].variant)?t:n[e].enabled]})),e.featureFlagPayloads=Object.fromEntries(Object.keys(n).filter(e=>n[e].enabled).filter(e=>{var t;return null==(t=n[e].metadata)?void 0:t.payload}).map(e=>{var t;return[e,null==(t=n[e].metadata)?void 0:t.payload]}))):rl.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),e),o=a.flags,l=a.featureFlags,c=a.featureFlagPayloads;if(l){var u=e.requestId;if(I(l)){rl.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var h={};if(l)for(var d=0;d<l.length;d++)h[l[d]]=!0;t&&t.register({[ru]:l,[eK]:h})}else{var p=l,g=c,_=o;e.errorsWhileComputingFlags&&(p=f({},i,p),g=f({},s,g),_=f({},r,_)),t&&t.register(f({[ru]:Object.keys(r_(p)),[eK]:p||{},[rd]:g||{},[eQ]:_||{}},u?{[rg]:u}:{}))}}}(e,this._instance.persistence,i,s,r),this.pi(t)}}override(e,t){void 0===t&&(t=!1),rl.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:e,suppressWarning:t})}overrideFeatureFlags(e){if(!this._instance.__loaded||!this._instance.persistence)return rl.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(!1===e)return this._instance.persistence.unregister(rh),this._instance.persistence.unregister(rp),this.pi(),rc.info("All overrides cleared");if(e&&"object"==typeof e&&("flags"in e||"payloads"in e)){var t;if(this.ii=!!(null!=(t=e.suppressWarning)&&t),"flags"in e){if(!1===e.flags)this._instance.persistence.unregister(rh),rc.info("Flag overrides cleared");else if(e.flags){if(I(e.flags)){for(var i={},s=0;s<e.flags.length;s++)i[e.flags[s]]=!0;this._instance.persistence.register({[rh]:i})}else this._instance.persistence.register({[rh]:e.flags});rc.info("Flag overrides set",{flags:e.flags})}}return"payloads"in e&&(!1===e.payloads?(this._instance.persistence.unregister(rp),rc.info("Payload overrides cleared")):e.payloads&&(this._instance.persistence.register({[rp]:e.payloads}),rc.info("Payload overrides set",{payloads:e.payloads}))),void this.pi()}this.pi()}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.ei){var{flags:t,flagVariants:i}=this.gi();e(t,i)}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,t,i){var s,r=(this._instance.get_property(eZ)||[]).find(t=>t.flagKey===e),n={["$feature_enrollment/"+e]:t},a={$feature_flag:e,$feature_enrollment:t,$set:n};r&&(a.$early_access_feature_name=r.name),i&&(a.$feature_enrollment_stage=i),this._instance.capture("$feature_enrollment_update",a),this.setPersonPropertiesForFlags(n,!1);var o=f({},this.getFlagVariants(),{[e]:t});null==(s=this._instance.persistence)||s.register({[ru]:Object.keys(r_(o)),[eK]:o}),this.pi()}getEarlyAccessFeatures(e,t,i){void 0===t&&(t=!1);var s=this._instance.get_property(eZ),r=i?"&"+i.map(e=>"stage="+e).join("&"):"";if(s&&!t)return e(s);this._instance.ci({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this._instance.config.token+r),method:"GET",callback:t=>{var i,s;if(t.json){var r=t.json.earlyAccessFeatures;return null==(i=this._instance.persistence)||i.unregister(eZ),null==(s=this._instance.persistence)||s.register({[eZ]:r}),e(r)}}})}gi(){var e=this.getFlags(),t=this.getFlagVariants();return{flags:e.filter(e=>t[e]),flagVariants:Object.keys(t).filter(e=>t[e]).reduce((e,i)=>(e[i]=t[i],e),{})}}pi(e){var{flags:t,flagVariants:i}=this.gi();
1this.featureFlagEventHandlers.forEach(s=>s(t,i,{errorsLoading:e}))}setPersonPropertiesForFlags(e,t){void 0===t&&(t=!0);var i=this._instance.get_property(e0)||{};this._instance.register({[e0]:f({},i,e)}),t&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister(e0)}setGroupPropertiesForFlags(e,t){void 0===t&&(t=!0);var i=this._instance.get_property(e1)||{};0!==Object.keys(i).length&&Object.keys(i).forEach(t=>{i[t]=f({},i[t],e[t]),delete e[t]}),this._instance.register({[e1]:f({},i,e)}),t&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){var t=this._instance.get_property(e1)||{};this._instance.register({[e1]:f({},t,{[e]:{}})})}else this._instance.unregister(e1)}reset(){this.ei=!1,this.ri=!1,this.si=!1,this.ni=!1,this.oi=!1,this.ai=!1,this.$anon_distinct_id=void 0,this.vi(),this.ii=!1}}var rm=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"];class ry{constructor(e,t){this.F=e,this.props={},this.mi=!1,this.yi=(e=>{var t="";return e.token&&(t=e.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),e.persistence_name?"ph_"+e.persistence_name:"ph_"+t+"_posthog"})(e),this.Y=this.bi(e),this.load(),e.debug&&ew.info("Persistence loaded",e.persistence,f({},this.props)),this.update_config(e,e,t),this.save()}isDisabled(){return!!this.wi}bi(e){-1===rm.indexOf(e.persistence.toLowerCase())&&(ew.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var t=e.persistence.toLowerCase();return"localstorage"===t&&t5.H()?t5:"localstorage+cookie"===t&&t6.H()?t6:"sessionstorage"===t&&ie.H()?ie:"memory"===t?t7:"cookie"===t?t2:t6.H()?t6:t2}properties(){var e={};return eF(this.props,function(t,i){if(i===eK&&C(t))for(var s,r=Object.keys(t),a=0;a<r.length;a++)e["$feature/"+r[a]]=t[r[a]];else s=!1,(D(tr)?s:n&&tr.indexOf===n?-1!=tr.indexOf(i):(eF(tr,function(e){if(s||(s=e===i))return eS}),s))||(e[i]=t)}),e}load(){if(!this.wi){var e=this.Y.W(this.yi);e&&(this.props=e$({},e))}}save(){this.wi||this.Y.G(this.yi,this.props,this.xi,this.$i,this.Ei,this.F.debug)}remove(){this.Y.V(this.yi,!1),this.Y.V(this.yi,!0)}clear(){this.remove(),this.props={}}register_once(e,t,i){if(C(e)){R(t)&&(t="None"),this.xi=R(i)?this.Si:i;var s=!1;if(eF(e,(e,i)=>{this.props.hasOwnProperty(i)&&this.props[i]!==t||(this.props[i]=e,s=!0)}),s)return this.save(),!0}return!1}register(e,t){if(C(e)){this.xi=R(t)?this.Si:t;var i=!1;if(eF(e,(t,s)=>{e.hasOwnProperty(s)&&this.props[s]!==t&&(this.props[s]=t,i=!0)}),i)return this.save(),!0}return!1}unregister(e){e in this.props&&(delete this.props[e],this.save())}update_campaign_params(){if(!this.mi){var e=sp(this.F.custom_campaign_params,this.F.mask_personal_data_properties,this.F.custom_personal_data_properties);T(eR(e))||this.register(e),this.mi=!0}}update_search_keyword(){var e;this.register((e=null==o?void 0:o.referrer)?s_(e):{})}update_referrer_info(){var e;this.register_once({$referrer:sf(),$referring_domain:null!=o&&o.referrer&&(null==(e=tL(o.referrer))?void 0:e.host)||"$direct"},void 0)}set_initial_person_info(){this.props[e7]||this.props[e9]||this.register_once({[te]:sm(this.F.mask_personal_data_properties,this.F.custom_personal_data_properties)},void 0)}get_initial_props(){var e={};eF([e9,e7],t=>{var i=this.props[t];i&&eF(i,function(t,i){e["$initial_"+k(i)]=t})});var t,i,s=this.props[te];return s&&e$(e,(t=sy(s),i={},eF(t,function(e,t){i["$initial_"+k(t)]=e}),i)),e}safe_merge(e){return eF(this.props,function(t,i){i in e||(e[i]=t)}),e}update_config(e,t,i){if(this.Si=this.xi=e.cookie_expiration,this.set_disabled(e.disable_persistence||!!i),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie),e.persistence!==t.persistence){var s=this.bi(e),r=this.props;this.clear(),this.Y=s,this.props=r,this.save()}}set_disabled(e){this.wi=e,this.wi?this.remove():this.save()}set_cross_subdomain(e){e!==this.$i&&(this.$i=e,this.remove(),this.save())}set_secure(e){e!==this.Ei&&(this.Ei=e,this.remove(),this.save())}set_event_timer(e,t){var i=this.props[ej]||{};i[e]=t,this.props[ej]=i,this.save()}remove_event_timer(e){var t=(this.props[ej]||{})[e];return R(t)||(delete this.props[ej][e],this.save()),t}get_property(e){return this.props[e]}set_property(e,t){this.props[e]=t,this.save()}}(nc={}).Button="button",nc.Tab="tab",nc.Selector="selector",(nu={}).TopLeft="top_left",nu.TopRight="top_right",nu.TopCenter="top_center",nu.MiddleLeft="middle_left",nu.MiddleRight="middle_right",nu.MiddleCenter="middle_center",nu.Left="left",nu.Center="center",nu.Right="right",nu.NextToTrigger="next_to_trigger",(nh={}).Top="top",nh.Left="left",nh.Right="right",nh.Bottom="bottom";var rb=((nd={}).Popover="popover",nd.API="api",nd.Widget="widget",nd.ExternalSurvey="external_survey",n
1d),rw=((np={}).Open="open",np.MultipleChoice="multiple_choice",np.SingleChoice="single_choice",np.Rating="rating",np.Link="link",(ng={}).NextQuestion="next_question",ng.End="end",ng.ResponseBased="response_based",ng.SpecificQuestion="specific_question",(n_={}).Once="once",n_.Recurring="recurring",n_.Always="always",(nv={}).SHOWN="survey shown",nv.DISMISSED="survey dismissed",nv.SENT="survey sent",nv),rE=((nf={}).SURVEY_ID="$survey_id",nf.SURVEY_NAME="$survey_name",nf.SURVEY_RESPONSE="$survey_response",nf.SURVEY_ITERATION="$survey_iteration",nf.SURVEY_ITERATION_START_DATE="$survey_iteration_start_date",nf.SURVEY_PARTIALLY_COMPLETED="$survey_partially_completed",nf.SURVEY_SUBMISSION_ID="$survey_submission_id",nf.SURVEY_QUESTIONS="$survey_questions",nf.SURVEY_COMPLETED="$survey_completed",nf),rx=((nm={}).Popover="popover",nm.Inline="inline",nm);class rk{constructor(){this.ki={},this.ki={}}on(e,t){return this.ki[e]||(this.ki[e]=[]),this.ki[e].push(t),()=>{this.ki[e]=this.ki[e].filter(e=>e!==t)}}emit(e,t){for(var i of this.ki[e]||[])i(t);for(var s of this.ki["*"]||[])s(e,t)}}class rS{constructor(e){this.Pi=new rk,this.Ti=(e,t)=>this.Ii(e,t)&&this.Ri(e,t)&&this.Fi(e,t),this.Ii=(e,t)=>null==t||!t.event||(null==e?void 0:e.event)===(null==t?void 0:t.event),this._instance=e,this.Ci=new Set,this.Oi=new Set}init(){var e,t;R(null==(e=this._instance)?void 0:e.Mi)||null==(t=this._instance)||t.Mi((e,t)=>{this.on(e,t)})}register(e){var t,i;if(!R(null==(t=this._instance)?void 0:t.Mi)&&(e.forEach(e=>{var t,i;null==(t=this.Oi)||t.add(e),null==(i=e.steps)||i.forEach(e=>{var t;null==(t=this.Ci)||t.add((null==e?void 0:e.event)||"")})}),null!=(i=this._instance)&&i.autocapture)){var s,r=new Set;e.forEach(e=>{var t;null==(t=e.steps)||t.forEach(e=>{null!=e&&e.selector&&r.add(null==e?void 0:e.selector)})}),null==(s=this._instance)||s.autocapture.setElementSelectors(r)}}on(e,t){var i;null!=t&&0!=e.length&&(this.Ci.has(e)||this.Ci.has(null==t?void 0:t.event))&&this.Oi&&(null==(i=this.Oi)?void 0:i.size)>0&&this.Oi.forEach(e=>{this.Ai(t,e)&&this.Pi.emit("actionCaptured",e.name)})}Di(e){this.onAction("actionCaptured",t=>e(t))}Ai(e,t){if(null==(null==t?void 0:t.steps))return!1;for(var i of t.steps)if(this.Ti(e,i))return!0;return!1}onAction(e,t){return this.Pi.on(e,t)}Ri(e,t){if(null!=t&&t.url){var i,s=null==e||null==(i=e.properties)?void 0:i.$current_url;if(!s||"string"!=typeof s||!rS.ji(s,null==t?void 0:t.url,(null==t?void 0:t.url_matching)||"contains"))return!1}return!0}static ji(e,i,s){switch(s){case"regex":return!!t&&ri(e,i);case"exact":return i===e;case"contains":return ri(e,rS.Li(i).replace(/_/g,".").replace(/%/g,".*"));default:return!1}}static Li(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}Fi(e,t){if((null!=t&&t.href||null!=t&&t.tag_name||null!=t&&t.text)&&!this.Ni(e).some(e=>!(null!=t&&t.href&&!rS.ji(e.href||"",null==t?void 0:t.href,(null==t?void 0:t.href_matching)||"exact"))&&(null==t||!t.tag_name||e.tag_name===(null==t?void 0:t.tag_name))&&!(null!=t&&t.text&&!rS.ji(e.text||"",null==t?void 0:t.text,(null==t?void 0:t.text_matching)||"exact")&&!rS.ji(e.$el_text||"",null==t?void 0:t.text,(null==t?void 0:t.text_matching)||"exact"))))return!1;if(null!=t&&t.selector){var i,s=null==e||null==(i=e.properties)?void 0:i.$element_selectors;if(!s||!s.includes(null==t?void 0:t.selector))return!1}return!0}Ni(e){return null==(null==e?void 0:e.properties.$elements)?[]:null==e?void 0:e.properties.$elements}}var rP=eE("[Surveys]"),rF="seenSurvey_",r$=e=>{var t=""+rF+e.id;return e.current_iteration&&e.current_iteration>0&&(t=""+rF+e.id+"_"+e.current_iteration),t},rI=[rb.Popover,rb.Widget,rb.API],rO={ignoreConditions:!1,ignoreDelay:!1,displayType:rx.Popover};class rC{constructor(e){this._instance=e,this.Ui=new Map,this.zi=new Map}register(e){var t;R(null==(t=this._instance)?void 0:t.Mi)||(this.Hi(e),this.Bi(e))}Bi(e){var t=e.filter(e=>{var t,i;return(null==(t=e.conditions)?void 0:t.actions)&&(null==(i=e.conditions)||null==(i=i.actions)||null==(i=i.values)?void 0:i.length)>0});0!==t.length&&(null==this.qi&&(this.qi=new rS(this._instance),this.qi.init(),this.qi.Di(e=>{this.onAction(e)}
1)),t.forEach(e=>{var t,i,s,r,n;e.conditions&&null!=(t=e.conditions)&&t.actions&&null!=(i=e.conditions)&&null!=(i=i.actions)&&i.values&&(null==(s=e.conditions)||null==(s=s.actions)||null==(s=s.values)?void 0:s.length)>0&&(null==(r=this.qi)||r.register(e.conditions.actions.values),null==(n=e.conditions)||null==(n=n.actions)||null==(n=n.values)||n.forEach(t=>{if(t&&t.name){var i=this.zi.get(t.name);i&&i.push(e.id),this.zi.set(t.name,i||[e.id])}}))}))}Hi(e){var t;0!==e.filter(e=>{var t,i;return(null==(t=e.conditions)?void 0:t.events)&&(null==(i=e.conditions)||null==(i=i.events)||null==(i=i.values)?void 0:i.length)>0}).length&&(null==(t=this._instance)||t.Mi((e,t)=>{this.onEvent(e,t)}),e.forEach(e=>{var t;null==(t=e.conditions)||null==(t=t.events)||null==(t=t.values)||t.forEach(t=>{if(t&&t.name){var i=this.Ui.get(t.name);i&&i.push(e.id),this.Ui.set(t.name,i||[e.id])}})}))}onEvent(e,t){var i,s,r=(null==(i=this._instance)||null==(i=i.persistence)?void 0:i.props[e3])||[];if(rw.SHOWN===e&&t&&r.length>0){rP.info("survey event matched, removing survey from activated surveys",{event:e,eventPayload:t,existingActivatedSurveys:r});var n,a=null==t||null==(n=t.properties)?void 0:n.$survey_id;if(a){var o=r.indexOf(a);o>=0&&(r.splice(o,1),this.Wi(r))}}else if(this.Ui.has(e)){rP.info("survey event name matched",{event:e,eventPayload:t,surveys:this.Ui.get(e)});var l=[];null==(s=this._instance)||s.getSurveys(t=>{l=t.filter(t=>{var i;return null==(i=this.Ui.get(e))?void 0:i.includes(t.id)})});var c=l.filter(i=>{var s,r=null==(s=i.conditions)||null==(s=s.events)||null==(s=s.values)?void 0:s.find(t=>t.name===e);return!!r&&(!r.propertyFilters||Object.entries(r.propertyFilters).every(e=>{var i,[s,r]=e,n=null==t||null==(i=t.properties)?void 0:i[s];if(R(n)||D(n))return!1;var a=[String(n)],o=rr[r.operator];return o?o(r.values,a):(rP.warn("Unknown property comparison operator: "+r.operator),!1)}))});this.Wi(r.concat(c.map(e=>e.id)||[]))}}onAction(e){var t,i=(null==(t=this._instance)||null==(t=t.persistence)?void 0:t.props[e3])||[];this.zi.has(e)&&this.Wi(i.concat(this.zi.get(e)||[]))}Wi(e){var t;rP.info("updating activated surveys",{activatedSurveys:e}),null==(t=this._instance)||null==(t=t.persistence)||t.register({[e3]:[...new Set(e)]})}getSurveys(){var e;return(null==(e=this._instance)||null==(e=e.persistence)?void 0:e.props[e3])||[]}getEventToSurveys(){return this.Ui}Gi(){return this.qi}}class rT{constructor(e){this.Vi=void 0,this._surveyManager=null,this.Ji=!1,this.Ki=!1,this.Yi=[],this._instance=e,this._surveyEventReceiver=null}onRemoteConfig(e){if(!this._instance.config.disable_surveys){var t=e.surveys;if(L(t))return rP.warn("Flags not loaded yet. Not loading surveys.");var i=I(t);this.Vi=i?t.length>0:t,rP.info("flags response received, isSurveysEnabled: "+this.Vi),this.loadIfEnabled()}}reset(){localStorage.removeItem("lastSeenSurveyDate");for(var e=[],t=0;t<localStorage.length;t++){var i=localStorage.key(t);(null!=i&&i.startsWith(rF)||null!=i&&i.startsWith("inProgressSurvey_"))&&e.push(i)}e.forEach(e=>localStorage.removeItem(e))}loadIfEnabled(){if(!this._surveyManager)if(this.Ki)rP.info("Already initializing surveys, skipping...");else if(this._instance.config.disable_surveys)rP.info("Disabled. Not loading surveys.");else if(this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())rP.info("Not loading surveys in cookieless mode without consent.");else{var e=null==p?void 0:p.__PosthogExtensions__;if(e){if(!R(this.Vi)||this._instance.config.advanced_enable_surveys){var t=this.Vi||this._instance.config.advanced_enable_surveys;this.Ki=!0;try{var i=e.generateSurveys;if(i)return void this.Xi(i,t);var s=e.loadExternalDependency;if(!s)return void this.Qi("PostHog loadExternalDependency extension not found.");s(this._instance,"surveys",i=>{i||!e.generateSurveys?this.Qi("Could not load surveys script",i):this.Xi(e.generateSurveys,t)})}catch(e){throw this.Qi("Error initializing surveys",e),e}finally{this.Ki=!1}}}else rP.error("PostHog Extensions not found.")}}Xi(e,t){this._surveyManager=e(this._instance,t),this._surveyEventReceiver=new rC(this._instance),rP.info("Surveys loaded successfully"),this.Zi({isLoaded:!0})}Qi(e,t){rP.error(e,t),this.Zi({isLoaded:!1,error:e})}onSurveysLoaded(e){return this.Yi.push(e),this._surveyManager&&this.Zi({isLoaded:!0}),()=>{this.Yi=this.Yi.filter(t=>t!==e)}}getSurveys(e,t){if(void 0===t&&(t=!1),this._instance.config.disable_surveys)return rP.info("Disabled. Not loading surveys."),e([]);var i=this._instance.get_property(e2);if(i&&!t)return e(i,{isLoaded:!0});if(this.Ji)return e([],{isLoaded:!1,error:"Surveys are already being loaded"});try{this.Ji=!0,this._instance.ci({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this._instance.config.token),method:"GET",timeout:this._instance.config.surveys_request_timeout_ms,callback:t=>{this.Ji=!1;var i=t.statusCode;if(200!==i||!t.json){var s="Surveys API could not be loaded, status: "+i;return rP.error(s),e([],{isLoaded:!1,error:s})}var r,n,a=t.json.surveys||[],o=a.filter(e=>{var t,i;return!(!e.start_date||e.end_date)&&(!(null==(t=e.conditions)||null==(t=t.events)||null==(t=t.values)||!t.length)||!(null==(i=e.conditions)||null==(i=i.actions)||null==(i=i.values)||!i.length))});return o.length>0&&(null==(n=this._surveyEventReceiver)||n.register(o)),null==(r=this._instance.persistence)||r.register({[e2]:a}),e(a,{isLoaded:!0})}})}catch(e){throw this.Ji=!1,e}}
vendor: 7,545 bytes, line 1
1Zi(e){for(var t of this.Yi)try{if(!e.isLoaded)return t([],e);this.getSurveys(t)}catch(e){rP.error("Error in survey callback",e)}}getActiveMatchingSurveys(e,t){if(void 0===t&&(t=!1),!L(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,t);rP.warn("init was not called")}te(e){var t=null;return this.getSurveys(i=>{var s;t=null!=(s=i.find(t=>t.id===e))?s:null}),t}ie(e){if(L(this._surveyManager))return{eligible:!1,reason:"SDK is not enabled or survey functionality is not yet loaded"};var t="string"==typeof e?this.te(e):e;return t?this._surveyManager.checkSurveyEligibility(t):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(e){if(L(this._surveyManager))return rP.warn("init was not called"),{visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"};var t=this.ie(e);return{visible:t.eligible,disabledReason:t.reason}}canRenderSurveyAsync(e,t){return L(this._surveyManager)?(rP.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"})):new Promise(i=>{this.getSurveys(t=>{var s,r=null!=(s=t.find(t=>t.id===e))?s:null;if(r){var n=this.ie(r);i({visible:n.eligible,disabledReason:n.reason})}else i({visible:!1,disabledReason:"Survey not found"})},t)})}renderSurvey(e,t){var i;if(L(this._surveyManager))rP.warn("init was not called");else{var s="string"==typeof e?this.te(e):e;if(null!=s&&s.id)if(rI.includes(s.type)){var r=null==o?void 0:o.querySelector(t);if(r)return null!=(i=s.appearance)&&i.surveyPopupDelaySeconds?(rP.info("Rendering survey "+s.id+" with delay of "+s.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout(()=>{var e,t;rP.info("Rendering survey "+s.id+" with delay of "+(null==(e=s.appearance)?void 0:e.surveyPopupDelaySeconds)+" seconds"),null==(t=this._surveyManager)||t.renderSurvey(s,r),rP.info("Survey "+s.id+" rendered")},1e3*s.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(s,r);rP.warn("Survey element not found")}else rP.warn("Surveys of type "+s.type+" cannot be rendered in the app");else rP.warn("Survey not found")}}displaySurvey(e,t){var i;if(L(this._surveyManager))rP.warn("init was not called");else{var s=this.te(e);if(s){var r=s;if(null!=(i=s.appearance)&&i.surveyPopupDelaySeconds&&t.ignoreDelay&&(r=f({},s,{appearance:f({},s.appearance,{surveyPopupDelaySeconds:0})})),!1===t.ignoreConditions){var n=this.canRenderSurvey(s);if(!n.visible)return void rP.warn("Survey is not eligible to be displayed: ",n.disabledReason)}t.displayType!==rx.Inline?this._surveyManager.handlePopoverSurvey(r):this.renderSurvey(r,t.selector)}else rP.warn("Survey not found")}}}var rR=eE("[RateLimiter]");class rA{constructor(e){var t,i;this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=e=>{var t=e.text;if(t&&t.length)try{(JSON.parse(t).quota_limited||[]).forEach(e=>{rR.info((e||"events")+" is quota limited."),this.serverLimits[e]=(new Date).getTime()+6e4})}catch(e){return void rR.warn('could not rate limit - continuing. Error: "'+(null==e?void 0:e.message)+'"',{text:t})}},this.instance=e,this.captureEventsPerSecond=(null==(t=e.config.rate_limiting)?void 0:t.events_per_second)||10,this.captureEventsBurstLimit=Math.max((null==(i=e.config.rate_limiting)?void 0:i.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond),this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}clientRateLimitContext(e){void 0===e&&(e=!1);var t,i,s,r=(new Date).getTime(),n=null!=(t=null==(i=this.instance.persistence)?void 0:i.get_property(e4))?t:{tokens:this.captureEventsBurstLimit,last:r};n.tokens+=(r-n.last)/1e3*this.captureEventsPerSecond,n.last=r,n.tokens>this.captureEventsBurstLimit&&(n.tokens=this.captureEventsBurstLimit);var a=n.tokens<1;return a||e||(n.tokens=Math.max(0,n.tokens-1)),!a||this.lastEventRateLimited||e||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+this.captureEventsPerSecond+" events per second and "+this.captureEventsBurstLimit+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=a,null==(s=this.instance.persistence)||s.set_property(e4,n),{isRateLimited:a,remainingTokens:n.tokens}}isServerRateLimited(e){var t=this.serverLimits[e||"events"]||!1;return!1!==t&&(new Date).getTime()<t}}var rM=eE("[RemoteConfig]");class rD{constructor(e){this._instance=e}get remoteConfig(){var e;return null==(e=p._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.config}ee(e){var t,i;null!=(t=p.__PosthogExtensions__)&&t.loadExternalDependency?null==(i=p.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"remote-config",()=>e(this.remoteConfig)):(rM.error("PostHog Extensions not found. Cannot load remote config."),e())}re(e){this._instance.ci({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback:t=>{e(t.json)}})}load(){try{if(this.remoteConfig)return rM.info("Using preloaded remote config",this.remoteConfig),void this.fi(this.remoteConfig);if(this._instance.M())return void rM.warn("Remote config is disabled. Falling back to local config.");this.ee(e=>{e?this.fi(e):(rM.info("No config found after loading remote JS config. Falling back to JSON."),this.re(e=>{this.fi(e)}))})}catch(e){rM.error("Error loading remote config",e)}}fi(e){e?this._instance.config.__preview_remote_config?(this._instance.fi(e),!1!==e.hasFeatureFlags&&this._instance.featureFlags.ensureFlagsLoaded()):rM.info("__preview_remote_config is disabled. Logging config instead",e):rM.error("Failed to fetch remote config from PostHog.")}}class rL{constructor(e,t){this.se=!0,this.ne=[],this.oe=G((null==t?void 0:t.flush_interval_ms)||3e3,250,5e3,ew.createLogger("flush interval"),3e3),this.ae=e}enqueue(e){this.ne.push(e),this.le||this.ue()}unload(){this.he();var e=Object.values(this.ne.length>0?this.de():{});[...e.filter(e=>0===e.url.indexOf("/e")),...e.filter(e=>0!==e.url.indexOf("/e"))].map(e=>{this.ae(f({},e,{transport:"sendBeacon"}))})}enable(){this.se=!1,this.ue()}ue(){var e=this;this.se||(this.le=setTimeout(()=>{if(this.he(),this.ne.length>0){var t=this.de();for(var i in t)!function(){var s=t[i],r=(new Date).getTime();s.data&&I(s.data)&&eF(s.data,e=>{e.offset=Math.abs(e.timestamp-r),delete e.timestamp}),e.ae(s)}()}},this.oe))}he(){clearTimeout(this.le),this.le=void 0}de(){var e={};return eF(this.ne,t=>{var i,s=(t?t.batchKey:null)||t.url;R(e[s])&&(e[s]=f({},t,{data:[]})),null==(i=e[s].data)||i.push(t.data)}),this.ne=[],e}}var rN=["retriesPerformedSoFar"];class rj{constructor(e){this.ve=!1,this.ce=3e3,this.ne=[],this._instance=e,this.ne=[],this.fe=!0,!R(t)&&"onLine"in t.navigator&&(this.fe=t.navigator.onLine,this.pe=()=>{this.fe=!0,this.Dt()},this.ge=()=>{this.fe=!1},eD(t,"online",this.pe),eD(t,"offline",this.ge))}get length(){return this.ne.length}retriableRequest(e){var{retriesPerformedSoFar:t}=e,i=m(e,rN);N(t)&&t>0&&(i.url=s7(i.url,{retry_count:t})),this._instance.ci(f({},i,{callback:e=>{200!==e.statusCode&&(e.statusCode<400||e.statusCode>=500)&&(null!=t?t:0)<10?this._e(f({retriesPerformedSoFar:t},i)):null==i.callback||i.callback(e)}}))}_e(e){var t,i,s,r=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=r+1;var n=(s=(Math.random()-.5)*((i=Math.min(18e5,t=3e3*Math.pow(2,r)))-t/2),Math.ceil(i+s)),a=Date.now()+n;this.ne.push({retryAt:a,requestOptions:e});var o="Enqueued failed request for retry in "+n;
1navigator.onLine||(o+=" (Browser is offline)"),ew.warn(o),this.ve||(this.ve=!0,this.me())}me(){(this.ye&&clearTimeout(this.ye),0===this.ne.length)?(this.ve=!1,this.ye=void 0):this.ye=setTimeout(()=>{this.fe&&this.ne.length>0&&this.Dt(),this.me()},this.ce)}Dt(){var e=Date.now(),t=[],i=this.ne.filter(i=>i.retryAt<e||(t.push(i),!1));if(this.ne=t,i.length>0)for(var{requestOptions:s}of i)this.retriableRequest(s)}unload(){for(var{requestOptions:e}of(this.ye&&(clearTimeout(this.ye),this.ye=void 0),this.ve=!1,R(t)||(this.pe&&(t.removeEventListener("online",this.pe),this.pe=void 0),this.ge&&(t.removeEventListener("offline",this.ge),this.ge=void 0)),this.ne))try{this._instance.ci(f({},e,{transport:"sendBeacon"}))}catch(e){ew.error(e)}this.ne=[]}}class rH{constructor(e){this.be=()=>{this.we||(this.we={});var e,t,i,s,r=this.scrollElement(),n=this.scrollY(),a=r?Math.max(0,r.scrollHeight-r.clientHeight):0,o=n+((null==r?void 0:r.clientHeight)||0),l=(null==r?void 0:r.scrollHeight)||0;this.we.lastScrollY=Math.ceil(n),this.we.maxScrollY=Math.max(n,null!=(e=this.we.maxScrollY)?e:0),this.we.maxScrollHeight=Math.max(a,null!=(t=this.we.maxScrollHeight)?t:0),this.we.lastContentY=o,this.we.maxContentY=Math.max(o,null!=(i=this.we.maxContentY)?i:0),this.we.maxContentHeight=Math.max(l,null!=(s=this.we.maxContentHeight)?s:0)},this._instance=e}getContext(){return this.we}resetContext(){var e=this.we;return setTimeout(this.be,0),e}startMeasuringScrollPosition(){eD(t,"scroll",this.be,{capture:!0}),eD(t,"scrollend",this.be,{capture:!0}),eD(t,"resize",this.be)}scrollElement(){if(!this._instance.config.scroll_root_selector)return null==t?void 0:t.document.documentElement;for(var e of I(this._instance.config.scroll_root_selector)?this._instance.config.scroll_root_selector:[this._instance.config.scroll_root_selector]){var i=null==t?void 0:t.document.querySelector(e);if(i)return i}}scrollY(){if(this._instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollTop||0}return t&&(t.scrollY||t.pageYOffset||t.document.documentElement.scrollTop)||0}scrollX(){if(this._instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollLeft||0}return t&&(t.scrollX||t.pageXOffset||t.document.documentElement.scrollLeft)||0}}var rU=e=>sm(null==e?void 0:e.config.mask_personal_data_properties,null==e?void 0:e.config.custom_personal_data_properties);class rq{constructor(e,t,i,s){this.xe=e=>{var t=this.$e();if(!t||t.sessionId!==e){var i={sessionId:e,props:this.Ee(this._instance)};this.Se.register({[e6]:i})}},this._instance=e,this.ke=t,this.Se=i,this.Ee=s||rU,this.ke.onSessionId(this.xe)}$e(){return this.Se.props[e6]}getSetOnceProps(){var e,t=null==(e=this.$e())?void 0:e.props;return t?"r"in t?sy(t):{$referring_domain:t.referringDomain,$pathname:t.initialPathName,utm_source:t.utm_source,utm_campaign:t.utm_campaign,utm_medium:t.utm_medium,utm_content:t.utm_content,utm_term:t.utm_term}:{}}getSessionProps(){var e={};return eF(eR(this.getSetOnceProps()),(t,i)=>{"$current_url"===i&&(i="url"),e["$session_entry_"+k(i)]=t}),e}}var rB=eE("[SessionId]");class rV{on(e,t){return this.Pe.on(e,t)}constructor(e,t,i){if(this.Te=[],this.Ie=void 0,this.Pe=new rk,this.Re=(e,t)=>Math.abs(e-t)>this.sessionTimeoutMs,!e.persistence)throw Error("SessionIdManager requires a PostHogPersistence instance");if("always"===e.config.cookieless_mode)throw Error('SessionIdManager cannot be used with cookieless_mode="always"');this.F=e.config,this.Se=e.persistence,this.Fe=void 0,this.Ce=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.Oe=t||tZ,this.Me=i||tZ;var s,r=this.F.persistence_name||this.F.token,n=this.F.session_idle_timeout_seconds||1800;if(this._sessionTimeoutMs=1e3*G(n,60,36e3,rB.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.Ae(),this.De="ph_"+r+"_window_id",this.je="ph_"+r+"_primary_window_exists",this.Le()){var a=ie.W(this.De),o=ie.W(this.je);a&&!o?this.Fe=a:ie.V(this.De),ie.G(this.je,!0)}if(null!=(s=this.F.bootstrap)&&s.sessionID)try{var l=(e=>{var t=e.replace(/-/g,"");if(32!==t.length)throw Error("Not a valid UUID");if("7"!==t[12])throw Error("Not a UUIDv7");return parseInt(t.substring(0,12),16)})(this.F.bootstrap.sessionID);this.Ne(this.F.bootstrap.sessionID,(new Date).getTime(),l)}catch(e){rB.error("Invalid sessionID in bootstrap",e)}this.Ue()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return R(this.Te)&&(this.Te=[]),this.Te.push(e),this.Ce&&e(this.Ce,this.Fe),()=>{this.Te=this.Te.filter(t=>t!==e)}}Le(){return"memory"!==this.F.persistence&&!this.Se.wi&&ie.H()}ze(e){e!==this.Fe&&(this.Fe=e,this.Le()&&ie.G(this.De,e))}He(){return this.Fe?this.Fe:this.Le()?ie.W(this.De):null}Ne(e,t,i){e===this.Ce&&t===this._sessionActivityTimestamp&&i===this._sessionStartTimestamp||(this._sessionStartTimestamp=i,this._sessionActivityTimestamp=t,this.Ce=e,this.Se.register({[eX]:[t,e,i]}))}Be(){if(this.Ce&&this._sessionActivityTimestamp&&this._sessionStartTimestamp)return[this._sessionActivityTimestamp,this.Ce,this._sessionStartTimestamp];var e=this.Se.props[eX];return I(e)&&2===e.length&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.Ne(null,null,null)}destroy(){clearTimeout(this.qe),this.qe=void 0,this.Ie&&t&&(t.removeEventListener("beforeunload",this.Ie,{capture:!1}),this.Ie=void 0),this.Te=[]}Ue(){this.Ie=()=>{this.Le()&&ie.V(this.je)},eD(t,"beforeunload",this.Ie,{capture:!1})}
vendor: 5,879 bytes, line 1
1checkAndGetSessionAndWindowId(e,t){if(void 0===e&&(e=!1),void 0===t&&(t=null),"always"===this.F.cookieless_mode)throw Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var i=t||(new Date).getTime(),[s,r,n]=this.Be(),a=this.He(),o=N(n)&&n>0&&Math.abs(i-n)>864e5,l=!1,c=!r,u=!c&&!e&&this.Re(i,s);c||u||o?(r=this.Oe(),a=this.Me(),rB.info("new session ID generated",{sessionId:r,windowId:a,changeReason:{noSessionId:c,activityTimeout:u,sessionPastMaximumLength:o}}),n=i,l=!0):a||(a=this.Me(),l=!0);var h=0===s||!e||o?i:s,d=0===n?(new Date).getTime():n;return this.ze(a),this.Ne(r,h,d),e||this.Ae(),l&&this.Te.forEach(e=>e(r,a,l?{noSessionId:c,activityTimeout:u,sessionPastMaximumLength:o}:void 0)),{sessionId:r,windowId:a,sessionStartTimestamp:d,changeReason:l?{noSessionId:c,activityTimeout:u,sessionPastMaximumLength:o}:void 0,lastActivityTimestamp:s}}Ae(){clearTimeout(this.qe),this.qe=setTimeout(()=>{var[e]=this.Be();if(this.Re((new Date).getTime(),e)){var t=this.Ce;this.resetSessionId(),this.Pe.emit("forcedIdleReset",{idleSessionId:t})}},1.1*this.sessionTimeoutMs)}}var rW=["$set_once","$set"],rG=eE("[SiteApps]");class rz{constructor(e){this._instance=e,this.We=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}Ge(e,t){if(t){var i=this.globalsForEvent(t);this.We.push(i),this.We.length>1e3&&(this.We=this.We.slice(10))}}get siteAppLoaders(){var e;return null==(e=p._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.siteApps}init(){if(this.isEnabled){var e=this._instance.Mi(this.Ge.bind(this));this.Ve=()=>{e(),this.We=[],this.Ve=void 0}}}globalsForEvent(e){if(!e)throw Error("Event payload is required");var t,i,s,r,n,a,o,l={},c=this._instance.get_property("$groups")||[];for(var[u,h]of Object.entries(this._instance.get_property("$stored_group_properties")||{}))l[u]={id:c[u],type:u,properties:h};var{$set_once:d,$set:p}=e;return{event:f({},m(e,rW),{properties:f({},e.properties,p?{$set:f({},null!=(t=null==(i=e.properties)?void 0:i.$set)?t:{},p)}:{},d?{$set_once:f({},null!=(s=null==(r=e.properties)?void 0:r.$set_once)?s:{},d)}:{}),elements_chain:null!=(n=null==(a=e.properties)?void 0:a.$elements_chain)?n:"",distinct_id:null==(o=e.properties)?void 0:o.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:l}}setupSiteApp(e){var t=this.apps[e.id],i=()=>{var i;!t.errored&&this.We.length&&(rG.info("Processing "+this.We.length+" events for site app with id "+e.id),this.We.forEach(e=>null==t.processEvent?void 0:t.processEvent(e)),t.processedBuffer=!0),Object.values(this.apps).every(e=>e.processedBuffer||e.errored)&&(null==(i=this.Ve)||i.call(this))},s=!1,r=r=>{t.errored=!r,t.loaded=!0,rG.info("Site app with id "+e.id+" "+(r?"loaded":"errored")),s&&i()};try{var{processEvent:n}=e.init({posthog:this._instance,callback:e=>{r(e)}});n&&(t.processEvent=n),s=!0}catch(t){rG.error("Error while initializing PostHog app with config id "+e.id,t),r(!1)}if(s&&t.loaded)try{i()}catch(i){rG.error("Error while processing buffered events PostHog app with config id "+e.id,i),t.errored=!0}}Je(){var e=this.siteAppLoaders||[];for(var t of e)this.apps[t.id]={id:t.id,loaded:!1,errored:!1,processedBuffer:!1};for(var i of e)this.setupSiteApp(i)}Ke(e){if(0!==Object.keys(this.apps).length){var t=this.globalsForEvent(e);for(var i of Object.values(this.apps))try{null==i.processEvent||i.processEvent(t)}catch(t){rG.error("Error while processing event "+e.event+" for site app "+i.id,t)}}}onRemoteConfig(e){var t,i,s,r=this;if(null!=(t=this.siteAppLoaders)&&t.length)return this.isEnabled?(this.Je(),void this._instance.on("eventCaptured",e=>this.Ke(e))):void rG.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if(null==(i=this.Ve)||i.call(this),null!=(s=e.siteApps)&&s.length)if(this.isEnabled){var n=function(e){var t;p["__$$ph_site_app_"+e]=r._instance,null==(t=p.__PosthogExtensions__)||null==t.loadSiteApp||t.loadSiteApp(r._instance,o,t=>{if(t)return rG.error("Error while initializing PostHog app with config id "+e,t)})};for(var{id:a,url:o}of e.siteApps)n(a)}else rG.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}var rY=function(e,t){if(!e)return!1;var i=e.userAgent;if(i&&b(i,t))return!0;try{var s=null==e?void 0:e.userAgentData;if(null!=s&&s.brands&&s.brands.some(e=>b(null==e?void 0:e.brand,t)))return!0}catch(e){}return!!e.webdriver},rX=((ny={}).US="us",ny.EU="eu",ny.CUSTOM="custom",ny),rJ="i.posthog.com";class rK{constructor(e){this.Ye={},this.instance=e}get apiHost(){var e=this.instance.config.api_host.trim().replace(/\/$/,"");return"https://app.posthog.com"===e?"https://us.i.posthog.com":e}get flagsApiHost(){var e=this.instance.config.flags_api_host;return e?e.trim().replace(/\/$/,""):this.apiHost}get uiHost(){var e,t=null==(e=this.instance.config.ui_host)?void 0:e.replace(/\/$/,"");return t||(t=this.apiHost.replace("."+rJ,".posthog.com")),"https://app.posthog.com"===t?"https://us.posthog.com":t}get region(){return this.Ye[this.apiHost]||(/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.Ye[this.apiHost]=rX.US:/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.Ye[this.apiHost]=rX.EU:this.Ye[this.apiHost]=rX.CUSTOM),this.Ye[this.apiHost]}endpointFor(e,t){if(void 0===t&&(t=""),t&&(t="/"===t[0]?t:"/"+t),"ui"===e)return this.uiHost+t;if("flags"===e)return this.flagsApiHost+t;if(this.region===rX.CUSTOM)return this.apiHost+t;var i=rJ+t;switch(e){case"assets":return"https://"+this.region+"-assets."+i;case"api":return"https://"+this.region+"."+i}}}var rZ={icontains:(e,i)=>!!t&&i.href.toLowerCase().indexOf(e.toLowerCase())>-1,not_icontains:(e,i)=>!!t&&-1===i.href.toLowerCase().indexOf(e.toLowerCase()),regex:(e,i)=>!!t&&ri(i.href,e),not_regex:(e,i)=>!!t&&!ri(i.href,e),exact:(e,t)=>
1t.href===e,is_not:(e,t)=>t.href!==e};class rQ{constructor(e){var t=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(e){void 0===e&&(e=!1),t.getWebExperiments(e=>{rQ.Xe("retrieved web experiments from the server"),t.Qe=new Map,e.forEach(e=>{if(e.feature_flag_key){t.Qe&&(rQ.Xe("setting flag key ",e.feature_flag_key," to web experiment ",e),null==(i=t.Qe)||i.set(e.feature_flag_key,e));var i,s=t._instance.getFeatureFlag(e.feature_flag_key);A(s)&&e.variants[s]&&t.Ze(e.name,s,e.variants[s].transforms)}else if(e.variants)for(var r in e.variants){var n=e.variants[r];rQ.tr(n)&&t.Ze(e.name,r,n.transforms)}})},e)},this._instance=e,this._instance.onFeatureFlags(e=>{this.onFeatureFlags(e)})}onFeatureFlags(e){if(this._is_bot())rQ.Xe("Refusing to render web experiment since the viewer is a likely bot");else if(!this._instance.config.disable_web_experiments){if(L(this.Qe))return this.Qe=new Map,this.loadIfEnabled(),void this.previewWebExperiment();rQ.Xe("applying feature flags",e),e.forEach(e=>{var t;if(this.Qe&&null!=(t=this.Qe)&&t.has(e)){var i,s=this._instance.getFeatureFlag(e),r=null==(i=this.Qe)?void 0:i.get(e);s&&null!=r&&r.variants[s]&&this.Ze(r.name,s,r.variants[s].transforms)}})}}previewWebExperiment(){var e=rQ.getWindowLocation();if(null!=e&&e.search){var t=tj(null==e?void 0:e.search,"__experiment_id"),i=tj(null==e?void 0:e.search,"__experiment_variant");t&&i&&(rQ.Xe("previewing web experiments "+t+" && "+i),this.getWebExperiments(e=>{this.ir(parseInt(t),i,e)},!1,!0))}}loadIfEnabled(){this._instance.config.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(e,t,i){if(this._instance.config.disable_web_experiments&&!i)return e([]);var s=this._instance.get_property("$web_experiments");if(s&&!t)return e(s);this._instance.ci({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this._instance.config.token),method:"GET",callback:t=>200===t.statusCode&&t.json?e(t.json.experiments||[]):e([])})}ir(e,t,i){var s=i.filter(t=>t.id===e);s&&s.length>0&&(rQ.Xe("Previewing web experiment ["+s[0].name+"] with variant ["+t+"]"),this.Ze(s[0].name,t,s[0].variants[t].transforms))}static tr(e){return!L(e.conditions)&&rQ.er(e)&&rQ.rr(e)}static er(e){if(L(e.conditions)||L(null==(t=e.conditions)?void 0:t.url))return!0;var t,i,s,r,n=rQ.getWindowLocation();return!!n&&(null==(i=e.conditions)||!i.url||rZ[null!=(s=null==(r=e.conditions)?void 0:r.urlMatchType)?s:"icontains"](e.conditions.url,n))}
vendor: 5,991 bytes, line 1
1static getWindowLocation(){return null==t?void 0:t.location}static rr(e){if(L(e.conditions)||L(null==(i=e.conditions)?void 0:i.utm))return!0;var t=sp();if(t.utm_source){var i,s,r,n,a,o,l,c,u,h=null==(s=e.conditions)||null==(s=s.utm)||!s.utm_campaign||(null==(r=e.conditions)||null==(r=r.utm)?void 0:r.utm_campaign)==t.utm_campaign,d=null==(n=e.conditions)||null==(n=n.utm)||!n.utm_source||(null==(a=e.conditions)||null==(a=a.utm)?void 0:a.utm_source)==t.utm_source,p=null==(o=e.conditions)||null==(o=o.utm)||!o.utm_medium||(null==(l=e.conditions)||null==(l=l.utm)?void 0:l.utm_medium)==t.utm_medium,g=null==(c=e.conditions)||null==(c=c.utm)||!c.utm_term||(null==(u=e.conditions)||null==(u=u.utm)?void 0:u.utm_term)==t.utm_term;return h&&p&&g&&d}return!1}static Xe(e){for(var t=arguments.length,i=Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];ew.info("[WebExperiments] "+e,i)}Ze(e,t,i){this._is_bot()?rQ.Xe("Refusing to render web experiment since the viewer is a likely bot"):"control"!==t?i.forEach(i=>{if(i.selector){rQ.Xe("applying transform of variant "+t+" for experiment "+e+" ",i);var s,r=null==(s=document)?void 0:s.querySelectorAll(i.selector);null==r||r.forEach(e=>{i.html&&(e.innerHTML=i.html),i.css&&e.setAttribute("style",i.css)})}}):rQ.Xe("Control variants leave the page unmodified.")}_is_bot(){return a&&this._instance?rY(a,this._instance.config.custom_blocked_useragents):void 0}}var r0=eE("[PostHog ExternalIntegrations]"),r1={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class r2{constructor(e){this._instance=e}it(e,t){var i;null==(i=p.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,e,e=>{if(e)return r0.error("failed to load script",e);t()})}startIfEnabledOrStop(){var e,t=this,i=function(e){var i,s,n;!r||null!=(i=p.__PosthogExtensions__)&&null!=(i=i.integrations)&&i[e]||t.it(r1[e],()=>{var i;null==(i=p.__PosthogExtensions__)||null==(i=i.integrations)||null==(i=i[e])||i.start(t._instance)}),!r&&null!=(s=p.__PosthogExtensions__)&&null!=(s=s.integrations)&&s[e]&&(null==(n=p.__PosthogExtensions__)||null==(n=n.integrations)||null==(n=n[e])||n.stop())};for(var[s,r]of Object.entries(null!=(e=this._instance.config.integrations)?e:{}))i(s)}}var r3="[SessionRecording]",r5=eE(r3);class r8{get started(){var e;return!(null==(e=this.sr)||!e.isStarted)}get status(){return this.sr?this.sr.status:this.nr&&!this.ar?"disabled":"lazy_loading"}constructor(e){if(this._forceAllowLocalhostNetworkCapture=!1,this.nr=!1,this.lr=void 0,this._instance=e,!this._instance.sessionManager)throw r5.error("started without valid sessionManager"),Error(r3+" started without valid sessionManager. This is a bug.");if("always"===this._instance.config.cookieless_mode)throw Error(r3+' cannot be used with cookieless_mode="always"')}get ar(){var e,i=!(null==(e=this._instance.get_property(eY))||!e.enabled),s=!this._instance.config.disable_session_recording,r=this._instance.config.disable_session_recording||this._instance.consent.isOptedOut();return t&&i&&s&&!r}startIfEnabledOrStop(e){var t;if(!this.ar||null==(t=this.sr)||!t.isStarted){var i=!R(Object.assign)&&!R(Array.from);this.ar&&i?(this.ur(e),r5.info("starting")):this.stopRecording()}}ur(e){var t,i,s;this.ar&&(null!=p&&null!=(t=p.__PosthogExtensions__)&&null!=(t=t.rrweb)&&t.record&&null!=(i=p.__PosthogExtensions__)&&i.initSessionRecording?this.hr(e):null==(s=p.__PosthogExtensions__)||null==s.loadExternalDependency||s.loadExternalDependency(this._instance,this.dr,t=>{if(t)return r5.error("could not load recorder",t);this.hr(e)}))}stopRecording(){var e,t;null==(e=this.lr)||e.call(this),this.lr=void 0,null==(t=this.sr)||t.stop()}vr(){var e;null==(e=this._instance.persistence)||e.unregister(eJ)}cr(e){if(this._instance.persistence){var t,i,s=this._instance.persistence,r=()=>{var t=!1===e.sessionRecording?void 0:e.sessionRecording,i=null==t?void 0:t.sampleRate,r=L(i)?null:parseFloat(i);L(r)&&this.vr();var n=null==t?void 0:t.minimumDurationMilliseconds;s.register({[eY]:f({enabled:!!t},t,{networkPayloadCapture:f({capturePerformance:e.capturePerformance},null==t?void 0:t.networkPayloadCapture),canvasRecording:{enabled:null==t?void 0:t.recordCanvas,fps:null==t?void 0:t.canvasFps,quality:null==t?void 0:t.canvasQuality},sampleRate:r,minimumDurationMilliseconds:R(n)?null:n,endpoint:null==t?void 0:t.endpoint,triggerMatchType:null==t?void 0:t.triggerMatchType,masking:null==t?void 0:t.masking,urlTriggers:null==t?void 0:t.urlTriggers})})};r(),null==(t=this.lr)||t.call(this),this.lr=null==(i=this._instance.sessionManager)?void 0:i.onSessionId(r)}}onRemoteConfig(e){"sessionRecording"in e?!1!==e.sessionRecording?(this.cr(e),this.nr=!0,this.startIfEnabledOrStop()):this.nr=!0:r5.info("skipping remote config with no sessionRecording",e)}log(e,t){var i;void 0===t&&(t="log"),null!=(i=this.sr)&&i.log?this.sr.log(e,t):r5.warn("log called before recorder was ready")}get dr(){var e,t,i=null==(e=this._instance)||null==(e=e.persistence)?void 0:e.get_property(eY);return(null==i||null==(t=i.scriptConfig)?void 0:t.script)||"lazy-recorder"}hr(e){var t,i;if(null==(t=p.__PosthogExtensions__)||!t.initSessionRecording)throw Error("Called on script loaded before session recording is available");this.sr||(this.sr=null==(i=p.__PosthogExtensions__)?void 0:i.initSessionRecording(this._instance),this.sr._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),this.sr.start(e)}onRRwebEmit(e){var t;null==(t=this.sr)||null==t.onRRwebEmit||t.onRRwebEmit(e)}overrideLinkedFlag(){var e,t;this.sr||null==(t=this._instance.persistence)||t.register({$replay_override_linked_flag:!0}),null==(e=this.sr)||e.overrideLinkedFlag()}overrideSampling(){var e,t;this.sr||null==(t=this._instance.persistence)||t.register({$replay_override_sampling:!0}),null==(e=this.sr)||e.overrideSampling()}overrideTrigger(e){var t,i;this.sr||null==(i=this._instance.persistence)||i.register({["url"===e?"$replay_override_url_trigger":"$replay_override_event_trigger"]:!0}
1),null==(t=this.sr)||t.overrideTrigger(e)}get sdkDebugProperties(){var e;return(null==(e=this.sr)?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(e,t){var i;return!(null==(i=this.sr)||!i.tryAddCustomEvent(e,t))}}var r6={},r4=()=>{},r7="posthog",r9=!s6&&-1===(null==d?void 0:d.indexOf("MSIE"))&&-1===(null==d?void 0:d.indexOf("Mozilla")),ne=e=>{var i;return f({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,token:"",autocapture:!0,cross_subdomain_cookie:function(e){var t=null==e?void 0:e.hostname;if(!A(t))return!1;var i=t.split(".").slice(-2).join(".");for(var s of eA)if(i===s)return!1;return!0}(null==o?void 0:o.location),persistence:"localStorage+cookie",persistence_name:"",loaded:r4,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:null!=e?e:"unset",__preview_deferred_init_extensions:!1,debug:l&&A(null==l?void 0:l.search)&&-1!==l.search.indexOf("__posthog_debug=true")||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:"https:"===(null==t||null==(i=t.location)?void 0:i.protocol),ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error:e=>{var t="Bad HTTP status: "+e.statusCode+" "+e.text;ew.error(t)},get_device_id:e=>e,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:"identified_only",before_send:void 0,request_queue_config:{flush_interval_ms:3e3},error_tracking:{},_onCapture:r4,__preview_eager_load_replay:!1},{rageclick:!(e&&e>="2025-11-30")||{content_ignorelist:!0},capture_pageview:!(e&&e>="2025-05-24")||"history_change",session_recording:e&&e>="2025-11-30"?{strictMinimumDuration:!0}:{}})},nt=e=>{var t={};R(e.process_person)||(t.person_profiles=e.process_person),R(e.xhr_headers)||(t.request_headers=e.xhr_headers),R(e.cookie_name)||(t.persistence_name=e.cookie_name),R(e.disable_cookie)||(t.disable_persistence=e.disable_cookie),R(e.store_google)||(t.save_campaign_params=e.store_google),R(e.verbose)||(t.debug=e.verbose);var i=e$({},t,e);return I(e.property_blacklist)&&(R(e.property_denylist)?i.property_denylist=e.property_blacklist:I(e.property_denylist)?i.property_denylist=[...e.property_blacklist,...e.property_denylist]:ew.error("Invalid value for property_denylist config: "+e.property_denylist)),i};class ni{constructor(){this.__forceAllowLocalhost=!1}get pr(){return this.__forceAllowLocalhost}set pr(e){ew.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}class ns{get decideEndpointWasHit(){var e,t;return null!=(e=null==(t=this.featureFlags)?void 0:t.hasLoadedFlags)&&e}get flagsEndpointWasHit(){var e,t;return null!=(e=null==(t=this.featureFlags)?void 0:t.hasLoadedFlags)&&e}constructor(){this.webPerformance=new ni,this.gr=!1,this.version=g.LIB_VERSION,this._r=new rk,this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=ne(),this.SentryIntegration=i_,this.sentryIntegration=e=>{var t;return t=ig(this,e),{name:ip,processEvent:e=>t(e)}},this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.mr=!1,this.yr=null,this.br=null,this.wr=null,this.featureFlags=new rf(this),this.toolbar=ne
vendor: 9,052 bytes, line 1
1w iw(this),this.scrollManager=new rH(this),this.pageViewManager=new sP(this),this.surveys=new rT(this),this.experiments=new rQ(this),this.exceptions=new ro(this),this.rateLimiter=new rA(this),this.requestRouter=new rK(this),this.consent=new ii(this),this.externalIntegrations=new r2(this),this.people={set:(e,t,i)=>{var s=A(e)?{[e]:t}:e;this.setPersonProperties(s),null==i||i({})},set_once:(e,t,i)=>{var s=A(e)?{[e]:t}:e;this.setPersonProperties(void 0,s),null==i||i({})}},this.on("eventCaptured",e=>ew.info('send "'+(null==e?void 0:e.event)+'"',e))}init(e,t,i){if(i&&i!==r7){var s,r=null!=(s=r6[i])?s:new ns;return r._init(e,t,i),r6[i]=r,r6[r7][i]=r,r}return this._init(e,t,i)}_init(e,i,s){if(void 0===i&&(i={}),R(e)||M(e))return ew.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},i.debug=this.$r(i.debug),this.Er=i,this.Sr=[],i.person_profiles&&(this.br=i.person_profiles),this.set_config(e$({},ne(i.defaults),nt(i),{name:s,token:e})),this.config.on_xhr_error&&ew.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=i.disable_compression?void 0:tD.GZipJS;var r=this.kr();this.persistence=new ry(this.config,r),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new ry(f({},this.config,{persistence:"sessionStorage"}),r);var n=f({},this.persistence.props),a=f({},this.sessionPersistence.props);this.register({$initialization_time:(new Date).toISOString()}),this.Pr=new rL(e=>this.Tr(e),this.config.request_queue_config),this.Ir=new rj(this),this.__request_queue=[];var o="always"===this.config.cookieless_mode||"on_reject"===this.config.cookieless_mode&&this.consent.isExplicitlyOptedOut();if(o||(this.sessionManager=new rV(this),this.sessionPropsManager=new rq(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(ew.info("Deferring extension initialization to improve startup performance"),setTimeout(()=>{this.Rr(o)},0)):(ew.info("Initializing extensions synchronously"),this.Rr(o)),g.DEBUG=g.DEBUG||this.config.debug,g.DEBUG&&ew.info("Starting in debug mode",{this:this,config:i,thisC:f({},this.config),p:n,s:a}),void 0!==(null==(l=i.bootstrap)?void 0:l.distinctID)){var l,c,u,h=this.config.get_device_id(tZ()),d=null!=(c=i.bootstrap)&&c.isIdentifiedID?h:i.bootstrap.distinctID;this.persistence.set_property(e8,null!=(u=i.bootstrap)&&u.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:i.bootstrap.distinctID,$device_id:d})}if(this.Fr()){var p,_,v=Object.keys((null==(p=i.bootstrap)?void 0:p.featureFlags)||{}).filter(e=>{var t;return!(null==(t=i.bootstrap)||null==(t=t.featureFlags)||!t[e])}).reduce((e,t)=>{var s;return e[t]=(null==(s=i.bootstrap)||null==(s=s.featureFlags)?void 0:s[t])||!1,e},{}),m=Object.keys((null==(_=i.bootstrap)?void 0:_.featureFlagPayloads)||{}).filter(e=>v[e]).reduce((e,t)=>{var s,r;return null!=(s=i.bootstrap)&&null!=(s=s.featureFlagPayloads)&&s[t]&&(e[t]=null==(r=i.bootstrap)||null==(r=r.featureFlagPayloads)?void 0:r[t]),e},{});this.featureFlags.receivedFeatureFlags({featureFlags:v,featureFlagPayloads:m})}if(o)this.register_once({distinct_id:ts,$device_id:null},"");else if(!this.get_distinct_id()){var y=this.config.get_device_id(tZ());this.register_once({distinct_id:y,$device_id:y},""),this.persistence.set_property(e8,"anonymous")}return eD(t,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),this.toolbar.maybeLoadToolbar(),i.segment?function(e,t){var i=e.config.segment;if(!i)return t();!function(e,t){var i=e.config.segment;if(!i)return t();var s=i=>{var s=()=>i.anonymousId()||tZ();e.config.get_device_id=s,i.id()&&(e.register({distinct_id:i.id(),$device_id:s()}),e.persistence.set_property(e8,"identified")),t()},r=i.user();"then"in r&&O(r.then)?r.then(e=>s(e)):s(r)}(e,()=>{var s;i.register((Promise&&Promise.resolve||id.warn("This browser does not have Promise support, and can not use the segment integration"),s=(t,i)=>{if(!i)return t;t.event.userId||t.event.anonymousId===e.get_distinct_id()||(id.info("No userId set, resetting PostHog"),e.reset()),t.event.userId&&t.event.userId!==e.get_distinct_id()&&(id.info("UserId set, identifying with PostHog"),e.identify(t.event.userId));var s=e.calculateEventProperties(i,t.event.properties);return t.event.properties=Object.assign({},s,t.event.properties),t},{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:e=>s(e,e.event.event),page:e=>s(e,"$pageview"),identify:e=>s(e,"$identify"),screen:e=>s(e,"$screen")})).then(()=>{t()})})}(this,()=>this.Cr()):this.Cr(),O(this.config._onCapture)&&this.config._onCapture!==r4&&(ew.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",e=>this.config._onCapture(e.event,e))),this.config.ip&&ew.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this}Rr(e){var t=performance.now();this.historyAutocapture=new ih(this),this.historyAutocapture.startIfEnabled();var i=[];i.push(()=>{new ix(this).startIfEnabledOrStop()}),i.push(()=>{var e;this.siteApps=new rz(this),null==(e=this.siteApps)||e.init()}),e||i.push(()=>{this.sessionRecording=new r8(this),this.sessionRecording.startIfEnabledOrStop()}),this.config.disable_scroll_properties||i.push(()=>{this.scrollManager.startMeasuringScrollPosition()}),i.push(()=>{this.autocapture=new tV(this),this.autocapture.startIfEnabled()}),i.push(()=>{this.surveys.loadIfEnabled()}),i.push(()=>{this.heatmaps=new sS(this),this.heatmaps.startIfEnabled()}),i.push(()=>{this.webVitalsAutocapture=new sE(this)}),i.push(()=>{this.exceptionObserver=new ic(this),this.exceptionObserver.startIfEnabled()}),i.push(()=>{this.deadClicksAutocapture=new io(this,ia),this.deadClicksAutocapture.startIfEnabled()}),i.push(()=>{if(this.Or){var e=this.Or;this.Or=void 0,this.fi(e)}}),this.Mr(i,t)}Mr(e,t){for(;e.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-t>=30&&e.length>0)return void setTimeout(()=>{this.Mr(e,t)},0);var i=e.shift();if(i)try{i()}catch(e){ew.error("Error initializing extension:",e)}}var s=Math.round(performance.now()-t);this.register_for_session({$sdk_debug_extensions_init_method:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",$sdk_debug_extensions_init_time_ms:s}),this.config.__preview_deferred_init_extensions&&ew.info("PostHog extensions initialized ("+s+"ms)")}fi(e){var t,i,s,r,n,a,l,c;o&&o.body?(this.config.__preview_deferred_init_extensions&&(this.Or=e),this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=E(e.supportedCompression,tD.GZipJS)?tD.GZipJS:E(e.supportedCompression,tD.Base64)?tD.Base64:void 0),null!=(t=e.analytics)&&t.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),this.set_config({person_profiles:this.br?this.br:"identified_only"}),null==(i=this.siteApps)||i.onRemoteConfig(e),null==(s=this.sessionRecording)||s.onRemoteConfig(e),null==(r=this.autocapture)||r.onRemoteConfig(e),null==(n=this.heatmaps)||n.onRemoteConfig(e),this.surveys.onRemoteConfig(e),null==(a=this.webVitalsAutocapture)||a.onRemoteConfig(e),null==(l=this.exceptionObserver)||l.onRemoteConfig(e),this.exceptions.onRemoteConfig(e),null==(c=this.deadClicksAutocapture)||c.onRemoteConfig(e)):(ew.info("document not ready yet, trying again in 500 milliseconds..."),setTimeout(()=>{this.fi(e)},500))}Cr(){try{this.config.loaded(this)}catch(e){ew.critical("`loaded` function failed",e)}this.Ar(),this.config.capture_pageview&&setTimeout(()=>{(this.consent.isOptedIn()||"always"===this.config.cookieless_mode)&&this.Dr()},1),new rD(this).load(),this.featureFlags.flags()}Ar(){var e;this.is_capturing()&&this.config.request_batching&&(null==(e=this.Pr)||e.enable())}_dom_loaded(){this.is_capturing()&&eP(this.__request_queue,e=>this.Tr(e)),this.__request_queue=[],this.Ar()}_handle_unload(){var e,t;this.config.request_batching?(this.jr()&&this.capture("$pageleave"),null==(e=this.Pr)||e.unload(),null==(t=this.Ir)||t.unload()):this.jr()&&this.capture("$pageleave",null,{transport:"sendBeacon"})}ci(e){this.__loaded&&(r9?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)||(e.transport=e.transport||this.config.api_transport,e.url=s7(e.url,{ip:+!!this.config.ip}),e.headers=f({},this.config.request_headers),e.compression="best-available"===e.compression?this.compression:e.compression,e.disableXHRCredentials=this.config.__preview_disable_xhr_credentials,this.config.__preview_disable_beacon&&(e.disableTransport=["sendBeacon"]),e.fetchOptions=e.fetchOptions||this.config.fetch_options,
1(e=>{var t,i,s,r=f({},e);r.timeout=r.timeout||6e4,r.url=s7(r.url,{_:(new Date).getTime().toString(),ver:g.LIB_VERSION,compression:r.compression});var n=null!=(t=r.transport)?t:"fetch",a=rt.filter(e=>!r.disableTransport||!e.transport||!r.disableTransport.includes(e.transport)),o=null!=(i=null==(s=eM(a,e=>e.transport===n))?void 0:s.method)?i:a[0].method;if(!o)throw Error("No available transport method");o(r)})(f({},e,{callback:t=>{var i,s;this.rateLimiter.checkForLimiting(t),t.statusCode>=400&&(null==(i=(s=this.config).on_request_error)||i.call(s,t)),null==e.callback||e.callback(t)}}))))}Tr(e){this.Ir?this.Ir.retriableRequest(e):this.ci(e)}_execute_array(e){var t,i=[],s=[],r=[];eP(e,e=>{e&&(I(t=e[0])?r.push(e):O(e)?e.call(this):I(e)&&"alias"===t?i.push(e):I(e)&&-1!==t.indexOf("capture")&&O(this[t])?r.push(e):s.push(e))});var n=function(e,t){eP(e,function(e){if(I(e[0])){var i=t;eF(e,function(e){i=i[e[0]].apply(i,e.slice(1))})}else this[e[0]].apply(this,e.slice(1))},t)};n(i,this),n(s,this),n(r,this)}Fr(){var e,t;return(null==(e=this.config.bootstrap)?void 0:e.featureFlags)&&Object.keys(null==(t=this.config.bootstrap)?void 0:t.featureFlags).length>0||!1}push(e){this._execute_array([e])}capture(e,t,i){var s;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.Pr){if(this.is_capturing())if(!R(e)&&A(e)){var r=!this.config.opt_out_useragent_filter&&this._is_bot();if(!(r&&!this.config.__preview_capture_bot_pageviews)){var n=null!=i&&i.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(null==n||!n.isRateLimited){null!=t&&t.$current_url&&!A(null==t?void 0:t.$current_url)&&(ew.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),null==t||delete t.$current_url),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var a=new Date,o=(null==i?void 0:i.timestamp)||a,l=tZ(),c={uuid:l,event:e,properties:this.calculateEventProperties(e,t||{},o,l)};"$pageview"===e&&this.config.__preview_capture_bot_pageviews&&r&&(c.event="$bot_pageview",c.properties.$browser_type="bot"),n&&(c.properties.$lib_rate_limit_remaining_tokens=n.remainingTokens),(null==i?void 0:i.$set)&&(c.$set=null==i?void 0:i.$set);var u,h=this.Lr(null==i?void 0:i.$set_once);if(h&&(c.$set_once=h),(d=c,p=null!=i&&i._noTruncate?null:this.config.properties_string_max_length,g=e=>A(e)&&!D(p)?e.slice(0,p):e,_=new Set,c=function e(t,i){var s;return t!==Object(t)?g?g(t,i):t:_.has(t)?void 0:(_.add(t),I(t)?(s=[],eP(t,t=>{s.push(e(t))})):(s={},eF(t,(t,i)=>{_.has(t)||(s[i]=e(t,i))})),s)}(d)).timestamp=o,R(null==i?void 0:i.timestamp)||(c.properties.$event_time_override_provided=!0,c.properties.$event_time_override_system_time=a),e===rw.DISMISSED||e===rw.SENT){var d,p,g,_,v,m,y,b=null==t?void 0:t[rE.SURVEY_ID],w=null==t?void 0:t[rE.SURVEY_ITERATION];u={id:b,current_iteration:w},localStorage.getItem(r$(u))||localStorage.setItem(r$(u),"true"),c.$set=f({},c.$set,{[(v={id:b,current_iteration:w},y="$survey_"+(m=e===rw.SENT?"responded":"dismissed")+"/"+v.id,v.current_iteration&&v.current_iteration>0&&(y="$survey_"+m+"/"+v.id+"/"+v.current_iteration),y)]:!0})}var E=f({},c.properties.$set,c.$set);if(T(E)||this.setPersonPropertiesForFlags(E),!L(this.config.before_send)){var x=this.Nr(c);if(!x)return;c=x}this._r.emit("eventCaptured",c);var k={method:"POST",url:null!=(s=null==i?void 0:i._url)?s:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:c,compression:"best-available",batchKey:null==i?void 0:i._batchKey};return!this.config.request_batching||i&&(null==i||!i._batchKey)||null!=i&&i.send_instantly?this.Tr(k):this.Pr.enqueue(k),c}ew.critical("This capture call is ignored due to client rate limiting.")}}else ew.error("No event name provided to posthog.capture")}else ew.uninitializedWarning("posthog.capture")}Mi(e){return this.on("eventCaptured",t=>e(t.event,t))}calculateEventProperties(e,i,s,r,n){if(s=s||new Date,!this.persistence||!this.sessionPersistence)return i;var a,c=n?void 0:this.persistence.remove_event_timer(e),u=f({},i);if(u.token=this.config.token,u.$config_defaults=this.config.defaults,("always"==this.config.cookieless_mode||"on_reject"==this.config.cookieless_mode&&this.consent.isExplicitlyOptedOut())&&(u.$cookieless_mode=!0),"$snapshot"===e){var h=f({},this.persistence.properties(),this.sessionPersistence.properties());return u.distinct_id=h.distinct_id,(!A(u.distinct_id)&&!N(u.distinct_id)||M(u.distinct_id))&&ew.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),u}var p,_=function(e,i){if(!d)return{};var s,r,n=e?eI([],sc,i||[]):[],[a,o]=function(e){for(var t=0;t<sa.length;t++){var[i,s]=sa[t],r=i.exec(e),n=r&&(O(s)?s(r,e):s);if(n)return n}return["",""]}(d);return e$(eR({$os:a,$os_version:o,$browser:ss(d,navigator.vendor),$device:so(d),$device_type:(r=so(d))===i$||r===iF||"Kobo"===r||"Kindle Fire"===r||r===i5?iP:r===iz||r===iX||r===iY||r===i1?"Console":r===iO?"Wearable":r?ik:"Desktop",$timezone:sb(),$timezone_offset:function(){try{return(new Date).getTimezoneOffset()}catch(e){return}}()}),{$current_url:tH(null==l?void 0:l.href,n,sh),$host:null==l?void 0:l.host,$pathname:null==l?void 0:l.pathname,$raw_user_agent:d.length>1e3?d.substring(0,997)+"...":d,$browser_version:sn(d,navigator.vendor),$browser_language:sv(),$browser_language_prefix:"string"==typeof(s=sv())?s.split("-")[0]:void 0,$screen_height:null==t?void 0:t.screen.height,$screen_width:null==t?void 0:t.screen.width,$viewport_height:null==t?void 0:t.innerHe
vendor: 4,122 bytes, line 1
1ight,$viewport_width:null==t?void 0:t.innerWidth,$lib:"web",$lib_version:g.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})}(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties);if(this.sessionManager){var{sessionId:v,windowId:m}=this.sessionManager.checkAndGetSessionAndWindowId(n,s.getTime());u.$session_id=v,u.$window_id=m}this.sessionPropsManager&&e$(u,this.sessionPropsManager.getSessionProps());try{this.sessionRecording&&e$(u,this.sessionRecording.sdkDebugProperties),u.$sdk_debug_retry_queue_size=null==(a=this.Ir)?void 0:a.length}catch(e){u.$sdk_debug_error_capturing_properties=String(e)}if(this.requestRouter.region===rX.CUSTOM&&(u.$lib_custom_api_host=this.config.api_host),p="$pageview"!==e||n?"$pageleave"!==e||n?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(s):this.pageViewManager.doPageView(s,r),u=e$(u,p),"$pageview"===e&&o&&(u.title=o.title),!R(c)){var y=s.getTime()-c;u.$duration=parseFloat((y/1e3).toFixed(3))}d&&this.config.opt_out_useragent_filter&&(u.$browser_type=this._is_bot()?"bot":"browser"),(u=e$({},_,this.persistence.properties(),this.sessionPersistence.properties(),u)).$is_identified=this._isIdentified(),I(this.config.property_denylist)?eF(this.config.property_denylist,function(e){delete u[e]}):ew.error("Invalid value for property_denylist config: "+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var b=this.config.sanitize_properties;b&&(ew.error("sanitize_properties is deprecated. Use before_send instead"),u=b(u,e));var w=this.Ur();return u.$process_person_profile=w,w&&!n&&this.zr("_calculate_event_properties"),u}Lr(e){if(!this.persistence||!this.Ur()||this.gr)return e;var t,i=e$({},this.persistence.get_initial_props(),(null==(t=this.sessionPropsManager)?void 0:t.getSetOnceProps())||{},e||{}),s=this.config.sanitize_properties;return s&&(ew.error("sanitize_properties is deprecated. Use before_send instead"),i=s(i,"$set_once")),this.gr=!0,T(i)?void 0:i}register(e,t){var i;null==(i=this.persistence)||i.register(e,t)}register_once(e,t,i){var s;null==(s=this.persistence)||s.register_once(e,t,i)}register_for_session(e){var t;null==(t=this.sessionPersistence)||t.register(e)}unregister(e){var t;null==(t=this.persistence)||t.unregister(e)}unregister_for_session(e){var t;null==(t=this.sessionPersistence)||t.unregister(e)}Hr(e,t){this.register({[e]:t})}getFeatureFlag(e,t){return this.featureFlags.getFeatureFlag(e,t)}getFeatureFlagPayload(e){var t=this.featureFlags.getFeatureFlagPayload(e);try{return JSON.parse(t)}catch(e){return t}}isFeatureEnabled(e,t){return this.featureFlags.isFeatureEnabled(e,t)}reloadFeatureFlags(){this.featureFlags.reloadFeatureFlags()}updateEarlyAccessFeatureEnrollment(e,t,i){this.featureFlags.updateEarlyAccessFeatureEnrollment(e,t,i)}getEarlyAccessFeatures(e,t,i){return void 0===t&&(t=!1),this.featureFlags.getEarlyAccessFeatures(e,t,i)}on(e,t){return this._r.on(e,t)}onFeatureFlags(e){return this.featureFlags.onFeatureFlags(e)}onSurveysLoaded(e){return this.surveys.onSurveysLoaded(e)}onSessionId(e){var t,i;return null!=(t=null==(i=this.sessionManager)?void 0:i.onSessionId(e))?t:()=>{}}getSurveys(e,t){void 0===t&&(t=!1),this.surveys.getSurveys(e,t)}getActiveMatchingSurveys(e,t){void 0===t&&(t=!1),this.surveys.getActiveMatchingSurveys(e,t)}renderSurvey(e,t){this.surveys.renderSurvey(e,t)}displaySurvey(e,t){void 0===t&&(t=rO),this.surveys.displaySurvey(e,t)}canRenderSurvey(e){return this.surveys.canRenderSurvey(e)}canRenderSurveyAsync(e,t){return void 0===t&&(t=!1),this.surveys.canRenderSurveyAsync(e,t)}identify(e,t,i){if(!this.__loaded||!this.persistence)return ew.uninitializedWarning("posthog.identify");if(N(e)&&(e=e.toString(),ew.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),e)if(["distinct_id","distinctid"].includes(e.toLowerCase()))ew.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and n
1ot a hardcoded string.');else if(e!==ts){if(this.zr("posthog.identify")){var s=this.get_distinct_id();this.register({$user_id:e}),this.get_property("$device_id")||this.register_once({$had_persisted_distinct_id:!0,$device_id:s},""),e!==s&&e!==this.get_property(eN)&&(this.unregister(eN),this.register({distinct_id:e}));var r="anonymous"===(this.persistence.get_property(e8)||"anonymous");e!==s&&r?(this.persistence.set_property(e8,"identified"),this.setPersonPropertiesForFlags(f({},i||{},t||{}),!1),this.capture("$identify",{distinct_id:e,$anon_distinct_id:s},{$set:t||{},$set_once:i||{}}),this.wr=rs(e,t,i),this.featureFlags.setAnonymousDistinctId(s)):(t||i)&&this.setPersonProperties(t,i),e!==s&&(this.reloadFeatureFlags(),this.unregister(e5))}}else ew.critical('The string "'+ts+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.');else ew.error("Unique user id has not been set in posthog.identify")}setPersonProperties(e,t){if((e||t)&&this.zr("posthog.setPersonProperties")){var i=rs(this.get_distinct_id(),e,t);this.wr!==i?(this.setPersonPropertiesForFlags(f({},t||{},e||{})),this.capture("$set",{$set:e||{},$set_once:t||{}}),this.wr=i):ew.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}group(e,t,i){if(e&&t){if(this.zr("posthog.group")){var s=this.getGroups();s[e]!==t&&this.resetGroupPropertiesForFlags(e),this.register({$groups:f({},s,{[e]:t})}),i&&(this.capture("$groupidentify",{$group_type:e,$group_key:t,$group_set:i}),this.setGroupPropertiesForFlags({[e]:i})),s[e]===t||i||this.reloadFeatureFlags()}}else ew.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(e,t){void 0===t&&(t=!0),this.featureFlags.setPersonPropertiesForFlags(e,t)}resetPersonPropertiesForFlags(){this.featureFlags.resetPersonPropertiesForFlags()}setGroupPropertiesForFlags(e,t){void 0===t&&(t=!0),this.zr("posthog.setGroupPropertiesForFlags")&&this.featureFlags.setGroupPropertiesForFlags(e,t)}resetGroupPropertiesForFlags(e){this.featureFlags.resetGroupPropertiesForFlags(e)}reset(e){if(ew.info("reset"),!this.__loaded)return ew.uninitializedWarning("posthog.reset");var t,i,s,r,n=this.get_property("$device_id");if(this.consent.reset(),null==(t=this.persistence)||t.clear(),null==(i=this.sessionPersistence)||i.clear(),this.surveys.reset(),this.featureFlags.reset(),null==(s=this.persistence)||s.set_property(e8,"anonymous"),null==(r=this.sessionManager)||r.resetSessionId(),this.wr=null,"always"===this.config.cookieless_mode)this.register_once({distinct_id:ts,$device_id:null},"");else{var a=this.config.get_device_id(tZ());this.register_once({distinct_id:a,$device_id:e?a:n},"")}this.register({$last_posthog_reset:(new Date).toISOString()},1)}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var e,t;return null!=(e=null==(t=this.sessionManager)?void 0:t.checkAndGetSessionAndWindowId(!0).sessionId)?e:""}get_session_replay_url(e){if(!this.sessionManager)return"";var{sessionId:t,sessionStartTimestamp:i}=this.sessionManager.checkAndGetSessionAndWindowId(!0),s=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+t);if(null!=e&&e.withTimestamp&&i){var r,n=null!=(r=e.timestampLookBack)?r:10;if(!i)return s;s+="?t="+Math.max(Math.floor(((new Date).getTime()-i)/1e3)-n,0)}return s}alias(e,t){return e===this.get_property(eL)?(ew.critical("Attempting to create alias for existing People user - aborting."),-2):this.zr("posthog.alias")?(R(t)&&(t=this.get_distinct_id()),e!==t?(this.Hr(eN,e),this.capture("$create_alias",{alias:e,distinct_id:t})):(ew.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}set_config(e){var t=f({},this.config);if(C(e)){e$(this.config,nt(e));var i,s,r,n,a,o=this.kr();null==(i=this.persistence)||i.update_config(this.config,t,o),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new ry(f({},this.config,{persistence:"sessionStorage"}),o);var l=this.$r(this.config.debug);j(l)&&(this.config.debug=l),j(this.config.debug)&&(this.config.debug?(g.DEBUG=!0,t5.H()&&t5.G("ph_debug","true"),ew.info("set_config",{config:e,oldConfig:t,newConfig:f({},this.config)})):(g.DEBUG=!1,t5.H()&&t5.V("ph_debug"))),null==(s=this.sessionRecording)||s.startIfEnabledOrStop(),null==(r=this.autocapture)||r.startIfEnabled(),null==(n=this.heatmaps)||n.startIfEnabled(),this.surveys.loadIfEnabled(),this.Br(),null==(a=this.externalIntegrations)||a.startIfEnabledOrStop()}}startSessionRecording(e){var t,i,s,r,n,a=!0===e,o={sampling:a||!(null==e||!e.sampling),linked_flag:a||!(null==e||!e.linked_flag),url_trigger:a||!(null==e||!e.url_trigger),event_trigger:a||!(null==e||!e.event_trigger)};Object.values(o).some(Boolean)&&(null==(t=this.sessionManager)||t.checkAndGetSessionAndWindowId(),o.sampling&&(null==(i=this.sessionRecording)||i.overrideSampling()),o.linked_flag&&(null==(s=this.sessionRecording)||s.overrideLinkedFlag()),o.url_trigger&&(null==(r=this.sessionRecording)||r.overrideTrigger("url")),o.event_trigger&&(null==(n=this.sessionRecording)||n.overrideTrigger("event"))),this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var e;return!(null==(e=this.sessionRecording)||!e.started)}captureException(e,t){var i=Error("PostHog syntheticException"),s=this.exceptions.buildProperties(e,{handled:!0,syntheticException:i});return this.exceptions.sendExceptionEvent(f({},s,t))}loadToolbar(e){return this.toolbar.loadToolbar(e)}get_property(e){var t;return null==(t=this.persistence)?void 0:t.props[e]}getSessionProperty(e){var t;return null==(t=this.sessionPersistence)?void 0:t.props[e]}toString(){var e,t=null!=(e=this.config.name)?e:r7;return t!==r7&&(t=r7+"."+t),t}_isIdentified(){var e,t;return"identified"===(null==(e=this.persistence)?void 0:e.get_property(e8))||"identified"===(null==(t=this.sessionPersistence)?void 0:t.get_property(e8))}Ur(){var e,t;return!("never"===this.config.person_profiles||"identified_only"===this.config.person_profiles&&
vendor: 4,742 bytes, line 1
1!this._isIdentified()&&T(this.getGroups())&&(null==(e=this.persistence)||null==(e=e.props)||!e[eN])&&(null==(t=this.persistence)||null==(t=t.props)||!t[tt]))}jr(){return!0===this.config.capture_pageleave||"if_capture_pageview"===this.config.capture_pageleave&&(!0===this.config.capture_pageview||"history_change"===this.config.capture_pageview)}createPersonProfile(){this.Ur()||this.zr("posthog.createPersonProfile")&&this.setPersonProperties({},{})}zr(e){return"never"===this.config.person_profiles?(ew.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.Hr(tt,!0),!0)}kr(){if("always"===this.config.cookieless_mode)return!0;var e=this.consent.isOptedOut(),t=this.config.opt_out_persistence_by_default||"on_reject"===this.config.cookieless_mode;return this.config.disable_persistence||e&&!!t}Br(){var e,t,i,s,r=this.kr();return(null==(e=this.persistence)?void 0:e.wi)!==r&&(null==(i=this.persistence)||i.set_disabled(r)),(null==(t=this.sessionPersistence)?void 0:t.wi)!==r&&(null==(s=this.sessionPersistence)||s.set_disabled(r)),r}opt_in_capturing(e){if("always"!==this.config.cookieless_mode){var t,i;"on_reject"===this.config.cookieless_mode&&this.consent.isExplicitlyOptedOut()&&(this.reset(!0),null==(t=this.sessionManager)||t.destroy(),this.sessionManager=new rV(this),this.persistence&&(this.sessionPropsManager=new rq(this,this.sessionManager,this.persistence)),this.sessionRecording=new r8(this),this.sessionRecording.startIfEnabledOrStop()),this.consent.optInOut(!0),this.Br(),this.Ar(),"on_reject"==this.config.cookieless_mode&&this.surveys.loadIfEnabled(),(R(null==e?void 0:e.captureEventName)||null!=e&&e.captureEventName)&&this.capture(null!=(i=null==e?void 0:e.captureEventName)?i:"$opt_in",null==e?void 0:e.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Dr()}else ew.warn('Consent opt in/out is not valid with cookieless_mode="always" and will be ignored')}opt_out_capturing(){var e,t;"always"!==this.config.cookieless_mode?("on_reject"===this.config.cookieless_mode&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.Br(),"on_reject"===this.config.cookieless_mode&&(this.register({distinct_id:ts,$device_id:null}),null==(e=this.sessionManager)||e.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,null==(t=this.sessionRecording)||t.stopRecording(),this.sessionRecording=void 0,this.Dr())):ew.warn('Consent opt in/out is not valid with cookieless_mode="always" and will be ignored')}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var e=this.consent.consent;return e===it.GRANTED?"granted":e===it.DENIED?"denied":"pending"}is_capturing(){return"always"===this.config.cookieless_mode||("on_reject"===this.config.cookieless_mode?this.consent.isExplicitlyOptedOut()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.Br()}_is_bot(){return a?rY(a,this.config.custom_blocked_useragents):void 0}Dr(){o&&("visible"===o.visibilityState?this.mr||(this.mr=!0,this.capture("$pageview",{title:o.title},{send_instantly:!0}),this.yr&&(o.removeEventListener("visibilitychange",this.yr),this.yr=null)):this.yr||(this.yr=this.Dr.bind(this),eD(o,"visibilitychange",this.yr)))}debug(e){!1===e?(null==t||t.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(null==t||t.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),this.set_config({debug:!0}))}M(){var e,t,i,s,r=this.Er||{};return"advanced_disable_flags"in r?!!r.advanced_disable_flags:!1!==this.config.advanced_disable_flags?!!this.config.advanced_disable_flags:!0===this.config.advanced_disable_decide?(ew.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(t="advanced_disable_decide",i=(e="advanced_disable_flags")in r&&!R(r[e]),s=t in r&&!R(r[t]),i?r[e]:!!s&&(ew&&ew.warn("Config field '"+t+"' is deprecated. Please use '"+e+"' instead. The old field will be removed in a future major version."),r[t]))}Nr(e){if(L(this.config.before_send))return e;var t=I(this.config.before_send)?this.config.before_send:[this.config.before_send],i=e;for(var s of t){if(L(i=s(i))){var r="Event '"+e.event+"' was rejected in beforeSend function";return H(e.event)?ew.warn(r+". This can cause unexpected behavior."):ew.info(r),null}i.properties&&!T(i.properties)||ew.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}return i}getPageViewId(){var e;
1return null==(e=this.pageViewManager.Vt)?void 0:e.pageViewId}captureTraceFeedback(e,t){this.capture("$ai_feedback",{$ai_trace_id:String(e),$ai_feedback_text:t})}captureTraceMetric(e,t,i){this.capture("$ai_metric",{$ai_trace_id:String(e),$ai_metric_name:t,$ai_metric_value:String(i)})}$r(e){var t=j(e)&&!e,i=t5.H()&&"true"===t5.q("ph_debug");return!t&&(!!i||e)}}for(var nr=["identify"],nn=0;nn<nr.length;nn++)ns.prototype[nr[nn]]=eT(ns.prototype[nr[nn]]);var na,no,nl,nc,nu,nh,nd,np,ng,n_,nv,nf,nm,ny,nb,nw=(nb=r6[r7]=new ns,function(){function e(){e.done||(e.done=!0,r9=!1,eF(r6,function(e){e._dom_loaded()}))}null!=o&&o.addEventListener?"complete"===o.readyState?e():eD(o,"DOMContentLoaded",e,{capture:!1}):t&&ew.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")}(),nb);e.s(["default",0,nw])}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.