1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,676640,e=>{"use strict";let t,i;var s=e.i(119584);e.i(442349);var r="u">typeof window?window:void 0,n="u">typeof globalThis?globalThis:r,o=Array.prototype,a=o.forEach,l=o.indexOf,c=null==n?void 0:n.navigator,u=null==n?void 0:n.document,h=null==n?void 0:n.location,d=null==n?void 0:n.fetch,p=null!=n&&n.XMLHttpRequest&&"withCredentials"in new n.XMLHttpRequest?n.XMLHttpRequest:void 0,g=null==n?void 0:n.AbortController,_=null==c?void 0:c.userAgent,v=null!=r?r:{},f={DEBUG:!1,LIB_VERSION:"1.266.0"};function m(){return(m=Object.assign.bind()).apply(null,arguments)}function y(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 b=["$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 w(e,t){return -1!==e.indexOf(t)}var E=function(e){return e.trim()},x=function(e){return e.replace(/^\$/,"")},S=Array.isArray,k=Object.prototype,I=k.hasOwnProperty,P=k.toString,$=S||function(e){return"[object Array]"===P.call(e)},F=e=>"function"==typeof e,R=e=>e===Object(e)&&!$(e),C=e=>{if(R(e)){for(var t in e)if(I.call(e,t))return!1;return!0}return!1},T=e=>void 0===e,A=e=>"[object String]"==P.call(e),O=e=>A(e)&&0===e.trim().length,M=e=>null===e,D=e=>T(e)||M(e),L=e=>"[object Number]"==P.call(e),N=e=>"[object Boolean]"===P.call(e),j=e=>w(b,e),H=[!0,"true",1,"1","yes"],U=[!1,"false",0,"0","no"];function q(e,t,i,s,r){return t>i&&(s.warn("min cannot be greater than max."),t=i),L(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),q(r||i,t,i,s))}class B{stop(){this.t&&(clearInterval(this.t),this.t=void 0)}constructor(e){this.i=e,this.o={},this.h=()=>{Object.keys(this.o).forEach(e=>{var t=this.m(e)+this.S;t>=this.$?delete this.o[e]:this.k(e,t)})},this.m=e=>this.o[String(e)],this.k=(e,t)=>{this.o[String(e)]=t},this.consumeRateLimit=e=>{var t,i=null!=(t=this.m(e))?t:this.$;if(0===(i=Math.max(i-1,0)))return!0;this.k(e,i);var s,r=0===i;return r&&(null==(s=this.I)||s.call(this,e)),r},this.I=this.i.I,this.$=q(this.i.bucketSize,0,100,this.i.P),this.S=q(this.i.refillRate,0,this.$,this.i.P),this.R=q(this.i.refillInterval,0,864e5,this.i.P),this.t=setInterval(()=>{this.h()},this.R)}}var z=e=>{var t={T:function(t){if(r&&(f.DEBUG||v.POSTHOG_DEBUG)&&!T(r.console)&&r.console){for(var i=("__rrweb_original__"in r.console[t])?r.console[t].__rrweb_original__:r.console[t],s=arguments.length,n=Array(s>1?s-1:0),o=1;o<s;o++)n[o-1]=arguments[o];i(e,...n)}},info:function(){for(var e=arguments.length,i=Array(e),s=0;s<e;s++)i[s]=arguments[s];t.T("log",...i)},warn:function(){for(var e=arguments.length,i=Array(e),s=0;s<e;s++)i[s]=arguments[s];t.T("warn",...i)},error:function(){for(var e=arguments.length,i=Array(e),s=0;s<e;s++)i[s]=arguments[s];t.T("error",...i)},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=>{t.error("You must initialize PostHog before calling "+e)},createLogger:t=>z(e+" "+t)};return t},G=z("[PostHog.js]"),W=G.createLogger,V=W("[ExternalScriptsLoader]"),Y=(e,t,i)=>{if(e.config.disable_external_dependency_loading)return V.warn(t+" was requested but loading of external scripts is disabled."),i("Loading of external scripts is disabled");var s=null==u?void 0:u.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 o=()=>{if(!u)return i("document not found");var s=u.createElement("script");
vendor: 5,226 bytes, line 1
1if(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=u.querySelectorAll("body > script");n.length>0?null==(r=n[0].parentNode)||r.insertBefore(s,n[0]):u.body.appendChild(s)};null!=u&&u.body?o():null==u||u.addEventListener("DOMContentLoaded",o)};v.__PosthogExtensions__=v.__PosthogExtensions__||{},v.__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);Y(e,r,i)},v.__PosthogExtensions__.loadSiteApp=(e,t,i)=>{var s=e.requestRouter.endpointFor("api",t);Y(e,s,i)};var K={};function X(e,t,i){if($(e)){if(a&&e.forEach===a)e.forEach(t,i);else if("length"in e&&e.length===+e.length){for(var s=0,r=e.length;s<r;s++)if(s in e&&t.call(i,e[s],s)===K)return}}}function J(e,t,i){if(!D(e)){if($(e))return X(e,t,i);if(e instanceof FormData){for(var s of e.entries())if(t.call(i,s[1],s[0])===K)return}else for(var r in e)if(I.call(e,r)&&t.call(i,e[r],r)===K)return}}var Z=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 X(i,function(t){for(var i in t)void 0!==t[i]&&(e[i]=t[i])}),e},Q=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 X(i,function(t){X(t,function(t){e.push(t)})}),e};function ee(e){for(var t=Object.keys(e),i=t.length,s=Array(i);i--;)s[i]=[t[i],e[t[i]]];return s}var et=function(e){try{return e()}catch(e){return}},ei=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){G.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),G.critical(e)}}},es=function(e){var t={};return J(e,function(e,i){(A(e)&&e.length>0||L(e))&&(t[i]=e)}),t},er=["herokuapp.com","vercel.app","netlify.app"];function en(e,t){for(var i=0;i<e.length;i++)if(t(e[i]))return e[i]}function eo(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 ea="$people_distinct_id",el="__alias",ec="__timers",eu="$autocapture_disabled_server_side",eh="$heatmaps_enabled_server_side",ed="$exception_capture_enabled_server_side",ep="$error_tracking_suppression_rules",eg="$error_tracking_capture_extension_exceptions",e_="$web_vitals_enabled_server_side",ev="$dead_clicks_enabled_server_side",ef="$web_vitals_allowed_metrics",em="$session_recording_enabled_server_side",ey="$console_log_recording_enabled_server_side",eb="$session_recording_network_payload_capture",ew="$session_recording_masking",eE="$session_recording_canvas_recording",ex="$replay_sample_rate",eS="$replay_minimum_duration",ek="$replay_script_config",eI="$sesid",eP="$session_is_sampled",e$="$session_recording_url_trigger_activated_session",eF="$session_recording_event_trigger_activated_session",eR="$enabled_feature_flags",eC="$early_access_features",eT="$feature_flag_details",eA="$stored_person_properties",eO="$stored_group_properties",eM="$surveys",eD="$surveys_activated",eL="$flag_call_reported",eN="$user_state",ej="$client_session_props",eH="$capture_rate_limit",eU="$initial_campaign_params",eq="$initial_referrer_info",eB="$initial_person_info",ez="$epp",eG="__POSTHOG_TOOLBAR__",eW="$posthog_cookieless",eV=[ea,el,"__cmpns",ec,em,eh,eI,eR,ep,eN,eC,eT,eO,eA,eM,eL,ej,eH,eU,eq,ez,eB];function eY(e){return e instanceof Element&&(e.id===eG||!(null==e.closest||!e.closest(".toolbar-global-fade-container")))}function eK(e){return!!e&&1===e.nodeType}function eX(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function eJ(e){return!!e&&3===e.nodeType}function eZ(e){return!!e&&11===e.nodeType}function eQ(e){return e?E(e).split(/\s+/):[]}function e0(e){var t=null==r?void 0:r.location.href;return!!(t&&e&&e.some(e=>t.match(e)))}function e1(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 eQ(t)}function e2(e){return D(e)?null:E(e).split(/(\s+)/).filter(e=>tn(e)).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function e3(e){var t="";return e8(e)&&!e7(e)&&e.childNodes&&e.childNodes.length&&J(e.childNodes,function(e){var i;eJ(e)&&e.textContent&&(t+=null!=(i=e2(e.textContent))?i:"")}),E(t)}function e5(e){var t;return T(e.target)?e.srcElement||null:null!=(t=e.target)&&t.shadowRoot?e.composedPath()[0]||null:e.target||null}var e4=["a","button","form","input","select","textarea","label"];function e6(e){var t=e.parentNode;return!(!t||!eK(t))&&t}function e8(e){for(var t=e;t.parentNode&&!eX(t,"body");t=t.parentNode){var i=e1(t);if(w(i,"ph-sensitive")||w(i,"ph-no-capture"))return!1}if(w(e1(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 e7(e){return!!(eX(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||eX(e,"select")||eX(e,"textarea")||"true"===e.getAttribute("contenteditable"))}var e9="(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})",te=RegExp("^(?:"+e9+")$"),tt=new RegExp(e9),ti="\\d{3}-?\\d{2}-?\\d{4}",ts=RegExp("^("+ti+")$"),tr=RegExp("("+ti+")");function tn(e,t){return void 0===t&&(t=!0),!(D(e)||A(e)&&(e=E(e),(t?te:tt).test((e||"").replace(/[- ]/g,""))||(t?ts:tr).test(e)))&&!0}function to(e){var t=e3(e);return tn(t=(t+" "+function e(t){var i="";return t&&t.childNodes&&t.childNodes.length&&J(t.childNodes,function(t){var s;if(t&&"span"===(null==(s=t.tagName)?void 0:s.toLowerCase()))try{var r=e3(t);i=(i+" "+r).trim(),t.childNodes&&t.childNodes.length&&(i=(i+" "+e(t)).trim())}catch(e){G.error("[AutoCapture]",e)}}),i}(e)).trim())?t:""}function ta(e){return e.replace(/"|\\"/g,'\\"')}class tl{constructor(){this.clicks=[]}isRageClick(e,t,i){var s=this.clicks[this.clicks.length-1];if(s&&Math.abs(e-s.x)+Math.abs(t-s.y)<30&&i-s.timestamp<1e3){if(this.clicks.push({x:e,y:t,timestamp:i}),3===this.clicks.length)return!0}else this.clicks=[{x:e,y:t,timestamp:i}];return!1}}var tc="$copy_autocapture",tu=((tS={}).GZipJS="gzip-js",tS.Base64="base64",tS),th=["fatal","error","warning","log","info","debug"],td=["localhost","127.0.0.1"],tp=e=>{var t=null==u?void 0:u.createElement("a");return T(t)?null:(t.href=e,t)},tg=function(e,t){void 0===t&&(t="&");var i,s,r=[];return J(e,function(e,t){T(e)||T(t)||"undefined"===t||(i=encodeURIComponent(e instanceof File?e.name:e.toString()),s=encodeURIComponent(t),r[r.length]=s+"="+i)}),r.join(t)},t_=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.length<2)return"";var o=i[1];try{o=decodeURIComponent(o)}catch(e){G.error("Skipping decoding for malformed query param: "+o)}return o.replace(/\+/g," ")},tv=function(e,t,i){if(!e||!t||!t.length)return e;for(var s=e.split("#"),r=s[0]||"",n=s[1],o=r.split("?"),a=o[1],l=o[0],c=(a||"").split("&"),u=[],h=0;h<c.length;h++){var d=c[h].split("=");$(d)&&(t.includes(d[0])?u.push(d[0]+"="+i):u.push(c[h]))}var p=l;return null!=a&&(p+="?"+u.join("&")),null!=n&&(p+="#"+n),p},tf=function(e,t){var i=e.match(RegExp(t+"=([^&]*)"));return i?i[1]:null},tm=W("[AutoCapture]");function ty(e,t){return t.length>e?t.slice(0,e)+"...":t}class tb{constructor(e){this.C=!1,this.M=null,this.rageclicks=new tl,this.O=!1,this.instance=e,this.F=null}get A(){var e,t,i=R(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}D(){if(this.isBrowserSupported()){if(r&&u){var e=e=>{e=e||(null==r?void 0:r.event);try{this.j(e)}catch(e){tm.error("Failed to capture event",e)}};if(eo(u,"submit",e,{capture:!0}),eo(u,"change",e,{capture:!0}),eo(u,"click",e,{capture:!0}),this.A.capture_copied_text){var t=e=>{e=e||(null==r?void 0:r.event),this.j(e,tc)};eo(u,"copy",t,{capture:!0}),eo(u,"cut",t,{capture:!0})}}}else tm.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.C&&(this.D(),this.C=!0)}onRemoteConfig(e){e.elementsChainAsString&&(this.O=e.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[eu]:!!e.autocapture_opt_out}),this.M=!!e.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(e){this.F=e}getElementSelectors(e){var t,i=[];return null==(t=this.F)||t.forEach(t=>{var s=null==u?void 0:u.querySelectorAll(t);null==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[eu];if(M(this.M)&&!N(i)&&!this.instance.L())return!1;var s=null!=(t=this.M)?t:!!i;return!!this.instance.config.autocapture&&!s}j(e,t){if(void 0===t&&(t="$autocapture"),this.isEnabled){var i,s=e5(e);eJ(s)&&(s=s.parentNode||null),"$autocapture"===t&&"click"===e.type&&e instanceof MouseEvent&&this.instance.config.rageclick&&null!=(i=this.rageclicks)&&i.isRageClick(e.clientX,e.clientY,(new Date).getTime())&&this.j(e,"$rageclick");var n=t===tc;if(s&&function(e,t,i,s,n){if(void 0===i&&(i=void 0),!r||!e||eX(e,"html")||!eK(e)||null!=(o=i)&&o.url_allowlist&&!e0(i.url_allowlist)||null!=(a=i)&&a.url_ignorelist&&e0(i.url_ignorelist))return!1;if(null!=(l=i)&&l.dom_event_allowlist){var o,a,l,c=i.dom_event_allowlist;if(c&&!c.some(e=>t.type===e))return!1}for(var u=!1,h=[e],d=!0,p=e;p.parentNode&&!eX(p,"body");)if(eZ(p.parentNode))h.push(p.parentNode.host),p=p.parentNode.host;else{if(!(d=e6(p)))break;if(s||e4.indexOf(d.tagName.toLowerCase())>-1)u=!0;else{var g=r.getComputedStyle(d);g&&"pointer"===g.getPropertyValue("cursor")&&(u=!0)}h.push(d),p=d}if(!function(e,t){var i=null==t?void 0:t.element_allowlist;if(T(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}(h,i)||!function(e,t){var i=null==t?void 0:t.css_selector_allowlist;if(T(i))return!0;var s,r=function(e){if(i.some(t=>e.matches(t)))return{v:!0}};for(var n of e)if(s=r(n))return s.v;return!1}(h,i))return!1;var _=r.getComputedStyle(e);
1if(_&&"pointer"===_.getPropertyValue("cursor")&&"click"===t.type)return!0;var v=e.tagName.toLowerCase();switch(v){case"html":return!1;case"form":return(n||["submit"]).indexOf(t.type)>=0;case"input":case"select":case"textarea":return(n||["change","click"]).indexOf(t.type)>=0;default:return u?(n||["click"]).indexOf(t.type)>=0:(n||["click"]).indexOf(t.type)>=0&&(e4.indexOf(v)>-1||"true"===e.getAttribute("contenteditable"))}}(s,e,this.A,n,n?["copy","cut"]:void 0)){var{props:o,explicitNoCapture:a}=function(e,t){for(var i,s,{e:n,maskAllElementAttributes:o,maskAllText:a,elementAttributeIgnoreList:l,elementsChainAsString:c}=t,u=[e],h=e;h.parentNode&&!eX(h,"body");)eZ(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(J(u,e=>{var t=e8(e);"a"===e.tagName.toLowerCase()&&(_=e.getAttribute("href"),_=t&&_&&tn(_)&&_),w(e1(e),"ph-no-capture")&&(v=!0),p.push(function(e,t,i,s){var r=e.tagName.toLowerCase(),n={tag_name:r};e4.indexOf(r)>-1&&!i&&("a"===r.toLowerCase()||"button"===r.toLowerCase()?n.$el_text=ty(1024,to(e)):n.$el_text=ty(1024,e3(e)));var o=e1(e);o.length>0&&(n.classes=o.filter(function(e){return""!==e})),J(e.attributes,function(i){var r;if((!e7(e)||-1!==["name","id","class","aria-label"].indexOf(i.name))&&(null==s||!s.includes(i.name))&&!t&&tn(i.value)&&(!A(r=i.name)||"_ngcontent"!==r.substring(0,10)&&"_nghost"!==r.substring(0,7))){var o=i.value;"class"===i.name&&(o=eQ(o).join(" ")),n["attr__"+i.name]=ty(1024,o)}});for(var a=1,l=1,c=e;c=function(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!eK(t))return t}(c);)a++,c.tagName===e.tagName&&l++;return n.nth_child=a,n.nth_of_type=l,n}(e,o,a,l)),Z(g,function(e){if(!e8(e))return{};var t={};return J(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&&tn(s)&&(t[i]=s)}}),t}(e))}),v)return{props:{},explicitNoCapture:v};if(a||("a"===e.tagName.toLowerCase()||"button"===e.tagName.toLowerCase()?p[0].$el_text=to(e):p[0].$el_text=e3(e)),_){p[0].attr__href=_;var f,y,b=null==(f=tp(_))?void 0:f.host,E=null==r||null==(y=r.location)?void 0:y.host;b&&E&&b!==E&&(d=_)}return{props:Z({$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)?$(t)?t:eQ(t):void 0,attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return ee(e).filter(e=>{var[t]=e;return 0===t.indexOf("attr__")}).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=m({},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),o={};return ee(n).sort((e,t)=>{var[i]=e,[s]=t;return i.localeCompare(s)}).forEach(e=>{var[t,i]=e;return o[ta(t.toString())]=ta(i.toString())}),s+=":",s+=ee(o).map(e=>{var[t,i]=e;return t+'="'+i+'"'}).join("")}).join(";")},null!=(i=p[0])&&i.$el_text?{$el_text:null==(s=p[0])?void 0:s.$el_text}:{},d&&"click"===n.type?{$external_click_url:d}:{},g)}}(s,{e:e,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.A.element_attribute_ignorelist,elementsChainAsString:this.O});if(a)return!1;var l=this.getElementSelectors(s);if(l&&l.length>0&&(o.$element_selectors=l),t===tc){var c,u=e2(null==r||null==(c=r.getSelection())?void 0:c.toString()),h=e.type||"clipboard";if(!u)return!1;o.$selected_content=u,o.$copy_type=h}return this.instance.capture(t,o),!0}}}isBrowserSupported(){return F(null==u?void 0:u.querySelectorAll)}}Math.trunc||(Math.trunc=function(e){return e<0?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return L(e)&&isFinite(e)&&Math.floor(e)===e});var tw="0123456789abcdef";class tE{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");
vendor: 4,930 bytes, line 1
1var 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 tE(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 tE(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 tx{constructor(){this.N=0,this.U=0,this.q=new tP}generate(){var e=this.generateOrAbort();if(T(e)){this.N=0;var t=this.generateOrAbort();if(T(t))throw Error("Could not generate UUID after timestamp reset");return t}return e}generateOrAbort(){var e=Date.now();if(e>this.N)this.N=e,this.B();else{if(!(e+1e4>this.N))return;this.U++,this.U>0x3ffffffffff&&(this.N++,this.B())}return tE.fromFieldsV7(this.N,Math.trunc(this.U/0x40000000),0x3fffffff&this.U,this.q.nextUint32())}B(){this.U=1024*this.q.nextUint32()+(1023&this.q.nextUint32())}}var tS,tk,tI=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};r&&!T(r.crypto)&&crypto.getRandomValues&&(tI=e=>crypto.getRandomValues(e));class tP{constructor(){this.H=new Uint32Array(8),this.W=1/0}nextUint32(){return this.W>=this.H.length&&(tI(this.H),this.W=0),this.H[this.W++]}}var t$=()=>tF().toString(),tF=()=>(tk||(tk=new tx)).generate(),tR="",tC=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,tT={G:()=>!!u,J:function(e){G.error("cookieStore error: "+e)},V:function(e){if(u){try{for(var t=e+"=",i=u.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}},K:function(e){var t;try{t=JSON.parse(tT.V(e))||{}}catch(e){}return t},Y:function(e,t,i,s,r){if(u)try{var n="",o="",a=function(e,t){if(t){var i=function(e,t){if(void 0===t&&(t=u),tR)return tR;if(!t||["localhost","127.0.0.1"].includes(e))return"";for(var i=e.split("."),s=Math.min(i.length,8),r="dmn_chk_"+t$();!tR&&s--;){var n=i.slice(s).join("."),o=r+"=1;domain=."+n+";path=/";t.cookie=o+";max-age=3",t.cookie.includes(r)&&(t.cookie=o+";max-age=0",tR=n)}return tR}(e);if(!i){var s,r=(s=e.match(tC))?s[0]:"";r!==i&&G.info("Warning: cookie subdomain discovery mismatch",r,i),i=r}return i?"; domain=."+i:""}return""}(u.location.hostname,s);if(i){var l=new Date;l.setTime(l.getTime()+24*i*36e5),n="; expires="+l.toUTCString()}r&&(o="; secure");var c=e+"="+encodeURIComponent(JSON.stringify(t))+n+"; SameSite=Lax; path=/"+a+o;return c.length>3686.4&&G.warn("cookieStore warning: large cookie, len="+c.length),u.cookie=c,c}catch(e){return}},X:function(e,t){if(null!=u&&u.cookie)try{tT.Y(e,"",-1,t)}catch(e){return}}},tA=null,tO={G:function(){if(!M(tA))return tA;var e=!0;if(T(r))e=!1;else try{var t="__mplssupport__";tO.Y(t,"xyz"),'"xyz"'!==tO.V(t)&&(e=!1),tO.X(t)}catch(t){e=!1}return e||G.error("localStorage unsupported; falling back to cookie store"),tA=e,e},J:function(e){G.error("localStorage error: "+e)},V:function(e){try{return null==r?void 0:r.localStorage.getItem(e)}catch(e){tO.J(e)}return null},K:function(e){try{return JSON.parse(tO.V(e))||{}}catch(e){}return null},Y:function(e,t){try{null==r||r.localStorage.setItem(e,JSON.stringify(t))}catch(e){tO.J(e)}},X:function(e){try{null==r||r.localStorage.removeItem(e)}catch(e){tO.J(e)}}},tM=["distinct_id",eI,eP,ez,eB],tD=m({},tO,{K:function(e){try{var t={};try{t=tT.K(e)||{}}catch(e){}var i=Z(t,JSON.parse(tO.V(e)||"{}"));return tO.Y(e,i),i}catch(e){}return null},Y:function(e,t,i,s,r,n){try{tO.Y(e,t,void 0,void 0,n);var o={};tM.forEach(e=>{t[e]&&(o[e]=t[e])}),Object.keys(o).length&&tT.Y(e,o,i,s,r,n)}catch(e){tO.J(e)}},X:function(e,t){try{null==r||r.localStorage.removeItem(e),tT.X(e,t)}catch(e){tO.J(e)}}}),tL={},tN={G:function(){return!0},J:function(e){G.error("memoryStorage error: "+e)},V:function(e){return tL[e]||null},K:function(e){return tL[e]||null},Y:function(e,t){tL[e]=t},X:function(e){delete tL[e]}},tj=null,tH={G:function(){if(!M(tj))return tj;if(tj=!0,T(r))tj=!1;else try{var e="__support__";tH.Y(e,"xyz"),'"xyz"'!==tH.V(e)&&(tj=!1),tH.X(e)}catch(e){tj=!1}return tj},J:function(e){G.error("sessionStorage error: ",e)},V:function(e){try{return null==r?void 0:r.sessionStorage.getItem(e)}catch(e){tH.J(e)}return null},K:function(e){try{return JSON.parse(tH.V(e))||null}catch(e){}return null},Y:function(e,t){try{null==r||r.sessionStorage.setItem(e,JSON.stringify(t))}catch(e){tH.J(e)}},X:function(e){try{null==r||r.sessionStorage.removeItem(e)}catch(e){tH.J(e)}}},tU=((t2={}
1)[t2.PENDING=-1]="PENDING",t2[t2.DENIED=0]="DENIED",t2[t2.GRANTED=1]="GRANTED",t2);class tq{constructor(e){this._instance=e}get A(){return this._instance.config}get consent(){return this.Z()?tU.DENIED:this.tt}isOptedOut(){return"always"===this.A.cookieless_mode||this.consent===tU.DENIED||this.consent===tU.PENDING&&(this.A.opt_out_capturing_by_default||"on_reject"===this.A.cookieless_mode)}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===tU.DENIED}optInOut(e){this.it.Y(this.et,+!!e,this.A.cookie_expiration,this.A.cross_subdomain_cookie,this.A.secure_cookie)}reset(){this.it.X(this.et,this.A.cross_subdomain_cookie)}get et(){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 tt(){var e=this.it.V(this.et);return w(H,e)?tU.GRANTED:w(U,e)?tU.DENIED:tU.PENDING}get it(){if(!this.rt){var e=this.A.opt_out_capturing_persistence_type;this.rt="localStorage"===e?tO:tT;var t="localStorage"===e?tT:tO;t.V(this.et)&&(this.rt.V(this.et)||this.optInOut(w(H,t.V(this.et))),t.X(this.et,this.A.cross_subdomain_cookie))}return this.rt}Z(){return!!this.A.respect_dnt&&!!en([null==c?void 0:c.doNotTrack,null==c?void 0:c.msDoNotTrack,v.doNotTrack],e=>w(H,e))}}var tB=W("[Dead Clicks]"),tz=()=>!0,tG=e=>{var t,i=!(null==(t=e.instance.persistence)||!t.get_property(ev)),s=e.instance.config.capture_dead_clicks;return N(s)?s:i};class tW{get lazyLoadedDeadClicksAutocapture(){return this.st}constructor(e,t,i){this.instance=e,this.isEnabled=t,this.onCapture=i,this.startIfEnabled()}onRemoteConfig(e){this.instance.persistence&&this.instance.persistence.register({[ev]:null==e?void 0:e.captureDeadClicks}),this.startIfEnabled()}startIfEnabled(){this.isEnabled(this)&&this.nt(()=>{this.ot()})}nt(e){var t,i;null!=(t=v.__PosthogExtensions__)&&t.initDeadClicksAutocapture&&e(),null==(i=v.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this.instance,"dead-clicks-autocapture",t=>{t?tB.error("failed to load script",t):e()})}ot(){var e;if(u){if(!this.st&&null!=(e=v.__PosthogExtensions__)&&e.initDeadClicksAutocapture){var t=R(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};t.__onCapture=this.onCapture,this.st=v.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,t),this.st.start(u),tB.info("starting...")}}else tB.error("`document` not found. Cannot start.")}stop(){this.st&&(this.st.stop(),this.st=void 0,tB.info("stopping..."))}}var tV=W("[ExceptionAutocapture]");class tY{constructor(e){var t,i,s;this.lt=()=>{var e;if(r&&this.isEnabled&&null!=(e=v.__PosthogExtensions__)&&e.errorWrappingFunctions){var t=v.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,i=v.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,s=v.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.ht&&this.A.capture_unhandled_errors&&(this.ht=t(this.captureException.bind(this))),!this.ut&&this.A.capture_unhandled_rejections&&(this.ut=i(this.captureException.bind(this))),!this.dt&&this.A.capture_console_errors&&(this.dt=s(this.captureException.bind(this)))}catch(e){tV.error("failed to start",e),this.vt()}}},this._instance=e,this.ct=!(null==(t=this._instance.persistence)||!t.props[ed]),this.A=this.ft(),this.gt=new B({refillRate:null!=(i=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)?i:1,bucketSize:null!=(s=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)?s:10,refillInterval:1e4,P:tV}),this.startIfEnabled()}ft(){var e=this._instance.config.capture_exceptions,t={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return R(e)?t=m({},t,e):(T(e)?this.ct:e)&&(t=m({},t,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),t}get isEnabled(){return this.A.capture_console_errors||this.A.capture_unhandled_errors||this.A.capture_unhandled_rejections}startIfEnabled(){this.isEnabled&&(tV.info("enabled"),this.nt(this.lt))}nt(e){var t,i;null!=(t=v.__PosthogExtensions__)&&t.errorWrappingFunctions&&e(),null==(i=v.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"exception-autocapture",t=>{if(t)return tV.error("failed to load script",t);e()})}vt(){var e,t,i;null==(e=this.ht)||e.call(this),this.ht=void 0,null==(t=this.ut)||t.call(this),this.ut=void 0,null==(i=this.dt)||i.call(this),this.dt=void 0}onRemoteConfig(e){var t=e.autocaptureExceptions;this.ct=!!t,this.A=this.ft(),this._instance.persistence&&this._instance.persistence.register({[ed]:this.ct}),this.startIfEnabled()}captureException(e){e.$exception_personURL=this._instance.requestRouter.endpointFor("ui")+"/project/"+this._instance.config.token+"/pers
1on/"+this._instance.get_distinct_id();var t,i=null!=(t=e.$exception_list[0].type)?t:"Exception";this.gt.consumeRateLimit(i)?tV.info("Skipping exception capture because of client rate limiting.",{exception:e.$exception_list[0].type}):this._instance.exceptions.sendExceptionEvent(e)}}function tK(e){return!T(Event)&&tX(e,Event)}function tX(e,t){try{return e instanceof t}catch(e){return!1}}function tJ(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object DOMError]":return!0;default:return tX(e,Error)}}function tZ(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function tQ(e){return tZ(e,"DOMError")}var t0=/\(error: (.*)\)/;function t1(e,t,i,s){var r={platform:"web:javascript",filename:e,function:"<anonymous>"===t?"?":t,in_app:!0};return T(i)||(r.lineno=i),T(s)||(r.colno=s),r}var t2,t3,t5,t4,t6=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,t8=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,t7=/\((\S*)(?::(\d+))(?::(\d+))\)/,t9=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ie=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,it=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];var s=t.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return function(e,t){void 0===t&&(t=0);for(var i=[],r=e.split("\n"),n=t;n<r.length;n++){var o=r[n];if(!(o.length>1024)){var a=t0.test(o)?o.replace(t0,"$1"):o;if(!a.match(/\S*Error: /)){for(var l of s){var c=l(a);if(c){i.push(c);break}}if(i.length>=50)break}}}if(!i.length)return[];var u=Array.from(i);return u.reverse(),u.slice(0,50).map(e=>{var t;return m({},e,{filename:e.filename||((t=u)[t.length-1]||{}).filename,function:e.function||"?"})})}}([30,e=>{var t=t6.exec(e);if(t){var[,i,s,r]=t;return t1(i,"?",+s,+r)}var n=t8.exec(e);if(n){if(n[2]&&0===n[2].indexOf("eval")){var o=t7.exec(n[2]);o&&(n[2]=o[1],n[3]=o[2],n[4]=o[3])}var[a,l]=ii(n[1]||"?",n[2]);return t1(l,a,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],[50,e=>{var t=t9.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){var i=ie.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}var s=t[3],r=t[1]||"?";return[r,s]=ii(r,s),t1(s,r,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]),ii=(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]},is=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;function ir(e,t){void 0===t&&(t=0);var i=e.stacktrace||e.stack||"",s=e&&io.test(e.message)?1:0;try{var r,n,o=(r=it(i,s),n=function(e){var t=globalThis._posthogChunkIds;if(!t)return{};var i=Object.keys(t);return t4&&i.length===t5||(t5=i.length,t4=i.reduce((i,s)=>{t3||(t3={});var r=t3[s];if(r)i[r[0]]=r[1];else for(var n=e(s),o=n.length-1;o>=0;o--){var a=n[o],l=null==a?void 0:a.filename,c=t[s];if(l&&c){i[l]=c,t3[s]=[l,c];break}}return i},{})),t4}(it),r.forEach(e=>{e.filename&&(e.chunk_id=n[e.filename])}),r);return o.slice(0,o.length-t)}catch(e){}return[]}var io=/Minified React error #\d+;/i;function ia(e,t){return{$exception_list:function e(t,i){var s,r,n,o,a,l,c,u,h=(s=t,r=i,l=ir(s),c=null==(o=null==r?void 0:r.handled)||o,u=null!=(a=null==r?void 0:r.synthetic)&&a,{type:null!=r&&r.overrideExceptionType?r.overrideExceptionType:s.name,value:(n=s.message).error&&"string"==typeof n.error.message?String(n.error.message):String(n),stacktrace:{frames:l,type:"raw"},mechanism:{handled:c,synthetic:u}});return t.cause&&tJ(t.cause)&&t.cause!==t?[h,...e(t.cause,{handled:null==i?void 0:i.handled,synthetic:null==i?void 0:i.synthetic})]:[h]}(e,t),$exception_level:"error"}}function il(e,t){var i,s,r,n=null==(i=null==t?void 0:t.handled)||i,o=null==(s=null==t?void 0:t.synthetic)||s,a={type:null!=t&&t.overrideExceptionType?t.overrideExceptionType:null!=(r=null==t?void 0:t.defaultExceptionType)?r:"Error",value:e||(null==t?void 0:t.defaultExceptionMessage),mechanism:{handled:n,synthetic:o}};if(null!=t&&t.syntheticException){var l=ir(t.syntheticException,1);l.length&&(a.stacktrace={frames:l,type:"raw"})}return{$exception_list:[a],$exception_level:"error"}}function ic(e,t,i){try{if(!(t in e))return()=>{};var s=e[t],r=i(s);return F(r)&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=r,()=>{e[t]=s}}catch(e){return()=>{}}}class iu{constructor(e){var t;this._instance=e,this._t=(null==r||null==(t=r.location)?void 0:t.pathname)||""}get isEnabled(){return"history_change"===this._instance.config.capture_pageview}startIfEnabled(){this.isEnabled&&(G.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.bt&&this.bt(),this.bt=void 0,G.info("History API monitoring stopped")}monitorHistoryChanges(){var e,t;if(r&&r.history){var i=this;null!=(e=r.history.pushState)&&e.__posthog_wrapped__||ic(r.history,"pushState",e=>function(t,s,r){e.call(this,t,s,r),i.yt("pushState")}),null!=(t=r.history.replaceState)&&t.__posthog_wrapped__||ic(r.history,"replaceState",e=>function(t,s,r){e.call(this,t,s,r),i.yt("replaceState")}),this.wt()}}yt(e){try{var t,i=null==r||null==(t=r.location)?void 0:t.pathname;if(!i)return;i!==this._t&&this.isEnabled&&this._instance.capture("$pageview",{navigation_type:e}),this._t=i}catch(t){G.error("Error capturing "+e+" pageview",t)}}wt(){if(!this.bt){var e=()=>{this.yt("popstate")};eo(r,"popstate",e),this.bt=()=>{r&&r.removeEventListener("popstate",e)}}}}function ih(e){var t,i;return(null==(t=JSON.stringify(e,(i=[],function(e,t){if(R(t)){for(;i.length>0&&i[i.length-1]!==this;)i.pop();return i.includes(t)?"[Circular]":(i.push(t),t)}return t})))?void 0:t.length)||0}var id=((t=id||{})[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t),ip=((i=ip||{})[i.Mutation=0]="Mutation",i[i.MouseMove=1]="MouseMove",i[i.MouseInteraction=2]="MouseInteraction",i[i.Scroll=3]="Scroll",i[i.ViewportResize=4]="ViewportResize",i[i.Input=5]="Input",i[i.TouchMove=6]="TouchMove",i[i.MediaInteraction=7]="MediaInteraction",i[i.StyleSheetRule=8]="StyleSheetRule",i[i.CanvasMutation=9]="CanvasMutation",i[i.Font=10]="Font",i[i.Log=11]="Log",i[i.Drag=12]="Drag",i[i.StyleDeclaration=13]="StyleDeclaration",i[i.Selection=14]="Selection",i[i.AdoptedStyleSheet=15]="AdoptedStyleSheet",i[i.CustomElement=16]="CustomElement",i),ig="[SessionRecording]",i_="redacted",iv={initiatorTypes:["audio","beacon","body","css","early-hint","embed","fetch","frame","iframe","icon","image","img","input","link","navigation","object","ping","script","track","video","xmlhttprequest"],maskRequestFn:e=>e,recordHeaders:!1,recordBody:!1,recordInitialRequests:!1,recordPerformance:!1,performanceEntryTypeToObserve:["first-input","navigation","paint","resource"],payloadSizeLimitBytes:1e6,payloadHostDenyList:[".lr-ingest.io",".ingest.sentry.io",".clarity.ms","analytics.google.com","bam.nr-data.net"]},im=["authorization","x-forwarded-for","authorization","cookie","set-cookie","x-api-key","x-real-ip","remote-addr","forwarded","proxy-authorization","x-csrf-token","x-csrftoken","x-xsrf-token"],iy=["password","secret","passwd","api_key","apikey","auth","credentials","mysql_pwd","privatekey","private_key","token"],ib=["/s/","/e/","/i/"];function iw(e,t,i,s){if(D(e))return e;var r=(null==t?void 0:t["content-length"])||new Blob([e]).size;return A(r)&&(r=parseInt(r)),r>i?ig+" "+s+" body too large to record ("+r+" bytes)":e}function iE(e,t){if(D(e))return e;var i=e;return tn(i,!1)||(i=ig+" "+t+" body "+i_),J(iy,e=>{var s,r;null!=(s=i)&&s.length&&-1!==(null==(r=i)?void 0:r.indexOf(e))&&(i=ig+" "+t+" body "+i_+" as might contain: "+e)}),i}class ix{constructor(e,t){var i,s;void 0===t&&(t={}),this.St={},this.$t=e=>{if(!this.St[e]){this.St[e]=!0;var t,i,s=this.xt(e);null==(t=(i=this.i).onBlockedNode)||t.call(i,e,s)}},this.kt=e=>{var t=this.xt(e);if("svg"!==(null==t?void 0:t.nodeName)&&t instanceof Element){var i=t.closest("svg");if(i)return[this._rrweb.mirror.getId(i),i]}return[e,t]},this.xt=e=>this._rrweb.mirror.getNode(e),this.Et=e=>{var t,i,s,r,n,o,a,l;return(null!=(t=null==(i=e.removes)?void 0:i.length)?t:0)+(null!=(s=null==(r=e.attributes)?void 0:r.length)?s:0)+(null!=(n=null==(o=e.texts)?void 0:o.length)?n:0)+(null!=(a=null==(l=e.adds)?void 0:l.length)?a:0)},this.throttleMutations=e=>{if(3!==e.type||0!==e.data.source)return e;var t=e.data,i=this.Et(t);t.attributes&&(t.attributes=t.attributes.filter(e=>{var[t]=this.kt(e.id);return!this.gt.consumeRateLimit(t)&&e}));var s=this.Et(t);return 0!==s||i===s?e:void 0},this._rrweb=e,this.i=t,this.gt=new B({bucketSize:null!=(i=this.i.bucketSize)?i:100,refillRate:null!=(s=this.i.refillRate)?s:10,refillInterval:1e3,I:this.$t,P:G})}}var iS=Uint8Array,ik=Uint16Array,iI=Uint32Array,iP=new iS([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]),i$=new iS([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]),iF=new iS([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),iR=function(e,t){for(var i=new ik(31),s=0;s<31;++s)i[s]=t+=1<<e[s-1];var r=new iI(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]},iC=iR(iP,2),iT=iC[0],iA=iC[1];iT[28]=258,iA[258]=28;for(var iO=iR(i$,0)[1],iM=new ik(32768),iD=0;iD<32768;++iD){var iL=(43690&iD)>>>1|(21845&iD)<<1;iL=(61680&(iL=(52428&iL)>>>2|(13107&iL)<<2))>>>4|(3855&iL)<<4,iM[iD]=((65280&iL)>>>8|(255&iL)<<8)>>>1}var iN=function(e,t,i){for(var s=e.length,r=0,n=new ik(t);r<s;++r)++n[e[r]-1];var o,a=new ik(t);for(r=0;r<t;++r)a[r]=a[r-1]+n[r-1]<<1;if(i){o=new ik(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=a[e[r]-1]++<<u,d=h|(1<<u)-1;h<=d;++h)o[iM[h]>>>l]=c}else for(o=new ik(s),r=0;r<s;++r)o[r]=iM[a[e[r]-1]++]>>>15-e[r];return o},ij=new iS(288);for(iD=0;iD<144;++iD)ij[iD]=8;for(iD=144;iD<256;++iD)ij[iD]=9;for(iD=256;iD<280;++iD)ij[iD]=7;for(iD=280;iD<288;++iD)ij[iD]=8;var iH=new iS(32);for(iD=0;iD<32;++iD)iH[iD]=5;var iU=iN(ij,9,0),iq=iN(iH,5,0),iB=function(e){return(e/8|0)+(7&e&&1)},iz=function(e,t,i){(null==i||i>e.length)&&(i=e.length);var s=new(e instanceof ik?ik:e instanceof iI?iI:iS)(i-t);return s.set(e.subarray(t,i)),s},iG=function(e,t,i){i<<=7&t;var s=t/8|0;e[s]|=i,e[s+1]|=i>>>8},iW=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},iV=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 iS(0),0];if(1==r){var o=new iS(i[0].s+1);return o[i[0].s]=1,[o,1]}i.sort(function(e,t){return e.f-t.f}),i.push({s:-1,f:25001});var a=i[0],l=i[1],c=0,u=1,h=2;for(i[0]={s:-1,f:a.f+l.f,l:a,r:l};u!=r-1;)a=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:a.f+l.f,l:a,r:l};var d=n[0].s;for(s=1;s<r;++s)n[s].s>d&&(d=n[s].s);var p=new ik(d+1),g=iY(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 iS(p),g]},iY=function(e,t,i){return -1==e.s?Math.max(iY(e.l,t,i+1),iY(e.r,t,i+1)):t[e.s]=i},iK=function(e){for(var t=e.length;t&&!e[--t];);for(var i=new ik(++t),s=0,r=e[0],n=1,o=function(e){i[s++]=e},a=1;a<=t;++a)if(e[a]==r&&a!=t)++n;else{if(!r&&n>2){for(;n>138;n-=138)o(32754);n>2&&(o(n>10?n-11<<5|28690:n-3<<5|12305),n=0)}else if(n>3){for(o(r),--n;n>6;n-=6)o(8304);n>2&&(o(n-3<<5|8208),n=0)}for(;n--;)o(r);n=1,r=e[a]}return[i.subarray(0,s),t]},iX=function(e,t){for(var i=0,s=0;s<t.length;++s)i+=e[s]*t[s];return i},iJ=function(e,t,i){var s=i.length,r=iB(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)},iZ=function(e,t,i,s,r,n,o,a,l,c,u){iG(t,u++,i),++r[256];for(var h=iV(r,15),d=h[0],p=h[1],g=iV(n,15),_=g[0],v=g[1],f=iK(d),m=f[0],y=f[1],b=iK(_),w=b[0],E=b[1],x=new ik(19),S=0;S<m.length;++S)x[31&m[S]]++;for(S=0;S<w.length;++S)x[31&w[S]]++;for(var k=iV(x,7),I=k[0],P=k[1],$=19;$>4&&!I[iF[$-1]];--$);var F,R,C,T,A=c+5<<3,O=iX(r,ij)+iX(n,iH)+o,M=iX(r,d)+iX(n,_)+o+14+3*$+iX(x,I)+(2*x[16]+3*x[17]+7*x[18]);if(A<=O&&A<=M)return iJ(t,u,e.subarray(l,l+c));if(iG(t,u,1+(M<O)),u+=2,M<O){F=iN(d,p,0),R=d,C=iN(_,v,0),T=_;var D=iN(I,P,0);for(iG(t,u,y-257),iG(t,u+5,E-1),iG(t,u+10,$-4),u+=14,S=0;S<$;++S)iG(t,u+3*S,I[iF[S]]);u+=3*$;for(var L=[m,w],N=0;N<2;++N){var j=L[N];for(S=0;S<j.length;++S){var H=31&j[S];iG(t,u,D[H]),u+=I[H],H>
115&&(iG(t,u,j[S]>>>5&127),u+=j[S]>>>12)}}}else F=iU,R=ij,C=iq,T=iH;for(S=0;S<a;++S)if(s[S]>255){iW(t,u,F[(H=s[S]>>>18&31)+257]),u+=R[H+257],H>7&&(iG(t,u,s[S]>>>23&31),u+=iP[H]);var U=31&s[S];iW(t,u,C[U]),u+=T[U],U>3&&(iW(t,u,s[S]>>>5&8191),u+=i$[U])}else iW(t,u,F[s[S]]),u+=R[s[S]];return iW(t,u,F[256]),u+R[256]},iQ=new iI([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),i0=function(){for(var e=new iI(256),t=0;t<256;++t){for(var i=t,s=9;--s;)i=(1&i&&0xedb88320)^i>>>1;e[t]=i}return e}(),i1=function(){var e=0xffffffff;return{p:function(t){for(var i=e,s=0;s<t.length;++s)i=i0[255&i^t[s]]^i>>>8;e=i},d:function(){return 0xffffffff^e}}},i2=function(e,t,i){for(;i;++t)e[t]=i,i>>>=8},i3=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&&i2(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)}};function i5(e,t){void 0===t&&(t={});var i,s,r,n=i1(),o=e.length;n.p(e);var a=(s=t,r=10+((i=t).filename&&i.filename.length+1||0),function(e,t,i,s,r,n){var o=e.length,a=new iS(s+o+5*(1+Math.floor(o/7e3))+8),l=a.subarray(s,a.length-8),c=0;if(!t||o<8)for(var u=0;u<=o;u+=65535){var h=u+65535;h<o?c=iJ(l,c,e.subarray(u,h)):(l[u]=n,c=iJ(l,c,e.subarray(u,o)))}else{for(var d=iQ[t-1],p=d>>>13,g=8191&d,_=(1<<i)-1,v=new ik(32768),f=new ik(_+1),m=Math.ceil(i/3),y=2*m,b=function(t){return(e[t]^e[t+1]<<m^e[t+2]<<y)&_},w=new iI(25e3),E=new ik(288),x=new ik(32),S=0,k=0,I=(u=0,0),P=0,$=0;u<o;++u){var F=b(u),R=32767&u,C=f[F];if(v[R]=C,f[F]=R,P<=u){var T=o-u;if((S>7e3||I>24576)&&T>423){c=iZ(e,l,0,w,E,x,k,I,$,u-$,c),I=S=k=0,$=u;for(var A=0;A<286;++A)E[A]=0;for(A=0;A<30;++A)x[A]=0}var O=2,M=0,D=g,L=R-C&32767;if(T>2&&F==b(u-L))for(var N=Math.min(p,T)-1,j=Math.min(32767,u),H=Math.min(258,T);L<=j&&--D&&R!=C;){if(e[u+O]==e[u+O-L]){for(var U=0;U<H&&e[u+U]==e[u+U-L];++U);if(U>O){if(O=U,M=L,U>N)break;var q=Math.min(L,U-2),B=0;for(A=0;A<q;++A){var z=u-L+A+32768&32767,G=z-v[z]+32768&32767;G>B&&(B=G,C=z)}}}L+=(R=C)-(C=v[R])+32768&32767}if(M){w[I++]=0x10000000|iA[O]<<18|iO[M];var W=31&iA[O],V=31&iO[M];k+=iP[W]+i$[V],++E[257+W],++x[V],P=u+O,++S}else w[I++]=e[u],++E[e[u]]}}c=iZ(e,l,n,w,E,x,k,I,$,u-$,c)}return iz(a,0,s+iB(c)+8)}(e,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+s.mem,r,8,!0)),l=a.length;return i3(a,t),i2(a,l-8,n.d()),i2(a,l-4,o),a}function i4(e,t){var i=e.length;if("u">typeof TextEncoder)return(new TextEncoder).encode(e);for(var s=new iS(e.length+(e.length>>>1)),r=0,n=function(e){s[r++]=e},o=0;o<i;++o){if(r+5>s.length){var a=new iS(r+8+(i-o<<1));a.set(s),s=a}var l=e.charCodeAt(o);l<128||t?n(l):(l<2048?n(192|l>>>6):(l>55295&&l<57344?(n(240|(l=65536+(1047552&l)|1023&e.charCodeAt(++o))>>>18),n(128|l>>>12&63)):n(224|l>>>12),n(128|l>>>6&63)),n(128|63&l))}return iz(s,0,r)}var i6="disabled",i8="sampled",i7="active",i9="buffering",se="paused",st="trigger",si=st+"_activated",ss=st+"_pending",sr=st+"_"+i6;function sn(e,t){return t.some(t=>"regex"===t.matching&&new RegExp(t.url).test(e))}class so{constructor(e){this.It=e}triggerStatus(e){var t=this.It.map(t=>t.triggerStatus(e));return t.includes(si)?si:t.includes(ss)?ss:sr}stop(){this.It.forEach(e=>e.stop())}}class sa{constructor(e){this.It=e}triggerStatus(e){var t=new Set;for(var i of this.It)t.add(i.triggerStatus(e));switch(t.delete(sr),t.size){case 0:return sr;case 1:return Array.from(t)[0];default:return ss}}stop(){this.It.forEach(e=>e.stop())}}class sl{triggerStatus(){return ss}stop(){}}class sc{constructor(e){this.Pt=[],this.Rt=[],this.urlBlocked=!1,this._instance=e}onRemoteConfig(e){var t,i;this.Pt=(null==(t=e.sessionRecording)?void 0:t.urlTriggers)||[],this.Rt=(null==(i=e.sessionRecording)?void 0:i.urlBlocklist)||[]}Tt(e){var t;return 0===this.Pt.length?sr:(null==(t=this._instance)?void 0:t.get_property(e$))===e?si:ss}triggerStatus(e){var t=this.Tt(e),i=t===si?si:t===ss?ss:sr;return this._instance.register_for_session({$sdk_debug_replay_url_trigger_status:i}),i}checkUrlTriggerConditions(e,t,i){if(void 0!==r&&r.location.href){var s=r.location.href,n=this.urlBlocked,o=sn(s,this.Rt);n&&o||(o&&!n?e():!o&&n&&t(),sn(s,this.Pt)&&i("url"))}}stop(){}}class su{constructor(e){this.linkedFlag=null,this.linkedFlagSeen=!1,this.Ct=()=>{},this._instance=e}triggerStatus(){var e=ss;return D(this.linkedFlag)&&(e=sr),this.linkedFlagSeen&&(e=si),this._instance.register_for_session({$sdk_debug_replay_linked_flag_trigger_status:e}),e}onRemoteConfig(e,t){var i;if(this.linkedFlag=(null==(i=e.sessionRecording)?void 0:i.linkedFlag)||null,!D(this.linkedFlag)&&!this.linkedFlagSeen){var s=A(this.linkedFlag)?this.linkedFlag:this.linkedFlag.flag,r=A(this.linkedFlag)?null:this.linkedFlag.variant;this.Ct=this._instance.onFeatureFlags((e,i)=>{var n=!1;if(R(i)&&s in i){var o=i[s];n=N(o)?!0===o:r?o===r:!!o}this.linkedFlagSeen=n,n&&t(s,r)})}}stop(){this.Ct()}}class sh{constructor(e){this.Mt=[],this._instance=e}onRemoteConfig(e){var t;this.Mt=(null==(t=e.sessionRecording)?void 0:t.eventTriggers)||[]}Ot(e){var t;return 0===this.Mt.length?sr:(null==(t=this._instance)?void 0:t.get_property(eF))===e?si:ss}
1triggerStatus(e){var t=this.Ot(e),i=t===si?si:t===ss?ss:sr;return this._instance.register_for_session({$sdk_debug_replay_event_trigger_status:i}),i}stop(){}}function sd(e){return e.isRecordingEnabled?i9:i6}function sp(e){if(!e.receivedFlags)return i9;if(!e.isRecordingEnabled)return i6;if(e.urlTriggerMatching.urlBlocked)return se;var t=!0===e.isSampled,i=new so([e.eventTriggerMatching,e.urlTriggerMatching,e.linkedFlagMatching]).triggerStatus(e.sessionId);return t?i8:i===si?i7:i===ss?i9:!1===e.isSampled?i6:i7}function sg(e){if(!e.receivedFlags)return i9;if(!e.isRecordingEnabled)return i6;if(e.urlTriggerMatching.urlBlocked)return se;var t=new sa([e.eventTriggerMatching,e.urlTriggerMatching,e.linkedFlagMatching]).triggerStatus(e.sessionId),i=t!==sr,s=N(e.isSampled);return i&&t===ss?i9:i&&t===sr||s&&!e.isSampled?i6:!0===e.isSampled?i8:i7}var s_="[SessionRecording]",sv=W(s_);function sf(){var e;return null==v||null==(e=v.__PosthogExtensions__)||null==(e=e.rrweb)?void 0:e.record}var sm=[ip.MouseMove,ip.MouseInteraction,ip.Scroll,ip.ViewportResize,ip.Input,ip.TouchMove,ip.MediaInteraction,ip.Drag],sy=e=>({rrwebMethod:e,enqueuedAt:Date.now(),attempt:1});function sb(e){return function(e,t){for(var i="",s=0;s<e.length;)i+=String.fromCharCode(e[s++]);return i}(i5(i4(JSON.stringify(e))))}function sw(e){return e.type===id.Custom&&"sessionIdle"===e.data.tag}class sE{get sessionId(){return this.Ft}get At(){return this._instance.config.session_recording.session_idle_threshold_ms||3e5}get started(){return this.Dt}get jt(){if(!this._instance.sessionManager)throw Error(s_+" must be started with a valid sessionManager.");return this._instance.sessionManager}get Lt(){var e,t;return this.Nt.triggerStatus(this.sessionId)===ss?6e4:null!=(e=null==(t=this._instance.config.session_recording)?void 0:t.full_snapshot_interval_millis)?e:3e5}get zt(){var e=this._instance.get_property(eP);return N(e)?e:null}get Ut(){var e,t,i=null==(e=this.H)?void 0:e.data[(null==(t=this.H)?void 0:t.data.length)-1],{sessionStartTimestamp:s}=this.jt.checkAndGetSessionAndWindowId(!0);return i?i.timestamp-s:null}get qt(){var e=!!this._instance.get_property(em),t=!this._instance.config.disable_session_recording;return r&&e&&t}get Bt(){var e=!!this._instance.get_property(ey),t=this._instance.config.enable_recording_console_log;return null!=t?t:e}get Ht(){var e,t,i,s,r,n,o=this._instance.config.session_recording.captureCanvas,a=this._instance.get_property(eE),l=null!=(e=null!=(t=null==o?void 0:o.recordCanvas)?t:null==a?void 0:a.enabled)&&e,c=null!=(i=null!=(s=null==o?void 0:o.canvasFps)?s:null==a?void 0:a.fps)?i:4,u=null!=(r=null!=(n=null==o?void 0:o.canvasQuality)?n:null==a?void 0:a.quality)?r:.4;if("string"==typeof u){var h=parseFloat(u);u=isNaN(h)?.4:h}return{enabled:l,fps:q(c,0,12,sv.createLogger("canvas recording fps"),4),quality:q(u,0,1,sv.createLogger("canvas recording quality"),.4)}}get Wt(){var e,t,i=this._instance.get_property(eb),s={recordHeaders:null==(e=this._instance.config.session_recording)?void 0:e.recordHeaders,recordBody:null==(t=this._instance.config.session_recording)?void 0:t.recordBody},r=(null==s?void 0:s.recordHeaders)||(null==i?void 0:i.recordHeaders),n=(null==s?void 0:s.recordBody)||(null==i?void 0:i.recordBody),o=R(this._instance.config.capture_performance)?this._instance.config.capture_performance.network_timing:this._instance.config.capture_performance,a=!!(N(o)?o:null==i?void 0:i.capturePerformance);return r||n||a?{recordHeaders:r,recordBody:n,recordPerformance:a}:void 0}get Gt(){var e,t,i,s,r,n,o=this._instance.get_property(ew),a={maskAllInputs:null==(e=this._instance.config.session_recording)?void 0:e.maskAllInputs,maskTextSelector:null==(t=this._instance.config.session_recording)?void 0:t.maskTextSelector,blockSelector:null==(i=this._instance.config.session_recording)?void 0:i.blockSelector},l=null!=(s=null==a?void 0:a.maskAllInputs)?s:null==o?void 0:o.maskAllInputs,c=null!=(r=null==a?void 0:a.maskTextSelector)?r:null==o?void 0:o.maskTextSelector,u=null!=(n=null==a?void 0:a.blockSelector)?n:null==o?void 0:o.blockSelector;return T(l)&&T(c)&&T(u)?void 0:{maskAllInputs:null==l||l,maskTextSelector:c,blockSelector:u}}get Jt(){var e=this._instance.get_property(ex);return L(e)?e:null}get Vt(){var e=this._instance.get_property(eS);return L(e)?e:null}get status(){return this.Kt?this.Yt({receivedFlags:this.Kt,isRecordingEnabled:this.qt,isSampled:this.zt,urlTriggerMatching:this.Xt,eventTriggerMatching:this.Qt,linkedFlagMatching:this.Zt,sessionId:this.sessionId}):i9}constructor(e){if(this.Yt=sd,this.Kt=!1,this.ti=[],this.ii="unknown",this.ei=Date.now(),this.Nt=new sl,this.ri=void 0,this.si=void 0,this.ni=void 0,this.oi=void 0,this.ai=void 0,this._forceAllowLocalhostNetworkCapture=!1,this.li=()=>{this.hi()},this.ui=()=>{this.tryAddCustomEvent("browser offline",{})},this.di=()=>{this.tryAddCustomEvent("browser online",{})},this.vi=()=>
1{if(null!=u&&u.visibilityState){var e="window "+u.visibilityState;this.tryAddCustomEvent(e,{})}},this._instance=e,this.Dt=!1,this.ci="/s/",this.fi=void 0,this.Kt=!1,!this._instance.sessionManager)throw sv.error("started without valid sessionManager"),Error(s_+" started without valid sessionManager. This is a bug.");if("always"===this._instance.config.cookieless_mode)throw Error(s_+' cannot be used with cookieless_mode="always"');this.Zt=new su(this._instance),this.Xt=new sc(this._instance),this.Qt=new sh(this._instance);var{sessionId:t,windowId:i}=this.jt.checkAndGetSessionAndWindowId();this.Ft=t,this.pi=i,this.H=this.gi(),this.At>=this.jt.sessionTimeoutMs&&sv.warn("session_idle_threshold_ms ("+this.At+") is greater than the session timeout ("+this.jt.sessionTimeoutMs+"). Session will never be detected as idle")}startIfEnabledOrStop(e){this.qt?(this.mi(e),eo(r,"beforeunload",this.li),eo(r,"offline",this.ui),eo(r,"online",this.di),eo(r,"visibilitychange",this.vi),this.bi(),this.yi(),D(this.ri)&&(this.ri=this._instance.on("eventCaptured",e=>{try{if("$pageview"===e.event){var t=null!=e&&e.properties.$current_url?this.wi(null==e?void 0:e.properties.$current_url):"";if(!t)return;this.tryAddCustomEvent("$pageview",{href:t})}}catch(e){sv.error("Could not add $pageview to rrweb session",e)}})),this.si||(this.si=this.jt.onSessionId((e,t,i)=>{var s,r;i&&(this.tryAddCustomEvent("$session_id_change",{sessionId:e,windowId:t,changeReason:i}),null==(s=this._instance)||null==(s=s.persistence)||s.unregister(eF),null==(r=this._instance)||null==(r=r.persistence)||r.unregister(e$))}))):this.stopRecording()}stopRecording(){var e,t,i,s;this.Dt&&this.fi&&(this.fi(),this.fi=void 0,this.Dt=!1,null==r||r.removeEventListener("beforeunload",this.li),null==r||r.removeEventListener("offline",this.ui),null==r||r.removeEventListener("online",this.di),null==r||r.removeEventListener("visibilitychange",this.vi),this.gi(),clearInterval(this.Si),null==(e=this.ri)||e.call(this),this.ri=void 0,null==(t=this.ai)||t.call(this),this.ai=void 0,null==(i=this.si)||i.call(this),this.si=void 0,null==(s=this.oi)||s.call(this),this.oi=void 0,this.Qt.stop(),this.Xt.stop(),this.Zt.stop(),sv.info("stopped"))}$i(){var e;null==(e=this._instance.persistence)||e.unregister(eP)}xi(e){var t,i=this.Ft!==e,s=this.Jt;if(L(s)){var r=this.zt,n=i||!N(r),o=n?function(e){for(var t=0,i=0;i<e.length;i++)t=(t<<5)-t+e.charCodeAt(i)|0;return Math.abs(t)}(e)%100<q(100*s,0,100,G):r;n&&(o?this.ki(i8):sv.warn("Sample rate ("+s+") has determined that this sessionId ("+e+") will not be sent to the server."),this.tryAddCustomEvent("samplingDecisionMade",{sampleRate:s,isSampled:o})),null==(t=this._instance.persistence)||t.register({[eP]:o})}else this.$i()}onRemoteConfig(e){var t,i,s,r;this.tryAddCustomEvent("$remote_config_received",e),this.Ei(e),null!=(t=e.sessionRecording)&&t.endpoint&&(this.ci=null==(r=e.sessionRecording)?void 0:r.endpoint),this.bi(),"any"===(null==(i=e.sessionRecording)?void 0:i.triggerMatchType)?(this.Yt=sp,this.Nt=new so([this.Qt,this.Xt])):(this.Yt=sg,this.Nt=new sa([this.Qt,this.Xt])),this._instance.register_for_session({$sdk_debug_replay_remote_trigger_matching_config:null==(s=e.sessionRecording)?void 0:s.triggerMatchType}),this.Xt.onRemoteConfig(e),this.Qt.onRemoteConfig(e),this.Zt.onRemoteConfig(e,(e,t)=>{this.ki("linked_flag_matched",{flag:e,variant:t})}),this.Kt=!0,this.startIfEnabledOrStop()}bi(){L(this.Jt)&&D(this.oi)&&(this.oi=this.jt.onSessionId(e=>{this.xi(e)}))}Ei(e){if(this._instance.persistence){var t,i=this._instance.persistence,s=()=>{var t,s,r,n,o,a,l,c,u,h=null==(t=e.sessionRecording)?void 0:t.sampleRate,d=D(h)?null:parseFloat(h);D(d)&&this.$i();var p=null==(s=e.sessionRecording)?void 0:s.minimumDurationMilliseconds;i.register({[em]:!!e.sessionRecording,[ey]:null==(r=e.sessionRecording)?void 0:r.consoleLogRecordingEnabled,[eb]:m({capturePerformance:e.capturePerformance},null==(n=e.sessionRecording)?void 0:n.networkPayloadCapture),[ew]:null==(o=e.sessionRecording)?void 0:o.masking,[eE]:{enabled:null==(a=e.sessionRecording)?void 0:a.recordCanvas,fps:null==(l=e.sessionRecording)?void 0:l.canvasFps,quality:null==(c=e.sessionRecording)?void 0:c.canvasQuality},[ex]:d,[eS]:T(p)?null:p,[ek]:null==(u=e.sessionRecording)?void 0:u.scriptConfig})};s(),null==(t=this.ni)||t.call(this),this.ni=this.jt.onSessionId(s)}}log(e,t){var i;void 0===t&&(t="log"),null==(i=this._instance.sessionRecording)||i.onRRwebEmit({type:6,data:{plugin:"rrweb/console@1",payload:{level:t,trace:[],payload:[JSON.stringify(e)]}},timestamp:Date.now()})}mi(e){if(!T(Object.assign)&&!T(Array.from)&&!(this.Dt||this._instance.config.disable_session_recording||this._instance.consent.isOptedOut())){var t;(this.Dt=!0,this.jt.checkAndGetSessionAndWindowId(),sf())?this.Ii():null==(t=v.__PosthogExtensions__)||null==t.loadExternalDependency||t.loadExternalDependency(this._instance,this.Pi,e=>{if(e)return sv.error("could not load recorder",e);this.Ii()}),sv.info("starting"),this.status===i7&&this.ki(e||"recording_initialized")}}get Pi(){var e;return(null==(e=this._instance)||null==(e=e.persistence)||null==(e=e.get_property(ek))?void 0:e.script)||"recorder"}Ri(e){var t;return 3===e.type&&-1!==sm.indexOf(null==(t=e.data)?void 0:t.source)}Ti(e){var t=this.Ri(e);t||this.ii||e.timestamp-this.ei>this.At&&(this.ii=!0,clearInterval(this.Si),this.tryAddCustomEvent("sessionIdle",{eventTimestamp:e.timestamp,lastActivityTimestamp:this.ei,threshold:this.At,bufferLength:this.H.data.length,bufferSize:this.H.size}),this.hi());var i=!1;if(t&&(this.ei=e.timestamp,this.ii)){var s="unknown"===this.ii;this.ii=!1,s||(this.tryAddCustomEvent("sessionNoLongerIdle",{reason:"user activity",type:e.type}),i=!0)}if(!this.ii){var{windowId:r,sessionId:n}=this.jt.checkAndGetSessionAndWindowId(!t,e.timestamp),o=this.Ft!==n,a=this.pi!==r;this.pi=r,this.Ft=n,o||a?(this.stopRecording(),this.startIfEnabledOrStop("session_id_changed")):i&&this.Ci()}}Mi(e){try{return e.rrwebMethod(),!0}catch(t){return this.ti.length<10?this.ti.push({enqueuedAt:e.enqueuedAt||Date.now(),attempt:e.attempt++,rrwebMethod:e.rrwebMethod}):sv.warn("could not emit queued rrweb event.",t,e),!1}}tryAddCustomEvent(e,t){return this.Mi(sy(()=>sf().addCustomEvent(e,t)))}Oi(){return this.Mi(sy(()=>sf().takeFullSnapshot()))}Ii(){var e,t,i,s,r={blockClass:"ph-no-capture",blockSelector:void 0,ignoreClass:"ph-ignore-input",maskTextClass:"ph-mask",maskTextSelector:void 0,maskTextFn:void 0,maskAllInputs:!0,maskInputOptions:{password:!0},maskInputFn:void 0,slimDOMOptions:{}
1,collectFonts:!1,inlineStylesheet:!0,recordCrossOriginIframes:!1};for(var[n,o]of Object.entries(this._instance.config.session_recording||{}))n in r&&("maskInputOptions"===n?r.maskInputOptions=m({password:!0},o):r[n]=o);this.Ht&&this.Ht.enabled&&(r.recordCanvas=!0,r.sampling={canvas:this.Ht.fps},r.dataURLOptions={type:"image/webp",quality:this.Ht.quality}),this.Gt&&(r.maskAllInputs=null==(t=this.Gt.maskAllInputs)||t,r.maskTextSelector=null!=(i=this.Gt.maskTextSelector)?i:void 0,r.blockSelector=null!=(s=this.Gt.blockSelector)?s:void 0);var a=sf();if(a){this.Fi=null!=(e=this.Fi)?e:new ix(a,{refillRate:this._instance.config.session_recording.__mutationThrottlerRefillRate,bucketSize:this._instance.config.session_recording.__mutationThrottlerBucketSize,onBlockedNode:(e,t)=>{var i="Too many mutations on node '"+e+"'. Rate limiting. This could be due to SVG animations or something similar";sv.info(i,{node:t}),this.log(s_+" "+i,"warn")}});var l=this.Ai();this.fi=a(m({emit:e=>{this.onRRwebEmit(e)},plugins:l},r)),this.ei=Date.now(),this.ii=N(this.ii)?this.ii:"unknown",this.tryAddCustomEvent("$session_options",{sessionRecordingOptions:r,activePlugins:l.map(e=>null==e?void 0:e.name)}),this.tryAddCustomEvent("$posthog_config",{config:this._instance.config})}else sv.error("onScriptLoaded was called but rrwebRecord is not available. This indicates something has gone wrong.")}Ci(){if(this.Si&&clearInterval(this.Si),!0!==this.ii){var e=this.Lt;e&&(this.Si=setInterval(()=>{this.Oi()},e))}}Ai(){var e,t,i,s,r,n,o,a,l,c,u,h,d,p=[],g=null==(h=v.__PosthogExtensions__)||null==(h=h.rrwebPlugins)?void 0:h.getRecordConsolePlugin;g&&this.Bt&&p.push(g());var _=null==(d=v.__PosthogExtensions__)||null==(d=d.rrwebPlugins)?void 0:d.getRecordNetworkPlugin;return this.Wt&&F(_)&&(!td.includes(location.hostname)||this._forceAllowLocalhostNetworkCapture?p.push(_((e=this._instance.config,t=this.Wt,r={payloadSizeLimitBytes:iv.payloadSizeLimitBytes,performanceEntryTypeToObserve:[...iv.performanceEntryTypeToObserve],payloadHostDenyList:[...t.payloadHostDenyList||[],...iv.payloadHostDenyList]},n=!1!==e.session_recording.recordHeaders&&t.recordHeaders,o=!1!==e.session_recording.recordBody&&t.recordBody,a=!1!==e.capture_performance&&t.recordPerformance,s=Math.min(1e6,null!=(i=r.payloadSizeLimitBytes)?i:1e6),l=e=>(null!=e&&e.requestBody&&(e.requestBody=iw(e.requestBody,e.requestHeaders,s,"Request")),null!=e&&e.responseBody&&(e.responseBody=iw(e.responseBody,e.responseHeaders,s,"Response")),e),c=t=>{var i;return l(((e,t)=>{var i,s=tp(e.name),r=0===t.indexOf("http")?null==(i=tp(t))?void 0:i.pathname:t;"/"===r&&(r="");var n=null==s?void 0:s.pathname.replace(r||"","");if(!(s&&n&&ib.some(e=>0===n.indexOf(e))))return e})((D(i=t.requestHeaders)||J(Object.keys(null!=i?i:{}),e=>{im.includes(e.toLowerCase())&&(i[e]=i_)}),t),e.api_host))},(u=F(e.session_recording.maskNetworkRequestFn))&&F(e.session_recording.maskCapturedNetworkRequestFn)&&G.warn("Both `maskNetworkRequestFn` and `maskCapturedNetworkRequestFn` are defined. `maskNetworkRequestFn` will be ignored."),u&&(e.session_recording.maskCapturedNetworkRequestFn=t=>{var i=e.session_recording.maskNetworkRequestFn({url:t.name});return m({},t,{name:null==i?void 0:i.url})}),r.maskRequestFn=F(e.session_recording.maskCapturedNetworkRequestFn)?t=>{var i,s=c(t);return s&&null!=(i=null==e.session_recording.maskCapturedNetworkRequestFn?void 0:e.session_recording.maskCapturedNetworkRequestFn(s))?i:void 0}:e=>(function(e){if(!T(e))return e.requestBody=iE(e.requestBody,"Request"),e.responseBody=iE(e.responseBody,"Response"),e})(c(e)),m({},iv,r,{recordHeaders:n,recordBody:o,recordPerformance:a,recordInitialRequests:a})))):sv.info("NetworkCapture not started because we are on localhost.")),p}onRRwebEmit(e){var t;if(this.Di(),e&&R(e)){if(e.type===id.Meta){var i=this.wi(e.data.href);if(this.ji=i,!i)return;e.data.href=i}else this.Li();if(this.Xt.checkUrlTriggerConditions(()=>this.Ni(),()=>this.zi(),e=>this.Ui(e)),!this.Xt.urlBlocked||e.type===id.Custom&&"recording paused"===e.data.tag){e.type===id.FullSnapshot&&this.Ci(),e.type===id.FullSnapshot&&this.Kt&&this.Nt.triggerStatus(this.sessionId)===ss&&this.gi();var s=this.Fi?this.Fi.throttleMutations(e):e;if(s){var r=function(e){if(e&&R(e)&&6===e.type&&R(e.data)&&"rrweb/console@1"===e.data.plugin){e.data.payload.payload.length>10&&(e.data.payload.payload=e.data.payload.payload.slice(0,10),e.data.payload.payload.push("...[truncated]"));for(var t=[],i=0;i<e.data.payload.payload.length;i++)e.data.payload.payload[i]&&e.data.payload.payload[i].length>2e3?t.push(e.data.payload.payload[i].slice(0,2e3)+"...[truncated]"):t.push(e.data.payload.payload[i]);return e.data.payload.payload=t,e}return e}(s);if(this.Ti(r),!0!==this.ii||sw(r)){if(sw(r)){var n=r.data.payload;n&&(r.timestamp=n.lastActivityTimestamp+n.threshold)}var o=null==(t=this._instance.config.session_recording.compress_events)||t?function(e){if(1024>ih(e))return e;try{if(e.type===id.FullSnapshot)return m({},e,{data:sb(e.data),cv:"2024-10"});if(e.type===id.IncrementalSnapshot&&e.data.source===ip.Mutation)return m({},e,{cv:"2024-10",data:m({},e.data,{texts:sb(e.data.texts),attributes:sb(e.data.attributes),removes:sb(e.data.removes),adds:sb(e.data.adds)})});if(e.type===id.IncrementalSnapshot&&e.data.source===ip.StyleSheetRule)return m({},e,{cv:"2024-10",data:m({},e.data,{adds:e.data.adds?sb(e.data.adds):void 0,removes:e.data.removes?sb(e.data.removes):void 0})})}catch(e){sv.error("could not compress event - will use uncompressed event",e)}return e}(r):r,a={$snapshot_bytes:ih(o),$snapshot_data:o,$session_id:this.Ft,$window_id:this.pi};this.status!==i6?this.qi(a):this.gi()}}}}}Li(){if(!this._instance.config.capture_pageview&&r){var e=this.wi(r.location.href);this.ji!==e&&(this.tryAddCustomEvent("$url_changed",{href:e}),this.ji=e)}}Di(){if(this.ti.length){var e=[...this.ti];
1this.ti=[],e.forEach(e=>{Date.now()-e.enqueuedAt<=2e3&&this.Mi(e)})}}wi(e){var t=this._instance.config.session_recording;if(t.maskNetworkRequestFn){var i,s={url:e};return null==(i=s=t.maskNetworkRequestFn(s))?void 0:i.url}return e}gi(){return this.H={size:0,data:[],sessionId:this.Ft,windowId:this.pi},this.H}hi(){this.Bi&&(clearTimeout(this.Bi),this.Bi=void 0);var e=this.Vt,t=this.Ut,i=L(t)&&t>=0,s=L(e)&&i&&t<e;return this.status===i9||this.status===se||this.status===i6||s?(this.Bi=setTimeout(()=>{this.hi()},2e3),this.H):(this.H.data.length>0&&(function e(t,i){if(void 0===i&&(i=6606028.8),t.size>=i&&t.data.length>1){var s=Math.floor(t.data.length/2),r=t.data.slice(0,s),n=t.data.slice(s);return[e({size:ih(r),data:r,sessionId:t.sessionId,windowId:t.windowId}),e({size:ih(n),data:n,sessionId:t.sessionId,windowId:t.windowId})].flatMap(e=>e)}return[t]})(this.H).forEach(e=>{this.Hi({$snapshot_bytes:e.size,$snapshot_data:e.data,$session_id:e.sessionId,$window_id:e.windowId,$lib:"web",$lib_version:f.LIB_VERSION})}),this.gi())}qi(e){var t,i=2+((null==(t=this.H)?void 0:t.data.length)||0);!this.ii&&(this.H.size+e.$snapshot_bytes+i>943718.4||this.H.sessionId!==this.Ft)&&(this.H=this.hi()),this.H.size+=e.$snapshot_bytes,this.H.data.push(e.$snapshot_data),this.Bi||this.ii||(this.Bi=setTimeout(()=>{this.hi()},2e3))}Hi(e){this._instance.capture("$snapshot",e,{_url:this._instance.requestRouter.endpointFor("api",this.ci),_noTruncate:!0,_batchKey:"recordings",skip_client_rate_limiting:!0})}Ui(e){var t;this.Nt.triggerStatus(this.sessionId)===ss&&(null==(t=this._instance)||null==(t=t.persistence)||t.register({["url"===e?e$:eF]:this.Ft}),this.hi(),this.ki(e+"_trigger_matched"))}Ni(){this.Xt.urlBlocked||(this.Xt.urlBlocked=!0,clearInterval(this.Si),sv.info("recording paused due to URL blocker"),this.tryAddCustomEvent("recording paused",{reason:"url blocker"}))}zi(){this.Xt.urlBlocked&&(this.Xt.urlBlocked=!1,this.Oi(),this.Ci(),this.tryAddCustomEvent("recording resumed",{reason:"left blocked url"}),sv.info("recording resumed"))}yi(){0!==this.Qt.Mt.length&&D(this.ai)&&(this.ai=this._instance.on("eventCaptured",e=>{try{this.Qt.Mt.includes(e.event)&&this.Ui("event")}catch(e){sv.error("Could not activate event trigger",e)}}))}overrideLinkedFlag(){this.Zt.linkedFlagSeen=!0,this.Oi(),this.ki("linked_flag_overridden")}overrideSampling(){var e;null==(e=this._instance.persistence)||e.register({[eP]:!0}),this.Oi(),this.ki("sampling_overridden")}overrideTrigger(e){this.Ui(e)}ki(e,t){this._instance.register_for_session({$session_recording_start_reason:e}),sv.info(e.replace("_"," "),t),w(["recording_initialized","session_id_changed"],e)||this.tryAddCustomEvent(e,t)}get sdkDebugProperties(){var{sessionStartTimestamp:e}=this.jt.checkAndGetSessionAndWindowId(!0);return{$recording_status:this.status,$sdk_debug_replay_internal_buffer_length:this.H.data.length,$sdk_debug_replay_internal_buffer_size:this.H.size,$sdk_debug_current_session_duration:this.Ut,$sdk_debug_session_start:e}}}var sx=W("[SegmentIntegration]"),sS="posthog-js";function sk(e,t){var{organization:i,projectId:s,prefix:r,severityAllowList:n=["error"],sendExceptionsToPostHog:o=!0}=void 0===t?{}:t;return t=>{if(!("*"===n||n.includes(t.level))||!e.__loaded)return t;t.tags||(t.tags={});var a,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==(a=t.exception)?void 0:a.values)||[],g=p.map(e=>m({},e,{stacktrace:e.stacktrace?m({},e.stacktrace,{type:"raw",frames:(e.stacktrace.frames||[]).map(e=>m({},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_personURL:d,$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),o&&e.exceptions.sendExceptionEvent(_),t}}class sI{constructor(e,t,i,s,r,n){this.name=sS,this.setupOnce=function(o){o(sk(e,{organization:t,projectId:i,prefix:s,severityAllowList:r,sendExceptionsToPostHog:null==n||n}))}}}var sP=null!=r&&r.location?tf(r.location.hash,"__posthog")||tf(location.hash,"state"):null,s$="_postHogToolbarParam
1s",sF=W("[Toolbar]"),sR=((nK=sR||{})[nK.UNINITIALIZED=0]="UNINITIALIZED",nK[nK.LOADING=1]="LOADING",nK[nK.LOADED=2]="LOADED",nK);class sC{constructor(e){this.instance=e}Wi(e){v.ph_toolbar_state=e}Gi(){var e;return null!=(e=v.ph_toolbar_state)?e:sR.UNINITIALIZED}maybeLoadToolbar(e,t,i){if(void 0===e&&(e=void 0),void 0===t&&(t=void 0),void 0===i&&(i=void 0),!r||!u)return!1;e=null!=e?e:r.location,i=null!=i?i:r.history;try{if(!t){try{r.localStorage.setItem("test","test"),r.localStorage.removeItem("test")}catch(e){return!1}t=null==r?void 0:r.localStorage}var s,n=sP||tf(e.hash,"__posthog")||tf(e.hash,"state"),o=n?et(()=>JSON.parse(atob(decodeURIComponent(n))))||et(()=>JSON.parse(decodeURIComponent(n))):null;return o&&"ph_authorize"===o.action?((s=o).source="url",s&&Object.keys(s).length>0&&(o.desiredHash?e.hash=o.desiredHash:i?i.replaceState(i.state,"",e.pathname+e.search):e.hash="")):((s=JSON.parse(t.getItem(s$)||"{}")).source="localstorage",delete s.userIntent),!(!s.token||this.instance.config.token!==s.token)&&(this.loadToolbar(s),!0)}catch(e){return!1}}Ji(e){var t=v.ph_load_toolbar||v.ph_load_editor;!D(t)&&F(t)?t(e,this.instance):sF.warn("No toolbar load function found")}loadToolbar(e){var t,i=!(null==u||!u.getElementById(eG));if(!r||i)return!1;var s="custom"===this.instance.requestRouter.region&&this.instance.config.advanced_disable_toolbar_metrics,n=m({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor("ui")},s?{instrument:!1}:{});return(r.localStorage.setItem(s$,JSON.stringify(m({},n,{source:void 0}))),this.Gi()===sR.LOADED)?this.Ji(n):this.Gi()===sR.UNINITIALIZED&&(this.Wi(sR.LOADING),null==(t=v.__PosthogExtensions__)||null==t.loadExternalDependency||t.loadExternalDependency(this.instance,"toolbar",e=>{e?(sF.error("[Toolbar] Failed to load",e),this.Wi(sR.UNINITIALIZED)):(this.Wi(sR.LOADED),this.Ji(n))}),eo(r,"turbolinks:load",()=>{this.Wi(sR.UNINITIALIZED),this.loadToolbar(n)})),!0}Vi(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 sT=W("[TracingHeaders]");class sA{constructor(e){this.Ki=void 0,this.Yi=void 0,this.lt=()=>{var e,t;T(this.Ki)&&(null==(e=v.__PosthogExtensions__)||null==(e=e.tracingHeadersPatchFns)||e._patchXHR(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager)),T(this.Yi)&&(null==(t=v.__PosthogExtensions__)||null==(t=t.tracingHeadersPatchFns)||t._patchFetch(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager))},this._instance=e}nt(e){var t,i;null!=(t=v.__PosthogExtensions__)&&t.tracingHeadersPatchFns&&e(),null==(i=v.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"tracing-headers",t=>{if(t)return sT.error("failed to load script",t);e()})}startIfEnabledOrStop(){var e,t;this._instance.config.__add_tracing_headers?this.nt(this.lt):(null==(e=this.Ki)||e.call(this),null==(t=this.Yi)||t.call(this),this.Ki=void 0,this.Yi=void 0)}}var sO=W("[Web Vitals]");class sM{constructor(e){var t;this.Xi=!1,this.C=!1,this.H={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.Qi=()=>{clearTimeout(this.Zi),0!==this.H.metrics.length&&(this._instance.capture("$web_vitals",this.H.metrics.reduce((e,t)=>m({},e,{["$web_vitals_"+t.name+"_event"]:m({},t),["$web_vitals_"+t.name+"_value"]:t.value}),{})),this.H={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.te=e=>{var t,i=null==(t=this._instance.sessionManager)?void 0:t.checkAndGetSessionAndWindowId(!0);if(T(i))sO.error("Could not read session ID. Dropping metrics!");else{this.H=this.H||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var s=this.ie();T(s)||(D(null==e?void 0:e.name)||D(null==e?void 0:e.value)?sO.error("Invalid metric received",e):this.ee&&e.value>=this.ee?sO.error("Ignoring metric with value >= "+this.ee,e):(this.H.url!==s&&(this.Qi(),this.Zi=setTimeout(this.Qi,this.flushToCaptureTimeoutMs)),T(this.H.url)&&(this.H.url=s),this.H.firstMetricTimestamp=T(this.H.firstMetricTimestamp)?Date.now():this.H.firstMetricTimestamp,e.attribution&&e.attribution.interactionTargetElement&&(e.attribution.interactionTargetElement=void 0),this.H.metrics.push(m({},e,{$current_url:s,$session_id:i.sessionId,$window_id:i.windowId,timestamp:Date.now()})),this.H.metrics.length===this.allowedMetrics.length&&this.Qi()))}},this.lt=()=>{var e,t,i,s,r=v.__PosthogExtensions__;T(r)||T(r.postHogWebVitalsCallbacks)||({onLCP:e,onCLS:t,onFCP:i,onINP:s}=r.postHogWebVitalsCallbacks),e&&t&&i&&s?(this.allowedMetrics.indexOf("LCP")>-1&&e(this.te.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&t(this.te.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&i(this.te.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&s(this.te.bind(this)),this.C=!0):sO.error("web vitals callbacks not loaded - not starting")},this._instance=e,this.Xi=!(null==(t=this._instance.persistence)||!t.props[e_]),this.startIfEnabled()}get allowedMetrics(){var e,t,i=R(this._instance.config.capture_performance)?null==(e=this._instance.config.capture_performance)?void 0:e.web_vitals_allowed_metrics:void 0;return T(i)?(null==(t=this._instance.persistence)?void 0:t.props[ef])||["CLS","FCP","INP","LCP"]:i}get flushToCaptureTimeoutMs(){return(R(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals_delayed_flush_ms:void 0)||5e3}get ee(){var e=R(this._instance.config.capture_performance)&&L(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==h?void 0:h.protocol;if("http:"!==e&&"https:"!==e)return sO.info("Web Vitals are disabled on non-http/https protocols"),!1;var t=R(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals:N(this._instance.config.capture_performance)?this._instance.config.capture_performance:void 0;return N(t)?t:this.Xi}startIfEnabled(){this.isEnabled&&!this.C&&(sO.info("enabled, starting..."),this.nt(this.lt))}onRemoteConfig(e){var t=R(e.capturePerformance)&&!!e.capturePerformance.web_vitals,i=R(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[e_]:t}),this._instance.persistence.register({[ef]:i})),this.Xi=t,this.startIfEnabled()}nt(e){var t,i;null!=(t=v.__PosthogExtensions__)&&t.postHogWebVitalsCallbacks&&e(),null==(i=v.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"web-vitals",t=>{t?sO.error("failed to load script",t):e()})}ie(){var e=r?r.location.href:void 0;return e||sO.error("Could not determine current URL"),e}}var sD=W("[Heatmaps]");function sL(e){return R(e)&&"clientX"in e&&"clientY"in e&&L(e.clientX)&&L(e.clientY)}class sN{constructor(e){var t;this.rageclicks=new tl,this.Xi=!1,this.C=!1,this.re=null,this.instance=e,this.Xi=!(null==(t=this.instance.persistence)||!t.props[eh])}get flushIntervalMilliseconds(){var e=5e3;return R(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 T(this.instance.config.capture_heatmaps)?T(this.instance.config.enable_heatmaps)?this.Xi:this.instance.config.enable_heatmaps:!1!==this.instance.config.capture_heatmaps}startIfEnabled(){if(this.isEnabled)this.C||(sD.info("starting..."),this.se(),this.re=setInterval(this.ne.bind(this),this.flushIntervalMilliseconds));else{var e,t;clearInterval(null!=(e=this.re)?e:void 0),null==(t=this.oe)||t.stop(),this.getAndClearBuffer()}}onRemoteConfig(e){var t=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[eh]:t}),this.Xi=t,this.startIfEnabled()}getAndClearBuffer(){var e=this.H;return this.H=void 0,e}ae(e){this.le(e.originalEvent,"deadclick")}se(){r&&u&&(eo(r,"beforeunload",this.ne.bind(this)),eo(u,"click",e=>this.le(e||(null==r?void 0:r.event)),{capture:!0}),eo(u,"mousemove",e=>this.he(e||(null==r?void 0:r.event)),{capture:!0}),this.oe=new tW(this.instance,tz,this.ae.bind(this)),this.oe.startIfEnabled(),this.C=!0)}ue(e,t){var i=this.instance.scrollManager.scrollY(),s=this.instance.scrollManager.scrollX(),n=this.instance.scrollManager.scrollElement(),o=function(e,t,i){for(var s=e;s&&eK(s)&&!eX(s,"body")&&s!==i;){if(w(t,null==r?void 0:r.getComputedStyle(s).position))return!0;s=e6(s)}return!1}(e5(e),["fixed","sticky"],n);return{x:e.clientX+(o?0:s),y:e.clientY+(o?0:i),target_fixed:o,type:t}}le(e,t){var i;if(void 0===t&&(t="click"),!eY(e.target)&&sL(e)){var s=this.ue(e,t);null!=(i=this.rageclicks)&&i.isRageClick(e.clientX,e.clientY,(new Date).getTime())&&this.de(m({}
1,s,{type:"rageclick"})),this.de(s)}}he(e){!eY(e.target)&&sL(e)&&(clearTimeout(this.ve),this.ve=setTimeout(()=>{this.de(this.ue(e,"mousemove"))},500))}de(e){if(r){var t=r.location.href;this.H=this.H||{},this.H[t]||(this.H[t]=[]),this.H[t].push(e)}}ne(){this.H&&!C(this.H)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}}class sj{constructor(e){this._instance=e}doPageView(e,t){var i,s=this.ce(e,t);return this.fe={pathname:null!=(i=null==r?void 0:r.location.pathname)?i:"",pageViewId:t,timestamp:e},this._instance.scrollManager.resetContext(),s}doPageLeave(e){var t;return this.ce(e,null==(t=this.fe)?void 0:t.pageViewId)}doEvent(){var e;return{$pageview_id:null==(e=this.fe)?void 0:e.pageViewId}}ce(e,t){var i=this.fe;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:o,maxScrollY:a,maxContentHeight:l,lastContentY:c,maxContentY:u}=r;if(!(T(n)||T(o)||T(a)||T(l)||T(c)||T(u))){n=Math.ceil(n),o=Math.ceil(o),a=Math.ceil(a),l=Math.ceil(l),c=Math.ceil(c),u=Math.ceil(u);var h=n<=1?1:q(o/n,0,1,G),d=n<=1?1:q(a/n,0,1,G),p=l<=1?1:q(c/l,0,1,G),g=l<=1?1:q(u/l,0,1,G);s=Z(s,{$prev_pageview_last_scroll:o,$prev_pageview_last_scroll_percentage:h,$prev_pageview_max_scroll:a,$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 sH=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 o=e.charCodeAt(r),a=null;o<128?i++:a=o>127&&o<2048?String.fromCharCode(o>>6|192,63&o|128):String.fromCharCode(o>>12|224,o>>6&63|128,63&o|128),M(a)||(i>t&&(n+=e.substring(t,i)),n+=a,t=i=r+1)}return i>t&&(n+=e.substring(t,e.length)),n},sU=!!p||!!d,sq="text/plain",sB=(e,t)=>{var[i,s]=e.split("?"),r=m({},t);null==s||s.split("&").forEach(e=>{var[t]=e.split("=");delete r[t]});var n=tg(r);return i+"?"+(n=n?(s?s+"&":"")+n:s)},sz=(e,t)=>JSON.stringify(e,(e,t)=>"bigint"==typeof t?t.toString():t,t),sG=e=>{var{data:t,compression:i}=e;if(t){if(i===tu.GZipJS){var s=new Blob([i5(i4(sz(t)),{mtime:0})],{type:sq});return{contentType:sq,body:s,estimatedSize:s.size}}if(i===tu.Base64){let e;var r="data="+encodeURIComponent("string"==typeof(e=function(e){var t,i,s,r,n,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a=0,l=0,c="",u=[];if(!e)return e;e=sH(e);do t=(n=e.charCodeAt(a++)<<16|e.charCodeAt(a++)<<8|e.charCodeAt(a++))>>18&63,i=n>>12&63,s=n>>6&63,r=63&n,u[l++]=o.charAt(t)+o.charAt(i)+o.charAt(s)+o.charAt(r);while(a<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}(sz(t)))?e:sz(e));return{contentType:"application/x-www-form-urlencoded",body:r,estimatedSize:new Blob([r]).size}}var n=sz(t);return{contentType:"application/json",body:n,estimatedSize:new Blob([n]).size}}},sW=[];d&&sW.push({transport:"fetch",method:e=>{var t,i,{contentType:s,body:r,estimatedSize:n}=null!=(t=sG(e))?t:{},o=new Headers;J(e.headers,function(e,t){o.append(t,e)}),s&&o.append("Content-Type",s);var a=e.url,l=null;if(g){var c=new g;l={signal:c.signal,timeout:setTimeout(()=>c.abort(),e.timeout)}}d(a,m({method:(null==e?void 0:e.method)||"GET",headers:o,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){G.error(e)}null==e.callback||e.callback(s)})).catch(t=>{G.error(t),null==e.callback||e.callback({statusCode:0,text:t})}).finally(()=>l?clearTimeout(l.timeout):null)}}),p&&sW.push({transport:"XHR",method:e=>{var t,i=new p;i.open(e.method||"GET",e.url,!0);var{contentType:s,body:r}=null!=(t=sG(e))?t:{};J(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};
1if(200===i.status)try{t.json=JSON.parse(i.responseText)}catch(e){}null==e.callback||e.callback(t)}},i.send(r)}}),null!=c&&c.sendBeacon&&sW.push({transport:"sendBeacon",method:e=>{var t=sB(e.url,{beacon:"1"});try{var i,{contentType:s,body:r}=null!=(i=sG(e))?i:{},n="string"==typeof r?new Blob([r],{type:s}):r;c.sendBeacon(t,n)}catch(e){}}});var sV=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 sY(e,t,i){return sz({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:i})}var sK={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=>sV(t,e))),not_regex:(e,t)=>t.every(t=>e.every(e=>!sV(t,e))),icontains:(e,t)=>t.map(sX).some(t=>e.map(sX).some(e=>t.includes(e))),not_icontains:(e,t)=>t.map(sX).every(t=>e.map(sX).every(e=>!t.includes(e)))},sX=e=>e.toLowerCase(),sJ=W("[Error tracking]");class sZ{constructor(e){var t,i;this.pe=[],this._instance=e,this.pe=null!=(t=null==(i=this._instance.persistence)?void 0:i.get_property(ep))?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.pe=r,this._instance.persistence&&this._instance.persistence.register({[ep]:this.pe,[eg]:n})}get ge(){var e,t=!!this._instance.get_property(eg),i=this._instance.config.error_tracking.captureExtensionExceptions;return null!=(e=null!=i?i:t)&&e}sendExceptionEvent(e){if(this._e(e))sJ.info("Skipping exception capture because a suppression rule matched");else{if(this.ge||!this.me(e))return this._instance.capture("$exception",e,{_noTruncate:!0,_batchKey:"exceptionEvent"});sJ.info("Skipping exception capture because it was thrown by an extension")}}_e(e){var t=e.$exception_list;if(!t||!$(t)||0===t.length)return!1;var i=t.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.pe.some(e=>{var t=e.values.map(e=>{var t,s=sK[e.operator],r=$(e.value)?e.value:[e.value],n=null!=(t=i[e.key])?t:[];return r.length>0&&s(r,n)});return"OR"===e.type?t.some(Boolean):t.every(Boolean)})}me(e){var t=e.$exception_list;return!(!t||!$(t))&&t.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://"))}}var sQ="Mobile",s0="Android",s1="Tablet",s2=s0+" "+s1,s3="iPad",s5="Apple",s4=s5+" Watch",s6="Safari",s8="BlackBerry",s7="Samsung",s9=s7+"Browser",re=s7+" Internet",rt="Chrome",ri=rt+" OS",rs=rt+" iOS",rr="Internet Explorer",rn=rr+" "+sQ,ro="Opera",ra=ro+" Mini",rl="Edge",rc="Microsoft "+rl,ru="Firefox",rh=ru+" iOS",rd="Nintendo",rp="PlayStation",rg="Xbox",r_=s0+" "+sQ,rv=sQ+" "+s6,rf="Windows",rm=rf+" Phone",ry="Nokia",rb="Ouya",rw="Generic",rE=rw+" "+sQ.toLowerCase(),rx=rw+" "+s1.toLowerCase(),rS="Konqueror",rk="(\\d+(\\.\\d+)?)",rI=RegExp("Version/"+rk),rP=RegExp(rg,"i"),r$=RegExp(rp+" \\w+","i"),rF=RegExp(rd+" \\w+","i"),rR=RegExp(s8+"|PlayBook|BB10","i"),rC={"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"},rT=function(e,t){var i;return t=t||"",w(e," OPR/")&&w(e,"Mini")?ra:w(e," OPR/")?ro:rR.test(e)?s8:w(e,"IE"+sQ)||w(e,"WPDesktop")?rn:w(e,s9)?re:w(e,rl)||w(e,"Edg/")?rc:w(e,"FBIOS")?"Facebook "+sQ:w(e,"UCWEB")||w(e,"UCBrowser")?"UC Browser":w(e,"CriOS")?rs:w(e,"CrMo")||w(e,rt)?rt:w(e,s0)&&w(e,s6)?r_:w(e,"FxiOS")?rh:w(e.toLowerCase(),rS.toLowerCase())?rS:(i=t)&&w(i,s5)||w(e,s6)&&!w(e,rt)&&!w(e,s0)?w(e,sQ)?rv:s6:w(e,ru)?ru:w(e,"MSIE")||w(e,"Trident/")?rr:w(e,"Gecko")?ru:""},rA={[rn]:[RegExp("rv:"+rk)],[rc]:[RegExp(rl+"?\\/"+rk)],[rt]:[RegExp("("+rt+"|CrMo)\\/"+rk)],[rs]:[RegExp("CriOS\\/"+rk)],"UC Browser":[RegExp("(UCBrowser|UCWEB)\\/"+rk)],[s6]:[rI],[rv]:[rI],[ro]:[RegExp("(Opera|OPR)\\/"+rk)],[ru]:[RegExp(ru+"\\/"+rk)],[rh]:[RegExp("FxiOS\\/"+rk)],[rS]:[RegExp("Konqueror[:/]?"+rk,"i")],[s8]:[RegExp(s8+" "+rk),rI],[r_]:[RegExp("android\\s"+rk,"i")],[re]:[RegExp(s9+"\\/"+rk)],[rr]:[RegExp("(rv:|MSIE )"+rk)],Mozilla:[RegExp("rv:"+rk)]},rO=function(e,t){var i=rA[rT(e,t)];if(T(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},rM=[[RegExp(rg+"; "+rg+" (.*?)[);]","i"),e=>[rg,e&&e[1]||""]],[RegExp(rd,"i"),[rd,""]],[RegExp(rp,"i"),[rp,""]],[rR,[s8,""]],[RegExp(rf,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[rm,""];if(new RegExp(sQ).test(t)&&!/IEMobile\b/.test(t))return[rf+" "+sQ,""];var i=/Windows NT ([0-9.]+)/i.exec(t);if(i&&i[1]){var s=rC[i[1]]||"";return/arm/i.test(t)&&(s="RT"),[rf,s]}return[rf,""]}],[/((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=T(e[2])?e[3]:e[2]),["watchOS",t]}],[RegExp("("+s0+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+s0+")","i"),e=>e&&e[2]?[s0,[e[2],e[3],e[4]||"0"].join(".")]:[s0,""]],[/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/,[ri,""]],[/Linux|debian/i,["Linux",""]]],rD=function(e){return rF.test(e)?rd:r$.test(e)?rp:rP.test(e)?rg:RegExp(rb,"i").test(e)?rb:RegExp("("+rm+"|WPDesktop)","i").test(e)?rm:/iPad/.test(e)?s3:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?s4:rR.test(e)?s8:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":RegExp(ry,"i").test(e)?ry:/(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(sQ).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)?s0:s2:s0:RegExp("(pda|"+sQ+")","i").test(e)?rE:RegExp(s1,"i").test(e)&&!RegExp(s1+" pc","i").test(e)?rx:""},rL="https?://(.*)",rN=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],rj=Q(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],rN),rH="<masked>",rU=["li_fat_id"];function rq(e,t,i){if(!u)return{};var s,r=t?Q([],rN,i||[]):[],n=rB(tv(u.URL,r,rH),e);return Z((s={},J(rU,function(e){var t=tT.V(e);s[e]=t||null}),s),n)}function rB(e,t){var i=rj.concat(t||[]),s={};return J(i,function(t){var i=t_(e,t);s[t]=i||null}),s}function rz(e){var t=e?0===e.search(rL+"google.([^/?]*)")?"google":0===e.search(rL+"bing.com")?"bing":0===e.search(rL+"yahoo.com")?"yahoo":0===e.search(rL+"duckduckgo.com")?"duckduckgo":null:null,i={};if(!M(t)){i.$search_engine=t;var s=u?t_(u.referrer,"yahoo"!=t?"q":"p"):"";s.length&&(i.ph_keyword=s)}return i}function rG(){return navigator.language||navigator.userLanguage}function rW(){return(null==u?void 0:u.referrer)||"$direct"}function rV(e,t){var i=e?Q([],rN,t||[]):[],s=null==h?void 0:h.href.substring(0,1e3);return{r:rW().substring(0,1e3),u:s?tv(s,i,rH):void 0}}function rY(e){var t,{r:i,u:s}=e,r={$referrer:i,$referring_domain:null==i?void 0:"$direct"==i?"$direct":null==(t=tp(i))?void 0:t.host};
1if(s){r.$current_url=s;var n=tp(s);r.$host=null==n?void 0:n.host,r.$pathname=null==n?void 0:n.pathname,Z(r,rB(s))}return i&&Z(r,rz(i)),r}function rK(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}}var rX=W("[FeatureFlags]"),rJ="$active_feature_flags",rZ="$override_feature_flags",rQ="$feature_flag_payloads",r0="$override_feature_flag_payloads",r1="$feature_flag_request_id",r2=e=>{var t={};for(var[i,s]of ee(e||{}))s&&(t[i]=s);return t},r3=((nX={}).FeatureFlags="feature_flags",nX.Recordings="recordings",nX);class r5{constructor(e){this.be=!1,this.ye=!1,this.we=!1,this.Se=!1,this.$e=!1,this.xe=!1,this.ke=!1,this._instance=e,this.featureFlagEventHandlers=[]}flags(){if(this._instance.config.__preview_remote_config)this.xe=!0;else{var e=!this.Ee&&(this._instance.config.advanced_disable_feature_flags||this._instance.config.advanced_disable_feature_flags_on_first_load);this.Ie({disableFlags:e})}}get hasLoadedFlags(){return this.ye}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var e=this._instance.get_property(eT),t=this._instance.get_property(rZ),i=this._instance.get_property(r0);if(!i&&!t)return e||{};var s=Z({},e||{});for(var r of[...new Set([...Object.keys(i||{}),...Object.keys(t||{})])]){var n,o,a=s[r],l=null==t?void 0:t[r],c=T(l)?null!=(n=null==a?void 0:a.enabled)&&n:!!l,u=T(l)?a.variant:"string"==typeof l?l:void 0,h=null==i?void 0:i[r],d=m({},a,{enabled:c,variant:c?null!=u?u:null==a?void 0:a.variant:void 0});c!==(null==a?void 0:a.enabled)&&(d.original_enabled=null==a?void 0:a.enabled),u!==(null==a?void 0:a.variant)&&(d.original_variant=null==a?void 0:a.variant),h&&(d.metadata=m({},null==a?void 0:a.metadata,{payload:h,original_payload:null==a||null==(o=a.metadata)?void 0:o.payload})),s[r]=d}return this.be||(rX.warn(" Overriding feature flag details!",{flagDetails:e,overriddenPayloads:i,finalDetails:s}),this.be=!0),s}getFlagVariants(){var e=this._instance.get_property(eR),t=this._instance.get_property(rZ);if(!t)return e||{};for(var i=Z({},e),s=Object.keys(t),r=0;r<s.length;r++)i[s[r]]=t[s[r]];return this.be||(rX.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:i}),this.be=!0),i}getFlagPayloads(){var e=this._instance.get_property(rQ),t=this._instance.get_property(r0);if(!t)return e||{};for(var i=Z({},e||{}),s=Object.keys(t),r=0;r<s.length;r++)i[s[r]]=t[s[r]];return this.be||(rX.warn(" Overriding feature flag payloads!",{flagPayloads:e,overriddenPayloads:t,finalPayloads:i}),this.be=!0),i}reloadFeatureFlags(){this.Se||this._instance.config.advanced_disable_feature_flags||this.Ee||(this.Ee=setTimeout(()=>{this.Ie()},5))}Pe(){clearTimeout(this.Ee),this.Ee=void 0}ensureFlagsLoaded(){this.ye||this.we||this.Ee||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this.Se=e}Ie(e){var t;if(this.Pe(),!this._instance.L())if(this.we)this.$e=!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:m({},(null==(t=this._instance.persistence)?void 0:t.get_initial_props())||{},this._instance.get_property(eA)||{}),group_properties:this._instance.get_property(eO)};(null!=e&&e.disableFlags||this._instance.config.advanced_disable_feature_flags)&&(i.disable_flags=!0);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("api",(s?"/flags/?v=2":"/flags/?v=2&config=true")+r);s&&(i.timezone=rK()),this.we=!0,this._instance.Re({method:"POST",url:n,data:i,compression:this._instance.config.disable_compression?void 0:tu.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:e=>{var t,s,r,n=!0;200===e.statusCode&&(this.$e||(this.$anon_distinct_id=void 0),n=!1),this.we=!1,this.xe||(this.xe=!0,this._instance.Te(null!=(r=e.json)?r:{})),(!i.disable_flags||this.$e)&&((this.ke=!n,e.json&&null!=(s=e.json.quotaLimited)&&s.includes(r3.FeatureFlags))?rX.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.$e&&(this.$e=!1,this.Ie())))}})}}getFeatureFlag(e,t){if(void 0===t&&(t={}),this.ye||this.getFlags()&&this.getFlags().length>0){var i=this.getFlagVariants()[e],s=""+i,r=this._instance.get_property(r1)||void 0,n=this._instance.get_property(eL)||{};if((t.send_event||!("send_event"in t))&&(!(e in n)||!n[e].includes(s))){$(n[e])?n[e].push(s):n[e]=[s],null==(l=this._instance.persistence)||l.register({[eL]:n});var o=this.getFeatureFlagDetails(e),a={$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.ke};T(null==o||null==(h=o.metadata)?void 0:h.version)||(a.$feature_flag_version=o.metadata.version);var l,c,u,h,d,p,g,_,v,f,m=null!=(d=null==o||null==(p=o.reason)?void 0:p.description)?d:null==o||null==(g=o.reason)?void 0:g.code;m&&(a.$feature_flag_reason=m),null!=o&&null!=(_=o.metadata)&&_.id&&(a.$feature_flag_id=o.metadata.id),T(null==o?void 0:o.original_variant)&&T(null==o?void 0:o.original_enabled)||(a.$feature_flag_original_response=T(o.original_variant)?o.original_enabled:o.original_variant),null!=o&&null!=(v=o.metadata)&&v.original_payload&&(a.$feature_flag_original_payload=null==o||null==(f=o.metadata)?void 0:f.original_payload),this._instance.capture("$feature_flag_called",a)}return i}rX.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;this._instance.Re({method:"POST",url:this._instance.requestRouter.endpointFor("api","/flags/?v=2&config=true"),data:{distinct_id:this._instance.get_distinct_id(),token:i}
1,compression:this._instance.config.disable_compression?void 0:tu.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.ye||this.getFlags()&&this.getFlags().length>0){var i=this.getFeatureFlag(e,t);return T(i)?void 0:!!i}rX.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.ye=!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,o=((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]}))):rX.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),e),a=o.flags,l=o.featureFlags,c=o.featureFlagPayloads;if(l){var u=e.requestId;if($(l)){rX.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({[rJ]:l,[eR]:h})}else{var p=l,g=c,_=a;e.errorsWhileComputingFlags&&(p=m({},i,p),g=m({},s,g),_=m({},r,_)),t&&t.register(m({[rJ]:Object.keys(r2(p)),[eR]:p||{},[rQ]:g||{},[eT]:_||{}},u?{[r1]:u}:{}))}}}(e,this._instance.persistence,i,s,r),this.Ce(t)}}override(e,t){void 0===t&&(t=!1),rX.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:e,suppressWarning:t})}overrideFeatureFlags(e){if(!this._instance.__loaded||!this._instance.persistence)return rX.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(!1===e)return this._instance.persistence.unregister(rZ),this._instance.persistence.unregister(r0),void this.Ce();if(e&&"object"==typeof e&&("flags"in e||"payloads"in e)){var t;if(this.be=!!(null!=(t=e.suppressWarning)&&t),"flags"in e){if(!1===e.flags)this._instance.persistence.unregister(rZ);else if(e.flags)if($(e.flags)){for(var i={},s=0;s<e.flags.length;s++)i[e.flags[s]]=!0;this._instance.persistence.register({[rZ]:i})}else this._instance.persistence.register({[rZ]:e.flags})}return"payloads"in e&&(!1===e.payloads?this._instance.persistence.unregister(r0):e.payloads&&this._instance.persistence.register({[r0]:e.payloads})),void this.Ce()}this.Ce()}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.ye){var{flags:t,flagVariants:i}=this.Me();e(t,i)}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,t,i){var s,r=(this._instance.get_property(eC)||[]).find(t=>t.flagKey===e),n={["$feature_enrollment/"+e]:t},o={$feature_flag:e,$feature_enrollment:t,$set:n};r&&(o.$early_access_feature_name=r.name),i&&(o.$feature_enrollment_stage=i),this._instance.capture("$feature_enrollment_update",o),this.setPersonPropertiesForFlags(n,!1);var a=m({},this.getFlagVariants(),{[e]:t});null==(s=this._instance.persistence)||s.register({[rJ]:Object.keys(r2(a)),[eR]:a}),this.Ce()}getEarlyAccessFeatures(e,t,i){void 0===t&&(t=!1);var s=this._instance.get_property(eC),r=i?"&"+i.map(e=>"stage="+e).join("&"):"";if(s&&!t)return e(s);this._instance.Re({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(eC),null==(s=this._instance.persistence)||s.register({[eC]:r}),e(r)}}})}Me(){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),{})}}Ce(e){var{flags:t,flagVariants:i}=this.Me();
1this.featureFlagEventHandlers.forEach(s=>s(t,i,{errorsLoading:e}))}setPersonPropertiesForFlags(e,t){void 0===t&&(t=!0);var i=this._instance.get_property(eA)||{};this._instance.register({[eA]:m({},i,e)}),t&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister(eA)}setGroupPropertiesForFlags(e,t){void 0===t&&(t=!0);var i=this._instance.get_property(eO)||{};0!==Object.keys(i).length&&Object.keys(i).forEach(t=>{i[t]=m({},i[t],e[t]),delete e[t]}),this._instance.register({[eO]:m({},i,e)}),t&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){var t=this._instance.get_property(eO)||{};this._instance.register({[eO]:m({},t,{[e]:{}})})}else this._instance.unregister(eO)}reset(){this.ye=!1,this.we=!1,this.Se=!1,this.$e=!1,this.xe=!1,this.ke=!1,this.$anon_distinct_id=void 0,this.Pe(),this.be=!1}}var r4=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"];class r6{constructor(e,t){this.A=e,this.props={},this.Oe=!1,this.Fe=(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.it=this.Ae(e),this.load(),e.debug&&G.info("Persistence loaded",e.persistence,m({},this.props)),this.update_config(e,e,t),this.save()}isDisabled(){return!!this.De}Ae(e){-1===r4.indexOf(e.persistence.toLowerCase())&&(G.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var t=e.persistence.toLowerCase();return"localstorage"===t&&tO.G()?tO:"localstorage+cookie"===t&&tD.G()?tD:"sessionstorage"===t&&tH.G()?tH:"memory"===t?tN:"cookie"===t?tT:tD.G()?tD:tT}properties(){var e={};return J(this.props,function(t,i){if(i===eR&&R(t))for(var s,r=Object.keys(t),n=0;n<r.length;n++)e["$feature/"+r[n]]=t[r[n]];else s=!1,(M(eV)?s:l&&eV.indexOf===l?-1!=eV.indexOf(i):(J(eV,function(e){if(s||(s=e===i))return K}),s))||(e[i]=t)}),e}load(){if(!this.De){var e=this.it.K(this.Fe);e&&(this.props=Z({},e))}}save(){this.De||this.it.Y(this.Fe,this.props,this.je,this.Le,this.Ne,this.A.debug)}remove(){this.it.X(this.Fe,!1),this.it.X(this.Fe,!0)}clear(){this.remove(),this.props={}}register_once(e,t,i){if(R(e)){T(t)&&(t="None"),this.je=T(i)?this.ze:i;var s=!1;if(J(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(R(e)){this.je=T(t)?this.ze:t;var i=!1;if(J(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.Oe){var e=rq(this.A.custom_campaign_params,this.A.mask_personal_data_properties,this.A.custom_personal_data_properties);C(es(e))||this.register(e),this.Oe=!0}}update_search_keyword(){var e;this.register((e=null==u?void 0:u.referrer)?rz(e):{})}update_referrer_info(){var e;this.register_once({$referrer:rW(),$referring_domain:null!=u&&u.referrer&&(null==(e=tp(u.referrer))?void 0:e.host)||"$direct"},void 0)}set_initial_person_info(){this.props[eU]||this.props[eq]||this.register_once({[eB]:rV(this.A.mask_personal_data_properties,this.A.custom_personal_data_properties)},void 0)}get_initial_props(){var e={};J([eq,eU],t=>{var i=this.props[t];i&&J(i,function(t,i){e["$initial_"+x(i)]=t})});var t,i,s=this.props[eB];return s&&Z(e,(t=rY(s),i={},J(t,function(e,t){i["$initial_"+x(t)]=e}),i)),e}safe_merge(e){return J(this.props,function(t,i){i in e||(e[i]=t)}),e}update_config(e,t,i){if(this.ze=this.je=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.Ae(e),r=this.props;this.clear(),this.it=s,this.props=r,this.save()}}set_disabled(e){this.De=e,this.De?this.remove():this.save()}set_cross_subdomain(e){e!==this.Le&&(this.Le=e,this.remove(),this.save())}set_secure(e){e!==this.Ne&&(this.Ne=e,this.remove(),this.save())}set_event_timer(e,t){var i=this.props[ec]||{};i[e]=t,this.props[ec]=i,this.save()}remove_event_timer(e){var t=(this.props[ec]||{})[e];return T(t)||(delete this.props[ec][e],this.save()),t}get_property(e){return this.props[e]}set_property(e,t){this.props[e]=t,this.save()}}(nJ={}).Button="button",nJ.Tab="tab",nJ.Selector="selector",(nZ={}).TopLeft="top_left",nZ.TopRight="top_right",nZ.TopCenter="top_center",nZ.MiddleLeft="middle_left",nZ.MiddleRight="middle_right",nZ.MiddleCenter="middle_center",nZ.Left="left",nZ.Center="center",nZ.Right="right",nZ.NextToTrigger="next_to_trigger";var r8=((nQ={}
1).Popover="popover",nQ.API="api",nQ.Widget="widget",nQ.ExternalSurvey="external_survey",nQ),r7=((n0={}).Open="open",n0.MultipleChoice="multiple_choice",n0.SingleChoice="single_choice",n0.Rating="rating",n0.Link="link",(n1={}).NextQuestion="next_question",n1.End="end",n1.ResponseBased="response_based",n1.SpecificQuestion="specific_question",(n2={}).Once="once",n2.Recurring="recurring",n2.Always="always",(n3={}).SHOWN="survey shown",n3.DISMISSED="survey dismissed",n3.SENT="survey sent",n3),r9=((n5={}).SURVEY_ID="$survey_id",n5.SURVEY_NAME="$survey_name",n5.SURVEY_RESPONSE="$survey_response",n5.SURVEY_ITERATION="$survey_iteration",n5.SURVEY_ITERATION_START_DATE="$survey_iteration_start_date",n5.SURVEY_PARTIALLY_COMPLETED="$survey_partially_completed",n5.SURVEY_SUBMISSION_ID="$survey_submission_id",n5.SURVEY_QUESTIONS="$survey_questions",n5.SURVEY_COMPLETED="$survey_completed",n5),ne=((n4={}).Popover="popover",n4.Inline="inline",n4);class nt{constructor(){this.Ue={},this.Ue={}}on(e,t){return this.Ue[e]||(this.Ue[e]=[]),this.Ue[e].push(t),()=>{this.Ue[e]=this.Ue[e].filter(e=>e!==t)}}emit(e,t){for(var i of this.Ue[e]||[])i(t);for(var s of this.Ue["*"]||[])s(e,t)}}class ni{constructor(e){this.qe=new nt,this.Be=(e,t)=>this.He(e,t)&&this.We(e,t)&&this.Ge(e,t),this.He=(e,t)=>null==t||!t.event||(null==e?void 0:e.event)===(null==t?void 0:t.event),this._instance=e,this.Je=new Set,this.Ve=new Set}init(){var e,t;T(null==(e=this._instance)?void 0:e.Ke)||null==(t=this._instance)||t.Ke((e,t)=>{this.on(e,t)})}register(e){var t,i;if(!T(null==(t=this._instance)?void 0:t.Ke)&&(e.forEach(e=>{var t,i;null==(t=this.Ve)||t.add(e),null==(i=e.steps)||i.forEach(e=>{var t;null==(t=this.Je)||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.Je.has(e)||this.Je.has(null==t?void 0:t.event))&&this.Ve&&(null==(i=this.Ve)?void 0:i.size)>0&&this.Ve.forEach(e=>{this.Ye(t,e)&&this.qe.emit("actionCaptured",e.name)})}Xe(e){this.onAction("actionCaptured",t=>e(t))}Ye(e,t){if(null==(null==t?void 0:t.steps))return!1;for(var i of t.steps)if(this.Be(e,i))return!0;return!1}onAction(e,t){return this.qe.on(e,t)}We(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||!ni.Qe(s,null==t?void 0:t.url,(null==t?void 0:t.url_matching)||"contains"))return!1}return!0}static Qe(e,t,i){switch(i){case"regex":return!!r&&sV(e,t);case"exact":return t===e;case"contains":return sV(e,ni.Ze(t).replace(/_/g,".").replace(/%/g,".*"));default:return!1}}static Ze(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}Ge(e,t){if((null!=t&&t.href||null!=t&&t.tag_name||null!=t&&t.text)&&!this.tr(e).some(e=>!(null!=t&&t.href&&!ni.Qe(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&&!ni.Qe(e.text||"",null==t?void 0:t.text,(null==t?void 0:t.text_matching)||"exact")&&!ni.Qe(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}tr(e){return null==(null==e?void 0:e.properties.$elements)?[]:null==e?void 0:e.properties.$elements}}var ns=W("[Surveys]"),nr="seenSurvey_",nn=e=>{var t=""+nr+e.id;return e.current_iteration&&e.current_iteration>0&&(t=""+nr+e.id+"_"+e.current_iteration),t},no=[r8.Popover,r8.Widget,r8.API],na={ignoreConditions:!1,ignoreDelay:!1,displayType:ne.Popover};class nl{constructor(e){this._instance=e,this.ir=new Map,this.er=new Map}register(e){var t;T(null==(t=this._instance)?void 0:t.Ke)||(this.rr(e),this.sr(e))}sr(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.nr&&(this.nr=new ni(this._instance),this.nr.init(
1),this.nr.Xe(e=>{this.onAction(e)})),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.nr)||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.er.get(t.name);i&&i.push(e.id),this.er.set(t.name,i||[e.id])}}))}))}rr(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.Ke((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.ir.get(t.name);i&&i.push(e.id),this.ir.set(t.name,i||[e.id])}})}))}onEvent(e,t){var i,s=(null==(i=this._instance)||null==(i=i.persistence)?void 0:i.props[eD])||[];if("survey shown"===e&&t&&s.length>0){ns.info("survey event matched, removing survey from activated surveys",{event:e,eventPayload:t,existingActivatedSurveys:s});var r,n=null==t||null==(r=t.properties)?void 0:r.$survey_id;if(n){var o=s.indexOf(n);o>=0&&(s.splice(o,1),this.ar(s))}}else this.ir.has(e)&&(ns.info("survey event matched, updating activated surveys",{event:e,surveys:this.ir.get(e)}),this.ar(s.concat(this.ir.get(e)||[])))}onAction(e){var t,i=(null==(t=this._instance)||null==(t=t.persistence)?void 0:t.props[eD])||[];this.er.has(e)&&this.ar(i.concat(this.er.get(e)||[]))}ar(e){var t;null==(t=this._instance)||null==(t=t.persistence)||t.register({[eD]:[...new Set(e)]})}getSurveys(){var e;return(null==(e=this._instance)||null==(e=e.persistence)?void 0:e.props[eD])||[]}getEventToSurveys(){return this.ir}lr(){return this.nr}}class nc{constructor(e){this.hr=void 0,this._surveyManager=null,this.ur=!1,this.dr=!1,this.vr=[],this._instance=e,this._surveyEventReceiver=null}onRemoteConfig(e){if(!this._instance.config.disable_surveys){var t=e.surveys;if(D(t))return ns.warn("Flags not loaded yet. Not loading surveys.");var i=$(t);this.hr=i?t.length>0:t,ns.info("flags response received, isSurveysEnabled: "+this.hr),this.loadIfEnabled()}}reset(){localStorage.removeItem("lastSeenSurveyDate");for(var e=[],t=0;t<localStorage.length;t++){var i=localStorage.key(t);(null!=i&&i.startsWith(nr)||null!=i&&i.startsWith("inProgressSurvey_"))&&e.push(i)}e.forEach(e=>localStorage.removeItem(e))}loadIfEnabled(){if(!this._surveyManager)if(this.dr)ns.info("Already initializing surveys, skipping...");else if(this._instance.config.disable_surveys)ns.info("Disabled. Not loading surveys.");else if(this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())ns.info("Not loading surveys in cookieless mode without consent.");else{var e=null==v?void 0:v.__PosthogExtensions__;if(e){if(!T(this.hr)||this._instance.config.advanced_enable_surveys){var t=this.hr||this._instance.config.advanced_enable_surveys;this.dr=!0;try{var i=e.generateSurveys;if(i)return void this.cr(i,t);var s=e.loadExternalDependency;if(!s)return void this.pr("PostHog loadExternalDependency extension not found.");s(this._instance,"surveys",i=>{i||!e.generateSurveys?this.pr("Could not load surveys script",i):this.cr(e.generateSurveys,t)})}catch(e){throw this.pr("Error initializing surveys",e),e}finally{this.dr=!1}}}else ns.error("PostHog Extensions not found.")}}cr(e,t){this._surveyManager=e(this._instance,t),this._surveyEventReceiver=new nl(this._instance),ns.info("Surveys loaded successfully"),this.gr({isLoaded:!0})}pr(e,t){ns.error(e,t),this.gr({isLoaded:!1,error:e})}onSurveysLoaded(e){return this.vr.push(e),this._surveyManager&&this.gr({isLoaded:!0}),()=>{this.vr=this.vr.filter(t=>t!==e)}}getSurveys(e,t){if(void 0===t&&(t=!1),this._instance.config.disable_surveys)return ns.info("Disabled. Not loading surveys."),e([]);var i=this._instance.get_property(eM);if(i&&!t)return e(i,{isLoaded:!0});if(this.ur)return e([],{isLoaded:!1,error:"Surveys are already being loaded"});try{this.ur=!0,this._instance.Re({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.ur=!1;var i=t.statusCode;if(200!==i||!t.json){var s="Surveys API could not be loaded, status: "+i;return ns.error(s),e([],{isLoaded:!1,error:s})}var r,n,o=t.json.surveys||[],a=o.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 a.length>0&&(null==(n=this._surveyEventReceiver)||n.register(a)),null==(r=this._instance.persistence)||r.register({[eM]:o}),e(o,{isLoaded:!0})}})}catch(e){throw this.ur=!1,e}}gr(e){for(var t of this.vr)try{if(!e.isLoaded)return t([],e);
1this.getSurveys(t)}catch(e){ns.error("Error in survey callback",e)}}getActiveMatchingSurveys(e,t){if(void 0===t&&(t=!1),!D(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,t);ns.warn("init was not called")}_r(e){var t=null;return this.getSurveys(i=>{var s;t=null!=(s=i.find(t=>t.id===e))?s:null}),t}mr(e){if(D(this._surveyManager))return{eligible:!1,reason:"SDK is not enabled or survey functionality is not yet loaded"};var t="string"==typeof e?this._r(e):e;return t?this._surveyManager.checkSurveyEligibility(t):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(e){if(D(this._surveyManager))return ns.warn("init was not called"),{visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"};var t=this.mr(e);return{visible:t.eligible,disabledReason:t.reason}}canRenderSurveyAsync(e,t){return D(this._surveyManager)?(ns.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.mr(r);i({visible:n.eligible,disabledReason:n.reason})}else i({visible:!1,disabledReason:"Survey not found"})},t)})}renderSurvey(e,t){var i;if(D(this._surveyManager))ns.warn("init was not called");else{var s="string"==typeof e?this._r(e):e;if(null!=s&&s.id)if(no.includes(s.type)){var r=null==u?void 0:u.querySelector(t);if(r)return null!=(i=s.appearance)&&i.surveyPopupDelaySeconds?(ns.info("Rendering survey "+s.id+" with delay of "+s.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout(()=>{var e,t;ns.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),ns.info("Survey "+s.id+" rendered")},1e3*s.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(s,r);ns.warn("Survey element not found")}else ns.warn("Surveys of type "+s.type+" cannot be rendered in the app");else ns.warn("Survey not found")}}displaySurvey(e,t){var i;if(D(this._surveyManager))ns.warn("init was not called");else{var s=this._r(e);if(s){var r=s;if(null!=(i=s.appearance)&&i.surveyPopupDelaySeconds&&t.ignoreDelay&&(r=m({},s,{appearance:m({},s.appearance,{surveyPopupDelaySeconds:0})})),!1===t.ignoreConditions){var n=this.canRenderSurvey(s);if(!n.visible)return void ns.warn("Survey is not eligible to be displayed: ",n.disabledReason)}t.displayType!==ne.Inline?this._surveyManager.handlePopoverSurvey(r):this.renderSurvey(r,t.selector)}else ns.warn("Survey not found")}}}var nu=W("[RateLimiter]");class nh{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=>{nu.info((e||"events")+" is quota limited."),this.serverLimits[e]=(new Date).getTime()+6e4})}catch(e){return void nu.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(eH))?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 o=n.tokens<1;return o||e||(n.tokens=Math.max(0,n.tokens-1)),!o||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=o,null==(s=this.instance.persistence)||s.set_property(eH,n),{isRateLimited:o,remainingTokens:n.tokens}}isServerRateLimited(e){var t=this.serverLimits[e||"events"]||!1;return!1!==t&&(new Date).getTime()<t}}var nd=W("[RemoteConfig]");class np{constructor(e){this._instance=e}get remoteConfig(){var e;return null==(e=v._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.config}br(e){var t,i;null!=(t=v.__PosthogExtensions__)&&t.loadExternalDependency?null==(i=v.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"remote-config",()=>e(this.remoteConfig)):(nd.error("PostHog Extensions not found. Cannot load remote config."),e())}yr(e){this._instance.Re({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 nd.info("Using preloaded remote config",this.remoteConfig),void this.Te(this.remoteConfig);if(this._instance.L())return void nd.warn("Remote config is disabled. Falling back to local config.");this.br(e=>{e?this.Te(e):(nd.info("No config found after loading remote JS config. Falling back to JSON."),this.yr(e=>{this.Te(e)}))})}catch(e){nd.error("Error loading remote config",e)}}Te(e){e?this._instance.config.__preview_remote_config?(this._instance.Te(e),!1!==e.hasFeatureFlags&&this._instance.featureFlags.ensureFlagsLoaded()):nd.info("__preview_remote_config is disabled. Logging config instead",e):nd.error("Failed to fetch remote config from PostHog.")}}class ng{constructor(e,t){this.wr=!0,this.Sr=[],this.$r=q((null==t?void 0:t.flush_interval_ms)||3e3,250,5e3,G.createLogger("flush interval"),3e3),this.kr=e}enqueue(e){this.Sr.push(e),this.Er||this.Ir()}unload(){this.Pr();var e=Object.values(this.Sr.length>0?this.Rr():{});[...e.filter(e=>0===e.url.indexOf("/e")),...e.filter(e=>0!==e.url.indexOf("/e"))].map(e=>{this.kr(m({},e,{transport:"sendBeacon"}))})}enable(){this.wr=!1,this.Ir()}Ir(){var e=this;this.wr||(this.Er=setTimeout(()=>{if(this.Pr(),this.Sr.length>0){var t=this.Rr();for(var i in t)!function(){var s=t[i],r=(new Date).getTime();s.data&&$(s.data)&&J(s.data,e=>{e.offset=Math.abs(e.timestamp-r),delete e.timestamp}),e.kr(s)}()}},this.$r))}Pr(){clearTimeout(this.Er),this.Er=void 0}Rr(){var e={};return J(this.Sr,t=>{var i,s=(t?t.batchKey:null)||t.url;T(e[s])&&(e[s]=m({},t,{data:[]})),null==(i=e[s].data)||i.push(t.data)}),this.Sr=[],e}}var n_=["retriesPerformedSoFar"];class nv{constructor(e){this.Tr=!1,this.Cr=3e3,this.Sr=[],this._instance=e,this.Sr=[],this.Mr=!0,!T(r)&&"onLine"in r.navigator&&(this.Mr=r.navigator.onLine,eo(r,"online",()=>{this.Mr=!0,this.ne()}),eo(r,"offline",()=>{this.Mr=!1}))}get length(){return this.Sr.length}retriableRequest(e){var{retriesPerformedSoFar:t}=e,i=y(e,n_);L(t)&&t>0&&(i.url=sB(i.url,{retry_count:t})),this._instance.Re(m({},i,{callback:e=>{200!==e.statusCode&&(e.statusCode<400||e.statusCode>=500)&&(null!=t?t:0)<10?this.Or(m({retriesPerformedSoFar:t},i)):null==i.callback||i.callback(e)}}))}Or(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)),o=Date.now()+n;this.Sr.push({retryAt:o,requestOptions:e});var a="Enqueued failed request for retry in "+n;navigator.onLine||(a+=" (Browser is offline)"),G.warn(a),this.Tr||(this.Tr=!0,this.Fr())}Fr(){this.Ar&&clearTimeout(this.Ar),this.Ar=setTimeout(()=>{this.Mr&&this.Sr.length>0&&this.ne(),this.Fr()},this.Cr)}ne(){var e=Date.now(),t=[],i=this.Sr.filter(i=>i.retryAt<e||(t.push(i),!1));if(this.Sr=t,i.length>0)for(var{requestOptions:s}of i)this.retriableRequest(s)}unload(){for(var{requestOptions:e}of(this.Ar&&(clearTimeout(this.Ar),this.Ar=void 0),this.Sr))try{this._instance.Re(m({},e,{transport:"sendBeacon"}))}catch(e){G.error(e)}this.Sr=[]}}class nf{constructor(e){this.Dr=()=>{this.jr||(this.jr={});var e,t,i,s,r=this.scrollElement(),n=this.scrollY(),o=r?Math.max(0,r.scrollHeight-r.clientHeight):0,a=n+((null==r?void 0:r.clientHeight)||0),l=(null==r?void 0:r.scrollHeight)||0;this.jr.lastScrollY=Math.ceil(n),this.jr.maxScrollY=Math.max(n,null!=(e=this.jr.maxScrollY)?e:0),this.jr.maxScrollHeight=Math.max(o,null!=(t=this.jr.maxScrollHeight)?t:0),this.jr.lastContentY=a,this.jr.maxContentY=Math.max(a,null!=(i=this.jr.maxContentY)?i:0),this.jr.maxContentHeight=Math.max(l,null!=(s=this.jr.maxContentHeight)?s:0)},this._instance=e}getContext(){return this.jr}resetContext(){var e=this.jr;return setTimeout(this.Dr,0),e}startMeasuringScrollPosition(){eo(r,"scroll",this.Dr,{capture:!0}),eo(r,"scrollend",this.Dr,{capture:!0}),eo(r,"resize",this.Dr)}scrollElement(){if(!this._instance.config.scroll_root_selector)return null==r?void 0:r.document.documentElement;for(var e of $(this._instance.config.scroll_root_selector)?this._instance.config.scroll_root_selector:[this._instance.config.scroll_root_selector]){var t=null==r?void 0:r.document.querySelector(e);
1if(t)return t}}scrollY(){if(this._instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollTop||0}return r&&(r.scrollY||r.pageYOffset||r.document.documentElement.scrollTop)||0}scrollX(){if(this._instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollLeft||0}return r&&(r.scrollX||r.pageXOffset||r.document.documentElement.scrollLeft)||0}}var nm=e=>rV(null==e?void 0:e.config.mask_personal_data_properties,null==e?void 0:e.config.custom_personal_data_properties);class ny{constructor(e,t,i,s){this.Lr=e=>{var t=this.Nr();if(!t||t.sessionId!==e){var i={sessionId:e,props:this.zr(this._instance)};this.Ur.register({[ej]:i})}},this._instance=e,this.qr=t,this.Ur=i,this.zr=s||nm,this.qr.onSessionId(this.Lr)}Nr(){return this.Ur.props[ej]}getSetOnceProps(){var e,t=null==(e=this.Nr())?void 0:e.props;return t?"r"in t?rY(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 J(es(this.getSetOnceProps()),(t,i)=>{"$current_url"===i&&(i="url"),e["$session_entry_"+x(i)]=t}),e}}var nb=W("[SessionId]");class nw{constructor(e,t,i){if(this.Br=[],this.Hr=(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.A=e.config,this.Ur=e.persistence,this.pi=void 0,this.Ft=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.Wr=t||t$,this.Gr=i||t$;var s,r=this.A.persistence_name||this.A.token,n=this.A.session_idle_timeout_seconds||1800;if(this._sessionTimeoutMs=1e3*q(n,60,36e3,nb.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.Jr(),this.Vr="ph_"+r+"_window_id",this.Kr="ph_"+r+"_primary_window_exists",this.Yr()){var o=tH.K(this.Vr),a=tH.K(this.Kr);o&&!a?this.pi=o:tH.X(this.Vr),tH.Y(this.Kr,!0)}if(null!=(s=this.A.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.A.bootstrap.sessionID);this.Xr(this.A.bootstrap.sessionID,(new Date).getTime(),l)}catch(e){nb.error("Invalid sessionID in bootstrap",e)}this.Qr()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return T(this.Br)&&(this.Br=[]),this.Br.push(e),this.Ft&&e(this.Ft,this.pi),()=>{this.Br=this.Br.filter(t=>t!==e)}}Yr(){return"memory"!==this.A.persistence&&!this.Ur.De&&tH.G()}Zr(e){e!==this.pi&&(this.pi=e,this.Yr()&&tH.Y(this.Vr,e))}ts(){return this.pi?this.pi:this.Yr()?tH.K(this.Vr):null}Xr(e,t,i){e===this.Ft&&t===this._sessionActivityTimestamp&&i===this._sessionStartTimestamp||(this._sessionStartTimestamp=i,this._sessionActivityTimestamp=t,this.Ft=e,this.Ur.register({[eI]:[t,e,i]}))}es(){if(this.Ft&&this._sessionActivityTimestamp&&this._sessionStartTimestamp)return[this._sessionActivityTimestamp,this.Ft,this._sessionStartTimestamp];var e=this.Ur.props[eI];return $(e)&&2===e.length&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.Xr(null,null,null)}Qr(){eo(r,"beforeunload",()=>{this.Yr()&&tH.X(this.Kr)},{capture:!1})}checkAndGetSessionAndWindowId(e,t){if(void 0===e&&(e=!1),void 0===t&&(t=null),"always"===this.A.cookieless_mode)throw Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var i=t||(new Date).getTime(),[s,r,n]=this.es(),o=this.ts(),a=L(n)&&n>0&&Math.abs(i-n)>864e5,l=!1,c=!r,u=!e&&this.Hr(i,s);c||u||a?(r=this.Wr(),o=this.Gr(),nb.info("new session ID generated",{sessionId:r,windowId:o,changeReason:{noSessionId:c,activityTimeout:u,sessionPastMaximumLength:a}}),n=i,l=!0):o||(o=this.Gr(),l=!0);var h=0===s||!e||a?i:s,d=0===n?(new Date).getTime():n;return this.Zr(o),this.Xr(r,h,d),e||this.Jr(),l&&this.Br.forEach(e=>e(r,o,l?{noSessionId:c,activityTimeout:u,sessionPastMaximumLength:a}:void 0)),{sessionId:r,windowId:o,sessionStartTimestamp:d,changeReason:l?{noSessionId:c,activityTimeout:u,sessionPastMaximumLength:a}:void 0,lastActivityTimestamp:s}}Jr(){clearTimeout(this.rs),this.rs=setTimeout(()=>{var[e]=this.es();this.Hr((new Date).getTime(),e)&&this.resetSessionId()},1.1*this.sessionTimeoutMs)}}
vendor: 5,904 bytes, line 1
1var nE=["$set_once","$set"],nx=W("[SiteApps]");class nS{constructor(e){this._instance=e,this.ss=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}ns(e,t){if(t){var i=this.globalsForEvent(t);this.ss.push(i),this.ss.length>1e3&&(this.ss=this.ss.slice(10))}}get siteAppLoaders(){var e;return null==(e=v._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.siteApps}init(){if(this.isEnabled){var e=this._instance.Ke(this.ns.bind(this));this.os=()=>{e(),this.ss=[],this.os=void 0}}}globalsForEvent(e){if(!e)throw Error("Event payload is required");var t,i,s,r,n,o,a,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:m({},y(e,nE),{properties:m({},e.properties,p?{$set:m({},null!=(t=null==(i=e.properties)?void 0:i.$set)?t:{},p)}:{},d?{$set_once:m({},null!=(s=null==(r=e.properties)?void 0:r.$set_once)?s:{},d)}:{}),elements_chain:null!=(n=null==(o=e.properties)?void 0:o.$elements_chain)?n:"",distinct_id:null==(a=e.properties)?void 0:a.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.ss.length&&(nx.info("Processing "+this.ss.length+" events for site app with id "+e.id),this.ss.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.os)||i.call(this))},s=!1,r=r=>{t.errored=!r,t.loaded=!0,nx.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){nx.error("Error while initializing PostHog app with config id "+e.id,t),r(!1)}if(s&&t.loaded)try{i()}catch(i){nx.error("Error while processing buffered events PostHog app with config id "+e.id,i),t.errored=!0}}ls(){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)}hs(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){nx.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.ls(),void this._instance.on("eventCaptured",e=>this.hs(e))):void nx.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if(null==(i=this.os)||i.call(this),null!=(s=e.siteApps)&&s.length)if(this.isEnabled){var n=function(e){var t;v["__$$ph_site_app_"+e]=r._instance,null==(t=v.__PosthogExtensions__)||null==t.loadSiteApp||t.loadSiteApp(r._instance,a,t=>{if(t)return nx.error("Error while initializing PostHog app with config id "+e,t)})};for(var{id:o,url:a}of e.siteApps)n(o)}else nx.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}var nk=["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"],nI=function(e,t){if(!e)return!1;var i=e.toLowerCase();return nk.concat(t||[]).some(e=>{var t=e.toLowerCase();return -1!==i.indexOf(t)})},nP=function(e,t){if(!e)return!1;var i=e.userAgent;if(i&&nI(i,t))return!0;try{var s=null==e?void 0:e.userAgentData;if(null!=s&&s.brands&&s.brands.some(e=>nI(null==e?void 0:e.brand,t)))return!0}catch(e){}return!!e.webdriver},n$=((n6={}).US="us",n6.EU="eu",n6.CUSTOM="custom",n6),nF="i.posthog.com";class nR{constructor(e){this.us={},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 uiHost(){var e,t=null==(e=this.instance.config.ui_host)?void 0:e.replace(/\/$/,"");return t||(t=this.apiHost.replace("."+nF,".posthog.com")),"https://app.posthog.com"===t?"https://us.posthog.com":t}get region(){return this.us[this.apiHost]||(/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.us[this.apiHost]=n$.US:/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.us[this.apiHost]=n$.EU:this.us[this.apiHost]=n$.CUSTOM),this.us[this.apiHost]}endpointFor(e,t){if(void 0===t&&(t=""),t&&(t="/"===t[0]?t:"/"+t),"ui"===e)return this.uiHost+t;if(this.region===n$.CUSTOM)return this.apiHost+t;var i=nF+t;switch(e){case"assets":return"https://"+this.region+"-assets."+i;case"api":return"https://"+this.region+"."+i}}}var nC={icontains:(e,t)=>!!r&&t.href.toLowerCase().indexOf(e.toLowerCase())>-1,not_icontains:(e,t)=>!!r&&-1===t.href.toLowerCase().indexOf(e.toLowerCase()),regex:(e,t)=>!!r&&sV(t.href,e),not_regex:(e,t)=>!!r&&!sV(t.href,e),exact:(e,t)=>
1t.href===e,is_not:(e,t)=>t.href!==e};class nT{constructor(e){var t=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(e){void 0===e&&(e=!1),t.getWebExperiments(e=>{nT.ds("retrieved web experiments from the server"),t.vs=new Map,e.forEach(e=>{if(e.feature_flag_key){t.vs&&(nT.ds("setting flag key ",e.feature_flag_key," to web experiment ",e),null==(i=t.vs)||i.set(e.feature_flag_key,e));var i,s=t._instance.getFeatureFlag(e.feature_flag_key);A(s)&&e.variants[s]&&t.cs(e.name,s,e.variants[s].transforms)}else if(e.variants)for(var r in e.variants){var n=e.variants[r];nT.fs(n)&&t.cs(e.name,r,n.transforms)}})},e)},this._instance=e,this._instance.onFeatureFlags(e=>{this.onFeatureFlags(e)})}onFeatureFlags(e){if(this._is_bot())nT.ds("Refusing to render web experiment since the viewer is a likely bot");else if(!this._instance.config.disable_web_experiments){if(D(this.vs))return this.vs=new Map,this.loadIfEnabled(),void this.previewWebExperiment();nT.ds("applying feature flags",e),e.forEach(e=>{var t;if(this.vs&&null!=(t=this.vs)&&t.has(e)){var i,s=this._instance.getFeatureFlag(e),r=null==(i=this.vs)?void 0:i.get(e);s&&null!=r&&r.variants[s]&&this.cs(r.name,s,r.variants[s].transforms)}})}}previewWebExperiment(){var e=nT.getWindowLocation();if(null!=e&&e.search){var t=t_(null==e?void 0:e.search,"__experiment_id"),i=t_(null==e?void 0:e.search,"__experiment_variant");t&&i&&(nT.ds("previewing web experiments "+t+" && "+i),this.getWebExperiments(e=>{this.ps(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.Re({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([])})}ps(e,t,i){var s=i.filter(t=>t.id===e);s&&s.length>0&&(nT.ds("Previewing web experiment ["+s[0].name+"] with variant ["+t+"]"),this.cs(s[0].name,t,s[0].variants[t].transforms))}static fs(e){return!D(e.conditions)&&nT.gs(e)&&nT._s(e)}static gs(e){if(D(e.conditions)||D(null==(t=e.conditions)?void 0:t.url))return!0;var t,i,s,r,n=nT.getWindowLocation();return!!n&&(null==(i=e.conditions)||!i.url||nC[null!=(s=null==(r=e.conditions)?void 0:r.urlMatchType)?s:"icontains"](e.conditions.url,n))}
1static getWindowLocation(){return null==r?void 0:r.location}static _s(e){if(D(e.conditions)||D(null==(i=e.conditions)?void 0:i.utm))return!0;var t=rq();if(t.utm_source){var i,s,r,n,o,a,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==(o=e.conditions)||null==(o=o.utm)?void 0:o.utm_source)==t.utm_source,p=null==(a=e.conditions)||null==(a=a.utm)||!a.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 ds(e){for(var t=arguments.length,i=Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];G.info("[WebExperiments] "+e,i)}cs(e,t,i){this._is_bot()?nT.ds("Refusing to render web experiment since the viewer is a likely bot"):"control"!==t?i.forEach(i=>{if(i.selector){nT.ds("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)})}}):nT.ds("Control variants leave the page unmodified.")}_is_bot(){return c&&this._instance?nP(c,this._instance.config.custom_blocked_useragents):void 0}}var nA=W("[PostHog ExternalIntegrations]"),nO={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class nM{constructor(e){this._instance=e}nt(e,t){var i;null==(i=v.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,e,e=>{if(e)return nA.error("failed to load script",e);t()})}startIfEnabledOrStop(){var e,t=this,i=function(e){var i,s,n;!r||null!=(i=v.__PosthogExtensions__)&&null!=(i=i.integrations)&&i[e]||t.nt(nO[e],()=>{var i;null==(i=v.__PosthogExtensions__)||null==(i=i.integrations)||null==(i=i[e])||i.start(t._instance)}),!r&&null!=(s=v.__PosthogExtensions__)&&null!=(s=s.integrations)&&s[e]&&(null==(n=v.__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 nD="[SessionRecording]",nL=W(nD);
1class nN{get started(){var e;return!(null==(e=this.bs)||!e.isStarted)}get status(){var e;return(null==(e=this.bs)?void 0:e.status)||"lazy_loading"}constructor(e){if(this._forceAllowLocalhostNetworkCapture=!1,this._instance=e,!this._instance.sessionManager)throw nL.error("started without valid sessionManager"),Error(nD+" started without valid sessionManager. This is a bug.");if("always"===this._instance.config.cookieless_mode)throw Error(nD+' cannot be used with cookieless_mode="always"')}get qt(){var e=!!this._instance.get_property(em),t=!this._instance.config.disable_session_recording,i=this._instance.config.disable_session_recording||this._instance.consent.isOptedOut();return r&&e&&t&&!i}startIfEnabledOrStop(e){var t;if(!this.qt||null==(t=this.bs)||!t.isStarted){var i=!T(Object.assign)&&!T(Array.from);this.qt&&i?(this.ys(e),nL.info("starting")):this.stopRecording()}}ys(e){var t,i,s;this.qt&&(null!=v&&null!=(t=v.__PosthogExtensions__)&&null!=(t=t.rrweb)&&t.record&&null!=(i=v.__PosthogExtensions__)&&i.initSessionRecording?this.Ii(e):null==(s=v.__PosthogExtensions__)||null==s.loadExternalDependency||s.loadExternalDependency(this._instance,this.Pi,t=>{if(t)return nL.error("could not load recorder",t);this.Ii(e)}))}stopRecording(){var e;null==(e=this.bs)||e.stop()}onRemoteConfig(e){this.ws=e;var t,i=this._instance.persistence;i&&i.register({[em]:!!e.sessionRecording,[ek]:null==(t=e.sessionRecording)?void 0:t.scriptConfig}),this.bs?(this.bs.onRemoteConfig(e),this.ws=void 0):this.ys(),this.startIfEnabledOrStop()}log(e,t){var i;void 0===t&&(t="log"),null!=(i=this.bs)&&i.log?this.bs.log(e,t):nL.warn("log called before recorder was ready")}get Pi(){var e;return(null==(e=this._instance)||null==(e=e.persistence)||null==(e=e.get_property(ek))?void 0:e.script)||"lazy-recorder"}Ii(e){var t,i;if(null==(t=v.__PosthogExtensions__)||!t.initSessionRecording)throw Error("Called on script loaded before session recording is available");this.bs||(this.bs=null==(i=v.__PosthogExtensions__)?void 0:i.initSessionRecording(this._instance),this.bs._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture,this.ws&&(this.bs.onRemoteConfig(this.ws),this.ws=void 0)),this.bs.start(e)}onRRwebEmit(e){var t;null==(t=this.bs)||null==t.onRRwebEmit||t.onRRwebEmit(e)}overrideLinkedFlag(){var e;null==(e=this.bs)||e.overrideLinkedFlag()}overrideSampling(){var e;null==(e=this.bs)||e.overrideSampling()}overrideTrigger(e){var t;null==(t=this.bs)||t.overrideTrigger(e)}get sdkDebugProperties(){var e;return(null==(e=this.bs)?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(e,t){var i;return!(null==(i=this.bs)||!i.tryAddCustomEvent(e,t))}}var nj={},nH=()=>{},nU="posthog",nq=!sU&&-1===(null==_?void 0:_.indexOf("MSIE"))&&-1===(null==_?void 0:_.indexOf("Mozilla")),nB=e=>{var t;return{api_host:"https://us.i.posthog.com",ui_host:null,token:"",autocapture:!0,rageclick:!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 er)if(i===s)return!1;return!0}(null==u?void 0:u.location),persistence:"localStorage+cookie",persistence_name:"",loaded:nH,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageview:"2025-05-24"!==e||"history_change",capture_pageleave:"if_capture_pageview",defaults:null!=e?e:"unset",debug:h&&A(null==h?void 0:h.search)&&-1!==h.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==r||null==(t=r.location)?void 0:t.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,session_recording:{},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;G.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:nH,__preview_eager_load_replay:!0}},nz=e=>{var t={};T(e.process_person)||(t.person_profiles=e.process_person),T(e.xhr_headers)||(t.request_headers=e.x
1hr_headers),T(e.cookie_name)||(t.persistence_name=e.cookie_name),T(e.disable_cookie)||(t.disable_persistence=e.disable_cookie),T(e.store_google)||(t.save_campaign_params=e.store_google),T(e.verbose)||(t.debug=e.verbose);var i=Z({},t,e);return $(e.property_blacklist)&&(T(e.property_denylist)?i.property_denylist=e.property_blacklist:$(e.property_denylist)?i.property_denylist=[...e.property_blacklist,...e.property_denylist]:G.error("Invalid value for property_denylist config: "+e.property_denylist)),i};class nG{constructor(){this.__forceAllowLocalhost=!1}get Ss(){return this.__forceAllowLocalhost}set Ss(e){G.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}class nW{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 nG,this.$s=!1,this.version=f.LIB_VERSION,this.xs=new nt,this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=nB(),this.SentryIntegration=sI,this.sentryIntegration=e=>{var t;return t=sk(this,e),{name:sS,processEvent:e=>t(e)}},this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.ks=!1,this.Es=null,this.Is=null,this.Ps=null,this.featureFlags=new r5(this),this.toolbar=new sC(this),this.scrollManager=new nf(this),this.pageViewManager=new sj(this),this.surveys=new nc(this),this.experiments=new nT(this),this.exceptions=new sZ(this),this.rateLimiter=new nh(this),this.requestRouter=new nR(this),this.consent=new tq(this),this.externalIntegrations=new nM(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=>G.info('send "'+(null==e?void 0:e.event)+'"',e))}init(e,t,i){if(i&&i!==nU){var s,r=null!=(s=nj[i])?s:new nW;return r._init(e,t,i),nj[i]=r,nj[nU][i]=r,r}return this._init(e,t,i)}_init(e,t,i){if(void 0===t&&(t={}),T(e)||O(e))return G.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 G.warn("You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},this.Rs=t,this.Ts=[],t.person_profiles&&(this.Is=t.person_profiles),this.set_config(Z({},nB(t.defaults),nz(t),{name:i,token:e})),this.config.on_xhr_error&&G.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=t.disable_compression?void 0:tu.GZipJS;var s=this.Cs();this.persistence=new r6(this.config,s),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new r6(m({},this.config,{persistence:"sessionStorage"}),s);var n=m({},this.persistence.props),o=m({},this.sessionPersistence.props);this.register({$initialization_time:(new Date).toISOString()}),this.Ms=new ng(e=>this.Os(e),this.config.request_queue_config),this.Fs=new nv(this),this.__request_queue=[];var a="always"===this.config.cookieless_mode||"on_reject"===this.config.cookieless_mode&&this.consent.isExplicitlyOptedOut();if(a||(this.sessionManager=new nw(this),this.sessionPropsManager=new ny(this,this.sessionManager,this.persistence)),new sA(this).startIfEnabledOrStop(),this.siteApps=new nS(this),null==(l=this.siteApps)||l.init(),a||(this.config.__preview_eager_load_replay?this.sessionRecording=new sE(this):this.sessionRecording=new nN(this),this.sessionRecording.startIfEnabledOrStop()),this.config.disable_scroll_properties||this.scrollManager.startMeasuringScrollPosition(),this.autocapture=new tb(this),this.autocapture.startIfEnabled(),this.surveys.loadIfEnabled(),this.heatmaps=new sN(this),this.heatmaps.startIfEnabled(),this.webVitalsAutocapture=new sM(this),this.exceptionObserver=new tY(this),this.exceptionObserver.startIfEnabled(),this.deadClicksAutocapture=new tW(this,tG),this.deadClicksAutocapture.startIfEnabled(),this.historyAutocapture=new iu(this),this.historyAutocapture.startIfEnabled(),f.DEBUG=f.DEBUG||this.config.debug,f.DEBUG&&G.info("Starting in debug mode",{this:this,config:t,thisC:m({},this.config),p:n,s:o}
vendor: 5,052 bytes, line 1
1),void 0!==(null==(c=t.bootstrap)?void 0:c.distinctID)){var l,c,u,h,d=this.config.get_device_id(t$()),p=null!=(u=t.bootstrap)&&u.isIdentifiedID?d:t.bootstrap.distinctID;this.persistence.set_property(eN,null!=(h=t.bootstrap)&&h.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:t.bootstrap.distinctID,$device_id:p})}if(this.As()){var g,_,v=Object.keys((null==(g=t.bootstrap)?void 0:g.featureFlags)||{}).filter(e=>{var i;return!(null==(i=t.bootstrap)||null==(i=i.featureFlags)||!i[e])}).reduce((e,i)=>{var s;return e[i]=(null==(s=t.bootstrap)||null==(s=s.featureFlags)?void 0:s[i])||!1,e},{}),y=Object.keys((null==(_=t.bootstrap)?void 0:_.featureFlagPayloads)||{}).filter(e=>v[e]).reduce((e,i)=>{var s,r;return null!=(s=t.bootstrap)&&null!=(s=s.featureFlagPayloads)&&s[i]&&(e[i]=null==(r=t.bootstrap)||null==(r=r.featureFlagPayloads)?void 0:r[i]),e},{});this.featureFlags.receivedFeatureFlags({featureFlags:v,featureFlagPayloads:y})}if(a)this.register_once({distinct_id:eW,$device_id:null},"");else if(!this.get_distinct_id()){var b=this.config.get_device_id(t$());this.register_once({distinct_id:b,$device_id:b},""),this.persistence.set_property(eN,"anonymous")}return eo(r,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),this.toolbar.maybeLoadToolbar(),t.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()||t$();e.config.get_device_id=s,i.id()&&(e.register({distinct_id:i.id(),$device_id:s()}),e.persistence.set_property(eN,"identified")),t()},r=i.user();"then"in r&&F(r.then)?r.then(e=>s(e)):s(r)}(e,()=>{var s;i.register((Promise&&Promise.resolve||sx.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()||(sx.info("No userId set, resetting PostHog"),e.reset()),t.event.userId&&t.event.userId!==e.get_distinct_id()&&(sx.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.Ds()):this.Ds(),F(this.config._onCapture)&&this.config._onCapture!==nH&&(G.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",e=>this.config._onCapture(e.event,e))),this.config.ip&&G.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}Te(e){var t,i,s,r,n,o,a,l;u&&u.body?(this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=w(e.supportedCompression,tu.GZipJS)?tu.GZipJS:w(e.supportedCompression,tu.Base64)?tu.Base64:void 0),null!=(t=e.analytics)&&t.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),this.set_config({person_profiles:this.Is?this.Is:"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==(o=this.webVitalsAutocapture)||o.onRemoteConfig(e),null==(a=this.exceptionObserver)||a.onRemoteConfig(e),this.exceptions.onRemoteConfig(e),null==(l=this.deadClicksAutocapture)||l.onRemoteConfig(e)):(G.info("document not ready yet, trying again in 500 milliseconds..."),setTimeout(()=>{this.Te(e)},500))}Ds(){try{this.config.loaded(this)}catch(e){G.critical("`loaded` function failed",e)}this.js(),this.config.capture_pageview&&setTimeout(()=>{(this.consent.isOptedIn()||"always"===this.config.cookieless_mode)&&this.Ls()},1),new np(this).load(),this.featureFlags.flags()}js(){var e;this.is_capturing()&&this.config.request_batching&&(null==(e=this.Ms)||e.enable())}_dom_loaded(){this.is_capturing()&&X(this.__request_queue,e=>this.Os(e)),this.__request_queue=[],this.js()}_handle_unload(){var e,t;this.config.request_batching?(this.Ns()&&this.capture("$pageleave"),null==(e=this.Ms)||e.unload(),null==(t=this.Fs)||t.unload()):this.Ns()&&this.capture("$pageleave",null,{transport:"sendBeacon"})}Re(e){this.__loaded&&(nq?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)||(e.transport=e.transport||this.config.api_transport,e.url=sB(e.url,{ip:+!!this.config.ip}),e.headers=m({},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=m({},e);r.timeout=r.timeout||6e4,r.url=sB(r.url,{_:(new Date).getTime().toString(),ver:f.LIB_VERSION,compression:r.compression});var n=null!=(t=r.transport)?t:"fetch",o=sW.filter(e=>!r.disableTransport||!e.transport||!r.disableTransport.includes(e.transport)),a=null!=(i=null==(s=en(o,e=>e.transport===n))?void 0:s.method)?i:o[0].method;if(!a)throw Error("No available transport method");a(r)})(m({},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)}}))))}Os(e){this.Fs?this.Fs.retriableRequest(e):this.Re(e)}_execute_array(e){var t,i=[],s=[],r=[];X(e,e=>{e&&($(t=e[0])?r.push(e):F(e)?e.call(this):$(e)&&"alias"===t?i.push(e):$(e)&&-1!==t.indexOf("capture")&&F(this[t])?r.push(e):s.push(e))});var n=function(e,t){X(e,function(e){if($(e[0])){var i=t;J(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)}As(){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.Ms){if(this.is_capturing())if(!T(e)&&A(e)){if(this.config.opt_out_useragent_filter||!this._is_bot()){var r=null!=i&&i.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(null==r||!r.isRateLimited){null!=t&&t.$current_url&&!A(null==t?void 0:t.$current_url)&&(G.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 n=new Date,o=(null==i?void 0:i.timestamp)||n,a=t$(),l={uuid:a,event:e,properties:this.calculateEventProperties(e,t||{},o,a)};r&&(l.properties.$lib_rate_limit_remaining_tokens=r.remainingTokens),(null==i?void 0:i.$set)&&(l.$set=null==i?void 0:i.$set);var c,u=this.zs(null==i?void 0:i.$set_once);if(u&&(l.$set_once=u),(h=l,d=null!=i&&i._noTruncate?null:this.config.properties_string_max_length,p=e=>A(e)&&!M(d)?e.slice(0,d):e,g=new Set,l=function e(t,i){var s;return t!==Object(t)?p?p(t,i):t:g.has(t)?void 0:(g.add(t),$(t)?(s=[],X(t,t=>{s.push(e(t))})):(s={},J(t,(t,i)=>{g.has(t)||(s[i]=e(t,i))})),s)}(h)).timestamp=o,T(null==i?void 0:i.timestamp)||(l.properties.$event_time_override_provided=!0,l.properties.$event_time_override_system_time=n),e===r7.DISMISSED||e===r7.SENT){var h,d,p,g,_,v,f,y=null==t?void 0:t[r9.SURVEY_ID],b=null==t?void 0:t[r9.SURVEY_ITERATION];c={id:y,current_iteration:b},localStorage.getItem(nn(c))||localStorage.setItem(nn(c),"true"),l.$set=m({},l.$set,{[(_={id:y,current_iteration:b},f="$survey_"+(v=e===r7.SENT?"responded":"dismissed")+"/"+_.id,_.current_iteration&&_.current_iteration>0&&(f="$survey_"+v+"/"+_.id+"/"+_.current_iteration),f)]:!0})}var w=m({},l.properties.$set,l.$set);if(C(w)||this.setPersonPropertiesForFlags(w),!D(this.config.before_send)){var E=this.Us(l);if(!E)return;l=E}this.xs.emit("eventCaptured",l);var x={method:"POST",url:null!=(s=null==i?void 0:i._url)?s:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:l,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.Os(x):this.Ms.enqueue(x),l}G.critical("This capture call is ignored due to client rate limiting.")}}else G.error("No event name provided to posthog.capture")}else G.uninitializedWarning("posthog.capture")}Ke(e){return this.on("eventCaptured",t=>e(t.event,t))}calculateEventProperties(e,t,i,s,n){if(i=i||new Date,!this.persistence||!this.sessionPersistence)return t;var o,a=n?void 0:this.persistence.remove_event_timer(e),l=m({},t);if(l.token=this.config.token,l.$config_defaults=this.config.defaults,("always"==this.config.cookieless_mode||"on_reject"==this.config.cookieless_mode&&this.consent.isExplicitlyOptedOut())&&(l.$cookieless_mode=!0),"$snapshot"===e){var c=m({},this.persistence.properties(),this.sessionPersistence.properties());return l.distinct_id=c.distinct_id,(!A(l.distinct_id)&&!L(l.distinct_id)||O(l.distinct_id))&&G.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),l}var d,p=function(e,t){if(!_)return{};var i,s,n=e?Q([],rN,t||[]):[],[o,a]=function(e){for(var t=0;t<rM.length;t++){var[i,s]=rM[t],r=i.exec(e),n=r&&(F(s)?s(r,e):s);if(n)return n}return["",""]}(_);return Z(es({$os:o,$os_version:a,$browser:rT(_,navigator.vendor),$device:rD(_),$device_type:(s=rD(_))===s3||s===s2||"Kobo"===s||"Kindle Fire"===s||s===rx?s1:s===rd||s===rg||s===rp||s===rb?"Console":s===s4?"Wearable":s?sQ:"Desktop",$timezone:rK(),$timezone_offset:function(){try{return(new Date).getTimezoneOffset()}catch(e){return}}()}),{$current_url:tv(null==h?void 0:h.href,n,rH),$host:null==h?void 0:h.host,$pathname:null==h?void 0:h.pathname,$raw_user_agent:_.length>1e3?_.substring(0,997)+"...":_,$browser_version:rO(_,navigator.vendor),$browser_language:rG(),$browser_language_prefix:"string"==typeof(i=rG())?i.split("-")[0]:void 0,$screen_height:null==r?void 0:r.screen.height,$screen_width:null==r?void 0:r.screen.width,$viewport_height:null==r?void 0:r.innerHe
vendor: 4,110 bytes, line 1
1ight,$viewport_width:null==r?void 0:r.innerWidth,$lib:"web",$lib_version:f.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:g,windowId:v}=this.sessionManager.checkAndGetSessionAndWindowId(n,i.getTime());l.$session_id=g,l.$window_id=v}this.sessionPropsManager&&Z(l,this.sessionPropsManager.getSessionProps());try{this.sessionRecording&&Z(l,this.sessionRecording.sdkDebugProperties),l.$sdk_debug_retry_queue_size=null==(o=this.Fs)?void 0:o.length}catch(e){l.$sdk_debug_error_capturing_properties=String(e)}if(this.requestRouter.region===n$.CUSTOM&&(l.$lib_custom_api_host=this.config.api_host),d="$pageview"!==e||n?"$pageleave"!==e||n?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(i):this.pageViewManager.doPageView(i,s),l=Z(l,d),"$pageview"===e&&u&&(l.title=u.title),!T(a)){var y=i.getTime()-a;l.$duration=parseFloat((y/1e3).toFixed(3))}_&&this.config.opt_out_useragent_filter&&(l.$browser_type=this._is_bot()?"bot":"browser"),(l=Z({},p,this.persistence.properties(),this.sessionPersistence.properties(),l)).$is_identified=this._isIdentified(),$(this.config.property_denylist)?J(this.config.property_denylist,function(e){delete l[e]}):G.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&&(G.error("sanitize_properties is deprecated. Use before_send instead"),l=b(l,e));var w=this.qs();return l.$process_person_profile=w,w&&!n&&this.Bs("_calculate_event_properties"),l}zs(e){if(!this.persistence||!this.qs()||this.$s)return e;var t,i=Z({},this.persistence.get_initial_props(),(null==(t=this.sessionPropsManager)?void 0:t.getSetOnceProps())||{},e||{}),s=this.config.sanitize_properties;return s&&(G.error("sanitize_properties is deprecated. Use before_send instead"),i=s(i,"$set_once")),this.$s=!0,C(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)}Hs(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.xs.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=na),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 G.uninitializedWarning("posthog.identify");if(L(e)&&(e=e.toString(),G.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()))G.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!==eW){if(this.Bs("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(el)&&(this.unregister(el),this.register({distinct_id:e}));var r="anonymous"===(this.persistence.get_property(eN)||"anonymous");e!==s&&r?(this.persistence.set_property(eN,"identified"),this.setPersonPropertiesForFlags(m({},i||{},t||{}),!1),this.capture("$identify",{distinct_id:e,$anon_distinct_id:s},{$set:t||{},$set_once:i||{}}),this.Ps=sY(e,t,i),this.featureFlags.setAnonymousDistinctId(s)):(t||i)&&this.setPersonProperties(t,i),e!==s&&(this.reloadFeatureFlags(),this.unregister(eL))}}else G.critical('The string "'+eW+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.');else G.error("Unique user id has not been set in posthog.identify")}setPersonProperties(e,t){if((e||t)&&this.Bs("posthog.setPersonProperties")){var i=sY(this.get_distinct_id(),e,t);this.Ps!==i?(this.setPersonPropertiesForFlags(m({},t||{},e||{})),this.capture("$set",{$set:e||{},$set_once:t||{}}),this.Ps=i):G.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}group(e,t,i){if(e&&t){if(this.Bs("posthog.group")){var s=this.getGroups();s[e]!==t&&this.resetGroupPropertiesForFlags(e),this.register({$groups:m({},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 G.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.Bs("posthog.setGroupPropertiesForFlags")&&this.featureFlags.setGroupPropertiesForFlags(e,t)}resetGroupPropertiesForFlags(e){this.featureFlags.resetGroupPropertiesForFlags(e)}reset(e){if(G.info("reset"),!this.__loaded)return G.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(eN,"anonymous"),null==(r=this.sessionManager)||r.resetSessionId(),this.Ps=null,"always"===this.config.cookieless_mode)this.register_once({distinct_id:eW,$device_id:null},"");else{var o=this.config.get_device_id(t$());this.register_once({distinct_id:o,$device_id:e?o: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(ea)?(G.critical("Attempting to create alias for existing People user - aborting."),-2):this.Bs("posthog.alias")?(T(t)&&(t=this.get_distinct_id()),e!==t?(this.Hs(el,e),this.capture("$create_alias",{alias:e,distinct_id:t})):(G.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}set_config(e){var t=m({},this.config);if(R(e)){Z(this.config,nz(e));var i,s,r,n,o,a=this.Cs();null==(i=this.persistence)||i.update_config(this.config,t,a),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new r6(m({},this.config,{persistence:"sessionStorage"}),a),tO.G()&&"true"===tO.V("ph_debug")&&(this.config.debug=!0),this.config.debug&&(f.DEBUG=!0,G.info("set_config",{config:e,oldConfig:t,newConfig:m({},this.config)})),null==(s=this.sessionRecording)||s.startIfEnabledOrStop(),null==(r=this.autocapture)||r.startIfEnabled(),null==(n=this.heatmaps)||n.startIfEnabled(),this.surveys.loadIfEnabled(),this.Ws(),null==(o=this.externalIntegrations)||o.startIfEnabledOrStop()}}startSessionRecording(e){var t,i,s,r,n,o=!0===e,a={sampling:o||!(null==e||!e.sampling),linked_flag:o||!(null==e||!e.linked_flag),url_trigger:o||!(null==e||!e.url_trigger),event_trigger:o||!(null==e||!e.event_trigger)};Object.values(a).some(Boolean)&&(null==(t=this.sessionManager)||t.checkAndGetSessionAndWindowId(),a.sampling&&(null==(i=this.sessionRecording)||i.overrideSampling()),a.linked_flag&&(null==(s=this.sessionRecording)||s.overrideLinkedFlag()),a.url_trigger&&(null==(r=this.sessionRecording)||r.overrideTrigger("url")),a.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");return this.exceptions.sendExceptionEvent(m({},function(e,t){var{error:i,event:s}=e,r={$exception_list:[]},n=i||s;if(tQ(n)||tZ(n,"DOMException")){if("stack"in n)r=ia(n,t);else{var o=n.name||(tQ(n)?"DOMError":"DOMException"),a=n.message?o+": "+n.message:o;r=il(a,m({},t,{overrideExceptionType:tQ(n)?"DOMError":"DOMException",defaultExceptionMessage:a}))}return"code"in n&&(r.$exception_DOMException_code=""+n.code),r}if(tZ(n,"ErrorEvent")&&n.error)return ia(n.error,t);if(tJ(n))return ia(n,t);if(tZ(n,"Object")||tK(n))return function(e,t){var i,s,r,n=null==(s=null==t?void 0:t.handled)||s,o=null==(r=null==t?void 0:t.synthetic)||r,a={type:null!=t&&t.overrideExceptionType?t.overrideExceptionType:tK(e)?e.constructor.name:"Error",value:"Non-Error 'exception' captured with keys: "+function(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(", ");
1if(!(r.length>t))return s===i.length||r.length<=t?r:r.slice(0,t)+"..."}return""}(e),mechanism:{handled:n,synthetic:o}};if(null!=t&&t.syntheticException){var l=ir(null==t?void 0:t.syntheticException,1);l.length&&(a.stacktrace={frames:l,type:"raw"})}return{$exception_list:[a],$exception_level:A(i=e.level)&&!O(i)&&th.indexOf(i)>=0?e.level:"error"}}(n,t);if(T(i)&&A(s)){var l="Error",c=s,u=s.match(is);return u&&(l=u[1],c=u[2]),il(c,m({},t,{overrideExceptionType:l,defaultExceptionMessage:c}))}return il(n,t)}(e instanceof Error?{error:e,event:e.message}:{event:e},{syntheticException:i}),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:nU;return t!==nU&&(t=nU+"."+t),t}_isIdentified(){var e,t;return"identified"===(null==(e=this.persistence)?void 0:e.get_property(eN))||"identified"===(null==(t=this.sessionPersistence)?void 0:t.get_property(eN))}qs(){var e,t;return!("never"===this.config.person_profiles||"identified_only"===this.config.person_profiles&&!this._isIdentified()&&C(this.getGroups())&&(null==(e=this.persistence)||null==(e=e.props)||!e[el])&&(null==(t=this.persistence)||null==(t=t.props)||!t[ez]))}Ns(){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.qs()||this.Bs("posthog.createPersonProfile")&&this.setPersonProperties({},{})}Bs(e){return"never"===this.config.person_profiles?(G.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.Hs(ez,!0),!0)}Cs(){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}Ws(){var e,t,i,s,r=this.Cs();return(null==(e=this.persistence)?void 0:e.De)!==r&&(null==(i=this.persistence)||i.set_disabled(r)),(null==(t=this.sessionPersistence)?void 0:t.De)!==r&&(null==(s=this.sessionPersistence)||s.set_disabled(r)),r}opt_in_capturing(e){if("always"!==this.config.cookieless_mode){var t;"on_reject"===this.config.cookieless_mode&&this.consent.isExplicitlyOptedOut()&&(this.reset(!0),this.sessionManager=new nw(this),this.persistence&&(this.sessionPropsManager=new ny(this,this.sessionManager,this.persistence)),this.sessionRecording=new sE(this),this.sessionRecording.startIfEnabledOrStop()),this.consent.optInOut(!0),this.Ws(),"on_reject"==this.config.cookieless_mode&&this.surveys.loadIfEnabled(),(T(null==e?void 0:e.captureEventName)||null!=e&&e.captureEventName)&&this.capture(null!=(t=null==e?void 0:e.captureEventName)?t:"$opt_in",null==e?void 0:e.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Ls()}else G.warn('Consent opt in/out is not valid with cookieless_mode="always" and will be ignored')}opt_out_capturing(){var e;"always"!==this.config.cookieless_mode?("on_reject"===this.config.cookieless_mode&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.Ws(),"on_reject"===this.config.cookieless_mode&&(this.register({distinct_id:eW,$device_id:null}),this.sessionManager=void 0,this.sessionPropsManager=void 0,null==(e=this.sessionRecording)||e.stopRecording(),this.sessionRecording=void 0,this.Ls())):G.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===tU.GRANTED?"granted":e===tU.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.Ws()}_is_bot(){return c?nP(c,this.config.custom_blocked_useragents):void 0}Ls(){u&&("visible"===u.visibilityState?this.ks||(this.ks=!0,this.capture("$pageview",{title:u.title},{send_instantly:!0}),this.Es&&(u.removeEventListener("visibilitychange",this.Es),this.Es=null)):this.Es||(this.Es=this.Ls.bind(this),eo(u,"visibilitychange",this.Es)))}
1debug(e){!1===e?(null==r||r.console.log("You've disabled debug mode."),localStorage&&localStorage.removeItem("ph_debug"),this.set_config({debug:!1})):(null==r||r.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)`."),localStorage&&localStorage.setItem("ph_debug","true"),this.set_config({debug:!0}))}L(){var e,t,i,s,r=this.Rs||{};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?(G.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&&!T(r[e]),s=t in r&&!T(r[t]),i?r[e]:!!s&&(G&&G.warn("Config field '"+t+"' is deprecated. Please use '"+e+"' instead. The old field will be removed in a future major version."),r[t]))}Us(e){if(D(this.config.before_send))return e;var t=$(this.config.before_send)?this.config.before_send:[this.config.before_send],i=e;for(var s of t){if(D(i=s(i))){var r="Event '"+e.event+"' was rejected in beforeSend function";return j(e.event)?G.warn(r+". This can cause unexpected behavior."):G.info(r),null}i.properties&&!C(i.properties)||G.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}return i}getPageViewId(){var e;return null==(e=this.pageViewManager.fe)?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)})}}for(var nV=["identify"],nY=0;nY<nV.length;nY++)nW.prototype[nV[nY]]=ei(nW.prototype[nV[nY]]);var nK,nX,nJ,nZ,nQ,n0,n1,n2,n3,n5,n4,n6,n8,n7=(n8=nj[nU]=new nW,function(){function e(){e.done||(e.done=!0,nq=!1,J(nj,function(e){e._dom_loaded()}))}null!=u&&u.addEventListener?"complete"===u.readyState?e():eo(u,"DOMContentLoaded",e,{capture:!1}):r&&G.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")}(),n8),n9=e.i(622989),oe=(0,n9.createContext)({client:n7});function ot(e){var t=e.children,i=e.client,s=e.apiKey,r=e.options,n=(0,n9.useRef)(null),o=(0,n9.useMemo)(function(){return i?(s&&console.warn("[PostHog.js] You have provided both `client` and `apiKey` to `PostHogProvider`. `apiKey` will be ignored in favour of `client`."),r&&console.warn("[PostHog.js] You have provided both `client` and `options` to `PostHogProvider`. `options` will be ignored in favour of `client`."),i):(s||console.warn("[PostHog.js] No `apiKey` or `client` were provided to `PostHogProvider`. Using default global `window.posthog` instance. You must initialize it manually. This is not recommended behavior."),n7)},[i,s,JSON.stringify(r)]);return(0,n9.useEffect)(function(){if(!i){var e=n.current;e?(s!==e.apiKey&&console.warn("[PostHog.js] You have provided a different `apiKey` to `PostHogProvider` than the one that was already initialized. This is not supported by our provider and we'll keep using the previous key. If you need to toggle between API Keys you need to control the `client` yourself and pass it in as a prop rather than an `apiKey` prop."),r&&!function e(t,i,s){if(void 0===s&&(s=new WeakMap),t===i)return!0;if("object"!=typeof t||null===t||"object"!=typeof i||null===i)return!1;if(s.has(t)&&s.get(t)===i)return!0;s.set(t,i);var r=Object.keys(t),n=Object.keys(i);if(r.length!==n.length)return!1;for(var o=0;o<r.length;o++){var a=r[o];if(!n.includes(a)||!e(t[a],i[a],s))return!1}return!0}(r,e.options)&&n7.set_config(r)):(n7.__loaded&&console.warn("[PostHog.js] `posthog` was already loaded elsewhere. This may cause issues."),n7.init(s,r)),n.current={apiKey:s,options:null!=r?r:{}}}},[i,s,JSON.stringify(r)]),n9.default.createElement(oe.Provider,{value:{client:o}},t)}var oi=function(e,t){return(oi=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)};"function"==typeof SuppressedError&&SuppressedError;var os=function(e){return"function"==typeof e},or={componentStack:null,exceptionEvent:null,error:null},on=n9.default.Component;if("function"!=typeof on&&null!==on)throw TypeError("Class extends value "+String(on)+" is not a constructor or null");function oo(){this.constructor=oa}function oa(e){var t=on.call(this,e)||this;return t.state=or,t}function ol({children:e}){let t="phc_vQREj7SGj2Y8Qp5AyYBx2KKDZeQUqLN77jk8SsopZimc",i="https://us.i.posthog.com",r=!!t;return((0,n9.useEffect)(()=>{!r||n7.__loaded||n7.init(t,{api_host:i,defaults:"2025-05-24",person_profiles:"identified_only",capture_pageview:"history_change",capture_pageleave:"if_capture_pageview",disable_session_recording:!0,session_recording:void 0})},[r,!1,t,i]),r)?(0,s.jsx)(ot,{client:n7,children:e}):(0,s.jsx)(s.Fragment,{children:e})}oi(oa,on),oa.prototype=null===on?Object.create(on):(oo.prototype=on.prototype,new oo),oa.prototype.componentDidCatch=function(e,t){var i,s=this.props.additionalProperties;os(s)?i=s(e):"object"==typeof s&&(i=s);var r=this.context.client.captureException(e,i),n=t.componentStack;this.setState({error:e,componentStack:n,exceptionEvent:r})},oa.prototype.render=function(){var e=this.props,t=e.children,i=e.fallback,s=this.state;if(null==s.componentStack)return os(t)?t():t;var r=os(i)?n9.default.createElement(i,{error:s.error,componentStack:s.componentStack,exceptionEvent:s.exceptionEvent}):i;return n9.default.isValidElement(r)?r:(console.warn("[PostHog.js][PostHogErrorBoundary] Invalid fallback prop, provide a valid React element or a function that returns a valid React element."),n9.default.createElement(n9.default.Fragment,null))},oa.contextType=oe;var oc=e.i(945228);let ou=oc.websiteConfig.ui.theme?.defaultTheme??"default",oh=(0,n9.createContext)(void 0);function od({children:e,initialTheme:t}){let[i,r]=(0,n9.useState)(()=>t||ou);return(0,n9.useEffect)(()=>{document.cookie=`active_theme=${i}; path=/; max-age=31536000; SameSite=Lax; ${"https:"===window.location.protocol?"Secure;":""}`,Array.from(document.body.classList).filter(e=>
1e.startsWith("theme-")).forEach(e=>{document.body.classList.remove(e)}),document.body.classList.add(`theme-${i}`)},[i]),(0,s.jsx)(oh.Provider,{value:{activeTheme:i,setActiveTheme:r},children:e})}var op=e.i(519455),og=e.i(561493),o_=e.i(121773);let ov=["/en","/zh","/ja","/ko","/es","/ar","/zh-Hant"];var of=e.i(975157),om=e.i(727414),oy=e.i(917595),ob=e.i(174673),ow=e.i(807889);function oE(e,t){return{campaignId:e.campaignId,variantId:e.variantId,messageId:e.id,messageType:e.messageType,placement:e.placement,sourcePage:t}}async function ox(e,t,i){try{await fetch(`/api/in-app-messages/${e.id}/events`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({eventType:t,page:i,referrer:document.referrer||void 0,device:window.innerWidth<=768?"mobile":"desktop"}),keepalive:!0})}catch(e){}}function oS({children:e}){let t,{isAuthenticated:i,isPending:r,user:n}=(0,og.useAuthState)(),o=(0,ow.usePathname)(),a=(0,ow.useRouter)(),l="/"===(t=(o??"/").replace(/\/+$/,"")||"/")||ov.includes(t),c=(0,om.useUINotificationStore)(e=>e.localeToastActive),[u,h]=(0,n9.useState)([]),[d,p]=(0,n9.useState)(()=>new Set),g=(0,n9.useRef)(new Set);(0,n9.useEffect)(()=>{if(r||!i||!n?.id||l){h([]),g.current.clear();return}let e=!1;return async function(){try{let t=await fetch("/api/in-app-messages?limit=3",{cache:"no-store"});if(!t.ok)return;let i=await t.json();e||h(Array.isArray(i.messages)?i.messages:[])}catch(e){}}(),()=>{e=!0}},[i,r,l,n?.id]);let _=(0,n9.useMemo)(()=>u.find(e=>!d.has(e.id))??null,[d,u]);(0,n9.useEffect)(()=>{!_||c||l||g.current.has(_.id)||(g.current.add(_.id),ox(_,"shown",o),(0,o_.trackEvent)(o_.UmamiEvent.InAppMessageShown,oE(_,o)))},[_,l,c,o]);let v=e=>{p(t=>{let i=new Set(t);return i.add(e.id),i})},f=async e=>{v(e),(0,o_.trackEvent)(o_.UmamiEvent.InAppMessageDismissed,oE(e,o)),await ox(e,"dismissed",o)},m=async e=>{if(v(e),(0,o_.trackEvent)(o_.UmamiEvent.InAppMessageClicked,oE(e,o)),await ox(e,"clicked",o),e.ctaUrl){if(e.ctaUrl.startsWith("http")){window.location.href=e.ctaUrl;return}a.push(e.ctaUrl)}};return(0,s.jsxs)(s.Fragment,{children:[e,_&&!c&&!l&&(0,s.jsx)("div",{className:(0,of.cn)("fixed bottom-4 left-4 right-4 z-50 sm:left-auto sm:w-[22rem]","bottom_sheet"===_.placement&&"left-0 right-0 bottom-0 sm:left-auto sm:right-4 sm:bottom-4 sm:w-[22rem]"),children:(0,s.jsxs)("div",{className:"rounded-2xl border border-white/10 bg-[#161616]/95 p-4 text-white shadow-2xl shadow-black/30 backdrop-blur",children:[(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)("div",{className:"mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-orange-400/15 text-orange-300",children:(0,s.jsx)(oy.Sparkles,{className:"h-4 w-4"})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1 space-y-1",children:[(0,s.jsx)("p",{className:"text-sm font-semibold leading-5 text-white",children:_.title}),(0,s.jsx)("p",{className:"text-xs leading-5 text-white/65",children:_.body})]}),(0,s.jsx)("button",{type:"button",onClick:()=>void f(_),className:"rounded-full p-1 text-white/45 transition-colors hover:bg-white/5 hover:text-white/80","aria-label":"Dismiss message",children:(0,s.jsx)(ob.X,{className:"h-4 w-4"})})]}),(0,s.jsxs)("div",{className:"mt-4 flex items-center gap-2",children:[_.ctaText&&_.ctaUrl&&(0,s.jsx)(op.Button,{type:"button",onClick:()=>void m(_),className:"h-9 flex-1 rounded-full bg-white text-black hover:bg-white/90",children:_.ctaText}),(0,s.jsx)(op.Button,{type:"button",variant:"ghost",onClick:()=>void f(_),className:"h-9 rounded-full px-3 text-white/70 hover:bg-white/10 hover:text-white",children:"Later"})]})]})})]})}var ok=e.i(578938);function oI({children:e}){let{data:t}=ok.authClient.useSession(),i=(0,ow.usePathname)(),r=(0,n9.useRef)(null),n=(0,n9.useRef)(null);return(0,n9.useEffect)(()=>{let e=t?.user;if(!e){r.current&&n7.reset(),r.current=null,(0,o_.setAnalyticsUserContext)({userId:void 0,email:void 0});return}let i=e.email||void 0;(0,o_.setAnalyticsUserContext)({userId:e.id,email:i}),r.current!==e.id&&(n7.identify(e.id,{email:i,name:e.name||void 0}),r.current=e.id)},[t?.user]),(0,n9.useEffect)(()=>{let e=t?.user?.id;if(!e)return;let i=0,s=()=>{let t=window.clarity;if("function"==typeof t){n.current=null,t("identify",e);return}if((i+=1)>=10){n.current=null;return}null!==n.current&&window.clearTimeout(n.current),n.current=window.setTimeout(s,500)};return s(),()=>{null!==n.current&&(window.clearTimeout(n.current),n.current=null)}},[t?.user?.id,i]),(0,s.jsx)(s.Fragment,{children:e})}var oP=e.i(3535),o$=e.i(300826),oF=e.i(433048);function oR({children:e}){let t=(0,ow.usePathname)(),i="string"==typeof t&&t.includes("/payment/cancel"),[r,n]=(0,n9.useState)(!1),[o,a]=(0,n9.useState)(null),l=async()=>{try{let e=localStorage.getItem(oF.STORAGE_KEYS.PENDING_CHECKOUT);
1if(!e)return;let t=JSON.parse(e);if(JSON.parse(localStorage.getItem(oF.STORAGE_KEYS.HANDLED_FEEDBACK)||"[]").includes(t.sessionId))return;if(Date.now()-t.timestamp>oF.SESSION_CONFIG.EXPIRY_TIME)return void localStorage.removeItem(oF.STORAGE_KEYS.PENDING_CHECKOUT);let i=await (0,oP.checkCheckoutSessionStatus)({sessionId:t.sessionId,provider:t.provider??"stripe"});if(i.error)return;"open"===i.status&&"paid"!==i.paymentStatus?((0,o_.trackEvent)(o_.UmamiEvent.PaymentIncomplete,{sessionId:t.sessionId,planId:t.planId,planName:t.planName,provider:t.provider??"stripe",status:i.status,paymentStatus:i.paymentStatus,trigger:"focus_return"}),a(t),n(!0)):("complete"===i.status||"paid"===i.paymentStatus)&&localStorage.removeItem(oF.STORAGE_KEYS.PENDING_CHECKOUT)}catch(e){console.error("Error checking pending payment:",e)}};return(0,n9.useEffect)(()=>{let e=Date.now(),t=()=>{"visible"===document.visibilityState&&(e=Date.now(),setTimeout(l,oF.DELAY_TIMES.FOCUS_GAINED))},i=()=>{Date.now()-e>1e3&&setTimeout(l,oF.DELAY_TIMES.FOCUS_GAINED)},s=setTimeout(l,oF.DELAY_TIMES.INITIAL_LOAD);return document.addEventListener("visibilitychange",t),window.addEventListener("focus",i),()=>{clearTimeout(s),document.removeEventListener("visibilitychange",t),window.removeEventListener("focus",i)}},[]),(0,s.jsxs)(s.Fragment,{children:[e,!i&&(0,s.jsx)(o$.PaymentFeedbackModal,{open:r,onOpenChange:n,sessionId:o?.sessionId,planName:o?.planName,provider:o?.provider,trigger:"focus_return",retentionCouponCode:oF.COUPON_CONFIG.DEFAULT_CODE})]})}async function oC(e){let t=[e.userAgent,e.platform,e.language,e.hardwareConcurrency,e.deviceMemory,e.screenWidth,e.screenHeight,e.colorDepth,e.pixelRatio,e.timezone,e.maxTouchPoints].join("|"),i=new TextEncoder().encode(t);return Array.from(new Uint8Array(await crypto.subtle.digest("SHA-256",i))).map(e=>e.toString(16).padStart(2,"0")).join("")}let oT="app_client_fingerprint_v1";async function oA(){return new Promise(e=>{let t=new Set,i=setTimeout(()=>{e({webrtcIPs:[...t],hasLeak:!1})},3e3);try{let s=new RTCPeerConnection({iceServers:[{urls:"stun:stun.l.google.com:19302"}]});s.createDataChannel(""),s.onicecandidate=r=>{if(!r.candidate){clearTimeout(i),s.close(),e({webrtcIPs:[...t],hasLeak:t.size>0});return}let n=r.candidate.candidate.match(/(\d{1,3}\.){3}\d{1,3}|([a-f0-9]{1,4}(:[a-f0-9]{1,4}){7})/);if(n){let e=n[0];e.startsWith("10.")||e.startsWith("192.168.")||e.startsWith("172.")||e.startsWith("0.")||"0.0.0.0"===e||t.add(e)}},s.createOffer().then(e=>s.setLocalDescription(e)).catch(()=>{clearTimeout(i),e({webrtcIPs:[...t],hasLeak:!1})})}catch{clearTimeout(i),e({webrtcIPs:[],hasLeak:!1})}})}function oO({children:e}){let{data:t}=ok.authClient.useSession(),i=(0,n9.useRef)(!1);return(0,n9.useEffect)(()=>{!t?.user||i.current||(async()=>{await new Promise(e=>{"requestIdleCallback"in window?window.requestIdleCallback(e,{timeout:3e3}):setTimeout(e,500)});try{let e,i;console.log("ð [UserInitializationProvider] Initializing user:",t.user.id);let s=function(){try{let e=localStorage.getItem(oT);if(e)return e;let t=crypto.randomUUID?.()||`${Date.now()}_${Math.random().toString(36).slice(2,12)}`;return localStorage.setItem(oT,t),t}catch{return null}}(),r=(i=(e=navigator).connection||e.mozConnection||e.webkitConnection,{userAgent:navigator.userAgent,platform:navigator.platform,language:navigator.language,languages:[...navigator.languages],hardwareConcurrency:navigator.hardwareConcurrency||0,deviceMemory:e.deviceMemory??null,maxTouchPoints:navigator.maxTouchPoints||0,screenWidth:screen.width,screenHeight:screen.height,colorDepth:screen.colorDepth,pixelRatio:window.devicePixelRatio||1,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,timezoneOffset:new Date().getTimezoneOffset(),connectionType:i?.effectiveType??null,downlink:i?.downlink??null}),n=await oC(r),o={};s&&(o["x-client-fingerprint"]=s),o["x-device-hash"]=n,o["x-client-device-info"]=JSON.stringify({ua:r.userAgent,platform:r.platform,lang:r.language,cores:r.hardwareConcurrency,mem:r.deviceMemory,screen:`${r.screenWidth}x${r.screenHeight}`,tz:r.timezone,tzOffset:r.timezoneOffset,touch:r.maxTouchPoints,dpr:r.pixelRatio,conn:r.connectionType});try{let e=await oA();o["x-vpn-signals"]=JSON.stringify({webrtcIPs:e.webrtcIPs,browserTZ:r.timezone,tzOffset:r.timezoneOffset})}catch{}let a=await fetch("/api/user/initialize",{method:"POST",headers:{"Content-Type":"application/json",...o},body:JSON.stringify({userId:t.user.id,email:t.user.email})});if(a.ok){let e=await a.json();console.log("â
[UserInitializationProvider] Initialization result:",e)}else console.error("â [UserInitializationProvider] Initialization failed:",a.status)}catch(e){console.error("â [UserInitializationProvider] Initialization error:",e)}finally{i.current=!0}})()},[t]),(0,s.jsx)(s.Fragment,{children:e})}var oM=e.i(746798),oD=e.i(226448);function oL({children:e}
1){let t=oc.websiteConfig.ui.mode?.defaultMode??"system";return(0,s.jsx)(ol,{children:(0,s.jsx)(oD.ThemeProvider,{attribute:"class",defaultTheme:t,enableSystem:!0,disableTransitionOnChange:!0,children:(0,s.jsx)(od,{children:(0,s.jsx)(oM.TooltipProvider,{children:(0,s.jsx)(oI,{children:(0,s.jsx)(oO,{children:(0,s.jsx)(oR,{children:(0,s.jsx)(oS,{children:e})})})})})})})})}e.s(["Providers",()=>oL],676640)}]);
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.