PageSourceSearch

https://www.alphuel.com/_next/static/chunks/2wjq-539kapiw.js?dpl=dpl_BpoFnwTh3WX6WaqQGg1sNRrqAQ2T

js alphuel.com collected 2026-10-04 03:10:34 UTC 258,542 bytes, 49 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,14221,e=>{"use strict";var t=e.i(43476),i=e.i(52499),r=e.i(48024),s=e.i(57688);e.s(["default",0,function(){let e,n,{cartItems:o,isCartOpen:a,setIsCartOpen:l,updateQuantity:u,removeFromCart:c,getCartCount:d,isMounted:h}=(0,i.useCart)();if(!h)return null;let p=e=>{let t=Number(e.variant.price),i=[...[...Array.isArray(e.product.pricing_tiers)?e.product.pricing_tiers:[]].sort((e,t)=>e.tier-t.tier)].reverse().find(t=>e.quantity>=t.tier);return i?t*(1-i.discount/100):t},g=o.reduce((e,t)=>e+p(t)*t.quantity,0),f=d(),v=g>=300,_=300-g,m=Math.min(g/300*100,100);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:`slide-cart-overlay ${a?"open":""}`,onClick:()=>l(!1)}),(0,t.jsxs)("div",{className:`slide-cart-drawer flex flex-col h-full bg-white border-l border-line overflow-hidden ${a?"open":""}`,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-4 pt-6 pb-4 md:px-8 md:pt-12 md:pb-6 border-b border-line shrink-0",children:[(0,t.jsxs)("h5",{className:"text-ink-deep",children:["Your Cart (",f,")"]}),(0,t.jsx)("button",{className:"flex items-center justify-center text-ink transition-opacity hover:opacity-70","aria-label":"Close cart",onClick:()=>l(!1),children:(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-x","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M18 6 6 18"}),(0,t.jsx)("path",{d:"m6 6 12 12"})]})})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 px-4 pt-7 pb-4 border-b border-line md:gap-2 md:px-8 md:pt-6 md:pb-5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"h-1.5 min-w-12 flex-1 overflow-hidden rounded-full bg-ink/10",role:"progressbar","aria-label":"Free shipping progress","aria-valuemin":"0","aria-valuemax":300,"aria-valuenow":g,children:(0,t.jsx)("div",{className:"h-full rounded-full bg-green transition-[width] duration-700 ease-out motion-reduce:transition-none",style:{width:`${m}%`}})}),(0,t.jsxs)("span",{className:"inline-flex shrink-0 items-center gap-1.5 whitespace-nowrap rounded-full border px-2.5 py-1 text-xs font-medium transition-colors duration-300 border-line bg-white text-ink",children:[(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-truck","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2"}),(0,t.jsx)("path",{d:"M15 18H9"}),(0,t.jsx)("path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14"}),(0,t.jsx)("circle",{cx:"17",cy:"18",r:"2"}),(0,t.jsx)("circle",{cx:"7",cy:"18",r:"2"})]}),"Free Shipping"]})]}),(0,t.jsx)("p",{className:"text-sm font-medium text-ink",children:v?(0,t.jsx)("span",{className:"font-semibold text-green",children:"You've unlocked free shipping!"}):(0,t.jsxs)(t.Fragment,{children:["You're ",(0,t.jsxs)("span",{className:"font-semibold",children:["$",_.toFixed(2)]})," away from free shipping"]})})]}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto px-4 pt-6 pb-4 md:px-8 md:pt-12 md:pb-6 border-b border-line",children:(0,t.jsx)("div",{className:"flex flex-col gap-8",children:0===o.length?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center h-full text-center py-12",children:[(0,t.jsx)("p",{className:"text-ink-deep font-medium text-base mb-2",children:"Your cart is empty"}),(0,t.jsx)("button",{onClick:()=>l(!1),className:"inline-flex items-center justify-center rounded-full bg-ink text-surface font-medium text-sm transition-colors hover:bg-ink/85 px-6 py-2.5 mt-4 cursor-pointer",children:"Continue Shopping"})]}):o.map(e=>{let i=p(e),r=e.product.image||`/assets/products/${e.product.id}.png`;return(0,t.jsxs)("div",{className:"flex gap-4 md:gap-7.25 items-center w-full",children:[(0,t.jsx)("div",{className:"size-20 md:size-34.75 shrink-0 rounded-xl overflow-hidden bg-black/[0.03] relative",children:(0,t.jsx)(s.default,{alt:e.product.name,className:"object-cover",style:{objectPosition:"center 15%"},src:r,fill:!0,sizes:"(max-width: 768px) 80px, 140px"})}),(0,t.jsxs)("div",{className:"flex flex-1 flex-col gap-4 md:gap-6",children:[(0,t.jsxs)("div",{className:"flex gap-4 md:gap-6 items-start justify-between",children:[(0,t.jsxs)("div",{className:"flex flex-1 flex-col gap-1 md:gap-2",children:[(0,t.jsx)("p",{className:"text-sm md:text-base text-ink",children:e.product.name}),(0,t.jsx)("p",{className:"text-sm text-deactivated",children:e.variant.name})]}),(0,t.jsx)("div",{className:"flex flex-col gap-1 items-end",children:(0,t.jsxs)("p",{className:"text-sm text-ink",children:["$",i.toFixed(2)]})})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("button",{onClick:()=>u(e.product.id,e.variant.name,e.quantity-1),disabled:e.quantity<=1,className:"flex size-10 items-center justify-center rounded-l-lg border border-line-subtle text-sm font-medium text-deactivated transition-colors hover:bg-ink/3 disabled:opacity-60 disabled:cursor-not-allowed","aria-label":"Decrease quantity",children:(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-minus","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M5 12h14"})})}),(0,t.jsx)("div",{className:"flex size-10 items-center justify-center border-y border-line-subtle text-sm font-medium text-ink",children:e.quantity}),(0,t.jsx)("button",{onClick:()=>u(e.product.id,e.variant.name,e.quantity+1),className:"flex size-10 items-center justify-center rounded-r-lg border border-line-subtle text-sm font-medium text-deactivated transition-colors hover:bg-ink/3","aria-label":"Increase quantity",children:(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-plus","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M5 12h14"}),(0,t.jsx)("path",{d:"M12 5v14"})]})})]}),(0,t.jsx)("button",{onClick:()=>c(e.product.id,e.variant.name),className:"flex size-10 items-center justify-center text-ink transition-opacity hover:opacity-70","aria-label":"Remove item",children:(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-trash2 lucide-trash-2","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M10 11v6"}),(0,t.jsx)("path",{d:"M14 11v6"}),(0,t.jsx)("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"}),(0,t.jsx)("path",{d:"M3 6h18"}),(0,t.jsx)("path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})]})})]})]})]},`${e.product.id}-${e.variant.name}`)})})}),f>0&&(0,t.jsxs)("div",{className:"flex flex-col shrink-0",children:[(0,t.jsx)("div",{className:"px-4 py-4 md:px-8 md:py-6",children:(0,t.jsxs)("div",{className:"flex flex-col gap-3.5",children:[(0,t.jsxs)("div",{className:"flex items-start text-ink-deep",children:[(0,t.jsxs)("p",{className:"flex-1 text-sm",children:["Subtotal (",f," ",1===f?"item":"items",")"]}),(0,t.jsxs)("p",{className:"text-sm",children:["$",g.toFixed(2)]})]}),(n=g-(e=.3*o.reduce((e,t)=>
1(Array.isArray(t.product.pricing_tiers)?t.product.pricing_tiers:[]).some(e=>t.quantity>=e.tier)?e:e+p(t)*t.quantity,0)),(0,t.jsxs)(t.Fragment,{children:[e>0&&(0,t.jsxs)("div",{className:"flex items-center justify-between",style:{color:"#2e7d32",fontWeight:500},children:[(0,t.jsx)("p",{className:"text-sm",children:"30% OFF (ALP30) Applied:"}),(0,t.jsxs)("p",{className:"text-sm",children:["- $",e.toFixed(2)]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between text-ink mt-1",children:[(0,t.jsx)("p",{className:"text-base font-semibold",children:"Total Amount:"}),(0,t.jsxs)("p",{className:"text-base font-semibold",children:["$",n.toFixed(2)]})]})]}))]})}),(0,t.jsxs)("div",{className:"flex flex-col gap-4 border-t border-line px-4 pt-4 pb-6 md:px-8 md:pt-6 md:pb-8",children:[(0,t.jsx)("button",{onClick:()=>l(!1),className:"inline-flex items-center justify-center rounded-full border border-line text-ink font-medium text-sm md:text-base transition-colors hover:bg-black/5 px-5 w-full py-3 cursor-pointer",children:"Continue Shopping"}),(0,t.jsx)("button",{onClick:()=>(0,r.triggerTagadaCheckout)(o),className:"inline-flex items-center justify-center rounded-full font-medium text-sm md:text-base transition-colors ease-in-out duration-200 disabled:bg-gray disabled:text-white disabled:cursor-not-allowed focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary bg-ink text-surface not-disabled:hover:bg-ink/85 not-disabled:active:bg-black px-5 w-full py-3",children:"Checkout"}),(0,t.jsxs)("p",{className:"text-xs text-deactivated text-center",children:["Taxes and ",(0,t.jsx)("span",{className:"underline cursor-pointer",children:"shipping"})," calculated at checkout"]})]})]})]})]})}])},20565,4570,e=>{"use strict";var t,i,r="u">typeof window?window:void 0,s="u">typeof globalThis?globalThis:r;"u"<typeof self&&(s.self=s),"u"<typeof File&&(s.File=function(){});var n=null==s?void 0:s.navigator,o=null==s?void 0:s.document,a=null==s?void 0:s.location,l=null==s?void 0:s.fetch,u=null!=s&&s.XMLHttpRequest&&"withCredentials"in new s.XMLHttpRequest?s.XMLHttpRequest:void 0,c=null==s?void 0:s.AbortController,d=null==s?void 0:s.CompressionStream,h=null==n?void 0:n.userAgent,p=null!=r?r:{},g="1.383.1",f={DEBUG:!1,LIB_VERSION:g,LIB_NAME:"web",JS_SDK_VERSION:g};function v(e,t,i,r,s,n,o){try{var a=e[n](o),l=a.value}catch(e){return void i(e)}a.done?t(l):Promise.resolve(l).then(r,s)}function _(e){return function(){var t=this,i=arguments;return new Promise(function(r,s){var n=e.apply(t,i);function o(e){v(n,r,s,o,a,"next",e)}function a(e){v(n,r,s,o,a,"throw",e)}o(void 0)})}}function m(){return(m=Object.assign.bind()).apply(null,arguments)}function y(e,t){if(null==e)return{};var i={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;i[r]=e[r]}return i}var b,w,x,k=((b={}).GZipJS="gzip-js",b.Base64="base64",b),E=["$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"],S="NativeGzipValidationError",P=e=>e.length>=2&&31===e[0]&&139===e[1],F=e=>!(!e||"object"!=typeof e)&&"NotReadableError"===("name"in e?String(e.name):""),I=e=>{var t=Error("Native gzip produced invalid output: "+e);throw t.name=S,t},C=(w=_(function*(e,t){18>e.size&&I("too-short");var i=new Uint8Array((yield e.slice(0,10).arrayBuffer()));P(i)&&8===i[2]||I("invalid-header");var r=new DataView((yield e.slice(e.size-8).arrayBuffer()));r.getUint32(0,!0)!==(e=>{for(var t=(()=>{if(x)return x;x=[];for(var e=0;256>e;e++){for(var t=e,i=0;8>i;i++)t=1&t?0xedb88320^t>>>1:t>>>1;x[e]=t>>>0}return x})(),i=0xffffffff,r=0;e.length>r;r++)i=t[255&(i^e[r])]^i>>>8;return(0xffffffff^i)>>>0})(t)&&I("invalid-crc");var s=t.length>>>0;r.getUint32(4,!0)!==s&&I("invalid-size")}),function(e,t){return w.apply(this,arguments)});function M(){return(M=_(function*(e,t,i){void 0===t&&(t=!0);try{var r,s=(new TextEncoder).encode(e),n=new CompressionStream("gzip"),o=n.writable.getWriter(),a=o.write(s).then(()=>o.close()).catch((r=_(function*(e){try{yield o.abort(e)}catch(e){}throw e}),function(e){return r.apply(this,arguments)})),l=new Response(n.readable).blob(),[u]=yield Promise.all([l,a]);return yield C(u,s),u}catch(e){if(null!=i&&i.rethrow)throw e;return t&&console.error("Failed to gzip compress data",e),null}})).apply(this,arguments)}var j=["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","hub
1spot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],L=function(e,t){if(void 0===t&&(t=[]),!e)return!1;var i=e.toLowerCase();return j.concat(t).some(e=>{var t=e.toLowerCase();return -1!==i.indexOf(t)})};function R(e,t){return -1!==e.indexOf(t)}var T=function(e){return e.trim()},$=function(e){return e.replace(/^\$/,"")},O=Object.prototype,A=O.hasOwnProperty,N=O.toString,D=Array.isArray||function(e){return"[object Array]"===N.call(e)},q=e=>"function"==typeof e,H=e=>e===Object(e)&&!D(e),V=e=>{if(H(e)){for(var t in e)if(A.call(e,t))return!1;return!0}return!1},W=e=>void 0===e,G=e=>"[object String]"==N.call(e),z=e=>G(e)&&0===e.trim().length,B=e=>null===e,U=e=>W(e)||B(e),Y=e=>"[object Number]"==N.call(e)&&e==e,X=e=>Y(e)&&e>0,Z=e=>"[object Boolean]"===N.call(e),J=e=>R(E,e);function K(e){return null===e||"object"!=typeof e}function Q(e,t){return({}).toString.call(e)==="[object "+t+"]"}function ee(e){return"u">typeof Event&&function(e,t){try{return e instanceof t}catch(e){return!1}}(e,Event)}var et=[!0,"true",1,"1","yes"],ei=[!1,"false",0,"0","no"];function er(e,t,i,r,s){return t>i&&(r.warn("min cannot be greater than max."),t=i),Y(e)?e>i?(r.warn(" cannot be  greater than max: "+i+". Using max value instead."),i):t>e?(r.warn(" cannot be less than min: "+t+". Using min value instead."),t):e:(r.warn(" must be a number. using max or fallback. max: "+i+", fallback: "+s),er(s||i,t,i,r))}class es{constructor(e){this.$t={},this.zt=e.zt,this.Zt=er(e.bucketSize,0,100,e.Gt),this.Qt=er(e.refillRate,0,this.Zt,e.Gt),this.Jt=er(e.refillInterval,0,864e5,e.Gt)}Kt(e,t){var i=Math.floor((t-e.lastAccess)/this.Jt);i>0&&(e.tokens=Math.min(e.tokens+i*this.Qt,this.Zt),e.lastAccess=e.lastAccess+i*this.Jt)}consumeRateLimit(e){var t,i=Date.now(),r=String(e),s=this.$t[r];return s?this.Kt(s,i):this.$t[r]=s={tokens:this.Zt,lastAccess:i},0===s.tokens||(s.tokens--,0===s.tokens&&(null==(t=this.zt)||t.call(this,e)),0===s.tokens)}stop(){this.$t={}}}var en,eo,ea,el="Mobile",eu="Android",ec="Tablet",ed=eu+" "+ec,eh="iPad",ep="Apple",eg=ep+" Watch",ef="Safari",ev="BlackBerry",e_="Samsung",em=e_+"Browser",ey=e_+" Internet",eb="Chrome",ew=eb+" OS",ex=eb+" iOS",ek="Internet Explorer",eE=ek+" "+el,eS="Opera",eP=eS+" Mini",eF="Edge",eI="Microsoft "+eF,eC="Firefox",eM=eC+" iOS",ej="Nintendo",eL="PlayStation",eR="Xbox",eT=eu+" "+el,e$=el+" "+ef,eO="Windows",eA=eO+" Phone",eN="Nokia",eD="Ouya",eq="Generic",eH=eq+" "+el.toLowerCase(),eV=eq+" "+ec.toLowerCase(),eW="Konqueror",eG="Oculus Browser",ez="Vivaldi",eB="Yandex",eU="Whale",eY="DuckDuckGo",eX="Pale Moon",eZ="Waterfox",eJ="Brave",eK="(\\d+(\\.\\d+)?)",eQ=RegExp("Version/"+eK),e0=RegExp(eR,"i"),e1=RegExp(eL+" \\w+","i"),e2=RegExp(ej+" \\w+","i"),e3=RegExp(ev+"|PlayBook|BB10","i"),e5={"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"},e6=function(e,t,i){var r;return t=t||"",(null!=i&&i.brave?eJ:null)||(R(e," OPR/")&&R(e,"Mini")?eP:R(e," OPR/")?eS:e3.test(e)?ev:R(e,"IE"+el)||R(e,"WPDesktop")?eE:R(e,"OculusBrowser")?eG:R(e,em)?ey:R(e,eF)||R(e,"Edg/")?eI:R(e,ez+"/")?ez:R(e,"YaBrowser/")?eB:R(e,eU+"/")?eU:R(e,eY+"/")||R(e,"Ddg/")?eY:R(e,"FBIOS")?"Facebook "+el:R(e,"UCWEB")||R(e,"UCBrowser")?"UC Browser":R(e,"CriOS")?ex:R(e,"CrMo")||R(e,eb)?eb:R(e,eu)&&R(e,ef)?eT:R(e,"FxiOS")?eM:R(e.toLowerCase(),eW.toLowerCase())?eW:R(e,eJ+"/")?eJ:(r=t)&&R(r,ep)||R(e,ef)&&!
1R(e,eb)&&!R(e,eu)?R(e,el)?e$:ef:R(e,"PaleMoon/")?eX:R(e,eZ+"/")?eZ:R(e,eC)?eC:R(e,"MSIE")||R(e,"Trident/")?ek:R(e,"Gecko")?eC:"")},e4={[eE]:[RegExp("rv:"+eK)],[eI]:[RegExp(eF+"?\\/"+eK)],[eb]:[RegExp("("+eb+"|CrMo)\\/"+eK)],[ex]:[RegExp("CriOS\\/"+eK)],"UC Browser":[RegExp("(UCBrowser|UCWEB)\\/"+eK)],[ef]:[eQ],[e$]:[eQ],[eS]:[RegExp("(Opera|OPR)\\/"+eK)],[eC]:[RegExp(eC+"\\/"+eK)],[eM]:[RegExp("FxiOS\\/"+eK)],[eW]:[RegExp("Konqueror[:/]?"+eK,"i")],[ev]:[RegExp(ev+" "+eK),eQ],[eT]:[RegExp("android\\s"+eK,"i")],[ey]:[RegExp(em+"\\/"+eK)],[eG]:[RegExp("OculusBrowser\\/"+eK)],[ez]:[RegExp(ez+"\\/"+eK)],[eB]:[RegExp("YaBrowser\\/"+eK)],[eU]:[RegExp(eU+"\\/"+eK)],[eJ]:[RegExp(eJ+"\\/"+eK)],[eY]:[RegExp("(DuckDuckGo|Ddg)\\/"+eK)],[eX]:[RegExp("PaleMoon\\/"+eK)],[eZ]:[RegExp(eZ+"\\/"+eK)],[ek]:[RegExp("(rv:|MSIE )"+eK)],Mozilla:[RegExp("rv:"+eK)]},e8=function(e,t,i){var r=e4[e6(e,t,i)];if(W(r))return null;for(var s=0;r.length>s;s++){var n=e.match(r[s]);if(n)return parseFloat(n[n.length-2])}return null},e9=[[RegExp(eR+"; "+eR+" (.*?)[);]","i"),e=>[eR,e&&e[1]||""]],[RegExp(ej,"i"),[ej,""]],[RegExp(eL,"i"),[eL,""]],[e3,[ev,""]],[RegExp(eO,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[eA,""];if(new RegExp(el).test(t)&&!/IEMobile\b/.test(t))return[eO+" "+el,""];var i=/Windows NT ([0-9.]+)/i.exec(t);if(i&&i[1]){var r=e5[i[1]]||"";return/arm/i.test(t)&&(r="RT"),[eO,r]}return[eO,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>e&&e[3]?["iOS",[e[3],e[4],e[5]||"0"].join(".")]:["iOS",""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t="";return e&&e.length>=3&&(t=W(e[2])?e[3]:e[2]),["watchOS",t]}],[RegExp("("+eu+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+eu+")","i"),e=>e&&e[2]?[eu,[e[2],e[3],e[4]||"0"].join(".")]:[eu,""]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var t=["Mac OS X",""];return e&&e[1]&&(t[1]=[e[1],e[2],e[3]||"0"].join(".")),t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[ew,""]],[/Linux|debian/i,["Linux",""]]],e7=function(e){return e2.test(e)?ej:e1.test(e)?eL:e0.test(e)?eR:RegExp(eD,"i").test(e)?eD:RegExp("("+eA+"|WPDesktop)","i").test(e)?eA:/iPad/.test(e)?eh:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?eg:e3.test(e)?ev:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":RegExp(eN,"i").test(e)?eN:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?new RegExp(el).test(e)&&!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)||/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?eu:ed:RegExp("(pda|"+el+")","i").test(e)?eH:RegExp(ec,"i").test(e)&&!RegExp(ec+" pc","i").test(e)?eV:""},te=e=>e instanceof Error,tt={trace:{text:"TRACE",number:1},debug:{text:"DEBUG",number:5},info:{text:"INFO",number:9},warn:{text:"WARN",number:13},error:{text:"ERROR",number:17},fatal:{text:"FATAL",number:21}},ti=tt.info;function tr(e){var t=[];for(var i in e){var r=e[i];B(r)||W(r)||t.push({key:i,value:function e(t){if(Z(t))return{boolValue:t};if("number"==typeof t)return Number.isFinite(t)?Number.isInteger(t)?{intValue:t}:{doubleValue:t}:{stringValue:String(t)};if("string"==typeof t)return{stringValue:t};if(D(t))return{arrayValue:{values:t.map(t=>e(t))}};try{return{stringValue:JSON.stringify(t)}}catch(e){return{stringValue:String(t)}}}(r)})}return t}class ts{constructor(e,t,i){void 0===i&&(i=[]),this.coercers=e,this.stackParser=t,this.modifiers=i}buildFromUnknown(e,t){void 0===t&&(t={});var i=t&&t.mechanism||{handled:!0,type:"generic"},r=this.buildCoercingContext(i,t,0).apply(e),s=this.buildParsingContext(t),n=this.parseStacktrace(r,s);return{$exception_list:this.convertToExceptionList(n,i),$exception_level:"error"}}modifyFrames(e){var t=this;return _(function*(){for(var i of e)i.stacktrace&&i.stacktrace.frames&&D(i.stacktrace.frames)&&(i.stacktrace.frames=yield t.applyModifiers(i.stacktrace.frames));return e})()}coerceFallback(e){var t;return{type:"Error",value:"Unknown error",stack:null==(t=e.syntheticException)?void 0:t.stack,synthetic:!0}}parseStacktrace(e,t){var i,r;return null!=e.cause&&(i=this.parseStacktrace(e.cause,t)),""!=e.stack&&null!=e.stack&&(r=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?t.ski
1pFirstLines:0),t.chunkIdMap)),m({},e,{cause:i,stack:r})}applyChunkIds(e,t){return e.map(e=>(e.filename&&t&&(e.chunk_id=t[e.filename]),e))}applyCoercers(e,t){for(var i of this.coercers)if(i.match(e))return i.coerce(e,t);return this.coerceFallback(t)}applyModifiers(e){var t=this;return _(function*(){var i=e;for(var r of t.modifiers)i=yield r(i);return i})()}convertToExceptionList(e,t){var i,r,s,n={type:e.type,value:e.value,mechanism:{type:null!=(i=t.type)?i:"generic",handled:null==(r=t.handled)||r,synthetic:null!=(s=e.synthetic)&&s}};e.stack&&(n.stacktrace={type:"raw",frames:e.stack});var o=[n];return null!=e.cause&&o.push(...this.convertToExceptionList(e.cause,m({},t,{handled:!0}))),o}buildParsingContext(e){var t;return{chunkIdMap:function(e){var t=globalThis._posthogChunkIds;if(t){var i=Object.keys(t);return ea&&i.length===eo||(eo=i.length,ea=i.reduce((i,r)=>{en||(en={});var s=en[r];if(s)i[s[0]]=s[1];else for(var n=e(r),o=n.length-1;o>=0;o--){var a=n[o],l=null==a?void 0:a.filename,u=t[r];if(l&&u){i[l]=u,en[r]=[l,u];break}}return i},{})),ea}}(this.stackParser),skipFirstLines:null!=(t=e.skipFirstLines)?t:1}}buildCoercingContext(e,t,i){void 0===i&&(i=0);var r=(i,r)=>{if(4>=r){var s=this.buildCoercingContext(e,t,r);return this.applyCoercers(i,s)}};return m({},t,{syntheticException:0==i?t.syntheticException:void 0,mechanism:e,apply:e=>r(e,i),next:e=>r(e,i+1)})}}function tn(e,t,i,r,s){var n={platform:e,filename:t,function:"<anonymous>"===i?"?":i,in_app:!0};return W(r)||(n.lineno=r),W(s)||(n.colno=s),n}var to=(e,t)=>{var i=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return i||r?[-1!==e.indexOf("@")?e.split("@")[0]:"?",i?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},ta=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,tl=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,tu=/\((\S*)(?::(\d+))(?::(\d+))\)/,tc=(e,t)=>{var i=ta.exec(e);if(i){var[,r,s,n]=i;return tn(t,r,"?",+s,+n)}var o=tl.exec(e);if(o){if(o[2]&&0===o[2].indexOf("eval")){var a=tu.exec(o[2]);a&&(o[2]=a[1],o[3]=a[2],o[4]=a[3])}var[l,u]=to(o[1]||"?",o[2]);return tn(t,u,l,o[3]?+o[3]:void 0,o[4]?+o[4]:void 0)}},td=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,th=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,tp=(e,t)=>{var i=td.exec(e);if(i){if(i[3]&&i[3].indexOf(" > eval")>-1){var r=th.exec(i[3]);r&&(i[1]=i[1]||"eval",i[3]=r[1],i[4]=r[2],i[5]="")}var s=i[3],n=i[1]||"?";return[n,s]=to(n,s),tn(t,s,n,i[4]?+i[4]:void 0,i[5]?+i[5]:void 0)}},tg=/\(error: (.*)\)/;class tf{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,t){var i=G(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:i?e.stack:void 0,cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return this.isDOMError(e)?"DOMError":"DOMException"}getValue(e){var t=e.name||(this.isDOMError(e)?"DOMError":"DOMException");return e.message?t+": "+e.message:t}isDOMException(e){return Q(e,"DOMException")}isDOMError(e){return Q(e,"DOMError")}}class tv{match(e){return e instanceof Error}coerce(e,t){return{type:this.getType(e),value:this.getMessage(e,t),stack:this.getStack(e),cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return e.name||e.constructor.name}getMessage(e,t){var i=e.message;return String(i.error&&"string"==typeof i.error.message?i.error.message:i)}getStack(e){return e.stacktrace||e.stack||void 0}}class t_{match(e){return Q(e,"ErrorEvent")&&null!=e.error}coerce(e,t){var i;return t.apply(e.error)||{type:"ErrorEvent",value:e.message,stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}}var tm=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class ty{match(e){return"string"==typeof e}coerce(e,t){var i,[r,s]=this.getInfos(e);return{type:null!=r?r:"Error",value:null!=s?s:e,stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}getInfos(e){var t="Error",i=e,r=e.match(tm);return r&&(t=r[1],i=r[2]),[t,i]}}var tb=["fatal","error","warning","log","info","debug"];function tw(e,t){void 0===t&&(t=40);var i=Object.keys(e);if(i.sort(),!i.length)return"[object has no keys]";for(var r=i.length;r>0;r--){var s=i.slice(0,r).join(", ");
1if(t>=s.length)return r===i.length?s:s.length>t?s.slice(0,t)+"...":s}return""}class tx{match(e){return"object"==typeof e&&null!==e}coerce(e,t){var i,r=this.getErrorPropertyFromObject(e);return r?t.apply(r):{type:this.getType(e),value:this.getValue(e),stack:null==(i=t.syntheticException)?void 0:i.stack,level:this.isSeverityLevel(e.level)?e.level:"error",synthetic:!0}}getType(e){return ee(e)?e.constructor.name:"Error"}getValue(e){if("name"in e&&"string"==typeof e.name){var t="'"+e.name+"' captured as exception";return"message"in e&&"string"==typeof e.message&&(t+=" with message: '"+e.message+"'"),t}if("message"in e&&"string"==typeof e.message)return e.message;var i=this.getObjectClassName(e);return(i&&"Object"!==i?"'"+i+"'":"Object")+" captured as exception with keys: "+tw(e)}isSeverityLevel(e){return G(e)&&!z(e)&&tb.indexOf(e)>=0}getErrorPropertyFromObject(e){for(var t in e)if(({}).hasOwnProperty.call(e,t)){var i=e[t];if(te(i))return i}}getObjectClassName(e){try{var t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){return}}}class tk{match(e){return ee(e)}coerce(e,t){var i,r=e.constructor.name;return{type:r,value:r+" captured as exception with keys: "+tw(e),stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}}class tE{match(e){return K(e)}coerce(e,t){var i;return{type:"Error",value:"Primitive value captured as exception: "+String(e),stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}}class tS{match(e){return Q(e,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(e)}isCustomEventWrappingRejection(e){if(!ee(e))return!1;try{var t=e.detail;return null!=t&&"object"==typeof t&&"reason"in t}catch(e){return!1}}coerce(e,t){var i,r=this.getUnhandledRejectionReason(e);return K(r)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(r),stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}:t.apply(r)}getUnhandledRejectionReason(e){try{if("reason"in e)return e.reason;if("detail"in e&&null!=e.detail&&"object"==typeof e.detail&&"reason"in e.detail)return e.detail.reason}catch(e){}return e}}var tP="$message",tF="$timestamp",tI=new Set([tP,tF]),tC={enabled:!0,max_bytes:32768};function tM(e){var t;return e?{enabled:null!=(t=e.enabled)?t:tC.enabled,max_bytes:function(e,t){if(!Y(e)||e===1/0||e===-1/0)return t;var i=Math.floor(e);return 0>i?t:i}(e.max_bytes,tC.max_bytes)}:m({},tC)}class tj{constructor(e){this.Yt=[],this.Xt=0,this.qt=tM(e)}setConfig(e){this.qt=tM(e),this.er()}add(e){var t=function(e){var t=function(e){var t=new WeakSet;try{return JSON.stringify(e,(e,i)=>{if("bigint"==typeof i)return i.toString();if("function"!=typeof i&&"symbol"!=typeof i){if(i instanceof Date)return i.toISOString();if(i instanceof Error)return{name:i.name,message:i.message,stack:i.stack};if(i&&"object"==typeof i){if(t.has(i))return"[Circular]";t.add(i)}return i}})}catch(e){return}}(e);if(t)try{var i=JSON.parse(t);if(!H(i))return;var r=i[tP],s=i[tF];
1if(!G(r)||0===r.trim().length||!G(s)&&!Y(s))return;return{step:i,json:t}}catch(e){return}}(e);if(t){var i=function(e){if("u">typeof TextEncoder)return(new TextEncoder).encode(e).length;for(var t=encodeURIComponent(e),i=0,r=0;t.length>r;r++)"%"===t[r]?(i+=1,r+=2):i+=1;return i}(t.json);i>this.qt.max_bytes||(this.Yt.push({step:t.step,bytes:i}),this.Xt+=i,this.er())}}getAttachable(){return this.Yt.map(e=>e.step)}clear(){this.Yt=[],this.Xt=0}size(){return this.Yt.length}er(){for(;this.Xt>this.qt.max_bytes&&this.Yt.length>0;){var e=this.Yt.shift();e&&(this.Xt-=e.bytes)}}}var tL=function(e,t){var{debugEnabled:i}=void 0===t?{}:t,s={k(t){if(r&&(f.DEBUG||p.POSTHOG_DEBUG||i)&&!W(r.console)&&r.console){for(var s=("__rrweb_original__"in r.console[t])?r.console[t].__rrweb_original__:r.console[t],n=arguments.length,o=Array(n>1?n-1:0),a=1;n>a;a++)o[a-1]=arguments[a];s(e,...o)}},debug(){for(var e=arguments.length,t=Array(e),i=0;e>i;i++)t[i]=arguments[i];s.k("debug",...t)},info(){for(var e=arguments.length,t=Array(e),i=0;e>i;i++)t[i]=arguments[i];s.k("log",...t)},warn(){for(var e=arguments.length,t=Array(e),i=0;e>i;i++)t[i]=arguments[i];s.k("warn",...t)},error(){for(var e=arguments.length,t=Array(e),i=0;e>i;i++)t[i]=arguments[i];s.k("error",...t)},critical(){for(var t=arguments.length,i=Array(t),r=0;t>r;r++)i[r]=arguments[r];console.error(e,...i)},uninitializedWarning(e){s.error("You must initialize PostHog before calling "+e)},createLogger:(t,i)=>tL(e+" "+t,i)};return s},tR=tL("[PostHog.js]"),tT=tR.createLogger,t$=tT("[ExternalScriptsLoader]"),tO=(e,t,i)=>{if(e.config.disable_external_dependency_loading)return t$.warn(t+" was requested but loading of external scripts is disabled."),i("Loading of external scripts is disabled");var r=null==o?void 0:o.querySelectorAll("script");if(r){for(var s,n=0;r.length>n;n++)if(s=function(){if(r[n].src===t){var e=r[n];return e.__posthog_loading_callback_fired?{v:i()}:(e.addEventListener("load",t=>{e.__posthog_loading_callback_fired=!0,i(void 0,t)}),e.onerror=e=>i(e),{v:void 0})}}())return s.v}var a=()=>{if(!o)return i("document not found");var r=o.createElement("script");if(r.type="text/javascript",r.crossOrigin="anonymous",r.src=t,r.onload=e=>{r.__posthog_loading_callback_fired=!0,i(void 0,e)},r.onerror=e=>i(e),e.config.prepare_external_dependency_script&&(r=e.config.prepare_external_dependency_script(r)),!r)return i("prepare_external_dependency_script returned null");if("head"===e.config.external_scripts_inject_target)o.head.appendChild(r);else{var s,n=o.querySelectorAll("body > script");n.length>0?null==(s=n[0].parentNode)||s.insertBefore(r,n[0]):o.body.appendChild(r)}};null!=o&&o.body?a():null==o||o.addEventListener("DOMContentLoaded",a)};p.__PosthogExtensions__=p.__PosthogExtensions__||{},p.__PosthogExtensions__.loadExternalDependency=(e,t,i)=>{if("remote-config"!==t){var r;if(e.config.__preview_external_dependency_versioned_paths)r=e.requestRouter.endpointFor("assets","/static/"+e.version+"/"+t+".js");else{var s="/static/"+t+".js?v="+e.version;"toolbar"===t&&(s=s+"&t="+3e5*Math.floor(Date.now()/3e5)),r=e.requestRouter.endpointFor("assets",s)}tO(e,r,i)}else{var n=e.requestRouter.endpointFor("assets","/array/"+e.config.token+"/config.js");tO(e,n,i)}},p.__PosthogExtensions__.loadSiteApp=(e,t,i)=>{var r=e.requestRouter.endpointFor("api",t);tO(e,r,i)};var tA="$people_distinct_id",tN="$device_id",tD="__alias",tq="__timers",tH="$autocapture_disabled_server_side",tV="$heatmaps_enabled_server_side",tW="$exception_capture_enabled_server_side",tG="$error_tracking_suppression_rules",tz="$error_tracking_capture_extension_exceptions",tB="$web_vitals_enabled_server_side",tU="$dead_clicks_enabled_server_side",tY="$product_tours_enabled_server_side",tX="$web_vitals_allowed_metrics",tZ="$session_recording_remote_config",tJ="$replay_override_sampling",tK="$replay_override_linked_flag",tQ="$replay_override_url_trigger",t0="$replay_override_event_trigger",t1="$sesid",t2="$session_is_sampled",t3="$enabled_feature_flags",t5="$active_feature_flags",t6="$early_access_features",t4="$feature_flag_details",t8="$feature_flag_payloads",t9="$feature_flag_request_id",t7="$override_feature_flags",ie="$override_feature_flag_payloads",it="$stored_person_properties",ii="$stored_group_properties",ir="$surveys",is="$surveys_loaded_at",io="$surveys_activated",ia="ph_product_tours",il="$flag_call_reported",iu="$flag_call_reported_session_id",ic="$feature_flag_errors",id="$feature_flag_evaluated_at",ih="$user_state",ip="$client_session_props",ig="$capture_rate_limit",iv="$initial_campaign_params",i_="$initial_referrer_info",im="$initial_person_info",iy="$epp",ib="__POSTHOG_TOOLBAR__",iw="$posthog_cookieless",ix="$sdk_debug_extensions_init_method",ik="$sdk_debug_extensions_init_time_ms",iE="$sdk_debug_recording_script_not_loaded",iS="PostHog loadExternalDependency extension not found.",iP="on_reject",iF="always",iI="anonymous",iC="identified",iM="identified_only",ij="visibilitychange",iL="beforeunload",iR="$pageview",iT="$pageleave",i$="$identify",iO="$groupidentify";function iA(e,t){D(e)&&e.forEach(t)}function iN(e,t){if(!U(e))if(D(e))e.forEach(t);else if(e instanceof FormData)e.forEach((e,i)=>t(e,i));else for(var i in e)A.call(e,i)&&t(e[i],i)}var iD=function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),r=1;t>r;r++)i[r-1]=arguments[r];for(var s of i)for(var n in s)void 0!==s[n]&&(e[n]=s[n]);return e};function iq(e){for(var t=Object.keys(e),i=t.length,r=Array(i);i--;)r[i]=[t[i],e[t[i]]];return r}var iH=function(e){try{return e()}catch(e){return}},iV=function(e){return function(){try{for(var t=arguments.length,i=Array(t),r=0;t>r;r++)i[r]=arguments[r];return e.apply(this,i)}catch(e){tR.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),tR.critical(e)}}},iW=function(e){var t={};return iN(e,function(e,i){(G(e)&&e.length>0||Y(e))&&(t[i]=e)}),t},iG=["herokuapp.com","vercel.app","netlify.app"];function iz(e,t,i,r){var{capture:s=!1,passive:n=!0}=null!=r?r:{};null==e||e.addEventListener(t,i,{capture:s,passive:n})}function iB(e){return"ph_toolbar_internal"===e.name}Math.trunc||(Math.trunc=function(e){return 0>e?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return Y(e)&&isFinite(e)&&Math.floor(e)===e});class iU{constructor(e){if(this.bytes=e,16!==e.length)throw TypeError("not 128-bit length")}static fromFieldsV7(e,t,i,r){if(!Number.isInteger(e)||!Number.isInteger(t)||!Number.isInteger(i)||!Number.isInteger(r)||0>e||0>t||0>i||0>r||e>0xffffffffffff||t>4095||i>0x3fffffff||r>0xffffffff)throw RangeError("invalid field value");var s=new Uint8Array(16);return s[0]=e/0x10000000000,s[1]=e/0x100000000,s[2]=e/0x1000000,s[3]=e/65536,s[4]=e/256,s[5]=e,s[6]=112|t>>>8,s[7]=t,s[8]=128|i>>>24,s[9]=i>>>16,s[10]=i>>>8,s[11]=i,s[12]=r>>>24,s[13]=r>>>16,s[14]=r>>>8,s[15]=r,new iU(s)}toString(){for(var e="",t=0;this.bytes.length>t;t++)e=e+(this.bytes[t]>>>4).toString(16)+(15&this.bytes[t]).toString(16),3!==t&&5!==t&&7!==t&&9!==t||(e+="-");if(36!==e.length)throw Error("Invalid UUIDv7 was generated");return e}clone(){return new iU(this.bytes.slice(0))}equals(e){return 0===this.compareTo(e)}compareTo(e){for(var t=0;16>t;t++){var i=this.bytes[t]-e.bytes[t];if(0!==i)return Math.sign(i)}return 0}}class iY{constructor(){this.S=0,this.C=0,this.I=new iJ}generate(){var e=this.generateOrAbort();if(W(e)){this.S=0;var t=this.generateOrAbort();if(W(t))throw Error("Could not generate UUID after timestamp reset");return t}return e}generateOrAbort(){var e=Date.now();if(e>this.S)this.S=e,this.T();else{if(this.S>=e+1e4)return;this.C++,this.C>0x3ffffffffff&&(this.S++,this.T())}return iU.fromFieldsV7(this.S,Math.trunc(this.C/0x40000000),0x3fffffff&this.C,this.I.nextUint32())}T(){this.C=1024*this.I.nextUint32()+(1023&this.I.nextUint32())}}var iX,iZ=e=>{if("u">typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw Error("no cryptographically strong RNG available");for(var t=0;e.length>t;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};r&&!W(r.crypto)&&crypto.getRandomValues&&(iZ=e=>crypto.getRandomValues(e));class iJ{constructor(){this.M=new Uint32Array(8),this.R=1/0}nextUint32(){return this.M.length>this.R||(iZ(this.M),this.R=0),this.M[this.R++]}}var iK=()=>iQ().toString(),iQ=()=>(iX||(iX=new iY)).generate(),i0="",i1=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,i2={O:()=>!!o,D(e){tR.error("cookieStore error: "+e)},A(e){if(o){try{for(var t=e+"=",i=o.cookie.split(";").filter(e=>e.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(t))return decodeURIComponent(s.substring(t.length,s.length))}}catch(e){}return null}},F(e){var t;try{t=JSON.parse(i2.A(e))||{}}catch(e){}return t},N(e,t,i,r,s){if(!o)return!1;try{var n="",a="",l=function(e,t){if(t){var i=function(e,t){if(void 0===t&&(t=o),i0)return i0;if(!t||["localhost","127.0.0.1"].includes(e))return"";for(var i=e.split("."),r=Math.min(i.length,8),s="dmn_chk_"+iK();!i0&&r--;){var n=i.slice(r).join("."),a=s+"=1;domain=."+n+";path=/";t.cookie=a+";max-age=3",t.cookie.includes(s)&&(t.cookie=a+";max-age=0",i0=n)}return i0}(e);if(!i){var r,s=(r=e.match(i1))?r[0]:"";s!==i&&tR.info("Warning: cookie subdomain discovery mismatch",s,i),i=s}return i?"; domain=."+i:""}return""}(o.location.hostname,r);
1if(i){var u=new Date;u.setTime(u.getTime()+864e5*i),n="; expires="+u.toUTCString()}s&&(a="; secure");var c=e+"="+encodeURIComponent(JSON.stringify(t))+n+"; SameSite=Lax; path=/"+l+a;return c.length>3686.4&&tR.warn("cookieStore warning: large cookie, len="+c.length),o.cookie=c,!0}catch(e){return!1}},q(e,t){if(null!=o&&o.cookie)try{i2.N(e,"",-1,t)}catch(e){return}}},i3=null,i5={O(){if(!B(i3))return i3;var e=!0;if(W(r))e=!1;else try{var t="__mplssupport__";i5.N(t,"xyz"),'"xyz"'!==i5.A(t)&&(e=!1),i5.q(t)}catch(t){e=!1}return e||tR.error("localStorage unsupported; falling back to cookie store"),i3=e,e},D(e){tR.error("localStorage error: "+e)},A(e){try{return null==r?void 0:r.localStorage.getItem(e)}catch(e){i5.D(e)}return null},F(e){try{return JSON.parse(i5.A(e))||{}}catch(e){}return null},N(e,t){try{return null==r||r.localStorage.setItem(e,JSON.stringify(t)),!0}catch(e){i5.D(e)}return!1},q(e){try{null==r||r.localStorage.removeItem(e)}catch(e){i5.D(e)}}},i6=[tN,"distinct_id",t1,t2,iy,im,ih],i4={},i8={O:()=>!0,D(e){tR.error("memoryStorage error: "+e)},A:e=>i4[e]||null,F:e=>i4[e]||null,N:(e,t)=>(i4[e]=t,!0),q(e){delete i4[e]}},i9=null,i7={O(){if(!B(i9))return i9;if(i9=!0,W(r))i9=!1;else try{var e="__support__";i7.N(e,"xyz"),'"xyz"'!==i7.A(e)&&(i9=!1),i7.q(e)}catch(e){i9=!1}return i9},D(e){tR.error("sessionStorage error: ",e)},A(e){try{return null==r?void 0:r.sessionStorage.getItem(e)}catch(e){i7.D(e)}return null},F(e){try{return JSON.parse(i7.A(e))||null}catch(e){}return null},N(e,t){try{return null==r||r.sessionStorage.setItem(e,JSON.stringify(t)),!0}catch(e){i7.D(e)}return!1},q(e){try{null==r||r.sessionStorage.removeItem(e)}catch(e){i7.D(e)}}};class re{constructor(e){this._instance=e}get qt(){return this._instance.config}get consent(){return this.rr()?0:this.ir}isOptedOut(){return this.qt.cookieless_mode===iF||this.isRejected()||-1===this.consent&&this.qt.cookieless_mode===iP}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return 0===this.consent}isRejected(){return 0===this.consent||-1===this.consent&&this.qt.opt_out_capturing_by_default}optInOut(e){this.nr.N(this.sr,+!!e,this.qt.cookie_expiration,this.qt.cross_subdomain_cookie,this.qt.secure_cookie)}reset(){this.nr.q(this.sr,this.qt.cross_subdomain_cookie)}get sr(){var{token:e,opt_out_capturing_cookie_prefix:t,consent_persistence_name:i}=this._instance.config;return i||(t?t+e:"__ph_opt_in_out_"+e)}get ir(){var e=this.nr.A(this.sr);return R(et,e)?1:R(ei,e)?0:-1}get nr(){var e=this.qt.opt_out_capturing_persistence_type,t="localStorage"===e?i5:i2;if(!this.ar||this.ar!==t){this.ar=t;var i="localStorage"===e?i2:i5;i.A(this.sr)&&(this.ar.A(this.sr)||this.optInOut(R(et,i.A(this.sr))),i.q(this.sr,this.qt.cross_subdomain_cookie))}return this.ar}rr(){return!!this.qt.respect_dnt&&[null==n?void 0:n.doNotTrack,null==n?void 0:n.msDoNotTrack,p.doNotTrack].some(e=>R(et,e))}}function rt(e){return e instanceof Element&&(e.id===ib||!(null==e.closest||!e.closest(".toolbar-global-fade-container")))}function ri(e){return!!e&&1===e.nodeType}function rr(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function rs(e){return!!e&&3===e.nodeType}function rn(e){return!!e&&11===e.nodeType&&ri(e.host)}function ro(e){return e?T(e).split(/\s+/):[]}function ra(e){var t=null==r?void 0:r.location.href;return!!(t&&e&&e.some(e=>t.match(e)))}function rl(e){var t="";switch(typeof e.className){case"string":t=e.className;break;case"object":t=(e.className&&"baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:t=""}return ro(t)}function ru(e){return U(e)?null:T(e).split(/(\s+)/).filter(e=>rj(e)).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function rc(e){var t="";return rk(e)&&!rE(e)&&e.childNodes&&e.childNodes.length&&iN(e.childNodes,function(e){var i;rs(e)&&e.textContent&&(t+=null!=(i=ru(e.textContent))?i:"")}),T(t)}function rd(e){var t;return W(e.target)?e.srcElement||null:null!=(t=e.target)&&t.shadowRoot?e.composedPath()[0]||null:e.target||null}var rh=["a","button","form","input","select","textarea","label"];function rp(e,t){if(W(t))return!0;var i,r=function(e){if(t.some(t=>e.matches(t)))return{v:!0}};for(var s of e)if(i=r(s))return i.v;return!1}function rg(e){var t=e.parentNode;return!(!t||!ri(t))&&t}var rf=["next","previous","prev",">","<"],rv=[...rf,"+","-","−","–"],r_=(e,t)=>
1/[a-z0-9]/i.test(t)?e.includes(t):e===t,rm=[".ph-no-rageclick",".ph-no-capture"],ry=["","text","search","email","password","url","tel","number"];function rb(e,t){if(!r||rw(e)||(Z(t)?(s=!!t&&rm,n=void 0,o=!1):(s=null!=(a=null==t?void 0:t.css_selector_ignorelist)?a:rm,n=null==t?void 0:t.content_ignorelist,o=null!=(l=null==t?void 0:t.ignore_text_selection)&&l),!1===s)||o&&!(!(i=e)||!ri(i))&&(rr(i,"textarea")||(rr(i,"input")?R(ry,(i.getAttribute("type")||"").toLowerCase()):function(e){if(e.isContentEditable)return!0;var t=null==e.getAttribute?void 0:e.getAttribute("contenteditable");return"true"===t||""===t}(i))))return!1;var i,s,n,o,a,l,{targetElementList:u}=rx(e,!1);return!function(e,t){var i;if(!1===e||W(e))return!1;if(!0===e)i=rf;else{if(!D(e))return!1;if(e.length>10)return tR.error("[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching."),!1;i=e.map(e=>e.toLowerCase())}return t.some(e=>{var{safeText:t,ariaLabel:r}=e;return i.some(e=>r_(t,e)||r_(r,e))})}(n,u.map(e=>{var t;return{safeText:rc(e).toLowerCase(),ariaLabel:(null==(t=e.getAttribute("aria-label"))?void 0:t.toLowerCase().trim())||""}}))&&!rp(u,s)}var rw=e=>!e||rr(e,"html")||!ri(e),rx=(e,t)=>{if(!r||rw(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var i=!1,s=[e],n=e;n.parentNode&&!rr(n,"body");)if(rn(n.parentNode))s.push(n.parentNode.host),n=n.parentNode.host;else{var o=rg(n);if(!o)break;if(t||rh.indexOf(o.tagName.toLowerCase())>-1)i=!0;else{var a=r.getComputedStyle(o);a&&"pointer"===a.getPropertyValue("cursor")&&(i=!0)}s.push(o),n=o}return{parentIsUsefulElement:i,targetElementList:s}};function rk(e){for(var t=e;t.parentNode&&!rr(t,"body");t=t.parentNode){var i=rl(t);if(R(i,"ph-sensitive")||R(i,"ph-no-capture"))return!1}if(R(rl(e),"ph-include"))return!0;var r=e.type||"";if(G(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var s=e.name||e.id||"";return!G(s)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(s.replace(/[^a-zA-Z0-9]/g,""))}function rE(e){return!!(rr(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||rr(e,"select")||rr(e,"textarea")||"true"===e.getAttribute("contenteditable"))}var rS="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",rP=RegExp("^(?:"+rS+")$"),rF=new RegExp(rS),rI="\\d{3}-?\\d{2}-?\\d{4}",rC=RegExp("^("+rI+")$"),rM=RegExp("("+rI+")");function rj(e,t){return void 0===t&&(t=!0),!(U(e)||G(e)&&(e=T(e),(t?rP:rF).test((e||"").replace(/[- ]/g,""))||(t?rC:rM).test(e)))&&!0}function rL(e){var t=rc(e);return rj(t=(t+" "+function e(t){var i="";return t&&t.childNodes&&t.childNodes.length&&iN(t.childNodes,function(t){var r;if(t&&"span"===(null==(r=t.tagName)?void 0:r.toLowerCase()))try{var s=rc(t);i=(i+" "+s).trim(),t.childNodes&&t.childNodes.length&&(i=(i+" "+e(t)).trim())}catch(e){tR.error("[AutoCapture]",e)}}),i}(e)).trim())?t:""}function rR(e){return e.replace(/"|\\"/g,'\\"')}var rT=tT("[Dead Clicks]"),r$=()=>!0,rO=e=>{var t,i=!(null==(t=e.instance.persistence)||!t.get_property(tU)),r=e.instance.config.capture_dead_clicks;return Z(r)?r:!!H(r)||i};class rA{get lazyLoadedDeadClicksAutocapture(){return this.ur}constructor(e,t,i){this.instance=e,this.isEnabled=t,this.onCapture=i,this.startIfEnabledOrStop()}onRemoteConfig(e){"captureDeadClicks"in e&&(this.instance.persistence&&this.instance.persistence.register({[tU]:e.captureDeadClicks}),this.startIfEnabledOrStop())}startIfEnabledOrStop(){this.isEnabled(this)?this.lr(()=>{this.hr()}):this.stop()}lr(e){var t,i;null!=(t=p.__PosthogExtensions__)&&t.initDeadClicksAutocapture&&e(),null==(i=p.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this.instance,"dead-clicks-autocapture",t=>{t?rT.error("failed to load script",t):e()})}hr(){var e;if(o){if(!this.ur&&null!=(e=p.__PosthogExtensions__)&&e.initDeadClicksAutocapture){var t=H(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};t.__onCapture=this.onCapture,this.ur=p.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,t),this.ur.start(o),rT.info("starting...")}}else rT.error("`document` not found. Cannot start.")}stop(){this.ur&&(this.ur.stop(),this.ur=void 0,rT.info("stopping..."))}}var rN=tT("[SegmentIntegration]"),rD="posthog-js";function rq(e,t){var{organization:i,projectId:r,prefix:s,severityAllowList:n=["error"],sendExceptionsToPostHog:o=!0}=void 0===t?{}:t;return t=>{if("*"!==n&&!n.includes(t.level)||!e.__loaded)return t;t.tags||(t.tags={});var a=e.requestRouter.endpointFor("ui","/project/"+e.config.token+"/pers
1on/"+e.get_distinct_id());t.tags["PostHog Person URL"]=a,e.sessionRecordingStarted()&&(t.tags["PostHog Recording URL"]=e.get_session_replay_url({withTimestamp:!0}));var l,u,c,d,h,p,g=(null==(l=t.exception)?void 0:l.values)||[],f=g.map(e=>m({},e,{stacktrace:e.stacktrace?m({},e.stacktrace,{type:"raw",frames:(e.stacktrace.frames||[]).map(e=>m({},e,{platform:"web:javascript"}))}):void 0})),v={$exception_message:(null==(u=g[0])?void 0:u.value)||t.message,$exception_type:null==(c=g[0])?void 0:c.type,$exception_level:t.level,$exception_list:f,$sentry_event_id:t.event_id,$sentry_exception:t.exception,$sentry_exception_message:(null==(d=g[0])?void 0:d.value)||t.message,$sentry_exception_type:null==(h=g[0])?void 0:h.type,$sentry_tags:t.tags};return i&&r&&(v.$sentry_url=(s||"https://sentry.io/organizations/")+i+"/issues/?project="+r+"&query="+t.event_id),o&&(null==(p=e.exceptions)||p.sendExceptionEvent(v)),t}}class rH{constructor(e,t,i,r,s,n){this.name=rD,this.setupOnce=function(o){o(rq(e,{organization:t,projectId:i,prefix:r,severityAllowList:s,sendExceptionsToPostHog:null==n||n}))}}}class rV{constructor(e){this.cr=(e,t,i)=>{i&&(i.noSessionId||i.activityTimeout||i.sessionPastMaximumLength)&&(tR.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:e,changeReason:i}),this.dr=void 0,this._instance.scrollManager.resetContext())},this._instance=e,this.vr()}vr(){var e;this.pr=null==(e=this._instance.sessionManager)?void 0:e.onSessionId(this.cr)}destroy(){var e;null==(e=this.pr)||e.call(this),this.pr=void 0}doPageView(e,t){var i,s=this.gr(e,t);return this.dr={pathname:null!=(i=null==r?void 0:r.location.pathname)?i:"",pageViewId:t,timestamp:e},this._instance.scrollManager.resetContext(),s}doPageLeave(e){var t;return this.gr(e,null==(t=this.dr)?void 0:t.pageViewId)}doEvent(){var e;return{$pageview_id:null==(e=this.dr)?void 0:e.pageViewId}}gr(e,t){var i=this.dr;if(!i)return{$pageview_id:t};var r={$pageview_id:t,$prev_pageview_id:i.pageViewId},s=this._instance.scrollManager.getContext();if(s&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:n,lastScrollY:o,maxScrollY:a,maxContentHeight:l,lastContentY:u,maxContentY:c}=s;if(!(W(n)||W(o)||W(a)||W(l)||W(u)||W(c))){n=Math.ceil(n),o=Math.ceil(o),a=Math.ceil(a),l=Math.ceil(l),u=Math.ceil(u),c=Math.ceil(c);var d=n>1?er(o/n,0,1,tR):1,h=n>1?er(a/n,0,1,tR):1,p=l>1?er(u/l,0,1,tR):1,g=l>1?er(c/l,0,1,tR):1;r=iD(r,{$prev_pageview_last_scroll:o,$prev_pageview_last_scroll_percentage:d,$prev_pageview_max_scroll:a,$prev_pageview_max_scroll_percentage:h,$prev_pageview_last_content:u,$prev_pageview_last_content_percentage:p,$prev_pageview_max_content:c,$prev_pageview_max_content_percentage:g})}}return i.pathname&&(r.$prev_pageview_pathname=i.pathname),i.timestamp&&(r.$prev_pageview_duration=(e.getTime()-i.timestamp.getTime())/1e3),r}}var rW=["flags","surveys"],rG={[tA]:{exposure:"hidden"},[tD]:{exposure:"hidden"},__cmpns:{exposure:"hidden"},[tq]:{exposure:"hidden"},[tH]:{exposure:"event"},[tV]:{exposure:"hidden"},[tW]:{exposure:"event"},[tG]:{exposure:"hidden"},[tz]:{exposure:"event"},[tB]:{exposure:"event"},[tU]:{exposure:"event"},[tY]:{exposure:"hidden"}
1,[tX]:{exposure:"event"},[tZ]:{exposure:"hidden"},$session_recording_enabled_server_side:{exposure:"hidden"},[t1]:{exposure:"hidden"},[t2]:{exposure:"event"},$session_past_minimum_duration:{exposure:"event"},$session_recording_url_trigger_activated_session:{exposure:"event"},$session_recording_event_trigger_activated_session:{exposure:"event"},$debug_first_full_snapshot_timestamp:{exposure:"event"},[t3]:{exposure:"derived",storageGroup:"flags",shouldSkipFromEventProperties:(e,t)=>t(),transformToEventProperties(e){if(!H(e))return{};for(var t={},i=Object.keys(e),r=0;i.length>r;r++)t["$feature/"+i[r]]=e[i[r]];return t}},[t5]:{exposure:"event",storageGroup:"flags"},[t6]:{exposure:"hidden"},[t4]:{exposure:"hidden",storageGroup:"flags"},[t8]:{exposure:"event",storageGroup:"flags"},[t9]:{exposure:"event",storageGroup:"flags"},[t7]:{exposure:"event"},[ie]:{exposure:"hidden"},[it]:{exposure:"hidden"},[ii]:{exposure:"hidden"},[ir]:{exposure:"hidden",storageGroup:"surveys"},[is]:{exposure:"hidden",storageGroup:"surveys"},[io]:{exposure:"event"},[ia]:{exposure:"hidden"},$product_tours_activated:{exposure:"hidden"},$conversations_widget_session_id:{exposure:"event"},$conversations_ticket_id:{exposure:"event"},$conversations_widget_state:{exposure:"event"},$conversations_user_traits:{exposure:"event"},[il]:{exposure:"hidden"},[iu]:{exposure:"hidden"},[ic]:{exposure:"hidden"},[id]:{exposure:"hidden",storageGroup:"flags"},[ih]:{exposure:"hidden"},[ip]:{exposure:"hidden"},[ig]:{exposure:"hidden"},[iv]:{exposure:"hidden"},[i_]:{exposure:"hidden"},[im]:{exposure:"hidden"},[iy]:{exposure:"hidden"},[tJ]:{exposure:"event"},[tK]:{exposure:"event"},[tQ]:{exposure:"event"},[t0]:{exposure:"event"},[ix]:{exposure:"event"},[ik]:{exposure:"event"},[iE]:{exposure:"event"},$sdk_debug_replay_event_trigger_status:{exposure:"event"},$sdk_debug_replay_linked_flag_trigger_status:{exposure:"event"},$sdk_debug_replay_matched_recording_trigger_groups:{exposure:"event"},$sdk_debug_replay_remote_trigger_matching_config:{exposure:"event"},$sdk_debug_replay_trigger_groups_count:{exposure:"event"},$sdk_debug_replay_url_trigger_status:{exposure:"event"},$session_recording_start_reason:{exposure:"event"}},rz=[["$posthog_sr_group_event_trigger_",{exposure:"hidden"}],["$posthog_sr_group_url_trigger_",{exposure:"hidden"}],["$posthog_sr_group_sampling_",{exposure:"hidden"}]],rB=e=>{var t=rG[e];if(t)return t;for(var[i,r]of rz)if(0===e.indexOf(i))return r},rU=e=>{var t=null==o?void 0:o.createElement("a");return W(t)?null:(t.href=e,t)},rY=function(e,t){for(var i,r=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),s=0;r.length>s;s++){var n=r[s].split("=");if(n[0]===t){i=n;break}}if(!D(i)||2>i.length)return"";var o=i[1];try{o=decodeURIComponent(o)}catch(e){tR.error("Skipping decoding for malformed query param: "+o)}return o.replace(/\+/g," ")},rX=function(e,t,i){if(!e||!t||!t.length)return e;for(var r=e.split("#"),s=r[1],n=(r[0]||"").split("?"),o=n[1],a=n[0],l=(o||"").split("&"),u=[],c=0;l.length>c;c++){var d=l[c].split("=");D(d)&&(t.includes(d[0])?u.push(d[0]+"="+i):u.push(l[c]))}var h=a;return null!=o&&(h+="?"+u.join("&")),null!=s&&(h+="#"+s),h},rZ=function(e,t){var i=e.match(RegExp(t+"=([^&]*)"));return i?i[1]:null},rJ="https?://(.*)",rK=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],rQ=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid",...rK],r0="<masked>",r1=["li_fat_id"];function r2(e,t,i){if(!o)return{};var r,s=t?[...rK,...i||[]]:[],n=r3(rX(o.URL,s,r0),e);return iD((r={},iN(r1,function(e){var t=i2.A(e);r[e]=t||null}),r),n)}function r3(e,t){var i=rQ.concat(t||[]),r={};return iN(i,function(t){var i=rY(e,t);r[t]=i||null}),r}function r5(e){var t=e?0===e.search(rJ+"google.([^/?]*)")?"google":0===e.search(rJ+"bing.com")?"bing":0===e.search(rJ+"yahoo.com")?"yahoo":0===e.search(rJ+"duckduckgo.com")?"duckduckgo":null:null,i={};if(!B(t)){i.$search_engine=t;var r=o?rY(o.referrer,"yahoo"!=t?"q":"p"):"";r.length&&(i.ph_keyword=r)}return i}function r6(){return navigator.language||navigator.userLanguage}var r4="$direct";function r8(){return(null==o?void 0:o.referrer)||r4}function r9(e,t){var i=e?[...rK,...t||[]]:[],r=null==a?void 0:a.href.substring(0,1e3);return{r:r8().substring(0,1e3),u:r?rX(r,i,r0):void 0}}function r7(e){var t,{r:i,u:r}=e,s={$referrer:i,$referring_domain:null==i?void 0:i==r4?r4:null==(t=rU(i))?void 0:t.host};
1if(r){s.$current_url=r;var n=rU(r);s.$host=null==n?void 0:n.host,s.$pathname=null==n?void 0:n.pathname,iD(s,r3(r))}return i&&iD(s,r5(i)),s}function se(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}}var st={flags:id,surveys:is},si=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"],sr="main";class ss{constructor(e,t,i){if(void 0===i&&(i=!0),this.mr={},this.yr=!1,this.br=!1,this.qt=e,this._r=i,this.props={},this.wr=!1,this.Sr=(e=>{var t="";return e.token&&(t=e.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),e.persistence_name?"ph_"+e.persistence_name:"ph_"+t+"_posthog"})(e),this.nr=this.kr(e),this.br=this.Cr(e),this.load(),e.debug&&tR.info("Persistence loaded",e.persistence,m({},this.props)),this.update_config(e,e,t),this.save(),r){var s=()=>this.flush();iz(r,"beforeunload",s,{capture:!1}),iz(r,"pagehide",s,{capture:!1})}}Ir(){var e,t=null==(e=this.qt)?void 0:e.persistence_save_debounce_ms;return Y(t)&&t>0?t:0}isDisabled(){return!!this.Tr}kr(e){-1===si.indexOf(e.persistence.toLowerCase())&&(tR.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var t,i,s,n,o=(t=e.cookie_persisted_properties||[],i=e.__preview_cookie_wins_on_conflict||!1,void 0===t&&(t=[]),void 0===i&&(i=!1),s=[...i6,...t],m({},i5,{F(e){try{var t={};try{t=i2.F(e)||{}}catch(e){}var r,s=JSON.parse(i5.A(e)||"{}");if(i){var n={};for(var o in t){var a=t[o];B(a)||""===a||(n[o]=a)}r=iD(s,n)}else r=iD(t,s);return i5.N(e,r),r}catch(e){}return null},N(e,t,i,r,n,o){var a=i5.N(e,t,void 0,void 0,o);try{var l={};s.forEach(e=>{t[e]&&(l[e]=t[e])}),Object.keys(l).length&&i2.N(e,l,i,r,n,o)}catch(e){i5.D(e)}return a},q(e,t){try{null==r||r.localStorage.removeItem(e),i2.q(e,t)}catch(e){i5.D(e)}}})),a=!1,l=e.persistence.toLowerCase();return"localstorage"===l&&i5.O()?(n=i5,a=!0):"localstorage+cookie"===l&&o.O()?(n=o,a=!0):"sessionstorage"===l&&i7.O()?n=i7:"memory"===l?n=i8:"cookie"===l?n=i2:o.O()?(n=o,a=!0):n=i2,this.yr=a,n}Er(e){return this.Sr+"__"+e}Cr(e){return this.yr&&!!e.split_storage}Mr(e){var t=null!=e?e:this.qt.feature_flag_cache_ttl_ms;if(!t||0>=t)return!1;var i=this.props[id];return!i||"number"!=typeof i||Date.now()-i>t}properties(){var e={};return iN(this.props,(t,i)=>{var r=rB(i);if("derived"===(null==r?void 0:r.exposure)){if(null!=r.shouldSkipFromEventProperties&&r.shouldSkipFromEventProperties(t,i===t3?()=>this.Mr():()=>!1))return;r.transformToEventProperties&&iD(e,r.transformToEventProperties(t))}else r&&"event"!==r.exposure||(e[i]=t)}),e}load(){if(!this.Tr){var e=this.nr.F(this.Sr);e&&(this.props=iD({},e)),this.br&&this.Rr()}}Rr(){for(var e of rW){var t=i5.F(this.Er(e));if(t&&!V(t)){var i=this.Pr(e);i.persisted=!0,this.Or(e)||(i.fingerprint=this.Lr(t,e)),this.Fr(e,t)||iD(this.props,t)}}}Or(e){return Object.keys(this.props).some(t=>{var i;return(null==(i=rB(t))?void 0:i.storageGroup)===e})}Fr(e,t){var i=st[e];if(!i)return!1;var r=t[i],s=this.props[i];return Y(r)&&Y(s)&&s>r}refreshKey(e){var t;if(!this.Tr){var i=this.br?null==(t=rB(e))?void 0:t.storageGroup:void 0,r=i?i5.F(this.Er(i)):this.nr.F(this.Sr);if(r&&e in r)this.Ar(e,r[e]);else{if(i){var s=this.nr.F(this.Sr);if(s&&e in s)return void this.Ar(e,s[e])}this.Nr(e)}}}save(){if(!this.Tr){var e=this.Ir();e>0?W(this.Dr)&&(this.Dr=setTimeout(()=>{this.Dr=void 0,this.$r()},e)):this.$r()}}flush(){W(this.Dr)||(clearTimeout(this.Dr),this.Dr=void 0,this.$r())}$r(){this.Tr||(this.br?this.qr():this.jr(this.nr,this.Sr,this.props,sr))}qr(){var{main:e,groups:t}=this.Hr();for(var i of(this.jr(this.nr,this.Sr,e,sr),rW)){var r,s=t[i];(!V(s)||null!=(r=this.mr[i])&&r.persisted)&&this.jr(i5,this.Er(i),s,i)}}Hr(){var e={},t={};for(var i of rW)t[i]={};return iN(this.props,(i,r)=>{var s,n=null==(s=rB(r))?void 0:s.storageGroup;n?t[n][r]=i:e[r]=i}),{main:e,groups:t}}Lr(e,t){var i=JSON.stringify(e);return t===sr?i+"|"+this.Ur+"|"+this.Br+"|"+this.zr:i}jr(e,t,i,r){var s,n=this.Pr(r);if(r===sr||n.dirty||W(n.fingerprint)){try{if((s=this.Lr(i,r))===n.fingerprint)return void(n.dirty=!1)}catch(e){s=void 0}e.N(t,i,this.Ur,this.Br,this.zr,this.qt.debug)?(n.dirty=!1,r!==sr&&(n.persisted=!0),W(s)||(n.fingerprint=s)):this.qt.debug&&tR.warn('failed to persist storage entry "'+t+'"; will retry on next save')}}remove(e){var{keepGroupEntries:t=!1}=void 0===e?{}:e;if(W(this.Dr)||(clearTimeout(this.Dr),this.Dr=void 0),this.nr.q(this.Sr,!1),this.nr.q(this.Sr,!0),!t&&this._r)for(var i of rW)i5.q(this.Er(i));t?delete this.mr[sr]:this.mr={}}clear(){this.remove(),this.props={}}register_once(e,t,i){if(H(e)){W(t)&&(t="None"),this.Ur=W(i)?this.Vr:i;var r=!1;if(iN(e,(e,i)=>{this.props.hasOwnProperty(i)&&this.props[i]!==t||(this.Ar(i,e),r=!0)}),r)return this.save(),!0}return!1}register(e,t){if(H(e)){this.Ur=W(t)?this.Vr:t;var i=!1;if(iN(e,(t,r)=>{e.hasOwnProperty(r)&&this.props[r]!==t&&(this.Ar(r,t),i=!0)}),i)return this.save(),!0}return!1}unregister(e){e in this.props&&(this.Nr(e),this.save())}update_campaign_params(){if(!this.wr){var e=r2(this.qt.custom_campaign_params,this.qt.mask_personal_data_properties,this.qt.custom_personal_data_properties);V(iW(e))||this.register(e),this.wr=!0}}update_search_keyword(){var e;this.register((e=null==o?void 0:o.referrer)?r5(e):{})}update_referrer_info(){var e;this.register_once({$referrer:r8(),$referring_domain:null!=o&&o.referrer&&(null==(e=rU(o.referrer))?void 0:e.host)||r4},void 0)}set_initial_person_info(){this.props[iv]||this.props[i_]||this.register_once({[im]:r9(this.qt.mask_personal_data_properties,this.qt.custom_personal_data_properties)},void 0)}get_initial_props(){var e={};iN([i_,iv],t=>{var i=this.props[t];i&&iN(i,function(t,i){e["$initial_"+$(i)]=t})});var t,i,r=this.props[im];return r&&iD(e,(t=r7(r),i={},iN(t,function(e,t){i["$initial_"+$(t)]=e}),i)),e}safe_merge(e){return iN(this.props,function(t,i){i in e||(e[i]=t)}),e}
1update_config(e,t,i){this.Vr=this.Ur=e.cookie_expiration,this.set_disabled(e.disable_persistence||!!i),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie);var r=e.persistence!==t.persistence||!((e,t)=>{if(e.length!==t.length)return!1;var i=[...e].sort(),r=[...t].sort();return i.every((e,t)=>e===r[t])})(e.cookie_persisted_properties||[],t.cookie_persisted_properties||[]),s=r?this.kr(e):this.nr,n=this.Cr(e);if(r||n!==this.br){var o=this.props;this.clear(),this.nr=s,this.br=n,this.props=o,this.save()}}set_disabled(e){this.Tr=e,this.Tr?this.remove():this.save()}set_cross_subdomain(e){e!==this.Br&&(this.Br=e,this.remove({keepGroupEntries:!0}),this.save())}set_secure(e){e!==this.zr&&(this.zr=e,this.remove({keepGroupEntries:!0}),this.save())}set_event_timer(e,t){var i=this.props[tq]||{};i[e]=t,this.Ar(tq,i),this.save()}remove_event_timer(e){var t=this.props[tq]||{},i=t[e];return W(i)||(delete t[e],this.Ar(tq,t),this.save()),i}get_property(e){return this.props[e]}set_property(e,t){this.Ar(e,t),this.save()}Ar(e,t){this.props[e]=t,this.Wr(e)}Nr(e){delete this.props[e],this.Wr(e)}Wr(e){var t,i=null==(t=rB(e))?void 0:t.storageGroup;i&&(this.Pr(i).dirty=!0)}Pr(e){return this.mr[e]||(this.mr[e]={})}}var sn="events",so="cancelEvents",sa="survey shown",sl="survey sent",su="popover",sc=tT("[RateLimiter]");class sd{constructor(e){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=e=>{var t=e.text;if(t&&t.length)try{(JSON.parse(t).quota_limited||[]).forEach(e=>{sc.info((e||"events")+" is quota limited."),this.serverLimits[e]=(new Date).getTime()+6e4})}catch(e){return void sc.warn('could not rate limit - continuing. Error: "'+(null==e?void 0:e.message)+'"',{text:t})}},this.instance=e,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){var e;return(null==(e=this.instance.config.rate_limiting)?void 0:e.events_per_second)||10}get captureEventsBurstLimit(){var e;return Math.max((null==(e=this.instance.config.rate_limiting)?void 0:e.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}clientRateLimitContext(e){void 0===e&&(e=!1);var t,i,r,{captureEventsBurstLimit:s,captureEventsPerSecond:n}=this,o=(new Date).getTime(),a=null!=(t=null==(i=this.instance.persistence)?void 0:i.get_property(ig))?t:{tokens:s,last:o};a.tokens+=(o-a.last)/1e3*n,a.last=o,a.tokens>s&&(a.tokens=s);var l=1>a.tokens;return l||e||(a.tokens=Math.max(0,a.tokens-1)),!l||this.lastEventRateLimited||e||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+n+" events per second and "+s+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=l,null==(r=this.instance.persistence)||r.set_property(ig,a),{isRateLimited:l,remainingTokens:a.tokens}}isServerRateLimited(e){var t=this.serverLimits[e||"events"]||!1;return!1!==t&&(new Date).getTime()<t}}var sh=tT("[RemoteConfig]");class sp{constructor(e){this._instance=e}get remoteConfig(){var e;return null==(e=p._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.config}Zr(e){var t,i;null!=(t=p.__PosthogExtensions__)&&t.loadExternalDependency?null==(i=p.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"remote-config",()=>e(this.remoteConfig)):e()}Gr(e){this._instance._send_request({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback(t){e(t.json)}})}load(){try{if(this.remoteConfig)return sh.info("Using preloaded remote config",this.remoteConfig),this.Qr(this.remoteConfig),void this.Jr();if(this._instance.Kr())return void sh.warn("Remote config is disabled. Falling back to local config.");this.Zr(e=>{e?(this.Qr(e),this.Jr()):(sh.info("No config found after loading remote JS config. Falling back to JSON."),this.Gr(e=>{this.Qr(e),this.Jr()}))})}catch(e){sh.error("Error loading remote config",e)}}stop(){this.Yr&&(clearInterval(this.Yr),this.Yr=void 0)}
vendor: 4,280 bytes, line 1
1refresh(){!this._instance.Kr()&&o&&"hidden"!==o.visibilityState&&this._instance.reloadFeatureFlags()}Jr(){var e;if(!this.Yr){var t=null!=(e=this._instance.config.remote_config_refresh_interval_ms)?e:3e5;0!==t&&(this.Yr=setInterval(()=>{this.refresh()},t))}}Qr(e){var t;e||sh.error("Failed to fetch remote config from PostHog."),this._instance.Qr(null!=e?e:{}),!1!==(null==e?void 0:e.hasFeatureFlags)&&(this._instance.config.advanced_disable_feature_flags_on_first_load||null==(t=this._instance.featureFlags)||t.ensureFlagsLoaded())}}var sg="gzip-js",sf="base64",sv=Uint8Array,s_=Uint16Array,sm=Uint32Array,sy=new sv([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]),sb=new sv([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]),sw=new sv([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),sx=function(e,t){for(var i=new s_(31),r=0;31>r;++r)i[r]=t+=1<<e[r-1];var s=new sm(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]},sk=sx(sy,2),sE=sk[1];sk[0][28]=258,sE[258]=28;for(var sS=sx(sb,0)[1],sP=new s_(32768),sF=0;32768>sF;++sF){var sI=(43690&sF)>>>1|(21845&sF)<<1;sP[sF]=((65280&(sI=(61680&(sI=(52428&sI)>>>2|(13107&sI)<<2))>>>4|(3855&sI)<<4))>>>8|(255&sI)<<8)>>>1}var sC=function(e,t,i){for(var r=e.length,s=0,n=new s_(t);r>s;++s)++n[e[s]-1];var o,a=new s_(t);for(s=0;t>s;++s)a[s]=a[s-1]+n[s-1]<<1;if(i){o=new s_(1<<t);var l=15-t;for(s=0;r>s;++s)if(e[s])for(var u=s<<4|e[s],c=t-e[s],d=a[e[s]-1]++<<c,h=d|(1<<c)-1;h>=d;++d)o[sP[d]>>>l]=u}else for(o=new s_(r),s=0;r>s;++s)o[s]=sP[a[e[s]-1]++]>>>15-e[s];return o},sM=new sv(288);for(sF=0;144>sF;++sF)sM[sF]=8;for(sF=144;256>sF;++sF)sM[sF]=9;for(sF=256;280>sF;++sF)sM[sF]=7;for(sF=280;288>sF;++sF)sM[sF]=8;var sj=new sv(32);for(sF=0;32>sF;++sF)sj[sF]=5;var sL=sC(sM,9,0),sR=sC(sj,5,0),sT=function(e){return(e/8|0)+(7&e&&1)},s$=function(e,t,i){(null==i||i>e.length)&&(i=e.length);var r=new(e instanceof s_?s_:e instanceof sm?sm:sv)(i-t);return r.set(e.subarray(t,i)),r},sO=function(e,t,i){var r=t/8|0;e[r]|=i<<=7&t,e[r+1]|=i>>>8},sA=function(e,t,i){var r=t/8|0;e[r]|=i<<=7&t,e[r+1]|=i>>>8,e[r+2]|=i>>>16},sN=function(e,t){for(var i=[],r=0;e.length>r;++r)e[r]&&i.push({s:r,f:e[r]});var s=i.length,n=i.slice();if(!s)return[new sv(0),0];if(1==s){var o=new sv(i[0].s+1);return o[i[0].s]=1,[o,1]}i.sort(function(e,t){return e.f-t.f}),i.push({s:-1,f:25001});var a=i[0],l=i[1],u=0,c=1,d=2;for(i[0]={s:-1,f:a.f+l.f,l:a,r:l};c!=s-1;)a=i[i[d].f>i[u].f?u++:d++],l=i[u!=c&&i[d].f>i[u].f?u++:d++],i[c++]={s:-1,f:a.f+l.f,l:a,r:l};var h=n[0].s;for(r=1;s>r;++r)n[r].s>h&&(h=n[r].s);var p=new s_(h+1),g=sD(i[c-1],p,0);if(g>t){r=0;var f=0,v=g-t,_=1<<v;for(n.sort(function(e,t){return p[t.s]-p[e.s]||e.f-t.f});s>r;++r){var m=n[r].s;if(t>=p[m])break;f+=_-(1<<g-p[m]),p[m]=t}for(f>>>=v;f>0;){var y=n[r].s;t>p[y]?f-=1<<t-p[y]++-1:++r}for(;r>=0&&f;--r){var b=n[r].s;p[b]==t&&(--p[b],++f)}g=t}return[new sv(p),g]},sD=function(e,t,i){return -1==e.s?Math.max(sD(e.l,t,i+1),sD(e.r,t,i+1)):t[e.s]=i},sq=function(e){for(var t=e.length;t&&!e[--t];);for(var i=new s_(++t),r=0,s=e[0],n=1,o=function(e){i[r++]=e},a=1;t>=a;++a)if(e[a]==s&&a!=t)++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=e[a]}return[i.subarray(0,r),t]},sH=function(e,t){for(var i=0,r=0;t.length>r;++r)i+=e[r]*t[r];return i},sV=function(e,t,i){var r=i.length,s=sT(t+2);e[s]=255&r,e[s+1]=r>>>8,e[s+2]=255^e[s],e[s+3]=255^e[s+1];for(var n=0;r>n;++n)e[s+n+4]=i[n];return 8*(s+4+r)},sW=function(e,t,i,r,s,n,o,a,l,u,c){sO(t,c++,i),++s[256];for(var d=sN(s,15),h=d[0],p=d[1],g=sN(n,15),f=g[0],v=g[1],_=sq(h),m=_[0],y=_[1],b=sq(f),w=b[0],x=b[1],k=new s_(19),E=0;m.length>E;++E)k[31&m[E]]++;for(E=0;w.length>E;++E)k[31&w[E]]++;for(var S=sN(k,7),P=S[0],F=S[1],I=19;I>4&&!P[sw[I-1]];--I);var C,M,j,L,R=u+5<<3,T=sH(s,sM)+sH(n,sj)+o,$=sH(s,h)+sH(n,f)+o+14+3*I+sH(k,P)+(2*k[16]+3*k[17]+7*k[18]);if(T>=R&&$>=R)return sV(t,c,e.subarray(l,l+u));if(sO(t,c,1+(T>$)),c+=2,T>$){C=sC(h,p,0),M=h,j=sC(f,v,0),L=f;var O=sC(P,F,0);for(sO(t,c,y-257),sO(t,c+5,x-1),sO(t,c+10,I-4),c+=14,E=0;I>E;++E)sO(t,c+3*E,P[sw[E]]);c+=3*I;for(var A=[m,w],N=0;2>N;++N){var D=A[N];for(E=0;D.length>E;++E)sO(t,c,O[q=31&D[E]]),c+=P[q],q>
115&&(sO(t,c,D[E]>>>5&127),c+=D[E]>>>12)}}else C=sL,M=sM,j=sR,L=sj;for(E=0;a>E;++E)if(r[E]>255){sA(t,c,C[257+(q=r[E]>>>18&31)]),c+=M[q+257],q>7&&(sO(t,c,r[E]>>>23&31),c+=sy[q]);var q,H=31&r[E];sA(t,c,j[H]),c+=L[H],H>3&&(sA(t,c,r[E]>>>5&8191),c+=sb[H])}else sA(t,c,C[r[E]]),c+=M[r[E]];return sA(t,c,C[256]),c+M[256]},sG=new sm([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),sz=function(){for(var e=new sm(256),t=0;256>t;++t){for(var i=t,r=9;--r;)i=(1&i&&0xedb88320)^i>>>1;e[t]=i}return e}(),sB=function(e,t,i){for(;i;++t)e[t]=i,i>>>=8},sU=!!u||!!l,sY="text/plain",sX=!1,sZ=function(e,t,i){void 0===i&&(i=!0);var r,s,n,o,a,[l,u]=e.split("?"),c=m({},t),d=null!=(a=null==u?void 0:u.split("&").map(e=>{var t,[r,s]=e.split("="),n=i&&null!=(t=c[r])?t:s;return delete c[r],r+"="+n}))?a:[],h=(void 0===r&&(r="&"),o=[],iN(c,function(e,t){W(e)||W(t)||"undefined"===t||(s=encodeURIComponent(e instanceof File?e.name:e.toString()),n=encodeURIComponent(t),o[o.length]=n+"="+s)}),o.join(r));return h&&d.push(h),l+"?"+d.join("&")},sJ=(e,t)=>JSON.stringify(e,(e,t)=>"bigint"==typeof t?t.toString():t,t),sK=e=>{if(e.tr)return e.tr;var{data:t,compression:i}=e;if(t){if(i===sg){var r,s,n,o,a,l,u,c,d=(r=function(e){var t=e.length;if("u">typeof TextEncoder)return(new TextEncoder).encode(e);for(var i=new sv(e.length+(e.length>>>1)),r=0,s=function(e){i[r++]=e},n=0;t>n;++n){if(r+5>i.length){var o=new sv(r+8+(t-n<<1));o.set(i),i=o}var a=e.charCodeAt(n);128>a?s(a):(2048>a?s(192|a>>>6):(a>55295&&57344>a?(s(240|(a=65536+(1047552&a)|1023&e.charCodeAt(++n))>>>18),s(128|a>>>12&63)):s(224|a>>>12),s(128|a>>>6&63)),s(128|63&a))}return s$(i,0,r)}(sJ(t)),s={mtime:0},n=0xffffffff,o={p(e){for(var t=n,i=0;e.length>i;++i)t=sz[255&t^e[i]]^t>>>8;n=t},d:()=>0xffffffff^n},a=r.length,o.p(r),c=(l=10+(s.filename&&s.filename.length+1||0),u=function(e,t,i,r){var s=e.length,n=new sv(r+s+5*(1+Math.floor(s/7e3))+8),o=n.subarray(r,n.length-8),a=0;if(!t||8>s)for(var l=0;s>=l;l+=65535){var u=l+65535;s>u?a=sV(o,a,e.subarray(l,u)):(o[l]=!0,a=sV(o,a,e.subarray(l,s)))}else{for(var c=sG[t-1],d=c>>>13,h=8191&c,p=(1<<i)-1,g=new s_(32768),f=new s_(p+1),v=Math.ceil(i/3),_=2*v,m=function(t){return(e[t]^e[t+1]<<v^e[t+2]<<_)&p},y=new sm(25e3),b=new s_(288),w=new s_(32),x=0,k=0,E=(l=0,0),S=0,P=0;s>l;++l){var F=m(l),I=32767&l,C=f[F];if(g[I]=C,f[F]=I,l>=S){var M=s-l;if((x>7e3||E>24576)&&M>423){a=sW(e,o,0,y,b,w,k,E,P,l-P,a),E=x=k=0,P=l;for(var j=0;286>j;++j)b[j]=0;for(j=0;30>j;++j)w[j]=0}var L=2,R=0,T=h,$=I-C&32767;if(M>2&&F==m(l-$))for(var O=Math.min(d,M)-1,A=Math.min(32767,l),N=Math.min(258,M);A>=$&&--T&&I!=C;){if(e[l+L]==e[l+L-$]){for(var D=0;N>D&&e[l+D]==e[l+D-$];++D);if(D>L){if(L=D,R=$,D>O)break;var q=Math.min($,D-2),H=0;for(j=0;q>j;++j){var V=l-$+j+32768&32767,W=V-g[V]+32768&32767;W>H&&(H=W,C=V)}}}$+=(I=C)-(C=g[I])+32768&32767}if(R){y[E++]=0x10000000|sE[L]<<18|sS[R];var G=31&sE[L],z=31&sS[R];k+=sy[G]+sb[z],++b[257+G],++w[z],S=l+L,++x}else y[E++]=e[l],++b[e[l]]}}a=sW(e,o,!0,y,b,w,k,E,P,l-P,a)}return s$(n,0,r+sT(a)+8)}(r,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(r.length)))):12+s.mem,l)).length,function(e,t){var i=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=2>t.level?4:2*(9==t.level),e[9]=3,0!=t.mtime&&sB(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),i){e[3]=8;for(var r=0;i.length>=r;++r)e[r+10]=i.charCodeAt(r)}}(u,s),sB(u,c-8,o.d()),sB(u,c-4,a),u);return{contentType:sY,body:d.buffer.slice(d.byteOffset,d.byteOffset+d.byteLength),estimatedSize:d.byteLength}}if(i===sf){let e;var h,p="data="+encodeURIComponent("string"==typeof(e=(h=sJ(t))?btoa(encodeURIComponent(h).replace(/%([0-9A-F]{2})/g,(e,t)=>String.fromCharCode(parseInt(t,16)))):h)?e:sJ(e));return{contentType:"application/x-www-form-urlencoded",body:p,estimatedSize:new Blob([p]).size}}var g=sJ(t);return{contentType:"application/json",body:g,estimatedSize:new Blob([g]).size}}},sQ=e=>{var t,i,r,s=sK(e);return!s||(i=e.compression,r=rY(e.url,"compression"),i!==k.GZipJS&&r!==k.GZipJS&&"gzip"!==r)||((t=s.body)instanceof ArrayBuffer?P(new Uint8Array(t)):ArrayBuffer.isView(t)&&P(new Uint8Array(t.buffer,t.byteOffset,t.byteLength)))?{url:e.url,encodedBody:s}:(sX=!0,{url:((e,t)=>{var[i,r]=e.split("#"),[s,n]=i.split("?");if(!n)return e;var o=n.split("&").filter(e=>e.split("=")[0]!==t).join("&");return s+(o?"?"+o:"")+(r?"#"+r:"")})(e.url,"compression"),encodedBody:sK(m({},e,{compression:void 0,tr:void 0}))})},s0=(ny=_(function*(e){var t=sJ(e.data),i=yield function(e,t,i){return M.apply(this,arguments)}(t,f.DEBUG,{rethrow:!0});if(!i)return e;var r=yield i.arrayBuffer();return m({},e,{tr:{contentType:sY,body:r,estimatedSize:r.byteLength}})}),function(e){return ny.apply(this,arguments)}),s1=(e,t)=>sZ(e,{_:(new Date).getTime().toString(),ver:f.JS_SDK_VERSION,compression:t}),s2=[];l&&s2.push({transport:"fetch",method(e){var t,{url:i,encodedBody:r}=sQ(e),{contentType:s,body:n,estimatedSize:o}=null!=r?r:{},a=new Headers;iN(e.headers,function(e,t){a.append(t,e)}),s&&a.append("Content-Type",s);var u=null;if(c){var d=new c;u={signal:d.signal,timeout:setTimeout(()=>d.abort(),e.timeout)}}l(i,m({method:(null==e?void 0:e.method)||"GET",headers:a,keepalive:"POST"===e.method&&52428.8>(o||0),body:n,signal:null==(t=u)?void 0:t.signal},e.fetchOptions)).then(t=>t.text().then(i=>{var r={statusCode:t.status,text:i};if(200===t.status)try{r.json=JSON.parse(i)}catch(e){tR.error(e)}null==e.callback||e.callback(r)}
1)).catch(t=>{tR.error(t),null==e.callback||e.callback({statusCode:0,error:t})}).finally(()=>u?clearTimeout(u.timeout):null)}}),u&&s2.push({transport:"XHR",method(e){var t=new u,{url:i,encodedBody:r}=sQ(e);t.open(e.method||"GET",i,!0);var{contentType:s,body:n}=null!=r?r:{};iN(e.headers,function(e,i){t.setRequestHeader(i,e)}),s&&t.setRequestHeader("Content-Type",s),e.timeout&&(t.timeout=e.timeout),e.disableXHRCredentials||(t.withCredentials=!0),t.onreadystatechange=()=>{if(4===t.readyState){var i={statusCode:t.status,text:t.responseText};if(200===t.status)try{i.json=JSON.parse(t.responseText)}catch(e){}null==e.callback||e.callback(i)}},t.send(n)}}),null!=n&&n.sendBeacon&&s2.push({transport:"sendBeacon",method(e){try{var{url:t,encodedBody:i}=sQ(e),r=sZ(t,{beacon:"1"}),{contentType:s,body:o}=null!=i?i:{};if(!o)return;var a=o instanceof Blob?o:new Blob([o],{type:s});n.sendBeacon(r,a)}catch(e){}}});class s3{constructor(e,t){this.Xr=!0,this.ei=[],this.ti=er((null==t?void 0:t.flush_interval_ms)||3e3,250,5e3,tR.createLogger("flush interval"),3e3),this.ri=e}enqueue(e){this.ei.push(e),this.ii||this.ni()}unload(){this.si();var e=Object.values(this.ei.length>0?this.oi():{});[...e.filter(e=>0===e.url.indexOf("/e")),...e.filter(e=>0!==e.url.indexOf("/e"))].map(e=>{this.ri(m({},e,{transport:"sendBeacon"}))})}enable(){this.Xr=!1,this.ni()}ni(){var e=this;this.Xr||(this.ii=setTimeout(()=>{if(this.si(),this.ei.length>0){var t=this.oi();for(var i in t)!function(){var r=t[i],s=(new Date).getTime();r.data&&D(r.data)&&iN(r.data,e=>{e.offset=Math.abs(e.timestamp-s),delete e.timestamp}),e.ri(r)}()}},this.ti))}si(){clearTimeout(this.ii),this.ii=void 0}oi(){var e={};return iN(this.ei,t=>{var i,r=(t?t.batchKey:null)||t.url;W(e[r])&&(e[r]=m({},t,{data:[]})),null==(i=e[r].data)||i.push(t.data)}),this.ei=[],e}}var s5=["retriesPerformedSoFar"];class s6{constructor(e){this.ai=!1,this.ui=3e3,this.ei=[],this._instance=e,this.ei=[],this.li=!0,!W(r)&&"onLine"in r.navigator&&(this.li=r.navigator.onLine,this.hi=()=>{this.li=!0,this.ci()},this.di=()=>{this.li=!1},iz(r,"online",this.hi),iz(r,"offline",this.di))}get length(){return this.ei.length}retriableRequest(e){var{retriesPerformedSoFar:t}=e,i=y(e,s5);X(t)&&(i.url=sZ(i.url,{retry_count:t})),this._instance._send_request(m({},i,{callback:e=>{200===e.statusCode||e.statusCode>=400&&500>e.statusCode||(null!=t?t:0)>=10?null==i.callback||i.callback(e):this.vi(m({retriesPerformedSoFar:t},i))}}))}vi(e){var t,i,r=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=r+1;var s=Math.ceil((i=Math.min(18e5,t=3e3*Math.pow(2,r)))+(Math.random()-.5)*(i-t/2)),n=Date.now()+s;this.ei.push({retryAt:n,requestOptions:e});var o="Enqueued failed request for retry in "+s;navigator.onLine||(o+=" (Browser is offline)"),tR.warn(o),this.ai||(this.ai=!0,this.fi())}fi(){(this.pi&&clearTimeout(this.pi),0===this.ei.length)?(this.ai=!1,this.pi=void 0):this.pi=setTimeout(()=>{this.li&&this.ei.length>0&&this.ci(),this.fi()},this.ui)}ci(){var e=Date.now(),t=[],i=this.ei.filter(i=>e>i.retryAt||(t.push(i),!1));if(this.ei=t,i.length>0)for(var{requestOptions:r}of i)this.retriableRequest(r)}unload(){for(var{requestOptions:e}of(this.pi&&(clearTimeout(this.pi),this.pi=void 0),this.ai=!1,W(r)||(this.hi&&(r.removeEventListener("online",this.hi),this.hi=void 0),this.di&&(r.removeEventListener("offline",this.di),this.di=void 0)),this.ei))try{this._instance._send_request(m({},e,{transport:"sendBeacon"}))}catch(e){tR.error(e)}this.ei=[]}}class s4{constructor(e){this.gi=()=>{this.mi||(this.mi={});var e,t,i,r,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.mi.lastScrollY=Math.ceil(n),this.mi.maxScrollY=Math.max(n,null!=(e=this.mi.maxScrollY)?e:0),this.mi.maxScrollHeight=Math.max(o,null!=(t=this.mi.maxScrollHeight)?t:0),this.mi.lastContentY=a,this.mi.maxContentY=Math.max(a,null!=(i=this.mi.maxContentY)?i:0),this.mi.maxContentHeight=Math.max(l,null!=(r=this.mi.maxContentHeight)?r:0)},this._instance=e}get yi(){return this._instance.config.scroll_root_selector}getContext(){return this.mi}resetContext(){var e=this.mi;return setTimeout(this.gi,0),e}startMeasuringScrollPosition(){iz(r,"scroll",this.gi,{capture:!0}),iz(r,"scrollend",this.gi,{capture:!0}),iz(r,"resize",this.gi)}scrollElement(){if(!this.yi)return null==r?void 0:r.document.documentElement;for(var e of D(this.yi)?this.yi:[this.yi]){var t=null==r?void 0:r.document.querySelector(e);
1if(t)return t}}scrollY(){if(this.yi){var e=this.scrollElement();return e&&e.scrollTop||0}return r&&(r.scrollY||r.pageYOffset||r.document.documentElement.scrollTop)||0}scrollX(){if(this.yi){var e=this.scrollElement();return e&&e.scrollLeft||0}return r&&(r.scrollX||r.pageXOffset||r.document.documentElement.scrollLeft)||0}}var s8=e=>r9(null==e?void 0:e.config.mask_personal_data_properties,null==e?void 0:e.config.custom_personal_data_properties);class s9{constructor(e,t,i,r){this.bi=e=>{var t=this.wi();if(!t||t.sessionId!==e){var i={sessionId:e,props:this.xi(this._instance)};this.Si.register({[ip]:i})}},this._instance=e,this.ki=t,this.Si=i,this.xi=r||s8,this.ki.onSessionId(this.bi)}wi(){return this.Si.props[ip]}getSetOnceProps(){var e,t=null==(e=this.wi())?void 0:e.props;return t?"r"in t?r7(t):{$referring_domain:t.referringDomain,$pathname:t.initialPathName,utm_source:t.utm_source,utm_campaign:t.utm_campaign,utm_medium:t.utm_medium,utm_content:t.utm_content,utm_term:t.utm_term}:{}}getSessionProps(){var e={};return iN(iW(this.getSetOnceProps()),(t,i)=>{"$current_url"===i&&(i="url"),e["$session_entry_"+$(i)]=t}),e}}class s7{constructor(){this.Ci={}}on(e,t){return this.Ci[e]||(this.Ci[e]=[]),this.Ci[e].push(t),()=>{this.Ci[e]=this.Ci[e].filter(e=>e!==t)}}emit(e,t){for(var i of this.Ci[e]||[])i(t);for(var r of this.Ci["*"]||[])r(e,t)}}var ne=tT("[SessionId]");class nt{on(e,t){return this.Ii.on(e,t)}constructor(e,t,i){if(this.Ti=null,this.Ei=[],this.Mi=void 0,this.Ii=new s7,this.Ri=(e,t)=>!(!X(e)||!X(t))&&Math.abs(e-t)>this.sessionTimeoutMs,!e.persistence)throw Error("SessionIdManager requires a PostHogPersistence instance");if(e.config.cookieless_mode===iF)throw Error('SessionIdManager cannot be used with cookieless_mode="always"');this.qt=e.config,this.Si=e.persistence,this.Pi=void 0,this.Oi=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.Li=t||iK,this.Fi=i||iK;var r,s=this.qt.persistence_name||this.qt.token;if(this._sessionTimeoutMs=1e3*er(this.qt.session_idle_timeout_seconds||1800,60,36e3,ne.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.Ai(),this.Ni="ph_"+s+"_window_id",this.Di="ph_"+s+"_primary_window_exists",this.$i()){var n=i7.F(this.Ni),o=i7.F(this.Di);n&&!o?this.Pi=n:i7.q(this.Ni),i7.N(this.Di,!0)}if(null!=(r=this.qt.bootstrap)&&r.sessionID)try{var a=(e=>{var t=this.qt.bootstrap.sessionID.replace(/-/g,"");if(32!==t.length)throw Error("Not a valid UUID");if("7"!==t[12])throw Error("Not a UUIDv7");return parseInt(t.substring(0,12),16)})();this.qi(this.qt.bootstrap.sessionID,(new Date).getTime(),a)}catch(e){ne.error("Invalid sessionID in bootstrap",e)}this.ji()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return W(this.Ei)&&(this.Ei=[]),this.Ei.push(e),this.Oi&&e(this.Oi,this.Pi),()=>{this.Ei=this.Ei.filter(t=>t!==e)}}$i(){return"memory"!==this.qt.persistence&&!this.Si.Tr&&i7.O()}Hi(e){e!==this.Pi&&(this.Pi=e,this.$i()&&i7.N(this.Ni,e))}Ui(){return this.Pi?this.Pi:this.$i()?i7.F(this.Ni):null}Bi(e){var t=this.Ti;return!B(t)&&!B(e)&&5e3>Math.abs(e-t)}qi(e,t,i){var r=t!==this._sessionActivityTimestamp,s=e===this.Oi&&i===this._sessionStartTimestamp;this._sessionStartTimestamp=i,this._sessionActivityTimestamp=t,this.Oi=e,s&&!r||s&&this.Bi(t)||(this.Ti=t,this.Si.register({[t1]:[t,e,i]}))}zi(){var e,t=null==(e=this.qt)?void 0:e.persistence_save_debounce_ms;return X(t)&&t>0}Vi(){var e;if(!B(this._sessionActivityTimestamp)&&this._sessionActivityTimestamp!==this.Ti){this.zi()?this.Si.refreshKey(t1):(this.Si.flush(),this.Si.load());var[,t,i]=this.Wi();t===this.Oi&&i===this._sessionStartTimestamp&&(this.Ti=this._sessionActivityTimestamp,this.Si.register({[t1]:[this._sessionActivityTimestamp,null!=(e=this.Oi)?e:null,this._sessionStartTimestamp]}),this.Si.flush())}}Zi(){var[e]=this.Wi();return Math.max(X(e)?e:0,X(this._sessionActivityTimestamp)?this._sessionActivityTimestamp:0)}Wi(){var e=this.Si.props[t1];return D(e)&&2===e.length&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.Ti=null,clearTimeout(this.Gi),this.Gi=void 0,this.qi(null,null,null)}destroy(){this.Vi(),clearTimeout(this.Gi),this.Gi=void 0,this.Mi&&r&&(r.removeEventListener(iL,this.Mi,{capture:!1}),this.Mi=void 0),this.Ei=[]}ji(){this.Mi=()=>{this.Vi(),this.$i()&&i7.q(this.Di)},iz(r,iL,this.Mi,{capture:!1})}
1checkAndGetSessionAndWindowId(e,t){if(void 0===e&&(e=!1),void 0===t&&(t=null),this.qt.cookieless_mode===iF)throw Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var i=t||(new Date).getTime(),[,r,s]=this.Wi(),n=this.Zi(),o=this.Ui(),a=X(s)&&Math.abs(i-s)>864e5,l=!1,u=!r,c=!u&&!e&&this.Ri(i,n);u||c||a?(r=this.Li(),o=this.Fi(),ne.info("new session ID generated",{sessionId:r,windowId:o,changeReason:{noSessionId:u,activityTimeout:c,sessionPastMaximumLength:a}}),s=i,l=!0):o||(o=this.Fi(),l=!0);var d=X(n)&&e&&!a?n:i,h=X(s)?s:(new Date).getTime();return this.Hi(o),this.qi(r,d,h),e||this.Ai(),l&&this.Ei.forEach(e=>e(r,o,l?{noSessionId:u,activityTimeout:c,sessionPastMaximumLength:a}:void 0)),{sessionId:r,windowId:o,sessionStartTimestamp:h,changeReason:l?{noSessionId:u,activityTimeout:c,sessionPastMaximumLength:a}:void 0,lastActivityTimestamp:n}}Ai(){clearTimeout(this.Gi),this.Gi=setTimeout(()=>{var e=this.Zi();if(this.Ri((new Date).getTime(),e)){var t=this.Oi;this.resetSessionId(),this.Ii.emit("forcedIdleReset",{idleSessionId:t})}},1.1*this.sessionTimeoutMs)}}var ni=function(e,t){if(!e)return!1;var i=e.userAgent;if(i&&L(i,t))return!0;try{var r=null==e?void 0:e.userAgentData;if(null!=r&&r.brands&&r.brands.some(e=>L(null==e?void 0:e.brand,t)))return!0}catch(e){}return!!e.webdriver},nr=function(e,t){if(!function(e){try{new RegExp(e)}catch(e){return!1}return!0}(t))return!1;try{return new RegExp(t).test(e)}catch(e){return!1}};function ns(e,t,i){return sJ({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:i})}var nn={exact:(e,t)=>t.some(t=>e.some(e=>t===e)),is_not:(e,t)=>t.every(t=>e.every(e=>t!==e)),regex:(e,t)=>t.some(t=>e.some(e=>nr(t,e))),not_regex:(e,t)=>t.every(t=>e.every(e=>!nr(t,e))),icontains:(e,t)=>t.map(no).some(t=>e.map(no).some(e=>t.includes(e))),not_icontains:(e,t)=>t.map(no).every(t=>e.map(no).every(e=>!t.includes(e))),gt:(e,t)=>t.some(t=>{var i=parseFloat(t);return!isNaN(i)&&e.some(e=>i>parseFloat(e))}),lt:(e,t)=>t.some(t=>{var i=parseFloat(t);return!isNaN(i)&&e.some(e=>i<parseFloat(e))})},no=e=>e.toLowerCase();function na(e,t){return!e||Object.entries(e).every(e=>{var[i,r]=e,s=null==t?void 0:t[i];if(W(s)||B(s))return!1;var n=[String(s)],o=nn[r.operator];return!!o&&o(r.values,n)})}var nl="custom",nu="i.posthog.com",nc=/^\/static\//;class nd{constructor(e){this.Qi={},this.instance=e}get apiHost(){var e=this.instance.config.api_host.trim().replace(/\/$/,"");return"https://app.posthog.com"===e?"https://us.i.posthog.com":e}get flagsApiHost(){var e=this.instance.config.flags_api_host;return e?e.trim().replace(/\/$/,""):this.apiHost}get uiHost(){var e,t=null==(e=this.instance.config.ui_host)?void 0:e.replace(/\/$/,"");return t||(t=this.apiHost.replace("."+nu,".posthog.com")),"https://app.posthog.com"===t?"https://us.posthog.com":t}get region(){return this.Qi[this.apiHost]||(this.Qi[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":nl),this.Qi[this.apiHost]}Ji(e){var t=this.instance.config.__preview_external_dependency_versioned_paths;if("string"==typeof t&&nc.test(e))return t.trim().replace(/\/$/,"")||void 0}endpointFor(e,t){if(void 0===t&&(t=""),t&&(t="/"===t[0]?t:"/"+t),"ui"===e)return this.uiHost+t;if("flags"===e)return this.flagsApiHost+t;if("assets"===e){var i=this.Ji(t);if(i)return""+i+t}if(this.region===nl)return this.apiHost+t;var r=nu+t;switch(e){case"assets":return"https://"+this.region+"-assets."+r;case"api":return"https://"+this.region+"."+r}}}var nh=tT("[Surveys]"),np="seenSurvey_",ng=["popover","widget","api"],nf={ignoreConditions:!1,ignoreDelay:!1,displayType:su},nv=tT("[PostHog ExternalIntegrations]"),n_={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class nm{constructor(e){this._instance=e}lr(e,t){var i;null==(i=p.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,e,e=>{if(e)return nv.error("failed to load script",e);t()})}startIfEnabledOrStop(){var e,t=this,i=function(e){var i,r,n;!s||null!=(i=p.__PosthogExtensions__)&&null!=(i=i.integrations)&&i[e]||t.lr(n_[e],()=>{var i;null==(i=p.__PosthogExtensions__)||null==(i=i.integrations)||null==(i=i[e])||i.start(t._instance)}),!s&&null!=(r=p.__PosthogExtensions__)&&null!=(r=r.integrations)&&r[e]&&(null==(n=p.__PosthogExtensions__)||null==(n=n.integrations)||null==(n=n[e])||n.stop())};for(var[r,s]of Object.entries(null!=(e=this._instance.config.integrations)?e:{}))i(r)}}var ny,nb,nw={},nx=0,nk=()=>{}
1,nE='Consent opt in/out is not valid with cookieless_mode="always" and will be ignored',nS="Surveys module not available",nP="sanitize_properties is deprecated. Use before_send instead",nF="Invalid value for property_denylist config: ",nI="posthog",nC=!sU&&-1===(null==h?void 0:h.indexOf("MSIE"))&&-1===(null==h?void 0:h.indexOf("Mozilla")),nM=e=>{var t;return m({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,token:"",autocapture:!0,cross_subdomain_cookie:function(e){var t=null==e?void 0:e.hostname;if(!G(t))return!1;var i=t.split(".").slice(-2).join(".");for(var r of iG)if(i===r)return!1;return!0}(null==o?void 0:o.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:nk,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:null!=e?e:"unset",__preview_deferred_init_extensions:!1,__preview_external_dependency_versioned_paths:!1,__preview_cookie_wins_on_conflict:!1,debug:a&&G(null==a?void 0:a.search)&&-1!==a.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,disable_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:"https:"===(null==r||null==(t=r.location)?void 0:t.protocol),ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,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,surveys_request_timeout_ms:1e4,on_request_error(e){tR.error("Bad HTTP status: "+e.statusCode+" "+e.text)},get_device_id:e=>e,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:iM,before_send:void 0,request_queue_config:{flush_interval_ms:3e3},error_tracking:{},_onCapture:nk,__preview_eager_load_replay:!1},{rageclick:e&&e>="2026-05-30"?{content_ignorelist:rv,ignore_text_selection:!0}
1:!e||"2025-11-30">e||{content_ignorelist:!0},capture_pageview:!e||"2025-05-24">e||"history_change",session_recording:e&&e>="2025-11-30"?{strictMinimumDuration:!0}:{},external_scripts_inject_target:e&&e>="2026-01-30"?"head":"body",internal_or_test_user_hostname:e&&e>="2026-01-30"?/^(localhost|127\.0\.0\.1)$/:void 0,persistence_save_debounce_ms:e&&e>="2026-05-30"?250:0,split_storage:!(!e||"2026-05-30">e)})},nj=[["process_person","person_profiles"],["xhr_headers","request_headers"],["cookie_name","persistence_name"],["disable_cookie","disable_persistence"],["store_google","save_campaign_params"],["verbose","debug"]],nL=e=>{var t={};for(var[i,r]of nj)W(e[i])||(t[r]=e[i]);var s=iD({},t,e);return D(e.property_blacklist)&&(W(e.property_denylist)?s.property_denylist=e.property_blacklist:D(e.property_denylist)?s.property_denylist=[...e.property_blacklist,...e.property_denylist]:tR.error(nF+e.property_denylist)),s};class nR{constructor(){this.__forceAllowLocalhost=!1}get Ki(){return this.__forceAllowLocalhost}set Ki(e){tR.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}class nT{Yi(e,t){if(e){var i=this.Xi.indexOf(e);-1!==i&&this.Xi.splice(i,1)}return this.Xi.push(t),null==t.initialize||t.initialize(),t}en(){return this.config.cookieless_mode===iF||this.config.cookieless_mode===iP&&this.consent.isRejected()}get decideEndpointWasHit(){var e,t;return null!=(e=null==(t=this.featureFlags)?void 0:t.hasLoadedFlags)&&e}get flagsEndpointWasHit(){var e,t;return null!=(e=null==(t=this.featureFlags)?void 0:t.hasLoadedFlags)&&e}constructor(){this.webPerformance=new nR,this.tn=!1,this.version=f.LIB_VERSION,this.rn=new s7,this.Xi=[],this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=nM(),this.SentryIntegration=rH,this.sentryIntegration=e=>{var t;return t=rq(this,e),{name:rD,processEvent:e=>t(e)}},this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.nn=!1,this.sn=null,this.an=null,this.un=null,this.scrollManager=new s4(this),this.pageViewManager=new rV(this),this.rateLimiter=new sd(this),this.requestRouter=new nd(this),this.consent=new re(this),this.externalIntegrations=new nm(this);var e,t=null!=(e=nT.__defaultExtensionClasses)?e:{};this.featureFlags=t.featureFlags&&new t.featureFlags(this),this.toolbar=t.toolbar&&new t.toolbar(this),this.surveys=t.surveys&&new t.surveys(this),this.conversations=t.conversations&&new t.conversations(this),this.logs=t.logs&&new t.logs(this),this.experiments=t.experiments&&new t.experiments(this),this.exceptions=t.exceptions&&new t.exceptions(this),this.people={set:(e,t,i)=>{var r=G(e)?{[e]:t}:e;this.setPersonProperties(r),null==i||i({})},set_once:(e,t,i)=>{var r=G(e)?{[e]:t}:e;this.setPersonProperties(void 0,r),null==i||i({})}},this.on("eventCaptured",e=>tR.info('send "'+(null==e?void 0:e.event)+'"',e))}init(e,t,i){if(i&&i!==nI){var r,s=null!=(r=nw[i])?r:new nT;return s._init(e,t,i),nw[i]=s,nw[nI][i]=s,s}return this._init(e,t,i)}_init(e,t,i){void 0===t&&(t={});var s,n,o=G(e)?e.trim():"";if(!o)return tR.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},t.debug=this.ln(t.debug),this.hn=t,this.cn=[],t.person_profiles?this.an=t.person_profiles:t.process_person&&(this.an=t.process_person);var a=nM(t.defaults),l=nL(t),u=iD({},a,l,{name:i,token:o});H(a.rageclick)&&H(l.rageclick)&&(u.rageclick=iD({},a.rageclick,l.rageclick)),this.set_config(u),this.config.on_xhr_error&&tR.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=t.disable_compression?void 0:sg;var c=this.dn();this.persistence=new ss(this.config,c),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new ss(m({},this.config,{persistence:"sessionStorage"}),c,!1);var d=m({},this.persistence.props),h=m({},this.sessionPersistence.props);this.register({$initialization_time:(new Date).toISOString()}),this.vn=new s3(e=>this.fn(e),this.config.request_queue_config),this.pn=new s6(this),this.__request_queue=[];var p=this.en();if(p||(this.sessionManager=new nt(this),this.sessionPropsManager=new s9(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(tR.info("Deferring extension initialization to improve startup performance"),setTimeout(()=>{this.gn(p)},0)):(tR.info("Initializing extensions synchronously"),this.gn(p)),f.DEBUG=f.DEBUG||this.config.debug,f.DEBUG&&tR.info("Starting in debug mode",{this:this,config:t,thisC:m({},this.config),p:d,s:h}),!this.config.identity_distinct_id||null!=(s=t.bootstrap)&&s.distinctID||(t.bootstrap=m({},t.bootstrap,{distinctID:this.config.identity_distinct_id,isIdentifiedID:!0}
1)),void 0!==(null==(n=t.bootstrap)?void 0:n.distinctID)){var g=t.bootstrap.distinctID,v=this.get_distinct_id(),_=this.persistence.get_property(ih);if(t.bootstrap.isIdentifiedID&&null!=v&&v!==g&&_===iI)this.identify(g);else if(t.bootstrap.isIdentifiedID&&null!=v&&v!==g&&_===iC)tR.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 y=this.config.get_device_id(iK()),b=t.bootstrap.isIdentifiedID?y:g;this.persistence.set_property(ih,t.bootstrap.isIdentifiedID?iC:iI),this.register({distinct_id:g,$device_id:b})}}if(p)this.register_once({distinct_id:iw,$device_id:null},"");else if(!this.get_distinct_id()){var w=this.config.get_device_id(iK());this.register_once({distinct_id:w,$device_id:w},""),this.persistence.set_property(ih,iI)}return iz(r,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),t.segment?function(e,t){var i=e.config.segment;if(!i)return t();!function(e,t){var i=e.config.segment;if(!i)return t();var r=i=>{var r=()=>i.anonymousId()||iK();e.config.get_device_id=r,i.id()&&(e.register({distinct_id:i.id(),$device_id:r()}),e.persistence.set_property(ih,iC)),t()},s=i.user();"then"in s&&q(s.then)?s.then(r):r(s)}(e,()=>{var r;i.register((Promise&&Promise.resolve||rN.warn("This browser does not have Promise support, and can not use the segment integration"),r=(t,i)=>{if(!i)return t;t.event.userId||t.event.anonymousId===e.get_distinct_id()||(rN.info("No userId set, resetting PostHog"),e.reset()),t.event.userId&&t.event.userId!==e.get_distinct_id()&&(rN.info("UserId set, identifying with PostHog"),e.identify(t.event.userId));var r=e.calculateEventProperties(i,t.event.properties);return t.event.properties=Object.assign({},r,t.event.properties),t},{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:e=>r(e,e.event.event),page:e=>r(e,iR),identify:e=>r(e,i$),screen:e=>r(e,"$screen")})).then(()=>{t()})})}(this,()=>this.mn()):this.mn(),q(this.config._onCapture)&&this.config._onCapture!==nk&&(tR.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",e=>this.config._onCapture(e.event,e))),this.config.ip&&tR.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}gn(e){var t,i,r,s,n,o,a,l=performance.now(),u=m({},nT.__defaultExtensionClasses,this.config.__extensionClasses),c=[];u.featureFlags&&this.Xi.push(this.featureFlags=null!=(t=this.featureFlags)?t:new u.featureFlags(this)),u.exceptions&&this.Xi.push(this.exceptions=null!=(i=this.exceptions)?i:new u.exceptions(this)),u.historyAutocapture&&this.Xi.push(this.historyAutocapture=new u.historyAutocapture(this)),u.tracingHeaders&&this.Xi.push(this.tracingHeaders=new u.tracingHeaders(this)),u.siteApps&&this.Xi.push(this.siteApps=new u.siteApps(this)),u.sessionRecording&&!e&&this.Xi.push(this.sessionRecording=new u.sessionRecording(this)),this.config.disable_scroll_properties||c.push(()=>{this.scrollManager.startMeasuringScrollPosition()}),u.autocapture&&this.Xi.push(this.autocapture=new u.autocapture(this)),u.surveys&&this.Xi.push(this.surveys=null!=(r=this.surveys)?r:new u.surveys(this)),u.logs&&this.Xi.push(this.logs=null!=(s=this.logs)?s:new u.logs(this)),u.conversations&&this.Xi.push(this.conversations=null!=(n=this.conversations)?n:new u.conversations(this)),u.productTours&&this.Xi.push(this.productTours=new u.productTours(this)),u.heatmaps&&this.Xi.push(this.heatmaps=new u.heatmaps(this)),u.webVitalsAutocapture&&this.Xi.push(this.webVitalsAutocapture=new u.webVitalsAutocapture(this)),u.exceptionObserver&&this.Xi.push(this.exceptionObserver=new u.exceptionObserver(this)),u.deadClicksAutocapture&&this.Xi.push(this.deadClicksAutocapture=new u.deadClicksAutocapture(this,rO)),u.toolbar&&this.Xi.push(this.toolbar=null!=(o=this.toolbar)?o:new u.toolbar(this)),u.experiments&&this.Xi.push(this.experiments=null!=(a=this.experiments)?a:new u.experiments(this)),this.Xi.forEach(e
1=>{e.initialize&&c.push(()=>{null==e.initialize||e.initialize()})}),c.push(()=>{if(this.yn){var e=this.yn;this.yn=void 0,this.Qr(e)}}),this.bn(c,l)}bn(e,t){for(;e.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-t>=30&&e.length>0)return void setTimeout(()=>{this.bn(e,t)},0);var i=e.shift();if(i)try{i()}catch(e){tR.error("Error initializing extension:",e)}}var r=Math.round(performance.now()-t);this.register_for_session({[ix]:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",[ik]:r}),this.config.__preview_deferred_init_extensions&&tR.info("PostHog extensions initialized ("+r+"ms)")}Qr(e){var t;o&&o.body?(this.config.__preview_deferred_init_extensions&&(this.yn=e),this._n=e,this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=R(e.supportedCompression,sg)?sg:R(e.supportedCompression,sf)?sf:void 0),null!=(t=e.analytics)&&t.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),this.set_config({person_profiles:this.an?this.an:iM}),this.Xi.forEach(t=>null==t.onRemoteConfig?void 0:t.onRemoteConfig(e))):(tR.info("document not ready yet, trying again in 500 milliseconds..."),setTimeout(()=>{this.Qr(e)},500))}mn(){try{this.config.loaded(this)}catch(e){tR.critical("`loaded` function failed",e)}if(this.wn(),this.config.internal_or_test_user_hostname&&null!=a&&a.hostname){var e=a.hostname,t=this.config.internal_or_test_user_hostname;("string"==typeof t?e===t:t.test(e))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout(()=>{(this.consent.isOptedIn()||this.en())&&this.xn()},1),this.Sn=new sp(this),this.Sn.load()}wn(){var e;this.is_capturing()&&this.config.request_batching&&(null==(e=this.vn)||e.enable())}_dom_loaded(){this.is_capturing()&&iA(this.__request_queue,e=>this.fn(e)),this.__request_queue=[],this.wn()}_handle_unload(){var e,t,i,r;null==(e=this.surveys)||e.handlePageUnload(),this.config.request_batching?(this.kn()&&this.capture(iT),null==(t=this.logs)||t.flushLogs("sendBeacon"),null==(i=this.vn)||i.unload(),null==(r=this.pn)||r.unload()):this.kn()&&this.capture(iT,null,{transport:"sendBeacon"})}_send_request(e){this.__loaded&&(nC?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)||(e.transport=e.transport||this.config.api_transport,e.url=sZ(e.url,{ip:+!!this.config.ip}),e.headers=m({},this.config.request_headers,e.headers),e.compression="best-available"===e.compression?this.compression:e.compression,e.disableXHRCredentials=this.config.__preview_disable_xhr_credentials,this.config.__preview_disable_beacon&&(e.disableTransport=["sendBeacon"]),e.fetchOptions=e.fetchOptions||this.config.fetch_options,(e=>{var t,i,r,s=m({},e);s.timeout=s.timeout||6e4,s.url=s1(s.url,s.compression);var n=null!=(t=s.transport)?t:"fetch",o=s2.filter(e=>!s.disableTransport||!e.transport||!s.disableTransport.includes(e.transport)),a=null!=(i=null==(r=function(e){for(var t=0;e.length>t;t++)if(e[t].transport===n)return e[t]}(o))?void 0:r.method)?i:o[0].method;if(!a)throw Error("No available transport method");"sendBeacon"!==n&&s.data&&s.compression===sg&&d&&!sX?s0(s).then(e=>{a(e)}).catch(t=>{F(t)?(sX=!0,a(m({},s,{compression:void 0,url:s1(e.url,void 0)}))):((e=>{if(!e||"object"!=typeof e)return!1;var t="name"in e?String(e.name):"";return F(e)||t===S})(t)&&(sX=!0),a(s))}):a(s)})(m({},e,{callback:t=>{var i,r;this.rateLimiter.checkForLimiting(t),400>t.statusCode||null==(i=(r=this.config).on_request_error)||i.call(r,t),null==e.callback||e.callback(t)}}))))}fn(e){this.pn?this.pn.retriableRequest(e):this._send_request(e)}_execute_array(e){nx++;try{var t,i=[],r=[],s=[];iA(e,e=>{if(e)if(D(t=e[0]))s.push(e);else if(q(e))try{e.call(this)}catch(t){tR.error("Error executing queued PostHog call",e,t)}else D(e)&&"alias"===t?i.push(e):D(e)&&-1!==t.indexOf("capture")&&q(this[t])?s.push(e):r.push(e)});var n=function(e,t){iA(e,function(e){try{if(D(e[0])){var i=t;iN(e,function(e){i=i[e[0]].apply(i,e.slice(1))})}else t[e[0]].apply(t,e.slice(1))}catch(t){tR.error("Error executing queued PostHog call",e,t)}})};n(i,this),n(r,this),n(s,this)}finally{nx--}}push(e){if(nx>0&&D(e)&&G(e[0])){var t=nT.prototype[e[0]];q(t)&&t.apply(this,e.slice(1))}else this._execute_array([e])}capture(e,t,i){var r,s,n,o,a;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.vn){if(this.is_capturing())if(!W(e)&&G(e)){var l=!this.config.opt_out_useragent_filter&&this._is_bot();if(!l||this.config.__preview_capture_bot_pageviews){var u=null!=i&&i.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(null==u||!u.isRateLimited){null!=t&&t.$current_url&&!G(null==t?void 0:t.$current_url)&&(tR.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),null==t||delete t.$current_url),"$exception"!==e||null!=i&&i.Cn||tR.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 c=new Date,d=(null==i?void 0:i.timestamp)||c,h=(null==i?void 0:i.uuid)||iK(),p={uuid:h,event:e,properties:this.calculateEventProperties(e,t||{},d,h)};e===iR&&this.config.__preview_capture_bot_pageviews&&l&&(p.event="$bot_pageview",p.properties.$browser_type="bot"),u&&(p.properties.$lib_rate_limit_remaining_tokens=u.remainingTokens),(null==i?void 0:i.$set)&&(p.$set=null==i?void 0:i.$set);var g,f,v,_=this.In(null==i?void 0:i.$set_once,e!==iO,e===i$);if(_&&(p.$set_once=_),null!=i&&i._noTruncate||(s=this.config.properties_string_max_length,n=p,o=e=>G(e)?e.slice(0,s):e,a=new Set,p=function e(t,i){var r;return t!==Object(t)?o?o(t):t:a.has(t)?void 0:(a.add(t),D(t)?(r=[],iA(t,t=>{r.push(e(t))})):(r={},iN(t,(t,i)=>{a.has(t)||(r[i]=e(t,i))}
1)),r)}(n)),p.timestamp=d,W(null==i?void 0:i.timestamp)||(p.properties.$event_time_override_provided=!0,p.properties.$event_time_override_system_time=c),"survey dismissed"===e||e===sl){var y=null==t?void 0:t.$survey_id,b=null==t?void 0:t.$survey_iteration;(e=>{try{var t,i=(t=""+np+e.id,e.current_iteration&&e.current_iteration>0&&(t=""+np+e.id+"_"+e.current_iteration),t);if(localStorage.getItem(i))return;localStorage.setItem(i,"true")}catch(e){nh.error("Failed to persist survey seen state",e)}})({id:y,current_iteration:b}),p.$set=m({},p.$set,{[(g={id:y,current_iteration:b},v="$survey_"+(f=e===sl?"responded":"dismissed")+"/"+g.id,g.current_iteration&&g.current_iteration>0&&(v="$survey_"+f+"/"+g.id+"/"+g.current_iteration),v)]:!0})}else e===sa&&(p.$set=m({},p.$set,{$survey_last_seen_date:(new Date).toISOString()}));if("product tour shown"===e){var w=null==t?void 0:t.$product_tour_type;w&&(p.$set=m({},p.$set,{["$product_tour_last_seen_date/"+w]:(new Date).toISOString()}))}var x=m({},p.properties.$set,p.$set);if(V(x)||this.setPersonPropertiesForFlags(x),!U(this.config.before_send)){var k=this.Tn(p);if(!k)return;p=k}this.rn.emit("eventCaptured",p);var E={method:"POST",url:null!=(r=null==i?void 0:i._url)?r:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:p,compression:"best-available",batchKey:null==i?void 0:i._batchKey,transport:null==i?void 0:i.transport};return!this.config.request_batching||i&&(null==i||!i._batchKey)||null!=i&&i.send_instantly?this.fn(E):this.vn.enqueue(E),p}tR.critical("This capture call is ignored due to client rate limiting.")}}else tR.error("No event name provided to posthog.capture")}else tR.uninitializedWarning("posthog.capture")}_addCaptureHook(e){return this.on("eventCaptured",t=>e(t.event,t))}calculateEventProperties(e,t,i,s,n){if(i=i||new Date,!this.persistence||!this.sessionPersistence)return t;var l,u=n?void 0:this.persistence.remove_event_timer(e),c=m({},t);if(c.token=this.config.token,c.$config_defaults=this.config.defaults,this.en()&&(c.$cookieless_mode=!0),"$snapshot"===e){var d=m({},this.persistence.properties(),this.sessionPersistence.properties());return c.distinct_id=d.distinct_id,(!G(c.distinct_id)&&!Y(c.distinct_id)||z(c.distinct_id))&&tR.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),c}var p,g=function(e,t){if(!h)return{};var i,s,n,o,l,u,c,d,p,g,v,_,m=e?[...rK,...t||[]]:[],[y,b]=function(e){for(var t=0;e9.length>t;t++){var[i,r]=e9[t],s=i.exec(e),n=s&&(q(r)?r(s,e):r);if(n)return n}return["",""]}(h),w=null!=(l="u">typeof navigator?navigator:void 0)&&l.brave?{brave:!0}:{},x=iD(iW({$os:y,$os_version:b,$browser:e6(h,navigator.vendor,w),$device:e7(h),$device_type:(c={userAgentDataPlatform:null==(i=navigator)||null==(i=i.userAgentData)?void 0:i.platform,maxTouchPoints:null==(s=navigator)?void 0:s.maxTouchPoints,screenWidth:null==r||null==(n=r.screen)?void 0:n.width,screenHeight:null==r||null==(o=r.screen)?void 0:o.height,devicePixelRatio:null==r?void 0:r.devicePixelRatio},(_=e7(h))===eh||_===ed||"Kobo"===_||"Kindle Fire"===_||_===eV?ec:_===ej||_===eR||_===eL||_===eD?"Console":_===eg?"Wearable":_?el:"Android"===(null==c?void 0:c.userAgentDataPlatform)&&(null!=(d=null==c?void 0:c.maxTouchPoints)?d:0)>0?600>Math.min(null!=(p=null==c?void 0:c.screenWidth)?p:0,null!=(g=null==c?void 0:c.screenHeight)?g:0)/(null!=(v=null==c?void 0:c.devicePixelRatio)?v:1)?el:ec:"Desktop"),$timezone:se(),$timezone_offset:function(){try{return(new Date).getTimezoneOffset()}catch(e){return}}()}),{$current_url:rX(null==a?void 0:a.href,m,r0),$host:null==a?void 0:a.host,$pathname:null==a?void 0:a.pathname,$raw_user_agent:h.length>1e3?h.substring(0,997)+"...":h,$browser_version:e8(h,navigator.vendor,w),$browser_language:r6(),$browser_language_prefix:"string"==typeof(u=r6())?u.split("-")[0]:void 0,$screen_height:null==r?void 0:r.screen.height,$screen_width:null==r?void 0:r.screen.width,$viewport_height:null==r?void 0:r.innerHeight,$viewport_width:null==r?void 0:r.innerWidth,$lib:f.LIB_NAME,$lib_version:f.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3});return f.SDK_DIST_CHANNEL&&(x.$sdk_dist_channel=f.SDK_DIST_CHANNEL),x}(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties);if(this.sessionManager){var{sessionId:v,windowId:_}=this.sessionManager.checkAndGetSessionAndWindowId(n,i.getTime());c.$session_id=v,c.$window_id=_}this.sessionPropsManager&&iD(c,this.sessionPropsManager.getSessionProps());try{this.sessionRecording&&iD(c,this.sessionRecording.sdkDebugProperties),c.$sdk_debug_retry_queue_size=null==(l=this.pn)?void 0:l.length}catch(e){c.$sdk_debug_error_capturing_properties=String(e)}if(this.requestRouter.region===nl&&(c.$lib_custom_api_host=this.config.api_host),p=e!==iR||n?e!==iT||n?this.pageViewM
1anager.doEvent():this.pageViewManager.doPageLeave(i):this.pageViewManager.doPageView(i,s),c=iD(c,p),e===iR&&o&&(c.title=o.title),!W(u)){var y=i.getTime()-u;c.$duration=parseFloat((y/1e3).toFixed(3))}h&&this.config.opt_out_useragent_filter&&(c.$browser_type=this._is_bot()?"bot":"browser"),(c=iD({},g,this.persistence.properties(),this.sessionPersistence.properties(),c)).$is_identified=this._isIdentified(),D(this.config.property_denylist)?iN(this.config.property_denylist,function(e){delete c[e]}):tR.error(nF+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var b=this.config.sanitize_properties;b&&(tR.error(nP),c=b(c,e));var w=this.En();return c.$process_person_profile=w,w&&!n&&this.Mn("_calculate_event_properties"),c}In(e,t,i){if(void 0===t&&(t=!0),void 0===i&&(i=!1),!this.persistence||!this.En()||this.tn&&!i)return e;var r,s=iD({},this.persistence.get_initial_props(),(null==(r=this.sessionPropsManager)?void 0:r.getSetOnceProps())||{},e||{}),n=this.config.sanitize_properties;return n&&(tR.error(nP),s=n(s,"$set_once")),t&&(this.tn=!0),V(s)?void 0:s}register(e,t){var i;null==(i=this.persistence)||i.register(e,t)}register_once(e,t,i){var r;null==(r=this.persistence)||r.register_once(e,t,i)}register_for_session(e){var t;null==(t=this.sessionPersistence)||t.register(e)}unregister(e){var t;null==(t=this.persistence)||t.unregister(e)}unregister_for_session(e){var t;null==(t=this.sessionPersistence)||t.unregister(e)}Rn(e,t){this.register({[e]:t})}getFeatureFlag(e,t){var i;return null==(i=this.featureFlags)?void 0:i.getFeatureFlag(e,t)}getFeatureFlagPayload(e){var t;return null==(t=this.featureFlags)?void 0:t.getFeatureFlagPayload(e)}getFeatureFlagResult(e,t){var i;return null==(i=this.featureFlags)?void 0:i.getFeatureFlagResult(e,t)}isFeatureEnabled(e,t){var i;return null==(i=this.featureFlags)?void 0:i.isFeatureEnabled(e,t)}reloadFeatureFlags(){var e;null==(e=this.featureFlags)||e.reloadFeatureFlags()}updateFlags(e,t,i){var r;null==(r=this.featureFlags)||r.updateFlags(e,t,i)}updateEarlyAccessFeatureEnrollment(e,t,i){var r;null==(r=this.featureFlags)||r.updateEarlyAccessFeatureEnrollment(e,t,i)}getEarlyAccessFeatures(e,t,i){var r;return void 0===t&&(t=!1),null==(r=this.featureFlags)?void 0:r.getEarlyAccessFeatures(e,t,i)}on(e,t){return this.rn.on(e,t)}onFeatureFlags(e){return this.featureFlags?this.featureFlags.onFeatureFlags(e):(e([],{},{errorsLoading:!0}),()=>{})}onSurveysLoaded(e){return this.surveys?this.surveys.onSurveysLoaded(e):(e([],{isLoaded:!1,error:nS}),()=>{})}onSessionId(e){var t,i;return null!=(t=null==(i=this.sessionManager)?void 0:i.onSessionId(e))?t:()=>{}}getSurveys(e,t){void 0===t&&(t=!1),this.surveys?this.surveys.getSurveys(e,t):e([],{isLoaded:!1,error:nS})}getActiveMatchingSurveys(e,t){void 0===t&&(t=!1),this.surveys?this.surveys.getActiveMatchingSurveys(e,t):e([],{isLoaded:!1,error:nS})}renderSurvey(e,t){var i;null==(i=this.surveys)||i.renderSurvey(e,t)}displaySurvey(e,t){var i;void 0===t&&(t=nf),null==(i=this.surveys)||i.displaySurvey(e,t)}cancelPendingSurvey(e){var t;null==(t=this.surveys)||t.cancelPendingSurvey(e)}canRenderSurvey(e){var t,i;return null!=(t=null==(i=this.surveys)?void 0:i.canRenderSurvey(e))?t:{visible:!1,disabledReason:nS}}canRenderSurveyAsync(e,t){var i,r;return void 0===t&&(t=!1),null!=(i=null==(r=this.surveys)?void 0:r.canRenderSurveyAsync(e,t))?i:Promise.resolve({visible:!1,disabledReason:nS})}Pn(e){return!e||z(e)?(tR.critical("Unique user id has not been set in posthog.identify"),!1):e===iw?(tR.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.'),!1):!["distinct_id","distinctid"].includes(e.toLowerCase())&&!["undefined","null"].includes(e.toLowerCase())||(tR.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.'),!1)}identify(e,t,i){if(!this.__loaded||!this.persistence)return tR.uninitializedWarning("posthog.identify");if(Y(e)&&(e=e.toString(),tR.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),this.Pn(e)&&this.Mn("posthog.identify")){var r=this.get_distinct_id();this.register({$user_id:e}),this.get_property(tN)||this.register_once({$had_persisted_distinct_id:!0,$device_id:r},""),e!==r&&e!==this.get_property(tD)&&(this.unregister(tD),this.register({distinct_id:e}));var s,n=(this.persistence.get_property(ih)||iI)===iI;e!==r&&n?(this.persistence.set_property(ih,iC),this.setPersonPropertiesForFlags({$set:t||{},$set_once:i||{}},!1),this.capture(i$,{distinct_id:e,$anon_distinct_id:r},{$set:t||{},$set_once:i||{}}),this.un=ns(e,t,i),null==(s=this.featureFlags)||s.setAnonymousDistinctId(r)):(t||i)&&this.setPersonProperties(t,i),e!==r&&(this.reloadFeatureFlags(),this.unregister(il))}}setPersonProperties(e,t){if((e||t)&&this.Mn("posthog.setPersonProperties")){var i=ns(this.get_distinct_id(),e,t);this.un!==i?(this.setPersonPropertiesForFlags({$set:e||{},$set_once:t||{}},!0),this.capture("$set",{$set:e||{},$set_once:t||{}}),this.un=i):tR.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}group(e,t,i){if(e&&t){var r=this.getGroups(),s=r[e]!==t;if(s&&this.resetGroupPropertiesForFlags(e),this.register({$groups:m({},r,{[e]:t})}),s||i){var n={$group_type:e,$group_key:t};
1i&&(n.$group_set=i),this.capture(iO,n)}i&&this.setGroupPropertiesForFlags({[e]:i}),s&&!i&&this.reloadFeatureFlags()}else tR.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(e,t){var i;void 0===t&&(t=!0),null==(i=this.featureFlags)||i.setPersonPropertiesForFlags(e,t)}resetPersonPropertiesForFlags(){var e;null==(e=this.featureFlags)||e.resetPersonPropertiesForFlags()}setGroupPropertiesForFlags(e,t){var i;void 0===t&&(t=!0),this.Mn("posthog.setGroupPropertiesForFlags")&&(null==(i=this.featureFlags)||i.setGroupPropertiesForFlags(e,t))}resetGroupPropertiesForFlags(e){var t;null==(t=this.featureFlags)||t.resetGroupPropertiesForFlags(e)}reset(e){if(tR.info("reset"),!this.__loaded)return tR.uninitializedWarning("posthog.reset");var t,i,r,s,n,o,a,l,u,c=this.get_property(tN),d=this.get_property(tZ);if(this.consent.reset(),null==(t=this.persistence)||t.clear(),null==(i=this.sessionPersistence)||i.clear(),W(d)||null==(u=this.persistence)||u.register({[tZ]:d}),null==(r=this.surveys)||r.reset(),null==(s=this.Sn)||s.stop(),null==(n=this.featureFlags)||n.reset(),null==(o=this.conversations)||o.reset(),null==(a=this.persistence)||a.set_property(ih,iI),null==(l=this.sessionManager)||l.resetSessionId(),this.un=null,this.config.cookieless_mode===iF)this.register_once({distinct_id:iw,$device_id:null},"");else{var h=this.config.get_device_id(iK());this.register_once({distinct_id:h,$device_id:e?h:c},"")}this.register({$last_posthog_reset:(new Date).toISOString()},1),delete this.config.identity_distinct_id,delete this.config.identity_hash,this.reloadFeatureFlags()}setIdentity(e,t){var i;this.config.identity_distinct_id=e,this.config.identity_hash=t,this.alias(e),null==(i=this.conversations)||i.On()}clearIdentity(){var e;delete this.config.identity_distinct_id,delete this.config.identity_hash,null==(e=this.conversations)||e.Ln()}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var e,t;return null!=(e=null==(t=this.sessionManager)?void 0:t.checkAndGetSessionAndWindowId(!0).sessionId)?e:""}get_session_replay_url(e){if(!this.sessionManager)return"";var{sessionId:t,sessionStartTimestamp:i}=this.sessionManager.checkAndGetSessionAndWindowId(!0),r=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+t);if(null!=e&&e.withTimestamp&&i){var s,n=null!=(s=e.timestampLookBack)?s:10;if(!i)return r;r+="?t="+Math.max(Math.floor(((new Date).getTime()-i)/1e3)-n,0)}return r}alias(e,t){return e===this.get_property(tA)?(tR.critical("Attempting to create alias for existing People user - aborting."),-2):this.Mn("posthog.alias")?(W(t)&&(t=this.get_distinct_id()),e!==t?(this.Rn(tD,e),this.capture("$create_alias",{alias:e,distinct_id:t})):(tR.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}set_config(e){var t=m({},this.config);if(H(e)){iD(this.config,nL(e));var i,r,s,n,o,a,l,u,c,d,h,p=this.dn();null==(i=this.persistence)||i.update_config(this.config,t,p),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new ss(m({},this.config,{persistence:"sessionStorage"}),p,!1);var g=this.ln(this.config.debug);Z(g)&&(this.config.debug=g),Z(this.config.debug)&&(this.config.debug?(f.DEBUG=!0,i5.O()&&i5.N("ph_debug",!0),tR.info("set_config",{config:e,oldConfig:t,newConfig:m({},this.config)})):(f.DEBUG=!1,i5.O()&&i5.q("ph_debug"))),null==(r=this.exceptionObserver)||r.onConfigChange(),null==(s=this.exceptions)||s.onConfigChange(),null==(n=this.sessionRecording)||n.startIfEnabledOrStop(),null==(o=this.tracingHeaders)||o.startIfEnabledOrStop(),null==(a=this.autocapture)||a.startIfEnabled(),null==(l=this.heatmaps)||l.startIfEnabled(),null==(u=this.exceptionObserver)||u.startIfEnabledOrStop(),null==(c=this.deadClicksAutocapture)||c.startIfEnabledOrStop(),null==(d=this.surveys)||d.loadIfEnabled(),this.Fn(),null==(h=this.externalIntegrations)||h.startIfEnabledOrStop()}}_overrideSDKInfo(e,t){f.LIB_NAME=e,f.LIB_VERSION=t}startSessionRecording(e){var t,i,r,s,n,o=!0===e,a={sampling:o||!(null==e||!e.sampling),linked_flag:o||!(null==e||!e.linked_flag),url_trigger:o||!(null==e||!e.url_trigger),event_trigger:o||!(null==e||!e.event_trigger)};Object.values(a).some(Boolean)&&(null==(t=this.sessionManager)||t.checkAndGetSessionAndWindowId(),a.sampling&&(null==(i=this.sessionRecording)||i.overrideSampling()),a.linked_flag&&(null==(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 e;return!(null==(e=this.sessionRecording)||!e.started)}captureException(e,t){if(this.exceptions){var i=Error("PostHog syntheticException"),r=this.exceptions.buildProperties(e,{handled:!0,syntheticException:i});return this.exceptions.sendExceptionEvent(m({},r,t))}}addExceptionStep(e,t){var i;null==(i=this.exceptions)||i.addExceptionStep(e,t)}captureLog(e){var t;null==(t=this.logs)||t.captureLog(e)}get logger(){var e,t;return null!=(e=null==(t=this.logs)?void 0:t.logger)?e:nT.An}startExceptionAutocapture(e){this.set_config({capture_exceptions:null==e||e})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(e){var t,i;return null!=(t=null==(i=this.toolbar)?void 0:i.loadToolbar(e))&&t}get_property(e){var t;return null==(t=this.persistence)?void 0:t.props[e]}getSessionProperty(e){var t;return null==(t=this.sessionPersistence)?void 0:t.props[e]}toString(){var e,t=null!=(e=this.config.name)?e:nI;return t!==nI&&(t=nI+"."+t),t}_isIdentified(){var e,t;return(null==(e=this.persistence)?void 0:e.get_property(ih))===iC||(null==(t=this.sessionPersistence)?void 0:t.get_property(ih))===iC}En(){var e,t;return!("never"===this.config.person_profiles||this.config.person_profiles===iM&&!this._isIdentified()&&V(this.getGroups())&&(null==(e=this.persistence)||null==(e=e.props)||!e[tD])&&(null==(t=this.persistence)||null==(t=t.props)||!t[iy]))}kn(){return!0===this.config.capture_pageleave||"if_capture_pageview"===this.config.capture_pageleave&&(!0===this.config.capture_pageview||"history_change"===this.config.capture_pageview)}createPersonProfile(){this.En()||this.Mn("posthog.createPersonProfile")&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.Mn("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})}Mn(e){return"never"===this.config.person_profiles?(tR.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.Rn(iy,!0),!0)}dn(){if("always"===this.config.cookieless_mode)return!0;var e=this.consent.isOptedOut();return this.config.disable_persistence||e&&!(!this.config.opt_out_persistence_by_default&&this.config.cookieless_mode!==iP)}Fn(){var e,t,i,r,s=this.dn();return(null==(e=this.persistence)?void 0:e.Tr)!==s&&(null==(i=this.persistence)||i.set_disabled(s)),(null==(t=this.sessionPersistence)?void 0:t.Tr)!==s&&(null==(r=this.sessionPersistence)||r.set_disabled(s)),s}opt_in_capturing(e){var t;if(this.config.cookieless_mode!==iF){if(this.en()){this.reset(!0),null==(s=this.sessionManager)||s.destroy(),null==(n=this.pageViewM
1anager)||n.destroy(),this.sessionManager=new nt(this),this.pageViewManager=new rV(this),this.persistence&&(this.sessionPropsManager=new s9(this,this.sessionManager,this.persistence));var i,r,s,n,o,a,l,u,c=null!=(o=null==(a=this.config.__extensionClasses)?void 0:a.sessionRecording)?o:null==(l=nT.__defaultExtensionClasses)?void 0:l.sessionRecording;c&&(this.sessionRecording=this.Yi(this.sessionRecording,new c(this)),this._n&&(null==(u=this.sessionRecording)||null==u.onRemoteConfig||u.onRemoteConfig(this._n)))}this.consent.optInOut(!0),this.Fn(),this.wn(),null==(t=this.sessionRecording)||t.startIfEnabledOrStop(),this.config.cookieless_mode==iP&&(null==(i=this.surveys)||i.loadIfEnabled()),(W(null==e?void 0:e.captureEventName)||null!=e&&e.captureEventName)&&this.capture(null!=(r=null==e?void 0:e.captureEventName)?r:"$opt_in",null==e?void 0:e.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.xn()}else tR.warn(nE)}opt_out_capturing(){var e,t,i;this.config.cookieless_mode!==iF?(this.config.cookieless_mode===iP&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.Fn(),this.config.cookieless_mode===iP&&(this.register({distinct_id:iw,$device_id:null}),null==(e=this.sessionRecording)||e.stopRecording(),this.sessionRecording=void 0,null==(t=this.sessionManager)||t.destroy(),null==(i=this.pageViewManager)||i.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,this.config.capture_pageview&&this.xn(),this.wn())):tR.warn(nE)}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var e=this.consent.consent;return 1===e?"granted":0===e?"denied":"pending"}is_capturing(){return this.config.cookieless_mode===iF||(this.config.cookieless_mode===iP?this.consent.isRejected()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.Fn()}_is_bot(){return n?ni(n,this.config.custom_blocked_useragents):void 0}xn(){o&&("visible"===o.visibilityState?this.nn||(this.nn=!0,this.capture(iR,{title:o.title},{send_instantly:!0}),this.sn&&(o.removeEventListener(ij,this.sn),this.sn=null)):this.sn||(this.sn=this.xn.bind(this),iz(o,ij,this.sn)))}debug(e){!1===e?(null==r||r.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(null==r||r.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),this.set_config({debug:!0}))}Kr(){var e,t,i,r,s=this.hn||{};return"advanced_disable_flags"in s?!!s.advanced_disable_flags:!1!==this.config.advanced_disable_flags?!!this.config.advanced_disable_flags:!0===this.config.advanced_disable_decide?(tR.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(t="advanced_disable_decide",i=(e="advanced_disable_flags")in s&&!U(s[e]),r=t in s&&!U(s[t]),i?s[e]:!!r&&(tR&&tR.warn("Config field '"+t+"' is deprecated. Please use '"+e+"' instead. The old field will be removed in a future major version."),s[t]))}Tn(e){if(U(this.config.before_send))return e;var t=D(this.config.before_send)?this.config.before_send:[this.config.before_send],i=e;for(var r of t){if(U(i=r(i))){var s="Event '"+e.event+"' was rejected in beforeSend function";return J(e.event)?tR.warn(s+". This can cause unexpected behavior."):tR.info(s),null}i.properties&&!V(i.properties)||tR.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}return i}getPageViewId(){var e;return null==(e=this.pageViewManager.dr)?void 0:e.pageViewId}captureTraceFeedback(e,t){this.capture("$ai_feedback",{$ai_trace_id:String(e),$ai_feedback_text:t})}captureTraceMetric(e,t,i){this.capture("$ai_metric",{$ai_trace_id:String(e),$ai_metric_name:t,$ai_metric_value:String(i)})}ln(e){var t=Z(e)&&!e,i=i5.O()&&"true"===i5.A("ph_debug");return!t&&(!!i||e)}}nT.__defaultExtensionClasses={},nT.An={trace:nb=()=>{},debug:nb,info:nb,warn:nb,error:nb,fatal:nb},function(e,t){for(var i=0;t.length>i;i++)e.prototype[t[i]]=iV(e.prototype[t[i]])}(nT,["identify"]);
1class n${constructor(e){this.disabled=!1===e;var t=H(e)?e:{};this.thresholdPx=t.threshold_px||30,this.timeoutMs=t.timeout_ms||1e3,this.clickCount=t.click_count||3,this.clicks=[]}isRageClick(e,t,i){if(this.disabled)return!1;var r=this.clicks[this.clicks.length-1];if(r&&Math.abs(e-r.x)+Math.abs(t-r.y)<this.thresholdPx&&this.timeoutMs>i-r.timestamp){if(this.clicks.push({x:e,y:t,timestamp:i}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:e,y:t,timestamp:i}];return!1}}var nO="$copy_autocapture",nA=tT("[AutoCapture]");function nN(e,t){return t.length>e?t.slice(0,e)+"...":t}var nD=tT("[ExceptionAutocapture]");function nq(e,t,i){try{if(!(t in e))return()=>{};var r=e[t],s=i(r);return q(s)&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=s,()=>{e[t]===s&&(e[t]=r)}}catch(e){return()=>{}}}var nH=tT("[TracingHeaders]"),nV=tT("[Web Vitals]"),nW="disabled",nG="lazy_loading",nz="awaiting_config",nB="missing_config";tT("[SessionRecording]"),tT("[SessionRecording]");var nU="[SessionRecording]",nY=tT(nU),nX=tT("[Heatmaps]");function nZ(e){return H(e)&&"clientX"in e&&"clientY"in e&&Y(e.clientX)&&Y(e.clientY)}var nJ=tT("[Product Tours]"),nK=["$set_once","$set"],nQ=tT("[SiteApps]"),n0="Error while initializing PostHog app with config id ";function n1(e,t,i){if(U(e))return!1;switch(i){case"exact":return e===t;case"contains":return RegExp(t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*"),"i").test(e);case"regex":try{return new RegExp(t).test(e)}catch(e){return!1}default:return!1}}class n2{constructor(e){this.Nn=new s7,this.Dn=(e,t)=>this.$n(e,t)&&this.qn(e,t)&&this.jn(e,t)&&this.Hn(e,t),this.$n=(e,t)=>null==t||!t.event||(null==e?void 0:e.event)===(null==t?void 0:t.event),this._instance=e,this.Un=new Set,this.Bn=new Set}init(){var e,t;W(null==(e=this._instance)?void 0:e._addCaptureHook)||null==(t=this._instance)||t._addCaptureHook((e,t)=>{this.on(e,t)})}register(e){var t,i;if(!W(null==(t=this._instance)?void 0:t._addCaptureHook)&&(e.forEach(e=>{var t,i;null==(t=this.Bn)||t.add(e),null==(i=e.steps)||i.forEach(e=>{var t;null==(t=this.Un)||t.add((null==e?void 0:e.event)||"")})}),null!=(i=this._instance)&&i.autocapture)){var r,s=new Set;e.forEach(e=>{var t;null==(t=e.steps)||t.forEach(e=>{null!=e&&e.selector&&s.add(null==e?void 0:e.selector)})}),null==(r=this._instance)||r.autocapture.setElementSelectors(s)}}on(e,t){var i;null!=t&&0!=e.length&&(this.Un.has(e)||this.Un.has(null==t?void 0:t.event))&&this.Bn&&(null==(i=this.Bn)?void 0:i.size)>0&&this.Bn.forEach(e=>{this.zn(t,e)&&this.Nn.emit("actionCaptured",e.name)})}Vn(e){this.onAction("actionCaptured",t=>e(t))}zn(e,t){if(null==(null==t?void 0:t.steps))return!1;for(var i of t.steps)if(this.Dn(e,i))return!0;return!1}onAction(e,t){return this.Nn.on(e,t)}qn(e,t){if(null!=t&&t.url){var i,r=null==e||null==(i=e.properties)?void 0:i.$current_url;if(!r||"string"!=typeof r||!n1(r,t.url,t.url_matching||"contains"))return!1}return!0}jn(e,t){return!!this.Wn(e,t)&&!!this.Zn(e,t)&&!!this.Gn(e,t)}Wn(e,t){if(null==t||!t.href)return!0;var i=this.Qn(e);if(i.length>0)return i.some(e=>n1(e.href,t.href,t.href_matching||"exact"));var r,s,n=(null==e||null==(r=e.properties)?void 0:r.$elements_chain)||"";return!!n&&n1((s=n.match(/(?::|")href="(.*?)"/))?s[1]:"",t.href,t.href_matching||"exact")}Zn(e,t){if(null==t||!t.text)return!0;var i=this.Qn(e);if(i.length>0)return i.some(e=>n1(e.text,t.text,t.text_matching||"exact")||n1(e.$el_text,t.text,t.text_matching||"exact"));var r,s,n,o,a=(null==e||null==(r=e.properties)?void 0:r.$elements_chain)||"";return!!a&&(s=function(e){for(var t,i=[],r=/(?::|")text="(.*?)"/g;!U(t=r.exec(e));)i.includes(t[1])||i.push(t[1]);return i}(a),n=t.text,o=t.text_matching||"exact",s.some(e=>n1(e,n,o)))}Gn(e,t){if(null==t||!t.selector)return!0;var i,r,s=null==e||null==(i=e.properties)?void 0:i.$element_selectors;if(null!=s&&s.includes(t.selector))return!0;var n=(null==e||null==(r=e.properties)?void 0:r.$elements_chain)||"";if(t.selector_regex&&n)try{return new RegExp(t.selector_regex).test(n)}catch(e){}return!1}Qn(e){var t;return null==(null==e||null==(t=e.properties)?void 0:t.$elements)?[]:null==e?void 0:e.properties.$elements}Hn(e,t){return null==t||!t.properties||0===t.properties.length||na(t.properties.reduce((e,t)=>
1{var i=D(t.value)?t.value.map(String):null!=t.value?[String(t.value)]:[];return e[t.key]={values:i,operator:t.operator||"exact"},e},{}),null==e?void 0:e.properties)}}class n3{constructor(e){this._instance=e,this.Jn=new Map,this.Kn=new Map,this.Yn=new Map}Xn(e,t){return!!e&&na(e.propertyFilters,null==t?void 0:t.properties)}es(e,t){var i=new Map;return e.forEach(e=>{var r;null==(r=e.conditions)||null==(r=r[t])||null==(r=r.values)||r.forEach(t=>{if(null!=t&&t.name){var r=i.get(t.name)||[];r.push(e.id),i.set(t.name,r)}})}),i}ts(e,t,i){var r=(i===sn?this.Jn:this.Kn).get(e),s=[];return this.rs(e=>{s=e.filter(e=>null==r?void 0:r.includes(e.id))}),s.filter(r=>{var s,n=null==(s=r.conditions)||null==(s=s[i])||null==(s=s.values)?void 0:s.find(t=>t.name===e);return this.Xn(n,t)})}register(e){var t;W(null==(t=this._instance)?void 0:t._addCaptureHook)||(this.ns(e),this.ss(e))}ss(e){var t=e.filter(e=>{var t,i;return(null==(t=e.conditions)?void 0:t.actions)&&(null==(i=e.conditions)||null==(i=i.actions)||null==(i=i.values)?void 0:i.length)>0});0!==t.length&&(null==this.os&&(this.os=new n2(this._instance),this.os.init(),this.os.Vn(e=>{this.onAction(e)})),t.forEach(e=>{var t,i,r,s,n;e.conditions&&null!=(t=e.conditions)&&t.actions&&null!=(i=e.conditions)&&null!=(i=i.actions)&&i.values&&(null==(r=e.conditions)||null==(r=r.actions)||null==(r=r.values)?void 0:r.length)>0&&(null==(s=this.os)||s.register(e.conditions.actions.values),null==(n=e.conditions)||null==(n=n.actions)||null==(n=n.values)||n.forEach(t=>{if(t&&t.name){var i=this.Yn.get(t.name);i&&i.push(e.id),this.Yn.set(t.name,i||[e.id])}}))}))}ns(e){var t,i=e.filter(e=>{var t,i;return(null==(t=e.conditions)?void 0:t.events)&&(null==(i=e.conditions)||null==(i=i.events)||null==(i=i.values)?void 0:i.length)>0}),r=e.filter(e=>{var t,i;return(null==(t=e.conditions)?void 0:t.cancelEvents)&&(null==(i=e.conditions)||null==(i=i.cancelEvents)||null==(i=i.values)?void 0:i.length)>0});0===i.length&&0===r.length||(null==(t=this._instance)||t._addCaptureHook((e,t)=>{this.onEvent(e,t)}),this.Jn=this.es(e,sn),this.Kn=this.es(e,so))}onEvent(e,t){var i,r=this.le(),s=this.us(),n=this.ls(),o=(null==(i=this._instance)||null==(i=i.persistence)?void 0:i.props[s])||[];if(n===e&&t&&o.length>0){r.info("event matched, removing item from activated items",{event:e,eventPayload:t,existingActivatedItems:o});var a,l,u=(null==t||null==(a=t.properties)?void 0:a.$survey_id)||(null==t||null==(l=t.properties)?void 0:l.$product_tour_id);if(u){var c=o.indexOf(u);0>c||(o.splice(c,1),this.hs(o))}}else{if(this.Kn.has(e)){var d=this.ts(e,t,so);d.length>0&&(r.info("cancel event matched, cancelling items",{event:e,itemsToCancel:d.map(e=>e.id)}),d.forEach(e=>{var t=o.indexOf(e.id);0>t||o.splice(t,1),this.cs(e.id)}),this.hs(o))}if(this.Jn.has(e)){r.info("event name matched",{event:e,eventPayload:t,items:this.Jn.get(e)});var h=this.ts(e,t,sn);this.hs(o.concat(h.map(e=>e.id)||[]))}}}onAction(e){var t,i=this.us(),r=(null==(t=this._instance)||null==(t=t.persistence)?void 0:t.props[i])||[];this.Yn.has(e)&&this.hs(r.concat(this.Yn.get(e)||[]))}hs(e){var t=this.le(),i=[...new Set(e)].filter(e=>!this.ds(e));t.info("updating activated items",{activatedItems:i}),this.vs(i)}getActivatedIds(){var e,t=this.us();return(null==(e=this._instance)||null==(e=e.persistence)?void 0:e.props[t])||[]}getEventToItemsMap(){return this.Jn}fs(){return this.os}}class n5 extends n3{constructor(e){super(e)}us(){return io}ls(){return sa}rs(e){var t;null==(t=this._instance)||t.getSurveys(e)}cs(e){var t;null==(t=this._instance)||t.cancelPendingSurvey(e)}le(){return nh}vs(e){var t;null==(t=this._instance)||null==(t=t.persistence)||t.register({[io]:e})}ds(){return!1}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}}var n6="SDK is not enabled or survey functionality is not yet loaded",n4="Disabled. Not loading surveys.",n8=null!=r&&r.location?rZ(r.location.hash,"__posthog")||rZ(location.hash,"state"):null,n9="_postHogToolbarParams",n7=tT("[Toolbar]"),oe=tT("[FeatureFlags]"),ot=tT("[FeatureFlags]",{debugEnabled:!0}),oi="\" failed. Feature flags didn't load in time.",or=e=>{for(var t={},i=0;e.length>i;i++)t[e[i]]=!0;return t},os=e=>{var t={};for(var[i,r]of iq(e||{}))r&&(t[i]=r);return t},on=tT("[Error tracking]"),oo="Refusing to render web experiment since the viewer is a likely bot",oa={icontains:(e,t)=>!!r&&t.href.toLowerCase().indexOf(e.toLowerCase())>-1,not_icontains:(e,t)=>!!r&&-1===t.href.toLowerCase().indexOf(e.toLowerCase()),regex:(e,t)=>!!r&&nr(t.href,e),not_regex:(e,t)=>!!r&&!nr(t.href,e),exact:(e,t)=>
1t.href===e,is_not:(e,t)=>t.href!==e};class ol{get qt(){return this._instance.config}constructor(e){var t=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(e){void 0===e&&(e=!1),t.getWebExperiments(e=>{ol.ps("retrieved web experiments from the server"),t.gs=new Map,e.forEach(e=>{if(e.feature_flag_key){t.gs&&(ol.ps("setting flag key ",e.feature_flag_key," to web experiment ",e),null==(i=t.gs)||i.set(e.feature_flag_key,e));var i,r=t._instance.getFeatureFlag(e.feature_flag_key);G(r)&&e.variants[r]&&t.ys(e.name,r,e.variants[r].transforms)}else if(e.variants)for(var s in e.variants){var n=e.variants[s];ol.bs(n)&&t.ys(e.name,s,n.transforms)}})},e)},this._instance=e,this._instance.onFeatureFlags(e=>{this.onFeatureFlags(e)})}initialize(){}onFeatureFlags(e){if(this._is_bot())ol.ps(oo);else if(!this.qt.disable_web_experiments){if(U(this.gs))return this.gs=new Map,this.loadIfEnabled(),void this.previewWebExperiment();ol.ps("applying feature flags",e),e.forEach(e=>{var t;if(this.gs&&null!=(t=this.gs)&&t.has(e)){var i,r=this._instance.getFeatureFlag(e),s=null==(i=this.gs)?void 0:i.get(e);r&&null!=s&&s.variants[r]&&this.ys(s.name,r,s.variants[r].transforms)}})}}previewWebExperiment(){var e=ol.getWindowLocation();if(null!=e&&e.search){var t=rY(null==e?void 0:e.search,"__experiment_id"),i=rY(null==e?void 0:e.search,"__experiment_variant");t&&i&&(ol.ps("previewing web experiments "+t+" && "+i),this.getWebExperiments(e=>{this._s(parseInt(t),i,e)},!1,!0))}}loadIfEnabled(){this.qt.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(e,t,i){if(this.qt.disable_web_experiments&&!i)return e([]);var r=this._instance.get_property("$web_experiments");if(r&&!t)return e(r);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this.qt.token),method:"GET",callback:t=>e(200===t.statusCode&&t.json&&t.json.experiments||[])})}_s(e,t,i){var r=i.filter(t=>t.id===e);r&&r.length>0&&(ol.ps("Previewing web experiment ["+r[0].name+"] with variant ["+t+"]"),this.ys(r[0].name,t,r[0].variants[t].transforms))}static bs(e){return!U(e.conditions)&&ol.ws(e)&&ol.xs(e)}static ws(e){if(U(e.conditions)||U(null==(t=e.conditions)?void 0:t.url))return!0;var t,i,r,s,n=ol.getWindowLocation();return!!n&&(null==(i=e.conditions)||!i.url||oa[null!=(r=null==(s=e.conditions)?void 0:s.urlMatchType)?r:"icontains"](e.conditions.url,n))}
1static getWindowLocation(){return null==r?void 0:r.location}static xs(e){if(U(e.conditions)||U(null==(i=e.conditions)?void 0:i.utm))return!0;var t=r2();if(t.utm_source){var i,r,s,n,o,a,l,u,c,d=null==(r=e.conditions)||null==(r=r.utm)||!r.utm_campaign||(null==(s=e.conditions)||null==(s=s.utm)?void 0:s.utm_campaign)==t.utm_campaign,h=null==(n=e.conditions)||null==(n=n.utm)||!n.utm_source||(null==(o=e.conditions)||null==(o=o.utm)?void 0:o.utm_source)==t.utm_source,p=null==(a=e.conditions)||null==(a=a.utm)||!a.utm_medium||(null==(l=e.conditions)||null==(l=l.utm)?void 0:l.utm_medium)==t.utm_medium,g=null==(u=e.conditions)||null==(u=u.utm)||!u.utm_term||(null==(c=e.conditions)||null==(c=c.utm)?void 0:c.utm_term)==t.utm_term;return d&&p&&g&&h}return!1}static ps(e){for(var t=arguments.length,i=Array(t>1?t-1:0),r=1;t>r;r++)i[r-1]=arguments[r];tR.info("[WebExperiments] "+e,i)}ys(e,t,i){this._is_bot()?ol.ps(oo):"control"!==t?i.forEach(i=>{if(i.selector){ol.ps("applying transform of variant "+t+" for experiment "+e+" ",i);var r,s=null==(r=document)?void 0:r.querySelectorAll(i.selector);null==s||s.forEach(e=>{i.html&&(e.innerHTML=i.html),i.css&&e.setAttribute("style",i.css)})}}):ol.ps("Control variants leave the page unmodified.")}_is_bot(){return n&&this._instance?ni(n,this.qt.custom_blocked_useragents):void 0}}var ou=tT("[Conversations]"),oc="Conversations not available yet.",od={featureFlags:class{constructor(e){this.Ss=!1,this.ks=!1,this.Cs=!1,this.Is=!1,this.Ts=!1,this.Es=!1,this.Ms=!1,this.Rs=!1,this._instance=e,this.featureFlagEventHandlers=[]}get qt(){return this._instance.config}get Si(){return this._instance.persistence}Ps(e){return this._instance.get_property(e)}Os(){var e,t;return null!=(e=null==(t=this.Si)?void 0:t.Mr(this.qt.feature_flag_cache_ttl_ms))&&e}Ls(){return!!this.Os()&&(this.Rs||this.Cs||(this.Rs=!0,oe.warn("Feature flag cache is stale, triggering refresh..."),this.reloadFeatureFlags()),!0)}Fs(){var e,t=null!=(e=this.qt.evaluation_contexts)?e:this.qt.evaluation_environments;return!this.qt.evaluation_environments||this.qt.evaluation_contexts||this.Ms||(oe.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this.Ms=!0),null!=t&&t.length?t.filter(e=>{var t=e&&"string"==typeof e&&e.trim().length>0;return t||oe.error("Invalid evaluation context found:",e,"Expected non-empty string"),t}):[]}As(){return this.Fs().length>0}Ns(){var e=this.qt.flag_keys;if(!W(e)){if(D(e))return e.filter(e=>{var t=e&&"string"==typeof e&&e.trim().length>0;return t||oe.error("Invalid flag key found:",e,"Expected non-empty string"),t});oe.error("Invalid flag_keys found:",e,"Expected array of non-empty strings")}}initialize(){var e,t,{config:i}=this._instance,r=null!=(e=null==(t=i.bootstrap)?void 0:t.featureFlags)?e:{};if(Object.keys(r).length){var s,n,o=null!=(s=null==(n=i.bootstrap)?void 0:n.featureFlagPayloads)?s:{},a=Object.keys(r).filter(e=>!!r[e]).reduce((e,t)=>(e[t]=r[t]||!1,e),{}),l=Object.keys(o).filter(e=>a[e]).reduce((e,t)=>(o[t]&&(e[t]=o[t]),e),{});this.receivedFeatureFlags({featureFlags:a,featureFlagPayloads:l})}}updateFlags(e,t,i){var r=null!=i&&i.merge?this.getFlagVariants():{},s=null!=i&&i.merge?this.getFlagPayloads():{},n=m({},r,e),o=m({},s,t),a={};for(var[l,u]of Object.entries(n)){var c="string"==typeof u;a[l]={key:l,enabled:!!c||!!u,variant:c?u:void 0,reason:void 0,metadata:W(null==o?void 0:o[l])?void 0:{id:0,version:void 0,description:void 0,payload:o[l]}}}this.receivedFeatureFlags({flags:a})}get hasLoadedFlags(){return this.ks}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var e=this.Ps(t4),t=this.Ps(t7),i=this.Ps(ie);if(!i&&!t)return e||{};var r=iD({},e||{});for(var s of[...new Set([...Object.keys(i||{}),...Object.keys(t||{})])]){var n,o,a=r[s],l=null==t?void 0:t[s],u=W(l)?null!=(n=null==a?void 0:a.enabled)&&n:!!l,c=W(l)?a.variant:"string"==typeof l?l:void 0,d=null==i?void 0:i[s],h=m({},a,{enabled:u,variant:u?null!=c?c:null==a?void 0:a.variant:void 0});u!==(null==a?void 0:a.enabled)&&(h.original_enabled=null==a?void 0:a.enabled),c!==(null==a?void 0:a.variant)&&(h.original_variant=null==a?void 0:a.variant),d&&(h.metadata=m({},null==a?void 0:a.metadata,{payload:d,original_payload:null==a||null==(o=a.metadata)?void 0:o.payload})),r[s]=h}return this.Ss||(oe.warn(" Overriding feature flag details!",{flagDetails:e,overriddenPayloads:i,finalDetails:r}),this.Ss=!0),r}getFlagVariants(){var e=this.Ps(t3),t=this.Ps(t7);if(!t)return e||{};for(var i=iD({},e),r=Object.keys(t),s=0;r.length>s;s++)i[r[s]]=t[r[s]];return this.Ss||(oe.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:i}),this.Ss=!0),i}getFlagPayloads(){var e=this.Ps(t8),t=this.Ps(ie);if(!t)return e||{};for(var i=iD({},e||{}),r=Object.keys(t),s=0;r.length>s;s++)i[r[s]]=t[r[s]];return this.Ss||(oe.warn(" Overriding feature flag payloads!",{flagPayloads:e,overriddenPayloads:t,finalPayloads:i}),this.Ss=!0),i}reloadFeatureFlags(){this.Is||this.qt.advanced_disable_feature_flags||this.Ds||(this._instance.rn.emit("featureFlagsReloading",!0),this.Ds=setTimeout(()=>{this.$s()},5))}qs(){clearTimeout(this.Ds),this.Ds=void 0}ensureFlagsLoaded(){this.ks||this.Cs||this.Ds||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this.Is=e}$s(e){var t;if(this.qs(),!this._instance.Kr())if(this.Cs)this.Ts=!0;else{var i=this.qt.token,r=this.Ps(tN),s={token:i,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:m({},(null==(t=this.Si)?void 0:t.get_initial_props())||{},this.Ps(it)||{}),group_properties:this.Ps(ii),timezone:se()};B(r)||W(r)||(s.$device_id=r),(null!=e&&e.disableFlags||this.qt.advanced_disable_feature_flags)&&(s.disable_flags=!0),this.As()&&(s.evaluation_contexts=this.Fs());var n=this.Ns();W(n)||(s.flag_keys=n);var o=!!this.qt.advanced_only_evaluate_survey_feature_flags,a=this._instance.requestRouter.endpointFor("flags","/flags/?v=2"+(this.qt.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":""));this.Cs=!0,this._instance._send_request({method:"POST",url:a,data:s,compression:this.qt.disable_compression?void 0:sf,timeout:this.qt.feature_flag_request_timeout_ms,callback:e=>{var t,i,r,n=!0;if(200===e.statusCode&&(this.Ts||(this.$anon_distinct_id=void 0),n=!1),this.Cs=!1,!s.disable_flags||this.Ts){this.Es=!n;var a=[];e.error?e.error instanceof Error?a.push("AbortError"===e.error.name?"timeout":"connection_error"):a.push("unknown_error"):200!==e.statusCode&&a.push("api_error_"+e.statusCode),null!=(t=e.json)&&t.errorsWhileComputingFlags&&a.push("errors_while_computing_flags");var l,u=!(null==(i=e.json)||null==(i=i.quotaLimited)||!i.includes("feature_flags"));(u&&a.push("quota_limited"),null==(r=this.Si)||r.register({[ic]:a}),u)?oe.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset.  Please visit https://posthog.com/docs/billing/limits-alerts to learn more."):(s.disable_flags||this.receivedFeatureFlags(null!=(l=e.json)?l:{},n,{partialResponse:o}),this.Ts&&(this.Ts=!1,this.$s()))}}})}}getFeatureFlag(e,t){var i;if(void 0===t&&(t={}),!t.fresh||this.Es)if(this.ks||this.getFlags()&&this.getFlags().length>0){if(!this.Ls()){var r=this.getFeatureFlagResult(e,t);return null!=(i=null==r?void 0:r.variant)?i:null==r?void 0:r.enabled}}else oe.warn('getFeatureFlag for key "'+e+oi)}getFeatureFlagDetails(e){return this.getFlagsWithDetails()[e]}getFeatureFlagPayload(e){var t=this.getFeatureFlagResult(e,{send_event:!1});return null==t?void 0:t.payload}getFeatureFlagResult(e,t){if(void 0===t&&(t={}),!t.fresh||this.Es)if(this.ks||this.getFlags()&&this.getFlags().length>0){if(!this.Ls()){var i=this.getFlagVariants(),r=e in i,s=i[e],n=this.getFlagPayloads()[e],o=String(s),a=this.Ps(t9)||void 0,l=this.Ps(id)||void 0,u=this.Ps(il)||{};if(this.qt.advanced_feature_flags_dedup_per_session){var c,d=this._instance.get_session_id(),h=this.Ps(iu);d&&d!==h&&(u={},null==(c=this.Si)||c.register({[il]:u,[iu]:d}))}if((t.send_event||!("send_event"in t))&&(!(e in u)||!u[e].includes(o))){D(u[e])?u[e].push(o):u[e]=[o],null==(v=this.Si)||v.register({[il]:u});var p=this.getFeatureFlagDetails(e),g=[...null!=(_=this.Ps(ic))?_:[]];W(s)&&g.push("flag_missing");var f={$feature_flag:e,$feature_flag_response:s,$feature_flag_payload:n||null,$feature_flag_request_id:a,$feature_flag_evaluated_at:l,$feature_flag_bootstrapped_response:(null==(m=this.qt.bootstrap)||null==(m
1=m.featureFlags)?void 0:m[e])||null,$feature_flag_bootstrapped_payload:(null==(y=this.qt.bootstrap)||null==(y=y.featureFlagPayloads)?void 0:y[e])||null,$used_bootstrap_value:!this.Es};W(null==p||null==(b=p.metadata)?void 0:b.version)||(f.$feature_flag_version=p.metadata.version);var v,_,m,y,b,w,x,k,E,S,P,F=null!=(w=null==p||null==(x=p.reason)?void 0:x.description)?w:null==p||null==(k=p.reason)?void 0:k.code;F&&(f.$feature_flag_reason=F),null!=p&&null!=(E=p.metadata)&&E.id&&(f.$feature_flag_id=p.metadata.id),W(null==p?void 0:p.original_variant)&&W(null==p?void 0:p.original_enabled)||(f.$feature_flag_original_response=W(p.original_variant)?p.original_enabled:p.original_variant),null!=p&&null!=(S=p.metadata)&&S.original_payload&&(f.$feature_flag_original_payload=null==p||null==(P=p.metadata)?void 0:P.original_payload),g.length&&(f.$feature_flag_error=g.join(",")),this._instance.capture("$feature_flag_called",f)}if(r){var I=n;if(!W(n))try{I=JSON.parse(n)}catch(e){}return{key:e,enabled:!!s,variant:"string"==typeof s?s:void 0,payload:I}}}}else oe.warn('getFeatureFlagResult for key "'+e+oi)}getRemoteConfigPayload(e,t){var i=this.qt.token,r={distinct_id:this._instance.get_distinct_id(),token:i};this.As()&&(r.evaluation_contexts=this.Fs());var s=this.Ns();W(s)||(r.flag_keys=s),this._instance._send_request({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2"),data:r,compression:this.qt.disable_compression?void 0:sf,timeout:this.qt.feature_flag_request_timeout_ms,callback(i){var r,s=null==(r=i.json)?void 0:r.featureFlagPayloads;t((null==s?void 0:s[e])||void 0)}})}isFeatureEnabled(e,t){if(void 0===t&&(t={}),!t.fresh||this.Es){if(this.ks||this.getFlags()&&this.getFlags().length>0){var i=this.getFeatureFlag(e,t);return W(i)?void 0:!!i}oe.warn('isFeatureEnabled for key "'+e+oi)}}addFeatureFlagsHandler(e){this.featureFlagEventHandlers.push(e)}removeFeatureFlagsHandler(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(t=>t!==e)}receivedFeatureFlags(e,t,i){if(this.Si){this.ks=!0;var r=this.getFlagVariants(),s=this.getFlagPayloads(),n=this.getFlagsWithDetails();!function(e,t,i,r,s,n){void 0===i&&(i={}),void 0===r&&(r={}),void 0===s&&(s={});var o,a=((o=e.flags)?(e.featureFlags=Object.fromEntries(Object.keys(o).map(e=>{var t;return[e,null!=(t=o[e].variant)?t:o[e].enabled]})),e.featureFlagPayloads=Object.fromEntries(Object.keys(o).filter(e=>o[e].enabled).filter(e=>{var t;return null==(t=o[e].metadata)?void 0:t.payload}).map(e=>{var t;return[e,null==(t=o[e].metadata)?void 0:t.payload]}))):oe.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),e),l=a.flags,u=a.featureFlags,c=a.featureFlagPayloads;if(u){var d=e.requestId,h=e.evaluatedAt;if(D(u)){oe.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var p={};if(u)for(var g=0;u.length>g;g++)p[u[g]]=!0;t&&t.register({[t5]:u,[t3]:p})}else{var f=u,v=c,_=l;if(null!=n&&n.partialResponse)f=m({},i,f),v=m({},r,v),_=m({},s,_);else if(e.errorsWhileComputingFlags)if(l){var y=new Set(Object.keys(l).filter(e=>{var t;return!(null!=(t=l[e])&&t.failed)}));f=m({},i,Object.fromEntries(Object.entries(f).filter(e=>{var[t]=e;return y.has(t)}))),v=m({},r,Object.fromEntries(Object.entries(v||{}).filter(e=>{var[t]=e;return y.has(t)}))),_=m({},s,Object.fromEntries(Object.entries(_||{}).filter(e=>{var[t]=e;return y.has(t)})))}else f=m({},i,f),v=m({},r,v),_=m({},s,_);t&&t.register(m({[t5]:Object.keys(os(f)),[t3]:f||{},[t8]:v||{},[t4]:_||{}},d?{[t9]:d}:{},h?{[id]:h}:{}))}}}(e,this.Si,r,s,n,i),t||(this.Rs=!1),this.js(t)}}override(e,t){void 0===t&&(t=!1),oe.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:e,suppressWarning:t})}overrideFeatureFlags(e){if(!this._instance.__loaded||!this.Si)return oe.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(!1===e)return this.Si.unregister(t7),this.Si.unregister(ie),this.js(),ot.info("All overrides cleared");if(D(e)){var t,i=or(e);return this.Si.register({[t7]:i}),this.js(),ot.info("Flag overrides set",{flags:e})}if(e&&"object"==typeof e&&("flags"in e||"payloads"in e)){if(this.Ss=!!(null!=(t=e.suppressWarning)&&t),"flags"in e){if(!1===e.flags)this.Si.unregister(t7),ot.info("Flag overrides cleared");else if(e.flags){if(D(e.flags)){var r=or(e.flags);this.Si.register({[t7]:r})}else this.Si.register({[t7]:e.flags});ot.info("Flag overrides set",{flags:e.flags})}}return"payloads"in e&&(!1===e.payloads?(this.Si.unregister(ie),ot.info("Payload overrides cleared")):e.payloads&&(this.Si.register({[ie]:e.payloads}),ot.info("Payload overrides set",{payloads:e.payloads}))),void this.js()}if(e&&"object"==typeof e)return this.Si.register({[t7]:e}),this.js(),ot.info("Flag overrides set",{flags:e});oe.warn("Invalid overrideOptions provided to overrideFeatureFlags",{overrideOptions:e})}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.ks){var{flags:t,flagVariants:i}=this.Hs();e(t,i)}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,t,i){var r,s=(this.Ps(t6)||[]).find(t=>t.flagKey===e),n={["$feature_enrollment/"+e]:t},o={$feature_flag:e,$feature_enrollment:t,$set:n};s&&(o.$early_access_feature_name=s.name),i&&(o.$feature_enrollment_stage=i),this._instance.capture("$feature_enrollment_update",o),this.setPersonPropertiesForFlags(n,!1);var a=m({},this.getFlagVariants(),{[e]:t});null==(r=this.Si)||r.register({[t5]:Object.keys(os(a)),[t3]:a}),this.js()}getEarlyAccessFeatures(e,t,i){void 0===t&&(t=!1);var r=this.Ps(t6),s=i?"&"+i.map(e=>"stage="+e).join("&"):"";if(r&&!t)return e(r);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this.qt.token+s),method:"GET",callback:t=>{var i,r;if(t.json){var s=t.json.earlyAccessFeatures;return null==(i=this.Si)||i.unregister(t6),null==(r=this.Si)||r.register({[t6]:s}),e(s)}}})}Hs(){var e=this.getFlags(),t=this.getFlagVariants();return{flags:e.filter(e=>t[e]),flagVariants:Object.keys(t).filter(e=>t[e]).reduce((e,i)=>(e[i]=t[i],e),{})}}js(e){var{flags:t,flagVariants:i}=this.Hs();
1this.featureFlagEventHandlers.forEach(r=>r(t,i,{errorsLoading:e}))}setPersonPropertiesForFlags(e,t){void 0===t&&(t=!0);var i=this.Ps(it)||{},r=(null==e?void 0:e.$set)||(null!=e&&e.$set_once?{}:e),s=null==e?void 0:e.$set_once,n={};if(s)for(var o in s)({}).hasOwnProperty.call(s,o)&&(o in i||(n[o]=s[o]));this._instance.register({[it]:m({},i,n,r)}),t&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister(it)}setGroupPropertiesForFlags(e,t){void 0===t&&(t=!0);var i=this.Ps(ii)||{};0!==Object.keys(i).length&&Object.keys(i).forEach(t=>{i[t]=m({},i[t],e[t]),delete e[t]}),this._instance.register({[ii]:m({},i,e)}),t&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){var t=this.Ps(ii)||{};this._instance.register({[ii]:m({},t,{[e]:{}})})}else this._instance.unregister(ii)}reset(){this.ks=!1,this.Cs=!1,this.Is=!1,this.Ts=!1,this.Es=!1,this.$anon_distinct_id=void 0,this.qs(),this.Ss=!1}}},oh=m({productTours:class{get Si(){return this._instance.persistence}constructor(e){this.Yo=null,this.Xo=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){"productTours"in e&&(this.Si&&this.Si.register({[tY]:!!e.productTours}),this.loadIfEnabled())}loadIfEnabled(){var e,t;this.Yo||(e=this._instance).config.disable_product_tours||null==(t=e.persistence)||!t.get_property(tY)||this.lr(()=>this.ea())}lr(e){var t,i;null!=(t=p.__PosthogExtensions__)&&t.generateProductTours?e():null==(i=p.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"product-tours",t=>{t?nJ.error("Could not load product tours script",t):e()})}ea(){var e;!this.Yo&&null!=(e=p.__PosthogExtensions__)&&e.generateProductTours&&(this.Yo=p.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(e,t){if(void 0===t&&(t=!1),!D(this.Xo)||t){var i=this.Si;if(i){var r=i.props[ia];if(D(r)&&!t)return this.Xo=r,void e(r,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",callback:t=>{var r=t.statusCode;if(200!==r||!t.json){var s="Product Tours API could not be loaded, status: "+r;return nJ.error(s),void e([],{isLoaded:!1,error:s})}var n=D(t.json.product_tours)?t.json.product_tours:[];this.Xo=n,i&&i.register({[ia]:n}),e(n,{isLoaded:!0})}})}else e(this.Xo,{isLoaded:!0})}getActiveProductTours(e){U(this.Yo)?e([],{isLoaded:!1,error:"Product tours not loaded"}):this.Yo.getActiveProductTours(e)}showProductTour(e){var t;null==(t=this.Yo)||t.showTourById(e)}previewTour(e){this.Yo?this.Yo.previewTour(e):this.lr(()=>{var t;this.ea(),null==(t=this.Yo)||t.previewTour(e)})}dismissProductTour(){var e;null==(e=this.Yo)||e.dismissTour("user_clicked_skip")}nextStep(){var e;null==(e=this.Yo)||e.nextStep()}previousStep(){var e;null==(e=this.Yo)||e.previousStep()}clearCache(){var e;this.Xo=null,null==(e=this.Si)||e.unregister(ia)}resetTour(e){var t;null==(t=this.Yo)||t.resetTour(e)}resetAllTours(){var e;null==(e=this.Yo)||e.resetAllTours()}cancelPendingTour(e){var t;null==(t=this.Yo)||t.cancelPendingTour(e)}}},od),op=m({surveys:class{get qt(){return this._instance.config}constructor(e){this.ca=void 0,this._surveyManager=null,this.da=!1,this.va=[],this.fa=null,this._instance=e,this._surveyEventReceiver=null}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this.qt.disable_surveys){var t=e.surveys;if(U(t))return nh.warn("Flags not loaded yet. Not loading surveys.");var i=D(t);this.ca=i?t.length>0:t,nh.info("flags response received, isSurveysEnabled: "+this.ca),this.loadIfEnabled()}}reset(){localStorage.removeItem("lastSeenSurveyDate");for(var e=[],t=0;t<localStorage.length;t++){var i=localStorage.key(t);(null!=i&&i.startsWith(np)||null!=i&&i.startsWith("inProgressSurvey_"))&&e.push(i)}e.forEach(e=>localStorage.removeItem(e))}loadIfEnabled(){if(!this._surveyManager)if(this.da)nh.info("Already initializing surveys, skipping...");else if(this.qt.disable_surveys)nh.info(n4);else if(this.qt.cookieless_mode&&this._instance.consent.isOptedOut())nh.info("Not loading surveys in cookieless mode without consent.");else{var e=null==p?void 0:p.__PosthogExtensions__;if(e){if(!W(this.ca)||this.qt.advanced_enable_surveys){var t=this.ca||this.qt.advanced_enable_surveys;this.da=!0;try{var i=e.generateSurveys;if(i)return void this.pa(i,t);var r=e.loadExternalDependency;if(!r)return void this.ga(iS);r(this._instance,"surveys",i=>{i||!e.generateSurveys?this.ga("Could not load surveys script",i):this.pa(e.generateSurveys,t)})}catch(e){throw this.ga("Error initializing surveys",e),e}finally{this.da=!1}}}else nh.error("PostHog Extensions not found.")}}pa(e,t){this._surveyManager=e(this._instance,t),this._surveyEventReceiver=new n5(this._instance),nh.info("Surveys loaded successfully"),this.ma({isLoaded:!0})}ga(e,t){nh.error(e,t),this.ma({isLoaded:!1,error:e})}onSurveysLoaded(e){return this.va.push(e),this._surveyManager&&this.ma({isLoaded:!0}),()=>{this.va=this.va.filter(t=>t!==e)}}getSurveys(e,t){if(void 0===t&&(t=!1),this.qt.disable_surveys)return nh.info(n4),e([]);var i,r=this._instance.get_property(ir);if(r&&!t)return e(r,{isLoaded:!0});"u">typeof Promise&&this.fa?this.fa.then(t=>{var{surveys:i,context:r}=t;return e(i,r)}):("u">typeof Promise&&(this.fa=new Promise(e=>{i=e})),this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this.qt.token),method:"GET",timeout:this.qt.surveys_request_timeout_ms,callback:t=>{this.fa=null;var r=t.statusCode;if(200!==r||!t.json){var s="Surveys API could not be loaded, status: "+r;nh.error(s);var n={isLoaded:!1,error:s};return e([],n),void(null==i||i({surveys:[],context:n}))}var o,a,l=t.json.surveys||[],u=l.filter(e=>{var t,i;return!(!e.start_date||e.end_date)&&(!(null==(t=e.conditions)||null==(t=t.events)||null==(t=t.values)||!t.length)||!(null==(i=e.conditions)||null==(i=i.actions)||null==(i=i.values)||!i.length))});u.length>0&&(null==(a=this._surveyEventReceiver)||a.register(u)),null==(o=this._instance.persistence)||o.register({[ir]:l,[is]:Date.now()});var c={isLoaded:!0};e(l,c),null==i||i({surveys:l,context:c})}}))}ma(e){for(var t of this.va)try{if(!e.isLoaded)return t([],e);
1this.getSurveys(t)}catch(e){nh.error("Error in survey callback",e)}}getActiveMatchingSurveys(e,t){if(void 0===t&&(t=!1),!U(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,t);nh.warn("init was not called")}ya(e){var t=null;return this.getSurveys(i=>{var r;t=null!=(r=i.find(t=>t.id===e))?r:null}),t}ba(e){if(U(this._surveyManager))return{eligible:!1,reason:n6};var t="string"==typeof e?this.ya(e):e;return t?this._surveyManager.checkSurveyEligibility(t):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(e){if(U(this._surveyManager))return nh.warn("init was not called"),{visible:!1,disabledReason:n6};var t=this.ba(e);return{visible:t.eligible,disabledReason:t.reason}}canRenderSurveyAsync(e,t){return U(this._surveyManager)?(nh.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:n6})):new Promise(i=>{this.getSurveys(t=>{var r,s=null!=(r=t.find(t=>t.id===e))?r:null;if(s){var n=this.ba(s);i({visible:n.eligible,disabledReason:n.reason})}else i({visible:!1,disabledReason:"Survey not found"})},t)})}renderSurvey(e,t,i){var r;if(U(this._surveyManager))nh.warn("init was not called");else{var s="string"==typeof e?this.ya(e):e;if(null!=s&&s.id)if(ng.includes(s.type)){var n=null==o?void 0:o.querySelector(t);if(n)return null!=(r=s.appearance)&&r.surveyPopupDelaySeconds?(nh.info("Rendering survey "+s.id+" with delay of "+s.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout(()=>{var e,t;nh.info("Rendering survey "+s.id+" with delay of "+(null==(e=s.appearance)?void 0:e.surveyPopupDelaySeconds)+" seconds"),null==(t=this._surveyManager)||t.renderSurvey(s,n,i),nh.info("Survey "+s.id+" rendered")},1e3*s.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(s,n,i);nh.warn("Survey element not found")}else nh.warn("Surveys of type "+s.type+" cannot be rendered in the app");else nh.warn("Survey not found")}}displaySurvey(e,t){var i;if(U(this._surveyManager))nh.warn("init was not called");else{var r=this.ya(e);if(r){var s=r;if(null!=(i=r.appearance)&&i.surveyPopupDelaySeconds&&t.ignoreDelay&&(s=m({},r,{appearance:m({},r.appearance,{surveyPopupDelaySeconds:0})})),t.displayType!==su&&t.initialResponses&&nh.warn("initialResponses is only supported for popover surveys. prefill will not be applied."),!1===t.ignoreConditions){var n=this.canRenderSurvey(r);if(!n.visible)return void nh.warn("Survey is not eligible to be displayed: ",n.disabledReason)}"inline"!==t.displayType?this._surveyManager.handlePopoverSurvey(s,t):this.renderSurvey(s,t.selector,t.properties)}else nh.warn("Survey not found")}}cancelPendingSurvey(e){U(this._surveyManager)?nh.warn("init was not called"):this._surveyManager.cancelSurvey(e)}handlePageUnload(){var e;null==(e=this._surveyManager)||e.handlePageUnload()}}},od),og=m({experiments:ol},od),of=m({},od,{sessionRecording:class{get qt(){return this._instance.config}get Si(){return this._instance.persistence}get started(){var e;return!(null==(e=this.Us)||!e.isStarted)}get status(){var e,t;return this.Bs===nz||this.Bs===nB?this.Bs:null!=(e=null==(t=this.Us)?void 0:t.status)?e:this.Bs}constructor(e){if(this._forceAllowLocalhostNetworkCapture=!1,this.Bs=nW,this.zs=void 0,this._instance=e,!this._instance.sessionManager)throw nY.error("started without valid sessionManager"),Error(nU+" started without valid sessionManager. This is a bug.");if(this.qt.cookieless_mode===iF)throw Error(nU+' cannot be used with cookieless_mode="always"')}initialize(){this.startIfEnabledOrStop()}get Vs(){var e,t=!(null==(e=this._instance.get_property(tZ))||!e.enabled),i=!this.qt.disable_session_recording,s=this.qt.disable_session_recording||this._instance.consent.isOptedOut();return r&&t&&i&&!s}startIfEnabledOrStop(e){var t;if(!this.Vs||null==(t=this.Us)||!t.isStarted){var i=!W(Object.assign)&&!W(Array.from);this.Vs&&i?(this.Ws(e),nY.info("starting")):(this.Bs=nW,this.stopRecording())}}Ws(e){var t,i,r;this.Vs&&(this.Bs!==nz&&this.Bs!==nB&&(this.Bs=nG),null!=p&&null!=(t=p.__PosthogExtensions__)&&null!=(t=t.rrweb)&&t.record&&null!=(i=p.__PosthogExtensions__)&&i.initSessionRecording?this.Zs(e):null==(r=p.__PosthogExtensions__)||null==r.loadExternalDependency||r.loadExternalDependency(this._instance,this.Gs,t=>{if(t)return nY.error("could not load recorder",t);this.Zs(e)}))}stopRecording(){var e,t;null==(e=this.zs)||e.call(this),this.zs=void 0,null==(t=this.Us)||t.stop()}Qs(){var e,t;null==(e=this.zs)||e.call(this),this.zs=void 0,null==(t=this.Us)||t.discard()}Js(){var e;null==(e=this.Si)||e.unregister(t2)}Ks(e,t){if(U(e))return null;var i=Y(e)?e:parseFloat(e);return"number"!=typeof i||!Number.isFinite(i)||0>i||i>1?(nY.warn(t+" must be between 0 and 1. Ignoring invalid value:",e),null):i}Ys(e){if(this.Si){var t,i,r=this.Si,s=()=>{var t,i=!1===e.sessionRecording?void 0:e.sessionRecording,s=this.Ks(null==(t=this.qt.session_recording)?void 0:t.sampleRate,"session_recording.sampleRate"),n=this.Ks(null==i?void 0:i.sampleRate,"remote config sampleRate"),o=null!=s?s:n;U(o)&&this.Js();var a=null==i?void 0:i.minimumDurationMilliseconds;r.register({[tZ]:m({cache_timestamp:Date.now(),enabled:!!i},i,{networkPayloadCapture:m({capturePerformance:e.capturePerformance},null==i?void 0:i.networkPayloadCapture),canvasRecording:{enabled:null==i?void 0:i.recordCanvas,fps:null==i?void 0:i.canvasFps,quality:null==i?void 0:i.canvasQuality},sampleRate:o,minimumDurationMilliseconds:W(a)?null:a,endpoint:null==i?void 0:i.endpoint,triggerMatchType:null==i?void 0:i.triggerMatchType,masking:null==i?void 0:i.masking,urlTriggers:null==i?void 0:i.urlTriggers,version:null==i?void 0:i.version,triggerGroups:null==i?void 0:i.triggerGroups})})};s(),null==(t=this.zs)||t.call(this),this.zs=null==(i=this._instance.sessionManager)?void 0:i.onSessionId(s)}}onRemoteConfig(e){return"sessionRecording"in e?!1===e.sessionRecording?(this.Ys(e),void this.Qs()):(this.Ys(e),void this.startIfEnabledOrStop()):(this.Bs===nz&&(this.Bs=nB,nY.warn("config refresh failed, recording will not start until page reload")),void this.startIfEnabledOrStop())}log(e,t){var i;void 0===t&&(t="log"),null!=(i=this.Us)&&i.log?this.Us.log(e,t):nY.warn("log called before recorder was ready")}get Gs(){var e,t,i=null==(e=this._instance)||null==(e=e.persistence)?void 0:e.get_property(tZ);return(null==i||null==(t=i.scriptConfig)?void 0:t.script)||"lazy-recorder"}Xs(){var e,t,i=this._instance.get_property(tZ);if(!i)return!1;try{t="object"==typeof i?i:JSON.parse(i)}
1catch(e){return nY.warn("persisted remote config for session recording is invalid and will be ignored",e),!1}var r=null!=(e=t.cache_timestamp)?e:Date.now();return 36e5>=Date.now()-r}Zs(e){var t,i;if(null==(t=p.__PosthogExtensions__)||!t.initSessionRecording)return nY.warn("Called on script loaded before session recording is available. This can be caused by adblockers."),void this._instance.register_for_session({[iE]:!0});if(this.Us||(this.Us=null==(i=p.__PosthogExtensions__)?void 0:i.initSessionRecording(this._instance),this.Us._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this.Xs()){if(this.Bs===nB||this.Bs===nz)return;return this.Bs=nz,nY.info("persisted remote config is stale, requesting fresh config before starting"),void new sp(this._instance).load()}this.Bs=nG,this.Us.start(e)}onRRwebEmit(e){var t;null==(t=this.Us)||null==t.onRRwebEmit||t.onRRwebEmit(e)}overrideLinkedFlag(){var e,t;this.Us||null==(t=this.Si)||t.register({[tK]:!0}),null==(e=this.Us)||e.overrideLinkedFlag()}overrideSampling(){var e,t;this.Us||null==(t=this.Si)||t.register({[tJ]:!0}),null==(e=this.Us)||e.overrideSampling()}overrideTrigger(e){var t,i;this.Us||null==(i=this.Si)||i.register({["url"===e?tQ:t0]:!0}),null==(t=this.Us)||t.overrideTrigger(e)}get sdkDebugProperties(){var e;return(null==(e=this.Us)?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(e,t){var i;return!(null==(i=this.Us)||!i.tryAddCustomEvent(e,t))}}},{autocapture:class{constructor(e){this.eo=!1,this.ro=null,this.io=!1,this.instance=e,this.rageclicks=new n$(e.config.rageclick),this.no=null}initialize(){this.startIfEnabled()}get qt(){var e,t,i=H(this.instance.config.autocapture)?this.instance.config.autocapture:{};return i.url_allowlist=null==(e=i.url_allowlist)?void 0:e.map(e=>new RegExp(e)),i.url_ignorelist=null==(t=i.url_ignorelist)?void 0:t.map(e=>new RegExp(e)),i}so(){if(this.isBrowserSupported()){if(r&&o){var e=e=>{e=e||(null==r?void 0:r.event);try{this.oo(e)}catch(e){nA.error("Failed to capture event",e)}};if(iz(o,"submit",e,{capture:!0}),iz(o,"change",e,{capture:!0}),iz(o,"click",e,{capture:!0}),this.qt.capture_copied_text){var t=e=>{e=e||(null==r?void 0:r.event);try{this.oo(e,nO)}catch(e){nA.error("Failed to capture copy/cut event",e)}};iz(o,"copy",t,{capture:!0}),iz(o,"cut",t,{capture:!0})}}}else nA.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.eo&&(this.so(),this.eo=!0)}onRemoteConfig(e){e.elementsChainAsString&&(this.io=e.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[tH]:!!e.autocapture_opt_out}),this.ro=!!e.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(e){this.no=e}getElementSelectors(e){var t,i=[];return null==(t=this.no)||t.forEach(t=>{var r=null==o?void 0:o.querySelectorAll(t);null==r||r.forEach(r=>{e===r&&i.push(t)})}),i}get isEnabled(){var e,t,i=null==(e=this.instance.persistence)?void 0:e.props[tH];if(B(this.ro)&&!Z(i)&&!this.instance.Kr())return!1;var r=null!=(t=this.ro)?t:!!i;return!!this.instance.config.autocapture&&!r}oo(e,t){if(void 0===t&&(t="$autocapture"),this.isEnabled){var i,s=rd(e);rs(s)&&(s=s.parentNode||null),"$autocapture"===t&&"click"===e.type&&e instanceof MouseEvent&&this.instance.config.rageclick&&null!=(i=this.rageclicks)&&i.isRageClick(e.clientX,e.clientY,e.timeStamp||(new Date).getTime())&&rb(s,this.instance.config.rageclick)&&this.oo(e,"$rageclick");var n=t===nO;if(s&&function(e,t,i,s,n){if(void 0===i&&(i=void 0),!r||rw(e)||null!=(o=i)&&o.url_allowlist&&!ra(i.url_allowlist)||null!=(a=i)&&a.url_ignorelist&&ra(i.url_ignorelist))return!1;if(null!=(l=i)&&l.dom_event_allowlist){var o,a,l,u,c=i.dom_event_allowlist;if(c&&!c.some(e=>t.type===e))return!1}var{parentIsUsefulElement:d,targetElementList:h}=rx(e,s);if(!function(e,t){var i=null==t?void 0:t.element_allowlist;if(W(i))return!0;var r,s=function(e){if(i.some(t=>e.tagName.toLowerCase()===t))return{v:!0}};for(var n of e)if(r=s(n))return r.v;return!1}(h,i)||!rp(h,null==(u=i)?void 0:u.css_selector_allowlist))return!1;var p=r.getComputedStyle(e);
1if(p&&"pointer"===p.getPropertyValue("cursor")&&"click"===t.type)return!0;var g=e.tagName.toLowerCase();switch(g){case"html":return!1;case"form":return(n||["submit"]).indexOf(t.type)>=0;case"input":case"select":case"textarea":return(n||["change","click"]).indexOf(t.type)>=0;default:return d?(n||["click"]).indexOf(t.type)>=0:(n||["click"]).indexOf(t.type)>=0&&(rh.indexOf(g)>-1||"true"===e.getAttribute("contenteditable"))}}(s,e,this.qt,n,n?["copy","cut"]:void 0)){var{props:o,explicitNoCapture:a}=function(e,t){var i,s,{e:n,maskAllElementAttributes:o,maskAllText:a,elementAttributeIgnoreList:l,elementsChainAsString:u}=t;if(!ri(e))return{props:{}};for(var c=[e],d=e;d.parentNode&&!rr(d,"body");)if(rn(d.parentNode))c.push(d.parentNode.host),d=d.parentNode.host;else{if(!ri(d.parentNode))break;c.push(d.parentNode),d=d.parentNode}var h,p=[],g={},f=!1,v=!1;if(iN(c,e=>{var t=rk(e);if(rr(e,"a")){var i=e.getAttribute("href");f=t&&!!i&&rj(i)&&i}R(rl(e),"ph-no-capture")&&(v=!0),p.push(function(e,t,i,r){var s=e.tagName.toLowerCase(),n={tag_name:s};rh.indexOf(s)>-1&&!i&&(n.$el_text="a"===s.toLowerCase()||"button"===s.toLowerCase()?nN(1024,rL(e)):nN(1024,rc(e)));var o=rl(e);o.length>0&&(n.classes=o.filter(function(e){return""!==e})),iN(e.attributes,function(i){var s;if((!rE(e)||-1!==["name","id","class","aria-label"].indexOf(i.name))&&(null==r||!r.includes(i.name))&&!t&&rj(i.value)&&(!G(s=i.name)||"_ngcontent"!==s.substring(0,10)&&"_nghost"!==s.substring(0,7))){var o=i.value;"class"===i.name&&(o=ro(o).join(" ")),n["attr__"+i.name]=nN(1024,o)}});for(var a=1,l=1,u=e;u=function(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!ri(t))return t}(u);)a++,u.tagName===e.tagName&&l++;return n.nth_child=a,n.nth_of_type=l,n}(e,o,a,l)),iD(g,function(e){if(!rk(e))return{};var t={};return iN(e.attributes,function(e){if(e.name&&0===e.name.indexOf("data-ph-capture-attribute")){var i=e.name.replace("data-ph-capture-attribute-",""),r=e.value;i&&r&&rj(r)&&(t[i]=r)}}),t}(e))}),v)return{props:{},explicitNoCapture:v};if(a||(p[0].$el_text=rr(e,"a")||rr(e,"button")?rL(e):rc(e)),f){p[0].attr__href=f;var _,y,b=null==(_=rU(f))?void 0:_.host,w=null==r||null==(y=r.location)?void 0:y.host;b&&w&&b!==w&&(h=f)}return{props:iD({$event_type:n.type,$ce_version:1},u?{}:{$elements:p},{$elements_chain:p.map(e=>{var t,i,r,s={text:null==(i=e.$el_text)?void 0:i.slice(0,400),tag_name:e.tag_name,href:null==(r=e.attr__href)?void 0:r.slice(0,2048),attr_class:(t=e.attr__class)?D(t)?t:ro(t):void 0,attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return iq(e).filter(e=>{var[t]=e;return 0===t.indexOf("attr__")}).forEach(e=>{var[t,i]=e;return s.attributes[t]=i}),s}).map(e=>{var t,i,r="";if(e.tag_name&&(r+=e.tag_name),e.attr_class)for(var s of(e.attr_class.sort(),e.attr_class))r+="."+s.replace(/"/g,"");var n=m({},e.text?{text:e.text}:{},{"nth-child":null!=(t=e.nth_child)?t:0,"nth-of-type":null!=(i=e.nth_of_type)?i:0},e.href?{href:e.href}:{},e.attr_id?{attr_id:e.attr_id}:{},e.attributes),o={};return iq(n).sort((e,t)=>{var[i]=e,[r]=t;return i.localeCompare(r)}).forEach(e=>{var[t,i]=e;return o[rR(t.toString())]=rR(i.toString())}),(r+=":")+iq(o).map(e=>{var[t,i]=e;return t+'="'+i+'"'}).join("")}).join(";")},null!=(i=p[0])&&i.$el_text?{$el_text:null==(s=p[0])?void 0:s.$el_text}:{},h&&"click"===n.type?{$external_click_url:h}:{},g)}}(s,{e:e,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.qt.element_attribute_ignorelist,elementsChainAsString:this.io});if(a)return!1;var l=this.getElementSelectors(s);if(l&&l.length>0&&(o.$element_selectors=l),t===nO){var u,c=ru(null==r||null==(u=r.getSelection())?void 0:u.toString()),d=e.type||"clipboard";if(!c)return!1;o.$selected_content=c,o.$copy_type=d}return this.instance.capture(t,o),!0}}}isBrowserSupported(){return q(null==o?void 0:o.querySelectorAll)}},historyAutocapture:class{constructor(e){var t;this._instance=e,this.ao=(null==r||null==(t=r.location)?void 0:t.pathname)||""}initialize(){this.startIfEnabled()}get isEnabled(){return"history_change"===this._instance.config.capture_pageview}startIfEnabled(){this.isEnabled&&(tR.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.uo&&this.uo(),this.uo=void 0,tR.info("History API monitoring stopped")}monitorHistoryChanges(){var e,t;if(r&&r.history){var i=this;null!=(e=r.history.pushState)&&e.__posthog_wrapped__||nq(r.history,"pushState",e=>function(t,r,s){e.call(this,t,r,s),i.lo("pushState")}),null!=(t=r.history.replaceState)&&t.__posthog_wrapped__||nq(r.history,"replaceState",e=>function(t,r,s){e.call(this,t,r,s),i.lo("replaceState")}),this.ho()}}lo(e){try{var t,i=null==r||null==(t=r.location)?void 0:t.pathname;if(!i)return;i!==this.ao&&this.isEnabled&&this._instance.capture(iR,{navigation_type:e}),this.ao=i}catch(t){tR.error("Error capturing "+e+" pageview",t)}}ho(){if(!this.uo){var e=()=>{this.lo("popstate")};iz(r,"popstate",e),this.uo=()=>{r&&r.removeEventListener("popstate",e)}}}},heatmaps:class{get qt(){return this.instance.config}constructor(e){var t;this.co=!1,this.eo=!1,this.do=null,this.instance=e,this.co=!(null==(t=this.instance.persistence)||!t.props[tV]),this.rageclicks=new n$(e.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){var e=5e3;return H(this.qt.capture_heatmaps)&&this.qt.capture_heatmaps.flush_interval_milliseconds&&(e=this.qt.capture_heatmaps.flush_interval_milliseconds),e}get isEnabled(){return U(this.qt.capture_heatmaps)?U(this.qt.enable_heatmaps)?this.co:this.qt.enable_heatmaps:!1!==this.qt.capture_heatmaps}startIfEnabled(){if(this.isEnabled)this.eo||(nX.info("starting..."),this.vo(),this.At());else{var e;clearInterval(null!=(e=this.do)?e:void 0),this.fo(),this.getAndClearBuffer()}}onRemoteConfig(e){if("heatmaps"in e){var t=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[tV]:t}),this.co=t,this.startIfEnabled()}}getAndClearBuffer(){var e=this.M;return this.M=void 0,e}po(e){this.Mt(e.originalEvent,"deadclick")}At(){this.do&&clearInterval(this.do),this.do="visible"===(null==o?void 0:o.visibilityState)?setInterval(this.ci.bind(this),this.flushIntervalMilliseconds):null}vo(){r&&o&&(this.mo=this.ci.bind(this),iz(r,iL,this.mo),this.yo=e=>this.Mt(e||(null==r?void 0:r.event)),iz(o,"click",this.yo,{capture:!0}),this.bo=e=>this._o(e||(null==r?void 0:r.event)),iz(o,"mousemove",this.bo,{capture:!0}),this.wo=new rA(this.instance,r$,this.po.bind(this)),this.wo.startIfEnabledOrStop(),this.xo=this.At.bind(this),iz(o,ij,this.xo),this.eo=!0)}fo(){var e;r&&o&&(this.mo&&r.removeEventListener(iL,this.mo),this.yo&&o.removeEventListener("click",this.yo,{capture:!0}),this.bo&&o.removeEventListener("mousemove",this.bo,{capture:!0}),this.xo&&o.removeEventListener(ij,this.xo),clearTimeout(this.So),null==(e=this.wo)||e.stop(),this.eo=!1)}ko(e,t){var i=this.instance.scrollManager.scrollY(),s=this.instance.scrollManager.scrollX(),n=this.instance.scrollManager.scrollElement(),o=function(e,t,i){for(var s=e;s&&ri(s)&&!rr(s,"body")&&s!==i;){if(R(t,null==r?void 0:r.getComputedStyle(s).position))return!0;s=rg(s)}return!1}(rd(e),["fixed","sticky"],n);return{x:e.clientX+(o?0:s),y:e.clientY+(o?0:i),target_fixed:o,type:t}}Mt(e,t){var i;if(void 0===t&&(t="click"),!rt(e.target)&&nZ(e)){var r=this.ko(e,t);null!=(i=this.rageclicks)&&i.isRageClick(e.clientX,e.clientY,(new Date).getTime())&&rb(rd(e),this.instance.config.rageclick)&&this.Co(m({},r,{type:"rageclick"})),this.Co(r)}}_o(e){!rt(e.target)&&nZ(e)&&(clearTimeout(this.So),this.So=setTimeout(()=>{this.Co(this.ko(e,"mousemove"))},500))}Co(e){if(r){var t=r.location.href,i=this.qt.custom_personal_data_properties,s=rX(t,this.qt.mask_personal_data_properties?[...rK,...i||[]]:[],r0);this.M=this.M||{},this.M[s]||(this.M[s]=[]),this.M[s].push(e)}}ci(){this.M&&!V(this.M)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:rA,webVitalsAutocapture:class{constructor(e){var t;this.co=!1,this.eo=!1,this.M={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.Io=()=>{clearTimeout(this.To),0!==this.M.metrics.length&&(this._instance.capture("$web_vitals",this.M.metrics.reduce((e,t)=>
1m({},e,{["$web_vitals_"+t.name+"_event"]:m({},t),["$web_vitals_"+t.name+"_value"]:t.value}),{})),this.M={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.dt=e=>{this.M=this.M||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var t,i=this.Eo();if(!W(i))if(U(null==e?void 0:e.name)||U(null==e?void 0:e.value))nV.error("Invalid metric received",e);else if(!this.Mo||this.Mo>e.value){this.M.url!==i&&(this.Io(),this.To=setTimeout(this.Io,this.flushToCaptureTimeoutMs)),W(this.M.url)&&(this.M.url=i),this.M.firstMetricTimestamp=W(this.M.firstMetricTimestamp)?Date.now():this.M.firstMetricTimestamp,e.attribution&&e.attribution.interactionTargetElement&&(e.attribution.interactionTargetElement=void 0);var r=null==(t=this._instance.sessionManager)?void 0:t.checkAndGetSessionAndWindowId(!0),s=m({},e,{$current_url:i,timestamp:Date.now()});W(r)||(s.$session_id=r.sessionId,s.$window_id=r.windowId),this.M.metrics.push(s),this.M.metrics.length===this.allowedMetrics.length&&this.Io()}else nV.error("Ignoring metric with value >= "+this.Mo,e)},this.Ro=()=>{if(!this.eo){var e,t,i,r,s=p.__PosthogExtensions__;W(s)||W(s.postHogWebVitalsCallbacks)||({onLCP:e,onCLS:t,onFCP:i,onINP:r}=s.postHogWebVitalsCallbacks),e&&t&&i&&r?(this.allowedMetrics.indexOf("LCP")>-1&&e(this.dt.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&t(this.dt.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&i(this.dt.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&r(this.dt.bind(this)),this.eo=!0):nV.error("web vitals callbacks not loaded - not starting")}},this._instance=e,this.co=!(null==(t=this._instance.persistence)||!t.props[tB]),this.startIfEnabled()}get Po(){return this._instance.config.capture_performance}get allowedMetrics(){var e,t,i=H(this.Po)?null==(e=this.Po)?void 0:e.web_vitals_allowed_metrics:void 0;return U(i)?(null==(t=this._instance.persistence)?void 0:t.props[tX])||["CLS","FCP","INP","LCP"]:i}get flushToCaptureTimeoutMs(){return(H(this.Po)?this.Po.web_vitals_delayed_flush_ms:void 0)||5e3}get useAttribution(){var e=H(this.Po)?this.Po.web_vitals_attribution:void 0;return null!=e&&e}get Mo(){var e=H(this.Po)&&Y(this.Po.__web_vitals_max_value)?this.Po.__web_vitals_max_value:9e5;return e>0&&6e4>=e?9e5:e}get isEnabled(){var e=null==a?void 0:a.protocol;if("http:"!==e&&"https:"!==e)return nV.info("Web Vitals are disabled on non-http/https protocols"),!1;var t=H(this.Po)?this.Po.web_vitals:Z(this.Po)?this.Po:void 0;return Z(t)?t:this.co}startIfEnabled(){this.isEnabled&&!this.eo&&(nV.info("enabled, starting..."),this.lr(this.Ro))}onRemoteConfig(e){if("capturePerformance"in e){var t=H(e.capturePerformance)&&!!e.capturePerformance.web_vitals,i=H(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[tB]:t}),this._instance.persistence.register({[tX]:i})),this.co=t,this.startIfEnabled()}}lr(e){var t,i;null!=(t=p.__PosthogExtensions__)&&t.postHogWebVitalsCallbacks?e():null==(i=p.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,this.useAttribution?"web-vitals-with-attribution":"web-vitals",t=>{t?nV.error("failed to load script",t):e()})}Eo(){var e=r?r.location.href:void 0;if(e){var t=this._instance.config.custom_personal_data_properties;return rX(e,this._instance.config.mask_personal_data_properties?[...rK,...t||[]]:[],r0)}nV.error("Could not determine current URL")}}},{exceptionObserver:class{constructor(e){var t,i,s;this.Ro=()=>{var e;if(r&&this.isEnabled&&null!=(e=p.__PosthogExtensions__)&&e.errorWrappingFunctions){var t=p.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,i=p.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,s=p.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.Oo&&this.qt.capture_unhandled_errors&&(this.Oo=t(this.captureException.bind(this))),!this.Lo&&this.qt.capture_unhandled_rejections&&(this.Lo=i(this.captureException.bind(this))),!this.Fo&&this.qt.capture_console_errors&&(this.Fo=s(this.captureException.bind(this)))}catch(e){nD.error("failed to start",e),this.Ao()}}},this._instance=e,this.No=!(null==(t=this._instance.persistence)||!t.props[tW]),this.Do=new es({refillRate:null!=(i=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)?i:1,bucketSize:null!=(s=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)?s:10,refillInterval:1e4,Gt:nD}),this.qt=this.$o(),this.startIfEnabledOrStop()}$o(){var e=this._instance.config.capture_exceptions,t={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return H(e)?t=m({},t,e):(W(e)?this.No:e)&&(t=m({},t,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),t}get isEnabled(){return this.qt.capture_console_errors||this.qt.capture_unhandled_errors||this.qt.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(nD.info("enabled"),this.Ao(),this.lr(this.Ro)):this.Ao()}lr(e){var t,i;
1null!=(t=p.__PosthogExtensions__)&&t.errorWrappingFunctions&&e(),null==(i=p.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"exception-autocapture",t=>{if(t)return nD.error("failed to load script",t);e()})}Ao(){var e,t,i;null==(e=this.Oo)||e.call(this),this.Oo=void 0,null==(t=this.Lo)||t.call(this),this.Lo=void 0,null==(i=this.Fo)||i.call(this),this.Fo=void 0}onRemoteConfig(e){"autocaptureExceptions"in e&&(this.No=!!e.autocaptureExceptions,this._instance.persistence&&this._instance.persistence.register({[tW]:this.No}),this.qt=this.$o(),this.startIfEnabledOrStop())}onConfigChange(){this.qt=this.$o()}captureException(e){var t,i,r,s=null!=(t=null==e||null==(i=e.$exception_list)||null==(i=i[0])?void 0:i.type)?t:"Exception";this.Do.consumeRateLimit(s)?nD.info("Skipping exception capture because of client rate limiting.",{exception:s}):null==(r=this._instance.exceptions)||r.sendExceptionEvent(e)}},exceptions:class{constructor(e){var t,i;this.qo=[],this.jo=new ts([new tf,new tS,new t_,new tv,new tk,new tx,new ty,new tE],function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),r=1;t>r;r++)i[r-1]=arguments[r];return function(t,r){void 0===r&&(r=0);for(var s=[],n=t.split("\n"),o=r;n.length>o;o++){var a=n[o];if(1024>=a.length){var l=tg.test(a)?a.replace(tg,"$1"):a;if(!l.match(/\S*Error: /)){for(var u of i){var c=u(l,e);if(c){s.push(c);break}}if(s.length>=50)break}}}if(!s.length)return[];var d=Array.from(s);return d.reverse(),d.slice(0,50).map(e=>m({},e,{filename:e.filename||(d[d.length-1]||{}).filename,function:e.function||"?"}))}}("web:javascript",tc,tp)),this._instance=e,this.qo=null!=(t=null==(i=this._instance.persistence)?void 0:i.get_property(tG))?t:[],this.Ho=tM(this.Uo()),this.Bo=new tj(this.Ho)}onConfigChange(){this.Ho=tM(this.Uo()),this.Bo.setConfig(this.Ho)}onRemoteConfig(e){var t,i,r;if("errorTracking"in e){var s=null!=(t=null==(i=e.errorTracking)?void 0:i.suppressionRules)?t:[],n=null==(r=e.errorTracking)?void 0:r.captureExtensionExceptions;this.qo=s,this._instance.persistence&&this._instance.persistence.register({[tG]:this.qo,[tz]:n})}}get zo(){var e,t=!!this._instance.get_property(tz),i=this._instance.config.error_tracking.captureExtensionExceptions;return null!=(e=null!=i?i:t)&&e}buildProperties(e,t){return this.jo.buildFromUnknown(e,{syntheticException:null==t?void 0:t.syntheticException,mechanism:{handled:null==t?void 0:t.handled}})}addExceptionStep(e,t){if(this.Ho.enabled)try{if(!G(e)||0===e.trim().length)return void on.warn("Ignoring exception step because message must be a non-empty string");var i=this.Vo(t),{sanitizedProperties:r,droppedKeys:s}=function(e){if(!e)return{sanitizedProperties:{},droppedKeys:[]};var t=[];return{sanitizedProperties:Object.keys(e).reduce((i,r)=>(tI.has(r)?t.push(r):i[r]=e[r],i),{}),droppedKeys:t}}(i);s.length>0&&on.warn("Ignoring reserved exception step fields",{droppedKeys:s}),this.Bo.add(m({[tP]:e,[tF]:(new Date).toISOString()},r))}catch(e){on.error("Failed to add exception step. Ignoring breadcrumb.",e)}}sendExceptionEvent(e){try{var t=e.$exception_list;if(this.Wo(t)){if(this.Zo(t))return this.Go("Exception dropped: matched a suppression rule"),void on.info("Skipping exception capture because a suppression rule matched");if(!this.zo&&this.Qo(t))return this.Go("Exception dropped: thrown by a browser extension"),void on.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.Jo(t))return this.Go("Exception dropped: thrown by the PostHog SDK"),void on.info("Skipping exception capture because it was thrown by the PostHog SDK")}var i=this.Ho.enabled&&U(e.$exception_steps)?this.Ko(e):e;try{var r=this._instance.capture("$exception",i,{_noTruncate:!0,_batchKey:"exceptionEvent",Cn:!0});return r&&this.Bo.clear(),r}catch(e){return on.error("Failed to capture exception event. Dropping this exception.",e),void this.Bo.clear()}}catch(e){return void on.error("Failed to process exception event. Ignoring this exception.",e)}}Ko(e){try{var t=this.Bo.getAttachable();return 0===t.length?e:m({},e,{$exception_steps:t})}catch(t){return on.error("Failed to read buffered exception steps. Capturing exception without steps.",t),e}}Go(e){this.Ho.enabled&&this.Bo.add({[tP]:e,[tF]:(new Date).toISOString()})}Vo(e){return H(e)?m({},e):{}}Uo(){var e,t;return null!=(e=null==(t=this._instance.config.error_tracking)?void 0:t.exception_steps)?e:{}}Zo(e){if(0===e.length)return!1;var t=e.reduce((e,t)=>
1{var{type:i,value:r}=t;return G(i)&&i.length>0&&e.$exception_types.push(i),G(r)&&r.length>0&&e.$exception_values.push(r),e},{$exception_types:[],$exception_values:[]});return this.qo.some(e=>{var i=e.values.map(e=>{var i,r=nn[e.operator],s=D(e.value)?e.value:[e.value],n=null!=(i=t[e.key])?i:[];return s.length>0&&r(s,n)});return"OR"===e.type?i.some(Boolean):i.every(Boolean)})}Qo(e){return e.flatMap(e=>{var t,i;return null!=(t=null==(i=e.stacktrace)?void 0:i.frames)?t:[]}).some(e=>e.filename&&e.filename.startsWith("chrome-extension://"))}Jo(e){if(e.length>0){var t,i,r,s,n=null!=(t=null==(i=e[0].stacktrace)?void 0:i.frames)?t:[],o=n[n.length-1];return null!=(r=null==o||null==(s=o.filename)?void 0:s.includes("posthog.com/static"))&&r}return!1}Wo(e){return!U(e)&&D(e)}}},oh,{siteApps:class{constructor(e){this._instance=e,this.ta=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}ra(e,t){if(t){var i=this.globalsForEvent(t);this.ta.push(i),this.ta.length>1e3&&(this.ta=this.ta.slice(10))}}get siteAppLoaders(){var e;return null==(e=p._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.siteApps}initialize(){if(this.isEnabled){var e=this._instance._addCaptureHook(this.ra.bind(this));this.ia=()=>{e(),this.ta=[],this.ia=void 0}}}globalsForEvent(e){if(!e)throw Error("Event payload is required");var t,i,r,s,n,o,a,l={},u=this._instance.get_property("$groups")||[];for(var[c,d]of Object.entries(this._instance.get_property("$stored_group_properties")||{}))l[c]={id:u[c],type:c,properties:d};var{$set_once:h,$set:p}=e;return{event:m({},y(e,nK),{properties:m({},e.properties,p?{$set:m({},null!=(t=null==(i=e.properties)?void 0:i.$set)?t:{},p)}:{},h?{$set_once:m({},null!=(r=null==(s=e.properties)?void 0:s.$set_once)?r:{},h)}:{}),elements_chain:null!=(n=null==(o=e.properties)?void 0:o.$elements_chain)?n:"",distinct_id:null==(a=e.properties)?void 0:a.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:l}}setupSiteApp(e){var t=this.apps[e.id],i=()=>{var i;!t.errored&&this.ta.length&&(nQ.info("Processing "+this.ta.length+" events for site app with id "+e.id),this.ta.forEach(e=>null==t.processEvent?void 0:t.processEvent(e)),t.processedBuffer=!0),Object.values(this.apps).every(e=>e.processedBuffer||e.errored)&&(null==(i=this.ia)||i.call(this))},r=!1,s=s=>{t.errored=!s,t.loaded=!0,nQ.info("Site app with id "+e.id+" "+(s?"loaded":"errored")),r&&i()};try{var{processEvent:n}=e.init({posthog:this._instance,callback(e){s(e)}});n&&(t.processEvent=n),r=!0}catch(t){nQ.error(n0+e.id,t),s(!1)}if(r&&t.loaded)try{i()}catch(i){nQ.error("Error while processing buffered events PostHog app with config id "+e.id,i),t.errored=!0}}na(){var e=this.siteAppLoaders||[];for(var t of e)this.apps[t.id]={id:t.id,loaded:!1,errored:!1,processedBuffer:!1};for(var i of e)this.setupSiteApp(i)}sa(e){if(0!==Object.keys(this.apps).length){var t=this.globalsForEvent(e);for(var i of Object.values(this.apps))try{null==i.processEvent||i.processEvent(t)}catch(t){nQ.error("Error while processing event "+e.event+" for site app "+i.id,t)}}}onRemoteConfig(e){var t,i,r,s=this;if(null!=(t=this.siteAppLoaders)&&t.length)return this.isEnabled?(this.na(),void this._instance.on("eventCaptured",e=>this.sa(e))):void nQ.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if(null==(i=this.ia)||i.call(this),null!=(r=e.siteApps)&&r.length)if(this.isEnabled){var n=function(e){var t;p["__$$ph_site_app_"+e]=s._instance,null==(t=p.__PosthogExtensions__)||null==t.loadSiteApp||t.loadSiteApp(s._instance,a,t=>{if(t)return nQ.error(n0+e,t)})};for(var{id:o,url:a}of e.siteApps)n(o)}else nQ.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}},op,{tracingHeaders:class{constructor(e){this.oa=void 0,this.aa=void 0,this.ua=void 0,this.Ro=()=>{var e,t,i=this.la();i?(W(this.oa)&&(this.oa=null==(e=p.__PosthogExtensions__)||null==(e=e.tracingHeadersPatchFns)?void 0:e._patchXHR(i,()=>this._instance.get_distinct_id(),this._instance.sessionManager)),W(this.aa)&&(this.aa=null==(t=p.__PosthogExtensions__)||null==(t=t.tracingHeadersPatchFns)?void 0:t._patchFetch(i,()=>this._instance.get_distinct_id(),this._instance.sessionManager))):this.Ao()},this._instance=e}initialize(){this.startIfEnabledOrStop()}lr(e){var t,i;null!=(t=p.__PosthogExtensions__)&&t.tracingHeadersPatchFns?e():null==(i=p.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"tracing-headers",t=>{if(t)return nH.error("failed to load script",t);e()})}ha(){var e,t;return null!=(e=null!=(t=this._instance.config.tracing_headers)?t:this._instance.config.addTracingHeaders)?e:this._instance.config.__add_tracing_headers}la(){var e=this.ha();return D(e)?(D(this.ua)?this.ua.splice(0,this.ua.length,...e):this.ua=[...e],e.length>0?this.ua:void 0):(D(this.ua)&&this.ua.splice(0),this.ua=e||void 0,this.ua)}Ao(){var e,t;null==(e=this.oa)||e.call(this),null==(t=this.aa)||t.call(this),this.oa=void 0,this.aa=void 0}startIfEnabledOrStop(){this.la()?this.lr(this.Ro):this.Ao()}}},{toolbar:class{constructor(e){this.instance=e}_a(e){p.ph_toolbar_state=e}wa(){var e;return null!=(e=p.ph_toolbar_state)?e:0}initialize(){return this.maybeLoadToolbar()}maybeLoadToolbar(e,t,i){if(void 0===e&&(e=void 0),void 0===t&&(t=void 0),void 0===i&&(i=void 0),iB(this.instance.config)||!r||!o)return!1;e=null!=e?e:r.location,i=null!=i?i:r.history;try{if(!t){try{r.localStorage.setItem("test","test"),r.localStorage.removeItem("test")}catch(e){return!1}t=null==r?void 0:r.localStorage}var s,n=n8||rZ(e.hash,"__posthog")||rZ(e.hash,"state"),a=n?iH(()=>JSON.parse(atob(decodeURIComponent(n))))||iH(()=>JSON.parse(decodeURIComponent(n))):null;return a&&"ph_authorize"===a.action?((s=a).source="url",s&&Object.keys(s).length>0&&(a.desiredHash?e.hash=a.desiredHash:i?i.replaceState(i.state,"",e.pathname+e.search):e.hash="")):((s=JSON.parse(t.getItem(n9)||"{}")).source="localstorage",delete s.userIntent),!(!s.token||this.instance.config.token!==s.token||(this.loadToolbar(s),0))}catch(e){return!1}}xa(e){var t=p.ph_load_toolbar||p.ph_load_editor;
1!U(t)&&q(t)?t(e,this.instance):n7.warn("No toolbar load function found")}loadToolbar(e){var t,i=!(null==o||!o.getElementById(ib));if(!r||i)return!1;var s="custom"===this.instance.requestRouter.region&&this.instance.config.advanced_disable_toolbar_metrics,n=m({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor("ui")},s?{instrument:!1}:{});return(r.localStorage.setItem(n9,JSON.stringify(m({},n,{source:void 0}))),2===this.wa())?this.xa(n):0===this.wa()&&(this._a(1),null==(t=p.__PosthogExtensions__)||null==t.loadExternalDependency||t.loadExternalDependency(this.instance,"toolbar",e=>{e?(n7.error("[Toolbar] Failed to load",e),this._a(0)):(this._a(2),this.xa(n))}),iz(r,"turbolinks:load",()=>{this._a(0),this.loadToolbar(n)})),!0}Sa(e){return this.loadToolbar(e)}maybeLoadEditor(e,t,i){return void 0===e&&(e=void 0),void 0===t&&(t=void 0),void 0===i&&(i=void 0),this.maybeLoadToolbar(e,t,i)}}},og,{conversations:class{constructor(e){this.ka=void 0,this._conversationsManager=null,this.Ca=!1,this.Ia=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this._instance.config.disable_conversations){var t=e.conversations;U(t)||(Z(t)?this.ka=t:(this.ka=t.enabled,this.Ia=t),this.loadIfEnabled())}}reset(){var e;null==(e=this._conversationsManager)||e.reset(),this._conversationsManager=null,this.ka=void 0,this.Ia=null}loadIfEnabled(){if(!(this._conversationsManager||this.Ca||this._instance.config.disable_conversations||iB(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var e=null==p?void 0:p.__PosthogExtensions__;if(e&&!W(this.ka)&&this.ka)if(this.Ia&&this.Ia.token){this.Ca=!0;try{var t=e.initConversations;if(t)return this.Ta(t),void(this.Ca=!1);var i=e.loadExternalDependency;if(!i)return void this.Ea(iS);i(this._instance,"conversations",t=>{t||!e.initConversations?this.Ea("Could not load conversations script",t):this.Ta(e.initConversations),this.Ca=!1})}catch(e){this.Ea("Error initializing conversations",e),this.Ca=!1}}else ou.error("Conversations enabled but missing token in remote config.")}}Ta(e){if(this.Ia)try{this._conversationsManager=e(this.Ia,this._instance),ou.info("Conversations loaded successfully")}catch(e){this.Ea("Error completing conversations initialization",e)}else ou.error("Cannot complete initialization: remote config is null")}Ea(e,t){ou.error(e,t),this._conversationsManager=null,this.Ca=!1}show(){this._conversationsManager?this._conversationsManager.show():ou.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return!0===this.ka&&!B(this._conversationsManager)}isVisible(){var e,t;return null!=(e=null==(t=this._conversationsManager)?void 0:t.isVisible())&&e}sendMessage(e,t,i){var r=this;return _(function*(){return r._conversationsManager?r._conversationsManager.sendMessage(e,t,i):(ou.warn(oc),null)})()}getMessages(e,t){var i=this;return _(function*(){return i._conversationsManager?i._conversationsManager.getMessages(e,t):(ou.warn(oc),null)})()}markAsRead(e){var t=this;return _(function*(){return t._conversationsManager?t._conversationsManager.markAsRead(e):(ou.warn(oc),null)})()}getTickets(e){var t=this;return _(function*(){return t._conversationsManager?t._conversationsManager.getTickets(e):(ou.warn(oc),null)})()}requestRestoreLink(e){var t=this;return _(function*(){return t._conversationsManager?t._conversationsManager.requestRestoreLink(e):(ou.warn(oc),null)})()}restoreFromToken(e){var t=this;return _(function*(){return t._conversationsManager?t._conversationsManager.restoreFromToken(e):(ou.warn(oc),null)})()}restoreFromUrlToken(){var e=this;return _(function*(){return e._conversationsManager?e._conversationsManager.restoreFromUrlToken():(ou.warn(oc),null)})()}getCurrentTicketId(){var e,t;return null!=(e=null==(t=this._conversationsManager)?void 0:t.getCurrentTicketId())?e:null}getWidgetSessionId(){var e,t;return null!=(e=null==(t=this._conversationsManager)?void 0:t.getWidgetSessionId())?e:null}On(){var e;null==(e=this._conversationsManager)||e.setIdentity()}Ln(){var e;null==(e=this._conversationsManager)||e.clearIdentity()}}},{logs:class{constructor(e){var t;this.Ma=!1,this.Ra=!1,this.Gt=tT("[logs]"),this.Pa=[],this.Oa=0,this.La=0,this.Fa=!1,this._instance=e,this._instance&&null!=(t=this._instance.config.logs)&&t.captureConsoleLogs&&(this.Ma=!0)}initialize(){this.loadIfEnabled()}onRemoteConfig(e){var t,i=null==(t=e.logs)?void 0:t.captureConsoleLogs;!U(i)&&i&&(this.Ma=!0,this.loadIfEnabled())}reset(){this.Pa=[],this.ii&&(clearTimeout(this.ii),this.ii=void 0),this.Oa=0,this.La=0,this.Fa=!1}loadIfEnabled(){if(this.Ma&&!this.Ra){var e=null==p?void 0:p.__PosthogExtensions__;if(e){var t=e.loadExternalDependency;t?t(this._instance,"logs",t=>{var i;t||null==(i=e.logs)||!i.initializeLogs?this.Gt.error("Could not load logs script",t):(e.logs.initializeLogs(this._instance),this.Ra=!0)}):this.Gt.error(iS)}else this.Gt.error("PostHog Extensions not found.")}}captureLog(e){var t,i,r,s,n,o;if(this._instance.is_capturing())if(e&&e.body){var a=null!=(t=null==(i=this._instance.config.logs)?void 0:i.flushIntervalMs)?t:3e3,l=null!=(r=null==(s=this._instance.config.logs)?void 0:s.maxLogsPerInterval)?r:1e3,u=Date.now();if(a>
1u-this.La||(this.La=u,this.Oa=0,this.Fa=!1),l>this.Oa){this.Oa++;var c=function(e,t){var{text:i,number:r}=tt[e.level||"info"]||ti,s=String(Date.now())+"000000",n={};t.distinctId&&(n.posthogDistinctId=t.distinctId),t.sessionId&&(n.sessionId=t.sessionId),t.currentUrl&&(n["url.full"]=t.currentUrl),t.screenName&&(n["screen.name"]=t.screenName),t.appState&&(n["app.state"]=t.appState),t.activeFeatureFlags&&t.activeFeatureFlags.length>0&&(n.feature_flags=t.activeFeatureFlags);var o=m({},n,e.attributes||{}),a={timeUnixNano:s,observedTimeUnixNano:s,severityNumber:r,severityText:i,body:{stringValue:e.body},attributes:tr(o)};return e.trace_id&&(a.traceId=e.trace_id),e.span_id&&(a.spanId=e.span_id),W(e.trace_flags)||(a.flags=e.trace_flags),a}(e,this.Aa());this.Pa.push({record:c}),(null!=(n=null==(o=this._instance.config.logs)?void 0:o.maxBufferSize)?n:100)>this.Pa.length?this.Na():this.flushLogs()}else this.Fa||(this.Gt.warn("captureLog dropping logs: exceeded "+l+" logs per "+a+"ms"),this.Fa=!0)}else this.Gt.warn("captureLog requires a body")}get logger(){return this.Da||(this.Da={trace:(e,t)=>this.captureLog({body:e,level:"trace",attributes:t}),debug:(e,t)=>this.captureLog({body:e,level:"debug",attributes:t}),info:(e,t)=>this.captureLog({body:e,level:"info",attributes:t}),warn:(e,t)=>this.captureLog({body:e,level:"warn",attributes:t}),error:(e,t)=>this.captureLog({body:e,level:"error",attributes:t}),fatal:(e,t)=>this.captureLog({body:e,level:"fatal",attributes:t})}),this.Da}flushLogs(e){if(this.ii&&(clearTimeout(this.ii),this.ii=void 0),0!==this.Pa.length){var t,i,r,s=this.Pa;this.Pa=[];var n=this._instance.config.logs,o=m({"service.name":(null==n?void 0:n.serviceName)||"unknown_service"},(null==n?void 0:n.environment)&&{"deployment.environment":n.environment},(null==n?void 0:n.serviceVersion)&&{"service.version":n.serviceVersion},null==n?void 0:n.resourceAttributes),a=(t=s.map(e=>e.record),i=f.LIB_NAME,r=f.LIB_VERSION,{resourceLogs:[{resource:{attributes:tr(o)},scopeLogs:[{scope:{name:i,version:r},logRecords:t}]}]}),l=this._instance.requestRouter.endpointFor("api","/i/v1/logs")+"?token="+encodeURIComponent(this._instance.config.token);this._instance.fn({method:"POST",url:l,data:a,compression:"best-available",batchKey:"logs",transport:e})}}Na(){var e,t;this.ii||(this.ii=setTimeout(()=>{this.ii=void 0,this.flushLogs()},null!=(e=null==(t=this._instance.config.logs)?void 0:t.flushIntervalMs)?e:3e3))}Aa(){var e,t={};if(t.distinctId=this._instance.get_distinct_id(),this._instance.sessionManager){var{sessionId:i}=this._instance.sessionManager.checkAndGetSessionAndWindowId(!0);t.sessionId=i}if(null!=p&&null!=(e=p.location)&&e.href&&(t.currentUrl=p.location.href),this._instance.featureFlags){var r=this._instance.featureFlags.getFlags();r&&r.length>0&&(t.activeFeatureFlags=r)}return t}}});nT.__defaultExtensionClasses=m({},of);var ov=(f.SDK_DIST_CHANNEL="npm",t=nw[nI]=new nT,function(){function e(){e.done||(e.done=!0,nC=!1,iN(nw,function(e){e._dom_loaded()}))}null!=o&&o.addEventListener?"complete"===o.readyState?e():iz(o,"DOMContentLoaded",e,{capture:!1}):r&&tR.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")}(),t);e.s(["default",0,ov],4570);var o_=e.i(71645),om=(0,o_.createContext)({get client(){return i},bootstrap:void 0}),oy=function(e){return"function"==typeof e},ob=function(e,t){return(ob=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)};"function"==typeof SuppressedError&&SuppressedError;var ow={componentStack:null,exceptionEvent:null,error:null};!function(e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=i}function i(t){var i=e.call(this,t)||this;return i.state=ow,i}ob(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t),i.prototype.componentDidCatch=function(e,t){var i,r=this.props.additionalProperties;oy(r)?i=r(e):"object"==typeof r&&(i=r);var s=this.context.client.captureException(e,i),n=t.componentStack;this.setState({error:e,componentStack:null!=n?n:null,exceptionEvent:s})},i.prototype.render=function(){var e=this.props,t=e.children,i=e.fallback,r=this.state;if(null==r.componentStack)return oy(t)?t():t;var s=oy(i)?o_.default.createElement(i,{error:r.error,componentStack:r.componentStack,exceptionEvent:r.exceptionEvent}):i;return o_.default.isValidElement(s)?s:(console.warn("[PostHog.js][PostHogErrorBoundary] Invalid fallback prop, provide a valid React element or a function that returns a valid React element."),o_.default.createElement(o_.default.Fragment,null))},i.contextType=om}(o_.default.Component),i=ov,e.s(["PostHogProvider",0,function(e){var t,r,s=e.children,n=e.client,o=e.apiKey,a=e.options,l=(0,o_.useRef)(null),u=(0,o_.useMemo)(function(){if(n)return o&&console.warn("[PostHog.js] You have provided both `client` and `apiKey` to `PostHogProvider`. `apiKey` will be ignored in favour of `client`."),a&&console.warn("[PostHog.js] You have provided both `client` and `options` to `PostHogProvider`. `options` will be ignored in favour of `client`."),n;var e=i;return o||console.warn("[PostHog.js] No `apiKey` or `client` were provided to `PostHogProvider`. Using default global `window.posthog` instance. You must initialize it manually. This is not recommended behavior."),e},[n,o,JSON.stringify(a)]);return(0,o_.useEffect)(function(){if(!n&&o){var e=i,t=l.current;t?(o!==t.apiKey&&console.warn("[PostHog.js] You have provided a different `apiKey` to `PostHogProvider` than the one that was already initialized. This is not supported by our provider and we'll keep using the previous key. If you need to toggle between API Keys you need to control the `client` yourself and pass it in as a prop rather than an `apiKey` prop."),a&&!function e(t,i,r){if(void 0===r&&(r=new WeakMap),t===i)return!0;
1if("object"!=typeof t||null===t||"object"!=typeof i||null===i)return!1;if(r.has(t)&&r.get(t)===i)return!0;r.set(t,i);var s=Object.keys(t),n=Object.keys(i);if(s.length!==n.length)return!1;for(var o=0;o<s.length;o++){var a=s[o];if(!n.includes(a)||!e(t[a],i[a],r))return!1}return!0}(a,t.options)&&e.set_config(a)):(e.__loaded&&console.warn("[PostHog.js] `posthog` was already loaded elsewhere. This may cause issues."),e.init(o,a)),l.current={apiKey:o,options:null!=a?a:{}}}},[n,o,JSON.stringify(a)]),o_.default.createElement(om.Provider,{value:{client:u,bootstrap:null!=(t=null==a?void 0:a.bootstrap)?t:null==(r=null==n?void 0:n.config)?void 0:r.bootstrap}},s)},"usePostHog",0,function(){return(0,o_.useContext)(om).client}],20565)},29018,e=>{"use strict";var t=e.i(43476),i=e.i(4570),r=e.i(20565);"localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname?(i.default.init("dummy-key-to-prevent-error",{api_host:"http://localhost",autocapture:!1,disable_session_recording:!0}),i.default.opt_out_capturing()):i.default.init("phc_rvheRCm6b7vy66pN2tbznzsYRNVLqm2aJKj93DtYHvfX",{api_host:"/ingest",ui_host:"https://us.posthog.com",person_profiles:"identified_only",capture_pageview:!1,capture_pageleave:!0}),window.posthog=i.default,e.s(["CSPostHogProvider",0,function({children:e}){return(0,t.jsx)(r.PostHogProvider,{client:i.default,children:e})}])},74408,e=>{"use strict";var t=e.i(18566),i=e.i(71645),r=e.i(20565);e.s(["default",0,function(){let e=(0,t.usePathname)(),s=(0,t.useSearchParams)(),n=(0,r.usePostHog)();return(0,i.useEffect)(()=>{if(e&&n){let t=(window.origin.includes("localhost")?"https://alphuel.com":window.origin)+e;s.toString()&&(t+=`?${s.toString()}`),n.capture("$pageview",{$current_url:t})}},[e,s,n]),null}])},8341,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r={cancelIdleCallback:function(){return o},requestIdleCallback:function(){return n}};for(var s in r)Object.defineProperty(i,s,{enumerable:!0,get:r[s]});let n="u">typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},o="u">typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof i.default||"object"==typeof i.default&&null!==i.default)&&void 0===i.default.__esModule&&(Object.defineProperty(i.default,"__esModule",{value:!0}),Object.assign(i.default,i),t.exports=i.default)},19083,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r={ESCAPE_REGEX:function(){return o},htmlEscapeAttributeString:function(){return c},htmlEscapeJsonString:function(){return u}};for(var s in r)Object.defineProperty(i,s,{enumerable:!0,get:r[s]});let n={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},o=/[&><\u2028\u2029]/g,a={"&":"&amp;",'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;"},l=/[&"'<>]/g;function u(e){return e.replace(o,e=>n[e])}function c(e){return e.replace(l,e=>a[e])}},79520,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r={default:function(){return b},handleClientScriptLoad:function(){return _},initScriptLoader:function(){return m}};for(var s in r)Object.defineProperty(i,s,{enumerable:!0,get:r[s]});let n=e.r(55682),o=e.r(90809),a=e.r(43476),l=n._(e.r(74080)),u=o._(e.r(71645)),c=e.r(42732),d=e.r(22737),h=e.r(8341),p=e.r(19083),g=new Map,f=new Set,v=e=>{let{src:t,id:i,onLoad:r=()=>{},onReady:s=null,dangerouslySetInnerHTML:n,children:o="",strategy:a="afterInteractive",onError:u,stylesheets:c}=e,h=i||t;if(h&&f.has(h))return;if(g.has(t)){f.add(h),g.get(t).then(r,u);return}let p=()=>{s&&s(),f.add(h)},v=document.createElement("script"),_=new Promise((e,t)=>{v.addEventListener("load",function(t){e(),r&&r.call(this,t),p()}),v.addEventListener("error",function(e){t(e)})}).catch(function(e){u&&u(e)});n?(v.innerHTML=n.__html||"",p()):o?(v.textContent="string"==typeof o?o:Array.isArray(o)?o.join(""):"",p()):t&&(v.src=t,g.set(t,_)),(0,d.setAttributesFromProps)(v,e),"worker"===a&&v.setAttribute("type","text/partytown"),v.setAttribute("data-nscript",a),c&&(e=>
1{if(l.default.preinit)return e.forEach(e=>{l.default.preinit(e,{as:"style"})});if("u">typeof window){let t=document.head;e.forEach(e=>{let i=document.createElement("link");i.type="text/css",i.rel="stylesheet",i.href=e,t.appendChild(i)})}})(c),document.body.appendChild(v)};function _(e){let{strategy:t="afterInteractive"}=e;"lazyOnload"===t?window.addEventListener("load",()=>{(0,h.requestIdleCallback)(()=>v(e))}):v(e)}function m(e){e.forEach(_),[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(e=>{let t=e.id||e.getAttribute("src");f.add(t)})}function y(e){let{id:t,src:i="",onLoad:r=()=>{},onReady:s=null,strategy:n="afterInteractive",onError:o,stylesheets:d,...g}=e,{updateScripts:_,scripts:m,getIsSsr:y,appDir:b,nonce:w}=(0,u.useContext)(c.HeadManagerContext);w=g.nonce||w;let x=(0,u.useRef)(!1);(0,u.useEffect)(()=>{let e=t||i;x.current||(s&&e&&f.has(e)&&s(),x.current=!0)},[s,t,i]);let k=(0,u.useRef)(!1);if((0,u.useEffect)(()=>{if(!k.current){if("afterInteractive"===n)v(e);else"lazyOnload"===n&&("complete"===document.readyState?(0,h.requestIdleCallback)(()=>v(e)):window.addEventListener("load",()=>{(0,h.requestIdleCallback)(()=>v(e))}));k.current=!0}},[e,n]),("beforeInteractive"===n||"worker"===n)&&(_?(m[n]=(m[n]||[]).concat([{id:t,src:i,onLoad:r,onReady:s,onError:o,...g,nonce:w}]),_(m)):y&&y()?f.add(t||i):y&&!y()&&v({...e,nonce:w})),b){if(d&&d.forEach(e=>{l.default.preinit(e,{as:"style"})}),"beforeInteractive"===n)if(!i)return g.dangerouslySetInnerHTML&&(g.children=g.dangerouslySetInnerHTML.__html,delete g.dangerouslySetInnerHTML),(0,a.jsx)("script",{nonce:w,dangerouslySetInnerHTML:{__html:`(self.__next_s=self.__next_s||[]).push(${(0,p.htmlEscapeJsonString)(JSON.stringify([0,{...g,id:t}]))})`}});else return l.default.preload(i,g.integrity?{as:"script",integrity:g.integrity,nonce:w,crossOrigin:g.crossOrigin}:{as:"script",nonce:w,crossOrigin:g.crossOrigin}),(0,a.jsx)("script",{nonce:w,dangerouslySetInnerHTML:{__html:`(self.__next_s=self.__next_s||[]).push(${(0,p.htmlEscapeJsonString)(JSON.stringify([i,{...g,id:t}]))})`}});"afterInteractive"===n&&i&&l.default.preload(i,g.integrity?{as:"script",integrity:g.integrity,nonce:w,crossOrigin:g.crossOrigin}:{as:"script",nonce:w,crossOrigin:g.crossOrigin})}return null}Object.defineProperty(y,"__nextScript",{value:!0});let b=y;("function"==typeof i.default||"object"==typeof i.default&&null!==i.default)&&void 0===i.default.__esModule&&(Object.defineProperty(i.default,"__esModule",{value:!0}),Object.assign(i.default,i),t.exports=i.default)},3303,(e,t,i)=>{t.exports=e.r(79520)},95549,e=>{"use strict";var t=e.i(43476),i=e.i(18566),r=e.i(3303),s=e.i(71645),n=e.i(9932);e.s(["default",0,function(){let e=(0,i.usePathname)(),o=(0,i.useSearchParams)(),a="2469061356938746";return(0,s.useEffect)(()=>{n.pageview()},[e,o]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.default,{id:"fb-pixel",strategy:"afterInteractive",dangerouslySetInnerHTML:{__html:`
2            !function(f,b,e,v,n,t,s)
3            {if(f.fbq)return;n=f.fbq=function(){n.callMethod?
4            n.callMethod.apply(n,arguments):n.queue.push(arguments)};
5            if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
6            n.queue=[];t=b.createElement(e);t.async=!0;
7            t.src=v;s=b.getElementsByTagName(e)[0];
8            s.parentNode.insertBefore(t,s)}(window, document,'script',
9            'https://connect.facebook.net/en_US/fbevents.js');
10            fbq('init', '${a}');
11          `}}),(0,t.jsx)("noscript",{children:(0,t.jsx)("img",{height:"1",width:"1",style:{display:"none"},src:`https://www.facebook.com/tr?id=${a}&ev=PageView&noscript=1`,alt:""})})]})}])},94651,e=>{"use strict";var t=e.i(43476),i=e.i(71645),r=e.i(3303);e.s(["default",0,function(){let[e,s]=(0,i.useState)({ga4MeasurementId:null,searchConsoleVerification:null});return((0,i.useEffect)(()=>{fetch("/api/marketing-settings").then(e=>e.json()).then(e=>s(e)).catch(()=>{})},[]),e.ga4MeasurementId)?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.default,{src:`https://www.googletagmanager.com/gtag/js?i
11d=${e.ga4MeasurementId}`,strategy:"afterInteractive"}),(0,t.jsx)(r.default,{id:"google-analytics",strategy:"afterInteractive",children:`
12          window.dataLayer = window.dataLayer || [];
13          function gtag(){dataLayer.push(arguments);}
14          gtag('js', new Date());
15          gtag('config', '${e.ga4MeasurementId}', {
16            page_path: window.location.pathname,
17          });
18        `})]}):null}])},21769,e=>{"use strict";var t=e.i(71645);e.s(["default",0,function(){let[e,i]=(0,t.useState)(null);return(0,t.useEffect)(()=>{fetch("/api/marketing-settings").then(e=>e.json()).then(e=>{e.searchConsoleVerification&&i(e.searchConsoleVerification)}).catch(()=>{})},[]),(0,t.useEffect)(()=>{if(!e||document.querySelector('meta[name="google-site-verification"]'))return;let t=document.createElement("meta");return t.name="google-site-verification",t.content=e,document.head.appendChild(t),()=>{t.remove()}},[e]),null}])},36689,e=>{"use strict";var t=e.i(43476),i=e.i(3303),r=e.i(71645);e.s(["default",0,function(){let[e,s]=(0,r.useState)(null);return((0,r.useEffect)(()=>{fetch("/api/marketing-settings").then(e=>e.json()).then(e=>{e.gtmId&&s(e.gtmId)}).catch(()=>{})},[]),e)?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.default,{id:"gtm-head",strategy:"afterInteractive",children:`(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
19        new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
20        j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
21        'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
22        })(window,document,'script','dataLayer','${e}');`}),(0,t.jsx)("noscript",{children:(0,t.jsx)("iframe",{src:`https://www.googletagmanager.com/ns.html?id=${e}`,height:"0",width:"0",style:{display:"none",visibility:"hidden"}})})]}):null}])},97827,e=>{"use strict";var t=e.i(71645),i=e.i(18566),r=e.i(52499);e.s(["CartRecoveryTracker",0,function(){let e=(0,i.usePathname)(),{cartItems:s,isMounted:n}=(0,r.useCart)(),o=(0,t.useRef)(null),a=(0,t.useRef)(!1),l=(0,t.useRef)(null),u=(0,t.useRef)({}),c=async(e={})=>{try{let t=(()=>{if(o.current)return o.current;let e=sessionStorage.getItem("alphuel_session_id");return e||(e="sess_"+Date.now().toString(36)+Math.random().toString(36).substring(2,15),sessionStorage.setItem("alphuel_session_id",e)),o.current=e,e})();await fetch("/api/tracker",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:t,currentPage:window.location.pathname,referrer:document.referrer||"",...e})})}catch(e){}},d=s.map(t=>({type:"cart_add",path:e,timestamp:new Date().toISOString(),data:{id:t.product.id,name:t.product.name,variant:t.variant.name,price:Number(t.variant.price),quantity:t.quantity}}));return(0,t.useEffect)(()=>{if(!n)return;fetch("https://get.geojs.io/v1/ip/geo.json").then(e=>e.json()).then(e=>{c({isNewSession:!a.current,events:d,deviceInfo:{platform:navigator.platform,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone},country:e.country||null,countryCode:e.country_code||null,state:e.region||null,city:e.city||null,lat:e.latitude?parseFloat(e.latitude):null,lon:e.longitude?parseFloat(e.longitude):null})}).catch(()=>{c({isNewSession:!a.current,events:d,deviceInfo:{platform:navigator.platform,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone}})}),a.current=!0;let e=e=>{let t=e.target;if(!t||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName||"password"===t.type||"hidden"===t.type)return;let i=t.name||t.id||t.placeholder||"unnamed_field",r=t.value;u.current[i]!==r&&(u.current[i]=r,/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r.trim())&&l.current!==r.trim()&&(l.current=r.trim(),c({email:r.trim()})))};return document.addEventListener("input",e),()=>{document.removeEventListener("input",e)}},[e,n,s]),null}])},87065,e=>{"use strict";var t=e.i(43476),i=e.i(3303);e.i(71645),e.s(["default",0,function(){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.default,{id:"replay-config",strategy:"beforeInteractive",children:`
23          window.ReplayObj = {
24            proxyUrl: '/api',
25            isWooCommerce: false,
26            currentUrl: window.location.href,
27          };
28        `}),(0,t.jsx)(i.default,{src:"/replay-tracker.js",strategy:"afterInteractive"})]})}])},31531,e=>{"use strict";var t=e.i(43476),i=e.i(18566),r=e.i(3303),s=e.i(71645);e.s(["default",0,function(){let e=(0,i.usePathname)(),n=(0,i.useSearchParams)();return(0,s.useEffect)(()=>{window.ttq&&window.ttq.page()},[e,n]),(0,t.jsx)(r.default,{id:"tiktok-pixel",strategy:"afterInteractive",dangerouslySetInnerHTML:{__html:`
29          !function (w, d, t) {
30            w.TiktokAnalyticsObject=t;var ttq=w[t]=w[t]||[];ttq.methods=["page","track","identify","instances","debug","on","off","once","ready","alias","group","enableCookie","disableCookie","holdConsent","revokeConsent","grantConsent"],ttq.setAndDefer=function(t,e){t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}};for(var i=0;i<ttq.methods.length;i++)ttq.setAndDefer(ttq,ttq.methods[i]);ttq.instance=function(t){for(
31          var e=ttq._i[t]||[],n=0;n<ttq.methods.length;n++)ttq.setAndDefer(e,ttq.methods[n]);return e},ttq.load=function(e,n){var r="https://analytics.tiktok.com/i18n/pixel/events.js",o=n&&n.partner;ttq._i=ttq._i||{},ttq._i[e]=[],ttq._i[e]._u=r,ttq._t=ttq._t||{},ttq._t[e]=+new Date,ttq._o=ttq._o||{},ttq._o[e]=n||{};n=document.createElement("script")
32          ;n.type="text/javascript",n.async=!0,n.src=r+"?sdkid="+e+"&lib="+t;e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(n,e)};
33          
34          
35            ttq.load('D93KCU3C77U7HJS4PUQG');
36            ttq.page();
37          }(window, document, 'ttq');
38        `}})}])},3250,e=>{"use strict";var t=e.i(43476),i=e.i(3303);e.s(["default",0,function(){return(0,t.jsx)(i.default,{src:"https://cdn.jsdelivr.net/npm/@tagadapay/plugin-sdk/dist/external-tracker.min.js",strategy:"afterInteractive",onLoad:()=>{window.TagadaTracker&&window.TagadaTracker.init({storeId:"store_69787af92fe6",accountId:"acc_625053e3ffea",stepId:"step_1785822862979",funnelId:"funnelv2_51f9e1d09d31",debug:!0,onReady:function(e){console.log("TagadaTracker ready:",e.sessionId)},onError:function(e){console.error("TagadaTracker failed:",e.message)}})}})}])},19976,e=>{"use strict";let t,i;var r=e.i(71645),s=e.i(18566),n="5.2.0";function o(e,t){return new Promise(i=>setTimeout(i,e,t))}function a(e){return!!e&&"function"==typeof e.then}function l(e,t){try{let i=e();a(i)?i.then(e=>t(!0,e),e=>t(!1,e)):t(!0,i)}catch(e){t(!1,e)}}async function u(e,t,i=16){let r=Array(e.length),s=Date.now();for(let n=0;n<e.length;++n){r[n]=t(e[n],n);let o=Date.now();o>=s+i&&(s=o,await new Promise(e=>{let t=new MessageChannel;t.port1.onmessage=()=>e(),t.port2.postMessage(null)}))}return r}function c(e){return e.then(void 0,()=>void 0),e}function d(e){return parseInt(e)}function h(e){return parseFloat(e)}function p(e,t){return"number"==typeof e&&isNaN(e)?t:e}function g(e){return e.reduce((e,t)=>
38e+ +!!t,0)}function f(e,t=1){if(Math.abs(t)>=1)return Math.round(e/t)*t;{let i=1/t;return Math.round(e*i)/i}}function v(e,t){let i=e[0]>>>16,r=65535&e[0],s=e[1]>>>16,n=65535&e[1],o=t[0]>>>16,a=65535&t[0],l=t[1]>>>16,u=65535&t[1],c=0,d=0,h,p;h=0+((p=0+(n+u))>>>16),p&=65535,h+=s+l,d+=h>>>16,h&=65535,d+=r+a,c+=d>>>16,d&=65535,c+=i+o,c&=65535,e[0]=c<<16|d,e[1]=h<<16|p}function _(e,t){let i=e[0]>>>16,r=65535&e[0],s=e[1]>>>16,n=65535&e[1],o=t[0]>>>16,a=65535&t[0],l=t[1]>>>16,u=65535&t[1],c=0,d=0,h,p;h=0+((p=0+n*u)>>>16),p&=65535,h+=s*u,d+=h>>>16,h&=65535,h+=n*l,d+=h>>>16,h&=65535,d+=r*u,c+=d>>>16,d&=65535,d+=s*l,c+=d>>>16,d&=65535,d+=n*a,c+=d>>>16,d&=65535,c+=i*u+r*l+s*a+n*o,c&=65535,e[0]=c<<16|d,e[1]=h<<16|p}function m(e,t){let i=e[0];32==(t%=64)?(e[0]=e[1],e[1]=i):t<32?(e[0]=i<<t|e[1]>>>32-t,e[1]=e[1]<<t|i>>>32-t):(t-=32,e[0]=e[1]<<t|i>>>32-t,e[1]=i<<t|e[1]>>>32-t)}function y(e,t){0==(t%=64)||(t<32?(e[0]=e[1]>>>32-t,e[1]=e[1]<<t):(e[0]=e[1]<<t-32,e[1]=0))}function b(e,t){e[0]^=t[0],e[1]^=t[1]}let w=[0xff51afd7,0xed558ccd],x=[0xc4ceb9fe,0x1a85ec53];function k(e){let t=[0,e[0]>>>1];b(e,t),_(e,w),t[1]=e[0]>>>1,b(e,t),_(e,x),t[1]=e[0]>>>1,b(e,t)}let E=[0x87c37b91,0x114253d5],S=[0x4cf5ad43,0x2745937f],P=[0,5],F=[0,0x52dce729],I=[0,0x38495ab5];function C(){let e=window,t=navigator;return g(["MSCSSMatrix"in e,"msSetImmediate"in e,"msIndexedDB"in e,"msMaxTouchPoints"in t,"msPointerEnabled"in t])>=4}function M(){let e=window,t=navigator;return g(["webkitPersistentStorage"in t,"webkitTemporaryStorage"in t,0===(t.vendor||"").indexOf("Google"),"webkitResolveLocalFileSystemURL"in e,"BatteryManager"in e,"webkitMediaStream"in e,"webkitSpeechGrammar"in e])>=5}function j(){let e=window;return g(["ApplePayError"in e,"CSSPrimitiveValue"in e,"Counter"in e,0===navigator.vendor.indexOf("Apple"),"RGBColor"in e,"WebKitMediaKeys"in e])>=4}function L(){let e=window,{HTMLElement:t,Document:i}=e;return g(["safari"in e,!("ongestureend"in e),!("TouchEvent"in e),!("orientation"in e),t&&!("autocapitalize"in t.prototype),i&&"pointerLockElement"in i.prototype])>=4}function R(){var e;let t=window;return e=t.print,/^function\s.*?\{\s*\[native code]\s*}$/.test(String(e))&&"[object WebPageNamespace]"===String(t.browser)}function T(){var e,t;let i=window;return g(["buildID"in navigator,"MozAppearance"in(null!=(t=null==(e=document.documentElement)?void 0:e.style)?t:{}),"onmozfullscreenchange"in i,"mozInnerScreenX"in i,"CSSMozDocumentRule"in i,"CanvasCaptureMediaStream"in i])>=4}function $(){let{CSS:e}=window;return g([e.supports("selector(::details-content)"),e.supports("selector(::before::marker)"),e.supports("selector(::after::marker)"),!("locale"in CompositionEvent.prototype)])>=3}function O(){let e=window,{CSS:t,HTMLButtonElement:i}=e;return g([!("getStorageUpdates"in navigator),i&&"popover"in i.prototype,"CSSCounterStyleRule"in e,t.supports("font-size-adjust: ex-height 0.5"),t.supports("text-transform: full-width")])>=4}function A(){let e=M(),t=T(),i=window,r=navigator,s="connection";return e?g([!("SharedWorker"in i),r[s]&&"ontypechange"in r[s],!("sinkId"in new Audio)])>=2:!!t&&g(["onorientationchange"in i,"orientation"in i,/android/i.test(r.appVersion)])>=2}function N(e){let t=Error(e);return t.name=e,t}async function D(e,t,i=50){var r,s,n;let a=document;for(;!a.body;)await o(i);let l=a.createElement("iframe");try{for(await new Promise((e,i)=>{let r=!1,s=()=>{r=!0,e()};l.onload=s,l.onerror=e=>{r=!0,i(e)};let{style:n}=l;n.setProperty("display","block","important"),n.position="absolute",n.top="0",n.left="0",n.visibility="hidden",t&&"srcdoc"in l?l.srcdoc=t:l.src="about:blank",a.body.appendChild(l);let o=()=>{var e,t;r||((null==(t=null==(e=l.contentWindow)?void 0:e.document)?void 0:t.readyState)==="complete"?s():setTimeout(o,10))};o()});!(null==(s=null==(r=l.contentWindow)?void 0:r.document)?void 0:s.body);)await o(i);return await e(l,l.contentWindow)}finally{null==(n=l.parentNode)||n.removeChild(l)}}let q=["monospace","sans-serif","serif"],H=["sans-serif-thin","ARNO PRO","Agency FB","Arabic Typesetting","Arial Unicode MS","AvantGarde Bk BT","BankGothic Md BT","Batang","Bitstream Vera S
38ans Mono","Calibri","Century","Century Gothic","Clarendon","EUROSTILE","Franklin Gothic","Futura Bk BT","Futura Md BT","GOTHAM","Gill Sans","HELV","Haettenschweiler","Helvetica Neue","Humanst521 BT","Leelawadee","Letter Gothic","Levenim MT","Lucida Bright","Lucida Sans","Menlo","MS Mincho","MS Outlook","MS Reference Specialty","MS UI Gothic","MT Extra","MYRIAD PRO","Marlett","Meiryo UI","Microsoft Uighur","Minion Pro","Monotype Corsiva","PMingLiU","Pristina","SCRIPTINA","Segoe UI Light","Serifa","SimHei","Small Fonts","Staccato222 BT","TRAJAN PRO","Univers CE 55 Medium","Vrinda","ZWAdobeF"];function V(e){return e.toDataURL()}function W(){let e=screen;return[p(h(e.availTop),null),p(h(e.width)-h(e.availWidth)-p(h(e.availLeft),0),null),p(h(e.height)-h(e.availHeight)-p(h(e.availTop),0),null),p(h(e.availLeft),null)]}function G(e){for(let t=0;t<4;++t)if(e[t])return!1;return!0}async function z({debug:e}={}){let t;if(!(j()||A()))return;let i={abpIndo:["#Iklan-Melayang","#Kolom-Iklan-728","#SidebarIklan-wrapper",'[title="ALIENBOLA" i]',(t=atob)("I0JveC1CYW5uZXItYWRz")],abpvn:[".quangcao","#mobileCatfish",t("LmNsb3NlLWFkcw=="),'[id^="bn_bottom_fixed_"]',"#pmadv"],adBlockFinland:[".mainostila",t("LnNwb25zb3JpdA=="),".ylamainos",t("YVtocmVmKj0iL2NsaWNrdGhyZ2guYXNwPyJd"),t("YVtocmVmXj0iaHR0cHM6Ly9hcHAucmVhZHBlYWsuY29tL2FkcyJd")],adBlockPersian:["#navbar_notice_50",".kadr",'TABLE[width="140px"]',"#divAgahi",t("YVtocmVmXj0iaHR0cDovL2cxLnYuZndtcm0ubmV0L2FkLyJd")],adBlockWarningRemoval:["#adblock-honeypot",".adblocker-root",".wp_adblock_detect",t("LmhlYWRlci1ibG9ja2VkLWFk"),t("I2FkX2Jsb2NrZXI=")],adGuardAnnoyances:[".hs-sosyal","#cookieconsentdiv",'div[class^="app_gdpr"]',".as-oil",'[data-cypress="soft-push-notification-modal"]'],adGuardBase:[".BetterJsPopOverlay",t("I2FkXzMwMFgyNTA="),t("I2Jhbm5lcmZsb2F0MjI="),t("I2NhbXBhaWduLWJhbm5lcg=="),t("I0FkLUNvbnRlbnQ=")],adGuardChinese:[t("LlppX2FkX2FfSA=="),t("YVtocmVmKj0iLmh0aGJldDM0LmNvbSJd"),"#widget-quan",t("YVtocmVmKj0iLzg0OTkyMDIwLnh5eiJd"),t("YVtocmVmKj0iLjE5NTZobC5jb20vIl0=")],adGuardFrench:["#pavePub",t("LmFkLWRlc2t0b3AtcmVjdGFuZ2xl"),".mobile_adhesion",".widgetadv",t("LmFkc19iYW4=")],adGuardGerman:['aside[data-portal-id="leaderboard"]'],adGuardJapanese:["#kauli_yad_1",t("YVtocmVmXj0iaHR0cDovL2FkMi50cmFmZmljZ2F0ZS5uZXQvIl0="),t("Ll9wb3BJbl9pbmZpbml0ZV9hZA=="),t("LmFkZ29vZ2xl"),t("Ll9faXNib29zdFJldHVybkFk")],adGuardMobile:[t("YW1wLWF1dG8tYWRz"),t("LmFtcF9hZA=="),'amp-embed[type="24smi"]',"#mgid_iframe1",t("I2FkX2ludmlld19hcmVh")],adGuardRussian:[t("YVtocmVmXj0iaHR0cHM6Ly9hZC5sZXRtZWFkcy5jb20vIl0="),t("LnJlY2xhbWE="),'div[id^="smi2adblock"]',t("ZGl2W2lkXj0iQWRGb3hfYmFubmVyXyJd"),"#psyduckpockeball"],adGuardSocial:[t("YVtocmVmXj0iLy93d3cuc3R1bWJsZXVwb24uY29tL3N1Ym1pdD91cmw9Il0="),t("YVtocmVmXj0iLy90ZWxlZ3JhbS5tZS9zaGFyZS91cmw/Il0="),".etsy-tweet","#inlineShare",".popup-social"],adGuardSpanishPortuguese:["#barraPublicidade","#Publicidade","#publiEspecial","#queTooltip",".cnt-publi"],adGuardTrackingProtection:["#qoo-counter",t("YVtocmVmXj0iaHR0cDovL2NsaWNrLmhvdGxvZy5ydS8iXQ=="),t("YVtocmVmXj0iaHR0cDovL2hpdGNvdW50ZXIucnUvdG9wL3N0YXQucGhwIl0="),t("YVtocmVmXj0iaHR0cDovL3RvcC5tYWlsLnJ1L2p1bXAiXQ=="),"#top100counter"],adGuardTurkish:["#backkapat",t("I3Jla2xhbWk="),t("YVtocmVmXj0iaHR0cDovL2Fkc2Vydi5vbnRlay5jb20udHIvIl0="),t("YVtocmVmXj0iaHR0cDovL2l6bGVuemkuY29tL2NhbXBhaWduLyJd"),t("YVtocmVmXj0iaHR0cDovL3d3dy5pbnN0YWxsYWRzLm5ldC8iXQ==")],bulgarian:[t("dGQjZnJlZW5ldF90YWJsZV9hZHM="),"#ea_intext_div",".lapni-pop-over","#xenium_hot_offers"],easyList:[".yb-floorad",t("LndpZGdldF9wb19hZHNfd2lkZ2V0"),t("LnRyYWZmaWNqdW5reS1hZA=="),".textad_headline",t("LnNwb25zb3JlZC10ZXh0LWxpbmtz")],easyListChina:[t("LmFwcGd1aWRlLXdyYXBbb25jbGljayo9ImJjZWJvcy5jb20iXQ=="),t("LmZyb250cGFnZUFkdk0="),"#taotaole","#aafoot.top_box",".cfa_popup"],easyListCookie:[".ezmob-footer",".cc-CookieWarning","[data-cookie-number]",t("LmF3LWNvb2tpZS1iYW5uZXI="),".sygnal24-gdpr-modal-wrap"],easyListCzechSlovak:["#onlajny-stickers",t("I3Jla2xhbW5pLWJveA=="),t("LnJla2xhbWEtbWVnYWJvYXJk"),".sklik",t("W2lkXj0ic2tsaWtSZWtsYW1hIl0=")],easyListDutch:[t("I2FkdmVydGVudGll"),t("I3ZpcEFkbWFya3RCYW5uZXJCbG9jaw=="),".adstekst",t("YVtocmVmXj0iaHR0cHM6Ly94bHR1YmUubmwvY2xpY2svIl0="),"#semilo-lrectangle"],easyListGermany:["#SSpotIMPopSlider",t("LnNwb25zb3JsaW5rZ3J1ZW4="),t("I3dlcmJ1bmdza3k="),t("I3Jla2xhbWUtcmVjaHRzLW1pdHRl"),t("YVtocmVmXj0iaHR0cHM6Ly9iZDc0Mi5jb20vIl0=")],easyListItaly:[t("LmJveF9hZHZfYW5udW5jaQ=="),".sb-box-pubbliredazionale",t("YVtocmVmXj0iaHR0cDovL2FmZmlsaWF6aW9uaWFkcy5zbmFpLml0LyJd"),t("YVtocmVmXj0iaHR0cHM6Ly9hZHNlcnZlci5odG
381sLml0LyJd"),t("YVtocmVmXj0iaHR0cHM6Ly9hZmZpbGlhemlvbmlhZHMuc25haS5pdC8iXQ==")],easyListLithuania:[t("LnJla2xhbW9zX3RhcnBhcw=="),t("LnJla2xhbW9zX251b3JvZG9z"),t("aW1nW2FsdD0iUmVrbGFtaW5pcyBza3lkZWxpcyJd"),t("aW1nW2FsdD0iRGVkaWt1b3RpLmx0IHNlcnZlcmlhaSJd"),t("aW1nW2FsdD0iSG9zdGluZ2FzIFNlcnZlcmlhaS5sdCJd")],estonian:[t("QVtocmVmKj0iaHR0cDovL3BheTRyZXN1bHRzMjQuZXUiXQ==")],fanboyAnnoyances:["#ac-lre-player",".navigate-to-top","#subscribe_popup",".newsletter_holder","#back-top"],fanboyAntiFacebook:[".util-bar-module-firefly-visible"],fanboyEnhancedTrackers:[".open.pushModal","#issuem-leaky-paywall-articles-zero-remaining-nag","#sovrn_container",'div[class$="-hide"][zoompage-fontsize][style="display: block;"]',".BlockNag__Card"],fanboySocial:["#FollowUs","#meteored_share","#social_follow",".article-sharer",".community__social-desc"],frellwitSwedish:[t("YVtocmVmKj0iY2FzaW5vcHJvLnNlIl1bdGFyZ2V0PSJfYmxhbmsiXQ=="),t("YVtocmVmKj0iZG9rdG9yLXNlLm9uZWxpbmsubWUiXQ=="),"article.category-samarbete",t("ZGl2LmhvbGlkQWRz"),"ul.adsmodern"],greekAdBlock:[t("QVtocmVmKj0iYWRtYW4ub3RlbmV0LmdyL2NsaWNrPyJd"),t("QVtocmVmKj0iaHR0cDovL2F4aWFiYW5uZXJzLmV4b2R1cy5nci8iXQ=="),t("QVtocmVmKj0iaHR0cDovL2ludGVyYWN0aXZlLmZvcnRobmV0LmdyL2NsaWNrPyJd"),"DIV.agores300","TABLE.advright"],hungarian:["#cemp_doboz",".optimonk-iframe-container",t("LmFkX19tYWlu"),t("W2NsYXNzKj0iR29vZ2xlQWRzIl0="),"#hirdetesek_box"],iDontCareAboutCookies:['.alert-info[data-block-track*="CookieNotice"]',".ModuleTemplateCookieIndicator",".o--cookies--container","#cookies-policy-sticky","#stickyCookieBar"],icelandicAbp:[t("QVtocmVmXj0iL2ZyYW1ld29yay9yZXNvdXJjZXMvZm9ybXMvYWRzLmFzcHgiXQ==")],latvian:[t("YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiAxMjBweDsgaGVpZ2h0OiA0MHB4OyBvdmVyZmxvdzogaGlkZGVuOyBwb3NpdGlvbjogcmVsYXRpdmU7Il0="),t("YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiA4OHB4OyBoZWlnaHQ6IDMxcHg7IG92ZXJmbG93OiBoaWRkZW47IHBvc2l0aW9uOiByZWxhdGl2ZTsiXQ==")],listKr:[t("YVtocmVmKj0iLy9hZC5wbGFuYnBsdXMuY28ua3IvIl0="),t("I2xpdmVyZUFkV3JhcHBlcg=="),t("YVtocmVmKj0iLy9hZHYuaW1hZHJlcC5jby5rci8iXQ=="),t("aW5zLmZhc3R2aWV3LWFk"),".revenue_unit_item.dable"],listeAr:[t("LmdlbWluaUxCMUFk"),".right-and-left-sponsers",t("YVtocmVmKj0iLmFmbGFtLmluZm8iXQ=="),t("YVtocmVmKj0iYm9vcmFxLm9yZyJd"),t("YVtocmVmKj0iZHViaXp6bGUuY29tL2FyLz91dG1fc291cmNlPSJd")],listeFr:[t("YVtocmVmXj0iaHR0cDovL3Byb21vLnZhZG9yLmNvbS8iXQ=="),t("I2FkY29udGFpbmVyX3JlY2hlcmNoZQ=="),t("YVtocmVmKj0id2Vib3JhbWEuZnIvZmNnaS1iaW4vIl0="),".site-pub-interstitiel",'div[id^="crt-"][data-criteo-id]'],officialPolish:["#ceneo-placeholder-ceneo-12",t("W2hyZWZePSJodHRwczovL2FmZi5zZW5kaHViLnBsLyJd"),t("YVtocmVmXj0iaHR0cDovL2Fkdm1hbmFnZXIudGVjaGZ1bi5wbC9yZWRpcmVjdC8iXQ=="),t("YVtocmVmXj0iaHR0cDovL3d3dy50cml6ZXIucGwvP3V0bV9zb3VyY2UiX
38Q=="),t("ZGl2I3NrYXBpZWNfYWQ=")],ro:[t("YVtocmVmXj0iLy9hZmZ0cmsuYWx0ZXgucm8vQ291bnRlci9DbGljayJd"),t("YVtocmVmXj0iaHR0cHM6Ly9ibGFja2ZyaWRheXNhbGVzLnJvL3Ryay9zaG9wLyJd"),t("YVtocmVmXj0iaHR0cHM6Ly9ldmVudC4ycGVyZm9ybWFudC5jb20vZXZlbnRzL2NsaWNrIl0="),t("YVtocmVmXj0iaHR0cHM6Ly9sLnByb2ZpdHNoYXJlLnJvLyJd"),'a[href^="/url/"]'],ruAd:[t("YVtocmVmKj0iLy9mZWJyYXJlLnJ1LyJd"),t("YVtocmVmKj0iLy91dGltZy5ydS8iXQ=="),t("YVtocmVmKj0iOi8vY2hpa2lkaWtpLnJ1Il0="),"#pgeldiz",".yandex-rtb-block"],thaiAds:["a[href*=macau-uta-popup]",t("I2Fkcy1nb29nbGUtbWlkZGxlX3JlY3RhbmdsZS1ncm91cA=="),t("LmFkczMwMHM="),".bumq",".img-kosana"],webAnnoyancesUltralist:["#mod-social-share-2","#social-tools",t("LmN0cGwtZnVsbGJhbm5lcg=="),".zergnet-recommend",".yt.btn-link.btn-md.btn"]},r=Object.keys(i),s=[].concat(...r.map(e=>i[e])),n=await B(s);e&&function(e,t){let i="DOM blockers debug:\n```";for(let r of Object.keys(e))for(let s of(i+=`
39${r}:`,e[r]))i+=`
40  ${t[s]?"🚫":"➡️"} ${s}`;console.log(`${i}
41\`\`\``)}(i,n);let o=r.filter(e=>{let t=i[e];return g(t.map(e=>n[e]))>.6*t.length});return o.sort(),o}async function B(e){var t;let i=document,r=i.createElement("div"),s=Array(e.length),n={};U(r);for(let t=0;t<e.length;++t){let n=function(e){let[t,i]=function(e){var t,i;let r=`Unexpected syntax '${e}'`,s=/^\s*([a-z-]*)(.*)$/i.exec(e),n=s[1]||void 0,o={},a=/([.:#][\w-]+|\[.+?\])/gi,l=(e,t)=>{o[e]=o[e]||[],o[e].push(t)};for(;;){let e=a.exec(s[2]);if(!e)break;let n=e[0];switch(n[0]){case".":l("class",n.slice(1));break;case"#":l("id",n.slice(1));break;case"[":{let e=/^\[([\w-]+)([~|^$*]?=("(.*?)"|([\w-]+)))?(\s+[is])?\]$/.exec(n);if(e)l(e[1],null!=(i=null!=(t=e[4])?t:e[5])?i:"");else throw Error(r);break}default:throw Error(r)}}return[n,o]}(e),r=document.createElement(null!=t?t:"div");for(let e of Object.keys(i)){let t=i[e].join(" ");"style"===e?function(e,t){for(let i of t.split(";")){let t=/^\s*([\w-]+)\s*:\s*(.+?)(\s*!([\w-]+))?\s*$/.exec(i);if(t){let[,i,r,,s]=t;e.setProperty(i,r,s||"")}}}(r.style,t):r.setAttribute(e,t)}return r}(e[t]);"DIALOG"===n.tagName&&n.show();let o=i.createElement("div");U(o),o.appendChild(n),r.appendChild(o),s[t]=n}for(;!i.body;)await o(50);i.body.appendChild(r);try{for(let t=0;t<e.length;++t)s[t].offsetParent||(n[e[t]]=!0)}finally{null==(t=r.parentNode)||t.removeChild(r)}return n}function U(e){e.style.setProperty("visibility","hidden","important"),e.style.setProperty("display","block","important")}function Y(e){return matchMedia(`(inverted-colors: ${e})`).matches}function X(e){return matchMedia(`(forced-colors: ${e})`).matches}function Z(e){return matchMedia(`(prefers-contrast: ${e})`).matches}function J(e){return matchMedia(`(prefers-reduced-motion: ${e})`).matches}function K(e){return matchMedia(`(prefers-reduced-transparency: ${e})`).matches}function Q(e){return matchMedia(`(dynamic-range: ${e})`).matches}let ee=Math,et=()=>0,ei={default:[],apple:[{font:"-apple-system-body"}],serif:[{fontFamily:"serif"}],sans:[{fontFamily:"sans-serif"}],mono:[{fontFamily:"monospace"}],min:[{fontSize:"1px"}],system:[{fontFamily:"system-ui"}]},er=function(){let e=window;for(;;){let t=e.parent;if(!t||t===e)return!1;try{if(t.location.origin!==e.location.origin)return!0}catch(e){if(e instanceof Error&&"SecurityError"===e.name)return!0;throw e}e=t}},es=new Set([10752,2849,2884,2885,2886,2928,2929,2930,2931,2932,2960,2961,2962,2963,2964,2965,2966,2967,2968,2978,3024,3042,3088,3089,3106,3107,32773,32777,32777,32823,32824,32936,32937,32938,32939,32968,32969,32970,32971,3317,33170,3333,3379,3386,33901,33902,34016,34024,34076,3408,3410,3411,3412,3413,3414,3415,34467,34816,34817,34818,34819,34877,34921,34930,35660,35661,35724,35738,35739,36003,36004,36005,36347,36348,36349,37440,37441,37443,7936,7937,7938]),en=new Set([34047,35723,36063,34852,34853,34854,34229,36392,36795,38449]),eo=["FRAGMENT_SHADER","VERTEX_SHADER"],ea=["LOW_FLOAT","MEDIUM_FLOAT","HIGH_FLOAT","LOW_INT","MEDIUM_INT","HIGH_INT"],el="WEBGL_debug_renderer_info";function eu(e){let t;if(e.webgl)return e.webgl.context;let i=document.createElement("canvas");for(let e of(i.addEventListener("webglCreateContextError",()=>t=void 0),["webgl","experimental-webgl"])){try{t=i.getContext(e)}catch(e){}if(t)break}return e.webgl={context:t},t}function ec(e){return Object.keys(e.__proto__).filter(ed)}function ed(e){return"string"==typeof e&&!e.match(/[^A-Z0-9_x]/)}function eh(e){return"function"==typeof e.getParameter}let ep={userAgentData:async function(){let e=navigator.userAgentData;if(!e)return;let t=e.brands.filter(({brand:e})=>!/not/i.test(e)).map(({brand:e})=>e),i={brands:t.length>1?t.filter(e=>"Chromium"!==e):t,mobile:e.mobile,platform:e.platform};
41if(e.getHighEntropyValues)try{let t=await e.getHighEntropyValues(["architecture","bitness","model","platformVersion"]);i.architecture=t.architecture,i.bitness=t.bitness,i.model=t.model,i.platformVersion=t.platformVersion}catch(e){if(e instanceof DOMException&&"NotAllowedError"===e.name)i.highEntropyStatus="not_allowed";else throw e}return i},fonts:function(){return D(async(e,{document:t})=>{let i=t.body;i.style.fontSize="48px";let r=t.createElement("div");r.style.setProperty("visibility","hidden","important");let s={},n={},o=e=>{let i=t.createElement("span"),{style:s}=i;return s.position="absolute",s.top="0",s.left="0",s.fontFamily=e,i.textContent="mmMwWLliI0O&1",r.appendChild(i),i},a=(e,t)=>o(`'${e}',${t}`),l=q.map(o),u=(()=>{let e={};for(let t of H)e[t]=q.map(e=>a(t,e));return e})();i.appendChild(r);for(let e=0;e<q.length;e++)s[q[e]]=l[e].offsetWidth,n[q[e]]=l[e].offsetHeight;return H.filter(e=>{let t;return t=u[e],q.some((e,i)=>t[i].offsetWidth!==s[e]||t[i].offsetHeight!==n[e])})})},domBlockers:z,fontPreferences:function(){return function(e,t=4e3){return D((i,r)=>{let s=r.document,n=s.body,o=n.style;o.width=`${t}px`,o.webkitTextSizeAdjust=o.textSizeAdjust="none",M()?n.style.zoom=`${1/r.devicePixelRatio}`:j()&&(n.style.zoom="reset");let a=s.createElement("div");return a.textContent=[...Array(t/20|0)].map(()=>"word").join(" "),n.appendChild(a),e(s,n,r)},'<!doctype html><html><head><meta name="viewport" content="width=device-width, initial-scale=1">')}((e,t,i)=>{let r={},s={};for(let i of Object.keys(ei)){let[s={},n="mmMwWLliI0fiflO&1"]=ei[i],o=e.createElement("span");for(let e of(o.textContent=n,o.style.whiteSpace="nowrap",Object.keys(s))){let t=s[e];void 0!==t&&(o.style[e]=t)}r[i]=o,t.append(e.createElement("br"),o)}let n=M()&&function(){let{CSS:e,Promise:t,AudioContext:i}=window;return g([t&&"try"in t,"caretPositionFromPoint"in document,i&&"onerror"in i.prototype,e.supports("ruby-align","space-around")])>=3}();for(let e of Object.keys(ei)){let t=r[e].getBoundingClientRect().width;s[e]=n?function(e){let t=Math.pow(10,3*!A());return Math.floor(e*t)/t}(t*i.devicePixelRatio):t}return s})},audio:function(){return j()&&O()&&R()||M()&&function(){let e=navigator,t=window,i=Audio.prototype,{visualViewport:r}=t;return g(["srLatency"in i,"srChannelCount"in i,"devicePosture"in e,r&&"segments"in r,"getTextInformation"in Image.prototype])>=3}()&&function(){let e=window,{URLPattern:t}=e;return g(["union"in Set.prototype,"Iterator"in e,t&&"hasRegExpGroups"in t.prototype,"RGB8"in WebGLRenderingContext.prototype])>=3}()?-4:function(){var e;let t,i,r=window,s=r.OfflineAudioContext||r.webkitOfflineAudioContext;if(!s)return -2;if(j()&&!L()&&!(g(["DOMRectList"in(t=window),"RTCPeerConnectionIceEvent"in t,"SVGGeometryElement"in t,"ontransitioncancel"in t])>=3))return -1;let n=new s(1,5e3,44100),o=n.createOscillator();o.type="triangle",o.frequency.value=1e4;let l=n.createDynamicsCompressor();l.threshold.value=-50,l.knee.value=40,l.ratio.value=12,l.attack.value=0,l.release.value=.25,o.connect(l),l.connect(n.destination),o.start(0);let[u,d]=(e=n,i=()=>void 0,[new Promise((t,r)=>{let s=!1,n=0,o=0;e.oncomplete=e=>t(e.renderedBuffer);let l=()=>{setTimeout(()=>r(N("timeout")),Math.min(500,o+5e3-Date.now()))},u=()=>{try{let t=e.startRendering();switch(a(t)&&c(t),e.state){case"running":o=Date.now(),s&&l();break;case"suspended":!document.hidden&&n++,s&&n>=3?r(N("suspended")):setTimeout(u,500)}}catch(e){r(e)}};u(),i=()=>{!s&&(s=!0,o>0&&l())}}),i]),h=c(u.then(e=>(function(e){let t=0;for(let i=0;i<e.length;++i)t+=Math.abs(e[i]);return t})(e.getChannelData(0).subarray(4500)),e=>{if("timeout"===e.name||"suspended"===e.name)return -3;throw e}));return()=>(d(),h)}()},screenFrame:function(){let e=j()&&O()&&R(),r=T()&&$();if(e||r)return()=>Promise.resolve(void 0);let s=(!function(){if(void 0!==i)return;let e=()=>{let r=W();G(r)?i=setTimeout(e,2500):(t=r,i=void 0)};e()}(),async()=>{let e=W();if(G(e)){let i;if(t)return[...t];if((i=document).fullscreenElement||i.msFullscreenElement||i.mozFullScreenElement||i.webkitFullscreenElement){let t;await ((t=document).exitFullscreen||t.msExitFullscreen||t.mozCancelFullScreen||t.webkitExitFullscreen).call(t),e=W()}}return G(e)||(t=e),e});return async()=>{let e=await s(),t=e=>null===e?null:f(e,10);return[t(e[0]),t(e[1]),t(e[2]),t(e[3])]}},canvas:function(){let e,t;return function(e){var t,i,r,s,n,o;let a,l,u,c,d,h=!1,[p,g]=((a=document.createElement("canvas")).width=1,a.height=1,[a,a.getContext("2d")]);return(t=p,g&&t.toDataURL)?((i=g).rect(0,0,10,10),i.rect(2,2,6,6),h=!i.isPointInPath(
415,5,"evenodd"),e?c=d="skipped":[c,d]=(r=p,s=g,n=r,o=s,n.width=240,n.height=60,o.textBaseline="alphabetic",o.fillStyle="#f60",o.fillRect(100,1,62,20),o.fillStyle="#069",o.font='11pt "Times New Roman"',l=`Cwm fjordbank gly ${String.fromCharCode(55357,56835)}`,o.fillText(l,2,15),o.fillStyle="rgba(102, 204, 0, 0.2)",o.font="18pt Arial",o.fillText(l,4,45),(u=V(r))!==V(r)?["unstable","unstable"]:(function(e,t){for(let[i,r,s]of(e.width=122,e.height=110,t.globalCompositeOperation="multiply",[["#f2f",40,40],["#2ff",80,40],["#ff2",60,80]]))t.fillStyle=i,t.beginPath(),t.arc(r,s,40,0,2*Math.PI,!0),t.closePath(),t.fill();t.fillStyle="#f9c",t.arc(60,60,60,0,2*Math.PI,!0),t.arc(60,60,20,0,2*Math.PI,!0),t.fill("evenodd")}(r,s),[V(r),u]))):c=d="unsupported",{winding:h,geometry:c,text:d}}((e=j()&&O()&&R(),t=T()&&function(){let e=navigator,{CSS:t}=window;return g(["userActivation"in e,t.supports("color","light-dark(#000, #fff)"),t.supports("height","1lh"),"globalPrivacyControl"in e])>=3}(),e||t))},osCpu:function(){return navigator.oscpu},languages:function(){let e=navigator,t=[],i=e.language||e.userLanguage||e.browserLanguage||e.systemLanguage;if(void 0!==i&&t.push([i]),Array.isArray(e.languages)){let i;M()&&g([!("MediaSettingsRange"in(i=window)),"RTCEncodedAudioFrame"in i,""+i.Intl=="[object Intl]",""+i.Reflect=="[object Reflect]"])>=3||t.push(e.languages)}else if("string"==typeof e.languages){let i=e.languages;i&&t.push(i.split(","))}return t},colorDepth:function(){return window.screen.colorDepth},deviceMemory:function(){return p(h(navigator.deviceMemory),void 0)},screenResolution:function(){if(!(j()&&O()&&R())){let e,t;return(t=[p(d((e=screen).width),null),p(d(e.height),null)]).sort().reverse(),t}},hardwareConcurrency:function(){let e=p(d(navigator.hardwareConcurrency),void 0);return void 0!==e&&T()&&$()?e>=8?8:4:e},timezone:function(){var e;let t,i=null==(e=window.Intl)?void 0:e.DateTimeFormat;if(i){let e=new i().resolvedOptions().timeZone;if(e)return e}let r=-Math.max(h(new Date(t=new Date().getFullYear(),0,1).getTimezoneOffset()),h(new Date(t,6,1).getTimezoneOffset()));return`UTC${r>=0?"+":""}${r}`},sessionStorage:function(){try{return!!window.sessionStorage}catch(e){return!0}},localStorage:function(){try{return!!window.localStorage}catch(e){return!0}},indexedDB:function(){let e,t;if(!(C()||g(["msWriteProfilerMark"in(e=window),"MSStream"in e,"msLaunchUri"in(t=navigator),"msSaveBlob"in t])>=3&&!C()))try{return!!window.indexedDB}catch(e){return!0}},openDatabase:function(){return!!window.openDatabase},cpuClass:function(){return navigator.cpuClass},platform:function(){let{platform:e}=navigator;return"MacIntel"===e&&j()&&!L()?!function(){if("iPad"===navigator.platform)return!0;let e=screen,t=e.width/e.height;return g(["MediaSource"in window,!!Element.prototype.webkitRequestFullscreen,t>.65&&t<1.53])>=2}()?"iPhone":"iPad":e},plugins:function(){let e=navigator.plugins;if(!e)return;let t=[];for(let i=0;i<e.length;++i){let r=e[i];if(!r)continue;let s=[];for(let e=0;e<r.length;++e){let t=r[e];s.push({type:t.type,suffixes:t.suffixes})}t.push({name:r.name,description:r.description,mimeTypes:s})}return t},touchSupport:function(){let e,t=navigator,i=0;void 0!==t.maxTouchPoints?i=d(t.maxTouchPoints):void 0!==t.msMaxTouchPoints&&(i=t.msMaxTouchPoints);try{document.createEvent("TouchEvent"),e=!0}catch(t){e=!1}return{maxTouchPoints:i,touchEvent:e,touchStart:"ontouchstart"in window}},vendor:function(){return navigator.vendor||""},vendorFlavors:function(){let e=[];for(let t of["chrome","safari","__crWeb","__gCrWeb","yandex","__yb","__ybro","__firefox__","__edgeTrackingPreventionStatistics","webkit","oprt","samsungAr","ucweb","UCShellJava","puffinDevice"]){let i=window[t];i&&"object"==typeof i&&e.push(t)}return e.sort()},cookiesEnabled:function(){let e=document;try{e.cookie="cookietest=1; SameSite=Strict;";let t=-1!==e.cookie.indexOf("cookietest=");return e.cookie="cookietest=1; SameSite=Strict; expires=Thu, 01-Jan-1970 00:00:01 GMT",t}catch(e){return!1}},colorGamut:function(){for(let e of["rec2020","p3","srgb"])if(matchMedia(`(color-gamut: ${e})`).matches)return e},invertedColors:function(){return!!Y("inverted")||!Y("none")&&void 0},forcedColors:function(){return!!X("active")||!X("none")&&void 0},monochrome:function(){if(matchMedia("(min-monochrome: 0)").matches){for(let e=0;e<=100;++e)if(matchMedia(`(max-monochrome: ${e})`).matches)return e;throw Error("Too high value")}},contrast:function(){return Z("no-preference")?0:Z("high")||Z("more")?1:Z("low")||Z("less")?-1:Z("forced")?10:void 0},reducedMotion:function(){return!!J("reduce")||!J("no-preference")&&void 0},reducedTransparency:function(){return!!K("reduce")||!K("no-preference")&&void 0},hdr:function(){return!!Q("high")||!Q("standard")&&void 0},math:function(){let e=ee.acos||et,t=ee.acosh||et,i=ee.asin||et,r=ee.asin
41h||et,s=ee.atanh||et,n=ee.atan||et,o=ee.sin||et,a=ee.sinh||et,l=ee.cos||et,u=ee.cosh||et,c=ee.tan||et,d=ee.tanh||et,h=ee.exp||et,p=ee.expm1||et,g=ee.log1p||et;return{acos:e(.12312423423423424),acosh:t(1e308),acoshPf:ee.log(1e154+ee.sqrt(1e154*1e154-1)),asin:i(.12312423423423424),asinh:r(1),asinhPf:ee.log(1+ee.sqrt(2)),atanh:s(.5),atanhPf:ee.log(3)/2,atan:n(.5),sin:o(-1e300),sinh:a(1),sinhPf:ee.exp(1)-1/ee.exp(1)/2,cos:l(10.000000000123),cosh:u(1),coshPf:(ee.exp(1)+1/ee.exp(1))/2,tan:c(-1e300),tanh:d(1),tanhPf:(ee.exp(2)-1)/(ee.exp(2)+1),exp:h(1),expm1:p(1),expm1Pf:ee.exp(1)-1,log1p:g(10),log1pPf:ee.log(11),powPI:ee.pow(ee.PI,-100)}},pdfViewerEnabled:function(){return navigator.pdfViewerEnabled},architecture:function(){let e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=1/0,e[0]=e[0]-e[0],t[3]},applePay:function(){let{ApplePaySession:e}=window;if("function"!=typeof(null==e?void 0:e.canMakePayments))return -1;if(er())return -3;try{return+!!e.canMakePayments()}catch(e){var t=e;if(t instanceof Error&&"InvalidAccessError"===t.name&&/\bfrom\b.*\binsecure\b/i.test(t.message))return -2;throw t}},privateClickMeasurement:function(){var e;let t=document.createElement("a"),i=null!=(e=t.attributionSourceId)?e:t.attributionsourceid;return void 0===i?void 0:String(i)},audioBaseLatency:function(){if(!(A()||j()))return -2;if(!window.AudioContext)return -1;let e=new AudioContext().baseLatency;return null==e?-1:isFinite(e)?e:-3},dateTimeLocale:function(){if(!window.Intl)return -1;let e=window.Intl.DateTimeFormat;if(!e)return -2;let t=e().resolvedOptions().locale;return t||""===t?t:-3},webGlBasics:function({cache:e}){var t,i,r,s,n,o;let a=eu(e);if(!a)return -1;if(!eh(a))return -2;let l=T()?null:a.getExtension(el);return{version:(null==(t=a.getParameter(a.VERSION))?void 0:t.toString())||"",vendor:(null==(i=a.getParameter(a.VENDOR))?void 0:i.toString())||"",vendorUnmasked:l?null==(r=a.getParameter(l.UNMASKED_VENDOR_WEBGL))?void 0:r.toString():"",renderer:(null==(s=a.getParameter(a.RENDERER))?void 0:s.toString())||"",rendererUnmasked:l?null==(n=a.getParameter(l.UNMASKED_RENDERER_WEBGL))?void 0:n.toString():"",shadingLanguageVersion:(null==(o=a.getParameter(a.SHADING_LANGUAGE_VERSION))?void 0:o.toString())||""}},webGlExtensions:function({cache:e}){let t=eu(e);if(!t)return -1;if(!eh(t))return -2;let i=t.getSupportedExtensions(),r=t.getContextAttributes(),s=[],n=[],o=[],a=[],l=[];if(r)for(let e of Object.keys(r))n.push(`${e}=${r[e]}`);for(let e of ec(t)){let i=t[e];o.push(`${e}=${i}${es.has(i)?`=${t.getParameter(i)}`:""}`)}if(i)for(let e of i){if(e===el&&T()||"WEBGL_polygon_mode"===e&&(M()||j()))continue;let i=t.getExtension(e);if(!i){s.push(e);continue}for(let e of ec(i)){let r=i[e];a.push(`${e}=${r}${en.has(r)?`=${t.getParameter(r)}`:""}`)}}for(let e of eo)for(let i of ea){let r=function(e,t,i){let r=e.getShaderPrecisionFormat(e[t],e[i]);return r?[r.rangeMin,r.rangeMax,r.precision]:[]}(t,e,i);l.push(`${e}.${i}=${r.join(",")}`)}return a.sort(),o.sort(),{contextAttributes:n,parameters:o,shaderPrecisions:l,extensions:i,extensionParameters:a,unsupportedExtensions:s}}};var eg=async function(e={}){var t,i,r;let s,a,d,{delayFallback:h,debug:p,monitoring:g=!0}=e;return g&&function(){if(!(window.__fpjs_d_m||Math.random()>=.001))try{let e=new XMLHttpRequest;e.open("get",`https://m1.openfpcdn.io/fingerprintjs/v${n}/npm-monitoring`,!0),e.send()}catch(e){console.error(e)}}(),await function(e=50){return function(e,t=1/0){let{requestIdleCallback:i}=window;return i?new Promise(e=>i.call(window,()=>e(),{timeout:t})):o(Math.min(e,t))}(e,2*e)}(h),t={cache:{},debug:p},i=[],a=c(u(s=Object.keys(ep).filter(e=>!function(e,t){for(let i=0,r=e.length;i<r;++i)if(e[i]===t)return!0;return!1}(i,e)),e=>{var i;let r;return i=ep[e],r=c(new Promise(e=>{let r=Date.now();l(i.bind(null,t),(...t)=>{let i=Date.now()-r;if(!t[0])return e(()=>({error:t[1],duration:i}));let s=t[1];if("function"!=typeof s)return e(()=>({value:s,duration:i}));e(()=>new Promise(e=>{let t=Date.now();l(s,(...r)=>{let s=i+Date.now()-t;if(!r[0])return e({error:r[1],duration:s});e({value:r[1],duration:s})})}))})})),function(){return r.then(e=>e())}},void 0)),r=async function(){let e=await a,t=await u(e,e=>c(e()),void 0),i=await Promise.all(t),r={};for(let e=0;e<s.length;++e)r[s[e]]=i[e];return r},d=Date.now(),{async get(e){var t;let i,s,o,a=Date.now(),l=await r(),u={get visitorId(){return void 0===i&&(i=function(e,t){let i,r=function(e){let t=new Uint8Array(e.length);for(let i=0;i<e.length;i++){let r=e.charCodeAt(i);if(r>127)return new TextEncoder().encode(e);t[i]=r}return t}(e);t=t||0;let s=[0,r.length],n=s[1]%16,o=s[1]-n,a=[0,t],l=[0,t],u=[0,0],c=[0,0];for(i=0;i<o;i+=16)u[0]=r[i+4]|r[i+5]<<8|r[i+6]<<16|r[i+7]<<24,u[1]=r[i]|r[i+1]<<8|r[i+2]<<16|r[i+3]<<24,c[0]=r[i+12]|r[i+13]<<8|r[i+14]<<16|r[i+15]<<24,c[1]=r[i+8]|r[i+9]<<8|r[i+10]<<16|r[i+11]<<24,_(u,E),m(u,31),_(u,S),b(a,u),m(a,27),v(a,l),_(a,P),v(a,F),_(c,S),m(c,33),_(c,E),b(l,c),m(l,31),v(l,a),_(l,P),v(l,I);u[0]=0,u[1]=0,c[0]=0,c[1]=0;let d=[0,0];switch(n){case 15:d[1]=r[i+14],y(d,48),b(c,d);case 14:d[1]=r[i+13],y(d,40),b(c,d);case 13:d[1]=r[i+12],y(d,32),b(c,d);case 12:d[1]=r[i+11],y(d,24),b(c,d);case 11:d[1]=r[i+10],y(d,16),b(c,d);case 10:d[1]=r[i+9],y(d,8),b(c,d);case 9:d[1]=r[i+8],b(c,d),_(c,S),m(c,33),_(c,E),b(l,c);case 8:d[1]=r[i+7],y(d,56),b(u,d);case 7:d[1]=r[i+6],y(d,48),b(u,d);case 6:d[1]=r[i+5],y(d,40),b(u,d);case 5:d[1]=r[i+4],y(d,32),b(u,d);case 4:d[1]=r[i+3],y(d,24),b(u,d);case 3:d[1]=r[i+2],y(d,16),b(u,d);case 2:d[1]=r[i+1],y(d,8),b(u,d);case 1:d[1]=r[i],b(u,d),_(u,E),m(u,31),_(u,S),b(a,u)}return b(a,s),b(l,s),v(a,l),v(l,a),k(a),k(l),v(a,l),v(l,a),("00000000"+(a[0]>>>0).toString(16)).slice(-8)+("00000000"+(a[1]>>>0).toString(16)).slice(-8)+("00000000"+(l[0]>>>0).toString(16)).slice(-8)+("00000000"+(l[1]>>>0).toString(16)).slice(-8)}(function(e){let t="";for(let i of Object.keys(e).sort()){let r=e[i],s="error"in r?"error":JSON.stringify(r.value);t+=`${t?"|":""}${i.replace(/([:|\\])/g,"\\$1")}:${s}`}return t}(this.components))),i},set visitorId(visitorId){i=visitorId},confidence:(o=f(.99+.01*(s=function(e){if(A())return .4;if(j())return L()&&!(O()&&R())?.5:.3;let t="value"in e.platform?e.platform.value:"";return/^Win/.test(t)?.6:/^Mac/.test(t)?.5:.7}(t=l)),1e-4),{score:s,comment:"$ if upgrade to Pro: https://fingerprint.com/github/?utm_source=oss&utm_medium=referral&utm_campaign=confidence_score".replace(/\$/g,`${o}`)}),components:t,version:n};return(p||(null==e?void 0:e.debug))&&console.log(`Copy the text below to get the debug data:
42
43\`\`\`
44version: ${u.version}
45userAgent: ${navigator.userAgent}
46timeBetweenLoadAndGet: ${a-d}
47visitorId: ${u.visitorId}
48components: ${JSON.stringify(l,(e,t)=>{if(t instanceof Error){var i;return{name:t.name,message:t.message,stack:null==(i=t.stack)?void 0:i.split("\n"),...t}}return t},2)}
49\`\`\``),u}}};
49e.s(["default",0,function(){let e=(0,s.useSearchParams)();return(0,r.useEffect)(()=>{let t=e.get("vip")||e.get("ref")||e.get("affiliate")||e.get("referral");if(!t){for(let[i,r]of e.entries())if(""===r&&i.length>3){t=i;break}}if(t){try{localStorage.setItem("affiliate_code",t)}catch(e){console.error("LocalStorage blocked",e)}let e=window.location.pathname+window.location.search,i=document.referrer||"Direct";(async()=>{try{let r=await eg(),s=(await r.get()).visitorId;await fetch("/api/affiliate/track",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({referral_code:t,landing_page:e,referrer:i,fingerprint:s})})}catch(e){console.error("Affiliate tracking error:",e)}})()}},[e]),null}],19976)},36821,e=>{"use strict";var t=e.i(43476),i=e.i(71645),r=e.i(74080),s=e.i(63676),n=e.i(89664),o=e.i(8734),a=e.i(28623),l=e.i(32781);e.s(["default",0,function(){let[e,u]=(0,i.useState)(!1),[c,d]=(0,i.useState)(!1),[h,p]=(0,i.useState)(""),[g,f]=(0,i.useState)(!1),[v,_]=(0,i.useState)(""),[m,y]=(0,i.useState)(!1),[b,w]=(0,i.useState)(!1);(0,i.useEffect)(()=>{u(!0);try{if(!sessionStorage.getItem("alphuel_welcome_popup_seen")){let e=setTimeout(()=>{d(!0)},100);return()=>clearTimeout(e)}}catch(e){d(!0)}},[]);let x=()=>{d(!1);try{sessionStorage.setItem("alphuel_welcome_popup_seen","true")}catch(e){}},k=async e=>{if(e.preventDefault(),_(""),!h||!h.includes("@"))return void _("Please enter a valid email address.");f(!0);try{let e=null;try{e=sessionStorage.getItem("alphuel_session_id")}catch(e){}let t=await fetch("/api/newsletter/send-discount",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:h.trim(),sessionId:e})}),i=await t.json();if(!t.ok&&i.error)throw Error(i.error);y(!0);try{sessionStorage.setItem("alphuel_welcome_popup_seen","true")}catch(e){}}catch(e){console.error("Popup newsletter error:",e),_(e.message||"Something went wrong. Please try again.")}finally{f(!1)}};return e&&c?(0,r.createPortal)((0,t.jsx)("div",{className:`welcome-popup-overlay ${c?"is-visible":""}`,onClick:e=>{e.target===e.currentTarget&&x()},role:"dialog","aria-modal":"true",children:(0,t.jsxs)("div",{className:"welcome-popup-modal animate-scale-in",children:[(0,t.jsx)("button",{onClick:x,className:"welcome-popup-close","aria-label":"Close offer",children:(0,t.jsx)(s.X,{size:18})}),(0,t.jsxs)("div",{className:"welcome-popup-content",children:[(0,t.jsx)("div",{className:"welcome-popup-logo-wrap",children:(0,t.jsx)("img",{src:"/bklogo.png",alt:"Alphuel",className:"welcome-popup-logo"})}),m?(0,t.jsxs)("div",{className:"welcome-popup-success",children:[(0,t.jsxs)("div",{className:"welcome-popup-badge",children:[(0,t.jsx)(a.Sparkles,{size:15})," CODE UNLOCKED"]}),(0,t.jsx)("h3",{style:{fontSize:"1.85rem",fontWeight:800,color:"#0f172a",margin:"0 0 0.5rem"},children:"You're In!"}),(0,t.jsxs)("p",{style:{color:"#486581",fontSize:"0.95rem",margin:"0 0 1.25rem",lineHeight:1.5},children:["We've sent your 30% discount code to ",(0,t.jsx)("strong",{children:h}),". You can also use it right now:"]}),(0,t.jsxs)("div",{className:"welcome-popup-code-box",children:[(0,t.jsx)("div",{className:"welcome-popup-code",children:"ALP30"}),(0,t.jsx)("button",{onClick:()=>{try{navigator.clipboard.writeText("ALP30"),w(!0),setTimeout(()=>w(!1),2500)}catch(e){}},className:"welcome-popup-copy-btn",type:"button",children:b?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.Check,{size:16})," Copied!"]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.Copy,{size:16})," Copy Code"]})})]}),(0,t.jsx)("button",{type:"button",onClick:x,className:"welcome-popup-btn",style:{marginTop:"0.5rem"},children:"SHOP WITH 30% OFF"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"welcome-popup-eyebrow",children:"FIRST ORDER OFFER"}),(0,t.jsxs)("h2",{className:"welcome-popup-headline",children:["Get ",(0,t.jsx)("span",{children:"30% OFF"})]}),(0,t.jsx)("div",{className:"welcome-popup-subheadline",children:"Your First Order!"}),(0,t.jsx)("p",{className:"welcome-popup-desc",children:"Enter your email and we'll send your personal discount code."}),(0,t.jsxs)("form",{onSubmit:k,className:"welcome-popup-form",children:[(0,t.jsx)("input",{type:"email",value:h,onChange:e=>p(e.target.value),placeholder:"Your email address",className:"welcome-popup-input",required:!0,disabled:g}),v&&(0,t.jsx)("div",{style:{color:"#ef4444",fontSize:"0.85rem",marginTop:"-0.25rem"},children:v}),(0,t.jsx)("button",{type:"submit",className:"welcome-popup-btn",disabled:g,children:g?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.L
49oader2,{size:18,className:"animate-spin"}),(0,t.jsx)("span",{children:"Sending Code..."})]}):(0,t.jsx)("span",{children:"GET 30% OFF"})})]}),(0,t.jsx)("button",{type:"button",onClick:x,className:"welcome-popup-dismiss",children:"No thanks, I'll pay full price"})]})]}),(0,t.jsx)("div",{className:"welcome-popup-media",children:(0,t.jsx)("img",{src:"/popup.jpeg",alt:"Alphuel Offer",className:"welcome-popup-image"})})]})}),document.body):null}])}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.