posthog-js 1.447.1 → 1.447.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/all-external-dependencies.js +1 -1
- package/dist/all-external-dependencies.js.map +1 -1
- package/dist/array.full.es5.js +1 -1
- package/dist/array.full.js +1 -1
- package/dist/array.full.js.map +1 -1
- package/dist/array.full.no-external.js +1 -1
- package/dist/array.full.no-external.js.map +1 -1
- package/dist/array.js +1 -1
- package/dist/array.no-external.js +1 -1
- package/dist/customizations.full.js +1 -1
- package/dist/customizations.js +1 -1
- package/dist/default-extensions.js +1 -1
- package/dist/extension-bundles.js +1 -1
- package/dist/integrity.json +29 -29
- package/dist/lazy-recorder.js +1 -1
- package/dist/lazy-recorder.js.map +1 -1
- package/dist/main.js +1 -1
- package/dist/module.full.cjs +1 -1
- package/dist/module.full.js +1 -1
- package/dist/module.full.js.map +1 -1
- package/dist/module.full.no-external.cjs +1 -1
- package/dist/module.full.no-external.js +1 -1
- package/dist/module.full.no-external.js.map +1 -1
- package/dist/module.js +1 -1
- package/dist/module.mjs +1 -1
- package/dist/module.no-external.cjs +1 -1
- package/dist/module.no-external.js +1 -1
- package/dist/module.slim.js +1 -1
- package/dist/module.slim.no-external.js +1 -1
- package/dist/posthog-recorder.d.ts +1 -0
- package/dist/posthog-recorder.js +1 -1
- package/dist/posthog-recorder.js.map +1 -1
- package/dist/recorder-v2.js +1 -1
- package/dist/recorder-v2.js.map +1 -1
- package/dist/recorder.d.ts +1 -0
- package/dist/recorder.js +1 -1
- package/dist/recorder.js.map +1 -1
- package/dist/rrweb.d.ts +1 -0
- package/dist/rrweb.js +1 -1
- package/dist/rrweb.js.map +1 -1
- package/dist/src/extensions/replay/types/rrweb.d.ts +1 -0
- package/dist/surveys-preview.js +1 -1
- package/dist/surveys.js +1 -1
- package/lib/package.json +1 -1
- package/lib/src/extensions/replay/types/rrweb.d.ts +1 -0
- package/package.json +7 -7
package/dist/module.slim.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var t,e=["retriesPerformedSoFar"];function i(){return i=Object.assign?Object.assign.bind():function(t){for(var e=1;arguments.length>e;e++){var i=arguments[e];for(var r in i)({}).hasOwnProperty.call(i,r)&&(t[r]=i[r])}return t},i.apply(null,arguments)}function r(t,e,i,r,s,n,o){try{var a=t[n](o),l=a.value}catch(t){return void i(t)}a.done?e(l):Promise.resolve(l).then(r,s)}function s(t){return function(){var e=this,i=arguments;return new Promise(function(s,n){var o=t.apply(e,i);function a(t){r(o,s,n,a,l,"next",t)}function l(t){r(o,s,n,a,l,"throw",t)}a(void 0)})}}var n="u">typeof window?window:void 0,o="u">typeof globalThis?globalThis:n,a=null==o?void 0:o.navigator,l=null==o?void 0:o.document,h=null==o?void 0:o.location,u=null==o?void 0:o.fetch,d=null!=o&&o.XMLHttpRequest&&"withCredentials"in new o.XMLHttpRequest?o.XMLHttpRequest:void 0,v=null==o?void 0:o.AbortController,c=null==o?void 0:o.CompressionStream,_=null==a?void 0:a.userAgent,p="undefined"!=typeof globalThis?globalThis:n;p&&"undefined"==typeof self&&(p.self=p),p&&"undefined"==typeof File&&(p.File=function(){});var f=null!=n?n:{},g="0.10.7",m={DEBUG:!1,LIB_VERSION:g,LIB_NAME:"browser-common",JS_SDK_VERSION:g},b=/*#__PURE__*/function(t){return t.GZipJS="gzip-js",t.Base64="base64",t}({}),y=["$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"],w=["token"];function S(t,e){return-1!==t.indexOf(e)}var x=function(t){return t.replace(/^\$/,"")},E=Object.prototype,T=E.hasOwnProperty,k=E.toString,P=Array.isArray||function(t){return"[object Array]"===k.call(t)},R=t=>"function"==typeof t,O=t=>t===Object(t)&&!P(t),I=t=>{if(O(t)){for(var e in t)if(T.call(t,e))return!1;return!0}return!1},C=t=>void 0===t,A=t=>"[object String]"==k.call(t),M=t=>A(t)&&0===t.trim().length,D=t=>null===t,N=t=>C(t)||D(t),F=t=>"[object Number]"==k.call(t)&&t==t,B=t=>F(t)&&t>0,U=t=>"[object Boolean]"===k.call(t),L=t=>S(y,t),j=t=>S(w,t);function z(t){switch({}.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object DOMError]":case"[object WebAssembly.Exception]":return!0;default:return function(t,e){try{return t instanceof e}catch(t){return!1}}(t,Error)}}var q=[!0,"true",1,"1","yes"],W=t=>S(q,t),G=[!1,"false",0,"0","no"],H=["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","pinterestbot","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","lightpanda","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"],V=/* @__PURE__ */new Map,J=function(t,e){if(void 0===e&&(e=[]),!t)return!1;var i=function(t,e){for(var i="",r=0;e.length>r;r++){var s=e[r];i+=s.length+":"+s}return t.length+":"+t+"|"+e.length+":"+i}(t,e),r=V.get(i);if(void 0!==r)return r;var s=t.toLowerCase(),n=H.concat(e).some(t=>-1!==s.indexOf(t.toLowerCase()));return 256>V.size||V.clear(),V.set(i,n),n};function K(t,e,i,r,s){return e>i&&(r.warn("min cannot be greater than max."),e=i),F(t)?t>i?(r.warn(" cannot be greater than max: "+i+". Using max value instead."),i):e>t?(r.warn(" cannot be less than min: "+e+". Using min value instead."),e):t:(r.warn(" must be a number. using max or fallback. max: "+i+", fallback: "+s),K(null!=s?s:i,e,i,r))}var Y="Mobile",X="Android",Q="Tablet",Z="Android Tablet",tt="iPad",et="Apple Watch",it="Safari",rt="BlackBerry",st="Samsung Internet",nt="Chrome",ot="Chrome iOS",at="Internet Explorer",lt="Internet Explorer Mobile",ht="Opera",ut="Microsoft Edge",dt="Firefox",vt="Firefox iOS",ct="Nintendo",_t="PlayStation",pt="Xbox",ft="Android Mobile",gt="Mobile Safari",mt="Windows",bt="Windows Phone",yt="Nokia",wt="Ouya",$t="Generic tablet",St="Konqueror",xt="Oculus Browser",Et="Vivaldi",Tt="Yandex",kt="Whale",Pt="DuckDuckGo",Rt="Pale Moon",Ot="Waterfox",It="Brave",Ct="Claude",At="Codex",Mt="ChatGPT",Dt="Google Search App",Nt=/* @__PURE__ */new RegExp("Version/(\\d+(\\.\\d+)?)"),Ft=/* @__PURE__ */new RegExp("(Claude|Codex|ChatGPT)\\/(\\d+(\\.\\d+)?)"),Bt=/* @__PURE__ */new RegExp(pt,"i"),Ut=/* @__PURE__ */new RegExp("PlayStation \\w+","i"),Lt=/* @__PURE__ */new RegExp("Nintendo \\w+","i"),jt=/* @__PURE__ */new RegExp("BlackBerry|PlayBook|BB10","i"),zt={"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"},qt=function(t,e,i,r){e=e||"";var s=function(t){return null!=t&&t.brave?It:null}(i);return s||(null!=r&&r.detectGoogleSearchApp&&S(t,"GSA/")?Dt:S(t," OPR/")&&S(t,"Mini")?"Opera Mini":S(t," OPR/")?ht:jt.test(t)?rt:S(t,"IEMobile")||S(t,"WPDesktop")?lt:S(t,"OculusBrowser")?xt:S(t,"SamsungBrowser")?st:S(t,"Edge")||S(t,"Edg/")?ut:S(t,"Vivaldi/")?Et:S(t,"YaBrowser/")?Tt:S(t,"Whale/")?kt:S(t,"DuckDuckGo/")||S(t,"Ddg/")?Pt:S(t,"Claude/")?Ct:S(t,"Codex/")?At:S(t,"ChatGPT/")?Mt:S(t,"FBIOS")?"Facebook Mobile":S(t,"UCWEB")||S(t,"UCBrowser")?"UC Browser":S(t,"CriOS")?ot:S(t,"CrMo")||S(t,nt)?nt:S(t,X)&&S(t,it)?ft:S(t,"FxiOS")?vt:S(t.toLowerCase(),St.toLowerCase())?St:S(t,"Brave/")?It:((t,e)=>e&&S(e,"Apple")||function(t){return S(t,it)&&!S(t,nt)&&!S(t,X)}(t))(t,e)?S(t,Y)?gt:it:S(t,"PaleMoon/")?Rt:S(t,"Waterfox/")?Ot:S(t,dt)?dt:S(t,"MSIE")||S(t,"Trident/")?at:S(t,"Gecko")?dt:"")},Wt={[lt]:[/* @__PURE__ */new RegExp("rv:(\\d+(\\.\\d+)?)")],[ut]:[/* @__PURE__ */new RegExp("Edge?\\/(\\d+(\\.\\d+)?)")],[nt]:[/* @__PURE__ */new RegExp("(Chrome|CrMo)\\/(\\d+(\\.\\d+)?)")],[ot]:[/* @__PURE__ */new RegExp("CriOS\\/(\\d+(\\.\\d+)?)")],"UC Browser":[/* @__PURE__ */new RegExp("(UCBrowser|UCWEB)\\/(\\d+(\\.\\d+)?)")],[it]:[Nt],[gt]:[Nt],[ht]:[/* @__PURE__ */new RegExp("(Opera|OPR)\\/(\\d+(\\.\\d+)?)")],[dt]:[/* @__PURE__ */new RegExp("Firefox\\/(\\d+(\\.\\d+)?)")],[vt]:[/* @__PURE__ */new RegExp("FxiOS\\/(\\d+(\\.\\d+)?)")],[St]:[/* @__PURE__ */new RegExp("Konqueror[:/]?(\\d+(\\.\\d+)?)","i")],[rt]:[/* @__PURE__ */new RegExp("BlackBerry (\\d+(\\.\\d+)?)"),Nt],[ft]:[/* @__PURE__ */new RegExp("android\\s(\\d+(\\.\\d+)?)","i")],[st]:[/* @__PURE__ */new RegExp("SamsungBrowser\\/(\\d+(\\.\\d+)?)")],[xt]:[/* @__PURE__ */new RegExp("OculusBrowser\\/(\\d+(\\.\\d+)?)")],[Et]:[/* @__PURE__ */new RegExp("Vivaldi\\/(\\d+(\\.\\d+)?)")],[Tt]:[/* @__PURE__ */new RegExp("YaBrowser\\/(\\d+(\\.\\d+)?)")],[kt]:[/* @__PURE__ */new RegExp("Whale\\/(\\d+(\\.\\d+)?)")],[It]:[/* @__PURE__ */new RegExp("Brave\\/(\\d+(\\.\\d+)?)")],[Ct]:[Ft],[At]:[Ft],[Mt]:[Ft],[Pt]:[/* @__PURE__ */new RegExp("(DuckDuckGo|Ddg)\\/(\\d+(\\.\\d+)?)")],[Rt]:[/* @__PURE__ */new RegExp("PaleMoon\\/(\\d+(\\.\\d+)?)")],[Ot]:[/* @__PURE__ */new RegExp("Waterfox\\/(\\d+(\\.\\d+)?)")],[Dt]:[/* @__PURE__ */new RegExp("GSA\\/(\\d+(\\.\\d+)?)")],[at]:[/* @__PURE__ */new RegExp("(rv:|MSIE )(\\d+(\\.\\d+)?)")],Mozilla:[/* @__PURE__ */new RegExp("rv:(\\d+(\\.\\d+)?)")]},Gt=function(t,e,i,r){var s=Wt[qt(t,e,i,r)];if(C(s))return null;for(var n=0;s.length>n;n++){var o=t.match(s[n]);if(o)return parseFloat(o[o.length-2])}return null},Ht=[[/* @__PURE__ */new RegExp("Xbox; Xbox (.*?)[);]","i"),t=>[pt,t&&t[1]||""]],[/* @__PURE__ */new RegExp(ct,"i"),[ct,""]],[/* @__PURE__ */new RegExp(_t,"i"),[_t,""]],[jt,[rt,""]],[/* @__PURE__ */new RegExp(mt,"i"),(t,e)=>{if(/Phone/.test(e)||/WPDesktop/.test(e))return[bt,""];if(new RegExp(Y).test(e)&&!/IEMobile\b/.test(e))return["Windows Mobile",""];var i=/Windows NT ([0-9.]+)/i.exec(e);if(i&&i[1]){var r=zt[i[1]]||"";return/arm/i.test(e)&&(r="RT"),[mt,r]}return[mt,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,t=>t&&t[3]?["iOS",[t[3],t[4],t[5]||"0"].join(".")]:["iOS",""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,t=>{var e="";return t&&t.length>=3&&(e=C(t[2])?t[3]:t[2]),["watchOS",e]}],[/* @__PURE__ */new RegExp("(Android (\\d+)\\.(\\d+)\\.?(\\d+)?|Android)","i"),t=>t&&t[2]?[X,[t[2],t[3],t[4]||"0"].join(".")]:[X,""]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,t=>{var e=["Mac OS X",""];return t&&t[1]&&(e[1]=[t[1],t[2],t[3]||"0"].join(".")),e}],[/Mac/i,["Mac OS X",""]],[/CrOS/,["Chrome OS",""]],[/Linux|debian/i,["Linux",""]]],Vt=function(t){return Lt.test(t)?ct:Ut.test(t)?_t:Bt.test(t)?pt:new RegExp(wt,"i").test(t)?wt:/* @__PURE__ */new RegExp("(Windows Phone|WPDesktop)","i").test(t)?bt:/iPad/.test(t)?tt:/iPod/.test(t)?"iPod Touch":/iPhone/.test(t)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(t)?et:jt.test(t)?rt:/(kobo)\s(ereader|touch)/i.test(t)?"Kobo":new RegExp(yt,"i").test(t)?yt:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(t)||/(kf[a-z]+)( bui|\)).+silk\//i.test(t)?"Kindle Fire":/(Android|ZTE)/i.test(t)?new RegExp(Y).test(t)&&!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(t)||/pixel[\daxl ]{1,6}/i.test(t)&&!/pixel c/i.test(t)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(t)||/lmy47v/i.test(t)&&!/QTAQZ3/i.test(t)?X:Z:/* @__PURE__ */new RegExp("(pda|Mobile)","i").test(t)?"Generic mobile":new RegExp(Q,"i").test(t)&&!/* @__PURE__ */new RegExp("Tablet pc","i").test(t)?$t:""},Jt=/\bFBAV\/(\d+(?:\.\d+)*)/i,Kt=[[/\bInstagram(?:[ /](\d+(?:\.\d+)*))?\b/i,"Instagram"],[/\bBarcelona[ /](\d+(?:\.\d+)*)?/i,"Threads"],[/\b(?:MessengerForiOS|(?:FBAN|FB_IAB)\/Orca-Android)\b/i,"Messenger",Jt],[/\bFBAN\/EMA\b/i,"Facebook Lite",Jt],[/\b(?:FBIOS|(?:FBAN|FB_IAB)\/(?:FB4A|FBIOS))\b/i,"Facebook",Jt],[/\bLinkedInApp(?:\]?\/(\d+(?:\.\d+)*))?\b/i,"LinkedIn"],[/\bTwitter(?:Android| for (?:iPhone|iPad|Android))(?:\/(\d+(?:\.\d+)*))?\b/i,"Twitter"],[/\b(?:musical_ly|trill)(?:[_/](\d+\.\d+(?:\.\d+)*))?(?=\b|_)/i,"TikTok",/\bapp_version\/(\d+(?:\.\d+)*)/i],[/\b(?:MicroMessenger|WeChat)\/(\d+(?:\.\d+)*)?/i,"WeChat"],[/\bLine\/(\d+(?:\.\d+)*)?/i,"Line"],[/\bGSA\/(\d+(?:\.\d+)*)?/i,"Google"],[/\[Pinterest\/(?:iOS|Android)\b|\bPinterest(?: for (?:Android(?: Tablet)?|iOS))?\/(\d+(?:\.\d+)*)/i,"Pinterest"],[/\b(?:WA4A|WAiOS)\/(\d+(?:\.\d+)*)?/i,"WhatsApp"],[/\bSnapchat[ /](\d+(?:\.\d+)*)?/i,"Snapchat"],[/\bBing(?:Web|Sapphire)\/(\d+(?:\.\d+)*)?/i,"Bing"],[/\bNAVER\(inapp; search;/i,"Naver",/\bNAVER\(inapp; search;[^;)]*; (\d+(?:\.\d+)*)/i],[/\bKAKAOTALK[ /](\d+\.\d+(?:\.\d+)*)?/i,"KakaoTalk"]],Yt=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Xt(t,e){return"string"==typeof(i=t)&&Yt.test(i)?t:e();var i}function Qt(t,e){var i=new Error(e);try{Object.defineProperty(i,"name",{value:t,writable:!0,enumerable:!0,configurable:!0})}catch(t){}return i}function Zt(t){return t?t.split("#")[0]:t}var te,ee=["$feature_flag","$feature_flag_response","$feature_flag_has_experiment","$feature_flag_id","$feature_flag_version","$feature_flag_reason","$feature_flag_request_id","$feature_flag_evaluated_at","$feature_flag_error","locally_evaluated","$groups","$process_person_profile","$geoip_disable","$current_url","$pathname","$referring_domain","utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid","gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","oppref","bfcid","irclid","_kx","$session_id","$window_id","$lib","$lib_version","$device_id","$is_server"],ie="NativeGzipValidationError",re=t=>t.length>=2&&31===t[0]&&139===t[1],se=(t,e)=>t===b.GZipJS||e===b.GZipJS||"gzip"===e,ne=t=>!(!t||"object"!=typeof t)&&"NotReadableError"===("name"in t?String(t.name):""),oe=t=>{throw Qt(ie,"Native gzip produced invalid output: "+t)},ae=/*#__PURE__*/function(){var t=s(function*(t,e){18>t.size&&oe("too-short");var i=new Uint8Array(yield t.slice(0,10).arrayBuffer());re(i)&&8===i[2]||oe("invalid-header");var r=new DataView(yield t.slice(t.size-8).arrayBuffer());r.getUint32(0,!0)!==(t=>{for(var e=(()=>{if(te)return te;te=[];for(var t=0;256>t;t++){for(var e=t,i=0;8>i;i++)e=1&e?3988292384^e>>>1:e>>>1;te[t]=e>>>0}return te})(),i=4294967295,r=0;t.length>r;r++)i=e[255&(i^t[r])]^i>>>8;return(4294967295^i)>>>0})(e)&&oe("invalid-crc");var s=e.length>>>0;r.getUint32(4,!0)!==s&&oe("invalid-size")});return function(e,i){return t.apply(this,arguments)}}();function le(){return le=s(function*(t,e,i){void 0===e&&(e=!0);try{var r=(new TextEncoder).encode(t),n=new globalThis.CompressionStream("gzip"),o=n.writable.getWriter(),a=o.write(r).then(()=>o.close()).catch(/*#__PURE__*/function(){var t=s(function*(t){try{yield o.abort(t)}catch(t){}throw t});return function(e){return t.apply(this,arguments)}}()),l=new Response(n.readable).blob(),h=(yield Promise.all([l,a]))[0];return yield ae(h,r),h}catch(t){if(null!=i&&i.rethrow)throw t;return e&&console.error("Failed to gzip compress data",t),null}}),le.apply(this,arguments)}var he=function(t,e){var i=(void 0===e?{}:e).debugEnabled,r={N(e){var r;try{r=typeof window>"u"?void 0:window}catch(t){return}for(var s=arguments.length,n=new Array(s>1?s-1:0),o=1;s>o;o++)n[o-1]=arguments[o];r&&(m.DEBUG||r.POSTHOG_DEBUG||i)&&!C(r.console)&&r.console&&("__rrweb_original__"in r.console[e]?r.console[e].__rrweb_original__:r.console[e])(t,...n)},debug(){for(var t=arguments.length,e=new Array(t),i=0;t>i;i++)e[i]=arguments[i];r.N("debug",...e)},info(){for(var t=arguments.length,e=new Array(t),i=0;t>i;i++)e[i]=arguments[i];r.N("log",...e)},warn(){for(var t=arguments.length,e=new Array(t),i=0;t>i;i++)e[i]=arguments[i];r.N("warn",...e)},error(){for(var t=arguments.length,e=new Array(t),i=0;t>i;i++)e[i]=arguments[i];r.N("error",...e)},critical(){for(var e=arguments.length,i=new Array(e),r=0;e>r;r++)i[r]=arguments[r];console.error(t,...i)},uninitializedWarning(t){r.error("You must initialize PostHog before calling "+t)},createLogger:(e,i)=>he(t+" "+e,i)};return r},ue=/* @__PURE__ */he("[PostHog.js]"),de=(t,e)=>ue.createLogger(t,e),ve=de("[ExternalScriptsLoader]"),ce=t=>{var e=null==l?void 0:l.querySelectorAll("script");if(e)for(var i=0;e.length>i;i++)if(e[i].src===t||e[i].getAttribute("src")===t)return e[i]},_e=(t,e,i)=>{if(t.config.disable_external_dependency_loading)return ve.warn(e+" was requested but loading of external scripts is disabled."),i("Loading of external scripts is disabled");var r=()=>{if(null==l||l.removeEventListener("DOMContentLoaded",r),t.config.disable_external_dependency_loading)return i("Loading of external scripts is disabled");if(!l)return i("document not found");var n=l.createElement("script");if(n.type="text/javascript",n.crossOrigin="anonymous",n.src=e,n.onload=t=>{n.__posthog_loading_callback_fired=!0,i(void 0,t)},n.onerror=t=>{n.__posthog_loading_error=t,i(t)},t.config.prepare_external_dependency_script&&(n=t.config.prepare_external_dependency_script(n)),!n)return i("prepare_external_dependency_script returned null");if(t.config.disable_external_dependency_loading)return i("Loading of external scripts is disabled");var o=ce(n.src);if(o){if(o.integrity!==n.integrity||o.crossOrigin!==n.crossOrigin||o.nonce!==n.nonce)return i("Existing script conflicts with prepared script policy");if(o.__posthog_loading_callback_fired)return i();var a=o.__posthog_loading_error;return a?i(a):(o.addEventListener("load",t=>{o.__posthog_loading_callback_fired=!0,i(void 0,t)}),void o.addEventListener("error",t=>{o.__posthog_loading_error=t,i(t)}))}if(!l.body)return s();if("head"===t.config.external_scripts_inject_target)l.head.appendChild(n);else{var h,u=l.querySelectorAll("body > script");u.length>0?null==(h=u[0].parentNode)||h.insertBefore(n,u[0]):l.body.appendChild(n)}},s=()=>{null==l||l.addEventListener("DOMContentLoaded",r)};null!=l&&l.body||ce(e)?r():s()},pe={},fe=(t,e)=>{var i="/static/"+e+".js?v="+t.version;if("toolbar"===e){var r=3e5;i=i+"&t="+Math.floor(Date.now()/r)*r}return t.requestRouter.endpointFor("assets",i)};f.__PosthogExtensions__=f.__PosthogExtensions__||{},f.__PosthogExtensions__.loadExternalDependency=(t,e,i)=>{if("remote-config"!==e){var r=t.config.strict_script_versioning;if(r){var s=t.requestRouter.endpointFor("assets","/static/"+t.version+"/"+e+".js"),n=pe[s];if("fallback"===r&&n){if(ce(n))return void _e(t,n,i);delete pe[s]}_e(t,s,"fallback"===r?(r,n)=>{if(r)if("string"==typeof r)i(r);else{var o,a=fe(t,e);pe[s]=a;var l=ce(s);null==l||null==(o=l.parentNode)||o.removeChild(l),_e(t,a,i)}else i(void 0,n)}:i)}else _e(t,fe(t,e),i)}else _e(t,t.requestRouter.endpointFor("assets","/array/"+t.config.token+"/config.js"),i)},f.__PosthogExtensions__.loadSiteApp=(t,e,i)=>{_e(t,t.requestRouter.endpointFor("api",e),i)},m.DEBUG=!1,m.LIB_VERSION="1.447.1",m.LIB_NAME="web";var ge=m,me="$early_access_features",be="$active_feature_flags",ye="$feature_flag_details",we="$feature_flag_errors",$e="$feature_flag_evaluated_at",Se="$feature_flag_request_id",xe="$minimal_flag_called_events",Ee="$enabled_feature_flags",Te="$stored_group_properties",ke="$stored_person_properties",Pe="$flag_call_reported",Re="$flag_call_reported_session_id",Oe="$feature_flag_payloads",Ie="$override_feature_flags",Ce="$override_feature_flag_payloads",Ae="visibilitychange",Me="$autocapture_disabled_server_side",De="$surveys",Ne="$surveys_loaded_at",Fe="$surveys_activated",Be="$surveys_activated_session",Ue="$surveys_activated_timestamps",Le="$people_distinct_id",je="distinct_id",ze="$device_id",qe="$device_model",We="__alias",Ge="__cmpns",He="$fbc",Ve="$fbc_persistence",Je="$fbp",Ke="$fbp_persistence",Ye="__timers",Xe="$heatmaps_enabled_server_side",Qe="$exception_capture_enabled_server_side",Ze="$error_tracking_suppression_rules",ti="$error_tracking_capture_extension_exceptions",ei="$web_vitals_enabled_server_side",ii="$dead_clicks_enabled_server_side",ri="$product_tours_enabled_server_side",si="$logs_capture_enabled_server_side",ni="$web_vitals_allowed_metrics",oi="$session_recording_remote_config",ai="$session_recording_enabled_server_side",li="$replay_sample_rate",hi="$replay_override_sampling",ui="$replay_override_linked_flag",di="$replay_override_url_trigger",vi="$replay_override_event_trigger",ci="$sesid",_i="$session_is_sampled",pi="$session_past_minimum_duration",fi="$session_recording_url_trigger_activated_session",gi="$session_recording_event_trigger_activated_session",mi="$debug_first_full_snapshot_timestamp",bi="$sess_rec_flush_size",yi="$groups",wi="ph_product_tours",$i="$product_tours_activated",Si="$product_tours_activated_session",xi="$conversations_widget_session_id",Ei="$conversations_ticket_id",Ti="$conversations_widget_state",ki="$conversations_user_traits",Pi="$user_state",Ri="$client_session_props",Oi="$capture_rate_limit",Ii="$initial_campaign_params",Ci="$initial_referrer_info",Ai="$initial_person_info",Mi="$epp",Di="$posthog_cookieless",Ni="$cookieless_mode",Fi="$sdk_debug_extensions_init_method",Bi="$sdk_debug_extensions_init_time_ms",Ui="$sdk_debug_recording_script_not_loaded",Li="$sdk_debug_replay_stale_config",ji="$sdk_debug_replay_event_trigger_status",zi="$sdk_debug_replay_linked_flag_trigger_status",qi="$sdk_debug_replay_matched_recording_trigger_groups",Wi="$sdk_debug_replay_pending_trigger_conditions",Gi="$sdk_debug_replay_remote_trigger_matching_config",Hi="$sdk_debug_replay_trigger_groups_count",Vi="$sdk_debug_replay_url_trigger_status",Ji="$session_recording_start_reason",Ki="anonymous",Yi="identified",Xi="identified_only",Qi="beforeunload",Zi="$pageview",tr="$pageleave",er="$identify",ir="$groupidentify";function rr(t,e){P(t)&&t.forEach(e)}function sr(t,e){if(!N(t))if(P(t))t.forEach(e);else if((t=>t instanceof FormData)(t))t.forEach((t,i)=>e(t,i));else for(var i in t)T.call(t,i)&&e(t[i],i)}var nr=function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),r=1;e>r;r++)i[r-1]=arguments[r];for(var s of i)for(var n in s)void 0!==s[n]&&(t[n]=s[n]);return t},or=function(t){return function(){try{for(var e=arguments.length,i=new Array(e),r=0;e>r;r++)i[r]=arguments[r];return t.apply(this,i)}catch(t){ue.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),ue.critical(t)}}},ar=function(t){var e={};return sr(t,function(t,i){(A(t)&&t.length>0||F(t))&&(e[i]=t)}),e};function lr(t){var e=i({},t);for(var r of["name","message","stack","cause","errors"])try{r in t&&(e[r]=t[r])}catch(t){}return e}var hr=["herokuapp.com","vercel.app","netlify.app"];function ur(t){var e=null==t?void 0:t.hostname;if(!A(e))return!1;var i=e.split(".").slice(-2).join(".");for(var r of hr)if(i===r)return!1;return!0}function dr(t,e,i,r){var s=null!=r?r:{},n=s.capture,o=s.passive;null==t||t.addEventListener(e,i,{capture:void 0!==n&&n,passive:void 0===o||o})}var vr,cr,_r=t=>{if(l){try{for(var e=t+"=",i=l.cookie.split(";").filter(t=>t.length),r=0;i.length>r;r++){for(var s=i[r];" "==s.charAt(0);)s=s.substring(1,s.length);if(0===s.indexOf(e))return decodeURIComponent(s.substring(e.length,s.length))}}catch(t){}return null}},pr=class t{constructor(t){if(this.bytes=t,16!==t.length)throw new TypeError("not 128-bit length")}static fromFieldsV7(e,i,r,s){if(!Number.isInteger(e)||!Number.isInteger(i)||!Number.isInteger(r)||!Number.isInteger(s)||0>e||0>i||0>r||0>s||e>0xffffffffffff||i>4095||r>1073741823||s>4294967295)throw new RangeError("invalid field value");var n=/* @__PURE__ */new Uint8Array(16);return n[0]=e/Math.pow(2,40),n[1]=e/Math.pow(2,32),n[2]=e/Math.pow(2,24),n[3]=e/Math.pow(2,16),n[4]=e/256,n[5]=e,n[6]=112|i>>>8,n[7]=i,n[8]=128|r>>>24,n[9]=r>>>16,n[10]=r>>>8,n[11]=r,n[12]=s>>>24,n[13]=s>>>16,n[14]=s>>>8,n[15]=s,new t(n)}toString(){for(var t="",e=0;this.bytes.length>e;e++)t=t+(this.bytes[e]>>>4).toString(16)+(15&this.bytes[e]).toString(16),3!==e&&5!==e&&7!==e&&9!==e||(t+="-");if(36!==t.length)throw new Error("Invalid UUIDv7 was generated");return t}clone(){return new t(this.bytes.slice(0))}equals(t){return 0===this.compareTo(t)}compareTo(t){for(var e=0;16>e;e++){var i=this.bytes[e]-t.bytes[e];if(0!==i)return Math.sign(i)}return 0}},fr=class{generate(){var t=this.generateOrAbort();if(!C(t))return t;this.Tt=0;var e=this.generateOrAbort();if(C(e))throw new Error("Could not generate UUID after timestamp reset");return e}generateOrAbort(){var t=(()=>{var t=Date.now();return F(t)&&isFinite(t)?Math.min(Math.max(Math.floor(t),0),0xffffffffffff):0})();if(t>this.Tt)this.Tt=t,this.It();else{if(this.Tt>=t+1e4)return;this.Mt++,this.Mt>4398046511103&&(this.Tt++,this.It())}return pr.fromFieldsV7(this.Tt,Math.trunc(this.Mt/Math.pow(2,30)),this.Mt&Math.pow(2,30)-1,this.At.nextUint32())}It(){this.Mt=1024*this.At.nextUint32()+(1023&this.At.nextUint32())}constructor(){this.Tt=0,this.Mt=0,this.At=new mr}},gr=t=>{if("u">typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var e=0;t.length>e;e++)t[e]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return t},mr=class{nextUint32(){return this.Rt.length>this.Et||((null!=vr?vr:vr="u">typeof window&&!C(window.crypto)&&crypto.getRandomValues?t=>{try{return crypto.getRandomValues(t)}catch(e){return gr(t)}}:gr)(this.Rt),this.Et=0),this.Rt[this.Et++]}constructor(){this.Rt=/* @__PURE__ */new Uint32Array(8),this.Et=1/0}},br=()=>yr().toString(),yr=()=>(cr||(cr=new fr)).generate(),wr="",$r=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i;var Sr=null,xr={Ot(){if(!D(Sr))return Sr;if(Sr=!1,l)try{var t="__ph_cookie_support_"+br();xr.$t(t,"xyz"),Sr='"xyz"'===_r(t),xr.Dt(t)}catch(t){Sr=!1}return Sr},Pt(t){ue.error("cookieStore error: "+t)},Lt:_r,Ft(t){var e;try{e=JSON.parse(xr.Lt(t))||{}}catch(t){}return e},$t(t,e,i,r,s){if(!l)return!1;try{var n="",o="",a=function(t,e){if(e){var i=function(t,e){if(void 0===e&&(e=l),wr)return wr;if(!e)return"";if(["localhost","127.0.0.1"].includes(t))return"";for(var i=t.split("."),r=Math.min(i.length,8),s="dmn_chk_"+br();!wr&&r--;){var n=i.slice(r).join("."),o=s+"=1;domain=."+n+";path=/";e.cookie=o+";max-age=3",e.cookie.includes(s)&&(e.cookie=o+";max-age=0",wr=n)}return wr}(t);if(!i){var r=(t=>{var e=t.match($r);return e?e[0]:""})(t);r!==i&&ue.info("Warning: cookie subdomain discovery mismatch",r,i),i=r}return i?"; domain=."+i:""}return""}(l.location.hostname,r);if(i){var h=/* @__PURE__ */new Date;h.setTime(h.getTime()+864e5*i),n="; expires="+h.toUTCString()}s&&(o="; secure");var u=t+"="+encodeURIComponent(JSON.stringify(e))+n+"; SameSite=Lax; path=/"+a+o;return u.length>3686.4&&ue.warn("cookieStore warning: large cookie, len="+u.length),l.cookie=u,!0}catch(t){return!1}},Dt(t,e){if(null!=l&&l.cookie&&(!e||!D(_r(t))))try{xr.$t(t,"",-1,e)}catch(t){return}}},Er=null,Tr={Ot(){if(!D(Er))return Er;var t=!0;if(C(n))t=!1;else try{var e="__mplssupport__";Tr.$t(e,"xyz"),'"xyz"'!==Tr.Lt(e)&&(t=!1),Tr.Dt(e)}catch(e){t=!1}return t||ue.error("localStorage unsupported; falling back to cookie store"),Er=t,t},Pt(t){ue.error("localStorage error: "+t)},Lt(t){try{return null==n?void 0:n.localStorage.getItem(t)}catch(t){Tr.Pt(t)}return null},Ft(t){try{return JSON.parse(Tr.Lt(t))||{}}catch(t){}return null},$t(t,e){try{return null==n||n.localStorage.setItem(t,JSON.stringify(e)),!0}catch(t){Tr.Pt(t)}return!1},Dt(t){try{null==n||n.localStorage.removeItem(t)}catch(t){Tr.Pt(t)}}},kr=[ke,be,Ee,ye,Oe,Se,$e,we,Pe],Pr=[ze,je,ci,_i,Mi,Ai,Ve,Pi],Rr=t=>t+"_cpm",Or=["__proto__","constructor","prototype"],Ir=t=>{if(!O(t))return{};var e={};return Object.keys(t).forEach(i=>{-1===Or.indexOf(i)&&(e[i]=t[i])}),e},Cr=function(t,e){void 0===e&&(e=[]);var i={};return[...Pr,...e].forEach(e=>{var r=t[e];C(r)||D(r)||""===r||(i[e]=r)}),i},Ar=t=>{for(var e=5381,i=2166136261,r=0;t.length>r;r++){var s=t.charCodeAt(r);e=33*e^s,i=Math.imul(i^s,16777619)}return t.length.toString(36)+"."+(e>>>0).toString(36)+"."+(i>>>0).toString(36)},Mr=(t,e)=>({p:e,f:Ar(JSON.stringify(t))}),Dr=(t,e)=>{if(!e)return{properties:[],isValid:!1};try{var i=xr.Ft(Rr(t)),r=(null==i?void 0:i.f)===Ar(e)&&P(i.p);return{properties:r?i.p:[],isValid:r}}catch(t){return{properties:[],isValid:!1}}},Nr=(t,e)=>e+"|"+(xr.Lt(Rr(t))||""),Fr={},Br={Ot:()=>!0,Pt(t){ue.error("memoryStorage error: "+t)},Lt:t=>t in Fr?Fr[t]:null,Ft:t=>t in Fr?Fr[t]:null,$t:(t,e)=>(Fr[t]=e,!0),Dt(t){delete Fr[t]}},Ur=null,Lr={Ot(){if(!D(Ur))return Ur;if(Ur=!0,C(n))Ur=!1;else try{var t="__support__";Lr.$t(t,"xyz"),'"xyz"'!==Lr.Lt(t)&&(Ur=!1),Lr.Dt(t)}catch(t){Ur=!1}return Ur},Pt(t){ue.error("sessionStorage error: ",t)},Lt(t){try{return null==n?void 0:n.sessionStorage.getItem(t)}catch(t){Lr.Pt(t)}return null},Ft(t){try{return JSON.parse(Lr.Lt(t))||null}catch(t){}return null},$t(t,e){try{return null==n||n.sessionStorage.setItem(t,JSON.stringify(e)),!0}catch(t){Lr.Pt(t)}return!1},Dt(t){try{null==n||n.sessionStorage.removeItem(t)}catch(t){Lr.Pt(t)}}},jr=class{constructor(t){this._instance=t}get Fr(){return this._instance.config}get consent(){return this.Fl()?0:this.Dl}isOptedOut(){return"always"===this.Fr.cookieless_mode||this.isRejected()||-1===this.consent&&"on_reject"===this.Fr.cookieless_mode}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return 0===this.consent}isRejected(){return 0===this.consent||-1===this.consent&&this.Fr.opt_out_capturing_by_default}optInOut(t){this.Ll.$t(this.Nl,t?1:0,this.Fr.cookie_expiration,this.Fr.cross_subdomain_cookie,this.Fr.secure_cookie)}reset(){this.Ll.Dt(this.Nl,this.Fr.cross_subdomain_cookie)}get Nl(){var t=this._instance.config,e=t.token,i=t.opt_out_capturing_cookie_prefix;return t.consent_persistence_name||(i?i+e:"__ph_opt_in_out_"+e)}get Dl(){var t=this.Ll.Lt(this.Nl);return W(t)?1:S(G,t)?0:-1}get Ll(){var t=this.Fr.opt_out_capturing_persistence_type,e="localStorage"===t?Tr:xr,i=e.Ot()?e:Br;if(!this.jl||this.jl!==i){this.jl=i;var r="localStorage"===t?xr:Tr;r.Lt(this.Nl)&&(this.jl.Lt(this.Nl)||this.optInOut(W(r.Lt(this.Nl))),r.Dt(this.Nl,this.Fr.cross_subdomain_cookie))}return this.jl}Fl(){return!!this.Fr.respect_dnt&&[null==a?void 0:a.doNotTrack,null==a?void 0:a.msDoNotTrack,f.doNotTrack,null==a?void 0:a.globalPrivacyControl].some(t=>W(t))}},zr=["next","previous","prev",">","<","→","←","›","‹","»","«","▶","◀","❯","❮"],qr=/* @__PURE__ */(()=>[...zr,"+","-","−","–"])(),Wr=t=>{var e,i=!(null==(e=t.instance.persistence)||!e.get_property(ii)),r=t.instance.config.capture_dead_clicks;return U(r)?r:!!O(r)||i},Gr=de("[SegmentIntegration]");function Hr(t,e,r){void 0===r&&(r=!0);var s=t.config.segment;if(!s)return e();var n,o=(t=>R(t.register))(n=s)?{analytics:n}:n,a=o.analytics,l=o.filterProperties;!function(t,e,i,r){var s=e=>{var s=()=>e.anonymousId()||br();t.config.get_device_id=s,r&&e.id()&&(t.register({distinct_id:e.id(),$device_id:s()}),t.persistence.set_property(Pi,Yi)),i(r?void 0:e.anonymousId()||void 0)},n=e.user();"then"in n&&R(n.then)?n.then(s):s(n)}(t,a,r=>{a.register(function(t,e,r){var s=(void 0===r?{}:r).filterProperties;"undefined"!=typeof Promise&&Promise.resolve||Gr.warn("This browser does not have Promise support, and can not use the segment integration");var n=(r,n)=>{if(!n)return r;var o=!!e&&r.event.anonymousId===e&&!r.event.userId;o||r.event.userId||r.event.anonymousId===t.get_distinct_id()||(Gr.info("No userId set, resetting PostHog"),t.reset()),o||(e=void 0),r.event.userId&&r.event.userId!==t.get_distinct_id()&&(Gr.info("UserId set, identifying with PostHog"),t.identify(r.event.userId));var a=t.calculateEventProperties(n,r.event.properties);if(!N(s)){var l=r.event.properties||{},h={};for(var u of Object.keys(a))T.call(l,u)||(h[u]=a[u]);var d=((t,e)=>{var r=P(t)?t:[t],s=i({},e);for(var n of r)try{if(s=n(s),N(s))return null}catch(t){return Gr.error("Error in Segment filterProperties:",t),null}return s})(s,h);if(N(d))return r;a=d}return r.event.properties=Object.assign({},a,r.event.properties),r};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded(){return!0},load(){return Promise.resolve()},track(t){return n(t,t.event.event)},page(t){return n(t,Zi)},identify(t){return n(t,er)},screen(t){return n(t,"$screen")}}}(t,r,{filterProperties:l})).then(()=>{e()},t=>{Gr.error("Failed to register the Segment integration",t),e()})},r)}var Vr="posthog-js";function Jr(t,e){var r=void 0===e?{}:e,s=r.organization,n=r.projectId,o=r.prefix,a=r.severityAllowList,l=void 0===a?["error"]:a,h=r.sendExceptionsToPostHog,u=void 0===h||h;return e=>{var r,a,h,d,v,c;if("*"!==l&&!l.includes(e.level)||!t.__loaded)return e;e.tags||(e.tags={});var _=t.requestRouter.endpointFor("ui","/project/"+t.config.token+"/person/"+t.get_distinct_id());e.tags["PostHog Person URL"]=_,t.sessionRecordingStarted()&&(e.tags["PostHog Recording URL"]=t.get_session_replay_url({withTimestamp:!0}));var p=(null==(r=e.exception)?void 0:r.values)||[],f=p.map(t=>i({},t,{stacktrace:t.stacktrace?i({},t.stacktrace,{type:"raw",frames:(t.stacktrace.frames||[]).map(t=>i({},t,{platform:"web:javascript"}))}):void 0})),g={$exception_message:(null==(a=p[0])?void 0:a.value)||e.message,$exception_type:null==(h=p[0])?void 0:h.type,$exception_level:e.level,$exception_list:f,$sentry_event_id:e.event_id,$sentry_exception:e.exception,$sentry_exception_message:(null==(d=p[0])?void 0:d.value)||e.message,$sentry_exception_type:null==(v=p[0])?void 0:v.type,$sentry_tags:e.tags};return s&&n&&(g.$sentry_url=(o||"https://sentry.io/organizations/")+s+"/issues/?project="+n+"&query="+e.event_id),u&&(null==(c=t.exceptions)||c.sendExceptionEvent(g)),e}}var Kr=class{constructor(t,e,i,r,s,n){this.name=Vr,this.setupOnce=function(o){o(Jr(t,{organization:e,projectId:i,prefix:r,severityAllowList:s,sendExceptionsToPostHog:null==n||n}))}}},Yr=class{constructor(t){this.Hl=(t,e,i)=>{i&&(i.noSessionId||i.activityTimeout||i.sessionPastMaximumLength||i.crossTabAdoption)&&(ue.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:t,changeReason:i}),this.Ul=void 0,this._instance.scrollManager.resetContext())},this._instance=t,this.Wl()}Wl(){var t;this.Vl=null==(t=this._instance.sessionManager)?void 0:t.onSessionId(this.Hl)}destroy(){var t;null==(t=this.Vl)||t.call(this),this.Vl=void 0}doPageView(t,e){var i,r=this.Gl(t,e);return this.Ul={pathname:null!==(i=null==n?void 0:n.location.pathname)&&void 0!==i?i:"",pageViewId:e,timestamp:t},this._instance.scrollManager.resetContext(),r}doPageLeave(t){var e;return this.Gl(t,null==(e=this.Ul)?void 0:e.pageViewId)}doEvent(){var t;return{$pageview_id:null==(t=this.Ul)?void 0:t.pageViewId}}Gl(t,e){var i=this.Ul;if(!i)return{$pageview_id:e};var r={$pageview_id:e,$prev_pageview_id:i.pageViewId},s=this._instance.scrollManager.getContext();if(s&&!this._instance.config.disable_scroll_properties){var n=s.maxScrollHeight,o=s.lastScrollY,a=s.maxScrollY,l=s.maxContentHeight,h=s.lastContentY,u=s.maxContentY;if(!(C(n)||C(o)||C(a)||C(l)||C(h)||C(u))){n=Math.ceil(n),o=Math.ceil(o),a=Math.ceil(a),l=Math.ceil(l),h=Math.ceil(h),u=Math.ceil(u);var d=n>1?K(o/n,0,1,ue):1,v=n>1?K(a/n,0,1,ue):1,c=l>1?K(h/l,0,1,ue):1,_=l>1?K(u/l,0,1,ue):1;r=nr(r,{$prev_pageview_last_scroll:o,$prev_pageview_last_scroll_percentage:d,$prev_pageview_max_scroll:a,$prev_pageview_max_scroll_percentage:v,$prev_pageview_last_content:h,$prev_pageview_last_content_percentage:c,$prev_pageview_max_content:u,$prev_pageview_max_content_percentage:_})}}return i.pathname&&(r.$prev_pageview_pathname=i.pathname),i.timestamp&&(r.$prev_pageview_duration=(t.getTime()-i.timestamp.getTime())/1e3),r}},Xr=["flags","surveys"],Qr={[Le]:{exposure:"hidden"},[We]:{exposure:"hidden"},[Ge]:{exposure:"hidden"},[Ye]:{exposure:"hidden"},[Ve]:{exposure:"hidden"},[Ke]:{exposure:"hidden"},[Me]:{exposure:"event"},[Xe]:{exposure:"hidden"},[si]:{exposure:"hidden"},[Qe]:{exposure:"event"},[Ze]:{exposure:"hidden"},[ti]:{exposure:"event"},[ei]:{exposure:"event"},[ii]:{exposure:"event"},[ri]:{exposure:"hidden"},[ni]:{exposure:"event"},[oi]:{exposure:"hidden"},[ai]:{exposure:"hidden"},[ci]:{exposure:"hidden"},[_i]:{exposure:"event"},[li]:{exposure:"event",shouldSkipFromEventProperties:t=>D(t)},[pi]:{exposure:"event"},[fi]:{exposure:"event"},[gi]:{exposure:"event"},[mi]:{exposure:"event"},[bi]:{exposure:"hidden"},[Ee]:{exposure:"hidden",storageGroup:"flags"},[be]:{exposure:"hidden",storageGroup:"flags"},[me]:{exposure:"hidden"},[ye]:{exposure:"hidden",storageGroup:"flags"},[Oe]:{exposure:"hidden",storageGroup:"flags"},[Se]:{exposure:"hidden",storageGroup:"flags",volatile:!0},[xe]:{exposure:"hidden",storageGroup:"flags"},[Ie]:{exposure:"hidden"},[Ce]:{exposure:"hidden"},[ke]:{exposure:"hidden"},[Te]:{exposure:"hidden"},[De]:{exposure:"hidden",storageGroup:"surveys"},[Ne]:{exposure:"hidden",storageGroup:"surveys",volatile:!0},[Fe]:{exposure:"event"},[Be]:{exposure:"hidden"},[Ue]:{exposure:"hidden"},[wi]:{exposure:"hidden"},[$i]:{exposure:"hidden"},[Si]:{exposure:"hidden"},[xi]:{exposure:"event"},[Ei]:{exposure:"event"},[Ti]:{exposure:"event"},[ki]:{exposure:"event"},[Pe]:{exposure:"hidden"},[Re]:{exposure:"hidden"},[yi]:{exposure:"event"},[we]:{exposure:"hidden"},[$e]:{exposure:"hidden",storageGroup:"flags",volatile:!0},[Pi]:{exposure:"hidden"},[Ri]:{exposure:"hidden"},[Oi]:{exposure:"hidden"},[Ii]:{exposure:"hidden"},[Ci]:{exposure:"hidden"},[Ai]:{exposure:"hidden"},[Mi]:{exposure:"hidden"},[hi]:{exposure:"event"},[ui]:{exposure:"event"},[di]:{exposure:"event"},[vi]:{exposure:"event"},[Fi]:{exposure:"event"},[Bi]:{exposure:"event"},[Ui]:{exposure:"hidden"},[Li]:{exposure:"hidden"},[ji]:{exposure:"hidden"},[zi]:{exposure:"hidden"},[qi]:{exposure:"hidden"},[Wi]:{exposure:"hidden"},[Gi]:{exposure:"hidden"},[Hi]:{exposure:"hidden"},[Vi]:{exposure:"hidden"},[Ji]:{exposure:"event"}},Zr=[["$posthog_sr_group_event_trigger_",{exposure:"hidden"}],["$posthog_sr_group_url_trigger_",{exposure:"hidden"}],["$posthog_sr_group_sampling_",{exposure:"hidden"}]],ts=t=>{var e=Qr[t];if(e)return e;for(var i of Zr){var r=i[1];if(0===t.indexOf(i[0]))return r}};function es(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(t){return}}var is=t=>{var e,i=null==(e=typeof document>"u"?void 0:document)?void 0:e.createElement("a");return C(i)?null:(i.href=t,i)},rs=(t,e)=>{try{var i;return JSON.stringify(t,(t,e)=>z(e)?(null!=i||(i=/* @__PURE__ */new WeakMap),i.has(e)||i.set(e,lr(e)),i.get(e)):"bigint"==typeof e?e.toString():e,e)}catch(e){return s=[],null!==(r=JSON.stringify(t,function(t,e){if("bigint"==typeof e)return e.toString();if("function"!=typeof e&&"symbol"!=typeof e){if(e instanceof Error)return{name:e.name,message:e.message,stack:e.stack};if(e&&"object"==typeof e){for(;s.length>0&&s[s.length-1]!==this;)s.pop();if(s.includes(e))return"[Circular]";s.push(e)}return e}}))&&void 0!==r?r:"null"}var r,s},ss=function(t,e){for(var i,r=((t.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),s=0;r.length>s;s++){var n=r[s].split(/=(.*)/);if(n[0]===e){i=n;break}}if(!P(i)||2>i.length)return"";var o=i[1].replace(/\+/g," ");try{o=decodeURIComponent(o)}catch(t){ue.error("Skipping decoding for malformed query param: "+o)}return o},ns=function(t,e,i){if(!t||!e||!e.length)return t;for(var r=t.split(/#(.*)/),s=r[1],n=(r[0]||"").split(/\?(.*)/),o=n[1],a=n[0],l=(o||"").split("&"),h=[],u=0;l.length>u;u++){for(var d=l[u].split("?"),v=0;d.length>v&&!e.includes(d[v].split("=")[0]);)v++;h.push(d.length>v?d.slice(0,v).concat(d[v].split("=")[0]+"="+i).join("?"):l[u])}var c=a;return null!=o&&(c+="?"+h.join("&")),null!=s&&(c+="#"+s),c},os=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","oppref","bfcid","irclid","_kx"],as=/* @__PURE__ */(()=>["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid",...os])(),ls="<masked>",hs=["li_fat_id"];function us(t,e){var i=as.concat(e||[]),r={};return sr(i,function(e){var i=ss(t,e);r[e]=i||null}),r}function ds(t){var e=function(t){return t?0===t.search("https?://(.*)google.([^/?]*)")?"google":0===t.search("https?://(.*)bing.com")?"bing":0===t.search("https?://(.*)yahoo.com")?"yahoo":0===t.search("https?://(.*)duckduckgo.com")?"duckduckgo":null:null}(t),i="yahoo"!=e?"q":"p",r={};if(!D(e)){r.$search_engine=e;var s=l?ss(l.referrer,i):"";s.length&&(r.ph_keyword=s)}return r}function vs(){return navigator.language||navigator.userLanguage}var cs="$direct";function _s(){return(null==l?void 0:l.referrer)||cs}function ps(t,e,i){var r;void 0===i&&(i=!1);var s=t?[...os,...e||[]]:[],n=null==(r=i?Zt(null==h?void 0:h.href):null==h?void 0:h.href)?void 0:r.substring(0,1e3);return{r:_s().substring(0,1e3),u:n?ns(n,s,ls):void 0}}function fs(t,e){var i;void 0===e&&(e=!1);var r=t.r,s=t.u,n=e?Zt(s):s,o={$referrer:r,$referring_domain:null==r?void 0:r==cs?cs:null==(i=is(r))?void 0:i.host};if(n){o.$current_url=n;var a=is(n);o.$host=null==a?void 0:a.host,o.$pathname=null==a?void 0:a.pathname,nr(o,us(n))}return r&&nr(o,ds(r)),o}function gs(){try{/* @__PURE__ */
|
|
1
|
+
var t,e=["retriesPerformedSoFar"];function i(){return i=Object.assign?Object.assign.bind():function(t){for(var e=1;arguments.length>e;e++){var i=arguments[e];for(var r in i)({}).hasOwnProperty.call(i,r)&&(t[r]=i[r])}return t},i.apply(null,arguments)}function r(t,e,i,r,s,n,o){try{var a=t[n](o),l=a.value}catch(t){return void i(t)}a.done?e(l):Promise.resolve(l).then(r,s)}function s(t){return function(){var e=this,i=arguments;return new Promise(function(s,n){var o=t.apply(e,i);function a(t){r(o,s,n,a,l,"next",t)}function l(t){r(o,s,n,a,l,"throw",t)}a(void 0)})}}var n="u">typeof window?window:void 0,o="u">typeof globalThis?globalThis:n,a=null==o?void 0:o.navigator,l=null==o?void 0:o.document,h=null==o?void 0:o.location,u=null==o?void 0:o.fetch,d=null!=o&&o.XMLHttpRequest&&"withCredentials"in new o.XMLHttpRequest?o.XMLHttpRequest:void 0,v=null==o?void 0:o.AbortController,c=null==o?void 0:o.CompressionStream,_=null==a?void 0:a.userAgent,p="undefined"!=typeof globalThis?globalThis:n;p&&"undefined"==typeof self&&(p.self=p),p&&"undefined"==typeof File&&(p.File=function(){});var f=null!=n?n:{},g="0.10.7",m={DEBUG:!1,LIB_VERSION:g,LIB_NAME:"browser-common",JS_SDK_VERSION:g},b=/*#__PURE__*/function(t){return t.GZipJS="gzip-js",t.Base64="base64",t}({}),y=["$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"],w=["token"];function S(t,e){return-1!==t.indexOf(e)}var x=function(t){return t.replace(/^\$/,"")},E=Object.prototype,T=E.hasOwnProperty,k=E.toString,P=Array.isArray||function(t){return"[object Array]"===k.call(t)},R=t=>"function"==typeof t,O=t=>t===Object(t)&&!P(t),I=t=>{if(O(t)){for(var e in t)if(T.call(t,e))return!1;return!0}return!1},C=t=>void 0===t,A=t=>"[object String]"==k.call(t),M=t=>A(t)&&0===t.trim().length,D=t=>null===t,N=t=>C(t)||D(t),F=t=>"[object Number]"==k.call(t)&&t==t,B=t=>F(t)&&t>0,U=t=>"[object Boolean]"===k.call(t),L=t=>S(y,t),j=t=>S(w,t);function z(t){switch({}.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object DOMError]":case"[object WebAssembly.Exception]":return!0;default:return function(t,e){try{return t instanceof e}catch(t){return!1}}(t,Error)}}var q=[!0,"true",1,"1","yes"],W=t=>S(q,t),G=[!1,"false",0,"0","no"],H=["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","pinterestbot","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","lightpanda","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"],V=/* @__PURE__ */new Map,J=function(t,e){if(void 0===e&&(e=[]),!t)return!1;var i=function(t,e){for(var i="",r=0;e.length>r;r++){var s=e[r];i+=s.length+":"+s}return t.length+":"+t+"|"+e.length+":"+i}(t,e),r=V.get(i);if(void 0!==r)return r;var s=t.toLowerCase(),n=H.concat(e).some(t=>-1!==s.indexOf(t.toLowerCase()));return 256>V.size||V.clear(),V.set(i,n),n};function K(t,e,i,r,s){return e>i&&(r.warn("min cannot be greater than max."),e=i),F(t)?t>i?(r.warn(" cannot be greater than max: "+i+". Using max value instead."),i):e>t?(r.warn(" cannot be less than min: "+e+". Using min value instead."),e):t:(r.warn(" must be a number. using max or fallback. max: "+i+", fallback: "+s),K(null!=s?s:i,e,i,r))}var Y="Mobile",X="Android",Q="Tablet",Z="Android Tablet",tt="iPad",et="Apple Watch",it="Safari",rt="BlackBerry",st="Samsung Internet",nt="Chrome",ot="Chrome iOS",at="Internet Explorer",lt="Internet Explorer Mobile",ht="Opera",ut="Microsoft Edge",dt="Firefox",vt="Firefox iOS",ct="Nintendo",_t="PlayStation",pt="Xbox",ft="Android Mobile",gt="Mobile Safari",mt="Windows",bt="Windows Phone",yt="Nokia",wt="Ouya",$t="Generic tablet",St="Konqueror",xt="Oculus Browser",Et="Vivaldi",Tt="Yandex",kt="Whale",Pt="DuckDuckGo",Rt="Pale Moon",Ot="Waterfox",It="Brave",Ct="Claude",At="Codex",Mt="ChatGPT",Dt="Google Search App",Nt=/* @__PURE__ */new RegExp("Version/(\\d+(\\.\\d+)?)"),Ft=/* @__PURE__ */new RegExp("(Claude|Codex|ChatGPT)\\/(\\d+(\\.\\d+)?)"),Bt=/* @__PURE__ */new RegExp(pt,"i"),Ut=/* @__PURE__ */new RegExp("PlayStation \\w+","i"),Lt=/* @__PURE__ */new RegExp("Nintendo \\w+","i"),jt=/* @__PURE__ */new RegExp("BlackBerry|PlayBook|BB10","i"),zt={"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"},qt=function(t,e,i,r){e=e||"";var s=function(t){return null!=t&&t.brave?It:null}(i);return s||(null!=r&&r.detectGoogleSearchApp&&S(t,"GSA/")?Dt:S(t," OPR/")&&S(t,"Mini")?"Opera Mini":S(t," OPR/")?ht:jt.test(t)?rt:S(t,"IEMobile")||S(t,"WPDesktop")?lt:S(t,"OculusBrowser")?xt:S(t,"SamsungBrowser")?st:S(t,"Edge")||S(t,"Edg/")?ut:S(t,"Vivaldi/")?Et:S(t,"YaBrowser/")?Tt:S(t,"Whale/")?kt:S(t,"DuckDuckGo/")||S(t,"Ddg/")?Pt:S(t,"Claude/")?Ct:S(t,"Codex/")?At:S(t,"ChatGPT/")?Mt:S(t,"FBIOS")?"Facebook Mobile":S(t,"UCWEB")||S(t,"UCBrowser")?"UC Browser":S(t,"CriOS")?ot:S(t,"CrMo")||S(t,nt)?nt:S(t,X)&&S(t,it)?ft:S(t,"FxiOS")?vt:S(t.toLowerCase(),St.toLowerCase())?St:S(t,"Brave/")?It:((t,e)=>e&&S(e,"Apple")||function(t){return S(t,it)&&!S(t,nt)&&!S(t,X)}(t))(t,e)?S(t,Y)?gt:it:S(t,"PaleMoon/")?Rt:S(t,"Waterfox/")?Ot:S(t,dt)?dt:S(t,"MSIE")||S(t,"Trident/")?at:S(t,"Gecko")?dt:"")},Wt={[lt]:[/* @__PURE__ */new RegExp("rv:(\\d+(\\.\\d+)?)")],[ut]:[/* @__PURE__ */new RegExp("Edge?\\/(\\d+(\\.\\d+)?)")],[nt]:[/* @__PURE__ */new RegExp("(Chrome|CrMo)\\/(\\d+(\\.\\d+)?)")],[ot]:[/* @__PURE__ */new RegExp("CriOS\\/(\\d+(\\.\\d+)?)")],"UC Browser":[/* @__PURE__ */new RegExp("(UCBrowser|UCWEB)\\/(\\d+(\\.\\d+)?)")],[it]:[Nt],[gt]:[Nt],[ht]:[/* @__PURE__ */new RegExp("(Opera|OPR)\\/(\\d+(\\.\\d+)?)")],[dt]:[/* @__PURE__ */new RegExp("Firefox\\/(\\d+(\\.\\d+)?)")],[vt]:[/* @__PURE__ */new RegExp("FxiOS\\/(\\d+(\\.\\d+)?)")],[St]:[/* @__PURE__ */new RegExp("Konqueror[:/]?(\\d+(\\.\\d+)?)","i")],[rt]:[/* @__PURE__ */new RegExp("BlackBerry (\\d+(\\.\\d+)?)"),Nt],[ft]:[/* @__PURE__ */new RegExp("android\\s(\\d+(\\.\\d+)?)","i")],[st]:[/* @__PURE__ */new RegExp("SamsungBrowser\\/(\\d+(\\.\\d+)?)")],[xt]:[/* @__PURE__ */new RegExp("OculusBrowser\\/(\\d+(\\.\\d+)?)")],[Et]:[/* @__PURE__ */new RegExp("Vivaldi\\/(\\d+(\\.\\d+)?)")],[Tt]:[/* @__PURE__ */new RegExp("YaBrowser\\/(\\d+(\\.\\d+)?)")],[kt]:[/* @__PURE__ */new RegExp("Whale\\/(\\d+(\\.\\d+)?)")],[It]:[/* @__PURE__ */new RegExp("Brave\\/(\\d+(\\.\\d+)?)")],[Ct]:[Ft],[At]:[Ft],[Mt]:[Ft],[Pt]:[/* @__PURE__ */new RegExp("(DuckDuckGo|Ddg)\\/(\\d+(\\.\\d+)?)")],[Rt]:[/* @__PURE__ */new RegExp("PaleMoon\\/(\\d+(\\.\\d+)?)")],[Ot]:[/* @__PURE__ */new RegExp("Waterfox\\/(\\d+(\\.\\d+)?)")],[Dt]:[/* @__PURE__ */new RegExp("GSA\\/(\\d+(\\.\\d+)?)")],[at]:[/* @__PURE__ */new RegExp("(rv:|MSIE )(\\d+(\\.\\d+)?)")],Mozilla:[/* @__PURE__ */new RegExp("rv:(\\d+(\\.\\d+)?)")]},Gt=function(t,e,i,r){var s=Wt[qt(t,e,i,r)];if(C(s))return null;for(var n=0;s.length>n;n++){var o=t.match(s[n]);if(o)return parseFloat(o[o.length-2])}return null},Ht=[[/* @__PURE__ */new RegExp("Xbox; Xbox (.*?)[);]","i"),t=>[pt,t&&t[1]||""]],[/* @__PURE__ */new RegExp(ct,"i"),[ct,""]],[/* @__PURE__ */new RegExp(_t,"i"),[_t,""]],[jt,[rt,""]],[/* @__PURE__ */new RegExp(mt,"i"),(t,e)=>{if(/Phone/.test(e)||/WPDesktop/.test(e))return[bt,""];if(new RegExp(Y).test(e)&&!/IEMobile\b/.test(e))return["Windows Mobile",""];var i=/Windows NT ([0-9.]+)/i.exec(e);if(i&&i[1]){var r=zt[i[1]]||"";return/arm/i.test(e)&&(r="RT"),[mt,r]}return[mt,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,t=>t&&t[3]?["iOS",[t[3],t[4],t[5]||"0"].join(".")]:["iOS",""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,t=>{var e="";return t&&t.length>=3&&(e=C(t[2])?t[3]:t[2]),["watchOS",e]}],[/* @__PURE__ */new RegExp("(Android (\\d+)\\.(\\d+)\\.?(\\d+)?|Android)","i"),t=>t&&t[2]?[X,[t[2],t[3],t[4]||"0"].join(".")]:[X,""]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,t=>{var e=["Mac OS X",""];return t&&t[1]&&(e[1]=[t[1],t[2],t[3]||"0"].join(".")),e}],[/Mac/i,["Mac OS X",""]],[/CrOS/,["Chrome OS",""]],[/Linux|debian/i,["Linux",""]]],Vt=function(t){return Lt.test(t)?ct:Ut.test(t)?_t:Bt.test(t)?pt:new RegExp(wt,"i").test(t)?wt:/* @__PURE__ */new RegExp("(Windows Phone|WPDesktop)","i").test(t)?bt:/iPad/.test(t)?tt:/iPod/.test(t)?"iPod Touch":/iPhone/.test(t)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(t)?et:jt.test(t)?rt:/(kobo)\s(ereader|touch)/i.test(t)?"Kobo":new RegExp(yt,"i").test(t)?yt:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(t)||/(kf[a-z]+)( bui|\)).+silk\//i.test(t)?"Kindle Fire":/(Android|ZTE)/i.test(t)?new RegExp(Y).test(t)&&!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(t)||/pixel[\daxl ]{1,6}/i.test(t)&&!/pixel c/i.test(t)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(t)||/lmy47v/i.test(t)&&!/QTAQZ3/i.test(t)?X:Z:/* @__PURE__ */new RegExp("(pda|Mobile)","i").test(t)?"Generic mobile":new RegExp(Q,"i").test(t)&&!/* @__PURE__ */new RegExp("Tablet pc","i").test(t)?$t:""},Jt=/\bFBAV\/(\d+(?:\.\d+)*)/i,Kt=[[/\bInstagram(?:[ /](\d+(?:\.\d+)*))?\b/i,"Instagram"],[/\bBarcelona[ /](\d+(?:\.\d+)*)?/i,"Threads"],[/\b(?:MessengerForiOS|(?:FBAN|FB_IAB)\/Orca-Android)\b/i,"Messenger",Jt],[/\bFBAN\/EMA\b/i,"Facebook Lite",Jt],[/\b(?:FBIOS|(?:FBAN|FB_IAB)\/(?:FB4A|FBIOS))\b/i,"Facebook",Jt],[/\bLinkedInApp(?:\]?\/(\d+(?:\.\d+)*))?\b/i,"LinkedIn"],[/\bTwitter(?:Android| for (?:iPhone|iPad|Android))(?:\/(\d+(?:\.\d+)*))?\b/i,"Twitter"],[/\b(?:musical_ly|trill)(?:[_/](\d+\.\d+(?:\.\d+)*))?(?=\b|_)/i,"TikTok",/\bapp_version\/(\d+(?:\.\d+)*)/i],[/\b(?:MicroMessenger|WeChat)\/(\d+(?:\.\d+)*)?/i,"WeChat"],[/\bLine\/(\d+(?:\.\d+)*)?/i,"Line"],[/\bGSA\/(\d+(?:\.\d+)*)?/i,"Google"],[/\[Pinterest\/(?:iOS|Android)\b|\bPinterest(?: for (?:Android(?: Tablet)?|iOS))?\/(\d+(?:\.\d+)*)/i,"Pinterest"],[/\b(?:WA4A|WAiOS)\/(\d+(?:\.\d+)*)?/i,"WhatsApp"],[/\bSnapchat[ /](\d+(?:\.\d+)*)?/i,"Snapchat"],[/\bBing(?:Web|Sapphire)\/(\d+(?:\.\d+)*)?/i,"Bing"],[/\bNAVER\(inapp; search;/i,"Naver",/\bNAVER\(inapp; search;[^;)]*; (\d+(?:\.\d+)*)/i],[/\bKAKAOTALK[ /](\d+\.\d+(?:\.\d+)*)?/i,"KakaoTalk"]],Yt=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Xt(t,e){return"string"==typeof(i=t)&&Yt.test(i)?t:e();var i}function Qt(t,e){var i=new Error(e);try{Object.defineProperty(i,"name",{value:t,writable:!0,enumerable:!0,configurable:!0})}catch(t){}return i}function Zt(t){return t?t.split("#")[0]:t}var te,ee=["$feature_flag","$feature_flag_response","$feature_flag_has_experiment","$feature_flag_id","$feature_flag_version","$feature_flag_reason","$feature_flag_request_id","$feature_flag_evaluated_at","$feature_flag_error","locally_evaluated","$groups","$process_person_profile","$geoip_disable","$current_url","$pathname","$referring_domain","utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid","gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","oppref","bfcid","irclid","_kx","$session_id","$window_id","$lib","$lib_version","$device_id","$is_server"],ie="NativeGzipValidationError",re=t=>t.length>=2&&31===t[0]&&139===t[1],se=(t,e)=>t===b.GZipJS||e===b.GZipJS||"gzip"===e,ne=t=>!(!t||"object"!=typeof t)&&"NotReadableError"===("name"in t?String(t.name):""),oe=t=>{throw Qt(ie,"Native gzip produced invalid output: "+t)},ae=/*#__PURE__*/function(){var t=s(function*(t,e){18>t.size&&oe("too-short");var i=new Uint8Array(yield t.slice(0,10).arrayBuffer());re(i)&&8===i[2]||oe("invalid-header");var r=new DataView(yield t.slice(t.size-8).arrayBuffer());r.getUint32(0,!0)!==(t=>{for(var e=(()=>{if(te)return te;te=[];for(var t=0;256>t;t++){for(var e=t,i=0;8>i;i++)e=1&e?3988292384^e>>>1:e>>>1;te[t]=e>>>0}return te})(),i=4294967295,r=0;t.length>r;r++)i=e[255&(i^t[r])]^i>>>8;return(4294967295^i)>>>0})(e)&&oe("invalid-crc");var s=e.length>>>0;r.getUint32(4,!0)!==s&&oe("invalid-size")});return function(e,i){return t.apply(this,arguments)}}();function le(){return le=s(function*(t,e,i){void 0===e&&(e=!0);try{var r=(new TextEncoder).encode(t),n=new globalThis.CompressionStream("gzip"),o=n.writable.getWriter(),a=o.write(r).then(()=>o.close()).catch(/*#__PURE__*/function(){var t=s(function*(t){try{yield o.abort(t)}catch(t){}throw t});return function(e){return t.apply(this,arguments)}}()),l=new Response(n.readable).blob(),h=(yield Promise.all([l,a]))[0];return yield ae(h,r),h}catch(t){if(null!=i&&i.rethrow)throw t;return e&&console.error("Failed to gzip compress data",t),null}}),le.apply(this,arguments)}var he=function(t,e){var i=(void 0===e?{}:e).debugEnabled,r={N(e){var r;try{r=typeof window>"u"?void 0:window}catch(t){return}for(var s=arguments.length,n=new Array(s>1?s-1:0),o=1;s>o;o++)n[o-1]=arguments[o];r&&(m.DEBUG||r.POSTHOG_DEBUG||i)&&!C(r.console)&&r.console&&("__rrweb_original__"in r.console[e]?r.console[e].__rrweb_original__:r.console[e])(t,...n)},debug(){for(var t=arguments.length,e=new Array(t),i=0;t>i;i++)e[i]=arguments[i];r.N("debug",...e)},info(){for(var t=arguments.length,e=new Array(t),i=0;t>i;i++)e[i]=arguments[i];r.N("log",...e)},warn(){for(var t=arguments.length,e=new Array(t),i=0;t>i;i++)e[i]=arguments[i];r.N("warn",...e)},error(){for(var t=arguments.length,e=new Array(t),i=0;t>i;i++)e[i]=arguments[i];r.N("error",...e)},critical(){for(var e=arguments.length,i=new Array(e),r=0;e>r;r++)i[r]=arguments[r];console.error(t,...i)},uninitializedWarning(t){r.error("You must initialize PostHog before calling "+t)},createLogger:(e,i)=>he(t+" "+e,i)};return r},ue=/* @__PURE__ */he("[PostHog.js]"),de=(t,e)=>ue.createLogger(t,e),ve=de("[ExternalScriptsLoader]"),ce=t=>{var e=null==l?void 0:l.querySelectorAll("script");if(e)for(var i=0;e.length>i;i++)if(e[i].src===t||e[i].getAttribute("src")===t)return e[i]},_e=(t,e,i)=>{if(t.config.disable_external_dependency_loading)return ve.warn(e+" was requested but loading of external scripts is disabled."),i("Loading of external scripts is disabled");var r=()=>{if(null==l||l.removeEventListener("DOMContentLoaded",r),t.config.disable_external_dependency_loading)return i("Loading of external scripts is disabled");if(!l)return i("document not found");var n=l.createElement("script");if(n.type="text/javascript",n.crossOrigin="anonymous",n.src=e,n.onload=t=>{n.__posthog_loading_callback_fired=!0,i(void 0,t)},n.onerror=t=>{n.__posthog_loading_error=t,i(t)},t.config.prepare_external_dependency_script&&(n=t.config.prepare_external_dependency_script(n)),!n)return i("prepare_external_dependency_script returned null");if(t.config.disable_external_dependency_loading)return i("Loading of external scripts is disabled");var o=ce(n.src);if(o){if(o.integrity!==n.integrity||o.crossOrigin!==n.crossOrigin||o.nonce!==n.nonce)return i("Existing script conflicts with prepared script policy");if(o.__posthog_loading_callback_fired)return i();var a=o.__posthog_loading_error;return a?i(a):(o.addEventListener("load",t=>{o.__posthog_loading_callback_fired=!0,i(void 0,t)}),void o.addEventListener("error",t=>{o.__posthog_loading_error=t,i(t)}))}if(!l.body)return s();if("head"===t.config.external_scripts_inject_target)l.head.appendChild(n);else{var h,u=l.querySelectorAll("body > script");u.length>0?null==(h=u[0].parentNode)||h.insertBefore(n,u[0]):l.body.appendChild(n)}},s=()=>{null==l||l.addEventListener("DOMContentLoaded",r)};null!=l&&l.body||ce(e)?r():s()},pe={},fe=(t,e)=>{var i="/static/"+e+".js?v="+t.version;if("toolbar"===e){var r=3e5;i=i+"&t="+Math.floor(Date.now()/r)*r}return t.requestRouter.endpointFor("assets",i)};f.__PosthogExtensions__=f.__PosthogExtensions__||{},f.__PosthogExtensions__.loadExternalDependency=(t,e,i)=>{if("remote-config"!==e){var r=t.config.strict_script_versioning;if(r){var s=t.requestRouter.endpointFor("assets","/static/"+t.version+"/"+e+".js"),n=pe[s];if("fallback"===r&&n){if(ce(n))return void _e(t,n,i);delete pe[s]}_e(t,s,"fallback"===r?(r,n)=>{if(r)if("string"==typeof r)i(r);else{var o,a=fe(t,e);pe[s]=a;var l=ce(s);null==l||null==(o=l.parentNode)||o.removeChild(l),_e(t,a,i)}else i(void 0,n)}:i)}else _e(t,fe(t,e),i)}else _e(t,t.requestRouter.endpointFor("assets","/array/"+t.config.token+"/config.js"),i)},f.__PosthogExtensions__.loadSiteApp=(t,e,i)=>{_e(t,t.requestRouter.endpointFor("api",e),i)},m.DEBUG=!1,m.LIB_VERSION="1.447.2",m.LIB_NAME="web";var ge=m,me="$early_access_features",be="$active_feature_flags",ye="$feature_flag_details",we="$feature_flag_errors",$e="$feature_flag_evaluated_at",Se="$feature_flag_request_id",xe="$minimal_flag_called_events",Ee="$enabled_feature_flags",Te="$stored_group_properties",ke="$stored_person_properties",Pe="$flag_call_reported",Re="$flag_call_reported_session_id",Oe="$feature_flag_payloads",Ie="$override_feature_flags",Ce="$override_feature_flag_payloads",Ae="visibilitychange",Me="$autocapture_disabled_server_side",De="$surveys",Ne="$surveys_loaded_at",Fe="$surveys_activated",Be="$surveys_activated_session",Ue="$surveys_activated_timestamps",Le="$people_distinct_id",je="distinct_id",ze="$device_id",qe="$device_model",We="__alias",Ge="__cmpns",He="$fbc",Ve="$fbc_persistence",Je="$fbp",Ke="$fbp_persistence",Ye="__timers",Xe="$heatmaps_enabled_server_side",Qe="$exception_capture_enabled_server_side",Ze="$error_tracking_suppression_rules",ti="$error_tracking_capture_extension_exceptions",ei="$web_vitals_enabled_server_side",ii="$dead_clicks_enabled_server_side",ri="$product_tours_enabled_server_side",si="$logs_capture_enabled_server_side",ni="$web_vitals_allowed_metrics",oi="$session_recording_remote_config",ai="$session_recording_enabled_server_side",li="$replay_sample_rate",hi="$replay_override_sampling",ui="$replay_override_linked_flag",di="$replay_override_url_trigger",vi="$replay_override_event_trigger",ci="$sesid",_i="$session_is_sampled",pi="$session_past_minimum_duration",fi="$session_recording_url_trigger_activated_session",gi="$session_recording_event_trigger_activated_session",mi="$debug_first_full_snapshot_timestamp",bi="$sess_rec_flush_size",yi="$groups",wi="ph_product_tours",$i="$product_tours_activated",Si="$product_tours_activated_session",xi="$conversations_widget_session_id",Ei="$conversations_ticket_id",Ti="$conversations_widget_state",ki="$conversations_user_traits",Pi="$user_state",Ri="$client_session_props",Oi="$capture_rate_limit",Ii="$initial_campaign_params",Ci="$initial_referrer_info",Ai="$initial_person_info",Mi="$epp",Di="$posthog_cookieless",Ni="$cookieless_mode",Fi="$sdk_debug_extensions_init_method",Bi="$sdk_debug_extensions_init_time_ms",Ui="$sdk_debug_recording_script_not_loaded",Li="$sdk_debug_replay_stale_config",ji="$sdk_debug_replay_event_trigger_status",zi="$sdk_debug_replay_linked_flag_trigger_status",qi="$sdk_debug_replay_matched_recording_trigger_groups",Wi="$sdk_debug_replay_pending_trigger_conditions",Gi="$sdk_debug_replay_remote_trigger_matching_config",Hi="$sdk_debug_replay_trigger_groups_count",Vi="$sdk_debug_replay_url_trigger_status",Ji="$session_recording_start_reason",Ki="anonymous",Yi="identified",Xi="identified_only",Qi="beforeunload",Zi="$pageview",tr="$pageleave",er="$identify",ir="$groupidentify";function rr(t,e){P(t)&&t.forEach(e)}function sr(t,e){if(!N(t))if(P(t))t.forEach(e);else if((t=>t instanceof FormData)(t))t.forEach((t,i)=>e(t,i));else for(var i in t)T.call(t,i)&&e(t[i],i)}var nr=function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),r=1;e>r;r++)i[r-1]=arguments[r];for(var s of i)for(var n in s)void 0!==s[n]&&(t[n]=s[n]);return t},or=function(t){return function(){try{for(var e=arguments.length,i=new Array(e),r=0;e>r;r++)i[r]=arguments[r];return t.apply(this,i)}catch(t){ue.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),ue.critical(t)}}},ar=function(t){var e={};return sr(t,function(t,i){(A(t)&&t.length>0||F(t))&&(e[i]=t)}),e};function lr(t){var e=i({},t);for(var r of["name","message","stack","cause","errors"])try{r in t&&(e[r]=t[r])}catch(t){}return e}var hr=["herokuapp.com","vercel.app","netlify.app"];function ur(t){var e=null==t?void 0:t.hostname;if(!A(e))return!1;var i=e.split(".").slice(-2).join(".");for(var r of hr)if(i===r)return!1;return!0}function dr(t,e,i,r){var s=null!=r?r:{},n=s.capture,o=s.passive;null==t||t.addEventListener(e,i,{capture:void 0!==n&&n,passive:void 0===o||o})}var vr,cr,_r=t=>{if(l){try{for(var e=t+"=",i=l.cookie.split(";").filter(t=>t.length),r=0;i.length>r;r++){for(var s=i[r];" "==s.charAt(0);)s=s.substring(1,s.length);if(0===s.indexOf(e))return decodeURIComponent(s.substring(e.length,s.length))}}catch(t){}return null}},pr=class t{constructor(t){if(this.bytes=t,16!==t.length)throw new TypeError("not 128-bit length")}static fromFieldsV7(e,i,r,s){if(!Number.isInteger(e)||!Number.isInteger(i)||!Number.isInteger(r)||!Number.isInteger(s)||0>e||0>i||0>r||0>s||e>0xffffffffffff||i>4095||r>1073741823||s>4294967295)throw new RangeError("invalid field value");var n=/* @__PURE__ */new Uint8Array(16);return n[0]=e/Math.pow(2,40),n[1]=e/Math.pow(2,32),n[2]=e/Math.pow(2,24),n[3]=e/Math.pow(2,16),n[4]=e/256,n[5]=e,n[6]=112|i>>>8,n[7]=i,n[8]=128|r>>>24,n[9]=r>>>16,n[10]=r>>>8,n[11]=r,n[12]=s>>>24,n[13]=s>>>16,n[14]=s>>>8,n[15]=s,new t(n)}toString(){for(var t="",e=0;this.bytes.length>e;e++)t=t+(this.bytes[e]>>>4).toString(16)+(15&this.bytes[e]).toString(16),3!==e&&5!==e&&7!==e&&9!==e||(t+="-");if(36!==t.length)throw new Error("Invalid UUIDv7 was generated");return t}clone(){return new t(this.bytes.slice(0))}equals(t){return 0===this.compareTo(t)}compareTo(t){for(var e=0;16>e;e++){var i=this.bytes[e]-t.bytes[e];if(0!==i)return Math.sign(i)}return 0}},fr=class{generate(){var t=this.generateOrAbort();if(!C(t))return t;this.Tt=0;var e=this.generateOrAbort();if(C(e))throw new Error("Could not generate UUID after timestamp reset");return e}generateOrAbort(){var t=(()=>{var t=Date.now();return F(t)&&isFinite(t)?Math.min(Math.max(Math.floor(t),0),0xffffffffffff):0})();if(t>this.Tt)this.Tt=t,this.It();else{if(this.Tt>=t+1e4)return;this.Mt++,this.Mt>4398046511103&&(this.Tt++,this.It())}return pr.fromFieldsV7(this.Tt,Math.trunc(this.Mt/Math.pow(2,30)),this.Mt&Math.pow(2,30)-1,this.At.nextUint32())}It(){this.Mt=1024*this.At.nextUint32()+(1023&this.At.nextUint32())}constructor(){this.Tt=0,this.Mt=0,this.At=new mr}},gr=t=>{if("u">typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var e=0;t.length>e;e++)t[e]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return t},mr=class{nextUint32(){return this.Rt.length>this.Et||((null!=vr?vr:vr="u">typeof window&&!C(window.crypto)&&crypto.getRandomValues?t=>{try{return crypto.getRandomValues(t)}catch(e){return gr(t)}}:gr)(this.Rt),this.Et=0),this.Rt[this.Et++]}constructor(){this.Rt=/* @__PURE__ */new Uint32Array(8),this.Et=1/0}},br=()=>yr().toString(),yr=()=>(cr||(cr=new fr)).generate(),wr="",$r=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i;var Sr=null,xr={Ot(){if(!D(Sr))return Sr;if(Sr=!1,l)try{var t="__ph_cookie_support_"+br();xr.$t(t,"xyz"),Sr='"xyz"'===_r(t),xr.Dt(t)}catch(t){Sr=!1}return Sr},Pt(t){ue.error("cookieStore error: "+t)},Lt:_r,Ft(t){var e;try{e=JSON.parse(xr.Lt(t))||{}}catch(t){}return e},$t(t,e,i,r,s){if(!l)return!1;try{var n="",o="",a=function(t,e){if(e){var i=function(t,e){if(void 0===e&&(e=l),wr)return wr;if(!e)return"";if(["localhost","127.0.0.1"].includes(t))return"";for(var i=t.split("."),r=Math.min(i.length,8),s="dmn_chk_"+br();!wr&&r--;){var n=i.slice(r).join("."),o=s+"=1;domain=."+n+";path=/";e.cookie=o+";max-age=3",e.cookie.includes(s)&&(e.cookie=o+";max-age=0",wr=n)}return wr}(t);if(!i){var r=(t=>{var e=t.match($r);return e?e[0]:""})(t);r!==i&&ue.info("Warning: cookie subdomain discovery mismatch",r,i),i=r}return i?"; domain=."+i:""}return""}(l.location.hostname,r);if(i){var h=/* @__PURE__ */new Date;h.setTime(h.getTime()+864e5*i),n="; expires="+h.toUTCString()}s&&(o="; secure");var u=t+"="+encodeURIComponent(JSON.stringify(e))+n+"; SameSite=Lax; path=/"+a+o;return u.length>3686.4&&ue.warn("cookieStore warning: large cookie, len="+u.length),l.cookie=u,!0}catch(t){return!1}},Dt(t,e){if(null!=l&&l.cookie&&(!e||!D(_r(t))))try{xr.$t(t,"",-1,e)}catch(t){return}}},Er=null,Tr={Ot(){if(!D(Er))return Er;var t=!0;if(C(n))t=!1;else try{var e="__mplssupport__";Tr.$t(e,"xyz"),'"xyz"'!==Tr.Lt(e)&&(t=!1),Tr.Dt(e)}catch(e){t=!1}return t||ue.error("localStorage unsupported; falling back to cookie store"),Er=t,t},Pt(t){ue.error("localStorage error: "+t)},Lt(t){try{return null==n?void 0:n.localStorage.getItem(t)}catch(t){Tr.Pt(t)}return null},Ft(t){try{return JSON.parse(Tr.Lt(t))||{}}catch(t){}return null},$t(t,e){try{return null==n||n.localStorage.setItem(t,JSON.stringify(e)),!0}catch(t){Tr.Pt(t)}return!1},Dt(t){try{null==n||n.localStorage.removeItem(t)}catch(t){Tr.Pt(t)}}},kr=[ke,be,Ee,ye,Oe,Se,$e,we,Pe],Pr=[ze,je,ci,_i,Mi,Ai,Ve,Pi],Rr=t=>t+"_cpm",Or=["__proto__","constructor","prototype"],Ir=t=>{if(!O(t))return{};var e={};return Object.keys(t).forEach(i=>{-1===Or.indexOf(i)&&(e[i]=t[i])}),e},Cr=function(t,e){void 0===e&&(e=[]);var i={};return[...Pr,...e].forEach(e=>{var r=t[e];C(r)||D(r)||""===r||(i[e]=r)}),i},Ar=t=>{for(var e=5381,i=2166136261,r=0;t.length>r;r++){var s=t.charCodeAt(r);e=33*e^s,i=Math.imul(i^s,16777619)}return t.length.toString(36)+"."+(e>>>0).toString(36)+"."+(i>>>0).toString(36)},Mr=(t,e)=>({p:e,f:Ar(JSON.stringify(t))}),Dr=(t,e)=>{if(!e)return{properties:[],isValid:!1};try{var i=xr.Ft(Rr(t)),r=(null==i?void 0:i.f)===Ar(e)&&P(i.p);return{properties:r?i.p:[],isValid:r}}catch(t){return{properties:[],isValid:!1}}},Nr=(t,e)=>e+"|"+(xr.Lt(Rr(t))||""),Fr={},Br={Ot:()=>!0,Pt(t){ue.error("memoryStorage error: "+t)},Lt:t=>t in Fr?Fr[t]:null,Ft:t=>t in Fr?Fr[t]:null,$t:(t,e)=>(Fr[t]=e,!0),Dt(t){delete Fr[t]}},Ur=null,Lr={Ot(){if(!D(Ur))return Ur;if(Ur=!0,C(n))Ur=!1;else try{var t="__support__";Lr.$t(t,"xyz"),'"xyz"'!==Lr.Lt(t)&&(Ur=!1),Lr.Dt(t)}catch(t){Ur=!1}return Ur},Pt(t){ue.error("sessionStorage error: ",t)},Lt(t){try{return null==n?void 0:n.sessionStorage.getItem(t)}catch(t){Lr.Pt(t)}return null},Ft(t){try{return JSON.parse(Lr.Lt(t))||null}catch(t){}return null},$t(t,e){try{return null==n||n.sessionStorage.setItem(t,JSON.stringify(e)),!0}catch(t){Lr.Pt(t)}return!1},Dt(t){try{null==n||n.sessionStorage.removeItem(t)}catch(t){Lr.Pt(t)}}},jr=class{constructor(t){this._instance=t}get Fr(){return this._instance.config}get consent(){return this.Fl()?0:this.Dl}isOptedOut(){return"always"===this.Fr.cookieless_mode||this.isRejected()||-1===this.consent&&"on_reject"===this.Fr.cookieless_mode}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return 0===this.consent}isRejected(){return 0===this.consent||-1===this.consent&&this.Fr.opt_out_capturing_by_default}optInOut(t){this.Ll.$t(this.Nl,t?1:0,this.Fr.cookie_expiration,this.Fr.cross_subdomain_cookie,this.Fr.secure_cookie)}reset(){this.Ll.Dt(this.Nl,this.Fr.cross_subdomain_cookie)}get Nl(){var t=this._instance.config,e=t.token,i=t.opt_out_capturing_cookie_prefix;return t.consent_persistence_name||(i?i+e:"__ph_opt_in_out_"+e)}get Dl(){var t=this.Ll.Lt(this.Nl);return W(t)?1:S(G,t)?0:-1}get Ll(){var t=this.Fr.opt_out_capturing_persistence_type,e="localStorage"===t?Tr:xr,i=e.Ot()?e:Br;if(!this.jl||this.jl!==i){this.jl=i;var r="localStorage"===t?xr:Tr;r.Lt(this.Nl)&&(this.jl.Lt(this.Nl)||this.optInOut(W(r.Lt(this.Nl))),r.Dt(this.Nl,this.Fr.cross_subdomain_cookie))}return this.jl}Fl(){return!!this.Fr.respect_dnt&&[null==a?void 0:a.doNotTrack,null==a?void 0:a.msDoNotTrack,f.doNotTrack,null==a?void 0:a.globalPrivacyControl].some(t=>W(t))}},zr=["next","previous","prev",">","<","→","←","›","‹","»","«","▶","◀","❯","❮"],qr=/* @__PURE__ */(()=>[...zr,"+","-","−","–"])(),Wr=t=>{var e,i=!(null==(e=t.instance.persistence)||!e.get_property(ii)),r=t.instance.config.capture_dead_clicks;return U(r)?r:!!O(r)||i},Gr=de("[SegmentIntegration]");function Hr(t,e,r){void 0===r&&(r=!0);var s=t.config.segment;if(!s)return e();var n,o=(t=>R(t.register))(n=s)?{analytics:n}:n,a=o.analytics,l=o.filterProperties;!function(t,e,i,r){var s=e=>{var s=()=>e.anonymousId()||br();t.config.get_device_id=s,r&&e.id()&&(t.register({distinct_id:e.id(),$device_id:s()}),t.persistence.set_property(Pi,Yi)),i(r?void 0:e.anonymousId()||void 0)},n=e.user();"then"in n&&R(n.then)?n.then(s):s(n)}(t,a,r=>{a.register(function(t,e,r){var s=(void 0===r?{}:r).filterProperties;"undefined"!=typeof Promise&&Promise.resolve||Gr.warn("This browser does not have Promise support, and can not use the segment integration");var n=(r,n)=>{if(!n)return r;var o=!!e&&r.event.anonymousId===e&&!r.event.userId;o||r.event.userId||r.event.anonymousId===t.get_distinct_id()||(Gr.info("No userId set, resetting PostHog"),t.reset()),o||(e=void 0),r.event.userId&&r.event.userId!==t.get_distinct_id()&&(Gr.info("UserId set, identifying with PostHog"),t.identify(r.event.userId));var a=t.calculateEventProperties(n,r.event.properties);if(!N(s)){var l=r.event.properties||{},h={};for(var u of Object.keys(a))T.call(l,u)||(h[u]=a[u]);var d=((t,e)=>{var r=P(t)?t:[t],s=i({},e);for(var n of r)try{if(s=n(s),N(s))return null}catch(t){return Gr.error("Error in Segment filterProperties:",t),null}return s})(s,h);if(N(d))return r;a=d}return r.event.properties=Object.assign({},a,r.event.properties),r};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded(){return!0},load(){return Promise.resolve()},track(t){return n(t,t.event.event)},page(t){return n(t,Zi)},identify(t){return n(t,er)},screen(t){return n(t,"$screen")}}}(t,r,{filterProperties:l})).then(()=>{e()},t=>{Gr.error("Failed to register the Segment integration",t),e()})},r)}var Vr="posthog-js";function Jr(t,e){var r=void 0===e?{}:e,s=r.organization,n=r.projectId,o=r.prefix,a=r.severityAllowList,l=void 0===a?["error"]:a,h=r.sendExceptionsToPostHog,u=void 0===h||h;return e=>{var r,a,h,d,v,c;if("*"!==l&&!l.includes(e.level)||!t.__loaded)return e;e.tags||(e.tags={});var _=t.requestRouter.endpointFor("ui","/project/"+t.config.token+"/person/"+t.get_distinct_id());e.tags["PostHog Person URL"]=_,t.sessionRecordingStarted()&&(e.tags["PostHog Recording URL"]=t.get_session_replay_url({withTimestamp:!0}));var p=(null==(r=e.exception)?void 0:r.values)||[],f=p.map(t=>i({},t,{stacktrace:t.stacktrace?i({},t.stacktrace,{type:"raw",frames:(t.stacktrace.frames||[]).map(t=>i({},t,{platform:"web:javascript"}))}):void 0})),g={$exception_message:(null==(a=p[0])?void 0:a.value)||e.message,$exception_type:null==(h=p[0])?void 0:h.type,$exception_level:e.level,$exception_list:f,$sentry_event_id:e.event_id,$sentry_exception:e.exception,$sentry_exception_message:(null==(d=p[0])?void 0:d.value)||e.message,$sentry_exception_type:null==(v=p[0])?void 0:v.type,$sentry_tags:e.tags};return s&&n&&(g.$sentry_url=(o||"https://sentry.io/organizations/")+s+"/issues/?project="+n+"&query="+e.event_id),u&&(null==(c=t.exceptions)||c.sendExceptionEvent(g)),e}}var Kr=class{constructor(t,e,i,r,s,n){this.name=Vr,this.setupOnce=function(o){o(Jr(t,{organization:e,projectId:i,prefix:r,severityAllowList:s,sendExceptionsToPostHog:null==n||n}))}}},Yr=class{constructor(t){this.Hl=(t,e,i)=>{i&&(i.noSessionId||i.activityTimeout||i.sessionPastMaximumLength||i.crossTabAdoption)&&(ue.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:t,changeReason:i}),this.Ul=void 0,this._instance.scrollManager.resetContext())},this._instance=t,this.Wl()}Wl(){var t;this.Vl=null==(t=this._instance.sessionManager)?void 0:t.onSessionId(this.Hl)}destroy(){var t;null==(t=this.Vl)||t.call(this),this.Vl=void 0}doPageView(t,e){var i,r=this.Gl(t,e);return this.Ul={pathname:null!==(i=null==n?void 0:n.location.pathname)&&void 0!==i?i:"",pageViewId:e,timestamp:t},this._instance.scrollManager.resetContext(),r}doPageLeave(t){var e;return this.Gl(t,null==(e=this.Ul)?void 0:e.pageViewId)}doEvent(){var t;return{$pageview_id:null==(t=this.Ul)?void 0:t.pageViewId}}Gl(t,e){var i=this.Ul;if(!i)return{$pageview_id:e};var r={$pageview_id:e,$prev_pageview_id:i.pageViewId},s=this._instance.scrollManager.getContext();if(s&&!this._instance.config.disable_scroll_properties){var n=s.maxScrollHeight,o=s.lastScrollY,a=s.maxScrollY,l=s.maxContentHeight,h=s.lastContentY,u=s.maxContentY;if(!(C(n)||C(o)||C(a)||C(l)||C(h)||C(u))){n=Math.ceil(n),o=Math.ceil(o),a=Math.ceil(a),l=Math.ceil(l),h=Math.ceil(h),u=Math.ceil(u);var d=n>1?K(o/n,0,1,ue):1,v=n>1?K(a/n,0,1,ue):1,c=l>1?K(h/l,0,1,ue):1,_=l>1?K(u/l,0,1,ue):1;r=nr(r,{$prev_pageview_last_scroll:o,$prev_pageview_last_scroll_percentage:d,$prev_pageview_max_scroll:a,$prev_pageview_max_scroll_percentage:v,$prev_pageview_last_content:h,$prev_pageview_last_content_percentage:c,$prev_pageview_max_content:u,$prev_pageview_max_content_percentage:_})}}return i.pathname&&(r.$prev_pageview_pathname=i.pathname),i.timestamp&&(r.$prev_pageview_duration=(t.getTime()-i.timestamp.getTime())/1e3),r}},Xr=["flags","surveys"],Qr={[Le]:{exposure:"hidden"},[We]:{exposure:"hidden"},[Ge]:{exposure:"hidden"},[Ye]:{exposure:"hidden"},[Ve]:{exposure:"hidden"},[Ke]:{exposure:"hidden"},[Me]:{exposure:"event"},[Xe]:{exposure:"hidden"},[si]:{exposure:"hidden"},[Qe]:{exposure:"event"},[Ze]:{exposure:"hidden"},[ti]:{exposure:"event"},[ei]:{exposure:"event"},[ii]:{exposure:"event"},[ri]:{exposure:"hidden"},[ni]:{exposure:"event"},[oi]:{exposure:"hidden"},[ai]:{exposure:"hidden"},[ci]:{exposure:"hidden"},[_i]:{exposure:"event"},[li]:{exposure:"event",shouldSkipFromEventProperties:t=>D(t)},[pi]:{exposure:"event"},[fi]:{exposure:"event"},[gi]:{exposure:"event"},[mi]:{exposure:"event"},[bi]:{exposure:"hidden"},[Ee]:{exposure:"hidden",storageGroup:"flags"},[be]:{exposure:"hidden",storageGroup:"flags"},[me]:{exposure:"hidden"},[ye]:{exposure:"hidden",storageGroup:"flags"},[Oe]:{exposure:"hidden",storageGroup:"flags"},[Se]:{exposure:"hidden",storageGroup:"flags",volatile:!0},[xe]:{exposure:"hidden",storageGroup:"flags"},[Ie]:{exposure:"hidden"},[Ce]:{exposure:"hidden"},[ke]:{exposure:"hidden"},[Te]:{exposure:"hidden"},[De]:{exposure:"hidden",storageGroup:"surveys"},[Ne]:{exposure:"hidden",storageGroup:"surveys",volatile:!0},[Fe]:{exposure:"event"},[Be]:{exposure:"hidden"},[Ue]:{exposure:"hidden"},[wi]:{exposure:"hidden"},[$i]:{exposure:"hidden"},[Si]:{exposure:"hidden"},[xi]:{exposure:"event"},[Ei]:{exposure:"event"},[Ti]:{exposure:"event"},[ki]:{exposure:"event"},[Pe]:{exposure:"hidden"},[Re]:{exposure:"hidden"},[yi]:{exposure:"event"},[we]:{exposure:"hidden"},[$e]:{exposure:"hidden",storageGroup:"flags",volatile:!0},[Pi]:{exposure:"hidden"},[Ri]:{exposure:"hidden"},[Oi]:{exposure:"hidden"},[Ii]:{exposure:"hidden"},[Ci]:{exposure:"hidden"},[Ai]:{exposure:"hidden"},[Mi]:{exposure:"hidden"},[hi]:{exposure:"event"},[ui]:{exposure:"event"},[di]:{exposure:"event"},[vi]:{exposure:"event"},[Fi]:{exposure:"event"},[Bi]:{exposure:"event"},[Ui]:{exposure:"hidden"},[Li]:{exposure:"hidden"},[ji]:{exposure:"hidden"},[zi]:{exposure:"hidden"},[qi]:{exposure:"hidden"},[Wi]:{exposure:"hidden"},[Gi]:{exposure:"hidden"},[Hi]:{exposure:"hidden"},[Vi]:{exposure:"hidden"},[Ji]:{exposure:"event"}},Zr=[["$posthog_sr_group_event_trigger_",{exposure:"hidden"}],["$posthog_sr_group_url_trigger_",{exposure:"hidden"}],["$posthog_sr_group_sampling_",{exposure:"hidden"}]],ts=t=>{var e=Qr[t];if(e)return e;for(var i of Zr){var r=i[1];if(0===t.indexOf(i[0]))return r}};function es(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(t){return}}var is=t=>{var e,i=null==(e=typeof document>"u"?void 0:document)?void 0:e.createElement("a");return C(i)?null:(i.href=t,i)},rs=(t,e)=>{try{var i;return JSON.stringify(t,(t,e)=>z(e)?(null!=i||(i=/* @__PURE__ */new WeakMap),i.has(e)||i.set(e,lr(e)),i.get(e)):"bigint"==typeof e?e.toString():e,e)}catch(e){return s=[],null!==(r=JSON.stringify(t,function(t,e){if("bigint"==typeof e)return e.toString();if("function"!=typeof e&&"symbol"!=typeof e){if(e instanceof Error)return{name:e.name,message:e.message,stack:e.stack};if(e&&"object"==typeof e){for(;s.length>0&&s[s.length-1]!==this;)s.pop();if(s.includes(e))return"[Circular]";s.push(e)}return e}}))&&void 0!==r?r:"null"}var r,s},ss=function(t,e){for(var i,r=((t.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),s=0;r.length>s;s++){var n=r[s].split(/=(.*)/);if(n[0]===e){i=n;break}}if(!P(i)||2>i.length)return"";var o=i[1].replace(/\+/g," ");try{o=decodeURIComponent(o)}catch(t){ue.error("Skipping decoding for malformed query param: "+o)}return o},ns=function(t,e,i){if(!t||!e||!e.length)return t;for(var r=t.split(/#(.*)/),s=r[1],n=(r[0]||"").split(/\?(.*)/),o=n[1],a=n[0],l=(o||"").split("&"),h=[],u=0;l.length>u;u++){for(var d=l[u].split("?"),v=0;d.length>v&&!e.includes(d[v].split("=")[0]);)v++;h.push(d.length>v?d.slice(0,v).concat(d[v].split("=")[0]+"="+i).join("?"):l[u])}var c=a;return null!=o&&(c+="?"+h.join("&")),null!=s&&(c+="#"+s),c},os=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","oppref","bfcid","irclid","_kx"],as=/* @__PURE__ */(()=>["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid",...os])(),ls="<masked>",hs=["li_fat_id"];function us(t,e){var i=as.concat(e||[]),r={};return sr(i,function(e){var i=ss(t,e);r[e]=i||null}),r}function ds(t){var e=function(t){return t?0===t.search("https?://(.*)google.([^/?]*)")?"google":0===t.search("https?://(.*)bing.com")?"bing":0===t.search("https?://(.*)yahoo.com")?"yahoo":0===t.search("https?://(.*)duckduckgo.com")?"duckduckgo":null:null}(t),i="yahoo"!=e?"q":"p",r={};if(!D(e)){r.$search_engine=e;var s=l?ss(l.referrer,i):"";s.length&&(r.ph_keyword=s)}return r}function vs(){return navigator.language||navigator.userLanguage}var cs="$direct";function _s(){return(null==l?void 0:l.referrer)||cs}function ps(t,e,i){var r;void 0===i&&(i=!1);var s=t?[...os,...e||[]]:[],n=null==(r=i?Zt(null==h?void 0:h.href):null==h?void 0:h.href)?void 0:r.substring(0,1e3);return{r:_s().substring(0,1e3),u:n?ns(n,s,ls):void 0}}function fs(t,e){var i;void 0===e&&(e=!1);var r=t.r,s=t.u,n=e?Zt(s):s,o={$referrer:r,$referring_domain:null==r?void 0:r==cs?cs:null==(i=is(r))?void 0:i.host};if(n){o.$current_url=n;var a=is(n);o.$host=null==a?void 0:a.host,o.$pathname=null==a?void 0:a.pathname,nr(o,us(n))}return r&&nr(o,ds(r)),o}function gs(){try{/* @__PURE__ */
|
|
2
2
|
return(new Date).getTimezoneOffset()}catch(t){return}}var ms={flags:$e,surveys:Ne},bs=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"],ys=t=>t+"_cookie_identity_change_pending",ws=t=>{var e="",i=0;for(var r of t){var s=encodeURIComponent(JSON.stringify(r).slice(1,-1)).length;if(i+s>1e3)break;e+=r,i+=s}return e},$s="main",Ss=[Ee,be,ye,Oe,Se,$e,xe,ke],xs=t=>-1!==Ss.indexOf(t),Es=[Ve,Ke],Ts=t=>-1!==Es.indexOf(t),ks=(t,e)=>{try{return JSON.stringify(t)===JSON.stringify(e)}catch(i){return t===e}},Ps=t=>{if(!t)return{};var e=JSON.parse(t);return O(e)?e:{}},Rs=(t,e)=>{sr(t,(i,r)=>{var s=ts(r);s&&"event"!==s.exposure||{}.hasOwnProperty.call(e,r)||delete t[r]})},Os=class{constructor(t,e,r,s){if(void 0===r&&(r=!0),void 0===s&&(s=!t.cookieless_mode),this.Ql={},this.Jl=!1,this.Zl=!1,this.Kl=!1,this.Yl=!1,this.Xl=!1,this.tu=/* @__PURE__ */new Map,this.eu=!1,this.iu=!1,this.nu=!1,this.su=/* @__PURE__ */new Set,this.ru=/* @__PURE__ */new Set,this.Fr=t,this.ou=r,this.props={},this.au=void 0,this.lu=(t=>{var e="";return t.token&&(e=t.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),t.persistence_name?"ph_"+t.persistence_name:"ph_"+e+"_posthog"})(t),this.fi=t.disable_persistence||!!e,this.Ll=this.uu(t),this.Kl=this.cu(t),this.load(s),this.hu(),t.debug&&ue.info("Persistence loaded",t.persistence,i({},this.props)),this.update_config(t,t,e),this.save(),n){var o=()=>this.flush();dr(n,"beforeunload",o,{capture:!1}),dr(n,"pagehide",o,{capture:!1}),this.du=t=>{if(this.Jl&&(!t.storageArea||t.storageArea===(null==n?void 0:n.localStorage))&&t.key)if(t.key!==this.lu){if(this.Kl){var e=Xr.find(e=>t.key===this.vu(e));e&&this.fu(t.key,e)}}else this.fu(t.key,$s)},dr(n,"storage",this.du)}}markCrossTabFeatureFlagChanges(t){Object.entries(t).forEach(t=>{var e=t[0],i=t[1],r=this.tu.get(e);if(xs(e)&&!0!==r)if(!0!==i){var s=new Set(r||[]);i.forEach(t=>s.add(t)),s.size&&this.pu(e,s)}else this.pu(e,!0)})}onCrossTabFeatureFlagChange(t){return this.ru.add(t),()=>this.ru.delete(t)}destroy(){this.du&&n&&(n.removeEventListener("storage",this.du),this.du=void 0),this.ru.clear()}fu(t,e,i){if(void 0===i&&(i=!0),this.fi)return!1;var r,s;try{if(s=Tr.Lt(t),D(s)){var n=this.gu(e);return n.storageValue=null,e!==$s&&(n.persisted=!1),!1}r=Ps(s)}catch(t){return!1}var o=e===$s?r:Tr.Ft(this.lu);if(o&&this.mu(o))return!1;var a=this.yu(r,e,i);return e===$s&&this.Kl&&!ks(this.bu().main,r)||this._u(r,e,!0,s),a}mu(t){var e=this.props[je],i=t[je];return!C(e)&&!C(i)&&e!==i}_u(t,e,i,r){var s=this.gu(e);s.storageValue=r,e!==$s&&(s.persisted=i);try{s.fingerprint=this.wu(t,e)}catch(t){s.fingerprint=void 0}}yu(t,e,i){var r=!1;return Ss.forEach(i=>{var s,n=null==(s=ts(i))?void 0:s.storageGroup;if(!(e===$s&&this.Kl&&n||e!==$s&&n!==e)){var o=i in t,a=this.ku(i,o?t[i]:void 0),l=this.tu.has(i)?i in this.props:o;l===i in this.props&&ks(a,this.props[i])||(l?this.Su(i,a,!1):this.xu(i,!1),r=!0)}}),r&&i&&this.ru.forEach(t=>t()),r}$u(){if(!this.Jl)return!1;try{this.nu=!1;var t,e=Tr.Lt(this.lu),i=this.gu($s),r=!1,s=!1;if(e!==i.storageValue)if(D(e))i.storageValue=null;else{if(t=Ps(e),this.nu=!this.iu&&this.mu(t),this.nu)return!1;s=this.yu(t,$s,!1),!this.Kl||ks(this.bu().main,t)?this._u(t,$s,!0,e):i.storageValue=e,r=!0}return this.Kl&&Xr.forEach(e=>{var i=Tr.Lt(this.vu(e)),n=this.gu(e),o=t||{},a=r&&Ss.some(t=>{var i;return(null==(i=ts(t))?void 0:i.storageGroup)===e&&t in o});if(i!==n.storageValue||a){if(D(i))return n.storageValue=null,n.persisted=!1,void(a&&(s=this.yu(o,e,!1)||s));var l=Ps(i);s=this.yu(l,e,!1)||s,this._u(l,e,!0,i)}}),s}catch(t){return!1}}pu(t,e){this.tu.set(t,e);var i=ts(t);null!=i&&i.volatile||(this.gu((this.Kl?null==i?void 0:i.storageGroup:void 0)||$s).fingerprint=void 0,this.Cu(t))}Tu(){Ss.forEach(t=>this.tu.set(t,!0))}hu(){if(this.Jl)try{var t=Tr.Lt(this.lu),e=Ps(t);this.gu($s).storageValue=t,Ss.forEach(t=>{var i,r=this.Kl?null==(i=ts(t))?void 0:i.storageGroup:void 0,s=r?Tr.Lt(this.vu(r)):null;if(r){var n=this.gu(r);n.storageValue=s,n.persisted=!D(s)}var o=r&&!D(s)?Ps(s):e;t in this.props?this.Iu(t,o[t],this.props[t]):t in o&&this.pu(t,!0)})}catch(t){}}ku(t,e){var r=this.tu.get(t);if(!r)return e;if(!0===r)return this.props[t];if("$active_feature_flags"===t){var s=new Set(P(e)?e:[]),n=new Set(P(this.props[t])?this.props[t]:[]);return r.forEach(t=>n.has(t)?s.add(t):s.delete(t)),Array.from(s)}var o=O(e)?i({},e):{},a=O(this.props[t])?this.props[t]:{};return r.forEach(t=>{t in a?o[t]=a[t]:delete o[t]}),o}Iu(t,e,i){if(xs(t)){var r=this.tu.get(t);if(!0!==r){var s=e;if(this.Jl)try{var n,o=this.Kl?null==(n=ts(t))?void 0:n.storageGroup:void 0,a=o?this.vu(o):this.lu;s=Ps(Tr.Lt(a))[t]}catch(t){}var l=new Set(r||[]);if("$active_feature_flags"===t){if(!C(e)&&!P(e)||!C(s)&&!P(s)||!P(i))return void this.pu(t,!0);var h=new Set(e||[]),u=new Set(s||[]),d=new Set(i);
|
|
3
3
|
/* @__PURE__ */new Set([...h,...d]).forEach(t=>{h.has(t)!==d.has(t)&&l.add(t)}),l.forEach(t=>{u.has(t)===d.has(t)&&l.delete(t)})}else{if(!O(i))return void(ks(s,i)?this.tu.delete(t):this.pu(t,!0));if(!C(e)&&!O(e)||C(e)&&I(i)&&C(s))return void this.pu(t,!0);var v=O(e)?e:{},c=O(s)?s:{};
|
|
4
4
|
/* @__PURE__ */new Set([...Object.keys(v),...Object.keys(i)]).forEach(t=>{t in v==t in i&&ks(v[t],i[t])||l.add(t)}),l.forEach(t=>{t in c==t in i&&ks(c[t],i[t])&&l.delete(t)})}l.size?this.pu(t,l):this.tu.delete(t)}}}Mu(){var t,e=null==(t=this.Fr)?void 0:t.persistence_save_debounce_ms;return F(e)&&e>0?e:0}Eu(t){if(this.Fr.cookieWinsOnConflict&&"localstorage+cookie"===this.Fr.persistence.toLowerCase())if(t)try{var e=Cr(t,this.Fr.cookie_persisted_properties||[]),i=Mr(e,this.Fr.cookie_persisted_properties||[]),r=JSON.stringify(e)+"|"+JSON.stringify(i),s=xr.Lt(this.lu)||void 0;s&&Nr(this.lu,s)===r&&(this.Au=r,this.Ru=s)}catch(t){}else try{var n=xr.Lt(this.lu)||void 0;this.Au=n?Nr(this.lu,n):void 0,this.Ru=n}catch(t){}}syncCookieProperties(){return this.Pu(this.Fr)}Pu(t,e){if(void 0===e&&(e=!1),this.fi&&!e||this.Xl||!t.cookieWinsOnConflict||"localstorage+cookie"!==t.persistence.toLowerCase())return!1;var i;try{i=xr.Lt(this.lu)||void 0}catch(t){}if(!i||i===this.Ru)return!1;var r,s=Nr(this.lu,i);try{r=Ir(JSON.parse(i))}catch(t){return!1}if((xr.Lt(this.lu)||void 0)!==i)return!1;this.Au=s,this.Ru=i;var n=Dr(this.lu,i),o=[...Pr,...n.properties],a={};if(Object.keys(r).forEach(t=>{var e=r[t];(C(e)||D(e)||""===e||"$user_state"===t&&"anonymous"!==e&&"identified"!==e)&&(a[t]=!0,delete r[t])}),I(r))return!1;var l="distinct_id"in r||"anonymous"===r.$user_state||"identified"===r.$user_state,h=this.props,u=h[je],d=h[Pi],v=nr({},h);[...Pr,...t.cookie_persisted_properties||[]].forEach(t=>{if(-1!==o.indexOf(t)&&!(t in r)&&!a[t]&&(l||"distinct_id"!==t&&"$user_state"!==t)){var e=v[t];(n.isValid||-1===Pr.indexOf(t)||!1!==e&&0!==e)&&delete v[t]}}),this.props=nr(v,r),Ss.forEach(t=>{var e=t in this.props;t in h===e&&ks(h[t],this.props[t])||(e?this.Iu(t,h[t],this.props[t]):this.pu(t,!0))}),!l||"$user_state"in r||"$user_state"in this.props||this.Su(Pi,Ki);var c=this.props[je],_=this.props[Pi];return!l||c===u&&_===d||(this.iu=!0,this.Yl=!0,Lr.$t(ys(this.lu),!0),this.xu(ke),this.xu(be),this.xu(Ee),this.xu(ye),this.xu(Oe),this.xu(Se),this.xu($e),this.xu(we),this.xu(Pe),"anonymous"!==_||"identified"!==d&&"anonymous"!==r.$user_state&&(C(u)||c===u)||(Rs(this.props,r),this.xu(Te)),"identified"===_?this.props.$user_id=c:delete this.props.$user_id,this.xu(We)),!0}consumeCookieIdentityChange(){var t=ys(this.lu),e=this.Yl||!!Lr.Lt(t);return this.Yl=!1,e&&Lr.Dt(t),e}Ou(t){return void 0===t&&(t=!1),!(this.Xl||this.fi&&!t||!this.Fr.cookieWinsOnConflict||"localstorage+cookie"!==this.Fr.persistence.toLowerCase()||(this.Xl=!0,0))}Fu(){this.Xl&&(C(this.Du)||(clearTimeout(this.Du),this.Du=void 0),delete this.Ql[$s],this.Lu(!0))}Nu(t){if(void 0===t&&(t=!0),this.Xl)try{t?this.Fu():C(this.Du)||(clearTimeout(this.Du),this.Du=void 0)}finally{this.Xl=!1}}isDisabled(){return!!this.fi}uu(t){-1===bs.indexOf(t.persistence.toLowerCase())&&(ue.critical("Unknown persistence type "+t.persistence+"; falling back to localStorage+cookie"),t.persistence="localStorage+cookie");var e,r=function(t,e,r){void 0===t&&(t=[]),void 0===e&&(e=!1),void 0===r&&(r=()=>!1);var s=[...Pr,...t];return i({},Tr,{ju(t){return[xr.Lt(t),xr.Lt(Rr(t)),Tr.Lt(t)].join("\0")},Ft(t){try{var i,n={};try{i=xr.Lt(t)||void 0,n=i?Ir(JSON.parse(i)):{}}catch(t){}var o,a=JSON.parse(Tr.Lt(t)||"{}");if(e){var l=Dr(t,i),h=[...Pr,...l.properties],u={};Object.keys(n).forEach(t=>{var e=n[t];D(e)||""===e||"$user_state"===t&&"anonymous"!==e&&"identified"!==e||(u[t]=e)});var d="distinct_id"in u||"anonymous"===u.$user_state||"identified"===u.$user_state;if(Object.keys(u).length>0){var v,c=a[je],_=null!==(v=a.$user_state)&&void 0!==v?v:"anonymous";s.forEach(t=>{if(-1!==h.indexOf(t)&&!(t in n)&&(d||"distinct_id"!==t&&"$user_state"!==t)){var e=a[t];(l.isValid||-1===Pr.indexOf(t)||!1!==e&&0!==e)&&delete a[t]}}),!d||"$user_state"in n||"$user_state"in a||(a[Pi]=Ki),!d||("distinct_id"in u?u[je]:a[je])===c&&("$user_state"in u?u[Pi]:a[Pi])===_||(kr.forEach(t=>delete a[t]),"identified"===u.$user_state&&"distinct_id"in u?a.$user_id=u[je]:delete a.$user_id,"identified"!==u.$user_state&&(delete a[yi],delete a[Te]),delete a.__alias)}o=nr(a,u)}else o=nr(n,a);return r()||Tr.$t(t,o),o}catch(t){}return null},$t(i,r,s,n,o,a){var l=Tr.$t(i,r,void 0,void 0,a);try{var h=Cr(r,t);if(Object.keys(h).length){if(e){var u=Rr(i),d=Mr(h,t);if(xr.$t(u,d,s,n,o,a),xr.Lt(u)!==JSON.stringify(d)){xr.Dt(u,n);var v=Cr(r);return xr.$t(i,v,s,n,o,a),l}}xr.$t(i,h,s,n,o,a)}}catch(t){Tr.Pt(t)}return l},Dt(t,e){try{null==n||n.localStorage.removeItem(t),xr.Dt(t,e),xr.Dt(Rr(t),e)}catch(t){Tr.Pt(t)}}})}(t.cookie_persisted_properties||[],t.cookieWinsOnConflict,()=>!!this.fi),s=!1,o=!1,a=t.persistence.toLowerCase();return"localstorage"===a&&Tr.Ot()?(e=Tr,o=!0):"localstorage+cookie"===a&&r.Ot()?(e=r,o=!0,s=!0):"sessionstorage"===a&&Lr.Ot()?e=Lr:"memory"===a?e=Br:"cookie"===a&&xr.Ot()?(e=xr,s=!0):r.Ot()?(e=r,o=!0,s=!0):xr.Ot()?(e=xr,s=!0):e=Br,this.Jl=o,this.Zl=s,e}vu(t){return this.lu+"__"+t}cu(t){return this.Jl&&!!t.split_storage}properties(){var t={};return sr(this.props,(e,i)=>{var r=ts(i);if(!r||"event"===r.exposure){if(null!=r&&null!=r.shouldSkipFromEventProperties&&r.shouldSkipFromEventProperties(e))return;t[i]=e}}),t}load(t){if(void 0===t&&(t=!1),!this.fi||t){var e=this.Fr.cookieWinsOnConflict&&"localstorage+cookie"===this.Fr.persistence.toLowerCase(),i=e?Tr.Ft(this.lu):null,r={};if(e)try{sr(r=Ir(xr.Ft(this.lu)),(t,e)=>{(C(t)||D(t)||""===t)&&delete r[e]})}catch(t){}var s=this.Ll.Ft(this.lu);if(s&&(this.props=nr({},s)),this.Kl&&this.qu(),e&&s){var n,o,a=null==i?void 0:i[je],l=null!==(n=null==i?void 0:i.$user_state)&&void 0!==n?n:"anonymous",h=s[je],u=null!==(o=s.$user_state)&&void 0!==o?o:"anonymous";if(h!==a||u!==l){this.Yl=!0,this.fi||Lr.$t(ys(this.lu),!0);var d=nr({},this.props);kr.forEach(t=>delete d[t]),"anonymous"!==u||"identified"!==l&&"anonymous"!==r.$user_state&&(C(a)||h===a)||(Rs(d,r),delete d[Te]),this.props=d;var v=/* @__PURE__ */new Set;kr.forEach(t=>{var e,i=null==(e=ts(t))?void 0:e.storageGroup;i&&v.add(i)}),v.forEach(t=>{if(!this.fi){var e={};sr(this.props,(i,r)=>{var s;(null==(s=ts(r))?void 0:s.storageGroup)===t&&(e[r]=i)}),I(e)?(Tr.Dt(this.vu(t)),this.Ql[t]={}):Tr.$t(this.vu(t),e)&&(this.Ql[t]={persisted:!0,fingerprint:this.wu(e,t)})}})}}Lr.Lt(ys(this.lu))&&(this.Yl=!0)}}qu(){for(var t of Xr){var e=Tr.Ft(this.vu(t));if(e&&!I(e)){var i=this.gu(t);i.persisted=!0,this.Bu(t)||(i.fingerprint=this.wu(e,t)),this.zu(t,e)||nr(this.props,e)}}}Bu(t){return Object.keys(this.props).some(e=>{var i;return(null==(i=ts(e))?void 0:i.storageGroup)===t})}zu(t,e){var i=ms[t];if(!i)return!1;var r=e[i],s=this.props[i];return F(r)&&F(s)&&s>r}refreshKey(t){this.Hu([t])}Hu(t){if(!this.fi){var e,i=!1,r=()=>(i||(e=this.Ll.Ft(this.lu),i=!0),e);t.forEach(t=>{var e;if(!this.su.has(t)){var i=this.Kl?null==(e=ts(t))?void 0:e.storageGroup:void 0,s=i?Tr.Ft(this.vu(i)):r();if(s&&t in s)this.Su(t,s[t],!1);else{if(i){var n=r();if(n&&t in n)return void this.Su(t,n[t],!1)}this.xu(t,!1)}}})}}refreshMetaIdentifiers(){if(!this.fi){var t=this.Uu();(C(t)||t!==this.Wu)&&(this.Hu(Es),this.Vu(t))}}Vu(t){void 0===t&&(t=this.Uu()),this.Wu=0===this.su.size?t:void 0}Uu(){var t=this.Ll.ju?this.Ll.ju(this.lu):this.Ll.Lt(this.lu);return A(t)?t:void 0}save(){if(!this.fi){var t=this.Mu();t>0?C(this.Du)&&(this.Du=setTimeout(()=>{this.Du=void 0,this.Lu()},t)):this.Lu()}}flush(){C(this.Du)||(clearTimeout(this.Du),this.Du=void 0,this.Lu())}Lu(t){if(void 0===t&&(t=!1),!(this.fi||this.Xl&&!t)){t||(this.syncCookieProperties(),this.Fr.cookieWinsOnConflict&&"localstorage+cookie"===this.Fr.persistence.toLowerCase()||this.refreshMetaIdentifiers());var e=!t&&!this.eu;e||(this.nu=!1);var i=!!e&&this.$u();if(this.nu)this.Fr.debug&&ue.warn("skipping persistence write because storage belongs to a different distinct ID");else{if(this.Kl)return this.Gu(),void(i&&this.ru.forEach(t=>t()));var r=this.Qu(this.Ll,this.lu,this.props,$s);"written"===r&&this.Eu(this.props),"failed"!==r&&(this.tu.clear(),this.iu=!1,this.su.clear()),"written"===r&&this.Vu(),i&&this.ru.forEach(t=>t())}}}Gu(){var t=this,e=this.bu(),i=e.main,r=e.groups,s=this.Qu(this.Ll,this.lu,i,$s);"written"===s&&this.Eu(i),"failed"!==s&&(this.iu=!1,this.su.clear(),Ss.forEach(t=>{var e;null!=(e=ts(t))&&e.storageGroup||this.tu.delete(t)})),"written"===s&&this.Vu();var n=function(e){var i,s=r[e];if(I(s)&&(null==(i=t.Ql[e])||!i.persisted))return Ss.forEach(i=>{var r;(null==(r=ts(i))?void 0:r.storageGroup)===e&&t.tu.delete(i)}),1;var n=t.Qu(Tr,t.vu(e),s,e);"failed"!==n&&Ss.forEach(i=>{var r=ts(i);(null==r?void 0:r.storageGroup)!==e||"written"!==n&&r.volatile||t.tu.delete(i)})};for(var o of Xr)if(n(o))continue}bu(){var t={},e={flags:{},surveys:{}};return sr(this.props,(i,r)=>{var s,n=null==(s=ts(r))?void 0:s.storageGroup;n?e[n][r]=i:t[r]=i}),{main:t,groups:e}}wu(t,e){if(e===$s)return JSON.stringify(t)+"|"+this.Ju+"|"+this.Zu+"|"+this.Ku;var i={};return sr(t,(t,e)=>{var r;i[e]=null!=(r=ts(e))&&r.volatile?"__volatile__":t}),JSON.stringify(i)}Qu(t,e,i,r){var s,n=this.gu(r);if(r!==$s&&!n.dirty&&!C(n.fingerprint))return"skipped";try{if((s=this.wu(i,r))===n.fingerprint)return n.dirty=!1,"skipped"}catch(t){s=void 0}return t.$t(e,i,this.Ju,this.Zu,this.Ku,this.Fr.debug)?(n.dirty=!1,r!==$s&&(n.persisted=!0),C(s)||(n.fingerprint=s),this.Jl&&(n.storageValue=Tr.Lt(e)),"written"):(this.Fr.debug&&ue.warn('failed to persist storage entry "'+e+'"; will retry on next save'),"failed")}remove(t){var e=(void 0===t?{}:t).keepGroupEntries,i=void 0!==e&&e;if(this.Tu(),C(this.Du)||(clearTimeout(this.Du),this.Du=void 0),this.Ll.Dt(this.lu,!1),this.Ll.Dt(this.lu,!0),!i&&this.ou)for(var r of Xr)Tr.Dt(this.vu(r));i?delete this.Ql[$s]:this.Ql={},this.Au=void 0,this.Ru=void 0}clear(){this.remove(),this.props={}}register_once(t,e,i){if(O(t)){this.syncCookieProperties(),C(e)&&(e="None"),this.Ju=C(i)?this.Yu:i;var r=!1;if(sr(t,(t,i)=>{this.props.hasOwnProperty(i)&&this.props[i]!==e||(this.Su(i,t),r=!0)}),r)return this.save(),!0}return!1}register(t,e){if(O(t)){this.syncCookieProperties(),this.Ju=C(e)?this.Yu:e;var i=!1;if(sr(t,(e,r)=>{t.hasOwnProperty(r)&&(this.props[r]!==e||O(e)||P(e))&&(this.Su(r,e),i=!0)}),i)return this.save(),!0}return!1}unregister(t){this.syncCookieProperties();var e="string"==typeof t?[t]:t,i=!1;for(var r of e)r in this.props&&(this.xu(r),i=!0);i&&this.save()}update_campaign_params(){var t=null==l?void 0:l.URL;if(t!==this.au){var e=function(t,e,i){if(!l)return{};var r,s=e?[...os,...i||[]]:[],n=us(ns(l.URL,s,ls),t);return nr((r={},sr(hs,function(t){var e=_r(t);r[t]=e||null}),r),n)}(this.Fr.custom_campaign_params,this.Fr.mask_personal_data_properties,this.Fr.custom_personal_data_properties),i=!I(ar(e));return i&&this.register(e),this.au=t,i?e:void 0}}update_search_keyword(){var t;this.register((t=null==l?void 0:l.referrer)?ds(t):{})}update_referrer_info(){var t;this.register_once({$referrer:_s(),$referring_domain:null!=l&&l.referrer&&(null==(t=is(l.referrer))?void 0:t.host)||cs},void 0)}set_initial_person_info(){if(!this.props.$initial_campaign_params&&!this.props.$initial_referrer_info){var t=ps(this.Fr.mask_personal_data_properties,this.Fr.custom_personal_data_properties,this.Fr.disable_capture_url_hashes);this.register_once({[Ai]:this.Zl?{r:ws(t.r),u:t.u?ws(t.u):void 0}:t},void 0)}}get_initial_props(){var t={};sr([Ci,Ii],e=>{var i=this.props[e];i&&sr(i,function(e,i){t["$initial_"+x(i)]=e})});var e=this.props[Ai];return e&&nr(t,function(t,e){void 0===e&&(e=!1);var i=fs(t,e),r={};return sr(i,function(t,e){r["$initial_"+x(e)]=t}),r}(e,this.Fr.disable_capture_url_hashes)),t}safe_merge(t){return sr(this.props,function(e,i){i in t||(t[i]=e)}),t}update_config(t,e,r){var s=t.persistence!==e.persistence,n=!((t,e)=>{if(t.length!==e.length)return!1;var i=[...t].sort(),r=[...e].sort();return i.every((t,e)=>t===r[e])})(t.cookie_persisted_properties||[],e.cookie_persisted_properties||[]),o=s||n,a=t.cookieWinsOnConflict!==e.cookieWinsOnConflict,l=t.disable_persistence||!!r,h=!!this.fi&&!l;l||this.Pu(e,h),this.Fr=t,!l&&(s||n||a)&&(this.Au=void 0,this.Ru=void 0,this.Pu(i({},t,{cookie_persisted_properties:e.cookie_persisted_properties}),h));var u=o||a?this.uu(t):this.Ll;this.Xu();var d=this.cu(t),v=o||d!==this.Kl,c=!l&&(v||t.cross_subdomain_cookie!==this.Zu||t.secure_cookie!==this.Ku)&&this.Ou(h);this.eu=v;try{if(this.Yu=this.Ju=t.cookie_expiration,this.set_disabled(l),this.set_cross_subdomain(t.cross_subdomain_cookie),this.set_secure(t.secure_cookie),v){var _=this.props;this.clear(),this.Ll=u,this.Kl=d,this.props=_,this.save()}else a&&(this.Ll=u,l||(delete this.Ql[$s],this.Lu()))}finally{this.eu=!1,c&&this.Nu()}}Xu(){var t=this.props[Ai];if(this.Zl&&O(t)&&"string"==typeof t.r){var e=ws(t.r),r="string"==typeof t.u?ws(t.u):t.u;e===t.r&&r===t.u||this.Su(Ai,i({},t,{r:e,u:r}))}}set_disabled(t){this.fi=t,this.fi?this.remove():this.save()}set_cross_subdomain(t){t!==this.Zu&&(this.Zu=t,this.remove({keepGroupEntries:!0}),this.save())}set_secure(t){t!==this.Ku&&(this.Ku=t,this.remove({keepGroupEntries:!0}),this.save())}set_event_timer(t,e){var i=this.props.__timers||{};i[t]=e,this.Su(Ye,i),this.save()}remove_event_timer(t){var e=this.props.__timers||{},i=e[t];return C(i)||(delete e[t],this.Su(Ye,e),this.save()),i}get_property(t){return this.props[t]}set_property(t,e){this.Su(t,e),this.save()}Su(t,e,i){var r;void 0===i&&(i=!0);var s=this.props[t];this.props[t]=e,i&&("distinct_id"!==t&&"$user_state"!==t||s===e||(this.iu=!0),Ts(t)&&!ks(s,e)&&this.su.add(t),this.Iu(t,s,e),null!=(r=ts(t))&&r.volatile||this.Cu(t))}xu(t,e){void 0===e&&(e=!0),delete this.props[t],e&&(xs(t)&&this.pu(t,!0),Ts(t)&&this.su.add(t),this.Cu(t))}Cu(t){var e,i=null==(e=ts(t))?void 0:e.storageGroup;i&&(this.gu(i).dirty=!0)}gu(t){return this.Ql[t]||(this.Ql[t]={})}},Is={GZipJS:"gzip-js",Base64:"base64"},Cs={Activation:"events",Cancellation:"cancelEvents"},As={Button:"button",Tab:"tab",Selector:"selector"},Ms={TopLeft:"top_left",TopRight:"top_right",TopCenter:"top_center",MiddleLeft:"middle_left",MiddleRight:"middle_right",MiddleCenter:"middle_center",Left:"left",Center:"center",Right:"right",NextToTrigger:"next_to_trigger"},Ds={Top:"top",Left:"left",Right:"right",Bottom:"bottom"},Ns={Popover:"popover",API:"api",Widget:"widget",ExternalSurvey:"external_survey"},Fs={Open:"open",MultipleChoice:"multiple_choice",SingleChoice:"single_choice",Rating:"rating",Link:"link"},Bs={NextQuestion:"next_question",End:"end",ResponseBased:"response_based",SpecificQuestion:"specific_question"},Us={Once:"once",Recurring:"recurring",Always:"always"},Ls={SHOWN:"survey shown",DISMISSED:"survey dismissed",SENT:"survey sent",ABANDONED:"survey abandoned"},js={SURVEY_ID:"$survey_id",SURVEY_NAME:"$survey_name",SURVEY_RESPONSE:"$survey_response",SURVEY_ITERATION:"$survey_iteration",SURVEY_ITERATION_START_DATE:"$survey_iteration_start_date",SURVEY_PARTIALLY_COMPLETED:"$survey_partially_completed",SURVEY_SUBMISSION_ID:"$survey_submission_id",SURVEY_QUESTIONS:"$survey_questions",SURVEY_COMPLETED:"$survey_completed",PRODUCT_TOUR_ID:"$product_tour_id",SURVEY_LAST_SEEN_DATE:"$survey_last_seen_date",SURVEY_LANGUAGE:"$survey_language"},zs={Popover:"popover",Inline:"inline"};function qs(t){var e=!0;return{dispose(){if(e){e=!1;var i=t();i&&R(i.then)&&i.then(void 0,()=>{})}}}}var Ws={backgroundColor:"#ffffff",textColor:"#1d1f27",buttonColor:"#1d1f27",borderRadius:8,buttonBorderRadius:6,borderColor:"#e5e7eb",fontFamily:"system-ui",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",showOverlay:!0,whiteLabel:!1,dismissOnClickOutside:!0,zIndex:2147483646},Gs={SHOWN:"product tour shown",DISMISSED:"product tour dismissed",COMPLETED:"product tour completed",STEP_SHOWN:"product tour step shown",STEP_COMPLETED:"product tour step completed",BUTTON_CLICKED:"product tour button clicked",STEP_SELECTOR_FAILED:"product tour step selector failed",BANNER_CONTAINER_SELECTOR_FAILED:"product tour banner container selector failed",BANNER_ACTION_CLICKED:"product tour banner action clicked"},Hs={TOUR_ID:"$product_tour_id",TOUR_NAME:"$product_tour_name",TOUR_ITERATION:"$product_tour_iteration",TOUR_RENDER_REASON:"$product_tour_render_reason",TOUR_STEP_ID:"$product_tour_step_id",TOUR_STEP_ORDER:"$product_tour_step_order",TOUR_STEP_TYPE:"$product_tour_step_type",TOUR_DISMISS_REASON:"$product_tour_dismiss_reason",TOUR_BUTTON_TEXT:"$product_tour_button_text",TOUR_BUTTON_ACTION:"$product_tour_button_action",TOUR_BUTTON_LINK:"$product_tour_button_link",TOUR_BUTTON_TOUR_ID:"$product_tour_button_tour_id",TOUR_STEPS_COUNT:"$product_tour_steps_count",TOUR_STEP_SELECTOR:"$product_tour_step_selector",TOUR_STEP_SELECTOR_FOUND:"$product_tour_step_selector_found",TOUR_STEP_ELEMENT_TAG:"$product_tour_step_element_tag",TOUR_STEP_ELEMENT_ID:"$product_tour_step_element_id",TOUR_STEP_ELEMENT_CLASSES:"$product_tour_step_element_classes",TOUR_STEP_ELEMENT_TEXT:"$product_tour_step_element_text",TOUR_ERROR:"$product_tour_error",TOUR_MATCHES_COUNT:"$product_tour_matches_count",TOUR_FAILURE_PHASE:"$product_tour_failure_phase",TOUR_WAITED_FOR_ELEMENT:"$product_tour_waited_for_element",TOUR_WAIT_DURATION_MS:"$product_tour_wait_duration_ms",TOUR_BANNER_SELECTOR:"$product_tour_banner_selector",TOUR_LINKED_SURVEY_ID:"$product_tour_linked_survey_id",USE_MANUAL_SELECTOR:"$use_manual_selector",INFERENCE_DATA_PRESENT:"$inference_data_present",TOUR_LAST_SEEN_DATE:"$product_tour_last_seen_date",TOUR_TYPE:"$product_tour_type"},Vs=de("[RateLimiter]"),Js=class{constructor(t){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=t=>{var e=t.text;if(e&&e.length)try{(JSON.parse(e).quota_limited||[]).forEach(t=>{Vs.info((t||"events")+" is quota limited."),this.serverLimits[t]=/* @__PURE__ */(new Date).getTime()+6e4})}catch(t){return void Vs.warn('could not rate limit - continuing. Error: "'+(null==t?void 0:t.message)+'"',{text:e})}},this.instance=t,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){var t;return(null==(t=this.instance.config.rate_limiting)?void 0:t.events_per_second)||10}get captureEventsBurstLimit(){var t;return Math.max((null==(t=this.instance.config.rate_limiting)?void 0:t.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}get isClientRateLimited(){return 1>this.tc().tokens}clientRateLimitContext(t){var e;void 0===t&&(t=!1);var i=this.tc(),r=1>i.tokens;if(r||t||(i.tokens=Math.max(0,i.tokens-1)),r&&!t){var s=(F(i.dropped)?i.dropped:0)+1;i.dropped=s,!this.lastEventRateLimited&&this.ec(s)&&(i.dropped=0)}return this.lastEventRateLimited=r,null==(e=this.instance.persistence)||e.set_property(Oi,i),{isRateLimited:r,remainingTokens:i.tokens}}tc(){var t,e=this.captureEventsBurstLimit,r=this.captureEventsPerSecond,s=/* @__PURE__ */(new Date).getTime(),n=null==(t=this.instance.persistence)?void 0:t.get_property(Oi),o=n?i({},n):{tokens:e,last:s};return o.tokens+=Math.max(0,s-o.last)/1e3*r,o.last=Math.max(o.last,s),o.tokens>e&&(o.tokens=e),o}nc(t){var e=this.instance.config.property_denylist;return!P(e)||!e.includes(t)}sc(){var t;if(this.nc("$current_url")&&this.nc("$pathname")&&null!=h&&h.pathname)return""+(null!==(t=h.origin)&&void 0!==t?t:"")+h.pathname}ec(t){var e,i,r=this.captureEventsBurstLimit,s=this.captureEventsPerSecond,n=this.sc(),o=this.nc("$session_id")?null==(e=(i=this.instance).get_session_id)?void 0:e.call(i):void 0,a=[t+" event(s) dropped since the last warning",n?"triggered on "+n:void 0,o?"session "+o:void 0].filter(Boolean).join(", ");return!!this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited: "+a+". Config is set to "+s+" events per second and "+r+" events burst limit."},{skip_client_rate_limiting:!0})}isServerRateLimited(t){var e=this.serverLimits[t||"events"]||!1;return!1!==e&&/* @__PURE__ */(new Date).getTime()<e}},Ks=/* @__PURE__ */de("[RemoteConfig]"),Ys=class{constructor(t){this._instance=t}get remoteConfig(){var t;return null==(t=f._POSTHOG_REMOTE_CONFIG)||null==(t=t[this._instance.config.token])?void 0:t.config}rc(t){var e,i;null!=(e=f.__PosthogExtensions__)&&e.loadExternalDependency?null==(i=f.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"remote-config",()=>t(this.remoteConfig)):t()}oc(t){this._instance._send_request({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback:t})}load(){try{if(this.remoteConfig)return Ks.info("Using preloaded remote config",this.remoteConfig),void this.ac(this.remoteConfig);if(this._instance._shouldDisableFlags())return void Ks.warn("Remote config is disabled. Falling back to local config.");this.rc(t=>{if(!t)return Ks.info("No config found after loading remote JS config. Falling back to JSON."),void this.oc(t=>{this.ac(t.json,t)});this.ac(t)})}catch(t){Ks.error("Error loading remote config",t),this.ac()}}ac(t,e){!t&&e&&(0===e.statusCode?e.error||Ks.warn("Failed to fetch remote config from PostHog."):Ks.error("Failed to fetch remote config from PostHog."));try{this._instance.ac(t?{ok:!0,config:t}:{ok:!1})}catch(t){Ks.error("Error applying remote config",t)}if(!1!==(null==t?void 0:t.hasFeatureFlags)&&!this._instance.config.advanced_disable_feature_flags_on_first_load)try{var i;null==(i=this._instance.featureFlags)||i.ensureFlagsLoaded()}catch(t){Ks.error("Error loading feature flags",t)}}},Xs=["fatal","error","warning","log","info","debug"],Qs=Uint8Array,Zs=Uint16Array,tn=Uint32Array,en=new Qs([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]),rn=new Qs([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]),sn=new Qs([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),nn=function(t,e){for(var i=new Zs(31),r=0;31>r;++r)i[r]=e+=1<<t[r-1];var s=new tn(i[30]);for(r=1;30>r;++r)for(var n=i[r];i[r+1]>n;++n)s[n]=n-i[r]<<5|r;return[i,s]},on=nn(en,2),an=on[1];on[0][28]=258,an[258]=28;for(var ln=nn(rn,0)[1],hn=new Zs(32768),un=0;32768>un;++un){var dn=(43690&un)>>>1|(21845&un)<<1;hn[un]=((65280&(dn=(61680&(dn=(52428&dn)>>>2|(13107&dn)<<2))>>>4|(3855&dn)<<4))>>>8|(255&dn)<<8)>>>1}var vn=function(t,e,i){for(var r=t.length,s=0,n=new Zs(e);r>s;++s)++n[t[s]-1];var o,a=new Zs(e);for(s=0;e>s;++s)a[s]=a[s-1]+n[s-1]<<1;if(i){o=new Zs(1<<e);var l=15-e;for(s=0;r>s;++s)if(t[s])for(var h=s<<4|t[s],u=e-t[s],d=a[t[s]-1]++<<u,v=d|(1<<u)-1;v>=d;++d)o[hn[d]>>>l]=h}else for(o=new Zs(r),s=0;r>s;++s)o[s]=hn[a[t[s]-1]++]>>>15-t[s];return o},cn=new Qs(288);for(un=0;144>un;++un)cn[un]=8;for(un=144;256>un;++un)cn[un]=9;for(un=256;280>un;++un)cn[un]=7;for(un=280;288>un;++un)cn[un]=8;var _n=new Qs(32);for(un=0;32>un;++un)_n[un]=5;var pn=/*#__PURE__*/vn(cn,9,0),fn=/*#__PURE__*/vn(_n,5,0),gn=function(t){return(t/8|0)+(7&t&&1)},mn=function(t,e,i){(null==e||0>e)&&(e=0),(null==i||i>t.length)&&(i=t.length);var r=new(t instanceof Zs?Zs:t instanceof tn?tn:Qs)(i-e);return r.set(t.subarray(e,i)),r},bn=function(t,e,i){var r=e/8|0;t[r]|=i<<=7&e,t[r+1]|=i>>>8},yn=function(t,e,i){var r=e/8|0;t[r]|=i<<=7&e,t[r+1]|=i>>>8,t[r+2]|=i>>>16},wn=function(t,e){for(var i=[],r=0;t.length>r;++r)t[r]&&i.push({s:r,f:t[r]});var s=i.length,n=i.slice();if(!s)return[new Qs(0),0];if(1==s){var o=new Qs(i[0].s+1);return o[i[0].s]=1,[o,1]}i.sort(function(t,e){return t.f-e.f}),i.push({s:-1,f:25001});var a=i[0],l=i[1],h=0,u=1,d=2;for(i[0]={s:-1,f:a.f+l.f,l:a,r:l};u!=s-1;)a=i[i[d].f>i[h].f?h++:d++],l=i[h!=u&&i[d].f>i[h].f?h++:d++],i[u++]={s:-1,f:a.f+l.f,l:a,r:l};var v=n[0].s;for(r=1;s>r;++r)n[r].s>v&&(v=n[r].s);var c=new Zs(v+1),_=$n(i[u-1],c,0);if(_>e){r=0;var p=0,f=_-e,g=1<<f;for(n.sort(function(t,e){return c[e.s]-c[t.s]||t.f-e.f});s>r;++r){var m=n[r].s;if(e>=c[m])break;p+=g-(1<<_-c[m]),c[m]=e}for(p>>>=f;p>0;){var b=n[r].s;e>c[b]?p-=1<<e-c[b]++-1:++r}for(;r>=0&&p;--r){var y=n[r].s;c[y]==e&&(--c[y],++p)}_=e}return[new Qs(c),_]},$n=function(t,e,i){return-1==t.s?Math.max($n(t.l,e,i+1),$n(t.r,e,i+1)):e[t.s]=i},Sn=function(t){for(var e=t.length;e&&!t[--e];);for(var i=new Zs(++e),r=0,s=t[0],n=1,o=function(t){i[r++]=t},a=1;e>=a;++a)if(t[a]==s&&a!=e)++n;else{if(!s&&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(s),--n;n>6;n-=6)o(8304);n>2&&(o(n-3<<5|8208),n=0)}for(;n--;)o(s);n=1,s=t[a]}return[i.subarray(0,r),e]},xn=function(t,e){for(var i=0,r=0;e.length>r;++r)i+=t[r]*e[r];return i},En=function(t,e,i){var r=i.length,s=gn(e+2);t[s]=255&r,t[s+1]=r>>>8,t[s+2]=255^t[s],t[s+3]=255^t[s+1];for(var n=0;r>n;++n)t[s+n+4]=i[n];return 8*(s+4+r)},Tn=function(t,e,i,r,s,n,o,a,l,h,u){bn(e,u++,i),++s[256];for(var d=wn(s,15),v=d[0],c=d[1],_=wn(n,15),p=_[0],f=_[1],g=Sn(v),m=g[0],b=g[1],y=Sn(p),w=y[0],S=y[1],x=new Zs(19),E=0;m.length>E;++E)x[31&m[E]]++;for(E=0;w.length>E;++E)x[31&w[E]]++;for(var T=wn(x,7),k=T[0],P=T[1],R=19;R>4&&!k[sn[R-1]];--R);var O,I,C,A,M=h+5<<3,D=xn(s,cn)+xn(n,_n)+o,N=xn(s,v)+xn(n,p)+o+14+3*R+xn(x,k)+(2*x[16]+3*x[17]+7*x[18]);if(D>=M&&N>=M)return En(e,u,t.subarray(l,l+h));if(bn(e,u,1+(D>N)),u+=2,D>N){O=vn(v,c,0),I=v,C=vn(p,f,0),A=p;var F=vn(k,P,0);for(bn(e,u,b-257),bn(e,u+5,S-1),bn(e,u+10,R-4),u+=14,E=0;R>E;++E)bn(e,u+3*E,k[sn[E]]);u+=3*R;for(var B=[m,w],U=0;2>U;++U){var L=B[U];for(E=0;L.length>E;++E)bn(e,u,F[j=31&L[E]]),u+=k[j],j>15&&(bn(e,u,L[E]>>>5&127),u+=L[E]>>>12)}}else O=pn,I=cn,C=fn,A=_n;for(E=0;a>E;++E)if(r[E]>255){var j;yn(e,u,O[257+(j=r[E]>>>18&31)]),u+=I[j+257],j>7&&(bn(e,u,r[E]>>>23&31),u+=en[j]);var z=31&r[E];yn(e,u,C[z]),u+=A[z],z>3&&(yn(e,u,r[E]>>>5&8191),u+=rn[z])}else yn(e,u,O[r[E]]),u+=I[r[E]];return yn(e,u,O[256]),u+I[256]},kn=/*#__PURE__*/new tn([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Pn=/*#__PURE__*/new Qs(0),Rn=/*#__PURE__*/function(){for(var t=new tn(256),e=0;256>e;++e){for(var i=e,r=9;--r;)i=(1&i&&3988292384)^i>>>1;t[e]=i}return t}(),On=function(t,e,i){for(;i;++e)t[e]=i,i>>>=8};function In(t,e){void 0===e&&(e={});var i=function(){var t=4294967295;return{p(e){for(var i=t,r=0;e.length>r;++r)i=Rn[255&i^e[r]]^i>>>8;t=i},d(){return 4294967295^t}}}(),r=t.length;i.p(t);var s,n,o,a,l,h,u=(a=10+((s=e).filename&&s.filename.length+1||0),l=8,function(t,e,i,r,s,n){var o=t.length,a=new Qs(r+o+5*(1+Math.floor(o/7e3))+s),l=a.subarray(r,a.length-s),h=0;if(!e||8>o)for(var u=0;o>=u;u+=65535){var d=u+65535;o>d?h=En(l,h,t.subarray(u,d)):(l[u]=n,h=En(l,h,t.subarray(u,o)))}else{for(var v=kn[e-1],c=v>>>13,_=8191&v,p=(1<<i)-1,f=new Zs(32768),g=new Zs(p+1),m=Math.ceil(i/3),b=2*m,y=function(e){return(t[e]^t[e+1]<<m^t[e+2]<<b)&p},w=new tn(25e3),S=new Zs(288),x=new Zs(32),E=0,T=0,k=(u=0,0),P=0,R=0;o>u;++u){var O=y(u),I=32767&u,C=g[O];if(f[I]=C,g[O]=I,u>=P){var A=o-u;if((E>7e3||k>24576)&&A>423){h=Tn(t,l,0,w,S,x,T,k,R,u-R,h),k=E=T=0,R=u;for(var M=0;286>M;++M)S[M]=0;for(M=0;30>M;++M)x[M]=0}var D=2,N=0,F=_,B=I-C&32767;if(A>2&&O==y(u-B))for(var U=Math.min(c,A)-1,L=Math.min(32767,u),j=Math.min(258,A);L>=B&&--F&&I!=C;){if(t[u+D]==t[u+D-B]){for(var z=0;j>z&&t[u+z]==t[u+z-B];++z);if(z>D){if(D=z,N=B,z>U)break;var q=Math.min(B,z-2),W=0;for(M=0;q>M;++M){var G=u-B+M+32768&32767,H=G-f[G]+32768&32767;H>W&&(W=H,C=G)}}}B+=(I=C)-(C=f[I])+32768&32767}if(N){w[k++]=268435456|an[D]<<18|ln[N];var V=31&an[D],J=31&ln[N];T+=en[V]+rn[J],++S[257+V],++x[J],P=u+D,++E}else w[k++]=t[u],++S[t[u]]}}h=Tn(t,l,n,w,S,x,T,k,R,u-R,h),n||(h=En(l,h,Pn))}return mn(a,0,r+gn(h)+s)}(n=t,null==(o=e).level?6:o.level,null==o.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(n.length)))):12+o.mem,a,l,!h)),d=u.length;return function(t,e){var i=e.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=2>e.level?4:9==e.level?2:0,t[9]=3,0!=e.mtime&&On(t,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),i){t[3]=8;for(var r=0;i.length>=r;++r)t[r+10]=i.charCodeAt(r)}}(u,e),On(u,d-8,i.d()),On(u,d-4,r),u}var Cn=!!d||!!u,An=/* @__PURE__ */new WeakMap,Mn="text/plain",Dn=0,Nn=!1,Fn=(t,e)=>{var i=t.split("#"),r=i[1],s=i[0].split("?"),n=s[0],o=s[1];if(!o)return t;var a=o.split("&").filter(t=>t.split("=")[0]!==e).join("&");return n+(a?"?"+a:"")+(r?"#"+r:"")},Bn=function(t,e,r){var s;void 0===r&&(r=!0);var n=t.split("?"),o=n[0],a=n[1],l=i({},e),h=null!==(s=null==a?void 0:a.split("&").map(t=>{var e,i=t.split("="),s=i[0],n=r&&null!==(e=l[s])&&void 0!==e?e:i[1];return delete l[s],s+"="+n}))&&void 0!==s?s:[],u=function(t,e){var i,r;void 0===e&&(e="&");var s=[];return sr(t,function(t,e){C(t)||C(e)||"undefined"===e||(i=encodeURIComponent((t=>t instanceof File)(t)?t.name:t.toString()),r=encodeURIComponent(e),s[s.length]=r+"="+i)}),s.join(e)}(l);return u&&h.push(u),h.length>0?o+"?"+h.join("&"):o},Un=t=>{if(t.cr)return t.cr;var e=t.data,i=t.compression;if(e){if(i===Is.GZipJS){var r=In(function(t){var e=t.length;if("undefined"!=typeof TextEncoder)return(new TextEncoder).encode(t);for(var i=new Qs(t.length+(t.length>>>1)),r=0,s=function(t){i[r++]=t},n=0;e>n;++n){if(r+5>i.length){var o=new Qs(r+8+(e-n<<1));o.set(i),i=o}var a=t.charCodeAt(n);128>a?s(a):2048>a?(s(192|a>>>6),s(128|63&a)):a>55295&&57344>a?(s(240|(a=65536+(1047552&a)|1023&t.charCodeAt(++n))>>>18),s(128|a>>>12&63),s(128|a>>>6&63),s(128|63&a)):(s(224|a>>>12),s(128|a>>>6&63),s(128|63&a))}return mn(i,0,r)}(rs(e)),{mtime:0});return{contentType:Mn,body:r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength),estimatedSize:r.byteLength}}if(i===Is.Base64){var s=(t=>"data="+encodeURIComponent("string"==typeof t?t:rs(t)))(function(t){return t?btoa(encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,(t,e)=>String.fromCharCode(parseInt(e,16)))):t}(rs(e)));return{contentType:"application/x-www-form-urlencoded",body:s,estimatedSize:new Blob([s]).size}}var n=rs(e);return{contentType:"application/json",body:n,estimatedSize:new Blob([n]).size}}},Ln=t=>{var e,r,s=()=>"sendBeacon"===t.transport?{url:Bn(t.url,{compression:Is.Base64}),encodedBody:Un(i({},t,{compression:Is.Base64,cr:void 0}))}:{url:Fn(t.url,"compression"),encodedBody:Un(i({},t,{compression:void 0,cr:void 0}))};try{e=Un(t)}catch(e){if(se(t.compression,ss(t.url,"compression")))return ue.error("Failed to gzip request body, sending uncompressed payload",e),s();throw e}return e&&se(t.compression,ss(t.url,"compression"))&&!((r=e.body)instanceof ArrayBuffer?re(new Uint8Array(r)):ArrayBuffer.isView(r)&&re(new Uint8Array(r.buffer,r.byteOffset,r.byteLength)))?(Nn=!0,s()):{url:t.url,encodedBody:e}},jn=t=>{try{return Ln(t)}catch(e){return ue.error(e),void(null==t.callback||t.callback({statusCode:0,error:e}))}},zn=/*#__PURE__*/function(){var t=s(function*(t){var e=yield function(t,e,i){return le.apply(this,arguments)}(rs(t.data),ge.DEBUG,{rethrow:!0});if(!e)return t;var r=yield e.arrayBuffer();return i({},t,{cr:{contentType:Mn,body:r,estimatedSize:r.byteLength}})});return function(e){return t.apply(this,arguments)}}(),qn=t=>Qt("AbortError","PostHog request timed out"+(t?" after "+t+"ms":"")),Wn=/Failed to fetch|NetworkError|Load failed/i,Gn=t=>"TypeError"===(null==t?void 0:t.name)&&Wn.test((null==t?void 0:t.message)||""),Hn=t=>{try{var e=function(t,e,i){if(void 0===e&&(e=Date.now()),void 0===i&&(i=3e5),"string"==typeof t&&t){var r=t.trim(),s=/^\d+\s*,/.test(r)?r.slice(0,r.indexOf(",")).trim():r;if(/^\d+$/.test(s)){var n=1e3*Math.min(Number(s),i/1e3);return n>0?n:void 0}if(/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun)[a-z]*[ ,]/.test(s)){var o=/^\w{3} \w{3} /.test(s)?s+" GMT":s,a=Date.parse(o)-e;if(Number.isFinite(a)&&a>0)return Math.min(a,i)}}}(t());return C(e)?void 0:Math.min(e,3e4)}catch(t){return}},Vn=t=>{var e=jn(t);if(e){var i=new d;An.set(i,!0);var r=e.encodedBody;i.open(t.method||"GET",e.url,!0);var s=null!=r?r:{},n=s.contentType,o=s.body;sr(t.headers,function(t,e){i.setRequestHeader(e,t)}),n&&i.setRequestHeader("Content-Type",n),t.timeout&&(i.timeout=t.timeout);var a=!1;i.ontimeout=()=>{a=!0},i.onloadend=()=>{if(a){var e=qn(t.timeout);return ue.warn(e),void(null==t.callback||t.callback({statusCode:0,error:e}))}var r={statusCode:i.status,text:i.responseText};if(200===i.status)try{r.json=JSON.parse(i.responseText)}catch(t){}null==t.callback||t.callback(r,Hn(()=>i.getResponseHeader("Retry-After")))},i.send(o)}},Jn=t=>{var e=jn(t);if(e){var r=e.url,s=e.encodedBody,n=null!=s?s:{},o=n.contentType,a=n.body,l=n.estimatedSize,h=new Headers;sr(t.headers,function(t,e){h.append(e,t)}),o&&h.append("Content-Type",o);var d=null,c=!1;if(v){var _=new v;d={signal:_.signal,timeout:setTimeout(()=>{c=!0;try{_.abort(qn(t.timeout))}catch(t){f(t)}},t.timeout)}}var p=!1,f=e=>{p||(p=!0,c&&"AbortError"===(null==e?void 0:e.name)||Gn(e)?ue.warn(e):ue.error(e),null==t.callback||t.callback({statusCode:0,error:e}))},g=0,m=()=>{Dn-=g,g=0,d&&clearTimeout(d.timeout)};try{var b,y=i({method:(null==t?void 0:t.method)||"GET",headers:h,referrerPolicy:"strict-origin",body:a,signal:null==(b=d)?void 0:b.signal},t.fetchOptions),w=null!=l?l:C(a)?0:void 0;y.keepalive="POST"===y.method&&!t.Ol&&!1!==y.keepalive&&y.body===a&&!C(w)&&w>=0&&52428.8>Dn+w,y.keepalive&&(Dn+=g=w),u(r,y).then(e=>e.text().then(i=>{if(!p){var r={statusCode:e.status,text:i};if(200===e.status)try{r.json=JSON.parse(i)}catch(t){ue.error(t)}p=!0,m(),null==t.callback||t.callback(r,Hn(()=>e.headers.get("Retry-After")))}})).catch(t=>{m(),f(t)}).finally(m)}catch(t){m(),f(t)}}},Kn=t=>{try{var e,r=Ln(t),s=r.url,n=r.encodedBody,o=null!=n?n:{},l=o.body,h=o.estimatedSize;if(!l)return;var d=l instanceof Blob?l:new Blob([l],{type:o.contentType});if(a.sendBeacon(s,d))return;var v=P(t.data)?t.data:null==(e=t.data)?void 0:e.batch;if(P(v)&&v.length>1&&(null!=h?h:0)>16384){var c=Math.ceil(v.length/2),_=e=>P(t.data)?e:i({},t.data,{batch:e});return Kn(i({},t,{data:_(v.slice(0,c))})),void Kn(i({},t,{data:_(v.slice(c))}))}ue.warn("Beacon of ~"+(null!=h?h:0)+" bytes was rejected by the browser, falling back to "+(u?"fetch":"XHR")),u?Jn(i({},t,{Ol:!0})):Vn(t)}catch(t){ue.warn("Beacon send failed",t)}},Yn=(t,e,r,s)=>{var n="query"===s?"POST"===e?"sent_at":"_":void 0;return Bn(r===Is.GZipJS?Fn(t,"compression"):t,i({},n?{[n]:Date.now().toString()}:{},r===Is.GZipJS?{}:{compression:r}))},Xn=/* @__PURE__ */(()=>{var t=[];return u&&t.push({transport:"fetch",method:Jn}),d&&t.push({transport:"XHR",method:Vn}),null!=a&&a.sendBeacon&&t.push({transport:"sendBeacon",method:Kn}),t})(),Qn=!Cn&&-1===(null==_?void 0:_.indexOf("MSIE"))&&-1===(null==_?void 0:_.indexOf("Mozilla"));function Zn(t,e,r){var s;r&&(e=i({},e,{callback:t=>r(t)})),t.__loaded?Qn?t.__request_queue.push(e):t.rateLimiter.isServerRateLimited(e.batchKey)?e.fireCallbackOnDrop&&(null==e.callback||e.callback({statusCode:429})):(e.transport=e.transport||t.config.api_transport,e.headers=i({},t.config.request_headers,e.headers),e.compression="best-available"===e.compression?null!==(s=t.compression)&&void 0!==s?s:e.compressionFallback:e.compression,(C(t.config.disable_beacon)?t.config.__preview_disable_beacon:t.config.disable_beacon)&&(e.disableTransport=["sendBeacon"]),e.fetchOptions=e.fetchOptions||t.config.fetch_options,null==e.onDispatch||e.onDispatch(),((t,e)=>{var r,s,n,o=i({},t,{callback:null!=e?e:e=>null==t.callback?void 0:t.callback(e)});o.timeout=o.timeout||6e4;var a,l,h,u,d,v=null!==(r=o.transport)&&void 0!==r?r:"fetch";"sendBeacon"===v&&C(o.compression)&&o.data&&(o.compression=Is.Base64),"POST"===o.method&&o.data&&("capture-body"===o.timestampMode?o.data={api_key:null!==(l=null==(d=(u=(P(a=o.data)?a:[a]).map(t=>i({},t,t.timestamp instanceof Date&&!isNaN(t.timestamp.getTime())?{timestamp:t.timestamp.toISOString()}:{})))[0])||null==(h=d.properties)?void 0:h.token)&&void 0!==l?l:null==d?void 0:d.token,batch:u,sent_at:/* @__PURE__ */(new Date).toISOString()}:"body"===o.timestampMode&&(o.data=function(t,e){return void 0===e&&(e=/* @__PURE__ */(new Date).toISOString()),P(t)?t.map(t=>i({},t,{sent_at:e})):i({},t,{sent_at:e})}(o.data))),o.url=Yn(o.url,o.method,o.compression,o.timestampMode);var _=Xn.filter(t=>!o.disableTransport||!t.transport||!o.disableTransport.includes(t.transport)),p=null!==(s=null==(n=function(t,e){for(var i=0;t.length>i;i++)if(e(t[i]))return t[i]}(_,t=>t.transport===v))?void 0:n.method)&&void 0!==s?s:_[0].method;if(!p)throw new Error("No available transport method");var f=t=>{try{p(t)}catch(t){Gn(t)?ue.warn(t):ue.error(t),null==o.callback||o.callback({statusCode:0,error:t})}};"sendBeacon"!==v&&!o.preferSyncCompression&&o.data&&o.compression===Is.GZipJS&&c&&"undefined"!=typeof Promise&&!Nn?zn(o).then(t=>{f(t)}).catch(e=>{if(ne(e))return Nn=!0,void f(i({},o,{compression:void 0,url:Yn(t.url,t.method,void 0,t.timestampMode)}));(t=>{if(!t||"object"!=typeof t)return!1;var e="name"in t?String(t.name):"";return ne(t)||e===ie})(e)&&(Nn=!0),f(o)}):f(o)})(e,(i,s)=>{t.rateLimiter.checkForLimiting(i),400>i.statusCode||null==t.config.on_request_error||t.config.on_request_error(i),r?r(i,s):null==e.callback||e.callback(i)})):e.fireCallbackOnDrop&&(null==e.callback||e.callback({statusCode:0}))}var to=class{constructor(t,e){this.uc=!0,this.cc=[],this.hc=K((null==e?void 0:e.flush_interval_ms)||3e3,250,5e3,ue.createLogger("flush interval"),3e3),this.dc=t}enqueue(t){this.cc.push(t),this.vc||this.fc()}unload(){this.gc();var t=this.cc.length>0?this.mc():{},e=Object.values(t);[...e.filter(t=>0===t.url.indexOf("/e")),...e.filter(t=>0!==t.url.indexOf("/e"))].map(t=>{this.yc(i({},t,{callback:void 0}),"sendBeacon")})}enable(){this.uc=!1,this.fc()}fc(){this.uc||(this.vc=setTimeout(()=>{this.gc(),this.bc()},this.hc))}bc(){if(this.cc.length>0){var t=this.mc();for(var e in t)this.yc(t[e])}}yc(t,e){try{this.dc(t,e)}catch(t){ue.error(t)}}gc(){clearTimeout(this.vc),this.vc=void 0}mc(){var t={},e={};sr(this.cc,r=>{var s,n=r,o=((n?n.batchKey:null)||n.url)+(n.batchGroup?":"+n.batchGroup:"");C(t[o])&&(t[o]=i({},n,{data:[],callback:void 0,fireCallbackOnDrop:void 0}),e[o]=[]),null==(s=t[o].data)||s.push(n.data),n.callback&&e[o].push(n.callback)});var r=function(){var i=e[s];i.length&&(t[s].callback=t=>{for(var e of i)e(t)})};for(var s in e)r();return this.cc=[],t}},eo=class{constructor(t){this._instance=t,this._c=!1,this.wc=3e3,this.cc=[],this.cc=[],this.kc=!0,this.resume()}resume(){if(!C(n)&&"onLine"in n.navigator){if(this.kc=n.navigator.onLine,this.Sc)return;this.Sc=()=>{this.kc=!0,this.bc()},this.xc=()=>{this.kc=!1},dr(n,"online",this.Sc),dr(n,"offline",this.xc)}}get length(){return this.cc.length}retriableRequest(t,r){var s=t.retriesPerformedSoFar,n=function(t,e){if(null==t)return{};var i={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;i[r]=t[r]}return i}(t,e);B(s)&&(n.url=Bn(n.url,{retry_count:s})),Zn(this._instance,r?i({},n,{transport:r}):n,(t,e)=>{if(200!==t.statusCode&&(400>t.statusCode||t.statusCode>=500)){if((0===t.statusCode?3:10)>(null!=s?s:0))return void this.Ls(i({retriesPerformedSoFar:s},n),e);0===t.statusCode&&ue.warn("Request failed before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped retrying after "+(null!=s?s:0)+" retries.")}null==n.callback||n.callback(t)})}Ls(t,e){var i=t.retriesPerformedSoFar||0;t.retriesPerformedSoFar=i+1;var r=Math.max(function(t){var e=3e3*Math.pow(2,t),i=e/2,r=Math.min(18e5,e),s=(Math.random()-.5)*(r-i);return Math.ceil(r+s)}(i),null!=e?e:0),s=Date.now()+r;this.cc.push({retryAt:s,requestOptions:t});var n="Enqueued failed request for retry in "+r;navigator.onLine||(n+=" (Browser is offline)"),ue.warn(n),this._c||(this._c=!0,this.$c())}$c(){if(this.Cc&&clearTimeout(this.Cc),0===this.cc.length)return this._c=!1,void(this.Cc=void 0);this.Cc=setTimeout(()=>{this.kc&&this.cc.length>0&&this.bc(),this.$c()},this.wc)}bc(){var t=Date.now(),e=[],i=this.cc.filter(i=>t>i.retryAt||(e.push(i),!1));if(this.cc=e,i.length>0)for(var r of i)this.retriableRequest(r.requestOptions)}unload(){for(var t of(this.Cc&&(clearTimeout(this.Cc),this.Cc=void 0),this._c=!1,C(n)||(this.Sc&&(n.removeEventListener("online",this.Sc),this.Sc=void 0),this.xc&&(n.removeEventListener("offline",this.xc),this.xc=void 0)),this.cc)){var e=t.requestOptions;try{this._instance._send_request(i({},e,{callback:P(e.data)?void 0:e.callback,transport:"sendBeacon"}))}catch(t){ue.error(t)}}this.cc=[]}},io=class{constructor(t){this._instance=t,this.Tc=()=>{var t,e,i,r;this.Ic||(this.Ic={});var s=this.scrollElement(),n=this.scrollY(),o=s?Math.max(0,s.scrollHeight-s.clientHeight):0,a=n+((null==s?void 0:s.clientHeight)||0),l=(null==s?void 0:s.scrollHeight)||0;this.Ic.lastScrollY=Math.ceil(n),this.Ic.maxScrollY=Math.max(n,null!==(t=this.Ic.maxScrollY)&&void 0!==t?t:0),this.Ic.maxScrollHeight=Math.max(o,null!==(e=this.Ic.maxScrollHeight)&&void 0!==e?e:0),this.Ic.lastContentY=a,this.Ic.maxContentY=Math.max(a,null!==(i=this.Ic.maxContentY)&&void 0!==i?i:0),this.Ic.maxContentHeight=Math.max(l,null!==(r=this.Ic.maxContentHeight)&&void 0!==r?r:0)}}get Mc(){return this._instance.config.scroll_root_selector}getContext(){return this.Ic}resetContext(){var t=this.Ic;return this.Ic=void 0,setTimeout(this.Tc,0),t}startMeasuringScrollPosition(){dr(n,"scroll",this.Tc,{capture:!0}),dr(n,"scrollend",this.Tc,{capture:!0}),dr(n,"resize",this.Tc)}scrollElement(){var t;if(!this.Mc)return null==n||null==(t=n.document)?void 0:t.documentElement;for(var e of P(this.Mc)?this.Mc:[this.Mc]){var i,r=null==n||null==(i=n.document)?void 0:i.querySelector(e);if(r)return r}}Ec(t){var e,i,r="y"===t?"scrollTop":"scrollLeft";if(this.Mc){var s=this.scrollElement();return s&&s[r]||0}return n?"y"===t?n.scrollY||n.pageYOffset||(null==(e=n.document)||null==(e=e.documentElement)?void 0:e.scrollTop)||0:n.scrollX||n.pageXOffset||(null==(i=n.document)||null==(i=i.documentElement)?void 0:i.scrollLeft)||0:0}scrollY(){return this.Ec("y")}scrollX(){return this.Ec("x")}},ro=t=>ps(null==t?void 0:t.config.mask_personal_data_properties,null==t?void 0:t.config.custom_personal_data_properties,null==t?void 0:t.config.disable_capture_url_hashes),so=class{constructor(t,e,i,r){this.je=t=>{var e=this.Ac();if(!e||e.sessionId!==t){var i={sessionId:t,props:this.Rc(this._instance)};this.Pc.register({[Ri]:i})}},this._instance=t,this.Oc=e,this.Pc=i,this.Rc=r||ro,this.Oc.onSessionId(this.je)}Ac(){return this.Pc.props[Ri]}getSetOnceProps(){var t,e=null==(t=this.Ac())?void 0:t.props;return e?"r"in e?fs(e,this._instance.config.disable_capture_url_hashes):{$referring_domain:e.referringDomain,$pathname:e.initialPathName,utm_source:e.utm_source,utm_campaign:e.utm_campaign,utm_medium:e.utm_medium,utm_content:e.utm_content,utm_term:e.utm_term}:{}}getSessionProps(){var t={};return sr(ar(this.getSetOnceProps()),(e,i)=>{"$current_url"===i&&(i="url"),t["$session_entry_"+x(i)]=e}),t}},no=class{on(t,e){return this.Eo[t]||(this.Eo[t]=[]),this.Eo[t].push(e),()=>{this.Eo[t]=this.Eo[t].filter(t=>t!==e)}}emit(t,e){for(var i of this.Eo[t]||[])i(e);for(var r of this.Eo["*"]||[])r(t,e)}constructor(){this.Eo={}}},oo=de("[SessionId]"),ao=864e5,lo=class{on(t,e){return this.Fc.on(t,e)}constructor(t,e,i){var r;if(this.Dc=null,this.Lc=null,this.Nc=[],this.jc=void 0,this.qc=!1,this.Fc=new no,this.Bc=(t,e)=>!(!B(t)||!B(e))&&Math.abs(t-e)>this.sessionTimeoutMs,!t.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if("always"===t.config.cookieless_mode)throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this.Fr=t.config,this.Pc=t.persistence,this.Be=void 0,this.Xt=void 0,this._sessionStartTimestamp=null,this.zc=void 0,this._sessionActivityTimestamp=null,this.Hc=e||br,this.Uc=i||br;var s=this.Fr.persistence_name||this.Fr.token;if(this._sessionTimeoutMs=1e3*K(this.Fr.session_idle_timeout_seconds||1800,60,36e3,oo.createLogger("session_idle_timeout_seconds"),1800),t.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.Wc(),this.Vc="ph_"+s+"_window_id",this.Gc="ph_"+s+"_primary_window_exists",this.Qc()){var n=Lr.Ft(this.Vc),o=Lr.Ft(this.Gc);n&&!o?this.Be=n:Lr.Dt(this.Vc),Lr.$t(this.Gc,!0)}null!=(r=this.Fr.bootstrap)&&r.sessionID&&this.setBootstrapSessionId(this.Fr.bootstrap.sessionID),this.Jc()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(t){return C(this.Nc)&&(this.Nc=[]),this.Nc.push(t),this.Xt&&t(this.Xt,this.Be),()=>{this.Nc=this.Nc.filter(e=>e!==t)}}Qc(){return"memory"!==this.Fr.persistence&&!this.Pc.fi&&Lr.Ot()}Zc(t){t!==this.Be&&(this.Be=t,this.Qc()&&Lr.$t(this.Vc,t))}Kc(){return this.Be?this.Be:this.Qc()?Lr.Ft(this.Vc):null}Yc(t){var e=this.Dc;return!D(e)&&!D(t)&&5e3>Math.abs(t-e)}Xc(t,e,i){var r=e!==this._sessionActivityTimestamp,s=!(t!==this.Xt||i!==this._sessionStartTimestamp);this._sessionStartTimestamp=i,this._sessionActivityTimestamp=e,this.Xt=t,s&&!r||s&&this.Yc(e)||(this.Dc=e,this.Pc.register({[ci]:[e,t,i]}))}eh(){var t,e=null==(t=this.Fr)?void 0:t.persistence_save_debounce_ms;return B(e)&&e>0}ih(){this.eh()?this.Pc.refreshKey(ci):(this.Pc.flush(),this.Pc.load())}nh(){var t;if(!D(this._sessionActivityTimestamp)&&this._sessionActivityTimestamp!==this.Dc){this.ih();var e=this.sh();e[1]===this.Xt&&e[2]===this._sessionStartTimestamp&&(this.Dc=this._sessionActivityTimestamp,this.Pc.register({[ci]:[this._sessionActivityTimestamp,null!==(t=this.Xt)&&void 0!==t?t:null,this._sessionStartTimestamp]}),this.Pc.flush())}}rh(){var t=this.sh()[0],e=B(t)?t:0,i=B(this._sessionActivityTimestamp)?this._sessionActivityTimestamp:0;return Math.max(e,i)}oh(t){return this.ih(),this.Bc(t,this.rh())}sh(){var t=this.Pc.props[ci];return P(t)&&2===t.length&&t.push(t[0]),t||[0,null,0]}resetSessionId(){this.Dc=null,this.zc=void 0,clearTimeout(this.ah),this.ah=void 0,this.Xc(null,null,null)}setBootstrapSessionId(t,e){void 0===e&&(e=!1);var i=function(t,e){void 0===e&&(e=/* @__PURE__ */(new Date).getTime());try{var i=(t=>{var e=t.replace(/-/g,"");if(32!==e.length)throw new Error("Not a valid UUID");if("7"!==e[12])throw new Error("Not a UUIDv7");return parseInt(e.substring(0,12),16)})(t);return i>e+6e4?void oo.error("Bootstrap sessionID cannot be in the future"):i}catch(t){return void oo.error("Invalid sessionID in bootstrap",t)}}(t);return!C(i)&&(e?this.zc={sessionId:t,sessionStartTimestamp:i}:this.Xc(t,/* @__PURE__ */(new Date).getTime(),i),!0)}destroy(){this.qc=!0,this.nh(),clearTimeout(this.ah),this.ah=void 0,this.jc&&n&&(n.removeEventListener(Qi,this.jc,{capture:!1}),this.jc=void 0),this.Nc=[]}Jc(){this.jc=()=>{this.nh(),this.Qc()&&Lr.Dt(this.Gc)},dr(n,Qi,this.jc,{capture:!1})}checkAndGetSessionAndWindowId(t,e,i){if(void 0===t&&(t=!1),void 0===e&&(e=null),void 0===i&&(i=!1),"always"===this.Fr.cookieless_mode)throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var r=e||/* @__PURE__ */(new Date).getTime(),s=this.Xt;if(i)this.Lc=r;else if(D(this.Lc)||this.Lc>r||r-this.Lc>=1e3){var n,o;null==(n=(o=this.Pc).syncCookieProperties)||n.call(o),this.Lc=r}var a=this.sh(),l=a[1],h=a[2],u=!C(s)&&l!==s,d=this.rh(),v=this.Kc(),c=this.zc,_=!!c&&(c.sessionStartTimestamp>r+6e4||r-c.sessionStartTimestamp>ao),p=c?_:B(h)&&Math.abs(r-h)>ao,f=!1,g=u,m=!l||!!c,b=l,y=!m&&!t&&this.Bc(r,d);if(y){(y=this.oh(r))||oo.info("cross-tab refresh kept the session alive",{sessionId:l});var w=this.sh();l=w[1],h=w[2],y||(m=!l||!!c)}if(m||y||p){g=!1;var S=c&&!_;l=S?c.sessionId:this.Hc(),v=this.Uc(),oo.info("new session ID assigned",{sessionId:l,windowId:v,bootstrapped:!!S,changeReason:{noSessionId:m,activityTimeout:y,sessionPastMaximumLength:p}}),h=S?c.sessionStartTimestamp:r,this.zc=void 0,f=!0}else v||(v=this.Uc(),f=!0),(g=g||l!==b)&&(oo.info("adopted cross-tab session id",{sessionId:l,windowId:v}),f=!0);var x=B(d)&&t&&!p?d:r,E=B(h)?h:/* @__PURE__ */(new Date).getTime();this.Zc(v),this.Xc(l,x,E),t||this.Wc();var T={noSessionId:m,activityTimeout:y,sessionPastMaximumLength:p,crossTabAdoption:g};return f&&this.Nc.forEach(t=>t(l,v,T)),{sessionId:l,windowId:v,sessionStartTimestamp:E,changeReason:f?T:void 0,lastActivityTimestamp:d}}Wc(){this.qc||(clearTimeout(this.ah),this.ah=setTimeout(()=>{if(!this.qc)if(this.oh(/* @__PURE__ */(new Date).getTime())){var t=this.Xt;this.resetSessionId(),this.Fc.emit("forcedIdleReset",{idleSessionId:t})}else this.Wc()},1.1*this.sessionTimeoutMs))}},ho=Object.freeze(["2026-08-30","2026-08-29","2026-06-25","2026-05-30","2026-01-30","2025-11-30","2025-05-24"]);function uo(){return(uo=s(function*(){var t=null==a?void 0:a.userAgentData;if(null!=t&&t.getHighEntropyValues)try{var e,i=null==(e=yield t.getHighEntropyValues(["model"]))?void 0:e.model;return A(i)&&i.length>0?i:void 0}catch(t){return void ue.info("Unable to resolve $device_model from userAgentData.getHighEntropyValues",t)}})).apply(this,arguments)}function vo(t,e){var i="$survey_"+e+"/"+t.id;return t.current_iteration&&t.current_iteration>0&&(i="$survey_"+e+"/"+t.id+"/"+t.current_iteration),i}function co(t,e,i){return rs({distinct_id:t,userPropertiesToSet:e,userPropertiesToSetOnce:i})}var _o,po="custom",fo="i.posthog.com",go=/^\/static\//,mo=["/s/","/e/","/i/"],bo=class{constructor(t){this.uh={},this.instance=t}get apiHost(){var t=this.instance.config.api_host.trim().replace(/\/$/,"");return"https://app.posthog.com"===t?"https://us.i.posthog.com":t}get flagsApiHost(){var t=this.instance.config.flags_api_host;return t?t.trim().replace(/\/$/,""):this.apiHost}get uiHost(){var t,e=null==(t=this.instance.config.ui_host)?void 0:t.replace(/\/$/,"");return e||(e=this.apiHost.replace("."+fo,".posthog.com")),"https://app.posthog.com"===e?"https://us.posthog.com":e}get region(){return this.uh[this.apiHost]||(this.uh[this.apiHost]=/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"us":/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"eu":po),this.uh[this.apiHost]}hh(t){if(go.test(t)){var e=this.instance.config.asset_host;if("string"==typeof e)return e.trim().replace(/\/$/,"")||void 0}}dh(t){var e=is(t);return e?e.protocol+"//"+e.host+e.pathname:void 0}fh(t,e,i){if("ui"===t)return i;var r=i,s=this.instance.config.rewriteRequestPath;if(s){var n,o=(null==(n=is(i))?void 0:n.href)||i;r=s(new URL(o)).toString()}if(s&&"api"===t&&mo.some(t=>0===e.indexOf(t))){var a=this.dh(r);if(a){var l,h=this.apiHost,u=this.ph;(null==(l=u)?void 0:l.apiHost)===h&&u.rewriteRequestPath===s||(this.ph=u={apiHost:h,rewriteRequestPath:s,urls:/* @__PURE__ */new Set}),u.urls.add(a)}}return r}isIngestionEndpoint(t){var e=this.ph,i=this.dh(t);return(null==e?void 0:e.apiHost)===this.apiHost&&e.rewriteRequestPath===this.instance.config.rewriteRequestPath&&!!i&&e.urls.has(i)}endpointFor(t,e){if(void 0===e&&(e=""),e&&(e="/"===e[0]?e:"/"+e),"ui"===t)return this.fh(t,e,this.uiHost+e);if("flags"===t)return this.fh(t,e,this.flagsApiHost+e);if("assets"===t){var i=this.hh(e);if(i)return this.fh(t,e,""+i+e)}if(this.region===po)return this.fh(t,e,this.apiHost+e);var r=fo+e;switch(t){case"assets":return this.fh(t,e,"https://"+this.region+"-assets."+r);case"api":return this.fh(t,e,"https://"+this.region+"."+r)}}},yo=/* @__PURE__ */de("[Surveys]"),wo={ignoreConditions:!1,ignoreDelay:!1,displayType:zs.Popover},$o=de("[PostHog ExternalIntegrations]"),So={intercom:"intercom-integration",crispChat:"crisp-chat-integration"},xo=class{constructor(t){this._instance=t}Bl(t,e){var i;null==(i=f.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,t,t=>{if(t)return $o.error("failed to load script",t);e()})}startIfEnabledOrStop(){var t=this,e=function(){var e,r,s,n=i[0],o=i[1];!o||null!=(e=f.__PosthogExtensions__)&&null!=(e=e.integrations)&&e[n]||t.Bl(So[n],()=>{var e;null==(e=f.__PosthogExtensions__)||null==(e=e.integrations)||null==(e=e[n])||e.start(t._instance)}),!o&&null!=(r=f.__PosthogExtensions__)&&null!=(r=r.integrations)&&r[n]&&(null==(s=f.__PosthogExtensions__)||null==(s=s.integrations)||null==(s=s[n])||s.stop())};for(var i of Object.entries(null!==(r=this._instance.config.integrations)&&void 0!==r?r:{})){var r;e()}}},Eo=()=>{var t;return null!=n&&null!=(t=n.performance)&&t.now?n.performance.now():Date.now()},To=[50,75,100,150,200,300,400,500,750,1e3,1500,2e3,3e3,5e3,1e4],ko=class{constructor(t){this._instance=t}initialize(){}get(t){var e=this._instance.persistence;if("string"==typeof t)return null==e?void 0:e.get_property(t);var i={};for(var r of t){var s=null==e?void 0:e.get_property(r);C(s)||(i[r]=s)}return i}set(t,e){var i;null==(i=this._instance.persistence)||i.register("string"==typeof t?{[t]:e}:t)}remove(t){var e;null==(e=this._instance.persistence)||e.unregister(t)}},Po=class{constructor(t){this.instance=t,this.R=ue,this.kv=new ko(t),this.onSession=t=>qs(this.instance.onSessionId(e=>{try{t(e)}catch(t){this.R.error("Browser extension session listener failed",t)}})),this.onEvent=t=>qs(this.instance._addCaptureHook((e,i)=>{if(i)try{t({event:e,properties:i.properties})}catch(t){this.R.error("Browser extension event listener failed",t)}})),this.onRemoteConfig=t=>{var e=e=>{try{t(e)}catch(t){this.R.error("Browser extension remote config listener failed",t)}},i=this.instance.dr.on("extensionsRemoteConfig",e);return this.instance.vr&&e(this.instance.vr),qs(i)}}get logger(){return this.R}get distinctId(){return this.instance.get_distinct_id()}get anonymousId(){var t;return null!==(t=this.instance.get_property("$device_id"))&&void 0!==t?t:this.distinctId}get deviceId(){var t=this.instance.get_property(ze);return"string"==typeof t?t:void 0}get library(){return{name:ge.LIB_NAME,version:ge.LIB_VERSION}}get initialPersonProperties(){var t,e;return null!==(t=null==(e=this.instance.persistence)?void 0:e.get_initial_props())&&void 0!==t?t:{}}get groups(){return this.instance.getGroups()}get session(){try{var t,e,i,r,s,n=null==(t=this.instance.sessionManager)?void 0:t.checkAndGetSessionAndWindowId(!0);return{sessionId:null!==(e=null==n?void 0:n.sessionId)&&void 0!==e?e:"",windowId:null!==(i=null==n?void 0:n.windowId)&&void 0!==i?i:"",sessionStartTimestamp:null!==(r=null==n?void 0:n.sessionStartTimestamp)&&void 0!==r?r:0,lastActivityTimestamp:null!==(s=null==n?void 0:n.lastActivityTimestamp)&&void 0!==s?s:0}}catch(t){return{sessionId:"",windowId:"",sessionStartTimestamp:0,lastActivityTimestamp:0}}}get isOptedOut(){return this.instance.has_opted_out_capturing()}get canCapture(){return R(this.instance.is_capturing)?this.instance.is_capturing():!this.isOptedOut}get isRateLimited(){var t;return!(null==(t=this.instance.rateLimiter)||!t.isClientRateLimited)}get projectToken(){return this.instance.config.token}getExtension(t){var e;switch(t){case"featureFlags":case"featureFlagsCommon":e=this.instance.featureFlags;break;case"logs":e=this.instance.logs;break;case"surveys":e=this.instance.surveys;break;case"autocapture":e=this.instance.autocapture}return e}capture(t,e,r){if(!r)return this.pr(this.instance.capture(t,e));var s=i({timestamp:r.timestamp,uuid:r.uuid,$set:r.set,$set_once:r.setOnce},"unload"===r.delivery?{transport:"sendBeacon",send_instantly:!0}:{});return this.pr(this.instance.capture(t,e,s))}pr(t){var e;return!C(t)||!(null!=(e=this.instance.rateLimiter)&&e.lastEventRateLimited)}registerDynamicEventProperties(t){return qs(this.instance.mr(t))}sendRequest(t,e){var i=this;return s(function*(){var r;void 0===e&&(e={});var s=null!==(r=e.target)&&void 0!==r?r:"api",n=e.query?Bn(t,e.query):t,o=i.instance.requestRouter.endpointFor(s,n),a={method:e.method,url:o,data:e.body,headers:e.headers,timeout:e.timeoutMs,fireCallbackOnDrop:!0,transport:e.transport,compression:e.compression,compressionFallback:"flags"===e.target&&"best-available"===e.compression?b.Base64:void 0,timestampMode:e.sentAt};return"api"===s&&"/i/v1/logs"===t&&(a.batchKey="logs"),"sendBeacon"===e.transport?(i.instance._send_request(a),{statusCode:202}):new Promise(t=>{var e,r;a.callback=t,"flags"===s&&null!=(e=i.instance.config.metrics)&&e.flags&&(a.onDispatch=()=>{r=Eo()},a.callback=e=>{C(r)||i.gr(o,e,Eo()-r),t(e)}),i.instance._send_request(a)})})()}gr(t,e,i){try{var r,s,n,o=e.statusCode||void 0,a={"server.address":(null!==(r=null==(s=is(t))?void 0:s.hostname)&&void 0!==r?r:t).replace(/^\[(.*)\]$/,"$1")};o&&(a["http.response.status_code"]=o);var l=((t,e)=>t?400>t?void 0:String(t):"AbortError"===(null==e?void 0:e.name)?"timeout":"_OTHER")(o,e.error);l&&(a["error.type"]=l);var h=es();h&&(a["client.timezone"]=h),null==(n=this.instance.metrics)||n.histogram("posthog.flags.request.duration",i,{unit:"ms",attributes:a,bounds:To})}catch(t){ue.error("Failed to record the /flags request duration",t)}}},Ro={},Oo=0,Io=()=>{},Co='Consent opt in/out is not valid with cookieless_mode="always" and will be ignored',Ao="Surveys module not available",Mo="sanitize_properties is deprecated. Use before_send instead",Do="Invalid value for property_denylist config: ",No=["$recording_status","$sdk_debug_recording_script_not_loaded","$sdk_debug_replay_url_trigger_status","$sdk_debug_replay_event_trigger_status","$sdk_debug_replay_linked_flag_trigger_status","$sdk_debug_replay_rrweb_error","$sdk_debug_replay_internal_buffer_length","$sdk_debug_replay_flushed_size"],Fo=["$feature_flag_called","$$heatmap","$snapshot"],Bo=t=>"$"===t.charAt(0)&&!S(Fo,t),Uo=/^[A-Za-z0-9_-]{1,400}$/,Lo=/^fb\.[0-9]+\.[0-9]+\.[A-Za-z0-9_-]+(?:\.[A-Za-z0-9_-]+)?$/,jo=/^fb\.[0-9]+\.[0-9]+\.[0-9]+$/,zo=["token","distinct_id",Ni],qo="posthog",Wo=[...ho].sort()[ho.length-1],Go=t=>{var e={};return t&&"unset"!==t?("2025-11-30">t||(e.strictMinimumDuration=!0),"2026-05-30">t||(e.canvasCapture={resolutionScale:.6}),"2026-06-25">t||(e.streamNetworkBody=!0),"2026-08-30">t||(e.captureJsonLd=!0),e):e},Ho=t=>{var e;return i({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,asset_host:null,token:"",autocapture:!0,cross_subdomain_cookie:ur(null==l?void 0:l.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:Io,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:null!=t?t:"unset",__preview_deferred_init_extensions:!1,__preview_replay_sync_fetch:!0,__preview_external_dependency_versioned_paths:!1,__preview_cookie_wins_on_conflict:!1,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_conversations:!1,disable_product_tours:!1,disableDeviceModel:!1,reuseAnonymousId:!1,disable_external_dependency_loading:!1,strict_script_versioning:"fallback",enable_recording_console_log:void 0,secure_cookie:"https:"===(null==n||null==(e=n.location)?void 0:e.protocol),ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_feature_flags_dedup_per_session:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,feature_flag_request_max_retries:1,surveys_request_timeout_ms:1e4,on_request_error(t){ue.error("Bad HTTP status: "+t.statusCode+" "+t.text)},get_device_id:t=>t,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:Xi,before_send:void 0,get_current_url:void 0,request_queue_config:{flush_interval_ms:3e3},error_tracking:{},_onCapture:Io},(t=>({rageclick:t&&t>="2026-05-30"?{content_ignorelist:qr,ignore_text_selection:!0}:!t||"2025-11-30">t||{content_ignorelist:!0},capture_pageview:!t||"2025-05-24">t||"history_change",session_recording:Go(t),external_scripts_inject_target:t&&t>="2026-01-30"?"head":"body",internal_or_test_user_hostname:t&&t>="2026-01-30"?/^(localhost|127\.0\.0\.1)$/:void 0,persistence_save_debounce_ms:t&&t>="2026-05-30"?250:0,split_storage:!(!t||"2026-05-30">t),detect_google_search_app:!(!t||"2026-05-30">t),disable_capture_url_hashes:!(!t||"2026-06-25">t),cookieWinsOnConflict:!(!t||"unset"===t||"2026-08-29">t)}))(t))},Vo=[["process_person","person_profiles"],["xhr_headers","request_headers"],["cookie_name","persistence_name"],["disable_cookie","disable_persistence"],["__preview_disable_beacon","disable_beacon"],["store_google","save_campaign_params"],["verbose","debug"],["__preview_cookie_wins_on_conflict","cookieWinsOnConflict"]],Jo=t=>{var e={};for(var i of Vo){var r=i[0],s=i[1];C(t[r])||(e[s]=t[r])}var n=nr({},e,t),o=t.__preview_external_dependency_versioned_paths;return C(o)||(C(t.strict_script_versioning)&&(n.strict_script_versioning=!!o),A(o)&&C(t.asset_host)&&(n.asset_host=o)),P(t.property_blacklist)&&(C(t.property_denylist)?n.property_denylist=t.property_blacklist:P(t.property_denylist)?n.property_denylist=[...t.property_blacklist,...t.property_denylist]:ue.error(Do+t.property_denylist)),n},Ko=class{constructor(){this.__forceAllowLocalhost=!1}get gh(){return this.__forceAllowLocalhost}set gh(t){ue.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=t}},Yo=(t=class t{mh(t){if(t){var e=this.yh.indexOf(t);-1!==e&&this.yh.splice(e,1)}}bh(t,e){return this.mh(t),this.yh.push(e),null==e.initialize||e.initialize(),e}_h(){return"always"===this.config.cookieless_mode||"on_reject"===this.config.cookieless_mode&&this.consent.isRejected()}wh(){if(!(this.kh||this.config.reuseAnonymousId||this.config.segment||this._h())){var t,e,i,r="memory"===this.config.persistence||"sessionStorage"===this.config.persistence;(r||this.config.disable_persistence)&&(this.Sh||(r?(t="persistence is set to '"+this.config.persistence+"'",e="memory"===this.config.persistence?"on every page load":"for every new browser tab or window",i="Either set persistence to 'localStorage+cookie', keep this persistence and pass a stable ID through bootstrap.distinctID, or enable reuseAnonymousId."):(t="persistence is disabled (disable_persistence is true)",e="on every page load",i="Either set disable_persistence to false, keep persistence disabled and pass a stable ID through bootstrap.distinctID, or enable reuseAnonymousId."),this.kh=!0,console.warn("[PostHog.js]",t+" but no bootstrap.distinctID was provided. PostHog will mint a new distinct ID "+e+", so calling identify() merges a new ID onto the person each time. A person can then pass the distinct-ID limit and its events stop appearing on person pages and the session tab. "+i)))}}xh(){var t=this.persistence;if(t&&!this.$h)if(this._h())"on_reject"===this.config.cookieless_mode&&"$posthog_cookieless"!==this.get_distinct_id()&&(this.Ch(),this.Th());else if("$posthog_cookieless"===this.get_distinct_id()){this.Ih()||t.load(!0);var e=this.get_distinct_id();if(!e||"$posthog_cookieless"===e){var i=this.config.get_device_id(br());this.register({distinct_id:i,$device_id:i}),t.set_property(Pi,Ki)}this.Ch()}}get decideEndpointWasHit(){var t,e;return null!==(t=null==(e=this.featureFlags)?void 0:e.hasLoadedFlags)&&void 0!==t&&t}get flagsEndpointWasHit(){var t,e;return null!==(t=null==(e=this.featureFlags)?void 0:e.hasLoadedFlags)&&void 0!==t&&t}constructor(){var e;this.Mh=!1,this.Eh=!1,this.webPerformance=new Ko,this.Ah=!1,this.version=ge.LIB_VERSION,this.Rh=/* @__PURE__ */new Set,this.Ph="",this.dr=new no,this.yh=[],this.Oh=[],this.Fh=!1,this.Sh=!1,this.kh=!1,this.$h=!1,this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=Ho(),this.SentryIntegration=Kr,this.sentryIntegration=t=>function(t,e){var i=Jr(t,e);return{name:Vr,processEvent:t=>i(t)}}(this,t),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.Dh=!1,this.Lh=null,this.Nh=null,this.jh=null,this.scrollManager=new io(this),this.pageViewManager=new Yr(this),this.rateLimiter=new Js(this),this.requestRouter=new bo(this),this.consent=new jr(this),this.externalIntegrations=new xo(this);var i=null!==(e=t.__defaultExtensionClasses)&&void 0!==e?e:{};this.featureFlags=i.featureFlags&&new i.featureFlags(this),this.toolbar=i.toolbar&&new i.toolbar(this),this.surveys=i.surveys&&new i.surveys(this),this.conversations=i.conversations&&new i.conversations(this),this.logs=i.logs&&new i.logs(this),this.metrics=i.metrics&&new i.metrics(this),this.experiments=i.experiments&&new i.experiments(this),this.exceptions=i.exceptions&&new i.exceptions(this),this.people={set:(t,e,i)=>{var r=A(t)?{[t]:e}:t;this.setPersonProperties(r),null==i||i({})},set_once:(t,e,i)=>{var r=A(t)?{[t]:e}:t;this.setPersonProperties(void 0,r),null==i||i({})}},this.on("eventCaptured",t=>ue.info('send "'+(null==t?void 0:t.event)+'"',t))}init(e,i,r){if(r&&r!==qo){var s,n=null!==(s=Ro[r])&&void 0!==s?s:new t;return n._init(e,i,r),Ro[r]=n,Ro[qo][r]=n,n}return this._init(e,i,r)}_init(t,e,r){var s,o,a;void 0===e&&(e={});var l,h=A(t)?t.trim():"";if(!h)return ue.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 h!==(null==(l=this.config)?void 0:l.token)?console.warn("[PostHog.js]","You have already initialized PostHog with a different project token! Re-initializing is a no-op, so events will keep going to the project this instance was initialized with. To capture into a second project, load PostHog once, then initialize a named instance after the SDK has loaded, e.g. posthog.init('"+h+"', { ... }, 'project2')"):console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config=Ho(e.defaults),e.debug=this.qh(e.debug),this.Bh=e,this.zh=[],e.person_profiles?this.Nh=e.person_profiles:e.process_person&&(this.Nh=e.process_person);var u=Ho(e.defaults),d=Jo(e),v=nr({},u,d,{name:r,token:h});O(u.rageclick)&&O(d.rageclick)&&(v.rageclick=nr({},u.rageclick,d.rageclick)),O(u.session_recording)&&O(d.session_recording)&&(v.session_recording=nr({},u.session_recording,d.session_recording)),this.set_config(v),this.config.on_xhr_error&&ue.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=e.disable_compression?void 0:Is.GZipJS;var c=this.Ih(),_=!this._h();if(this.persistence=new Os(this.config,c,!0,_),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new Os(i({},this.config,{persistence:"sessionStorage"}),c,!1,_),this.Ph="ph_"+(this.config.persistence_name||this.config.token)+"_session_registered_properties","memory"!==this.config.persistence&&!c&&Lr.Ot()){var p=Lr.Ft(this.Ph);P(p)&&p.forEach(t=>{A(t)&&this.Rh.add(t)})}else Lr.Dt(this.Ph);var f=i({},this.persistence.props),g=i({},this.sessionPersistence.props);this.register({$initialization_time:/* @__PURE__ */(new Date).toISOString()}),this.Hh=new to((t,e)=>this.Uh(t,e),this.config.request_queue_config),this.Wh=new eo(this),this.__request_queue=[];var m=this._h();m||(this.sessionManager=new lo(this),this.sessionPropsManager=new so(this,this.sessionManager,this.persistence),this.sessionManager.onSessionId((t,e,i)=>{(null!=i&&i.activityTimeout||null!=i&&i.sessionPastMaximumLength||null!=i&&i.crossTabAdoption)&&this.Vh()})),this.Gh(),this.config.__preview_deferred_init_extensions?(ue.info("Deferring extension initialization to improve startup performance"),this.Qh=setTimeout(()=>{this.Qh=void 0,this.Jh(m)},0)):(ue.info("Initializing extensions synchronously"),this.Jh(m)),ge.DEBUG=ge.DEBUG||this.config.debug,ge.DEBUG&&ue.info("Starting in debug mode",{this:this,config:e,thisC:i({},this.config),p:f,s:g}),!this.config.identity_distinct_id||null!=(s=e.bootstrap)&&s.distinctID||(e.bootstrap=i({},e.bootstrap,{distinctID:this.config.identity_distinct_id,isIdentifiedID:!0}));var b=null==(o=e.bootstrap)?void 0:o.distinctID;if(this.Sh=!!b&&!M(b),null!=(a=e.bootstrap)&&a.distinctID){var y=e.bootstrap.distinctID,w=this.get_distinct_id(),S=this.persistence.get_property(Pi);if(e.bootstrap.isIdentifiedID&&null!=w&&w!==y&&"anonymous"===S)this.identify(y);else if(e.bootstrap.isIdentifiedID&&null!=w&&w!==y&&"identified"===S)ue.warn("Bootstrap distinctID differs from an already-identified user. The existing identity is preserved. Call reset() before reinitializing if you intend to switch users.");else{var x=this.config.get_device_id(br()),E=e.bootstrap.isIdentifiedID?x:y;this.persistence.set_property(Pi,e.bootstrap.isIdentifiedID?Yi:Ki),this.register({distinct_id:y,$device_id:E})}}if(m)this.register_once({distinct_id:Di,$device_id:null},"");else if(!this.get_distinct_id()){var T=this.config.get_device_id(br());this.register_once({distinct_id:T,$device_id:T},""),this.persistence.set_property(Pi,Ki)}return dr(n,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),dr(n,"pageshow",t=>{if(this.Mh=!1,!this.Eh){var e;if(t.persisted&&this.persistence){var i=this.persistence.get_property(je),r=this.persistence.get_property(Pi);this.persistence.load(),this.Zh()||i===this.persistence.get_property("distinct_id")&&r===this.persistence.get_property("$user_state")||this.Kh()}null==(e=this.Wh)||e.resume()}}),e.segment?Hr(this,()=>this.Yh()):this.Yh(),R(this.config._onCapture)&&this.config._onCapture!==Io&&(ue.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",t=>this.config._onCapture(t.event,t))),this.config.ip&&ue.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.config.disableDeviceModel||function(){return uo.apply(this,arguments)}().then(t=>{t&&this.register({[qe]:t})}).catch(Io),this}Xh(t){var e=t;return A(e.name)&&R(e.setup)}ed(t,e){var i=this;this.Xh(t)?e.push(/*#__PURE__*/s(function*(){try{yield t.setup(i.nd())}catch(e){ue.error('Failed to set up extension "'+t.name+'"',e);try{yield null==t.dispose?void 0:t.dispose()}catch(e){ue.error('Failed to dispose extension "'+t.name+'"',e)}}})):this.yh.push(t)}Gh(){var e,i,r,n,o,a,l=this,h=null!==(e=null==(i=this.config.__extensionClasses)?void 0:i.featureFlags)&&void 0!==e?e:null==(r=t.__defaultExtensionClasses)?void 0:r.featureFlags;if(h)if(this.featureFlags&&this.featureFlags instanceof h||(null==(a=this.sd)||a.call(this),this.sd=void 0,this.featureFlags=new h(this)),R(this.featureFlags.onReloading)&&R(this.featureFlags.setup)){if(!this.sd){this.sd=this.featureFlags.onReloading(()=>{this.dr.emit("featureFlagsReloading",!0)});var u=this.featureFlags;s(function*(){try{yield u.setup(l.nd())}catch(e){ue.error("Failed to set up feature flags",e);var t=l.sd;l.sd=void 0;try{null==t||t()}catch(t){ue.error("Failed to unsubscribe feature flag reloading",t)}try{yield u.dispose()}catch(t){ue.error("Failed to dispose feature flags",t)}}})()}}else null==(n=(o=this.featureFlags).initialize)||n.call(o)}Jh(e){var r,s,n,o,a,l,h,u,d=performance.now(),v=i({},t.__defaultExtensionClasses,this.config.__extensionClasses),c=[];v.exceptions&&this.yh.push(this.exceptions=null!==(r=this.exceptions)&&void 0!==r?r:new v.exceptions(this)),v.historyAutocapture&&this.yh.push(this.historyAutocapture=new v.historyAutocapture(this)),v.tracingHeaders&&this.yh.push(this.tracingHeaders=new v.tracingHeaders(this)),v.siteApps&&this.yh.push(this.siteApps=new v.siteApps(this)),v.sessionRecording&&!e&&this.yh.push(this.sessionRecording=new v.sessionRecording(this)),this.config.disable_scroll_properties||c.push(()=>{this.scrollManager.startMeasuringScrollPosition()}),v.autocapture&&this.ed(this.autocapture=new v.autocapture(this),c),v.surveys&&this.ed(this.surveys=null!==(s=this.surveys)&&void 0!==s?s:new v.surveys(this),c),v.logs&&this.ed(this.logs=null!==(n=this.logs)&&void 0!==n?n:new v.logs(this),c),v.metrics&&this.yh.push(this.metrics=null!==(o=this.metrics)&&void 0!==o?o:new v.metrics(this)),v.conversations&&this.yh.push(this.conversations=null!==(a=this.conversations)&&void 0!==a?a:new v.conversations(this)),v.productTours&&this.yh.push(this.productTours=new v.productTours(this)),v.heatmaps&&this.yh.push(this.heatmaps=new v.heatmaps(this)),v.webVitalsAutocapture&&this.yh.push(this.webVitalsAutocapture=new v.webVitalsAutocapture(this)),v.exceptionObserver&&this.yh.push(this.exceptionObserver=new v.exceptionObserver(this)),v.deadClicksAutocapture&&this.yh.push(this.deadClicksAutocapture=new v.deadClicksAutocapture(this,Wr)),v.toolbar&&this.yh.push(this.toolbar=null!==(l=this.toolbar)&&void 0!==l?l:new v.toolbar(this)),v.experiments&&this.yh.push(this.experiments=null!==(h=this.experiments)&&void 0!==h?h:new v.experiments(this)),v.webMCP&&this.yh.push(this.webMCP=null!==(u=this.webMCP)&&void 0!==u?u:new v.webMCP(this)),this.yh.forEach(t=>{t.initialize&&c.push(()=>{null==t.initialize||t.initialize()})}),c.push(()=>{if(this.rd){var t=this.rd;this.rd=void 0,this.yh.forEach(e=>null==e.onRemoteConfig?void 0:e.onRemoteConfig(t))}}),this.od(c,d)}od(t,e){for(;t.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-e>=30&&t.length>0)return void(this.Qh=setTimeout(()=>{this.Qh=void 0,this.od(t,e)},0));var i=t.shift();if(i)try{i()}catch(t){ue.error("Error initializing extension:",t)}}var r=Math.round(performance.now()-e);this.register_for_session({[Fi]:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",[Bi]:r}),this.config.__preview_deferred_init_extensions&&ue.info("PostHog extensions initialized ("+r+"ms)")}ac(t){if(!l||!l.body)return ue.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout(()=>{this.ac(t)},500);if(this.config.__preview_deferred_init_extensions&&(this.rd=t),this.vr=t,this.compression=void 0,t.ok){var e,i=t.config;i.supportedCompression&&!this.config.disable_compression&&(this.compression=S(i.supportedCompression,Is.GZipJS)?Is.GZipJS:S(i.supportedCompression,Is.Base64)?Is.Base64:void 0),null!=(e=i.analytics)&&e.endpoint&&(this.analyticsDefaultEndpoint=i.analytics.endpoint)}this.set_config({person_profiles:this.Nh?this.Nh:Xi}),this.dr.emit("extensionsRemoteConfig",t),this.yh.forEach(e=>null==e.onRemoteConfig?void 0:e.onRemoteConfig(t))}Yh(){try{this.config.loaded(this)}catch(t){ue.critical("`loaded` function failed",t)}if(this.ad(),this.config.internal_or_test_user_hostname&&null!=h&&h.hostname){var t=h.hostname,e=this.config.internal_or_test_user_hostname;("string"==typeof e?t===e:e.test(t))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout(()=>{(this.consent.isOptedIn()||this._h())&&this.ld()},1),this.ud=new Ys(this),this.ud.load()}ad(){var t;this.is_capturing()&&this.config.request_batching&&(null==(t=this.Hh)||t.enable())}_dom_loaded(){this.is_capturing()&&rr(this.__request_queue,t=>this.Uh(t)),this.__request_queue=[],this.ad()}_handle_unload(){var t,e,i,r,s;this.Mh=!0,null==(t=this.surveys)||null==t.handlePageUnload||t.handlePageUnload(),null==(e=this.metrics)||e.flush("sendBeacon"),this.config.request_batching?(this.hd()&&this.capture(tr),null==(i=this.logs)||i.flushLogs("sendBeacon"),null==(r=this.Hh)||r.unload(),null==(s=this.Wh)||s.unload()):this.hd()&&this.capture(tr,null,{transport:"sendBeacon"})}_send_request(t){Zn(this,t)}Uh(t,e){this.Wh?this.Wh.retriableRequest(t,e):this._send_request(e?i({},t,{transport:e}):t)}_execute_array(t){Oo++;try{var e,i=[],r=[],s=[];rr(t,t=>{if(t)if(P(e=t[0]))s.push(t);else if(R(t))try{t.call(this)}catch(e){ue.error("Error executing queued PostHog call",t,e)}else P(t)&&"alias"===e?i.push(t):P(t)&&-1!==e.indexOf("capture")&&R(this[e])?s.push(t):r.push(t)});var n=function(t,e){rr(t,function(t){try{if(P(t[0])){var i=e;sr(t,function(t){i=i[t[0]].apply(i,t.slice(1))})}else e[t[0]].apply(e,t.slice(1))}catch(e){ue.error("Error executing queued PostHog call",t,e)}})};n(i,this),n(r,this),n(s,this)}finally{Oo--}}push(e){if(Oo>0&&P(e)&&A(e[0])){var i=t.prototype[e[0]];R(i)&&i.apply(this,e.slice(1))}else this._execute_array([e])}get dd(){return{property:He,persistenceKey:Ve,cookieName:"_fbc",pattern:Lo,register:(t,e)=>{var i;return null==(i=this.persistence)?void 0:i.register({[Ve]:{value:t,delivered:e}})},unregister:()=>{var t;return null==(t=this.persistence)?void 0:t.unregister(Ve)}}}get vd(){return{property:Je,persistenceKey:Ke,cookieName:"_fbp",pattern:jo,register:(t,e)=>{var i;return null==(i=this.persistence)?void 0:i.register({[Ke]:{value:t,delivered:e}})},unregister:()=>{var t;return null==(t=this.persistence)?void 0:t.unregister(Ke)}}}fd(t){var e,i=null==(e=this.persistence)?void 0:e.get_property(t.persistenceKey);return A(i)&&t.pattern.test(i)?{value:i,delivered:!1}:O(i)&&A(i.value)&&t.pattern.test(i.value)?{value:i.value,delivered:!0===i.delivered}:void 0}pd(t,e,i){return e===(null==i?void 0:i.value)?{value:e,pending:!i.delivered}:(t.register(e,!1),{value:e,pending:!0})}gd(t){if(this.config.save_campaign_params&&!this._h()){var e=_r(t.cookieName);return A(e)&&t.pattern.test(e)?e:void 0}}md(t,e,i,r){if(this.persistence){var s=this.dd;this.persistence.refreshMetaIdentifiers();var n=this.fd(s);if(!r){if(i)return A(e)&&Lo.test(e)?this.pd(s,e,n):void s.unregister();var o=A(t)&&Uo.test(t)?t:void 0,a=this.gd(s);return a&&((t,e,i)=>{var r=t.split(".");if(e)return r[3]===e;if(!i)return!0;var s=i.value.split(".");return r[3]===s[3]||Number(r[2])>Number(s[2])})(a,o,n)?this.pd(s,a,n):o?(null==n?void 0:n.value.split(".")[3])===o?{value:n.value,pending:!n.delivered}:this.pd(s,"fb.1."+Date.now()+"."+o,n):n?{value:n.value,pending:!n.delivered}:void 0}s.unregister()}}yd(t,e,i){if(this.persistence){var r=this.vd;this.persistence.refreshMetaIdentifiers();var s=this.fd(r);if(!i){if(e)return A(t)&&jo.test(t)?this.pd(r,t,s):void r.unregister();var n=this.gd(r);return n?this.pd(r,n,s):s?{value:s.value,pending:!s.delivered}:void 0}r.unregister()}}bd(t,e){if(this.persistence){this.persistence.refreshMetaIdentifiers();var i=this.fd(t);(null==i?void 0:i.value)!==e||i.delivered||t.register(e,!0)}}capture(t,e,r){var s,n,o,a,l,h,u,d;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.Hh)if(this.is_capturing())if(!C(t)&&A(t)){if(this.xh(),"$snapshot"!==t||!this._h()){var v=!this.config.opt_out_useragent_filter&&this._is_bot();if(!v||this.config.__preview_capture_bot_pageviews){var c=null!=r&&r.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(null==c||!c.isRateLimited){var _;null!=e&&e.$current_url&&!A(null==e?void 0:e.$current_url)&&(ue.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),null==e||delete e.$current_url),"$exception"!==t||null!=r&&r._originatedFromCaptureException||ue.warn("Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),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 p=/* @__PURE__ */new Date,f=(null==r?void 0:r.timestamp)||p,g=Xt(null==r?void 0:r.uuid,br),m={uuid:g,event:t,properties:this.calculateEventProperties(t,e||{},f,g)};"$pageview"===t&&this.config.__preview_capture_bot_pageviews&&v&&(m.event="$bot_pageview",m.properties.$browser_type="bot"),c&&(m.properties.$lib_rate_limit_remaining_tokens=c.remainingTokens);var b="$feature_flag_called"===t&&!1===m.properties.$feature_flag_has_experiment&&!0===this.get_property("$minimal_flag_called_events");null!=r&&r.$set&&!b&&(m.$set=null==r?void 0:r.$set);var y=O(null==e?void 0:e.$set)?e.$set:void 0,w=P(null==e?void 0:e.$unset)?e.$unset:[],S=(null==r?void 0:r.$unset)||[],x=t=>{var e,i=!(null==r||!r.$set)&&t in r.$set;return{hasProvided:i||!!y&&t in y,provided:i?null==r||null==(e=r.$set)?void 0:e[t]:null==y?void 0:y[t],unset:-1!==w.indexOf(t)||-1!==S.indexOf(t)}},E=x(He),T=x(Je),k=[{channel:this.dd,hasProvided:E.hasProvided,update:this.md(null==(s=_)?void 0:s.fbclid,E.provided,E.hasProvided,E.unset)},{channel:this.vd,hasProvided:T.hasProvided,update:this.yd(T.provided,T.hasProvided,T.unset)}];for(var R of k){var M=R.channel,D=R.update;D&&!0===m.properties.$process_person_profile&&D.pending&&!R.hasProvided&&!b&&(m.$set=i({[M.property]:D.value},m.$set))}var F=null==r?void 0:r.$unset;F&&(m.$unset=F);var B=b?void 0:this.wd(null==r?void 0:r.$set_once,t!==ir,t===er);if(B&&(m.$set_once=B),null!=r&&r._noTruncate||(l=this.config.properties_string_max_length,h=m,u=t=>A(t)?t.slice(0,l):t,d=/* @__PURE__ */new Set,m=function t(e,i){if(e!==Object(e))return u?u(e):e;if(!d.has(e)){var r;if(d.add(e),P(e))r=[],rr(e,e=>{r.push(t(e))});else{var s={};sr(z(e)?lr(e):e,(e,i)=>{d.has(e)||(s[i]=t(e,i))}),r=s}return r}}(h)),m.timestamp=f,C(null==r?void 0:r.timestamp)||(m.properties.$event_time_override_provided=!0,m.properties.$event_time_override_system_time=p),b&&(m.properties=function(t,e){void 0===e&&(e=[]);var i={},r=e=>{void 0!==t[e]&&(i[e]=t[e])};return ee.forEach(r),e.forEach(r),i}(m.properties,zo)),t===Ls.DISMISSED||t===Ls.SENT){var U=null==e?void 0:e[js.SURVEY_ID],L=null==e?void 0:e[js.SURVEY_ITERATION];(t=>{try{var e=(t=>((t,e)=>"seenSurvey_"+function(t){return t.current_iteration&&t.current_iteration>0?t.id+"_"+t.current_iteration:t.id}(e))(0,t))(t);if(localStorage.getItem(e))return;localStorage.setItem(e,"true")}catch(t){yo.error("Failed to persist survey seen state",t)}})({id:U,current_iteration:L}),m.$set=i({},m.$set,{[vo({id:U,current_iteration:L},t===Ls.SENT?"responded":"dismissed")]:!0})}else t===Ls.SHOWN&&(m.$set=i({},m.$set,{[js.SURVEY_LAST_SEEN_DATE]:/* @__PURE__ */(new Date).toISOString()}));if(t===Gs.SHOWN){var j=null==e?void 0:e[Hs.TOUR_TYPE];j&&(m.$set=i({},m.$set,{[Hs.TOUR_LAST_SEEN_DATE+"/"+j]:/* @__PURE__ */(new Date).toISOString()}))}var q=i({},m.properties.$set,m.$set);if(I(q)||this.setPersonPropertiesForFlags(q),!N(this.config.before_send)){var W=this.Fs(m);if(!W)return;(m=W).uuid=Xt(m.uuid,br)}this.sessionRecording&&!this.Fh&&Bo(t)&&(this.Fh=!0,setTimeout(()=>this.Fh=!1,3e4));var G=k.filter(t=>{var e,i,r,s=t.channel,n=t.update,o=null!==(e=null==(i=m.$set)?void 0:i[s.property])&&void 0!==e?e:O(null==(r=m.properties)?void 0:r.$set)?m.properties.$set[s.property]:void 0;return(null==n?void 0:n.pending)&&o===n.value});this.dr.emit("eventCaptured",m);var H,V,J=null!==(n=null==r?void 0:r._url)&&void 0!==n?n:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),K="recordings"===(null==r?void 0:r._batchKey)||/\/s\/(?:\?|$)/.test(J),Y=i({method:"POST",url:J,data:m,compression:"best-available",preferSyncCompression:null==r?void 0:r.send_instantly,timestampMode:K?"body":"capture-body",batchKey:null==r?void 0:r._batchKey},K&&null!=(o=m.properties)&&o.$session_id?{batchGroup:m.properties.$session_id+(m.properties.$window_id?"-"+m.properties.$window_id:"")}:{},null!=r&&r.transport?{transport:r.transport}:{},G.length?{fireCallbackOnDrop:!0,callback:t=>{if(t.statusCode>=200&&300>t.statusCode)for(var e of G)this.bd(e.channel,e.update.value)}}:{});return!this.config.request_batching||r&&(null==r||!r._batchKey)||null!=r&&r.send_instantly?(!Y.transport&&!Y.callback&&I(null!==(H=this.config.request_headers)&&void 0!==H?H:{})&&this.Mh&&(V="sendBeacon"),this.Uh(Y,V)):this.Hh.enqueue(Y),null==(a=this.featureFlags)||a.sendFlagCallsPendingCapture(),m}ue.critical("This capture call is ignored due to client rate limiting.")}else ue.info('Event "'+t+'" was not captured because the user agent looks like a bot. Set `opt_out_useragent_filter: true` to capture it.')}}else ue.error("No event name provided to posthog.capture");else ue.info('Event "'+t+'" was not captured because capturing is disabled (opted out or consent pending).');else ue.uninitializedWarning("posthog.capture")}_addCaptureHook(t){return this.on("eventCaptured",e=>t(e.event,e))}getExtension(t){var e;return null==(e=this.kd)?void 0:e.getExtension(t)}nd(){var t;return null!==(t=this.kd)&&void 0!==t?t:this.kd=new Po(this)}mr(t){this.Oh.push(t);var e=!0;return()=>{if(e){e=!1;var i=this.Oh.indexOf(t);-1!==i&&this.Oh.splice(i,1)}}}Zh(t){var e;return void 0===t&&(t=!0),!(null==(e=this.persistence)||!e.consumeCookieIdentityChange()||(this.Kh(t),0))}Kh(t){var e,i,r;void 0===t&&(t=!0),this.jh=null,"anonymous"===(null==(e=this.persistence)?void 0:e.get_property("$user_state"))&&(null==(r=this.sessionPersistence)||r.clear(),this.Rh.clear(),this.Sd()),null==(i=this.featureFlags)||i.reset(),t&&this.reloadFeatureFlags()}calculateEventProperties(t,e,r,s,o){if(r=r||/* @__PURE__ */new Date,!this.persistence||!this.sessionPersistence)return e;this.xh(),this.persistence.syncCookieProperties(),this.Zh();var a=o?void 0:this.persistence.remove_event_timer(t),u=i({},e);if(u.token=this.config.token,u.$config_defaults="latest"===this.config.defaults?Wo:this.config.defaults,this._h()&&(u[Ni]=!0),"$snapshot"===t){var d=i({},this.persistence.properties(),this.sessionPersistence.properties());return u.distinct_id=d.distinct_id,(!A(u.distinct_id)&&!F(u.distinct_id)||M(u.distinct_id))&&ue.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),u}var v,c=function(t,e,i,r){var s,o,a,l;if(void 0===r&&(r=!1),!_)return{};var u,d=t?[...os,...e||[]]:[],v=function(t){for(var e=0;Ht.length>e;e++){var i=Ht[e],r=i[1],s=i[0].exec(t),n=s&&(R(r)?r(s,t):r);if(n)return n}return["",""]}(_),c=v[0],p=v[1],f=function(t){for(var e=0;Kt.length>e;e++){var i,r=Kt[e],s=r[1],n=r[2],o=t.match(r[0]);if(o)return[s,(null==(i=n&&t.match(n)||o)?void 0:i[1])||""]}return["",""]}(_),g=f[0],b=f[1],y=null!=(u="u">typeof navigator?navigator:void 0)&&u.brave?{brave:!0}:{},w={};C(i)||(w.detectGoogleSearchApp=i);var S={},x=null==(s=navigator)||null==(s=s.userAgentData)?void 0:s.platform,E=null==(o=navigator)?void 0:o.maxTouchPoints,T=null==n||null==(a=n.screen)?void 0:a.width,k=null==n||null==(l=n.screen)?void 0:l.height,P=null==n?void 0:n.devicePixelRatio;C(x)||(S.userAgentDataPlatform=x),C(E)||(S.maxTouchPoints=E),C(T)||(S.screenWidth=T),C(k)||(S.screenHeight=k),C(P)||(S.devicePixelRatio=P);var O,I,A,M,D,N,F,B,U=nr(ar({$os:c,$os_version:p,$browser:qt(_,navigator.vendor,y,w),$webview_app:g,$webview_app_version:b,$device:Vt(_),$device_type:(I=_,A=S,B=Vt(I),B===tt||B===Z||"Kobo"===B||"Kindle Fire"===B||B===$t?Q:B===ct||B===pt||B===_t||B===wt?"Console":B===et?"Wearable":B?Y:"Android"===(null==A?void 0:A.userAgentDataPlatform)&&(null!==(M=null==A?void 0:A.maxTouchPoints)&&void 0!==M?M:0)>0?600>Math.min(null!==(D=null==A?void 0:A.screenWidth)&&void 0!==D?D:0,null!==(N=null==A?void 0:A.screenHeight)&&void 0!==N?N:0)/(null!==(F=null==A?void 0:A.devicePixelRatio)&&void 0!==F?F:1)?Y:Q:"Desktop"),$timezone:es(),$timezone_offset:gs()}),{$current_url:ns(r?Zt(null==h?void 0:h.href):null==h?void 0:h.href,d,ls),$host:null==h?void 0:h.host,$pathname:null==h?void 0:h.pathname,$raw_user_agent:_.length>1e3?_.substring(0,997)+"...":_,$browser_version:Gt(_,navigator.vendor,y,w),$browser_language:vs(),$browser_language_prefix:(O=vs(),"string"==typeof O?O.split("-")[0]:void 0),$screen_height:null==n?void 0:n.screen.height,$screen_width:null==n?void 0:n.screen.width,$viewport_height:null==n?void 0:n.innerHeight,$viewport_width:null==n?void 0:n.innerWidth,$lib:m.LIB_NAME,$lib_version:m.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3});return m.SDK_DIST_CHANNEL&&(U.$sdk_dist_channel=m.SDK_DIST_CHANNEL),U}(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties,this.config.detect_google_search_app,this.config.disable_capture_url_hashes);if(this.sessionManager){var p=this.sessionManager.checkAndGetSessionAndWindowId(o,r.getTime(),!0),f=p.windowId;u.$session_id=p.sessionId,u.$window_id=f}this.sessionPropsManager&&nr(u,this.sessionPropsManager.getSessionProps());try{var g;if(this.sessionRecording){var b=this.sessionRecording.sdkDebugProperties,y=!this.Fh&&Bo(t);for(var w in b)(y||S(No,w))&&(u[w]=b[w])}u.$sdk_debug_retry_queue_size=null==(g=this.Wh)?void 0:g.length}catch(t){u.$sdk_debug_error_capturing_properties=String(t)}if(this.requestRouter.region===po&&(u.$lib_custom_api_host=this.config.api_host),v="$pageview"!==t||o?"$pageleave"!==t||o?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(r):this.pageViewManager.doPageView(r,s),u=nr(u,v),"$pageview"===t&&l&&(u.title=l.title),!C(a)){var x=r.getTime()-a;u.$duration=parseFloat((x/1e3).toFixed(3))}_&&this.config.opt_out_useragent_filter&&(u.$browser_type=this._is_bot()?"bot":"browser");var E=this.persistence.properties(),T=this.sessionPersistence.properties(),k=u.$groups,D=E.$groups;O(k)&&!I(k)&&(u.$groups=i({},O(D)?D:{},k)),sr(["$referrer","$referring_domain"],t=>{t in E&&delete T[t]});var N={};if(this.Oh.length>0)for(var B of this.Oh.slice())try{nr(N,B())}catch(t){ue.error("Failed to produce browser extension event properties",t)}(u=nr({},c,E,T,i({},N,u))).$is_identified=this._isIdentified(),P(this.config.property_denylist)?sr(this.config.property_denylist,function(t){delete u[t]}):ue.error(Do+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var U=this.config.sanitize_properties;U&&(ue.error(Mo),u=U(u,t));var L=this.xd();return u.$process_person_profile=L,L&&!o&&this.$d("_calculate_event_properties"),u}wd(t,e,i){var r;if(void 0===e&&(e=!0),void 0===i&&(i=!1),!this.persistence||!this.xd())return t;if(this.Ah&&!i)return t;var s=nr({},this.persistence.get_initial_props(),(null==(r=this.sessionPropsManager)?void 0:r.getSetOnceProps())||{},t||{}),n=this.config.sanitize_properties;return n&&(ue.error(Mo),s=n(s,"$set_once")),e&&(this.Ah=!0),I(s)?void 0:s}register(t,e){var i;null==(i=this.persistence)||i.register(t,e)}register_once(t,e,i){var r;null==(r=this.persistence)||r.register_once(t,e,i)}register_for_session(t){var e,i;null==(e=this.persistence)||e.syncCookieProperties(),this.Zh(),null==(i=this.sessionPersistence)||i.register(t),Object.keys(t).forEach(t=>this.Rh.add(t)),this.Sd()}unregister(t){var e;null==(e=this.persistence)||e.unregister(t)}unregister_for_session(t){var e;null==(e=this.sessionPersistence)||e.unregister(t),this.Rh.delete(t),this.Sd()}Cd(t,e){this.register({[t]:e})}Vh(){this.Rh.forEach(t=>{var e;null==(e=this.sessionPersistence)||e.unregister(t)}),this.Rh.clear(),this.Sd()}Sd(){var t;if(this.Ph)if("memory"===this.config.persistence||null!=(t=this.sessionPersistence)&&t.fi||!Lr.Ot())Lr.Dt(this.Ph);else{var e=[];this.Rh.forEach(t=>e.push(t)),e.length>0?Lr.$t(this.Ph,e):Lr.Dt(this.Ph)}}getFeatureFlag(t,e){var i;return null==(i=this.featureFlags)?void 0:i.getFeatureFlag(t,e)}getFeatureFlagPayload(t){var e;return null==(e=this.featureFlags)?void 0:e.getFeatureFlagPayload(t)}getFeatureFlagResult(t,e){var i;return null==(i=this.featureFlags)?void 0:i.getFeatureFlagResult(t,e)}getAllFeatureFlags(){var t,e;return null!==(t=null==(e=this.featureFlags)?void 0:e.getAllFeatureFlags())&&void 0!==t?t:[]}isFeatureEnabled(t,e){var i,r;return null!==(i=null==(r=this.featureFlags)?void 0:r.isFeatureEnabled(t,e))&&void 0!==i?i:null==e?void 0:e.defaultValue}reloadFeatureFlags(){var t;null==(t=this.featureFlags)||t.reloadFeatureFlags()}updateFlags(t,e,i){var r;null==(r=this.featureFlags)||r.updateFlags(t,e,i)}updateEarlyAccessFeatureEnrollment(t,e,i){var r;null==(r=this.featureFlags)||r.updateEarlyAccessFeatureEnrollment(t,e,i)}getEarlyAccessFeatures(t,e,i){var r;return void 0===e&&(e=!1),null==(r=this.featureFlags)?void 0:r.getEarlyAccessFeatures(t,e,i)}on(t,e){return this.dr.on(t,e)}onFeatureFlags(t){return this.featureFlags?this.featureFlags.onFeatureFlags(t):(t([],{},{errorsLoading:!0}),()=>{})}onSurveysLoaded(t){return this.surveys?this.surveys.onSurveysLoaded(t):(t([],{isLoaded:!1,error:Ao}),()=>{})}onSessionId(t){var e,i;return null!==(e=null==(i=this.sessionManager)?void 0:i.onSessionId(t))&&void 0!==e?e:()=>{}}getSurveys(t,e){void 0===e&&(e=!1),this.surveys?this.surveys.getSurveys(t,e):t([],{isLoaded:!1,error:Ao})}getActiveMatchingSurveys(t,e){void 0===e&&(e=!1),this.surveys?this.surveys.getActiveMatchingSurveys(t,e):t([],{isLoaded:!1,error:Ao})}onActiveMatchingSurveysChanged(t){return this.surveys?this.surveys.onActiveMatchingSurveysChanged(t):(t([],{isLoaded:!1,error:Ao}),()=>{})}renderSurvey(t,e){var i;null==(i=this.surveys)||i.renderSurvey(t,e)}displaySurvey(t,e){var i;void 0===e&&(e=wo),null==(i=this.surveys)||i.displaySurvey(t,e)}cancelPendingSurvey(t){var e;null==(e=this.surveys)||e.cancelPendingSurvey(t)}canRenderSurvey(t){var e,i;return null!==(e=null==(i=this.surveys)?void 0:i.canRenderSurvey(t))&&void 0!==e?e:{visible:!1,disabledReason:Ao}}canRenderSurveyAsync(t,e){var i,r;return void 0===e&&(e=!1),null!==(i=null==(r=this.surveys)?void 0:r.canRenderSurveyAsync(t,e))&&void 0!==i?i:Promise.resolve({visible:!1,disabledReason:Ao})}Td(t){return!t||M(t)?(ue.critical("Unique user id has not been set in posthog.identify"),!1):"$posthog_cookieless"===t?(ue.critical('The string "'+t+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.'),!1):!["distinct_id","distinctid"].includes(t.toLowerCase())&&!["undefined","null"].includes(t.toLowerCase())||(ue.critical('The string "'+t+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.'),!1)}identify(t,e,i){if(!this.__loaded||!this.persistence)return ue.uninitializedWarning("posthog.identify");if(F(t)&&(t=t.toString(),ue.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),this.Td(t)&&this.$d("posthog.identify")){this.xh();var r=this.get_distinct_id(),s=this.persistence.syncCookieProperties()&&this.get_distinct_id()!==r,n=this.Zh(!1),o=this.persistence.Ou(),a=!1;try{var l=this.get_distinct_id();this.register({$user_id:t}),this.get_property("$device_id")||this.register_once({$had_persisted_distinct_id:!0,$device_id:l},""),t!==l&&t!==this.get_property("__alias")&&(this.unregister(We),this.register({distinct_id:t}));var h=(this.persistence.get_property("$user_state")||"anonymous")===Ki,u=t!==l,d=!u&&h;if(u&&h){var v,c=this.config.reuseAnonymousId?{distinct_id:t}:{distinct_id:t,$anon_distinct_id:l};this.persistence.set_property(Pi,Yi),this.setPersonPropertiesForFlags({$set:e||{},$set_once:i||{}},!1),this.config.cookieWinsOnConflict&&this.persistence.Fu(),this.capture("$identify",c,{$set:e||{},$set_once:i||{}})&&(this.jh=co(t,e,i)),null==(v=this.featureFlags)||v.setAnonymousDistinctId(this.config.reuseAnonymousId?void 0:l)}else if(d){this.persistence.set_property(Pi,Yi);var _=e||{},p=i||{};this.setPersonPropertiesForFlags({$set:_,$set_once:p},!1),this.config.cookieWinsOnConflict&&this.persistence.Fu(),this.capture("$set",{$set:_,$set_once:p})&&(this.jh=co(t,e,i))}else(e||i)&&this.setPersonProperties(e,i);u||s||n?(this.reloadFeatureFlags(),this.featureFlags?this.featureFlags.resetFlagCallReported():this.unregister(Pe)):d&&(e||i)&&this.reloadFeatureFlags(),a=!0}finally{o&&this.persistence.Nu(a)}}}setPersonProperties(t,e){if((t||e)&&this.$d("posthog.setPersonProperties")){var i=co(this.get_distinct_id(),t,e);this.jh!==i?(this.setPersonPropertiesForFlags({$set:t||{},$set_once:e||{}},!0),this.capture("$set",{$set:t||{},$set_once:e||{}})&&(this.jh=i)):ue.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}unsetPersonProperties(t){var e,i=(P(t)?t:[t]).filter(t=>A(t)&&t.length>0);0!==i.length&&this.$d("posthog.unsetPersonProperties")&&(null==(e=this.featureFlags)||e.unsetPersonPropertiesForFlags(i,!0),this.capture("$set",{$unset:i}),this.jh=null)}group(t,e,r){var s;if(t&&e){null==(s=this.persistence)||s.syncCookieProperties(),this.Zh();var n=this.getGroups(),o=n[t]!==e;if(o&&this.resetGroupPropertiesForFlags(t),this.register({$groups:i({},n,{[t]:e})}),(o||r)&&this.xd()){var a={$group_type:t,$group_key:e};r&&(a.$group_set=r),this.capture(ir,a)}r&&this.setGroupPropertiesForFlags({[t]:r}),o&&!r&&this.reloadFeatureFlags()}else ue.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(t,e){var i;void 0===e&&(e=!0),null==(i=this.featureFlags)||i.setPersonPropertiesForFlags(t,e)}resetPersonPropertiesForFlags(t){var e;void 0===t&&(t=!0),null==(e=this.featureFlags)||e.resetPersonPropertiesForFlags(t)}setGroupPropertiesForFlags(t,e){var i;void 0===e&&(e=!0),this.$d("posthog.setGroupPropertiesForFlags")&&(null==(i=this.featureFlags)||i.setGroupPropertiesForFlags(t,e))}resetGroupPropertiesForFlags(t){var e;null==(e=this.featureFlags)||e.resetGroupPropertiesForFlags(t)}reset(t){var e=U(t)?t:null==t?void 0:t.resetDeviceID,i=U(t)||null==t?void 0:t.bootstrap;this.Id(e,!1,i)}Id(t,e,r){var s,n,o,a,l;if(void 0===e&&(e=!1),ue.info("reset"),!this.__loaded)return ue.uninitializedWarning("posthog.reset");var h=null==r?void 0:r.sessionID;this.config.bootstrap=r||(null==(s=this.Bh)?void 0:s.bootstrap)||{},null==(n=this.featureFlags)||null==n.updateConfig||n.updateConfig(this.config,this._shouldDisableFlags());var u=this.get_property(ze),d=this.get_property(qe),v=this.get_property(oi);null==(o=this.sessionRecording)||o.flushBeforeIdentityReset();var c=this.is_capturing();e||this.consent.reset(),e||!c||this.is_capturing()||console.warn("[PostHog.js]","reset() cleared the stored consent, and capturing is now off because of `opt_out_capturing_by_default`. Call opt_in_capturing() again, and prefer calling reset() before opting in rather than after.");var _=null==(a=this.persistence)||null==a.Ou?void 0:a.Ou(),p=this.$h;this.$h=p||e;var f=!1;try{var g,m,b,y,w,S,x,E,T,k,P,R,O;if(null==(g=this.persistence)||g.clear(),null==(m=this.sessionPersistence)||m.clear(),this.Rh.clear(),this.Sd(),C(v)||null==(b=this.persistence)||b.register({[oi]:v}),null==(y=this.surveys)||y.reset(),null==(w=this.featureFlags)||w.reset(),null==(S=this.conversations)||S.reset(),null==(x=this.logs)||x.reset(),null==(E=this.metrics)||E.reset(),null==(T=this.persistence)||T.set_property(Pi,Ki),null==(k=this.sessionManager)||k.resetSessionId(),this.jh=null,"always"===this.config.cookieless_mode)this.register_once({distinct_id:Di,$device_id:null},"");else{var I=this.config.get_device_id(br());this.register_once({distinct_id:I,$device_id:t?I:u},""),t||C(d)||this.register({[qe]:d})}if(this.register({$last_posthog_reset:/* @__PURE__ */(new Date).toISOString()},1),r)if(r.distinctID&&!this._h()&&(null==(O=this.persistence)||O.set_property(Pi,r.isIdentifiedID?Yi:Ki),this.register({distinct_id:r.distinctID})),null==(P=this.featureFlags)||P.initialize(),!(N(h)||null!=(R=this.sessionManager)&&R.setBootstrapSessionId(h,!0))){var A=i({},r);delete A.sessionID,this.config.bootstrap=A}delete this.config.identity_distinct_id,delete this.config.identity_hash,delete this.config.identity_claims,f=!0}finally{var M;this.$h=p,_&&(null==(M=this.persistence)||null==M.Nu||M.Nu(f))}this.vr&&(null==(l=this.conversations)||l.onRemoteConfig(this.vr)),this.reloadFeatureFlags()}shutdown(t){var e=this;return s(function*(){if(e.__loaded){e.Eh=!0,clearTimeout(e.Qh),e.Qh=void 0;var t=e.sd;for(var i of(e.sd=void 0,[()=>{var t;return null==(t=e.sessionRecording)?void 0:t.dispose()},()=>{var t;return null==(t=e.logs)?void 0:t.flushLogs("sendBeacon")},()=>{var t;return null==(t=e.metrics)?void 0:t.flush("sendBeacon")},()=>{var t;return null==(t=e.metrics)?void 0:t.dispose()},()=>{var t;return null==(t=e.logs)?void 0:t.dispose()},()=>{var t;return null==(t=e.surveys)?void 0:t.dispose()},()=>{var t;return null==(t=e.autocapture)?void 0:t.dispose()},()=>null==t?void 0:t(),()=>{var t;return null==(t=e.Hh)?void 0:t.unload()},()=>{var t;return null==(t=e.Wh)?void 0:t.unload()},()=>{var t;return null==(t=e.featureFlags)?void 0:t.destroy()},()=>{var t;return null==(t=e.persistence)?void 0:t.destroy()},()=>{var t;return null==(t=e.sessionPersistence)?void 0:t.destroy()}]))try{var r=i();r&&R(r.then)&&r.then(void 0,t=>{ue.error("Error during shutdown",t)})}catch(t){ue.error("Error during shutdown",t)}}else ue.uninitializedWarning("posthog.shutdown")})()}setIdentity(t,e){var i;delete this.config.identity_claims,this.config.identity_distinct_id=t,this.config.identity_hash=e,this.alias(t),null==(i=this.conversations)||i._onIdentityChanged()}clearIdentity(){var t;delete this.config.identity_distinct_id,delete this.config.identity_hash,delete this.config.identity_claims,null==(t=this.conversations)||t._onIdentityCleared()}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var t,e;return null!==(t=null==(e=this.sessionManager)?void 0:e.checkAndGetSessionAndWindowId(!0).sessionId)&&void 0!==t?t:""}get_session_replay_url(t){if(!this.sessionManager)return"";var e=this.sessionManager.checkAndGetSessionAndWindowId(!0),i=e.sessionStartTimestamp,r=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+e.sessionId);if(null!=t&&t.withTimestamp&&i){var s,n=null!==(s=t.timestampLookBack)&&void 0!==s?s:10;if(!i)return r;r+="?t="+Math.max(Math.floor(/* @__PURE__ */((new Date).getTime()-i)/1e3)-n,0)}return r}alias(t,e){return t===this.get_property("$people_distinct_id")?(ue.critical("Attempting to create alias for existing People user - aborting."),-2):this.$d("posthog.alias")?(C(e)&&(e=this.get_distinct_id()),t!==e?(this.Cd(We,t),this.capture("$create_alias",{alias:t,distinct_id:e})):(ue.warn("alias matches current distinct_id - skipping api call."),this.identify(t),-1)):void 0}set_config(t){var e=i({},this.config);if(O(t)){var r,s,n,o,a,l,h,u,d,v,c,_,p,f;nr(this.config,Jo(t));var g=this.Ih();if(this.persistence){var m,b,y,w="sessionStorage"===this.config.persistence||"memory"===this.config.persistence;w&&this.sessionPersistence!==this.persistence&&(null==(b=this.sessionPersistence)||b.remove(),null==(y=this.sessionPersistence)||y.destroy()),this.persistence.update_config(this.config,e,g),w?this.sessionPersistence=this.persistence:this.sessionPersistence===this.persistence?this.sessionPersistence=new Os(i({},this.config,{persistence:"sessionStorage"}),g,!1):null==(m=this.sessionPersistence)||m.update_config(i({},this.config,{persistence:"sessionStorage"}),i({},e,{persistence:"sessionStorage"}),g)}var S=this.qh(this.config.debug);U(S)&&(this.config.debug=S),U(this.config.debug)&&(this.config.debug?(ge.DEBUG=!0,Tr.Ot()&&Tr.$t("ph_debug",!0),ue.info("set_config",{config:t,oldConfig:e,newConfig:i({},this.config)})):(ge.DEBUG=!1,Tr.Ot()&&Tr.Dt("ph_debug"))),null==(r=this.featureFlags)||null==r.updateConfig||r.updateConfig(this.config,this._shouldDisableFlags()),null==(s=this.exceptionObserver)||s.onConfigChange(),null==(n=this.exceptions)||n.onConfigChange(),null==(o=this.metrics)||o.onConfigChange(),null==(a=this.webMCP)||a.startIfEnabled(),null==(l=this.sessionRecording)||l.startIfEnabledOrStop(),null==(h=this.tracingHeaders)||h.startIfEnabledOrStop(),null==(u=this.autocapture)||u.startIfEnabled(),null==(d=this.heatmaps)||d.startIfEnabled(),("capture_pageview"in t||"disable_capture_url_hashes"in t)&&(null==(v=this.historyAutocapture)||v.startIfEnabledOrStop()),null==(c=this.exceptionObserver)||c.startIfEnabledOrStop(),null==(_=this.deadClicksAutocapture)||_.startIfEnabledOrStop(),null==(p=this.surveys)||p.loadIfEnabled(),this.Ch(),null==(f=this.externalIntegrations)||f.startIfEnabledOrStop(),!e.segment&&this.config.segment&&this.persistence&&Hr(this,Io,!1)}}_overrideSDKInfo(t,e){ge.LIB_NAME=t,ge.LIB_VERSION=e}startSessionRecording(t){var e,i,r,s,n,o=!0===t,a={sampling:o||!(null==t||!t.sampling),linked_flag:o||!(null==t||!t.linked_flag),url_trigger:o||!(null==t||!t.url_trigger),event_trigger:o||!(null==t||!t.event_trigger)};Object.values(a).some(Boolean)&&(null==(e=this.sessionManager)||e.checkAndGetSessionAndWindowId(),a.sampling&&(null==(i=this.sessionRecording)||i.overrideSampling()),a.linked_flag&&(null==(r=this.sessionRecording)||r.overrideLinkedFlag()),a.url_trigger&&(null==(s=this.sessionRecording)||s.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 t;return!(null==(t=this.sessionRecording)||!t.started)}captureException(t,e){try{if(!this.exceptions)return;var r=this.exceptions.buildProperties(t,{handled:!0,syntheticException:/* @__PURE__ */new Error("PostHog syntheticException")});return this.exceptions.sendExceptionEvent(i({},r,e))}catch(t){return}}addExceptionStep(t,e){var i;null==(i=this.exceptions)||i.addExceptionStep(t,e)}captureLog(t){var e;null==(e=this.logs)||e.captureLog(t)}get logger(){var e,i;return null!==(e=null==(i=this.logs)?void 0:i.logger)&&void 0!==e?e:t.Ad}startExceptionAutocapture(t){this.set_config({capture_exceptions:null==t||t})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(t){var e,i;return null!==(e=null==(i=this.toolbar)?void 0:i.loadToolbar(t))&&void 0!==e&&e}get_property(t){var e;return null==(e=this.persistence)?void 0:e.props[t]}getSessionProperty(t){var e;return null==(e=this.sessionPersistence)?void 0:e.props[t]}toString(){var t,e=null!==(t=this.config.name)&&void 0!==t?t:qo;return e!==qo&&(e="posthog."+e),e}_isIdentified(){var t,e;return"identified"===(null==(t=this.persistence)?void 0:t.get_property("$user_state"))||"identified"===(null==(e=this.sessionPersistence)?void 0:e.get_property("$user_state"))}xd(){var t,e;return!("never"===this.config.person_profiles||"identified_only"===this.config.person_profiles&&!this._isIdentified()&&I(this.getGroups())&&(null==(t=this.persistence)||null==(t=t.props)||!t.__alias)&&(null==(e=this.persistence)||null==(e=e.props)||!e.$epp))}hd(){return!0===this.config.capture_pageleave||"if_capture_pageview"===this.config.capture_pageleave&&!!this.config.capture_pageview}createPersonProfile(){this.xd()||this.$d("posthog.createPersonProfile")&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.$d("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})}$d(t){return"never"===this.config.person_profiles?(ue.error(t+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.wh(),this.Cd(Mi,!0),!0)}Ih(){if("always"===this.config.cookieless_mode)return!0;var t=this.consent.isOptedOut();return this.config.disable_persistence||t&&!(!this.config.opt_out_persistence_by_default&&"on_reject"!==this.config.cookieless_mode)}Ch(){var t,e,i,r,s,n=this.Ih();return this.is_capturing()||null==(t=this.logs)||t._onOptOut(),(null==(e=this.persistence)?void 0:e.fi)!==n&&(null==(i=this.persistence)||i.set_disabled(n)),(null==(r=this.sessionPersistence)?void 0:r.fi)!==n&&(null==(s=this.sessionPersistence)||s.set_disabled(n)),this.Sd(),n}opt_in_capturing(e){var i,r,s,n;if("always"!==this.config.cookieless_mode){if(this._h()){var o,a,l,h,u,d;null==(o=this.sessionRecording)||o.dispose({discardBufferedEvents:!0}),this.Id(!0,!0),null==(a=this.sessionManager)||a.destroy(),null==(l=this.pageViewManager)||l.destroy(),this.sessionManager=new lo(this),this.pageViewManager=new Yr(this),this.persistence&&(this.sessionPropsManager=new so(this,this.sessionManager,this.persistence));var v,c=null!==(h=null==(u=this.config.__extensionClasses)?void 0:u.sessionRecording)&&void 0!==h?h:null==(d=t.__defaultExtensionClasses)?void 0:d.sessionRecording;c&&(this.sessionRecording=this.bh(this.sessionRecording,new c(this)),this.vr&&(null==(v=this.sessionRecording)||null==v.onRemoteConfig||v.onRemoteConfig(this.vr)))}var _,p,f=1===this.consent.consent;f&&this.xh(),this.consent.optInOut(!0),this.Ch(),this.ad(),null==(i=this.sessionRecording)||i.startIfEnabledOrStop(),"on_reject"==this.config.cookieless_mode&&(null==(_=this.surveys)||_.loadIfEnabled(),null==(p=this.conversations)||p.loadIfEnabled()),!f&&(C(null==e?void 0:e.captureEventName)||null!=e&&e.captureEventName)&&this.capture(null!==(r=null==e?void 0:e.captureEventName)&&void 0!==r?r:"$opt_in",null==e?void 0:e.captureProperties,{send_instantly:!0}),null==(s=this.persistence)||s.syncCookieProperties(),this.Zh(),null==(n=this.featureFlags)||n.sendFlagCallsPendingCapture(),this.config.capture_pageview&&this.ld()}else ue.warn(Co)}opt_out_capturing(){"always"!==this.config.cookieless_mode?(this.consent.optInOut(!1),this.Ch(),"on_reject"===this.config.cookieless_mode&&this.Th()):ue.warn(Co)}Th(){var t,e,i=this.sessionRecording;null==i||i.dispose({discardBufferedEvents:!0}),"$posthog_cookieless"!==this.get_distinct_id()&&this.Id(!0,!0),this.register({distinct_id:Di,$device_id:null}),this.mh(i),this.sessionRecording=void 0,null==(t=this.sessionManager)||t.destroy(),null==(e=this.pageViewManager)||e.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,this.config.capture_pageview&&this.ld(),this.ad()}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var t=this.consent.consent;return 1===t?"granted":0===t?"denied":"pending"}is_capturing(){return!this.$h&&("always"===this.config.cookieless_mode||("on_reject"===this.config.cookieless_mode?this.consent.isRejected()||this.consent.isOptedIn():!this.has_opted_out_capturing()))}clear_opt_in_out_capturing(){this.consent.reset(),this.Ch()}_is_bot(){return a?function(t,e){if(!t)return!1;var i=t.userAgent;if(i&&J(i,e))return!0;try{var r=null==t?void 0:t.userAgentData;if(null!=r&&r.brands&&r.brands.some(t=>J(null==t?void 0:t.brand,e)))return!0}catch(t){}return!!t.webdriver}(a,this.config.custom_blocked_useragents):void 0}ld(){l&&("visible"===l.visibilityState?this.Dh||(this.Dh=!0,this.capture(Zi,{title:l.title},{send_instantly:!0}),this.Lh&&(l.removeEventListener(Ae,this.Lh),this.Lh=null)):this.Lh||(this.Lh=this.ld.bind(this),dr(l,Ae,this.Lh)))}debug(t){!1===t?(null==n||n.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(null==n||n.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),this.set_config({debug:!0}))}_shouldDisableFlags(){var t=this.Bh||{};return"advanced_disable_flags"in t?!!t.advanced_disable_flags:!1!==this.config.advanced_disable_flags?!!this.config.advanced_disable_flags:!0===this.config.advanced_disable_decide?(ue.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):function(t,e,i,r,s){var n=e in t&&!N(t[e]),o=i in t&&!N(t[i]);return n?t[e]:!!o&&(s&&s.warn("Config field '"+i+"' is deprecated. Please use '"+e+"' instead. The old field will be removed in a future major version."),t[i])}(t,"advanced_disable_flags","advanced_disable_decide",0,ue)}Fs(t){var e;if(N(this.config.before_send))return t;var i=Object.keys(null!==(e=t.properties)&&void 0!==e?e:{}).filter(j),r=P(this.config.before_send)?this.config.before_send:[this.config.before_send],s=t;for(var n of r)try{if(s=n(s),N(s)){var o="Event '"+t.event+"' was rejected in beforeSend function";return L(t.event)?ue.warn(o+". This can cause unexpected behavior."):ue.info(o),null}s.properties&&!I(s.properties)||ue.warn("Event '"+t.event+"' has no properties after beforeSend function, this is likely an error.")}catch(e){return ue.error("Error in beforeSend function for event '"+t.event+"':",e),null}for(var a of i)if(s.properties&&N(s.properties[a]))return ue.warn("Event '"+t.event+"' had its '"+a+"' property removed in a beforeSend function. This property is required for ingestion, so the event will be dropped."),null;return s}getPageViewId(){var t;return null==(t=this.pageViewManager.Ul)?void 0:t.pageViewId}captureTraceFeedback(t,e){this.capture("$ai_feedback",{$ai_trace_id:String(t),$ai_feedback_text:e})}captureTraceMetric(t,e,i){this.capture("$ai_metric",{$ai_trace_id:String(t),$ai_metric_name:e,$ai_metric_value:String(i)})}qh(t){var e=U(t)&&!t,i=Tr.Ot()&&"true"===Tr.Lt("ph_debug");return!e&&(!!i||t)}},t.__defaultExtensionClasses={},t.Ad={trace:_o=()=>{},debug:_o,info:_o,warn:_o,error:_o,fatal:_o},t);!function(t,e){for(var i=0;e.length>i;i++)t.prototype[e[i]]=or(t.prototype[e[i]])}(Yo,["identify"]);var Xo=function(){ge.SDK_DIST_CHANNEL="npm";var t=Ro[qo]=new Yo;return function(){function t(){t.done||(t.done=!0,Qn=!1,sr(Ro,function(t){t._dom_loaded()}))}null!=l&&l.addEventListener?"complete"===l.readyState?t():dr(l,"DOMContentLoaded",t,{capture:!1}):n&&ue.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")}(),t}();export{Is as Compression,Ws as DEFAULT_PRODUCT_TOUR_APPEARANCE,zs as DisplaySurveyType,Yo as PostHog,Gs as ProductTourEventName,Hs as ProductTourEventProperties,Ls as SurveyEventName,js as SurveyEventProperties,Cs as SurveyEventType,Ms as SurveyPosition,Bs as SurveyQuestionBranchingType,Fs as SurveyQuestionType,Us as SurveySchedule,Ds as SurveyTabPosition,Ns as SurveyType,As as SurveyWidgetType,Xo as default,Xo as posthog,Xs as severityLevels};
|