posthog-js 1.307.1 → 1.307.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- !function(){"use strict";var e,t,n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},r={};function i(){if(t)return e;t=1;var r=function(e){return e&&e.Math===Math&&e};return e=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n&&n)||r("object"==typeof e&&e)||function(){return this}()||Function("return this")()}var o,s,a,u,l,c,d,f,p={};function _(){return s?o:(s=1,o=function(e){try{return!!e()}catch(e){return!0}})}function h(){if(u)return a;u=1;var e=_();return a=!e((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))}function v(){if(c)return l;c=1;var e=_();return l=!e((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))}function g(){if(f)return d;f=1;var e=v(),t=Function.prototype.call;return d=e?t.bind(t):function(){return t.apply(t,arguments)},d}var m,y,b,w,S,x,E,k,P,C,T,I,F,L,R,O,M,A,D,q,N,H,j,U,V,z,B,W,G,Z,Y,Q,X,J,K,ee,te,ne,re,ie,oe,se={};function ae(){if(m)return se;m=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,n=t&&!e.call({1:2},1);return se.f=n?function(e){var n=t(this,e);return!!n&&n.enumerable}:e,se}function ue(){return b?y:(b=1,y=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}})}function le(){if(S)return w;S=1;var e=v(),t=Function.prototype,n=t.call,r=e&&t.bind.bind(n,n);return w=e?r:function(e){return function(){return n.apply(e,arguments)}},w}function ce(){if(E)return x;E=1;var e=le(),t=e({}.toString),n=e("".slice);return x=function(e){return n(t(e),8,-1)}}function de(){return T?C:(T=1,C=function(e){return null==e})}function fe(){if(F)return I;F=1;var e=de(),t=TypeError;return I=function(n){if(e(n))throw new t("Can't call method on "+n);return n}}function pe(){if(R)return L;R=1;var e=function(){if(P)return k;P=1;var e=le(),t=_(),n=ce(),r=Object,i=e("".split);return k=t((function(){return!r("z").propertyIsEnumerable(0)}))?function(e){return"String"===n(e)?i(e,""):r(e)}:r}(),t=fe();return L=function(n){return e(t(n))}}function _e(){if(M)return O;M=1;var e="object"==typeof document&&document.all;return O=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(e){return"function"==typeof e}}function he(){if(D)return A;D=1;var e=_e();return A=function(t){return"object"==typeof t?null!==t:e(t)}}function ve(){if(N)return q;N=1;var e=i(),t=_e();return q=function(n,r){return arguments.length<2?(i=e[n],t(i)?i:void 0):e[n]&&e[n][r];var i},q}function ge(){if(j)return H;j=1;var e=le();return H=e({}.isPrototypeOf)}function me(){if(B)return z;B=1;var e,t,n=i(),r=function(){if(V)return U;V=1;var e=i().navigator,t=e&&e.userAgent;return U=t?String(t):""}(),o=n.process,s=n.Deno,a=o&&o.versions||s&&s.version,u=a&&a.v8;return u&&(t=(e=u.split("."))[0]>0&&e[0]<4?1:+(e[0]+e[1])),!t&&r&&(!(e=r.match(/Edge\/(\d+)/))||e[1]>=74)&&(e=r.match(/Chrome\/(\d+)/))&&(t=+e[1]),z=t}function ye(){if(G)return W;G=1;var e=me(),t=_(),n=i().String;return W=!!Object.getOwnPropertySymbols&&!t((function(){var t=Symbol("symbol detection");return!n(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41}))}function be(){if(Y)return Z;Y=1;var e=ye();return Z=e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}function we(){if(X)return Q;X=1;var e=ve(),t=_e(),n=ge(),r=be(),i=Object;return Q=r?function(e){return"symbol"==typeof e}:function(r){var o=e("Symbol");return t(o)&&n(o.prototype,i(r))}}function Se(){if(K)return J;K=1;var e=String;return J=function(t){try{return e(t)}catch(e){return"Object"}}}function xe(){if(te)return ee;te=1;var e=_e(),t=Se(),n=TypeError;return ee=function(r){if(e(r))return r;throw new n(t(r)+" is not a function")}}function Ee(){if(re)return ne;re=1;var e=xe(),t=de();return ne=function(n,r){var i=n[r];return t(i)?void 0:e(i)},ne}function ke(){if(oe)return ie;oe=1;var e=g(),t=_e(),n=he(),r=TypeError;return ie=function(i,o){var s,a;if("string"===o&&t(s=i.toString)&&!n(a=e(s,i)))return a;if(t(s=i.valueOf)&&!n(a=e(s,i)))return a;if("string"!==o&&t(s=i.toString)&&!n(a=e(s,i)))return a;throw new r("Can't convert object to primitive value")}}var Pe,Ce,Te,Ie,Fe,Le,Re,Oe,Me,Ae,De,qe,$e,Ne,He,je,Ue,Ve,ze,Be,We,Ge,Ze,Ye,Qe={exports:{}};function Xe(){return Ce?Pe:(Ce=1,Pe=!1)}function Je(){if(Ie)return Te;Ie=1;var e=i(),t=Object.defineProperty;return Te=function(n,r){try{t(e,n,{value:r,configurable:!0,writable:!0})}catch(t){e[n]=r}return r}}function Ke(){if(Fe)return Qe.exports;Fe=1;var e=Xe(),t=i(),n=Je(),r="__core-js_shared__",o=Qe.exports=t[r]||n(r,{});return(o.versions||(o.versions=[])).push({version:"3.38.1",mode:e?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"}),Qe.exports}function et(){if(Re)return Le;Re=1;var e=Ke();return Le=function(t,n){return e[t]||(e[t]=n||{})}}function tt(){if(Me)return Oe;Me=1;var e=fe(),t=Object;return Oe=function(n){return t(e(n))}}function nt(){if(De)return Ae;De=1;var e=le(),t=tt(),n=e({}.hasOwnProperty);return Ae=Object.hasOwn||function(e,r){return n(t(e),r)}}function rt(){if($e)return qe;$e=1;var e=le(),t=0,n=Math.random(),r=e(1..toString);return qe=function(e){return"Symbol("+(void 0===e?"":e)+")_"+r(++t+n,36)}}function it(){if(He)return Ne;He=1;var e=i(),t=et(),n=nt(),r=rt(),o=ye(),s=be(),a=e.Symbol,u=t("wks"),l=s?a.for||a:a&&a.withoutSetter||r;return Ne=function(e){return n(u,e)||(u[e]=o&&n(a,e)?a[e]:l("Symbol."+e)),u[e]}}function ot(){if(Ue)return je;Ue=1;var e=g(),t=he(),n=we(),r=Ee(),i=ke(),o=it(),s=TypeError,a=o("toPrimitive");return je=function(o,u){if(!t(o)||n(o))return o;var l,c=r(o,a);if(c){if(void 0===u&&(u="default"),l=e(c,o,u),!t(l)||n(l))return l;throw new s("Can't convert object to primitive value")}return void 0===u&&(u="number"),i(o,u)}}function st(){if(ze)return Ve;ze=1;var e=ot(),t=we();return Ve=function(n){var r=e(n,"string");return t(r)?r:r+""}}function at(){if(We)return Be;We=1;var e=i(),t=he(),n=e.document,r=t(n)&&t(n.createElement);return Be=function(e){return r?n.createElement(e):{}}}function ut(){if(Ze)return Ge;Ze=1;var e=h(),t=_(),n=at();return Ge=!e&&!t((function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a}))}function lt(){if(Ye)return p;Ye=1;var e=h(),t=g(),n=ae(),r=ue(),i=pe(),o=st(),s=nt(),a=ut(),u=Object.getOwnPropertyDescriptor;return p.f=e?u:function(e,l){if(e=i(e),l=o(l),a)try{return u(e,l)}catch(e){}if(s(e,l))return r(!t(n.f,e,l),e[l])},p}var ct,dt,ft,pt,_t,ht,vt,gt={};function mt(){if(dt)return ct;dt=1;var e=h(),t=_();return ct=e&&t((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))}function yt(){if(pt)return ft;pt=1;var e=he(),t=String,n=TypeError;return ft=function(r){if(e(r))return r;throw new n(t(r)+" is not an object")}}function bt(){if(_t)return gt;_t=1;var e=h(),t=ut(),n=mt(),r=yt(),i=st(),o=TypeError,s=Object.defineProperty,a=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return gt.f=e?n?function(e,t,n){if(r(e),t=i(t),r(n),"function"==typeof e&&"prototype"===t&&"value"in n&&c in n&&!n[c]){var o=a(e,t);o&&o[c]&&(e[t]=n.value,n={configurable:l in n?n[l]:o[l],enumerable:u in n?n[u]:o[u],writable:!1})}return s(e,t,n)}:s:function(e,n,a){if(r(e),n=i(n),r(a),t)try{return s(e,n,a)}catch(e){}if("get"in a||"set"in a)throw new o("Accessors not supported");return"value"in a&&(e[n]=a.value),e},gt}function wt(){if(vt)return ht;vt=1;var e=h(),t=bt(),n=ue();return ht=e?function(e,r,i){return t.f(e,r,n(1,i))}:function(e,t,n){return e[t]=n,e}}var St,xt,Et,kt,Pt,Ct,Tt,It,Ft,Lt,Rt,Ot,Mt,At,Dt,qt={exports:{}};function $t(){if(xt)return St;xt=1;var e=h(),t=nt(),n=Function.prototype,r=e&&Object.getOwnPropertyDescriptor,i=t(n,"name"),o=i&&"something"===function(){}.name,s=i&&(!e||e&&r(n,"name").configurable);return St={EXISTS:i,PROPER:o,CONFIGURABLE:s}}function Nt(){if(kt)return Et;kt=1;var e=le(),t=_e(),n=Ke(),r=e(Function.toString);return t(n.inspectSource)||(n.inspectSource=function(e){return r(e)}),Et=n.inspectSource}function Ht(){if(It)return Tt;It=1;var e=et(),t=rt(),n=e("keys");return Tt=function(e){return n[e]||(n[e]=t(e))}}function jt(){return Lt?Ft:(Lt=1,Ft={})}function Ut(){if(Ot)return Rt;Ot=1;var e,t,n,r=function(){if(Ct)return Pt;Ct=1;var e=i(),t=_e(),n=e.WeakMap;return Pt=t(n)&&/native code/.test(String(n))}(),o=i(),s=he(),a=wt(),u=nt(),l=Ke(),c=Ht(),d=jt(),f="Object already initialized",p=o.TypeError,_=o.WeakMap;if(r||l.state){var h=l.state||(l.state=new _);h.get=h.get,h.has=h.has,h.set=h.set,e=function(e,t){if(h.has(e))throw new p(f);return t.facade=e,h.set(e,t),t},t=function(e){return h.get(e)||{}},n=function(e){return h.has(e)}}else{var v=c("state");d[v]=!0,e=function(e,t){if(u(e,v))throw new p(f);return t.facade=e,a(e,v,t),t},t=function(e){return u(e,v)?e[v]:{}},n=function(e){return u(e,v)}}return Rt={set:e,get:t,has:n,enforce:function(r){return n(r)?t(r):e(r,{})},getterFor:function(e){return function(n){var r;if(!s(n)||(r=t(n)).type!==e)throw new p("Incompatible receiver, "+e+" required");return r}}}}function Vt(){if(Mt)return qt.exports;Mt=1;var e=le(),t=_(),n=_e(),r=nt(),i=h(),o=$t().CONFIGURABLE,s=Nt(),a=Ut(),u=a.enforce,l=a.get,c=String,d=Object.defineProperty,f=e("".slice),p=e("".replace),v=e([].join),g=i&&!t((function(){return 8!==d((function(){}),"length",{value:8}).length})),m=String(String).split("String"),y=qt.exports=function(e,t,n){"Symbol("===f(c(t),0,7)&&(t="["+p(c(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!r(e,"name")||o&&e.name!==t)&&(i?d(e,"name",{value:t,configurable:!0}):e.name=t),g&&n&&r(n,"arity")&&e.length!==n.arity&&d(e,"length",{value:n.arity});try{n&&r(n,"constructor")&&n.constructor?i&&d(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var s=u(e);return r(s,"source")||(s.source=v(m,"string"==typeof t?t:"")),e};return Function.prototype.toString=y((function(){return n(this)&&l(this).source||s(this)}),"toString"),qt.exports}function zt(){if(Dt)return At;Dt=1;var e=_e(),t=bt(),n=Vt(),r=Je();return At=function(i,o,s,a){a||(a={});var u=a.enumerable,l=void 0!==a.name?a.name:o;if(e(s)&&n(s,l,a),a.global)u?i[o]=s:r(o,s);else{try{a.unsafe?i[o]&&(u=!0):delete i[o]}catch(e){}u?i[o]=s:t.f(i,o,{value:s,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return i},At}var Bt,Wt,Gt,Zt,Yt,Qt,Xt,Jt,Kt,en,tn,nn,rn,on,sn,an,un,ln={};function cn(){if(Zt)return Gt;Zt=1;var e=function(){if(Wt)return Bt;Wt=1;var e=Math.ceil,t=Math.floor;return Bt=Math.trunc||function(n){var r=+n;return(r>0?t:e)(r)},Bt}();return Gt=function(t){var n=+t;return n!=n||0===n?0:e(n)}}function dn(){if(Qt)return Yt;Qt=1;var e=cn(),t=Math.max,n=Math.min;return Yt=function(r,i){var o=e(r);return o<0?t(o+i,0):n(o,i)}}function fn(){if(Jt)return Xt;Jt=1;var e=cn(),t=Math.min;return Xt=function(n){var r=e(n);return r>0?t(r,9007199254740991):0}}function pn(){if(en)return Kt;en=1;var e=fn();return Kt=function(t){return e(t.length)}}function _n(){if(on)return rn;on=1;var e=le(),t=nt(),n=pe(),r=function(){if(nn)return tn;nn=1;var e=pe(),t=dn(),n=pn(),r=function(r){return function(i,o,s){var a=e(i),u=n(a);if(0===u)return!r&&-1;var l,c=t(s,u);if(r&&o!=o){for(;u>c;)if((l=a[c++])!=l)return!0}else for(;u>c;c++)if((r||c in a)&&a[c]===o)return r||c||0;return!r&&-1}};return tn={includes:r(!0),indexOf:r(!1)}}().indexOf,i=jt(),o=e([].push);return rn=function(e,s){var a,u=n(e),l=0,c=[];for(a in u)!t(i,a)&&t(u,a)&&o(c,a);for(;s.length>l;)t(u,a=s[l++])&&(~r(c,a)||o(c,a));return c},rn}function hn(){return an?sn:(an=1,sn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}var vn,gn,mn,yn,bn,wn,Sn,xn,En,kn,Pn,Cn,Tn,In,Fn,Ln,Rn,On,Mn,An,Dn,qn,$n,Nn,Hn,jn,Un,Vn,zn,Bn={};function Wn(){if(mn)return gn;mn=1;var e=ve(),t=le(),n=function(){if(un)return ln;un=1;var e=_n(),t=hn().concat("length","prototype");return ln.f=Object.getOwnPropertyNames||function(n){return e(n,t)},ln}(),r=(vn||(vn=1,Bn.f=Object.getOwnPropertySymbols),Bn),i=yt(),o=t([].concat);return gn=e("Reflect","ownKeys")||function(e){var t=n.f(i(e)),s=r.f;return s?o(t,s(e)):t}}function Gn(){if(bn)return yn;bn=1;var e=nt(),t=Wn(),n=lt(),r=bt();return yn=function(i,o,s){for(var a=t(o),u=r.f,l=n.f,c=0;c<a.length;c++){var d=a[c];e(i,d)||s&&e(s,d)||u(i,d,l(o,d))}},yn}function Zn(){if(En)return xn;En=1;var e=i(),t=lt().f,n=wt(),r=zt(),o=Je(),s=Gn(),a=function(){if(Sn)return wn;Sn=1;var e=_(),t=_e(),n=/#|\.prototype\./,r=function(n,r){var u=o[i(n)];return u===a||u!==s&&(t(r)?e(r):!!r)},i=r.normalize=function(e){return String(e).replace(n,".").toLowerCase()},o=r.data={},s=r.NATIVE="N",a=r.POLYFILL="P";return wn=r}();return xn=function(i,u){var l,c,d,f,p,_=i.target,h=i.global,v=i.stat;if(l=h?e:v?e[_]||o(_,{}):e[_]&&e[_].prototype)for(c in u){if(f=u[c],d=i.dontCallGetSet?(p=t(l,c))&&p.value:l[c],!a(h?c:_+(v?".":"#")+c,i.forced)&&void 0!==d){if(typeof f==typeof d)continue;s(f,d)}(i.sham||d&&d.sham)&&n(f,"sham",!0),r(l,c,f,i)}}}function Yn(){if(Tn)return Cn;Tn=1;var e=nt(),t=_e(),n=tt(),r=Ht(),i=function(){if(Pn)return kn;Pn=1;var e=_();return kn=!e((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),kn}(),o=r("IE_PROTO"),s=Object,a=s.prototype;return Cn=i?s.getPrototypeOf:function(r){var i=n(r);if(e(i,o))return i[o];var u=i.constructor;return t(u)&&i instanceof u?u.prototype:i instanceof s?a:null},Cn}function Qn(){if(Fn)return In;Fn=1;var e=_n(),t=hn();return In=Object.keys||function(n){return e(n,t)},In}function Xn(){if(On)return r;On=1;var $=Zn(),e=function(){if(Rn)return Ln;Rn=1;var e=h(),t=_(),n=le(),r=Yn(),i=Qn(),o=pe(),s=n(ae().f),a=n([].push),u=e&&t((function(){var e=Object.create(null);return e[2]=2,!s(e,2)})),l=function(t){return function(n){for(var l,c=o(n),d=i(c),f=u&&null===r(c),p=d.length,_=0,h=[];p>_;)l=d[_++],e&&!(f?l in c:s(c,l))||a(h,t?[l,c[l]]:c[l]);return h}};return Ln={entries:l(!0),values:l(!1)}}().entries;return $({target:"Object",stat:!0},{entries:function(t){return e(t)}}),r}function Jn(){if(An)return Mn;An=1;var e=i();return Mn=e}function Kn(){if(Nn)return $n;Nn=1;var e=function(){if(qn)return Dn;qn=1,Xn();var e=Jn();return Dn=e.Object.entries}();return $n=e}function er(){if(Vn)return Un;Vn=1;var e=function(){if(jn)return Hn;jn=1;var e=Kn();return Hn=e}();return Un=e}zn||(zn=1,er());var tr,nr,rr,ir,or,sr,ar,ur,lr,cr,dr,fr,pr,_r,hr,vr,gr,mr,yr,br,wr,Sr,xr,Er,kr,Pr,Cr,Tr,Ir,Fr={};function Lr(){if(rr)return nr;rr=1;var e=ve();return nr=e("document","documentElement")}function Rr(){if(or)return ir;or=1;var e,t=yt(),n=function(){if(tr)return Fr;tr=1;var e=h(),t=mt(),n=bt(),r=yt(),i=pe(),o=Qn();return Fr.f=e&&!t?Object.defineProperties:function(e,t){r(e);for(var s,a=i(t),u=o(t),l=u.length,c=0;l>c;)n.f(e,s=u[c++],a[s]);return e},Fr}(),r=hn(),i=jt(),o=Lr(),s=at(),a=Ht(),u="prototype",l="script",c=a("IE_PROTO"),d=function(){},f=function(e){return"<"+l+">"+e+"</"+l+">"},p=function(e){e.write(f("")),e.close();var t=e.parentWindow.Object;return e=null,t},_=function(){try{e=new ActiveXObject("htmlfile")}catch(e){}var t,n,i;_="undefined"!=typeof document?document.domain&&e?p(e):(n=s("iframe"),i="java"+l+":",n.style.display="none",o.appendChild(n),n.src=String(i),(t=n.contentWindow.document).open(),t.write(f("document.F=Object")),t.close(),t.F):p(e);for(var a=r.length;a--;)delete _[u][r[a]];return _()};return i[c]=!0,ir=Object.create||function(e,r){var i;return null!==e?(d[u]=t(e),i=new d,d[u]=null,i[c]=e):i=_(),void 0===r?i:n.f(i,r)},ir}function Or(){if(ar)return sr;ar=1;var e=it(),t=Rr(),n=bt().f,r=e("unscopables"),i=Array.prototype;return void 0===i[r]&&n(i,r,{configurable:!0,value:t(null)}),sr=function(e){i[r][e]=!0}}function Mr(){return lr?ur:(lr=1,ur={})}function Ar(){if(dr)return cr;dr=1;var e,t,n,r=_(),i=_e(),o=he(),s=Rr(),a=Yn(),u=zt(),l=it(),c=Xe(),d=l("iterator"),f=!1;return[].keys&&("next"in(n=[].keys())?(t=a(a(n)))!==Object.prototype&&(e=t):f=!0),!o(e)||r((function(){var t={};return e[d].call(t)!==t}))?e={}:c&&(e=s(e)),i(e[d])||u(e,d,(function(){return this})),cr={IteratorPrototype:e,BUGGY_SAFARI_ITERATORS:f}}function Dr(){if(pr)return fr;pr=1;var e=bt().f,t=nt(),n=it()("toStringTag");return fr=function(r,i,o){r&&!o&&(r=r.prototype),r&&!t(r,n)&&e(r,n,{configurable:!0,value:i})}}function qr(){if(yr)return mr;yr=1;var e=he();return mr=function(t){return e(t)||null===t}}function $r(){if(wr)return br;wr=1;var e=qr(),t=String,n=TypeError;return br=function(r){if(e(r))return r;throw new n("Can't set "+t(r)+" as a prototype")}}function Nr(){if(xr)return Sr;xr=1;var e=function(){if(gr)return vr;gr=1;var e=le(),t=xe();return vr=function(n,r,i){try{return e(t(Object.getOwnPropertyDescriptor(n,r)[i]))}catch(e){}}}(),t=he(),n=fe(),r=$r();return Sr=Object.setPrototypeOf||("__proto__"in{}?function(){var i,o=!1,s={};try{(i=e(Object.prototype,"__proto__","set"))(s,[]),o=s instanceof Array}catch(e){}return function(e,s){return n(e),r(s),t(e)?(o?i(e,s):e.__proto__=s,e):e}}():void 0),Sr}function Hr(){if(kr)return Er;kr=1;var $=Zn(),e=g(),t=Xe(),n=$t(),r=_e(),i=function(){if(hr)return _r;hr=1;var e=Ar().IteratorPrototype,t=Rr(),n=ue(),r=Dr(),i=Mr(),o=function(){return this};return _r=function(s,a,u,l){var c=a+" Iterator";return s.prototype=t(e,{next:n(+!l,u)}),r(s,c,!1,!0),i[c]=o,s},_r}(),o=Yn(),s=Nr(),a=Dr(),u=wt(),l=zt(),c=it(),d=Mr(),f=Ar(),p=n.PROPER,_=n.CONFIGURABLE,h=f.IteratorPrototype,v=f.BUGGY_SAFARI_ITERATORS,m=c("iterator"),y="keys",b="values",w="entries",S=function(){return this};return Er=function(n,c,f,g,x,E,k){i(f,c,g);var P,C,T,I=function(e){if(e===x&&M)return M;if(!v&&e&&e in R)return R[e];switch(e){case y:case b:case w:return function(){return new f(this,e)}}return function(){return new f(this)}},F=c+" Iterator",L=!1,R=n.prototype,O=R[m]||R["@@iterator"]||x&&R[x],M=!v&&O||I(x),A="Array"===c&&R.entries||O;if(A&&(P=o(A.call(new n)))!==Object.prototype&&P.next&&(t||o(P)===h||(s?s(P,h):r(P[m])||l(P,m,S)),a(P,F,!0,!0),t&&(d[F]=S)),p&&x===b&&O&&O.name!==b&&(!t&&_?u(R,"name",b):(L=!0,M=function(){return e(O,this)})),x)if(C={values:I(b),keys:E?M:I(y),entries:I(w)},k)for(T in C)(v||L||!(T in R))&&l(R,T,C[T]);else $({target:c,proto:!0,forced:v||L},C);return t&&!k||R[m]===M||l(R,m,M,{name:x}),d[c]=M,C},Er}function jr(){return Cr?Pr:(Cr=1,Pr=function(e,t){return{value:e,done:t}})}function Ur(){if(Ir)return Tr;Ir=1;var e=pe(),t=Or(),n=Mr(),r=Ut(),i=bt().f,o=Hr(),s=jr(),a=Xe(),u=h(),l="Array Iterator",c=r.set,d=r.getterFor(l);Tr=o(Array,"Array",(function(t,n){c(this,{type:l,target:e(t),index:0,kind:n})}),(function(){var e=d(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,s(void 0,!0);switch(e.kind){case"keys":return s(n,!1);case"values":return s(t[n],!1)}return s([n,t[n]],!1)}),"values");var f=n.Arguments=n.Array;if(t("keys"),t("values"),t("entries"),!a&&u&&"values"!==f.name)try{i(f,"name",{value:"values"})}catch(e){}return Tr}var Vr,zr,Br,Wr,Gr,Zr,Yr,Qr,Xr,Jr,Kr,ei,ti,ni,ri,ii,oi,si,ai,ui,li,ci,di,fi={};function pi(){if(Wr)return Br;Wr=1;var e=function(){if(zr)return Vr;zr=1;var e=ce(),t=le();return Vr=function(n){if("Function"===e(n))return t(n)}}(),t=xe(),n=v(),r=e(e.bind);return Br=function(e,i){return t(e),void 0===i?e:n?r(e,i):function(){return e.apply(i,arguments)}},Br}function _i(){if(Zr)return Gr;Zr=1;var e=it(),t=Mr(),n=e("iterator"),r=Array.prototype;return Gr=function(e){return void 0!==e&&(t.Array===e||r[n]===e)}}function hi(){if(Jr)return Xr;Jr=1;var e=function(){if(Qr)return Yr;Qr=1;var e={};return e[it()("toStringTag")]="z",Yr="[object z]"===String(e)}(),t=_e(),n=ce(),r=it()("toStringTag"),i=Object,o="Arguments"===n(function(){return arguments}());return Xr=e?n:function(e){var s,a,u;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(a=function(e,t){try{return e[t]}catch(e){}}(s=i(e),r))?a:o?n(s):"Object"===(u=n(s))&&t(s.callee)?"Arguments":u},Xr}function vi(){if(ei)return Kr;ei=1;var e=hi(),t=Ee(),n=de(),r=Mr(),i=it()("iterator");return Kr=function(o){if(!n(o))return t(o,i)||t(o,"@@iterator")||r[e(o)]}}function gi(){if(ni)return ti;ni=1;var e=g(),t=xe(),n=yt(),r=Se(),i=vi(),o=TypeError;return ti=function(s,a){var u=arguments.length<2?i(s):a;if(t(u))return n(e(u,s));throw new o(r(s)+" is not iterable")},ti}function mi(){if(ii)return ri;ii=1;var e=g(),t=yt(),n=Ee();return ri=function(r,i,o){var s,a;t(r);try{if(!(s=n(r,"return"))){if("throw"===i)throw o;return o}s=e(s,r)}catch(e){a=!0,s=e}if("throw"===i)throw o;if(a)throw s;return t(s),o}}function yi(){if(si)return oi;si=1;var e=pi(),t=g(),n=yt(),r=Se(),i=_i(),o=pn(),s=ge(),a=gi(),u=vi(),l=mi(),c=TypeError,d=function(e,t){this.stopped=e,this.result=t},f=d.prototype;return oi=function(p,_,h){var v,g,m,y,b,w,S,x=h&&h.that,E=!(!h||!h.AS_ENTRIES),k=!(!h||!h.IS_RECORD),P=!(!h||!h.IS_ITERATOR),C=!(!h||!h.INTERRUPTED),T=e(_,x),I=function(e){return v&&l(v,"normal",e),new d(!0,e)},F=function(e){return E?(n(e),C?T(e[0],e[1],I):T(e[0],e[1])):C?T(e,I):T(e)};if(k)v=p.iterator;else if(P)v=p;else{if(!(g=u(p)))throw new c(r(p)+" is not iterable");if(i(g)){for(m=0,y=o(p);y>m;m++)if((b=F(p[m]))&&s(f,b))return b;return new d(!1)}v=a(p,g)}for(w=k?p.next:v.next;!(S=t(w,v)).done;){try{b=F(S.value)}catch(e){l(v,"throw",e)}if("object"==typeof b&&b&&s(f,b))return b}return new d(!1)}}function bi(){if(ui)return ai;ui=1;var e=h(),t=bt(),n=ue();return ai=function(r,i,o){e?t.f(r,i,n(0,o)):r[i]=o}}function wi(){if(di)return ci;di=1,Ur(),function(){if(li)return fi;li=1;var $=Zn(),e=yi(),t=bi();$({target:"Object",stat:!0},{fromEntries:function(n){var r={};return e(n,(function(e,n){t(r,e,n)}),{AS_ENTRIES:!0}),r}})}();var e=Jn();return ci=e.Object.fromEntries}var Si,xi,Ei,ki,Pi,Ci,Ti,Ii,Fi,Li,Ri,Oi,Mi={};function Ai(){if(Pi)return Mi;Pi=1;var e=i(),t=xi?Si:(xi=1,Si={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),n=function(){if(ki)return Ei;ki=1;var e=at()("span").classList,t=e&&e.constructor&&e.constructor.prototype;return Ei=t===Object.prototype?void 0:t}(),r=Ur(),o=wt(),s=Dr(),a=it()("iterator"),u=r.values,l=function(e,n){if(e){if(e[a]!==u)try{o(e,a,u)}catch(t){e[a]=u}if(s(e,n,!0),t[n])for(var i in r)if(e[i]!==r[i])try{o(e,i,r[i])}catch(t){e[i]=r[i]}}};for(var c in t)l(e[c]&&e[c].prototype,c);return l(n,"DOMTokenList"),Mi}function Di(){if(Fi)return Ii;Fi=1;var e=function(){if(Ti)return Ci;Ti=1;var e=wi();return Ai(),Ci=e}();return Ii=e}function qi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function $i(e,t,n,r,i,o,s){try{var a=e[o](s),u=a.value}catch(e){return void n(e)}a.done?t(u):Promise.resolve(u).then(r,i)}function Ni(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){$i(o,r,i,s,a,"next",e)}function a(e){$i(o,r,i,s,a,"throw",e)}s(void 0)}))}}function Hi(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Wi(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ji(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return qi(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qi(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ui(){return Ui=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ui.apply(null,arguments)}function Vi(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}function zi(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var u=r&&r.prototype instanceof a?r:a,l=Object.create(u.prototype);return Bi(l,"_invoke",function(n,r,i){var o,a,u,l=0,c=i||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return o=t,a=0,u=e,f.n=n,s}};function p(n,r){for(a=n,u=r,t=0;!d&&l&&!i&&t<c.length;t++){var i,o=c[t],p=f.p,_=o[2];n>3?(i=_===r)&&(u=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=e):o[0]<=p&&((i=n<2&&p<o[1])?(a=0,f.v=r,f.n=o[1]):p<_&&(i=n<3||o[0]>r||r>_)&&(o[4]=n,o[5]=r,f.n=_,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,_){if(l>1)throw TypeError("Generator is already running");for(d&&1===c&&p(c,_),a=c,u=_;(t=a<2?e:u)||!d;){o||(a?a<3?(a>1&&(f.n=-1),p(a,u)):f.n=u:f.v=u);try{if(l=2,o){if(a||(i="next"),t=o[i]){if(!(t=t.call(o,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,a<2&&(a=0)}else 1===a&&(t=o.return)&&t.call(o),a<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=e}else if((t=(d=f.n<0)?u:n.call(r,f))!==s)break}catch(t){o=e,a=1,u=t}finally{l=1}}return{value:t,done:d}}}(n,i,o),!0),l}var s={};function a(){}function u(){}function l(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(Bi(t={},r,(function(){return this})),t),d=l.prototype=a.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,Bi(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return u.prototype=l,Bi(d,"constructor",l),Bi(l,"constructor",u),u.displayName="GeneratorFunction",Bi(l,i,"GeneratorFunction"),Bi(d),Bi(d,i,"Generator"),Bi(d,r,(function(){return this})),Bi(d,"toString",(function(){return"[object Generator]"})),(zi=function(){return{w:o,m:f}})()}function Bi(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}Bi=function(e,t,n,r){function o(t,n){Bi(e,t,(function(e){return this._invoke(t,n,e)}))}t?i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(o("next",0),o("throw",1),o("return",2))},Bi(e,t,n,r)}function Wi(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}Oi||(Oi=1,function(){if(Ri)return Li;Ri=1;var e=Di();Li=e}());var Gi,Zi,Yi,Qi,Xi,Ji,Ki,eo,to={},no=[],ro=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,io=Array.isArray;function oo(e,t){for(var n in t)e[n]=t[n];return e}function so(e){var t=e.parentNode;t&&t.removeChild(e)}function ao(e,t,n){var r,i,o,s={};for(o in t)"key"==o?r=t[o]:"ref"==o?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?Gi.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===s[o]&&(s[o]=e.defaultProps[o]);return uo(e,s,r,i,null)}function uo(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==i?++Yi:i,__i:-1,__u:0};return null==i&&null!=Zi.vnode&&Zi.vnode(o),o}function lo(e){return e.children}function co(e,t){this.props=e,this.context=t}function fo(e,t){if(null==t)return e.__?fo(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?fo(e):null}function po(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return po(e)}}function _o(e){(!e.__d&&(e.__d=!0)&&Qi.push(e)&&!ho.__r++||Xi!==Zi.debounceRendering)&&((Xi=Zi.debounceRendering)||Ji)(ho)}function ho(){var e,t,n,r,i,o,s,a,u;for(Qi.sort(Ki);e=Qi.shift();)e.__d&&(t=Qi.length,r=void 0,o=(i=(n=e).__v).__e,a=[],u=[],(s=n.__P)&&((r=oo({},i)).__v=i.__v+1,Zi.vnode&&Zi.vnode(r),xo(s,r,i,n.__n,void 0!==s.ownerSVGElement,32&i.__u?[o]:null,a,null==o?fo(i):o,!!(32&i.__u),u),r.__.__k[r.__i]=r,Eo(a,r,u),r.__e!=o&&po(r)),Qi.length>t&&Qi.sort(Ki));ho.__r=0}function vo(e,t,n,r,i,o,s,a,u,l,c){var d,f,p,_,h,v=r&&r.__k||no,g=t.length;for(n.__d=u,function(e,t,n){var r,i,o,s,a,u=t.length,l=n.length,c=l,d=0;for(e.__k=[],r=0;r<u;r++)null!=(i=e.__k[r]=null==(i=t[r])||"boolean"==typeof i||"function"==typeof i?null:"string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?uo(null,i,null,null,i):io(i)?uo(lo,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?uo(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=e,i.__b=e.__b+1,a=mo(i,n,s=r+d,c),i.__i=a,o=null,-1!==a&&(c--,(o=n[a])&&(o.__u|=131072)),null==o||null===o.__v?(-1==a&&d--,"function"!=typeof i.type&&(i.__u|=65536)):a!==s&&(a===s+1?d++:a>s?c>u-s?d+=a-s:d--:d=a<s&&a==s-1?a-s:0,a!==r+d&&(i.__u|=65536))):(o=n[r])&&null==o.key&&o.__e&&(o.__e==e.__d&&(e.__d=fo(o)),Co(o,o,!1),n[r]=null,c--);if(c)for(r=0;r<l;r++)null!=(o=n[r])&&0==(131072&o.__u)&&(o.__e==e.__d&&(e.__d=fo(o)),Co(o,o))}(n,t,v),u=n.__d,d=0;d<g;d++)null!=(p=n.__k[d])&&"boolean"!=typeof p&&"function"!=typeof p&&(f=-1===p.__i?to:v[p.__i]||to,p.__i=d,xo(e,p,f,i,o,s,a,u,l,c),_=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&Po(f.ref,null,p),c.push(p.ref,p.__c||_,p)),null==h&&null!=_&&(h=_),65536&p.__u||f.__k===p.__k?u=go(p,u,e):"function"==typeof p.type&&void 0!==p.__d?u=p.__d:_&&(u=_.nextSibling),p.__d=void 0,p.__u&=-196609);n.__d=u,n.__e=h}function go(e,t,n){var r,i;if("function"==typeof e.type){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,t=go(r[i],t,n));return t}return e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e),t&&t.nextSibling}function mo(e,t,n,r){var i=e.key,o=e.type,s=n-1,a=n+1,u=t[n];if(null===u||u&&i==u.key&&o===u.type)return n;if(r>(null!=u&&0==(131072&u.__u)?1:0))for(;s>=0||a<t.length;){if(s>=0){if((u=t[s])&&0==(131072&u.__u)&&i==u.key&&o===u.type)return s;s--}if(a<t.length){if((u=t[a])&&0==(131072&u.__u)&&i==u.key&&o===u.type)return a;a++}}return-1}function yo(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||ro.test(t)?n:n+"px"}function bo(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||yo(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||yo(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/(PointerCapture)$|Capture$/,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,o?So:wo,o)):e.removeEventListener(t,o?So:wo,o);else{if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&"rowSpan"!==t&&"colSpan"!==t&&"role"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function wo(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(Zi.event?Zi.event(e):e)}function So(e){return this.l[e.type+!0](Zi.event?Zi.event(e):e)}function xo(e,t,n,r,i,o,s,a,u,l){var c,d,f,p,_,h,v,g,m,y,b,$,w,S,x,E=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(u=!!(32&n.__u),o=[a=t.__e=n.__e]),(c=Zi.__b)&&c(t);e:if("function"==typeof E)try{if(g=t.props,m=(c=E.contextType)&&r[c.__c],y=c?m?m.props.value:c.__:r,n.__c?v=(d=t.__c=n.__c).__=d.__E:("prototype"in E&&E.prototype.render?t.__c=d=new E(g,y):(t.__c=d=new co(g,y),d.constructor=E,d.render=To),m&&m.sub(d),d.props=g,d.state||(d.state={}),d.context=y,d.__n=r,f=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=E.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=oo({},d.__s)),oo(d.__s,E.getDerivedStateFromProps(g,d.__s))),p=d.props,_=d.state,d.__v=t,f)null==E.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==E.getDerivedStateFromProps&&g!==p&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(g,y),!d.__e&&(null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(g,d.__s,y)||t.__v===n.__v)){for(t.__v!==n.__v&&(d.props=g,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),b=0;b<d._sb.length;b++)d.__h.push(d._sb[b]);d._sb=[],d.__h.length&&s.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(g,d.__s,y),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(p,_,h)}))}if(d.context=y,d.props=g,d.__P=e,d.__e=!1,$=Zi.__r,w=0,"prototype"in E&&E.prototype.render){for(d.state=d.__s,d.__d=!1,$&&$(t),c=d.render(d.props,d.state,d.context),S=0;S<d._sb.length;S++)d.__h.push(d._sb[S]);d._sb=[]}else do{d.__d=!1,$&&$(t),c=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++w<25);d.state=d.__s,null!=d.getChildContext&&(r=oo(oo({},r),d.getChildContext())),f||null==d.getSnapshotBeforeUpdate||(h=d.getSnapshotBeforeUpdate(p,_)),vo(e,io(x=null!=c&&c.type===lo&&null==c.key?c.props.children:c)?x:[x],t,n,r,i,o,s,a,u,l),d.base=t.__e,t.__u&=-161,d.__h.length&&s.push(d),v&&(d.__E=d.__=null)}catch(e){t.__v=null,u||null!=o?(t.__e=a,t.__u|=u?160:32,o[o.indexOf(a)]=null):(t.__e=n.__e,t.__k=n.__k),Zi.__e(e,t,n)}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=ko(n.__e,t,n,r,i,o,s,u,l);(c=Zi.diffed)&&c(t)}function Eo(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)Po(n[r],n[++r],n[++r]);Zi.__c&&Zi.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){Zi.__e(e,t.__v)}}))}function ko(e,t,n,r,i,o,s,a,u){var l,c,d,f,p,_,h,v=n.props,g=t.props,m=t.type;if("svg"===m&&(i=!0),null!=o)for(l=0;l<o.length;l++)if((p=o[l])&&"setAttribute"in p==!!m&&(m?p.localName===m:3===p.nodeType)){e=p,o[l]=null;break}if(null==e){if(null===m)return document.createTextNode(g);e=i?document.createElementNS("http://www.w3.org/2000/svg",m):document.createElement(m,g.is&&g),o=null,a=!1}if(null===m)v===g||a&&e.data===g||(e.data=g);else{if(o=o&&Gi.call(e.childNodes),v=n.props||to,!a&&null!=o)for(v={},l=0;l<e.attributes.length;l++)v[(p=e.attributes[l]).name]=p.value;for(l in v)p=v[l],"children"==l||("dangerouslySetInnerHTML"==l?d=p:"key"===l||l in g||bo(e,l,null,p,i));for(l in g)p=g[l],"children"==l?f=p:"dangerouslySetInnerHTML"==l?c=p:"value"==l?_=p:"checked"==l?h=p:"key"===l||a&&"function"!=typeof p||v[l]===p||bo(e,l,p,v[l],i);if(c)a||d&&(c.__html===d.__html||c.__html===e.innerHTML)||(e.innerHTML=c.__html),t.__k=[];else if(d&&(e.innerHTML=""),vo(e,io(f)?f:[f],t,n,r,i&&"foreignObject"!==m,o,s,o?o[0]:n.__k&&fo(n,0),a,u),null!=o)for(l=o.length;l--;)null!=o[l]&&so(o[l]);a||(l="value",void 0!==_&&(_!==e[l]||"progress"===m&&!_||"option"===m&&_!==v[l])&&bo(e,l,_,v[l],!1),l="checked",void 0!==h&&h!==e[l]&&bo(e,l,h,v[l],!1))}return e}function Po(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){Zi.__e(e,n)}}function Co(e,t,n){var r,i;if(Zi.unmount&&Zi.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Po(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){Zi.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Co(r[i],t,n||"function"!=typeof e.type);n||null==e.__e||so(e.__e),e.__=e.__e=e.__d=void 0}function To(e,t,n){return this.constructor(e,n)}function Io(e,t,n){var r,i,o;Zi.__&&Zi.__(e,t),r=!1?null:t.__k,i=[],o=[],xo(t,e=t.__k=ao(lo,null,[e]),r||to,to,void 0!==t.ownerSVGElement,r?null:t.firstChild?Gi.call(t.childNodes):null,i,r?r.__e:t.firstChild,false,o),Eo(i,e,o)}function Fo(e,t,n){var r,i,o,s,a=oo({},e.props);for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)"key"==o?r=t[o]:"ref"==o?i=t[o]:a[o]=void 0===t[o]&&void 0!==s?s[o]:t[o];return arguments.length>2&&(a.children=arguments.length>3?Gi.call(arguments,2):n),uo(e.type,a,r||e.key,i||e.ref,null)}Gi=no.slice,Zi={__e:function(e,t,n,r){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(t){e=t}throw e}},Yi=0,co.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=oo({},this.state),"function"==typeof e&&(e=e(oo({},n),this.props)),e&&oo(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),_o(this))},co.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),_o(this))},co.prototype.render=lo,Qi=[],Ji="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ki=function(e,t){return e.__v.__b-t.__v.__b},ho.__r=0,eo=0;var Lo,Ro,Oo,Mo,Ao=0,Do=[],qo=[],$o=Zi.__b,No=Zi.__r,Ho=Zi.diffed,jo=Zi.__c,Uo=Zi.unmount;function Vo(e,t){Zi.__h&&Zi.__h(Ro,e,Ao||t),Ao=0;var n=Ro.__H||(Ro.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:qo}),n.__[e]}function zo(e){return Ao=1,function(e,t,n){var r=Vo(Lo++,2);if(r.t=e,!r.__c&&(r.__=[ts(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=Ro,!Ro.u)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter((function(e){return e.__c}));if(i.every((function(e){return!e.__N})))return!o||o.call(this,e,t,n);var s=!1;return i.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(s=!0)}})),!(!s&&r.__c.props===e)&&(!o||o.call(this,e,t,n))};Ro.u=!0;var o=Ro.shouldComponentUpdate,s=Ro.componentWillUpdate;Ro.componentWillUpdate=function(e,t,n){if(this.__e){var r=o;o=void 0,i(e,t,n),o=r}s&&s.call(this,e,t,n)},Ro.shouldComponentUpdate=i}return r.__N||r.__}(ts,e)}function Bo(e,t){var n=Vo(Lo++,3);!Zi.__s&&es(n.__H,t)&&(n.__=e,n.i=t,Ro.__H.__h.push(n))}function Wo(e){return Ao=5,Go((function(){return{current:e}}),[])}function Go(e,t){var n=Vo(Lo++,7);return es(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function Zo(e){var t=Ro.context[e.__c],n=Vo(Lo++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(Ro)),t.props.value):e.__}function Yo(){for(var e;e=Do.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Jo),e.__H.__h.forEach(Ko),e.__H.__h=[]}catch(t){e.__H.__h=[],Zi.__e(t,e.__v)}}Zi.__b=function(e){Ro=null,$o&&$o(e)},Zi.__r=function(e){No&&No(e),Lo=0;var t=(Ro=e.__c).__H;t&&(Oo===Ro?(t.__h=[],Ro.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=qo,e.__N=e.i=void 0}))):(t.__h.forEach(Jo),t.__h.forEach(Ko),t.__h=[],Lo=0)),Oo=Ro},Zi.diffed=function(e){Ho&&Ho(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==Do.push(t)&&Mo===Zi.requestAnimationFrame||((Mo=Zi.requestAnimationFrame)||Xo)(Yo)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==qo&&(e.__=e.__V),e.i=void 0,e.__V=qo}))),Oo=Ro=null},Zi.__c=function(e,t){t.some((function(e){try{e.__h.forEach(Jo),e.__h=e.__h.filter((function(e){return!e.__||Ko(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],Zi.__e(n,e.__v)}})),jo&&jo(e,t)},Zi.unmount=function(e){Uo&&Uo(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{Jo(e)}catch(e){t=e}})),n.__H=void 0,t&&Zi.__e(t,n.__v))};var Qo="function"==typeof requestAnimationFrame;function Xo(e){var t,n=function(){clearTimeout(r),Qo&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Qo&&(t=requestAnimationFrame(n))}function Jo(e){var t=Ro,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),Ro=t}function Ko(e){var t=Ro;e.__c=e.__(),Ro=t}function es(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function ts(e,t){return"function"==typeof t?t(e):t}var ns=function(e){return e.Activation="events",e.Cancellation="cancelEvents",e}({}),rs=function(e){return e.Button="button",e.Tab="tab",e.Selector="selector",e}({}),is=function(e){return e.TopLeft="top_left",e.TopRight="top_right",e.TopCenter="top_center",e.MiddleLeft="middle_left",e.MiddleRight="middle_right",e.MiddleCenter="middle_center",e.Left="left",e.Center="center",e.Right="right",e.NextToTrigger="next_to_trigger",e}({}),os=function(e){return e.Top="top",e.Left="left",e.Right="right",e.Bottom="bottom",e}({}),ss=function(e){return e.Popover="popover",e.API="api",e.Widget="widget",e.ExternalSurvey="external_survey",e}({}),as=function(e){return e.Open="open",e.MultipleChoice="multiple_choice",e.SingleChoice="single_choice",e.Rating="rating",e.Link="link",e}({}),us=function(e){return e.NextQuestion="next_question",e.End="end",e.ResponseBased="response_based",e.SpecificQuestion="specific_question",e}({}),ls=function(e){return e.Once="once",e.Recurring="recurring",e.Always="always",e}({}),cs=function(e){return e.SHOWN="survey shown",e.DISMISSED="survey dismissed",e.SENT="survey sent",e}({}),ds=function(e){return e.SURVEY_ID="$survey_id",e.SURVEY_NAME="$survey_name",e.SURVEY_RESPONSE="$survey_response",e.SURVEY_ITERATION="$survey_iteration",e.SURVEY_ITERATION_START_DATE="$survey_iteration_start_date",e.SURVEY_PARTIALLY_COMPLETED="$survey_partially_completed",e.SURVEY_SUBMISSION_ID="$survey_submission_id",e.SURVEY_QUESTIONS="$survey_questions",e.SURVEY_COMPLETED="$survey_completed",e}({}),fs=function(e){return e.Popover="popover",e.Inline="inline",e}({}),ps="undefined"!=typeof window?window:void 0,_s="undefined"!=typeof globalThis?globalThis:ps;"undefined"==typeof self&&(_s.self=_s),"undefined"==typeof File&&(_s.File=function(){});var hs=Array.prototype,vs=hs.forEach,gs=hs.indexOf,ms=null==_s?void 0:_s.navigator,ys=null==_s?void 0:_s.document,bs=null==_s?void 0:_s.location,ws=null==_s?void 0:_s.fetch,Ss=null!=_s&&_s.XMLHttpRequest&&"withCredentials"in new _s.XMLHttpRequest?_s.XMLHttpRequest:void 0,xs=null==_s?void 0:_s.AbortController,Es=null==ms?void 0:ms.userAgent,ks=null!=ps?ps:{},Ps={DEBUG:!1,LIB_VERSION:"1.307.1"},Cs=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],Ts=function(e,t){if(void 0===t&&(t=[]),!e)return!1;var n=e.toLowerCase();return Cs.concat(t).some((function(e){var t=e.toLowerCase();return-1!==n.indexOf(t)}))},Is=["$snapshot","$pageview","$pageleave","$set","survey dismissed","survey sent","survey shown","$identify","$groupidentify","$create_alias","$$client_ingestion_warning","$web_experiment_applied","$feature_enrollment_update","$feature_flag_called"];function Fs(e,t){return-1!==e.indexOf(t)}var Ls=function(e){return e.trim()},Rs=function(e){return e.replace(/^\$/,"")};var Os=Array.isArray,Ms=Object.prototype,As=Ms.hasOwnProperty,Ds=Ms.toString,qs=Os||function(e){return"[object Array]"===Ds.call(e)},$s=function(e){return"function"==typeof e},Ns=function(e){return e===Object(e)&&!qs(e)},Hs=function(e){if(Ns(e)){for(var t in e)if(As.call(e,t))return!1;return!0}return!1},js=function(e){return void 0===e},Us=function(e){return"[object String]"==Ds.call(e)},Vs=function(e){return Us(e)&&0===e.trim().length},zs=function(e){return null===e},Bs=function(e){return js(e)||zs(e)},Ws=function(e){return"[object Number]"==Ds.call(e)},Gs=function(e){return"[object Boolean]"===Ds.call(e)},Zs=function(e){return e instanceof FormData},Ys=function(e){return Fs(Is,e)};function Qs(e){return null===e||"object"!=typeof e}function Xs(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function Js(e){return!js(Event)&&function(e,t){try{return e instanceof t}catch(e){return!1}}(e,Event)}var Ks=[!0,"true",1,"1","yes"],ea=function(e){return Fs(Ks,e)},ta=[!1,"false",0,"0","no"];function na(e,t,n,r,i){return t>n&&(r.warn("min cannot be greater than max."),t=n),Ws(e)?e>n?(r.warn(" cannot be greater than max: "+n+". Using max value instead."),n):e<t?(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: "+n+", fallback: "+i),na(i||n,t,n,r))}var ra,ia,oa,sa=function(){function e(e){this._buckets={},this._onBucketRateLimited=e._onBucketRateLimited,this._bucketSize=na(e.bucketSize,0,100,e._logger),this._refillRate=na(e.refillRate,0,this._bucketSize,e._logger),this._refillInterval=na(e.refillInterval,0,864e5,e._logger)}var t=e.prototype;return t._applyRefill=function(e,t){var n=t-e.lastAccess,r=Math.floor(n/this._refillInterval);if(r>0){var i=r*this._refillRate;e.tokens=Math.min(e.tokens+i,this._bucketSize),e.lastAccess=e.lastAccess+r*this._refillInterval}},t.consumeRateLimit=function(e){var t,n=Date.now(),r=String(e),i=this._buckets[r];return i?this._applyRefill(i,n):(i={tokens:this._bucketSize,lastAccess:n},this._buckets[r]=i),0===i.tokens||(i.tokens--,0===i.tokens&&(null==(t=this._onBucketRateLimited)||t.call(this,e)),0===i.tokens)},t.stop=function(){this._buckets={}},e}(),aa=function(e){return e instanceof Error};function ua(e){var t=globalThis._posthogChunkIds;if(t){var n=Object.keys(t);return oa&&n.length===ia||(ia=n.length,oa=n.reduce((function(n,r){ra||(ra={});var i=ra[r];if(i)n[i[0]]=i[1];else for(var o=e(r),s=o.length-1;s>=0;s--){var a=o[s],u=null==a?void 0:a.filename,l=t[r];if(u&&l){n[u]=l,ra[r]=[u,l];break}}return n}),{})),oa}}var la=function(){function e(e,t,n){void 0===n&&(n=[]),this.coercers=e,this.stackParser=t,this.modifiers=n}var t=e.prototype;return t.buildFromUnknown=function(e,t){void 0===t&&(t={});var n=t&&t.mechanism||{handled:!0,type:"generic"},r=this.buildCoercingContext(n,t,0).apply(e),i=this.buildParsingContext(),o=this.parseStacktrace(r,i);return{$exception_list:this.convertToExceptionList(o,n),$exception_level:"error"}},t.modifyFrames=function(){var e=Ni(zi().m((function e(t){var n,r,i;return zi().w((function(e){for(;;)switch(e.n){case 0:n=ji(t);case 1:if((r=n()).done){e.n=4;break}if(!((i=r.value).stacktrace&&i.stacktrace.frames&&qs(i.stacktrace.frames))){e.n=3;break}return e.n=2,this.applyModifiers(i.stacktrace.frames);case 2:i.stacktrace.frames=e.v;case 3:e.n=1;break;case 4:return e.a(2,t)}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),t.coerceFallback=function(e){var t;return{type:"Error",value:"Unknown error",stack:null==(t=e.syntheticException)?void 0:t.stack,synthetic:!0}},t.parseStacktrace=function(e,t){var n,r;return null!=e.cause&&(n=this.parseStacktrace(e.cause,t)),""!=e.stack&&null!=e.stack&&(r=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?1:0),t.chunkIdMap)),Ui({},e,{cause:n,stack:r})},t.applyChunkIds=function(e,t){return e.map((function(e){return e.filename&&t&&(e.chunk_id=t[e.filename]),e}))},t.applyCoercers=function(e,t){for(var n,r=ji(this.coercers);!(n=r()).done;){var i=n.value;if(i.match(e))return i.coerce(e,t)}return this.coerceFallback(t)},t.applyModifiers=function(){var e=Ni(zi().m((function e(t){var n,r,i,o;return zi().w((function(e){for(;;)switch(e.n){case 0:n=t,r=ji(this.modifiers);case 1:if((i=r()).done){e.n=4;break}return o=i.value,e.n=2,o(n);case 2:n=e.v;case 3:e.n=1;break;case 4:return e.a(2,n)}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),t.convertToExceptionList=function(e,t){var n,r,i,o={type:e.type,value:e.value,mechanism:{type:null!==(n=t.type)&&void 0!==n?n:"generic",handled:null===(r=t.handled)||void 0===r||r,synthetic:null!==(i=e.synthetic)&&void 0!==i&&i}};e.stack&&(o.stacktrace={type:"raw",frames:e.stack});var s=[o];return null!=e.cause&&s.push.apply(s,this.convertToExceptionList(e.cause,Ui({},t,{handled:!0}))),s},t.buildParsingContext=function(){return{chunkIdMap:ua(this.stackParser)}},t.buildCoercingContext=function(e,t,n){var r=this;void 0===n&&(n=0);var i=function(n,i){if(i<=4){var o=r.buildCoercingContext(e,t,i);return r.applyCoercers(n,o)}};return Ui({},t,{syntheticException:0==n?t.syntheticException:void 0,mechanism:e,apply:function(e){return i(e,n)},next:function(e){return i(e,n+1)}})},e}(),ca="?";function da(e,t,n,r,i){var o={platform:e,filename:t,function:"<anonymous>"===n?ca:n,in_app:!0};return js(r)||(o.lineno=r),js(i)||(o.colno=i),o}var fa=function(e,t){var n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:ca,n?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},pa=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,_a=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ha=/\((\S*)(?::(\d+))(?::(\d+))\)/,va=function(e,t){var n=pa.exec(e);if(n){var r=n[1],i=n[2],o=n[3];return da(t,r,ca,+i,+o)}var s=_a.exec(e);if(s){if(s[2]&&0===s[2].indexOf("eval")){var a=ha.exec(s[2]);a&&(s[2]=a[1],s[3]=a[2],s[4]=a[3])}var u=fa(s[1]||ca,s[2]),l=u[0];return da(t,u[1],l,s[3]?+s[3]:void 0,s[4]?+s[4]:void 0)}},ga=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ma=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,ya=function(e,t){var n=ga.exec(e);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){var r=ma.exec(n[3]);r&&(n[1]=n[1]||"eval",n[3]=r[1],n[4]=r[2],n[5]="")}var i=n[3],o=n[1]||ca,s=fa(o,i);return o=s[0],da(t,i=s[1],o,n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}},ba=/\(error: (.*)\)/,wa=50;function Sa(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return function(t,r){void 0===r&&(r=0);for(var i=[],o=t.split("\n"),s=r;s<o.length;s++){var a=o[s];if(!(a.length>1024)){var u=ba.test(a)?a.replace(ba,"$1"):a;if(!u.match(/\S*Error: /)){for(var l=0,c=n;l<c.length;l++){var d=(0,c[l])(u,e);if(d){i.push(d);break}}if(i.length>=wa)break}}}return function(e){if(!e.length)return[];var t=Array.from(e);return t.reverse(),t.slice(0,wa).map((function(e){return Ui({},e,{filename:e.filename||(n=t,n[n.length-1]||{}).filename,function:e.function||ca});var n}))}(i)}}var xa=function(){function e(){}var t=e.prototype;return t.match=function(e){return this.isDOMException(e)||this.isDOMError(e)},t.coerce=function(e,t){var n=Us(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:n?e.stack:void 0,cause:e.cause?t.next(e.cause):void 0,synthetic:!1}},t.getType=function(e){return this.isDOMError(e)?"DOMError":"DOMException"},t.getValue=function(e){var t=e.name||(this.isDOMError(e)?"DOMError":"DOMException");return e.message?t+": "+e.message:t},t.isDOMException=function(e){return Xs(e,"DOMException")},t.isDOMError=function(e){return Xs(e,"DOMError")},e}(),Ea=function(){function e(){}var t=e.prototype;return t.match=function(e){return function(e){return e instanceof Error}(e)},t.coerce=function(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}},t.getType=function(e){return e.name||e.constructor.name},t.getMessage=function(e,t){var n=e.message;return n.error&&"string"==typeof n.error.message?String(n.error.message):String(n)},t.getStack=function(e){return e.stacktrace||e.stack||void 0},e}(),ka=function(){function e(){}var t=e.prototype;return t.match=function(e){return Xs(e,"ErrorEvent")&&null!=e.error},t.coerce=function(e,t){var n,r=t.apply(e.error);return r||{type:"ErrorEvent",value:e.message,stack:null==(n=t.syntheticException)?void 0:n.stack,synthetic:!0}},e}(),Pa=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,Ca=function(){function e(){}var t=e.prototype;return t.match=function(e){return"string"==typeof e},t.coerce=function(e,t){var n,r=this.getInfos(e),i=r[0],o=r[1];return{type:null!=i?i:"Error",value:null!=o?o:e,stack:null==(n=t.syntheticException)?void 0:n.stack,synthetic:!0}},t.getInfos=function(e){var t="Error",n=e,r=e.match(Pa);return r&&(t=r[1],n=r[2]),[t,n]},e}(),Ta=["fatal","error","warning","log","info","debug"];function Ia(e,t){void 0===t&&(t=40);var n=Object.keys(e);if(n.sort(),!n.length)return"[object has no keys]";for(var r=n.length;r>0;r--){var i=n.slice(0,r).join(", ");if(!(i.length>t))return r===n.length||i.length<=t?i:i.slice(0,t)+"..."}return""}var Fa=function(){function e(){}var t=e.prototype;return t.match=function(e){return"object"==typeof e&&null!==e},t.coerce=function(e,t){var n,r=this.getErrorPropertyFromObject(e);return r?t.apply(r):{type:this.getType(e),value:this.getValue(e),stack:null==(n=t.syntheticException)?void 0:n.stack,level:this.isSeverityLevel(e.level)?e.level:"error",synthetic:!0}},t.getType=function(e){return Js(e)?e.constructor.name:"Error"},t.getValue=function(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 n=this.getObjectClassName(e);return(n&&"Object"!==n?"'"+n+"'":"Object")+" captured as exception with keys: "+Ia(e)},t.isSeverityLevel=function(e){return Us(e)&&!Vs(e)&&Ta.indexOf(e)>=0},t.getErrorPropertyFromObject=function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var n=e[t];if(aa(n))return n}},t.getObjectClassName=function(e){try{var t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){return}},e}(),La=function(){function e(){}var t=e.prototype;return t.match=function(e){return Js(e)},t.coerce=function(e,t){var n,r=e.constructor.name;return{type:r,value:r+" captured as exception with keys: "+Ia(e),stack:null==(n=t.syntheticException)?void 0:n.stack,synthetic:!0}},e}(),Ra=function(){function e(){}var t=e.prototype;return t.match=function(e){return Qs(e)},t.coerce=function(e,t){var n;return{type:"Error",value:"Primitive value captured as exception: "+String(e),stack:null==(n=t.syntheticException)?void 0:n.stack,synthetic:!0}},e}(),Oa=function(){function e(){}var t=e.prototype;return t.match=function(e){return Xs(e,"PromiseRejectionEvent")},t.coerce=function(e,t){var n,r=this.getUnhandledRejectionReason(e);return Qs(r)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(r),stack:null==(n=t.syntheticException)?void 0:n.stack,synthetic:!0}:t.apply(r)},t.getUnhandledRejectionReason=function(e){if(Qs(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch(e){}return e},e}(),Ma=function(e,t){var n=(void 0===t?{}:t).debugEnabled,r={_log:function(t){if(ps&&(Ps.DEBUG||ks.POSTHOG_DEBUG||n)&&!js(ps.console)&&ps.console){for(var r=("__rrweb_original__"in ps.console[t]?ps.console[t].__rrweb_original__:ps.console[t]),i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];r.apply(void 0,[e].concat(o))}},info:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r._log.apply(r,["log"].concat(t))},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r._log.apply(r,["warn"].concat(t))},error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r._log.apply(r,["error"].concat(t))},critical:function(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];(t=console).error.apply(t,[e].concat(r))},uninitializedWarning:function(e){r.error("You must initialize PostHog before calling "+e)},createLogger:function(t,n){return Ma(e+" "+t,n)}};return r},Aa=Ma("[PostHog.js]"),Da=Aa.createLogger,qa={};function $a(e,t,n){if(qs(e))if(vs&&e.forEach===vs)e.forEach(t,n);else if("length"in e&&e.length===+e.length)for(var r=0,i=e.length;r<i;r++)if(r in e&&t.call(n,e[r],r)===qa)return}function Na(e,t,n){if(!Bs(e)){if(qs(e))return $a(e,t,n);if(Zs(e))for(var r,i=ji(e.entries());!(r=i()).done;){var o=r.value;if(t.call(n,o[1],o[0])===qa)return}else for(var s in e)if(As.call(e,s)&&t.call(n,e[s],s)===qa)return}}var Ha=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return $a(n,(function(t){for(var n in t)void 0!==t[n]&&(e[n]=t[n])})),e},ja=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return $a(n,(function(t){$a(t,(function(t){e.push(t)}))})),e};function Ua(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r}var Va=function(e){try{return e()}catch(e){return}},za=function(e){return function(){try{for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(this,n)}catch(e){Aa.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),Aa.critical(e)}}},Ba=function(e){var t={};return Na(e,(function(e,n){(Us(e)&&e.length>0||Ws(e))&&(t[n]=e)})),t};function Wa(e,t){return n=e,r=function(e){return Us(e)&&!zs(t)?e.slice(0,t):e},i=new Set,function e(t,n){return t!==Object(t)?r?r(t,n):t:i.has(t)?void 0:(i.add(t),qs(t)?(o=[],$a(t,(function(t){o.push(e(t))}))):(o={},Na(t,(function(t,n){i.has(t)||(o[n]=e(t,n))}))),o);var o}(n);var n,r,i}var Ga=["herokuapp.com","vercel.app","netlify.app"];function Za(e){var t=null==e?void 0:e.hostname;if(!Us(t))return!1;for(var n,r=t.split(".").slice(-2).join("."),i=ji(Ga);!(n=i()).done;){if(r===n.value)return!1}return!0}function Ya(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]}function Qa(e,t,n,r){var i=null!=r?r:{},o=i.capture,s=void 0!==o&&o,a=i.passive,u=void 0===a||a;null==e||e.addEventListener(t,n,{capture:s,passive:u})}var Xa=Da("[Surveys]");function Ja(e){return!(!e.start_date||e.end_date)}function Ka(e){var t;return!(null==(t=e.conditions)||null==(t=t.events)||null==(t=t.values)||!t.length)}function eu(e){var t;return!(null==(t=e.conditions)||null==(t=t.actions)||null==(t=t.values)||!t.length)}var tu="seenSurvey_",nu="inProgressSurvey_",ru=function(e,t){var n="$survey_"+t+"/"+e.id;return e.current_iteration&&e.current_iteration>0&&(n="$survey_"+t+"/"+e.id+"/"+e.current_iteration),n},iu=function(e){var t=""+tu+e.id;return e.current_iteration&&e.current_iteration>0&&(t=""+tu+e.id+"_"+e.current_iteration),t},ou=function(e){localStorage.getItem(iu(e))||localStorage.setItem(iu(e),"true")},su=[ss.Popover,ss.Widget,ss.API],au={ignoreConditions:!1,ignoreDelay:!1,displayType:fs.Popover};Math.trunc||(Math.trunc=function(e){return e<0?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return Ws(e)&&isFinite(e)&&Math.floor(e)===e});var uu="0123456789abcdef",lu=function(){function e(e){if(this.bytes=e,16!==e.length)throw new TypeError("not 128-bit length")}e.fromFieldsV7=function(t,n,r,i){if(!Number.isInteger(t)||!Number.isInteger(n)||!Number.isInteger(r)||!Number.isInteger(i)||t<0||n<0||r<0||i<0||t>0xffffffffffff||n>4095||r>1073741823||i>4294967295)throw new RangeError("invalid field value");var o=new Uint8Array(16);return o[0]=t/Math.pow(2,40),o[1]=t/Math.pow(2,32),o[2]=t/Math.pow(2,24),o[3]=t/Math.pow(2,16),o[4]=t/Math.pow(2,8),o[5]=t,o[6]=112|n>>>8,o[7]=n,o[8]=128|r>>>24,o[9]=r>>>16,o[10]=r>>>8,o[11]=r,o[12]=i>>>24,o[13]=i>>>16,o[14]=i>>>8,o[15]=i,new e(o)};var t=e.prototype;return t.toString=function(){for(var e="",t=0;t<this.bytes.length;t++)e=e+uu.charAt(this.bytes[t]>>>4)+uu.charAt(15&this.bytes[t]),3!==t&&5!==t&&7!==t&&9!==t||(e+="-");if(36!==e.length)throw new Error("Invalid UUIDv7 was generated");return e},t.clone=function(){return new e(this.bytes.slice(0))},t.equals=function(e){return 0===this.compareTo(e)},t.compareTo=function(e){for(var t=0;t<16;t++){var n=this.bytes[t]-e.bytes[t];if(0!==n)return Math.sign(n)}return 0},e}(),cu=function(){function e(){this._timestamp=0,this._counter=0,this._random=new _u}var t=e.prototype;return t.generate=function(){var e=this.generateOrAbort();if(js(e)){this._timestamp=0;var t=this.generateOrAbort();if(js(t))throw new Error("Could not generate UUID after timestamp reset");return t}return e},t.generateOrAbort=function(){var e=Date.now();if(e>this._timestamp)this._timestamp=e,this._resetCounter();else{if(!(e+1e4>this._timestamp))return;this._counter++,this._counter>4398046511103&&(this._timestamp++,this._resetCounter())}return lu.fromFieldsV7(this._timestamp,Math.trunc(this._counter/Math.pow(2,30)),this._counter&Math.pow(2,30)-1,this._random.nextUint32())},t._resetCounter=function(){this._counter=1024*this._random.nextUint32()+(1023&this._random.nextUint32())},e}(),du=function(e){if("undefined"!=typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var t=0;t<e.length;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};ps&&!js(ps.crypto)&&crypto.getRandomValues&&(du=function(e){return crypto.getRandomValues(e)});var fu,pu,_u=function(){function e(){this._buffer=new Uint32Array(8),this._cursor=1/0}return e.prototype.nextUint32=function(){return this._cursor>=this._buffer.length&&(du(this._buffer),this._cursor=0),this._buffer[this._cursor++]},e}(),hu=function(){return vu().toString()},vu=function(){return(fu||(fu=new cu)).generate()},gu="Mobile",mu="iOS",yu="Android",bu="Tablet",wu=yu+" "+bu,Su="iPad",xu="Apple",Eu=xu+" Watch",ku="Safari",Pu="BlackBerry",Cu="Samsung",Tu=Cu+"Browser",Iu=Cu+" Internet",Fu="Chrome",Lu=Fu+" OS",Ru=Fu+" "+mu,Ou="Internet Explorer",Mu=Ou+" "+gu,Au="Opera",Du=Au+" Mini",qu="Edge",$u="Microsoft "+qu,Nu="Firefox",Hu=Nu+" "+mu,ju="Nintendo",Uu="PlayStation",Vu="Xbox",zu=yu+" "+gu,Bu=gu+" "+ku,Wu="Windows",Gu=Wu+" Phone",Zu="Nokia",Yu="Ouya",Qu="Generic",Xu=Qu+" "+gu.toLowerCase(),Ju=Qu+" "+bu.toLowerCase(),Ku="Konqueror",el="(\\d+(\\.\\d+)?)",tl=new RegExp("Version/"+el),nl=new RegExp(Vu,"i"),rl=new RegExp(Uu+" \\w+","i"),il=new RegExp(ju+" \\w+","i"),ol=new RegExp(Pu+"|PlayBook|BB10","i"),sl={"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"};var al=function(e,t){return t&&Fs(t,xu)||function(e){return Fs(e,ku)&&!Fs(e,Fu)&&!Fs(e,yu)}(e)},ul=function(e,t){return t=t||"",Fs(e," OPR/")&&Fs(e,"Mini")?Du:Fs(e," OPR/")?Au:ol.test(e)?Pu:Fs(e,"IE"+gu)||Fs(e,"WPDesktop")?Mu:Fs(e,Tu)?Iu:Fs(e,qu)||Fs(e,"Edg/")?$u:Fs(e,"FBIOS")?"Facebook "+gu:Fs(e,"UCWEB")||Fs(e,"UCBrowser")?"UC Browser":Fs(e,"CriOS")?Ru:Fs(e,"CrMo")||Fs(e,Fu)?Fu:Fs(e,yu)&&Fs(e,ku)?zu:Fs(e,"FxiOS")?Hu:Fs(e.toLowerCase(),Ku.toLowerCase())?Ku:al(e,t)?Fs(e,gu)?Bu:ku:Fs(e,Nu)?Nu:Fs(e,"MSIE")||Fs(e,"Trident/")?Ou:Fs(e,"Gecko")?Nu:""},ll=((pu={})[Mu]=[new RegExp("rv:"+el)],pu[$u]=[new RegExp(qu+"?\\/"+el)],pu[Fu]=[new RegExp("("+Fu+"|CrMo)\\/"+el)],pu[Ru]=[new RegExp("CriOS\\/"+el)],pu["UC Browser"]=[new RegExp("(UCBrowser|UCWEB)\\/"+el)],pu[ku]=[tl],pu[Bu]=[tl],pu[Au]=[new RegExp("(Opera|OPR)\\/"+el)],pu[Nu]=[new RegExp(Nu+"\\/"+el)],pu[Hu]=[new RegExp("FxiOS\\/"+el)],pu[Ku]=[new RegExp("Konqueror[:/]?"+el,"i")],pu[Pu]=[new RegExp(Pu+" "+el),tl],pu[zu]=[new RegExp("android\\s"+el,"i")],pu[Iu]=[new RegExp(Tu+"\\/"+el)],pu[Ou]=[new RegExp("(rv:|MSIE )"+el)],pu.Mozilla=[new RegExp("rv:"+el)],pu),cl=function(e,t){var n=ul(e,t),r=ll[n];if(js(r))return null;for(var i=0;i<r.length;i++){var o=r[i],s=e.match(o);if(s)return parseFloat(s[s.length-2])}return null},dl=[[new RegExp(Vu+"; "+Vu+" (.*?)[);]","i"),function(e){return[Vu,e&&e[1]||""]}],[new RegExp(ju,"i"),[ju,""]],[new RegExp(Uu,"i"),[Uu,""]],[ol,[Pu,""]],[new RegExp(Wu,"i"),function(e,t){if(/Phone/.test(t)||/WPDesktop/.test(t))return[Gu,""];if(new RegExp(gu).test(t)&&!/IEMobile\b/.test(t))return[Wu+" "+gu,""];var n=/Windows NT ([0-9.]+)/i.exec(t);if(n&&n[1]){var r=n[1],i=sl[r]||"";return/arm/i.test(t)&&(i="RT"),[Wu,i]}return[Wu,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,function(e){if(e&&e[3]){var t=[e[3],e[4],e[5]||"0"];return[mu,t.join(".")]}return[mu,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,function(e){var t="";return e&&e.length>=3&&(t=js(e[2])?e[3]:e[2]),["watchOS",t]}],[new RegExp("("+yu+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+yu+")","i"),function(e){if(e&&e[2]){var t=[e[2],e[3],e[4]||"0"];return[yu,t.join(".")]}return[yu,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,function(e){var t=["Mac OS X",""];if(e&&e[1]){var n=[e[1],e[2],e[3]||"0"];t[1]=n.join(".")}return t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[Lu,""]],[/Linux|debian/i,["Linux",""]]],fl=function(e){return il.test(e)?ju:rl.test(e)?Uu:nl.test(e)?Vu:new RegExp(Yu,"i").test(e)?Yu:new RegExp("("+Gu+"|WPDesktop)","i").test(e)?Gu:/iPad/.test(e)?Su:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?Eu:ol.test(e)?Pu:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(Zu,"i").test(e)?Zu:/(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(gu).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)?yu:wu:yu:new RegExp("(pda|"+gu+")","i").test(e)?Xu:new RegExp(bu,"i").test(e)&&!new RegExp(bu+" pc","i").test(e)?Ju:""},pl=function(e){var t=fl(e);return t===Su||t===wu||"Kobo"===t||"Kindle Fire"===t||t===Ju?bu:t===ju||t===Vu||t===Uu||t===Yu?"Console":t===Eu?"Wearable":t?gu:"Desktop"},_l="$copy_autocapture",hl=function(e){return e.GZipJS="gzip-js",e.Base64="base64",e}({}),vl=function(e){var t=null==ys?void 0:ys.createElement("a");return js(t)?null:(t.href=e,t)},gl=function(e,t){var n,r;void 0===t&&(t="&");var i=[];return Na(e,(function(e,t){js(e)||js(t)||"undefined"===t||(n=encodeURIComponent(function(e){return e instanceof File}(e)?e.name:e.toString()),r=encodeURIComponent(t),i[i.length]=r+"="+n)})),i.join(t)},ml=function(e,t){for(var n,r=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),i=0;i<r.length;i++){var o=r[i].split("=");if(o[0]===t){n=o;break}}if(!qs(n)||n.length<2)return"";var s=n[1];try{s=decodeURIComponent(s)}catch(e){Aa.error("Skipping decoding for malformed query param: "+s)}return s.replace(/\+/g," ")},yl=function(e,t,n){if(!e||!t||!t.length)return e;for(var r=e.split("#"),i=r[0]||"",o=r[1],s=i.split("?"),a=s[1],u=s[0],l=(a||"").split("&"),c=[],d=0;d<l.length;d++){var f=l[d].split("=");qs(f)&&(t.includes(f[0])?c.push(f[0]+"="+n):c.push(l[d]))}var p=u;return null!=a&&(p+="?"+c.join("&")),null!=o&&(p+="#"+o),p},bl=function(e,t){var n=e.match(new RegExp(t+"=([^&]*)"));return n?n[1]:null},wl=Uint8Array,Sl=Uint16Array,xl=Uint32Array,El=new wl([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]),kl=new wl([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]),Pl=new wl([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Cl=function(e,t){for(var n=new Sl(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var i=new xl(n[30]);for(r=1;r<30;++r)for(var o=n[r];o<n[r+1];++o)i[o]=o-n[r]<<5|r;return[n,i]},Tl=Cl(El,2),Il=Tl[0],Fl=Tl[1];Il[28]=258,Fl[258]=28;for(var Ll=Cl(kl,0)[1],Rl=new Sl(32768),Ol=0;Ol<32768;++Ol){var Ml=(43690&Ol)>>>1|(21845&Ol)<<1;Ml=(61680&(Ml=(52428&Ml)>>>2|(13107&Ml)<<2))>>>4|(3855&Ml)<<4,Rl[Ol]=((65280&Ml)>>>8|(255&Ml)<<8)>>>1}var Al=function(e,t,n){for(var r=e.length,i=0,o=new Sl(t);i<r;++i)++o[e[i]-1];var s,a=new Sl(t);for(i=0;i<t;++i)a[i]=a[i-1]+o[i-1]<<1;if(n){s=new Sl(1<<t);var u=15-t;for(i=0;i<r;++i)if(e[i])for(var l=i<<4|e[i],c=t-e[i],d=a[e[i]-1]++<<c,f=d|(1<<c)-1;d<=f;++d)s[Rl[d]>>>u]=l}else for(s=new Sl(r),i=0;i<r;++i)s[i]=Rl[a[e[i]-1]++]>>>15-e[i];return s},Dl=new wl(288);for(Ol=0;Ol<144;++Ol)Dl[Ol]=8;for(Ol=144;Ol<256;++Ol)Dl[Ol]=9;for(Ol=256;Ol<280;++Ol)Dl[Ol]=7;for(Ol=280;Ol<288;++Ol)Dl[Ol]=8;var ql=new wl(32);for(Ol=0;Ol<32;++Ol)ql[Ol]=5;var $l=Al(Dl,9,0),Nl=Al(ql,5,0),Hl=function(e){return(e/8>>0)+(7&e&&1)},jl=function(e,t,n){(null==n||n>e.length)&&(n=e.length);var r=new(e instanceof Sl?Sl:e instanceof xl?xl:wl)(n-t);return r.set(e.subarray(t,n)),r},Ul=function(e,t,n){n<<=7&t;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8},Vl=function(e,t,n){n<<=7&t;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},zl=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,o=n.slice();if(!i)return[new wl(0),0];if(1==i){var s=new wl(n[0].s+1);return s[n[0].s]=1,[s,1]}n.sort((function(e,t){return e.f-t.f})),n.push({s:-1,f:25001});var a=n[0],u=n[1],l=0,c=1,d=2;for(n[0]={s:-1,f:a.f+u.f,l:a,r:u};c!=i-1;)a=n[n[l].f<n[d].f?l++:d++],u=n[l!=c&&n[l].f<n[d].f?l++:d++],n[c++]={s:-1,f:a.f+u.f,l:a,r:u};var f=o[0].s;for(r=1;r<i;++r)o[r].s>f&&(f=o[r].s);var p=new Sl(f+1),_=Bl(n[c-1],p,0);if(_>t){r=0;var h=0,v=_-t,g=1<<v;for(o.sort((function(e,t){return p[t.s]-p[e.s]||e.f-t.f}));r<i;++r){var m=o[r].s;if(!(p[m]>t))break;h+=g-(1<<_-p[m]),p[m]=t}for(h>>>=v;h>0;){var y=o[r].s;p[y]<t?h-=1<<t-p[y]++-1:++r}for(;r>=0&&h;--r){var b=o[r].s;p[b]==t&&(--p[b],++h)}_=t}return[new wl(p),_]},Bl=function(e,t,n){return-1==e.s?Math.max(Bl(e.l,t,n+1),Bl(e.r,t,n+1)):t[e.s]=n},Wl=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new Sl(++t),r=0,i=e[0],o=1,s=function(e){n[r++]=e},a=1;a<=t;++a)if(e[a]==i&&a!=t)++o;else{if(!i&&o>2){for(;o>138;o-=138)s(32754);o>2&&(s(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(s(i),--o;o>6;o-=6)s(8304);o>2&&(s(o-3<<5|8208),o=0)}for(;o--;)s(i);o=1,i=e[a]}return[n.subarray(0,r),t]},Gl=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},Zl=function(e,t,n){var r=n.length,i=Hl(t+2);e[i]=255&r,e[i+1]=r>>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var o=0;o<r;++o)e[i+o+4]=n[o];return 8*(i+4+r)},Yl=function(e,t,n,r,i,o,s,a,u,l,c){Ul(t,c++,n),++i[256];for(var d=zl(i,15),f=d[0],p=d[1],_=zl(o,15),h=_[0],v=_[1],g=Wl(f),m=g[0],y=g[1],b=Wl(h),w=b[0],S=b[1],x=new Sl(19),E=0;E<m.length;++E)x[31&m[E]]++;for(E=0;E<w.length;++E)x[31&w[E]]++;for(var k=zl(x,7),P=k[0],C=k[1],T=19;T>4&&!P[Pl[T-1]];--T);var I,F,L,R,O=l+5<<3,M=Gl(i,Dl)+Gl(o,ql)+s,A=Gl(i,f)+Gl(o,h)+s+14+3*T+Gl(x,P)+(2*x[16]+3*x[17]+7*x[18]);if(O<=M&&O<=A)return Zl(t,c,e.subarray(u,u+l));if(Ul(t,c,1+(A<M)),c+=2,A<M){I=Al(f,p,0),F=f,L=Al(h,v,0),R=h;var D=Al(P,C,0);Ul(t,c,y-257),Ul(t,c+5,S-1),Ul(t,c+10,T-4),c+=14;for(E=0;E<T;++E)Ul(t,c+3*E,P[Pl[E]]);c+=3*T;for(var q=[m,w],N=0;N<2;++N){var H=q[N];for(E=0;E<H.length;++E){var j=31&H[E];Ul(t,c,D[j]),c+=P[j],j>15&&(Ul(t,c,H[E]>>>5&127),c+=H[E]>>>12)}}}else I=$l,F=Dl,L=Nl,R=ql;for(E=0;E<a;++E)if(r[E]>255){j=r[E]>>>18&31;Vl(t,c,I[j+257]),c+=F[j+257],j>7&&(Ul(t,c,r[E]>>>23&31),c+=El[j]);var U=31&r[E];Vl(t,c,L[U]),c+=R[U],U>3&&(Vl(t,c,r[E]>>>5&8191),c+=kl[U])}else Vl(t,c,I[r[E]]),c+=F[r[E]];return Vl(t,c,I[256]),c+F[256]},Ql=new xl([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Xl=function(){for(var e=new xl(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(1&n&&3988292384)^n>>>1;e[t]=n}return e}(),Jl=function(e,t,n,r,i){return function(e,t,n,r,i,o){var s=e.length,a=new wl(r+s+5*(1+Math.floor(s/7e3))+i),u=a.subarray(r,a.length-i),l=0;if(!t||s<8)for(var c=0;c<=s;c+=65535){var d=c+65535;d<s?l=Zl(u,l,e.subarray(c,d)):(u[c]=o,l=Zl(u,l,e.subarray(c,s)))}else{for(var f=Ql[t-1],p=f>>>13,_=8191&f,h=(1<<n)-1,v=new Sl(32768),g=new Sl(h+1),m=Math.ceil(n/3),y=2*m,b=function(t){return(e[t]^e[t+1]<<m^e[t+2]<<y)&h},w=new xl(25e3),S=new Sl(288),x=new Sl(32),E=0,k=0,P=(c=0,0),C=0,T=0;c<s;++c){var I=b(c),F=32767&c,L=g[I];if(v[F]=L,g[I]=F,C<=c){var R=s-c;if((E>7e3||P>24576)&&R>423){l=Yl(e,u,0,w,S,x,k,P,T,c-T,l),P=E=k=0,T=c;for(var O=0;O<286;++O)S[O]=0;for(O=0;O<30;++O)x[O]=0}var M=2,A=0,D=_,q=F-L&32767;if(R>2&&I==b(c-q))for(var N=Math.min(p,R)-1,H=Math.min(32767,c),j=Math.min(258,R);q<=H&&--D&&F!=L;){if(e[c+M]==e[c+M-q]){for(var U=0;U<j&&e[c+U]==e[c+U-q];++U);if(U>M){if(M=U,A=q,U>N)break;var V=Math.min(q,U-2),z=0;for(O=0;O<V;++O){var B=c-q+O+32768&32767,W=B-v[B]+32768&32767;W>z&&(z=W,L=B)}}}q+=(F=L)-(L=v[F])+32768&32767}if(A){w[P++]=268435456|Fl[M]<<18|Ll[A];var G=31&Fl[M],Z=31&Ll[A];k+=El[G]+kl[Z],++S[257+G],++x[Z],C=c+M,++E}else w[P++]=e[c],++S[e[c]]}}l=Yl(e,u,o,w,S,x,k,P,T,c-T,l)}return jl(a,0,r+Hl(l)+i)}(e,null==t.level?6:t.level,null==t.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,n,r,!0)},Kl=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};function ec(e,t){void 0===t&&(t={});var n=function(){var e=4294967295;return{p:function(t){for(var n=e,r=0;r<t.length;++r)n=Xl[255&n^t[r]]^n>>>8;e=n},d:function(){return 4294967295^e}}}(),r=e.length;n.p(e);var i=Jl(e,t,function(e){return 10+(e.filename&&e.filename.length+1||0)}(t),8),o=i.length;return function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&Kl(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var r=0;r<=n.length;++r)e[r+10]=n.charCodeAt(r)}}(i,t),Kl(i,o-8,n.d()),Kl(i,o-4,r),i}var tc=function(e){var t,n,r,i,o="";for(t=n=0,r=(e=(e+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n")).length,i=0;i<r;i++){var s=e.charCodeAt(i),a=null;s<128?n++:a=s>127&&s<2048?String.fromCharCode(s>>6|192,63&s|128):String.fromCharCode(s>>12|224,s>>6&63|128,63&s|128),zs(a)||(n>t&&(o+=e.substring(t,n)),o+=a,t=n=i+1)}return n>t&&(o+=e.substring(t,e.length)),o},nc=!!Ss||!!ws,rc="text/plain",ic=function(e,t,n){var r;void 0===n&&(n=!0);var i=e.split("?"),o=i[0],s=i[1],a=Ui({},t),u=null!==(r=null==s?void 0:s.split("&").map((function(e){var t,r=e.split("="),i=r[0],o=r[1],s=n&&null!==(t=a[i])&&void 0!==t?t:o;return delete a[i],i+"="+s})))&&void 0!==r?r:[],l=gl(a);return l&&u.push(l),o+"?"+u.join("&")},oc=function(e,t){return JSON.stringify(e,(function(e,t){return"bigint"==typeof t?t.toString():t}),t)},sc=function(e){var t=e.data,n=e.compression;if(t){if(n===hl.GZipJS){var r=ec(function(e,t){var n=e.length;if("undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e);for(var r=new wl(e.length+(e.length>>>1)),i=0,o=function(e){r[i++]=e},s=0;s<n;++s){if(i+5>r.length){var a=new wl(i+8+(n-s<<1));a.set(r),r=a}var u=e.charCodeAt(s);u<128||t?o(u):u<2048?(o(192|u>>>6),o(128|63&u)):u>55295&&u<57344?(o(240|(u=65536+(1047552&u)|1023&e.charCodeAt(++s))>>>18),o(128|u>>>12&63),o(128|u>>>6&63),o(128|63&u)):(o(224|u>>>12),o(128|u>>>6&63),o(128|63&u))}return jl(r,0,i)}(oc(t)),{mtime:0}),i=new Blob([r],{type:rc});return{contentType:rc,body:i,estimatedSize:i.size}}if(n===hl.Base64){var o=function(e){var t,n,r,i,o,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a=0,u=0,l="",c=[];if(!e)return e;e=tc(e);do{t=(o=e.charCodeAt(a++)<<16|e.charCodeAt(a++)<<8|e.charCodeAt(a++))>>18&63,n=o>>12&63,r=o>>6&63,i=63&o,c[u++]=s.charAt(t)+s.charAt(n)+s.charAt(r)+s.charAt(i)}while(a<e.length);switch(l=c.join(""),e.length%3){case 1:l=l.slice(0,-2)+"==";break;case 2:l=l.slice(0,-1)+"="}return l}(oc(t)),s=function(e){return"data="+encodeURIComponent("string"==typeof e?e:oc(e))}(o);return{contentType:"application/x-www-form-urlencoded",body:s,estimatedSize:new Blob([s]).size}}var a=oc(t);return{contentType:"application/json",body:a,estimatedSize:new Blob([a]).size}}},ac=[];ws&&ac.push({transport:"fetch",method:function(e){var t,n,r=null!==(t=sc(e))&&void 0!==t?t:{},i=r.contentType,o=r.body,s=r.estimatedSize,a=new Headers;Na(e.headers,(function(e,t){a.append(t,e)})),i&&a.append("Content-Type",i);var u=e.url,l=null;if(xs){var c=new xs;l={signal:c.signal,timeout:setTimeout((function(){return c.abort()}),e.timeout)}}ws(u,Ui({method:(null==e?void 0:e.method)||"GET",headers:a,keepalive:"POST"===e.method&&(s||0)<52428.8,body:o,signal:null==(n=l)?void 0:n.signal},e.fetchOptions)).then((function(t){return t.text().then((function(n){var r={statusCode:t.status,text:n};if(200===t.status)try{r.json=JSON.parse(n)}catch(e){Aa.error(e)}null==e.callback||e.callback(r)}))})).catch((function(t){Aa.error(t),null==e.callback||e.callback({statusCode:0,text:t})})).finally((function(){return l?clearTimeout(l.timeout):null}))}}),Ss&&ac.push({transport:"XHR",method:function(e){var t,n=new Ss;n.open(e.method||"GET",e.url,!0);var r=null!==(t=sc(e))&&void 0!==t?t:{},i=r.contentType,o=r.body;Na(e.headers,(function(e,t){n.setRequestHeader(t,e)})),i&&n.setRequestHeader("Content-Type",i),e.timeout&&(n.timeout=e.timeout),e.disableXHRCredentials||(n.withCredentials=!0),n.onreadystatechange=function(){if(4===n.readyState){var t={statusCode:n.status,text:n.responseText};if(200===n.status)try{t.json=JSON.parse(n.responseText)}catch(e){}null==e.callback||e.callback(t)}},n.send(o)}}),null!=ms&&ms.sendBeacon&&ac.push({transport:"sendBeacon",method:function(e){var t=ic(e.url,{beacon:"1"});try{var n,r=null!==(n=sc(e))&&void 0!==n?n:{},i=r.contentType,o=r.body,s="string"==typeof o?new Blob([o],{type:i}):o;ms.sendBeacon(t,s)}catch(e){}}});var uc=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 lc(e,t,n){return oc({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:n})}var cc={exact:function(e,t){return t.some((function(t){return e.some((function(e){return t===e}))}))},is_not:function(e,t){return t.every((function(t){return e.every((function(e){return t!==e}))}))},regex:function(e,t){return t.some((function(t){return e.some((function(e){return uc(t,e)}))}))},not_regex:function(e,t){return t.every((function(t){return e.every((function(e){return!uc(t,e)}))}))},icontains:function(e,t){return t.map(dc).some((function(t){return e.map(dc).some((function(e){return t.includes(e)}))}))},not_icontains:function(e,t){return t.map(dc).every((function(t){return e.map(dc).every((function(e){return!t.includes(e)}))}))}},dc=function(e){return e.toLowerCase()};function fc(e,t){return!e||Object.entries(e).every((function(e){var n=e[0],r=e[1],i=null==t?void 0:t[n];if(js(i)||zs(i))return!1;var o=[String(i)],s=cc[r.operator];return!!s&&s(r.values,o)}))}var pc=Da("[Stylesheet Loader]"),_c=ps,hc=ys;function vc(e){return"$survey_response_"+e}var gc="#020617",mc={fontFamily:"inherit",backgroundColor:"#eeeded",submitButtonColor:"black",submitButtonTextColor:"white",ratingButtonColor:"white",ratingButtonActiveColor:"black",borderColor:"#c9c6c6",placeholder:"Start typing...",whiteLabel:!1,displayThankYouMessage:!0,thankYouMessageHeader:"Thank you for your feedback!",position:is.Right,widgetType:rs.Tab,widgetLabel:"Feedback",widgetColor:"black",zIndex:"2147483647",disabledButtonOpacity:"0.6",maxWidth:"300px",textSubtleColor:"#939393",boxPadding:"20px 24px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",borderRadius:"10px",shuffleQuestions:!1,surveyPopupDelaySeconds:void 0,outlineColor:"rgba(59, 130, 246, 0.8)",inputBackground:"white",inputTextColor:gc,scrollbarThumbColor:"var(--ph-survey-border-color)",scrollbarTrackColor:"var(--ph-survey-background-color)"};function yc(e){if("#"===e[0]){var t=e.replace(/^#/,"");return"rgb("+parseInt(t.slice(0,2),16)+","+parseInt(t.slice(2,4),16)+","+parseInt(t.slice(4,6),16)+")"}return"rgb(255, 255, 255)"}function bc(e){var t;void 0===e&&(e=mc.backgroundColor),"#"===e[0]&&(t=yc(e)),e.startsWith("rgb")&&(t=e);var n={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}[e.toLowerCase()];if(n&&(t=yc(n)),!t)return gc;var r=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(r){var i=parseInt(r[1]),o=parseInt(r[2]),s=parseInt(r[3]);return Math.sqrt(i*i*.299+o*o*.587+s*s*.114)>127.5?gc:"white"}return gc}function wc(e){var t=function(e,t,n){var r,i=e.createElement("style");return i.innerText=t,null!=n&&null!=(r=n.config)&&r.prepare_external_dependency_stylesheet&&(i=n.config.prepare_external_dependency_stylesheet(i)),i||(pc.error("prepare_external_dependency_stylesheet returned null"),null)}(hc,':host{--ph-survey-font-family:-apple-system,BlinkMacSystemFont,"Inter","Segoe UI","Roboto",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--ph-survey-box-padding:20px 24px;--ph-survey-max-width:300px;--ph-survey-z-index:2147483647;--ph-survey-border-color:#dcdcdc;--ph-survey-border-bottom:1.5px solid var(--ph-survey-border-color);--ph-survey-border-radius:10px;--ph-survey-background-color:#eeeded;--ph-survey-box-shadow:0 4px 12px rgba(0,0,0,.15);--ph-survey-submit-button-color:#000;--ph-survey-submit-button-text-color:#fff;--ph-survey-rating-bg-color:#fff;--ph-survey-rating-text-color:#020617;--ph-survey-rating-active-bg-color:#000;--ph-survey-rating-active-text-color:#fff;--ph-survey-text-primary-color:#020617;--ph-survey-text-subtle-color:#939393;--ph-widget-color:#e0a045;--ph-widget-text-color:#fff;--ph-survey-scrollbar-thumb-color:var(--ph-survey-border-color);--ph-survey-scrollbar-track-color:var(--ph-survey-background-color);--ph-survey-outline-color:rgba(59,130,246,.8);--ph-survey-input-background:#fff;--ph-survey-input-text-color:#020617;--ph-survey-disabled-button-opacity:0.6}.ph-survey{bottom:0;height:fit-content;margin:0;max-width:85%;min-width:300px;position:fixed;width:var(--ph-survey-max-width);z-index:var(--ph-survey-z-index)}.ph-survey h3,.ph-survey p{margin:0}.ph-survey *{box-sizing:border-box;color:var(--ph-survey-text-primary-color);font-family:var(--ph-survey-font-family)}.ph-survey .multiple-choice-options label,.ph-survey input[type=text],.ph-survey textarea{background:var(--ph-survey-input-background);border:1.5px solid var(--ph-survey-border-color);border-radius:4px;color:var(--ph-survey-input-text-color);padding:10px;transition:border-color .2s ease-out,box-shadow .2s ease-out,transform .15s ease-out}.ph-survey input[type=text],.ph-survey textarea{transition:border-color .2s ease-out,box-shadow .2s ease-out,transform .15s ease-out}.ph-survey input{margin:0}.ph-survey .form-submit:focus,.ph-survey .form-submit:focus-visible,.ph-survey input[type=checkbox]:focus,.ph-survey input[type=checkbox]:focus-visible,.ph-survey input[type=radio]:focus,.ph-survey input[type=radio]:focus-visible,.ph-survey input[type=text]:focus,.ph-survey input[type=text]:focus-visible,.ph-survey textarea:focus,.ph-survey textarea:focus-visible{border-color:var(--ph-survey-rating-active-bg-color);outline:1.5px solid var(--ph-survey-outline-color);outline-offset:2px}.ph-survey button:focus:not(:focus-visible),.ph-survey input[type=checkbox]:focus:not(:focus-visible),.ph-survey input[type=radio]:focus:not(:focus-visible),.ph-survey input[type=text]:focus:not(:focus-visible),.ph-survey textarea:focus:not(:focus-visible){outline:none}.ph-survey input[type=text]:hover:not(:focus),.ph-survey textarea:hover:not(:focus){border-color:var(--ph-survey-rating-active-bg-color)}@media (max-width:768px){.ph-survey input[type=text],.ph-survey textarea{font-size:1rem}}.ph-survey .form-cancel,.ph-survey .multiple-choice-options label,.ph-survey .rating-options-number,.ph-survey input[type=checkbox],.ph-survey input[type=radio]{border:1.5px solid var(--ph-survey-border-color)}.ph-survey .footer-branding,.ph-survey .form-cancel,.ph-survey .form-submit,.ph-survey .ratings-emoji,.ph-survey .ratings-number,.ph-survey input[type=checkbox],.ph-survey input[type=radio],.ph-survey label{transition:all .2s ease-out}@media (prefers-reduced-motion:no-preference){.ph-survey button:active,.ph-survey input[type=checkbox]:active,.ph-survey input[type=radio]:active,.ph-survey label:active{transition-duration:.1s}}.ph-survey-widget-tab{background:var(--ph-widget-color);border:none;border-radius:3px 3px 0 0;color:var(--ph-widget-text-color);cursor:pointer;padding:10px 12px;position:fixed;text-align:center;transition:padding .2s ease-out;z-index:var(--ph-survey-z-index)}.ph-survey-widget-tab:hover:not(.widget-tab-top){padding-bottom:16px}.ph-survey-widget-tab.widget-tab-top{border-radius:0 0 3px 3px}.ph-survey-widget-tab.widget-tab-top:hover{padding-top:16px}@keyframes ph-survey-fade-in{0%{opacity:0}to{opacity:1}}.survey-box{gap:16px}.bottom-section,.survey-box{display:flex;flex-direction:column}.bottom-section{gap:8px}.thank-you-message-header~.bottom-section{padding-top:16px}.question-container,.thank-you-message{display:flex;flex-direction:column;gap:8px}.survey-question{font-size:14px;font-weight:500}.survey-question-description{font-size:13px;opacity:.8;padding-top:4px}.survey-question-description,.thank-you-message-body{word-wrap:break-word;overflow-wrap:break-word}:is(.survey-question-description,.thank-you-message-body) embed,:is(.survey-question-description,.thank-you-message-body) iframe,:is(.survey-question-description,.thank-you-message-body) img,:is(.survey-question-description,.thank-you-message-body) object,:is(.survey-question-description,.thank-you-message-body) video{height:auto;max-width:100%}:is(.survey-question-description,.thank-you-message-body) svg{height:auto;max-width:100%}.question-textarea-wrapper{display:flex;flex-direction:column}.survey-form{animation:ph-survey-fade-in .3s ease-out forwards}.survey-form,.thank-you-message{background:var(--ph-survey-background-color);border:1.5px solid var(--ph-survey-border-color);border-bottom:var(--ph-survey-border-bottom);border-radius:var(--ph-survey-border-radius);box-shadow:var(--ph-survey-box-shadow);margin:0;padding:var(--ph-survey-box-padding);position:relative;text-align:left;width:100%;z-index:var(--ph-survey-z-index)}.survey-form input[type=text],.survey-form textarea{min-width:100%}:is(.survey-form textarea):focus,:is(.survey-form textarea):focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.08)}:is(.survey-form textarea):focus:not(:focus-visible){box-shadow:none}.survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) .multiple-choice-options,.survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) textarea{margin-top:0}.multiple-choice-options{border:none;display:flex;flex-direction:column;font-size:14px;gap:8px;margin:0;padding:1px 0}.multiple-choice-options .response-choice,.multiple-choice-options label{align-items:center;color:inherit;display:flex;gap:8px}.multiple-choice-options label{cursor:pointer;font-size:13px}:is(.multiple-choice-options label):hover:not(:has(input:checked)){border-color:var(--ph-survey-text-subtle-color);box-shadow:0 2px 8px rgba(0,0,0,.08)}:is(.multiple-choice-options label):has(input:checked){border-color:var(--ph-survey-rating-active-bg-color);box-shadow:0 1px 4px rgba(0,0,0,.05)}.choice-option-open:is(.multiple-choice-options label){flex-wrap:wrap}:is(.multiple-choice-options label) span{color:inherit}.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]{appearance:none;-webkit-appearance:none;-moz-appearance:none;background:var(--ph-survey-input-background);border-radius:3px;cursor:pointer;flex-shrink:0;height:1rem;position:relative;transition:all .2s cubic-bezier(.4,0,.2,1),transform .15s ease-out;width:1rem;z-index:1}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):focus{transform:scale(1.05)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):hover{border-color:var(--ph-survey-rating-active-bg-color);transform:scale(1.05)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):active{transform:scale(.95)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):checked{background:var(--ph-survey-rating-active-bg-color);border-color:var(--ph-survey-rating-active-bg-color);transform:scale(1)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):checked:hover{transform:scale(1.05)}.multiple-choice-options input[type=checkbox]:checked:after{animation:ph-survey-checkmark-reveal .2s ease-out .1s forwards;border:solid var(--ph-survey-rating-active-text-color);border-width:0 2px 2px 0;height:8px;left:4px;transform:rotate(45deg) scale(0);width:4px}.multiple-choice-options input[type=radio]:checked:after{animation:ph-survey-radio-reveal .15s ease-out .05s forwards;background:var(--ph-survey-rating-active-text-color);border-radius:50%;height:6px;left:5px;top:5px;transform:scale(0);width:6px}.multiple-choice-options input[type=checkbox]:checked:after,.multiple-choice-options input[type=radio]:checked:after{box-sizing:content-box;content:"";position:absolute}.multiple-choice-options input[type=radio]{border-radius:50%}.multiple-choice-options input[type=radio]:checked{border:none}:is(.multiple-choice-options input[type=checkbox]:checked,.multiple-choice-options input[type=radio]:checked)~*{font-weight:700}:is(:is(.multiple-choice-options .choice-option-open) input[type=text])::placeholder{color:var(--ph-survey-text-subtle-color);font-weight:400}.rating-options-emoji{display:flex;justify-content:space-between}.ratings-emoji{background-color:transparent;border:none;font-size:16px;opacity:.5;padding:0}.ratings-emoji:hover{cursor:pointer;opacity:1;transform:scale(1.15)}.ratings-emoji.rating-active{opacity:1}.ratings-emoji svg{fill:var(--ph-survey-text-primary-color);transition:fill .2s ease-out}.rating-options-number{border-radius:6px;display:grid;grid-auto-columns:1fr;grid-auto-flow:column;overflow:hidden}.rating-options-number .ratings-number{border:none;border-right:1px solid var(--ph-survey-border-color);color:var(--ph-survey-rating-text-color);cursor:pointer;font-weight:700;text-align:center}:is(.rating-options-number .ratings-number):last-of-type{border-right:0}.rating-active:is(.rating-options-number .ratings-number){background:var(--ph-survey-rating-active-bg-color);color:var(--ph-survey-rating-active-text-color)}.ratings-number{background-color:var(--ph-survey-rating-bg-color);border:none;padding:8px 0}.ratings-number .rating-active{background-color:var(--ph-survey-rating-active-bg-color)}.ratings-number:hover{cursor:pointer}.rating-text{display:flex;flex-direction:row;font-size:11px;justify-content:space-between;opacity:.7}.form-submit{background:var(--ph-survey-submit-button-color);border:none;border-radius:6px;box-shadow:0 2px 0 rgba(0,0,0,.045);color:var(--ph-survey-submit-button-text-color);cursor:pointer;font-weight:700;min-width:100%;padding:12px;text-align:center;user-select:none}.form-submit:not([disabled]):hover{box-shadow:0 4px 8px rgba(0,0,0,.1);transform:scale(1.02)}.form-submit:not([disabled]):active{box-shadow:0 1px 2px rgba(0,0,0,.05);transform:scale(.98)}.form-submit[disabled]{cursor:not-allowed;opacity:var(--ph-survey-disabled-button-opacity)}.form-cancel{background:#fff;border-radius:100%;cursor:pointer;line-height:0;padding:12px;position:absolute;right:0;top:0;transform:translate(50%,-50%)}.form-cancel:hover{opacity:.7;transform:translate(50%,-50%) scale(1.1)}.footer-branding{align-items:center;display:flex;font-size:11px;font-weight:500;gap:4px;justify-content:center;opacity:.6;text-decoration:none}.footer-branding:hover{opacity:1}.footer-branding a{text-decoration:none}.thank-you-message{text-align:center}.thank-you-message-header{margin:10px 0 0}.thank-you-message-body{font-size:14px;opacity:.8}.limit-height{max-height:256px;overflow-x:hidden;overflow-y:auto;scrollbar-color:var(--ph-survey-scrollbar-thumb-color) var(--ph-survey-scrollbar-track-color);scrollbar-width:thin}.limit-height::-webkit-scrollbar{width:8px}.limit-height::-webkit-scrollbar-track{background:var(--ph-survey-scrollbar-track-color);border-radius:4px}.limit-height::-webkit-scrollbar-thumb{background-color:var(--ph-survey-scrollbar-thumb-color);border:2px solid var(--ph-survey-scrollbar-track-color);border-radius:4px}:is(.limit-height::-webkit-scrollbar-thumb):hover{background-color:var(--ph-survey-text-subtle-color)}.sr-only{clip:rect(0,0,0,0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}@media (prefers-reduced-motion:reduce){.ph-survey *{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}@keyframes ph-survey-checkmark-reveal{0%{opacity:0;transform:rotate(45deg) scale(0)}50%{opacity:1;transform:rotate(45deg) scale(1.2)}to{opacity:1;transform:rotate(45deg) scale(1)}}@keyframes ph-survey-radio-reveal{0%{opacity:0;transform:scale(0)}50%{opacity:1;transform:scale(1.3)}to{opacity:1;transform:scale(1)}}',e);return null==t||t.setAttribute("data-ph-survey-style","true"),t}var Sc=function(e,t,n){var r=Hc(e),i=hc.querySelector("."+r);if(i&&i.shadowRoot)return{shadow:i.shadowRoot,isNewlyCreated:!1};var o=hc.createElement("div");!function(e,t,n){var r=Ui({},mc,n),i=e.style,o=![is.Center,is.Left,is.Right].includes(r.position)||t===ss.Widget&&(null==n?void 0:n.widgetType)===rs.Tab;i.setProperty("--ph-survey-font-family",function(e){if("inherit"===e)return"inherit";var t='BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"';return e?e+", "+t:"-apple-system, "+t}(r.fontFamily)),i.setProperty("--ph-survey-box-padding",r.boxPadding),i.setProperty("--ph-survey-max-width",r.maxWidth),i.setProperty("--ph-survey-z-index",r.zIndex),i.setProperty("--ph-survey-border-color",r.borderColor),o?(i.setProperty("--ph-survey-border-radius",r.borderRadius),i.setProperty("--ph-survey-border-bottom","1.5px solid var(--ph-survey-border-color)")):(i.setProperty("--ph-survey-border-bottom","none"),i.setProperty("--ph-survey-border-radius",r.borderRadius+" "+r.borderRadius+" 0 0")),i.setProperty("--ph-survey-background-color",r.backgroundColor),i.setProperty("--ph-survey-box-shadow",r.boxShadow),i.setProperty("--ph-survey-disabled-button-opacity",r.disabledButtonOpacity),i.setProperty("--ph-survey-submit-button-color",r.submitButtonColor),i.setProperty("--ph-survey-submit-button-text-color",(null==n?void 0:n.submitButtonTextColor)||bc(r.submitButtonColor)),i.setProperty("--ph-survey-rating-bg-color",r.ratingButtonColor),i.setProperty("--ph-survey-rating-text-color",bc(r.ratingButtonColor)),i.setProperty("--ph-survey-rating-active-bg-color",r.ratingButtonActiveColor),i.setProperty("--ph-survey-rating-active-text-color",bc(r.ratingButtonActiveColor)),i.setProperty("--ph-survey-text-primary-color",bc(r.backgroundColor)),i.setProperty("--ph-survey-text-subtle-color",r.textSubtleColor),i.setProperty("--ph-widget-color",r.widgetColor),i.setProperty("--ph-widget-text-color",bc(r.widgetColor)),i.setProperty("--ph-widget-z-index",r.zIndex);var s=(null==n?void 0:n.inputBackgroundColor)||r.inputBackground;null!=n&&n.inputBackgroundColor||"white"!==r.backgroundColor||(s="#f8f8f8"),i.setProperty("--ph-survey-input-background",s),i.setProperty("--ph-survey-input-text-color",(null==n?void 0:n.inputTextColor)||bc(s)),i.setProperty("--ph-survey-scrollbar-thumb-color",r.scrollbarThumbColor),i.setProperty("--ph-survey-scrollbar-track-color",r.scrollbarTrackColor),i.setProperty("--ph-survey-outline-color",r.outlineColor)}(o,e.type,e.appearance),o.className=r;var s=o.attachShadow({mode:"open"}),a=wc(t);if(a){var u=s.querySelector("style");u&&s.removeChild(u),s.appendChild(a)}return hc.body.appendChild(o),{shadow:s,isNewlyCreated:!0}},xc=function(e,t){if(!t)return null;var n=e[vc(t)];return qs(n)?[].concat(n):n},Ec=function(e){var t,n,r=e.responses,i=e.survey,o=e.surveySubmissionId,s=e.posthog,a=e.isSurveyCompleted;s?(ou(i),s.capture(cs.SENT,Ui(((t={})[ds.SURVEY_NAME]=i.name,t[ds.SURVEY_ID]=i.id,t[ds.SURVEY_ITERATION]=i.current_iteration,t[ds.SURVEY_ITERATION_START_DATE]=i.current_iteration_start_date,t[ds.SURVEY_QUESTIONS]=i.questions.map((function(e){return{id:e.id,question:e.question,response:xc(r,e.id)}})),t[ds.SURVEY_SUBMISSION_ID]=o,t[ds.SURVEY_COMPLETED]=a,t.sessionRecordingUrl=null==s.get_session_replay_url?void 0:s.get_session_replay_url(),t),r,{$set:(n={},n[ru(i,"responded")]=!0,n)})),a&&(_c.dispatchEvent(new CustomEvent("PHSurveySent",{detail:{surveyId:i.id}})),Nc(i))):Xa.error("[survey sent] event not captured, PostHog instance not found.")},kc=function(e,t,n){var r,i,o;if(t){if(!n){var s=qc(e);t.capture(cs.DISMISSED,Ui(((r={})[ds.SURVEY_NAME]=e.name,r[ds.SURVEY_ID]=e.id,r[ds.SURVEY_ITERATION]=e.current_iteration,r[ds.SURVEY_ITERATION_START_DATE]=e.current_iteration_start_date,r[ds.SURVEY_PARTIALLY_COMPLETED]=Object.values((null==s?void 0:s.responses)||{}).filter((function(e){return!Bs(e)})).length>0,r.sessionRecordingUrl=null==t.get_session_replay_url?void 0:t.get_session_replay_url(),r),null==s?void 0:s.responses,((o={})[ds.SURVEY_SUBMISSION_ID]=null==s?void 0:s.surveySubmissionId,o[ds.SURVEY_QUESTIONS]=e.questions.map((function(e){return{id:e.id,question:e.question,response:xc((null==s?void 0:s.responses)||{},e.id)}})),o.$set=((i={})[ru(e,"dismissed")]=!0,i),o))),Nc(e),ou(e),_c.dispatchEvent(new CustomEvent("PHSurveyClosed",{detail:{surveyId:e.id}}))}}else Xa.error("[survey dismissed] event not captured, PostHog instance not found.")},Pc=function(e){return e.map((function(e){return{sort:Math.floor(10*Math.random()),value:e}})).sort((function(e,t){return e.sort-t.sort})).map((function(e){return e.value}))},Cc=function(e,t){return e.length===t.length&&e.every((function(e,n){return e===t[n]}))?t.reverse():t},Tc=function(e){return e.appearance&&e.appearance.shuffleQuestions&&!e.enable_partial_responses?Cc(e.questions,Pc(e.questions)):e.questions},Ic=function(e){var t;return!(null==(t=e.conditions)||null==(t=t.events)||!t.repeatedActivation||!function(e){var t,n;return null!=(null==(t=e.conditions)||null==(t=t.events)||null==(t=t.values)?void 0:t.length)&&(null==(n=e.conditions)||null==(n=n.events)||null==(n=n.values)?void 0:n.length)>0}(e))||e.schedule===ls.Always||$c(e)},Fc=function(e,t){var n={__c:t="__cC"+eo++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,_o(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}({isPreviewMode:!1,previewPageIndex:0,onPopupSurveyDismissed:function(){},isPopup:!0,onPreviewSubmit:function(){},surveySubmissionId:""}),Lc=function(){return Zo(Fc)},Rc=function(e){var t=e.component,n=e.children,r=e.renderAsHtml,i=e.style;return Fo(t,r?{dangerouslySetInnerHTML:{__html:n},style:i}:{children:n,style:i})};function Oc(e){return null!=e?e:"icontains"}function Mc(e){var t,n,r;if(null==(t=e.conditions)||!t.url)return!0;var i=null==_c||null==(n=_c.location)?void 0:n.href;if(!i)return!1;var o=[e.conditions.url],s=Oc(null==(r=e.conditions)?void 0:r.urlMatchType);return cc[s](o,[i])}var Ac=function(e){var t=""+nu+e.id;return e.current_iteration&&e.current_iteration>0&&(t=""+nu+e.id+"_"+e.current_iteration),t},Dc=function(e,t){try{localStorage.setItem(Ac(e),JSON.stringify(t))}catch(e){Xa.error("Error setting in-progress survey state in localStorage",e)}},qc=function(e){try{var t=localStorage.getItem(Ac(e));if(t)return JSON.parse(t)}catch(e){Xa.error("Error getting in-progress survey state from localStorage",e)}return null},$c=function(e){var t=qc(e);return!Bs(null==t?void 0:t.surveySubmissionId)},Nc=function(e){try{localStorage.removeItem(Ac(e))}catch(e){Xa.error("Error clearing in-progress survey state from localStorage",e)}};function Hc(e,t){void 0===t&&(t=!1);var n="PostHogSurvey-"+e.id;return t?"."+n:n}var jc=0;function Uc(e,t,n,r,i,o){var s,a,u={};for(a in t)"ref"==a?s=t[a]:u[a]=t[a];var l={type:e,props:u,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--jc,__i:-1,__u:0,__source:i,__self:o};if("function"==typeof e&&(s=e.defaultProps))for(a in s)void 0===u[a]&&(u[a]=s[a]);return Zi.vnode&&Zi.vnode(l),l}var Vc=Uc("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Uc("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm146 272q66 0 121.5-35.5T682-393h-52q-23 40-63 61.5T480.5-310q-46.5 0-87-21T331-393h-53q26 61 81 96.5T480-261Zm0 181q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),zc=Uc("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Uc("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm20 194h253v-49H354v49ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Bc=Uc("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Uc("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm146.174 116Q413-417 358.5-379.5T278-280h53q22-42 62.173-65t87.5-23Q528-368 567.5-344.5T630-280h52q-25-63-79.826-100-54.826-37-122-37ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Wc=Uc("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Uc("path",{d:"M480-417q-67 0-121.5 37.5T278-280h404q-25-63-80-100t-122-37Zm-183-72 50-45 45 45 31-36-45-45 45-45-31-36-45 45-50-45-31 36 45 45-45 45 31 36Zm272 0 44-45 51 45 31-36-45-45 45-45-31-36-51 45-44-45-31 36 44 45-44 45 31 36ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142 0 241-99t99-241q0-142-99-241t-241-99q-142 0-241 99t-99 241q0 142 99 241t241 99Z"})}),Gc=Uc("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Uc("path",{d:"M479.504-261Q537-261 585.5-287q48.5-26 78.5-72.4 6-11.6-.75-22.6-6.75-11-20.25-11H316.918Q303-393 296.5-382t-.5 22.6q30 46.4 78.5 72.4 48.5 26 105.004 26ZM347-578l27 27q7.636 8 17.818 8Q402-543 410-551q8-8 8-18t-8-18l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.636-8 17.818Q276-559 284-551q8 8 18 8t18-8l27-27Zm267 0 27 27q7.714 8 18 8t18-8q8-7.636 8-17.818Q685-579 677-587l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.714-8 18t8 18q7.636 8 17.818 8Q579-543 587-551l27-27ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Zc=Uc("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"close-survey-title",children:[Uc("title",{id:"close-survey-title",children:"Close survey"}),Uc("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.164752 0.164752C0.384422 -0.0549175 0.740578 -0.0549175 0.960248 0.164752L6 5.20451L11.0398 0.164752C11.2594 -0.0549175 11.6156 -0.0549175 11.8352 0.164752C12.0549 0.384422 12.0549 0.740578 11.8352 0.960248L6.79549 6L11.8352 11.0398C12.0549 11.2594 12.0549 11.6156 11.8352 11.8352C11.6156 12.0549 11.2594 12.0549 11.0398 11.8352L6 6.79549L0.960248 11.8352C0.740578 12.0549 0.384422 12.0549 0.164752 11.8352C-0.0549175 11.6156 -0.0549175 11.2594 0.164752 11.0398L5.20451 6L0.164752 0.960248C-0.0549175 0.740578 -0.0549175 0.384422 0.164752 0.164752Z",fill:"black"})]}),Yc=Uc("svg",{width:"77",height:"14",viewBox:"0 0 77 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Uc("g",{"clip-path":"url(#clip0_2415_6911)",children:[Uc("mask",{id:"mask0_2415_6911",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"77",height:"14",children:Uc("path",{d:"M0.5 0H76.5V14H0.5V0Z",fill:"white"})}),Uc("g",{mask:"url(#mask0_2415_6911)",children:[Uc("path",{d:"M5.77226 8.02931C5.59388 8.37329 5.08474 8.37329 4.90634 8.02931L4.4797 7.20672C4.41155 7.07535 4.41155 6.9207 4.4797 6.78933L4.90634 5.96669C5.08474 5.62276 5.59388 5.62276 5.77226 5.96669L6.19893 6.78933C6.26709 6.9207 6.26709 7.07535 6.19893 7.20672L5.77226 8.02931ZM5.77226 12.6946C5.59388 13.0386 5.08474 13.0386 4.90634 12.6946L4.4797 11.872C4.41155 11.7406 4.41155 11.586 4.4797 11.4546L4.90634 10.632C5.08474 10.288 5.59388 10.288 5.77226 10.632L6.19893 11.4546C6.26709 11.586 6.26709 11.7406 6.19893 11.872L5.77226 12.6946Z",fill:"#1D4AFF"}),Uc("path",{d:"M0.5 10.9238C0.5 10.508 1.02142 10.2998 1.32637 10.5938L3.54508 12.7327C3.85003 13.0267 3.63405 13.5294 3.20279 13.5294H0.984076C0.716728 13.5294 0.5 13.3205 0.5 13.0627V10.9238ZM0.5 8.67083C0.5 8.79459 0.551001 8.91331 0.641783 9.00081L5.19753 13.3927C5.28831 13.4802 5.41144 13.5294 5.53982 13.5294H8.0421C8.47337 13.5294 8.68936 13.0267 8.3844 12.7327L1.32637 5.92856C1.02142 5.63456 0.5 5.84278 0.5 6.25854V8.67083ZM0.5 4.00556C0.5 4.12932 0.551001 4.24802 0.641783 4.33554L10.0368 13.3927C10.1276 13.4802 10.2508 13.5294 10.3791 13.5294H12.8814C13.3127 13.5294 13.5287 13.0267 13.2237 12.7327L1.32637 1.26329C1.02142 0.969312 0.5 1.17752 0.5 1.59327V4.00556ZM5.33931 4.00556C5.33931 4.12932 5.39033 4.24802 5.4811 4.33554L14.1916 12.7327C14.4965 13.0267 15.0179 12.8185 15.0179 12.4028V9.99047C15.0179 9.86671 14.9669 9.74799 14.8762 9.66049L6.16568 1.26329C5.86071 0.969307 5.33931 1.17752 5.33931 1.59327V4.00556ZM11.005 1.26329C10.7 0.969307 10.1786 1.17752 10.1786 1.59327V4.00556C10.1786 4.12932 10.2296 4.24802 10.3204 4.33554L14.1916 8.06748C14.4965 8.36148 15.0179 8.15325 15.0179 7.7375V5.3252C15.0179 5.20144 14.9669 5.08272 14.8762 4.99522L11.005 1.26329Z",fill:"#F9BD2B"}),Uc("path",{d:"M21.0852 10.981L16.5288 6.58843C16.2238 6.29443 15.7024 6.50266 15.7024 6.91841V13.0627C15.7024 13.3205 15.9191 13.5294 16.1865 13.5294H23.2446C23.5119 13.5294 23.7287 13.3205 23.7287 13.0627V12.5032C23.7287 12.2455 23.511 12.0396 23.2459 12.0063C22.4323 11.9042 21.6713 11.546 21.0852 10.981ZM18.0252 12.0365C17.5978 12.0365 17.251 11.7021 17.251 11.2901C17.251 10.878 17.5978 10.5436 18.0252 10.5436C18.4527 10.5436 18.7996 10.878 18.7996 11.2901C18.7996 11.7021 18.4527 12.0365 18.0252 12.0365Z",fill:"currentColor"}),Uc("path",{d:"M0.5 13.0627C0.5 13.3205 0.716728 13.5294 0.984076 13.5294H3.20279C3.63405 13.5294 3.85003 13.0267 3.54508 12.7327L1.32637 10.5938C1.02142 10.2998 0.5 10.508 0.5 10.9238V13.0627ZM5.33931 5.13191L1.32637 1.26329C1.02142 0.969306 0.5 1.17752 0.5 1.59327V4.00556C0.5 4.12932 0.551001 4.24802 0.641783 4.33554L5.33931 8.86412V5.13191ZM1.32637 5.92855C1.02142 5.63455 0.5 5.84278 0.5 6.25853V8.67083C0.5 8.79459 0.551001 8.91331 0.641783 9.00081L5.33931 13.5294V9.79717L1.32637 5.92855Z",fill:"#1D4AFF"}),Uc("path",{d:"M10.1787 5.3252C10.1787 5.20144 10.1277 5.08272 10.0369 4.99522L6.16572 1.26329C5.8608 0.969306 5.33936 1.17752 5.33936 1.59327V4.00556C5.33936 4.12932 5.39037 4.24802 5.48114 4.33554L10.1787 8.86412V5.3252ZM5.33936 13.5294H8.04214C8.47341 13.5294 8.6894 13.0267 8.38443 12.7327L5.33936 9.79717V13.5294ZM5.33936 5.13191V8.67083C5.33936 8.79459 5.39037 8.91331 5.48114 9.00081L10.1787 13.5294V9.99047C10.1787 9.86671 10.1277 9.74803 10.0369 9.66049L5.33936 5.13191Z",fill:"#F54E00"}),Uc("path",{d:"M29.375 11.6667H31.3636V8.48772H33.0249C34.8499 8.48772 36.0204 7.4443 36.0204 5.83052C36.0204 4.21681 34.8499 3.17334 33.0249 3.17334H29.375V11.6667ZM31.3636 6.84972V4.81136H32.8236C33.5787 4.81136 34.0318 5.19958 34.0318 5.83052C34.0318 6.4615 33.5787 6.84972 32.8236 6.84972H31.3636ZM39.618 11.7637C41.5563 11.7637 42.9659 10.429 42.9659 8.60905C42.9659 6.78905 41.5563 5.45438 39.618 5.45438C37.6546 5.45438 36.2701 6.78905 36.2701 8.60905C36.2701 10.429 37.6546 11.7637 39.618 11.7637ZM38.1077 8.60905C38.1077 7.63838 38.7118 6.97105 39.618 6.97105C40.5116 6.97105 41.1157 7.63838 41.1157 8.60905C41.1157 9.57972 40.5116 10.2471 39.618 10.2471C38.7118 10.2471 38.1077 9.57972 38.1077 8.60905ZM46.1482 11.7637C47.6333 11.7637 48.6402 10.8658 48.6402 9.81025C48.6402 7.33505 45.2294 8.13585 45.2294 7.16518C45.2294 6.8983 45.5189 6.72843 45.9342 6.72843C46.3622 6.72843 46.8782 6.98318 47.0418 7.54132L48.527 6.94678C48.2375 6.06105 47.1677 5.45438 45.8713 5.45438C44.4743 5.45438 43.6058 6.25518 43.6058 7.21372C43.6058 9.53118 46.9663 8.88812 46.9663 9.84665C46.9663 10.1864 46.6391 10.417 46.1482 10.417C45.4434 10.417 44.9525 9.94376 44.8015 9.3735L43.3164 9.93158C43.6436 10.8537 44.6001 11.7637 46.1482 11.7637ZM53.4241 11.606L53.2982 10.0651C53.0843 10.1743 52.8074 10.2106 52.5808 10.2106C52.1278 10.2106 51.8257 9.89523 51.8257 9.34918V7.03172H53.3612V5.55145H51.8257V3.78001H49.9755V5.55145H48.9687V7.03172H49.9755V9.57972C49.9755 11.06 51.0202 11.7637 52.3921 11.7637C52.7696 11.7637 53.122 11.7031 53.4241 11.606ZM59.8749 3.17334V6.47358H56.376V3.17334H54.3874V11.6667H56.376V8.11158H59.8749V11.6667H61.8761V3.17334H59.8749ZM66.2899 11.7637C68.2281 11.7637 69.6378 10.429 69.6378 8.60905C69.6378 6.78905 68.2281 5.45438 66.2899 5.45438C64.3265 5.45438 62.942 6.78905 62.942 8.60905C62.942 10.429 64.3265 11.7637 66.2899 11.7637ZM64.7796 8.60905C64.7796 7.63838 65.3837 6.97105 66.2899 6.97105C67.1835 6.97105 67.7876 7.63838 67.7876 8.60905C67.7876 9.57972 67.1835 10.2471 66.2899 10.2471C65.3837 10.2471 64.7796 9.57972 64.7796 8.60905ZM73.2088 11.4725C73.901 11.4725 74.5177 11.242 74.845 10.8416V11.424C74.845 12.1034 74.2786 12.5767 73.4102 12.5767C72.7935 12.5767 72.2523 12.2854 72.1642 11.788L70.4776 12.0428C70.7042 13.1955 71.925 13.972 73.4102 13.972C75.361 13.972 76.6574 12.8679 76.6574 11.2298V5.55145H74.8324V6.07318C74.4926 5.69705 73.9136 5.45438 73.171 5.45438C71.409 5.45438 70.3014 6.61918 70.3014 8.46345C70.3014 10.3077 71.409 11.4725 73.2088 11.4725ZM72.1012 8.46345C72.1012 7.55345 72.655 6.97105 73.5109 6.97105C74.3793 6.97105 74.9331 7.55345 74.9331 8.46345C74.9331 9.37345 74.3793 9.95585 73.5109 9.95585C72.655 9.95585 72.1012 9.37345 72.1012 8.46345Z",fill:"currentColor"})]})]}),Uc("defs",{children:Uc("clipPath",{id:"clip0_2415_6911",children:Uc("rect",{width:"76",height:"14",fill:"white",transform:"translate(0.5)"})})})]});function Qc(){return Uc("a",{href:"https://posthog.com/surveys",target:"_blank",rel:"noopener",className:"footer-branding",children:["Survey by ",Yc]})}function Xc(e){var t=e.text,n=e.submitDisabled,r=e.appearance,i=e.onSubmit,o=e.link,s=e.onPreviewSubmit,a=e.skipSubmitButton,u=Zo(Fc).isPreviewMode;return Uc("div",{className:"bottom-section",children:[!a&&Uc("button",{className:"form-submit",disabled:n,"aria-label":"Submit survey",type:"button",onClick:function(){o&&(null==ps||ps.open(o)),u?null==s||s():i()},children:t}),!r.whiteLabel&&Uc(Qc,{})]})}function Jc(e){var t=e.question,n=e.forceDisableHtml,r=e.htmlFor;return Uc("div",{class:"question-header",children:[Uc(t.type===as.Open?"label":"h3",{className:"survey-question",htmlFor:r,children:t.question}),t.description&&Rc({component:ao("p",{className:"survey-question-description"}),children:t.description,renderAsHtml:!n&&"text"!==t.descriptionContentType})]})}function Kc(e){return Uc("button",{className:"form-cancel",onClick:e.onClick,disabled:Zo(Fc).isPreviewMode,"aria-label":"Close survey",type:"button",children:Zc})}Uc("svg",{width:"16",height:"12",viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Uc("path",{d:"M5.30769 10.6923L4.77736 11.2226C4.91801 11.3633 5.10878 11.4423 5.30769 11.4423C5.5066 11.4423 5.69737 11.3633 5.83802 11.2226L5.30769 10.6923ZM15.5303 1.53033C15.8232 1.23744 15.8232 0.762563 15.5303 0.46967C15.2374 0.176777 14.7626 0.176777 14.4697 0.46967L15.5303 1.53033ZM1.53033 5.85429C1.23744 5.56139 0.762563 5.56139 0.46967 5.85429C0.176777 6.14718 0.176777 6.62205 0.46967 6.91495L1.53033 5.85429ZM5.83802 11.2226L15.5303 1.53033L14.4697 0.46967L4.77736 10.162L5.83802 11.2226ZM0.46967 6.91495L4.77736 11.2226L5.83802 10.162L1.53033 5.85429L0.46967 6.91495Z",fill:"currentColor"})});var ed=ps;function td(e){var t=e.header,n=e.description,r=e.contentType,i=e.forceDisableHtml,o=e.appearance,s=e.onClose,a=Zo(Fc).isPopup;return Bo((function(){var e=function(e){"Enter"!==e.key&&"Escape"!==e.key||(e.preventDefault(),s())};return Qa(ed,"keydown",e),function(){ed.removeEventListener("keydown",e)}}),[s]),Uc("div",{className:"thank-you-message",role:"status",tabIndex:0,"aria-atomic":"true",children:[a&&!0!==o.hideCancelButton&&Uc(Kc,{onClick:function(){return s()}}),Uc("h3",{className:"thank-you-message-header",children:t}),n&&Rc({component:ao("p",{className:"thank-you-message-body"}),children:n,renderAsHtml:!i&&"text"!==r}),a&&Uc(Xc,{text:o.thankYouMessageCloseButtonText||"Close",submitDisabled:!1,appearance:o,onSubmit:function(){return s()}})]})}var nd=function(e){return qs(e)&&e.every((function(e){return Us(e)}))};function rd(e){var t=e.question,n=e.forceDisableHtml,r=e.appearance,i=e.onSubmit,o=e.onPreviewSubmit,s=e.displayQuestionIndex,a=e.initialValue,u=Lc().isPreviewMode,l=Wo(null),c=zo((function(){return Us(a)?a:""})),d=c[0],f=c[1];Bo((function(){setTimeout((function(){var e;u||(null==(e=l.current)||e.focus())}),100)}),[u]);var p="surveyQuestion"+s;return Uc(lo,{children:[Uc("div",{className:"question-container",children:[Uc(Jc,{question:t,forceDisableHtml:n,htmlFor:p}),Uc("textarea",{ref:l,id:p,rows:4,placeholder:null==r?void 0:r.placeholder,onInput:function(e){f(e.currentTarget.value),e.stopPropagation()},onKeyDown:function(e){e.stopPropagation()},value:d})]}),Uc(Xc,{text:t.buttonText||"Submit",submitDisabled:!d&&!t.optional,appearance:r,onSubmit:function(){return i(d)},onPreviewSubmit:function(){return o(d)}})]})}function id(e){var t=e.question,n=e.forceDisableHtml,r=e.appearance,i=e.onSubmit,o=e.onPreviewSubmit;return Uc(lo,{children:[Uc("div",{className:"question-container",children:Uc(Jc,{question:t,forceDisableHtml:n})}),Uc(Xc,{text:t.buttonText||"Submit",submitDisabled:!1,link:t.link,appearance:r,onSubmit:function(){return i("link clicked")},onPreviewSubmit:function(){return o("link clicked")}})]})}function od(e){var t=e.question,n=e.forceDisableHtml,r=e.displayQuestionIndex,i=e.appearance,o=e.onSubmit,s=e.onPreviewSubmit,a=e.initialValue,u=t.scale,l=10===t.scale?0:1,c=zo((function(){return Ws(a)?a:qs(a)&&a.length>0&&Ws(parseInt(a[0]))?parseInt(a[0]):Us(a)&&Ws(parseInt(a))?parseInt(a):null})),d=c[0],f=c[1],p=Lc().isPreviewMode,_=function(e){return p?s(e):o(e)};return Uc(lo,{children:[Uc("div",{className:"question-container",children:[Uc(Jc,{question:t,forceDisableHtml:n}),Uc("div",{className:"rating-section",children:[Uc("div",{className:"rating-options",children:["emoji"===t.display&&Uc("div",{className:"rating-options-emoji",children:(3===t.scale?ud:ld).map((function(e,n){return Uc("button",{"aria-label":"Rate "+(n+1),className:"ratings-emoji question-"+r+"-rating-"+n+" "+(n+1===d?"rating-active":""),value:n+1,type:"button",onClick:function(){var e=n+1;f(e),t.skipSubmitButton&&_(e)},children:e},n)}))}),"number"===t.display&&Uc("div",{className:"rating-options-number",style:{gridTemplateColumns:"repeat("+(u-l+1)+", minmax(0, 1fr))"},children:pd(t.scale).map((function(e,n){return Uc(sd,{displayQuestionIndex:r,active:d===e,appearance:i,num:e,setActiveNumber:function(e){f(e),t.skipSubmitButton&&_(e)}},n)}))})]}),Uc("div",{className:"rating-text",children:[Uc("div",{children:t.lowerBoundLabel}),Uc("div",{children:t.upperBoundLabel})]})]})]}),Uc(Xc,{text:t.buttonText||(null==i?void 0:i.submitButtonText)||"Submit",submitDisabled:zs(d)&&!t.optional,appearance:i,onSubmit:function(){return o(d)},onPreviewSubmit:function(){return s(d)},skipSubmitButton:t.skipSubmitButton})]})}function sd(e){var t=e.num,n=e.active,r=e.displayQuestionIndex,i=e.setActiveNumber;return Uc("button",{"aria-label":"Rate "+t,className:"ratings-number question-"+r+"-rating-"+t+" "+(n?"rating-active":""),type:"button",onClick:function(){i(t)},children:t})}function ad(e){var t=e.question,n=e.forceDisableHtml,r=e.displayQuestionIndex,i=e.appearance,o=e.onSubmit,s=e.onPreviewSubmit,a=e.initialValue,u=Wo(null),l=Go((function(){return function(e){if(!e.shuffleOptions)return e.choices;var t=e.choices,n="";e.hasOpenChoice&&(n=t.pop());var r=Cc(t,Pc(t));return e.hasOpenChoice&&(e.choices.push(n),r.push(n)),r}(t)}),[t]),c=zo((function(){return function(e,t){return Us(e)||nd(e)?e:t===as.SingleChoice?null:[]}(a,t.type)})),d=c[0],f=c[1],p=zo((function(){return function(e,t){if(Us(e)&&!t.includes(e))return{isSelected:!0,inputValue:e};if(nd(e)){var n=e.find((function(e){return!t.includes(e)}));if(n)return{isSelected:!0,inputValue:n}}return{isSelected:!1,inputValue:""}}(a,l)})),_=p[0],h=p[1],v=Lc().isPreviewMode,g=t.type===as.SingleChoice,m=t.type===as.MultipleChoice,y=t.skipSubmitButton&&g&&!t.hasOpenChoice,b=function(e,t){if(t){var n=!_.isSelected;return h((function(e){return Ui({},e,{isSelected:n,inputValue:n?e.inputValue:""})})),g&&f(""),void(n&&setTimeout((function(){var e;return null==(e=u.current)?void 0:e.focus()}),75))}if(g)return f(e),h((function(e){return Ui({},e,{isSelected:!1,inputValue:""})})),void(y&&(o(e),v&&s(e)));m&&qs(d)&&(d.includes(e)?f(d.filter((function(t){return t!==e}))):f([].concat(d,[e])))},w=function(e){e.stopPropagation();var t=e.currentTarget.value;h((function(e){return Ui({},e,{inputValue:t})})),g&&f(t)},S=function(e){e.stopPropagation(),"Enter"!==e.key||x()||(e.preventDefault(),E()),"Escape"===e.key&&(e.preventDefault(),h((function(e){return Ui({},e,{isSelected:!1,inputValue:""})})),g&&f(null))},x=function(){return!t.optional&&(!!zs(d)||(!(!qs(d)||_.isSelected||0!==d.length)||!(!_.isSelected||""!==_.inputValue.trim())))},E=function(){_.isSelected&&m?qs(d)&&(v?s([].concat(d,[_.inputValue])):o([].concat(d,[_.inputValue]))):v?s(d):o(d)};return Uc(lo,{children:[Uc("div",{className:"question-container",children:[Uc(Jc,{question:t,forceDisableHtml:n}),Uc("fieldset",{className:"multiple-choice-options limit-height",children:[Uc("legend",{className:"sr-only",children:m?" Select all that apply":" Select one"}),l.map((function(e,n){var i=!!t.hasOpenChoice&&n===t.choices.length-1,o="surveyQuestion"+r+"Choice"+n,s=o+"Open",a=i?_.isSelected:g?d===e:qs(d)&&d.includes(e);return Uc("label",{className:i?"choice-option-open":"",children:[Uc("div",{className:"response-choice",children:[Uc("input",{type:g?"radio":"checkbox",name:o,checked:a,onChange:function(){return b(e,i)},id:o,"aria-controls":s}),Uc("span",{children:i?e+":":e})]}),i&&Uc("input",{type:"text",ref:u,id:s,name:"question"+r+"Open",value:_.inputValue,onKeyDown:S,onInput:w,onClick:function(t){_.isSelected||b(e,!0),t.stopPropagation()},"aria-label":e+" - please specify"})]},n)}))]})]}),Uc(Xc,{text:t.buttonText||"Submit",submitDisabled:x(),appearance:i,onSubmit:E,onPreviewSubmit:E,skipSubmitButton:y})]})}var ud=[Bc,zc,Vc],ld=[Wc,Bc,zc,Vc,Gc],cd=[1,2,3,4,5],dd=[1,2,3,4,5,6,7],fd=[0,1,2,3,4,5,6,7,8,9,10];function pd(e){switch(e){case 5:default:return cd;case 7:return dd;case 10:return fd}}var _d=ps,hd=ys,vd="ph:show_survey_widget",gd="PHWidgetSurveyClickListener";function md(e,t,n){var r,i=e.questions[t],o=t+1;if(null==(r=i.branching)||!r.type)return t===e.questions.length-1?us.End:o;if(i.branching.type===us.End)return us.End;if(i.branching.type===us.SpecificQuestion){if(Number.isInteger(i.branching.index))return i.branching.index}else if(i.branching.type===us.ResponseBased){if(i.type===as.SingleChoice){var s,a=i.choices.indexOf(""+n);if(-1===a&&i.hasOpenChoice&&(a=i.choices.length-1),null!=(s=i.branching)&&null!=(s=s.responseValues)&&s.hasOwnProperty(a)){var u=i.branching.responseValues[a];return Number.isInteger(u)?u:u===us.End?us.End:o}}else if(i.type===as.Rating){var l;if("number"!=typeof n||!Number.isInteger(n))throw new Error("The response type must be an integer");var c=function(e,t){if(3===t){if(e<1||e>3)throw new Error("The response must be in range 1-3");return 1===e?"negative":2===e?"neutral":"positive"}if(5===t){if(e<1||e>5)throw new Error("The response must be in range 1-5");return e<=2?"negative":3===e?"neutral":"positive"}if(7===t){if(e<1||e>7)throw new Error("The response must be in range 1-7");return e<=3?"negative":4===e?"neutral":"positive"}if(10===t){if(e<0||e>10)throw new Error("The response must be in range 0-10");return e<=6?"detractors":e<=8?"passives":"promoters"}throw new Error("The scale must be one of: 3, 5, 7, 10")}(n,i.scale);if(null!=(l=i.branching)&&null!=(l=l.responseValues)&&l.hasOwnProperty(c)){var d=i.branching.responseValues[c];return Number.isInteger(d)?d:d===us.End?us.End:o}}return o}return Xa.warn("Falling back to next question index due to unexpected branching type"),o}var yd=250,bd=20,wd=12;var Sd=function(){function e(e){var t=this;this._surveyTimeouts=new Map,this._widgetSelectorListeners=new Map,this._prefillHandledSurveys=new Set,this.handlePopoverSurvey=function(e){var n;t._clearSurveyTimeout(e.id),t._addSurveyToFocus(e);var r=(null==(n=e.appearance)?void 0:n.surveyPopupDelaySeconds)||0,i=Sc(e,t._posthog).shadow;if(r<=0)return Io(Uc(Cd,{posthog:t._posthog,survey:e,removeSurveyFromFocus:t._removeSurveyFromFocus}),i);var o=setTimeout((function(){if(t._surveyTimeouts.delete(e.id),!Mc(e))return t._removeSurveyFromFocus(e);Io(Uc(Cd,{posthog:t._posthog,survey:Ui({},e,{appearance:Ui({},e.appearance,{surveyPopupDelaySeconds:0})}),removeSurveyFromFocus:t._removeSurveyFromFocus}),i)}),1e3*r);t._surveyTimeouts.set(e.id,o)},this._handleWidget=function(e){var n=Sc(e,t._posthog),r=n.shadow;n.isNewlyCreated&&Io(Uc(Id,{posthog:t._posthog,survey:e},e.id),r)},this._removeWidgetSelectorListener=function(e){t._removeSurveyFromDom(e);var n=t._widgetSelectorListeners.get(e.id);n&&(n.element.removeEventListener("click",n.listener),n.element.removeAttribute(gd),t._widgetSelectorListeners.delete(e.id),Xa.info("Removed click listener for survey "+e.id))},this._manageWidgetSelectorListener=function(e,n){var r=hd.querySelector(n),i=t._widgetSelectorListeners.get(e.id);if(r){if(t._handleWidget(e),i){if(r===i.element)return;Xa.info("Selector element changed for survey "+e.id+". Re-attaching listener."),t._removeWidgetSelectorListener(e)}if(!r.hasAttribute(gd)){var o=function(t){var n,r;t.stopPropagation();var i=(null==(n=e.appearance)?void 0:n.position)===is.NextToTrigger?function(e,t){try{var n=e.getBoundingClientRect(),r=_d.innerHeight,i=_d.innerWidth,o=yd,s=n.left+n.width/2-t/2;s+t>i-bd&&(s=i-t-bd),s<bd&&(s=bd);var a=wd,u=r-n.bottom,l=n.top,c=u<o&&l>u;return{position:"fixed",top:c?"auto":n.bottom+a+"px",left:s+"px",right:"auto",bottom:c?r-n.top+a+"px":"auto",zIndex:mc.zIndex}}catch(e){return Xa.warn("Failed to calculate trigger position:",e),null}}(t.currentTarget,parseInt((null==(r=e.appearance)?void 0:r.maxWidth)||mc.maxWidth)):{};_d.dispatchEvent(new CustomEvent(vd,{detail:{surveyId:e.id,position:i}}))};Qa(r,"click",o),r.setAttribute(gd,"true"),t._widgetSelectorListeners.set(e.id,{element:r,listener:o,survey:e}),Xa.info("Attached click listener for feedback button survey "+e.id)}}else i&&t._removeWidgetSelectorListener(e)},this.renderPopover=function(e){var n=Sc(e,t._posthog).shadow;Io(Uc(Cd,{posthog:t._posthog,survey:e,removeSurveyFromFocus:t._removeSurveyFromFocus}),n)},this.renderSurvey=function(e,n){var r;null!=(r=t._posthog.config)&&null!=(r=r.surveys)&&r.prefillFromUrl&&t._handleUrlPrefill(e),Io(Uc(Cd,{posthog:t._posthog,survey:e,removeSurveyFromFocus:t._removeSurveyFromFocus,isPopup:!1}),n)},this.getActiveMatchingSurveys=function(e,n){var r;void 0===n&&(n=!1),null==(r=t._posthog)||r.surveys.getSurveys((function(n){var r=n.filter((function(e){return t.checkSurveyEligibility(e).eligible&&t._isSurveyConditionMatched(e)&&t._hasActionOrEventTriggeredSurvey(e)&&t._checkFlags(e)}));e(r)}),n)},this.callSurveysAndEvaluateDisplayLogic=function(e){void 0===e&&(e=!1),t.getActiveMatchingSurveys((function(e){var n=e.filter((function(e){return e.type===ss.Popover||e.type===ss.Widget})),r=t._sortSurveysByAppearanceDelay(n),i=new Set;r.forEach((function(e){if(e.type===ss.Widget){var n,r,o,s;if((null==(n=e.appearance)?void 0:n.widgetType)===rs.Tab)return void t._handleWidget(e);if((null==(r=e.appearance)?void 0:r.widgetType)===rs.Selector&&null!=(o=e.appearance)&&o.widgetSelector)i.add(e.id),t._manageWidgetSelectorListener(e,null==(s=e.appearance)?void 0:s.widgetSelector)}zs(t._surveyInFocus)&&e.type===ss.Popover&&t.handlePopoverSurvey(e)})),t._widgetSelectorListeners.forEach((function(e){var n=e.survey;i.has(n.id)||t._removeWidgetSelectorListener(n)}))}),e)},this._addSurveyToFocus=function(e){zs(t._surveyInFocus)||Xa.error("Survey "+t._surveyInFocus+" already in focus. Cannot add survey "+e.id+"."),t._surveyInFocus=e.id},this._removeSurveyFromFocus=function(e){t._surveyInFocus!==e.id&&Xa.error("Survey "+e.id+" is not in focus. Cannot remove survey "+e.id+"."),t._clearSurveyTimeout(e.id),t._surveyInFocus=null,t._removeSurveyFromDom(e)},this._posthog=e,this._surveyInFocus=null}var t=e.prototype;return t._clearSurveyTimeout=function(e){var t=this._surveyTimeouts.get(e);t&&(clearTimeout(t),this._surveyTimeouts.delete(e))},t.cancelSurvey=function(e){this._surveyTimeouts.has(e)&&(Xa.info("Cancelled pending survey "+e),this._clearSurveyTimeout(e),this._surveyInFocus===e&&(this._surveyInFocus=null))},t._sortSurveysByAppearanceDelay=function(e){return e.sort((function(e,t){var n,r,i=$c(e),o=$c(t);if(i&&!o)return-1;if(!i&&o)return 1;var s=e.schedule===ls.Always,a=t.schedule===ls.Always;return s&&!a?1:!s&&a?-1:((null==(n=e.appearance)?void 0:n.surveyPopupDelaySeconds)||0)-((null==(r=t.appearance)?void 0:r.surveyPopupDelaySeconds)||0)}))},t._handleUrlPrefill=function(e){if(!this._prefillHandledSurveys.has(e.id))try{var t=function(e){var t={},n=!1,r=e.replace(/^\?/,"");if(!r)return{params:t,autoSubmit:n};for(var i,o=ji(r.split("&"));!(i=o()).done;){var s=i.value.split("="),a=s[0],u=s[1];if(a&&!js(u)){var l=decodeURIComponent(a),c=decodeURIComponent(u);if("auto_submit"!==l||"true"!==c){var d=l.match(/^q(\d+)$/);if(d){var f=parseInt(d[1],10);t[f]||(t[f]=[]),t[f].push(c)}}else n=!0}}return{params:t,autoSubmit:n}}(_d.location.search),n=t.params;if(0===Object.keys(n).length)return;Xa.info("[Survey Prefill] Detected URL prefill parameters");var r=function(e,t){var n={};return e.questions.forEach((function(e,r){if(t[r]&&e.id){var i=t[r],o=vc(e.id);try{switch(e.type){case as.SingleChoice:if(!e.choices||0===e.choices.length)return void Aa.warn("[Survey Prefill] Question "+r+" has no choices");var s=parseInt(i[0],10);if(isNaN(s)||s<0||s>=e.choices.length)return void Aa.warn("[Survey Prefill] Invalid choice index for q"+r+": "+i[0]);n[o]=e.choices[s];break;case as.MultipleChoice:if(!e.choices||0===e.choices.length)return void Aa.warn("[Survey Prefill] Question "+r+" has no choices");var a=i.map((function(e){return parseInt(e,10)})).filter((function(t){return!isNaN(t)&&t>=0&&t<e.choices.length}));if(0===a.length)return void Aa.warn("[Survey Prefill] No valid choices for q"+r);var u=[].concat(new Set(a.map((function(t){return e.choices[t]}))));u.length<a.length&&Aa.warn("[Survey Prefill] Removed duplicate choices for q"+r),n[o]=u;break;case as.Rating:var l=parseInt(i[0],10),c=e.scale||10;if(isNaN(l)||l<0||l>c)return void Aa.warn("[Survey Prefill] Invalid rating for q"+r+": "+i[0]+" (scale: 0-"+c+")");n[o]=l;break;default:Aa.info("[Survey Prefill] Question type "+e.type+" does not support prefill")}}catch(e){Aa.error("[Survey Prefill] Error converting q"+r+":",e)}}})),n}(e,n);if(0===Object.keys(r).length)return void Xa.warn("[Survey Prefill] No valid responses after conversion");var i=hu(),o=Object.keys(n).map((function(e){return parseInt(e,10)})),s=function(e,t){for(var n=0,r=0;r<e.length&&t.includes(r);r++){var i=e[r];if(!(i&&"skipSubmitButton"in i&&i.skipSubmitButton))break;n=r+1}return n}(e.questions,o),a=s>=e.questions.length;Dc(e,{surveySubmissionId:i,responses:r,lastQuestionIndex:a?e.questions.length-1:s}),Xa.info("[Survey Prefill] Stored prefilled responses in localStorage"),(e.enable_partial_responses||a)&&(Xa.info("[Survey Prefill] Auto-submitting survey (completed: "+a+")"),Ec({responses:r,survey:e,surveySubmissionId:i,posthog:this._posthog,isSurveyCompleted:a})),this._prefillHandledSurveys.add(e.id)}catch(e){Xa.error("[Survey Prefill] Error handling URL prefill:",e)}},t._isSurveyFeatureFlagEnabled=function(e,t){if(void 0===t&&(t=void 0),!e)return!0;var n=!!this._posthog.featureFlags.isFeatureEnabled(e,{send_event:!e.startsWith("survey-targeting-")}),r=!0;t&&(r=this._posthog.featureFlags.getFeatureFlag(e,{send_event:!1})===t||"any"===t);return n&&r},t._isSurveyConditionMatched=function(e){return!e.conditions||Mc(e)&&function(e){var t,n,r;if(null==(t=e.conditions)||!t.deviceTypes||0===(null==(n=e.conditions)?void 0:n.deviceTypes.length))return!0;if(!Es)return!1;var i=pl(Es);return cc[Oc(null==(r=e.conditions)?void 0:r.deviceTypesMatchType)](e.conditions.deviceTypes,[i])}(e)&&function(e){var t;return null==(t=e.conditions)||!t.selector||!(null==hc||!hc.querySelector(e.conditions.selector))}(e)},t._internalFlagCheckSatisfied=function(e){return Ic(e)||this._isSurveyFeatureFlagEnabled(e.internal_targeting_flag_key)||$c(e)},t.checkSurveyEligibility=function(e){var t,n,r={eligible:!0,reason:void 0};if(!Ja(e))return r.eligible=!1,r.reason="Survey is not running. It was completed on "+e.end_date,r;if(!su.includes(e.type))return r.eligible=!1,r.reason="Surveys of type "+e.type+" are never eligible to be shown in the app",r;var i=null==(t=e.conditions)?void 0:t.linkedFlagVariant;return this._isSurveyFeatureFlagEnabled(e.linked_flag_key,i)?this._isSurveyFeatureFlagEnabled(e.targeting_flag_key)?this._internalFlagCheckSatisfied(e)?function(e){var t=localStorage.getItem("lastSeenSurveyDate");if(!e||!t)return!0;var n=new Date,r=Math.abs(n.getTime()-new Date(t).getTime());return Math.ceil(r/864e5)>e}(null==(n=e.conditions)?void 0:n.seenSurveyWaitPeriodInDays)?function(e){return!!localStorage.getItem(iu(e))&&!Ic(e)}(e)?(r.eligible=!1,r.reason="Survey has already been seen and it can't be activated again",r):r:(r.eligible=!1,r.reason="Survey wait period has not passed",r):(r.eligible=!1,r.reason="Survey internal targeting flag is not enabled and survey cannot activate repeatedly and survey is not in progress",r):(r.eligible=!1,r.reason="Survey targeting feature flag is not enabled",r):(r.eligible=!1,r.reason=i?"Survey linked feature flag is not enabled for variant "+i:"Survey linked feature flag is not enabled",r)},t._hasActionOrEventTriggeredSurvey=function(e){var t;if(!Ka(e)&&!eu(e))return!0;var n=null==(t=this._posthog.surveys._surveyEventReceiver)?void 0:t.getSurveys();return!(null==n||!n.includes(e.id))},t._checkFlags=function(e){var t,n=this;return null==(t=e.feature_flag_keys)||!t.length||e.feature_flag_keys.every((function(e){var t=e.key,r=e.value;return!t||!r||n._isSurveyFeatureFlagEnabled(r)}))},t._removeSurveyFromDom=function(e){try{var t=hd.querySelector(Hc(e,!0));null!=t&&t.shadowRoot&&Io(null,t.shadowRoot),null==t||t.remove()}catch(t){Xa.warn("Failed to remove survey "+e.id+" from DOM:",t)}},t.getTestAPI=function(){return{addSurveyToFocus:this._addSurveyToFocus,removeSurveyFromFocus:this._removeSurveyFromFocus,surveyInFocus:this._surveyInFocus,surveyTimeouts:this._surveyTimeouts,handleWidget:this._handleWidget,handlePopoverSurvey:this.handlePopoverSurvey,manageWidgetSelectorListener:this._manageWidgetSelectorListener,sortSurveysByAppearanceDelay:this._sortSurveysByAppearanceDelay,checkFlags:this._checkFlags.bind(this),isSurveyFeatureFlagEnabled:this._isSurveyFeatureFlagEnabled.bind(this)}},e}();function xd(e,t){if(hd&&_d){var n,r=new Sd(e);if(e.config.disable_surveys_automatic_display)return Xa.info("Surveys automatic display is disabled. Skipping call surveys and evaluate display logic."),r;if(!1===t)return Xa.info("There are no surveys to load or Surveys is disabled in the project settings."),r;r.callSurveysAndEvaluateDisplayLogic(!0);var i=function(){js(n)&&(n=setInterval((function(){r.callSurveysAndEvaluateDisplayLogic(!1)}),1e3))};return i(),Qa(hd,"visibilitychange",(function(){hd.hidden?js(n)||(clearInterval(n),n=void 0):(r.callSurveysAndEvaluateDisplayLogic(!1),i())})),r}}function Ed(e){var t=e.survey,n=e.removeSurveyFromFocus,r=void 0===n?function(){}:n,i=e.setSurveyVisible,o=e.isPreviewMode,s=void 0!==o&&o;Bo((function(){var e;if(!s&&null!=(e=t.conditions)&&e.url){var n=function(){var e,n=t.type===ss.Widget,o=Mc(t),s=(null==(e=t.appearance)?void 0:e.widgetType)===rs.Tab&&n;if(!o)return Xa.info("Hiding survey "+t.id+" because URL does not match"),i(!1),r(t);s&&(Xa.info("Showing survey "+t.id+" because it is a feedback button tab and URL matches"),i(!0))};Qa(_d,"popstate",n),Qa(_d,"hashchange",n);var o=_d.history.pushState,a=_d.history.replaceState;return _d.history.pushState=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];o.apply(this,t),n()},_d.history.replaceState=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];a.apply(this,t),n()},function(){_d.removeEventListener("popstate",n),_d.removeEventListener("hashchange",n),_d.history.pushState=o,_d.history.replaceState=a}}}),[s,t,r,i])}function kd(e,t,n){if(void 0===t&&(t=is.Right),e===ss.ExternalSurvey)return{};switch(t){case is.TopLeft:return{top:"0",left:"0",transform:"translate(30px, 30px)"};case is.TopRight:return{top:"0",right:"0",transform:"translate(-30px, 30px)"};case is.TopCenter:return{top:"0",left:"50%",transform:"translate(-50%, 30px)"};case is.MiddleLeft:return{top:"50%",left:"0",transform:"translate(30px, -50%)"};case is.MiddleRight:return{top:"50%",right:"0",transform:"translate(-30px, -50%)"};case is.MiddleCenter:return{top:"50%",left:"50%",transform:"translate(-50%, -50%)"};case is.Left:return{left:"30px"};case is.Center:return{left:"50%",transform:"translateX(-50%)"};default:case is.Right:return{right:e===ss.Widget&&n===rs.Tab?"60px":"30px"}}}function Pd(e){switch(void 0===e&&(e=os.Right),e){case os.Top:return{top:"0",left:"50%",transform:"translateX(-50%)"};case os.Left:return{top:"50%",left:"0",transform:"rotate(90deg) translateY(-100%)",transformOrigin:"left top"};case os.Bottom:return{bottom:"0",left:"50%",transform:"translateX(-50%)"};default:case os.Right:return{top:"50%",right:"0",transform:"rotate(-90deg) translateY(-100%)",transformOrigin:"right top"}}}function Cd(e){var t,n,r,i,o,s,a=e.survey,u=e.forceDisableHtml,l=e.posthog,c=e.style,d=void 0===c?{}:c,f=e.previewPageIndex,p=e.removeSurveyFromFocus,_=void 0===p?function(){}:p,h=e.isPopup,v=void 0===h||h,g=e.onPreviewSubmit,m=void 0===g?function(){}:g,y=e.onPopupSurveyDismissed,b=void 0===y?function(){}:y,w=e.onCloseConfirmationMessage,S=void 0===w?function(){}:w,x=Wo(null),E=Number.isInteger(f),k=null!=(t=a.appearance)&&t.surveyPopupDelaySeconds?1e3*a.appearance.surveyPopupDelaySeconds:0,P=function(e,t,n,r,i,o,s){var a=zo(r||0===n||e.type===ss.ExternalSurvey),u=a[0],l=a[1],c=zo(!1),d=c[0],f=c[1],p=function(){var t=function(){o&&i(e),l(!1)};hd.startViewTransition?hd.startViewTransition((function(){var e;null==s||null==(e=s.current)||e.remove()})).finished.then((function(){setTimeout((function(){t()}),100)})):t()},_=function(t){t.detail.surveyId===e.id&&p()};return Bo((function(){if(t){if(!r){var i=function(t){var n,r;if(t.detail.surveyId===e.id){if(null==(n=e.appearance)||!n.displayThankYouMessage)return p();f(!0),null!=(r=e.appearance)&&r.autoDisappear&&setTimeout((function(){p()}),5e3)}},o=function(){var n;Mc(e)&&(l(!0),_d.dispatchEvent(new Event("PHSurveyShown")),t.capture(cs.SHOWN,((n={})[ds.SURVEY_NAME]=e.name,n[ds.SURVEY_ID]=e.id,n[ds.SURVEY_ITERATION]=e.current_iteration,n[ds.SURVEY_ITERATION_START_DATE]=e.current_iteration_start_date,n.sessionRecordingUrl=null==t.get_session_replay_url?void 0:t.get_session_replay_url(),n)),localStorage.setItem("lastSeenSurveyDate",(new Date).toISOString()))};if(Qa(_d,"PHSurveyClosed",_),Qa(_d,"PHSurveySent",i),n>0){var s=setTimeout(o,n);return function(){clearTimeout(s),_d.removeEventListener("PHSurveyClosed",_),_d.removeEventListener("PHSurveySent",i)}}return o(),function(){_d.removeEventListener("PHSurveyClosed",_),_d.removeEventListener("PHSurveySent",i)}}}else Xa.error("usePopupVisibility hook called without a PostHog instance.")}),[]),Ed({survey:e,removeSurveyFromFocus:i,setSurveyVisible:l,isPreviewMode:r}),{isPopupVisible:u,isSurveySent:d,setIsPopupVisible:l,hidePopupWithViewTransition:p}}(a,l,k,E,_,v,x),C=P.isPopupVisible,T=P.isSurveySent,I=P.hidePopupWithViewTransition,F=T||f===a.questions.length,L=Go((function(){var e=qc(a);return{isPreviewMode:E,previewPageIndex:f,onPopupSurveyDismissed:function(){kc(a,l,E),b()},isPopup:v||!1,surveySubmissionId:(null==e?void 0:e.surveySubmissionId)||hu(),onPreviewSubmit:m,posthog:l}}),[E,f,v,l,a,b,m]);return C?Uc(Fc.Provider,{value:L,children:Uc("div",{className:"ph-survey",style:Ui({},kd(a.type,null==(n=a.appearance)?void 0:n.position,null==(r=a.appearance)?void 0:r.widgetType),d),ref:x,children:F?Uc(td,{header:(null==(i=a.appearance)?void 0:i.thankYouMessageHeader)||"Thank you!",description:(null==(o=a.appearance)?void 0:o.thankYouMessageDescription)||"",forceDisableHtml:!!u,contentType:null==(s=a.appearance)?void 0:s.thankYouMessageDescriptionContentType,appearance:a.appearance||mc,onClose:function(){I(),S()}}):Uc(Td,{survey:a,forceDisableHtml:!!u,posthog:l})})}):null}function Td(e){var t,n=e.survey,r=e.forceDisableHtml,i=e.posthog,o=zo((function(){var e=qc(n);return null!=e&&e.responses&&Xa.info("Survey is already in progress, filling in initial responses"),(null==e?void 0:e.responses)||{}})),s=o[0],a=o[1],u=Zo(Fc),l=u.previewPageIndex,c=u.onPopupSurveyDismissed,d=u.isPopup,f=u.onPreviewSubmit,p=u.surveySubmissionId,_=u.isPreviewMode,h=zo((function(){var e=qc(n);return l||(null==e?void 0:e.lastQuestionIndex)||0})),v=h[0],g=h[1],m=Go((function(){return Tc(n)}),[n]);Bo((function(){_&&!js(l)&&g(l)}),[l,_]);var y=m.at(v);return y?Uc("form",{className:"survey-form",name:"surveyForm",children:[d&&!0!==(null==(t=n.appearance)?void 0:t.hideCancelButton)&&Uc(Kc,{onClick:function(){c()}}),Uc("div",{className:"survey-box",children:Fd({question:y,forceDisableHtml:r,displayQuestionIndex:v,appearance:n.appearance||mc,onSubmit:function(e){return function(e){var t,r=e.res,o=e.displayQuestionIndex,u=e.questionId;if(i)if(u){var l=vc(u),c=Ui({},s,((t={})[l]=r,t));a(c);var d=md(n,o,r),f=d===us.End;f||(g(d),Dc(n,{surveySubmissionId:p,responses:c,lastQuestionIndex:d})),(n.enable_partial_responses||f)&&Ec({responses:c,survey:n,surveySubmissionId:p,isSurveyCompleted:f,posthog:i})}else Xa.error("onNextButtonClick called without a questionId.");else Xa.error("onNextButtonClick called without a PostHog instance.")}({res:e,displayQuestionIndex:v,questionId:y.id})},onPreviewSubmit:f,initialValue:y.id?s[vc(y.id)]:void 0})})]}):null}function Id(e){var t,n,r,i,o,s,a,u=e.survey,l=e.forceDisableHtml,c=e.posthog,d=e.readOnly,f=zo(!0),p=f[0],_=f[1],h=zo(!1),v=h[0],g=h[1],m=zo({}),y=m[0],b=m[1],w=function(){g(!v)};if(Bo((function(){var e;if(c){if(!d){"tab"===(null==(e=u.appearance)?void 0:e.widgetType)&&b({top:"50%",bottom:"auto"});var t=function(e){var t,n=e;(null==(t=n.detail)?void 0:t.surveyId)===u.id&&(Xa.info("Received show event for feedback button survey "+u.id),b(n.detail.position||{}),w())};return Qa(_d,vd,t),function(){_d.removeEventListener(vd,t)}}}else Xa.error("FeedbackWidget called without a PostHog instance.")}),[c,d,u.id,null==(t=u.appearance)?void 0:t.widgetType,null==(n=u.appearance)?void 0:n.widgetSelector,null==(r=u.appearance)?void 0:r.borderColor]),Ed({survey:u,setSurveyVisible:_}),!p)return null;var S=function(){u.schedule!==ls.Always&&_(!1),setTimeout((function(){g(!1)}),200)};return Uc(lo,{children:["tab"===(null==(i=u.appearance)?void 0:i.widgetType)&&Uc("button",{className:"ph-survey-widget-tab "+((null==(o=u.appearance)?void 0:o.tabPosition)===os.Top?"widget-tab-top":""),onClick:w,disabled:d,style:Pd(null==(s=u.appearance)?void 0:s.tabPosition),children:(null==(a=u.appearance)?void 0:a.widgetLabel)||""}),v&&Uc(Cd,{posthog:c,survey:u,forceDisableHtml:l,style:y,onPopupSurveyDismissed:S,onCloseConfirmationMessage:S})]})}var Fd=function(e){var t=e.question,n=e.forceDisableHtml,r=e.displayQuestionIndex,i=e.appearance,o=e.onSubmit,s=e.onPreviewSubmit,a={forceDisableHtml:n,appearance:i,onPreviewSubmit:function(e){s(e)},onSubmit:function(e){o(e)},initialValue:e.initialValue,displayQuestionIndex:r};switch(t.type){case as.Open:return ao(rd,Ui({},a,{question:t,key:t.id}));case as.Link:return ao(id,Ui({},a,{question:t,key:t.id}));case as.Rating:return ao(od,Ui({},a,{question:t,key:t.id}));case as.SingleChoice:case as.MultipleChoice:return ao(ad,Ui({},a,{question:t,key:t.id}));default:return Xa.error("Unsupported question type: "+t.type),null}};ks.__PosthogExtensions__=ks.__PosthogExtensions__||{},ks.__PosthogExtensions__.generateSurveys=xd,ks.extendPostHogWithSurveys=xd;var Ld="$people_distinct_id",Rd="__alias",Od="__timers",Md="$autocapture_disabled_server_side",Ad="$heatmaps_enabled_server_side",Dd="$exception_capture_enabled_server_side",qd="$error_tracking_suppression_rules",$d="$error_tracking_capture_extension_exceptions",Nd="$web_vitals_enabled_server_side",Hd="$dead_clicks_enabled_server_side",jd="$web_vitals_allowed_metrics",Ud="$session_recording_remote_config",Vd="$sesid",zd="$session_is_sampled",Bd="$enabled_feature_flags",Wd="$early_access_features",Gd="$feature_flag_details",Zd="$stored_person_properties",Yd="$stored_group_properties",Qd="$surveys",Xd="$surveys_activated",Jd="$flag_call_reported",Kd="$user_state",ef="$client_session_props",tf="$capture_rate_limit",nf="$initial_campaign_params",rf="$initial_referrer_info",of="$initial_person_info",sf="$epp",af="__POSTHOG_TOOLBAR__",uf="$posthog_cookieless",lf=[Ld,Rd,"__cmpns",Od,"$session_recording_enabled_server_side",Ad,Vd,Bd,qd,Kd,Wd,Gd,Yd,Zd,Qd,Jd,ef,tf,nf,rf,sf,of,"$conversations_widget_session_id","$conversations_ticket_id","$conversations_widget_state","$conversations_user_traits"],cf=Da("[Error tracking]");function df(){return new la([new xa,new Oa,new ka,new Ea,new La,new Fa,new Ca,new Ra],Sa("web:javascript",va,ya))}var ff=function(){function e(e){var t,n;this._suppressionRules=[],this._errorPropertiesBuilder=df(),this._instance=e,this._suppressionRules=null!==(t=null==(n=this._instance.persistence)?void 0:n.get_property(qd))&&void 0!==t?t:[]}var t=e.prototype;return t.onRemoteConfig=function(e){var t,n,r,i,o=null!==(t=null==(n=e.errorTracking)?void 0:n.suppressionRules)&&void 0!==t?t:[],s=null==(r=e.errorTracking)?void 0:r.captureExtensionExceptions;(this._suppressionRules=o,this._instance.persistence)&&this._instance.persistence.register(((i={})[qd]=this._suppressionRules,i[$d]=s,i))},t.buildProperties=function(e,t){return this._errorPropertiesBuilder.buildFromUnknown(e,{syntheticException:null==t?void 0:t.syntheticException,mechanism:{handled:null==t?void 0:t.handled}})},t.sendExceptionEvent=function(e){var t=e.$exception_list;if(this._isExceptionList(t)){if(this._matchesSuppressionRule(t))return void cf.info("Skipping exception capture because a suppression rule matched");if(!this._captureExtensionExceptions&&this._isExtensionException(t))return void cf.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this._isPostHogException(t))return void cf.info("Skipping exception capture because it was thrown by the PostHog SDK")}return this._instance.capture("$exception",e,{_noTruncate:!0,_batchKey:"exceptionEvent"})},t._matchesSuppressionRule=function(e){if(0===e.length)return!1;var t=e.reduce((function(e,t){var n=t.type,r=t.value;return Us(n)&&n.length>0&&e.$exception_types.push(n),Us(r)&&r.length>0&&e.$exception_values.push(r),e}),{$exception_types:[],$exception_values:[]});return this._suppressionRules.some((function(e){var n=e.values.map((function(e){var n,r=cc[e.operator],i=qs(e.value)?e.value:[e.value],o=null!==(n=t[e.key])&&void 0!==n?n:[];return i.length>0&&r(i,o)}));return"OR"===e.type?n.some(Boolean):n.every(Boolean)}))},t._isExtensionException=function(e){var t=e.flatMap((function(e){var t,n;return null!==(t=null==(n=e.stacktrace)?void 0:n.frames)&&void 0!==t?t:[]}));return t.some((function(e){return e.filename&&e.filename.startsWith("chrome-extension://")}))},t._isPostHogException=function(e){if(e.length>0){var t,n,r,i,o=null!==(t=null==(n=e[0].stacktrace)?void 0:n.frames)&&void 0!==t?t:[],s=o[o.length-1];return null!==(r=null==s||null==(i=s.filename)?void 0:i.includes("posthog.com/static"))&&void 0!==r&&r}return!1},t._isExceptionList=function(e){return!Bs(e)&&qs(e)},Hi(e,[{key:"_captureExtensionExceptions",get:function(){var e,t=!!this._instance.get_property($d),n=this._instance.config.error_tracking.captureExtensionExceptions;return null!==(e=null!=n?n:t)&&void 0!==e&&e}}])}(),pf=Da("[ExceptionAutocapture]"),_f=df(),hf={wrapOnError:function(e){var t=ps;t||pf.info("window not available, cannot wrap onerror");var n=t.onerror;return t.onerror=function(){for(var t,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var s=i[4],a=i[0],u=_f.buildFromUnknown(s||a,{mechanism:{handled:!1}});return e(u),null!==(t=null==n?void 0:n.apply(void 0,i))&&void 0!==t&&t},t.onerror.__POSTHOG_INSTRUMENTED__=!0,function(){var e;null==(e=t.onerror)||delete e.__POSTHOG_INSTRUMENTED__,t.onerror=n}},wrapUnhandledRejection:function(e){var t=ps;t||pf.info("window not available, cannot wrap onUnhandledRejection");var n=t.onunhandledrejection;return t.onunhandledrejection=function(r){var i,o=_f.buildFromUnknown(r,{mechanism:{handled:!1}});return e(o),null!==(i=null==n?void 0:n.apply(t,[r]))&&void 0!==i&&i},t.onunhandledrejection.__POSTHOG_INSTRUMENTED__=!0,function(){var e;null==(e=t.onunhandledrejection)||delete e.__POSTHOG_INSTRUMENTED__,t.onunhandledrejection=n}},wrapConsoleError:function(e){var t=console;t||pf.info("console not available, cannot wrap console.error");var n=t.error;return t.error=function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];var o=r.join(" "),s=r.find((function(e){return e instanceof Error})),a=_f.buildFromUnknown(s||o,{mechanism:{handled:!1},syntheticException:new Error("PostHog syntheticException")});return e(a),null==n?void 0:n.apply(void 0,r)},t.error.__POSTHOG_INSTRUMENTED__=!0,function(){var e;null==(e=t.error)||delete e.__POSTHOG_INSTRUMENTED__,t.error=n}}};function vf(e,t,n){try{if(!(t in e))return function(){};var r=e[t],i=n(r);return $s(i)&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=i,function(){e[t]=r}}catch(e){return function(){}}}ks.__PosthogExtensions__=ks.__PosthogExtensions__||{},ks.__PosthogExtensions__.errorWrappingFunctions=hf,ks.posthogErrorWrappingFunctions=hf;var gf=function(e,t,n,r){var i;try{i=new URL(r.url).hostname}catch(e){return}if(!qs(e)||e.includes(i)){if(n){var o=n.checkAndGetSessionAndWindowId(!0),s=o.sessionId,a=o.windowId;r.headers.set("X-POSTHOG-SESSION-ID",s),r.headers.set("X-POSTHOG-WINDOW-ID",a)}t!==uf&&r.headers.set("X-POSTHOG-DISTINCT-ID",t)}};ks.__PosthogExtensions__=ks.__PosthogExtensions__||{};var mf={_patchFetch:function(e,t,n){return vf(ps,"fetch",(function(r){return function(){var i=Ni(zi().m((function i(o,s){var a;return zi().w((function(i){for(;;)if(0===i.n)return a=new Request(o,s),gf(e,t,n,a),i.a(2,r(a))}),i)})));return function(e,t){return i.apply(this,arguments)}}()}))},_patchXHR:function(e,t,n){return vf(ps.XMLHttpRequest.prototype,"open",(function(r){return function(i,o,s,a,u){void 0===s&&(s=!0);var l=new Request(o);return gf(e,t,n,l),r.call(this,i,l.url,s,a,u)}}))}};function yf(e){return e instanceof Element&&(e.id===af||!(null==e.closest||!e.closest(".toolbar-global-fade-container")))}function bf(e){return!!e&&1===e.nodeType}function wf(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function Sf(e){return!!e&&3===e.nodeType}function xf(e){return!!e&&11===e.nodeType}function Ef(e){return e?Ls(e).split(/\s+/):[]}function kf(e){var t=null==ps?void 0:ps.location.href;return!!(t&&e&&e.some((function(e){return t.match(e)})))}function Pf(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 Ef(t)}function Cf(e){return Bs(e)?null:Ls(e).split(/(\s+)/).filter((function(e){return Zf(e)})).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function Tf(e){var t="";return Hf(e)&&!jf(e)&&e.childNodes&&e.childNodes.length&&Na(e.childNodes,(function(e){var n;Sf(e)&&e.textContent&&(t+=null!==(n=Cf(e.textContent))&&void 0!==n?n:"")})),Ls(t)}function If(e){return js(e.target)?e.srcElement||null:null!=(t=e.target)&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t}ks.__PosthogExtensions__.tracingHeadersPatchFns=mf,ks.postHogTracingHeadersPatchFns=mf;var Ff=["a","button","form","input","select","textarea","label"];function Lf(e,t){if(js(t))return!0;for(var n,r,i=function(){var e=r.value;if(t.some((function(t){return e.matches(t)})))return{v:!0}},o=ji(e);!(r=o()).done;)if(n=i())return n.v;return!1}function Rf(e){var t=e.parentNode;return!(!t||!bf(t))&&t}var Of=["next","previous","prev",">","<"],Mf=10;var Af=[".ph-no-rageclick",".ph-no-capture"];function Df(e,t){if(!ps||qf(e))return!1;var n,r,i;Gs(t)?(n=!!t&&Af,r=void 0):(n=null!==(i=null==t?void 0:t.css_selector_ignorelist)&&void 0!==i?i:Af,r=null==t?void 0:t.content_ignorelist);if(!1===n)return!1;var o=$f(e,!1).targetElementList;return!function(e,t){if(!1===e||js(e))return!1;var n;if(!0===e)n=Of;else{if(!qs(e))return!1;if(e.length>Mf)return Aa.error("[PostHog] content_ignorelist array cannot exceed "+Mf+" items. Use css_selector_ignorelist for more complex matching."),!1;n=e.map((function(e){return e.toLowerCase()}))}return t.some((function(e){var t=e.safeText,r=e.ariaLabel;return n.some((function(e){return t.includes(e)||r.includes(e)}))}))}(r,o.map((function(e){var t;return{safeText:Tf(e).toLowerCase(),ariaLabel:(null==(t=e.getAttribute("aria-label"))?void 0:t.toLowerCase().trim())||""}})))&&!Lf(o,n)}var qf=function(e){return!e||wf(e,"html")||!bf(e)},$f=function(e,t){if(!ps||qf(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var n=!1,r=[e],i=e;i.parentNode&&!wf(i,"body");)if(xf(i.parentNode))r.push(i.parentNode.host),i=i.parentNode.host;else{var o=Rf(i);if(!o)break;if(t||Ff.indexOf(o.tagName.toLowerCase())>-1)n=!0;else{var s=ps.getComputedStyle(o);s&&"pointer"===s.getPropertyValue("cursor")&&(n=!0)}r.push(o),i=o}return{parentIsUsefulElement:n,targetElementList:r}};function Nf(e,t,n,r,i){var o,s,a,u;if(void 0===n&&(n=void 0),!ps||qf(e))return!1;if(null!=(o=n)&&o.url_allowlist&&!kf(n.url_allowlist))return!1;if(null!=(s=n)&&s.url_ignorelist&&kf(n.url_ignorelist))return!1;if(null!=(a=n)&&a.dom_event_allowlist){var l=n.dom_event_allowlist;if(l&&!l.some((function(e){return t.type===e})))return!1}var c=$f(e,r),d=c.parentIsUsefulElement,f=c.targetElementList;if(!function(e,t){var n=null==t?void 0:t.element_allowlist;if(js(n))return!0;for(var r,i,o=function(){var e=i.value;if(n.some((function(t){return e.tagName.toLowerCase()===t})))return{v:!0}},s=ji(e);!(i=s()).done;)if(r=o())return r.v;return!1}(f,n))return!1;if(!Lf(f,null==(u=n)?void 0:u.css_selector_allowlist))return!1;var p=ps.getComputedStyle(e);if(p&&"pointer"===p.getPropertyValue("cursor")&&"click"===t.type)return!0;var _=e.tagName.toLowerCase();switch(_){case"html":return!1;case"form":return(i||["submit"]).indexOf(t.type)>=0;case"input":case"select":case"textarea":return(i||["change","click"]).indexOf(t.type)>=0;default:return d?(i||["click"]).indexOf(t.type)>=0:(i||["click"]).indexOf(t.type)>=0&&(Ff.indexOf(_)>-1||"true"===e.getAttribute("contenteditable"))}}function Hf(e){for(var t=e;t.parentNode&&!wf(t,"body");t=t.parentNode){var n=Pf(t);if(Fs(n,"ph-sensitive")||Fs(n,"ph-no-capture"))return!1}if(Fs(Pf(e),"ph-include"))return!0;var r=e.type||"";if(Us(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var i=e.name||e.id||"";if(Us(i)){if(/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(i.replace(/[^a-zA-Z0-9]/g,"")))return!1}return!0}function jf(e){return!!(wf(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||wf(e,"select")||wf(e,"textarea")||"true"===e.getAttribute("contenteditable"))}var Uf="(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})",Vf=new RegExp("^(?:"+Uf+")$"),zf=new RegExp(Uf),Bf="\\d{3}-?\\d{2}-?\\d{4}",Wf=new RegExp("^("+Bf+")$"),Gf=new RegExp("("+Bf+")");function Zf(e,t){if(void 0===t&&(t=!0),Bs(e))return!1;if(Us(e)){if(e=Ls(e),(t?Vf:zf).test((e||"").replace(/[- ]/g,"")))return!1;if((t?Wf:Gf).test(e))return!1}return!0}function Yf(e){var t=Tf(e);return Zf(t=(t+" "+Qf(e)).trim())?t:""}function Qf(e){var t="";return e&&e.childNodes&&e.childNodes.length&&Na(e.childNodes,(function(e){var n;if(e&&"span"===(null==(n=e.tagName)?void 0:n.toLowerCase()))try{var r=Tf(e);t=(t+" "+r).trim(),e.childNodes&&e.childNodes.length&&(t=(t+" "+Qf(e)).trim())}catch(e){Aa.error("[AutoCapture]",e)}})),t}function Xf(e){return function(e){var t=e.map((function(e){var t,n,r="";if(e.tag_name&&(r+=e.tag_name),e.attr_class){e.attr_class.sort();for(var i,o=ji(e.attr_class);!(i=o()).done;){r+="."+i.value.replace(/"/g,"")}}var s=Ui({},e.text?{text:e.text}:{},{"nth-child":null!==(t=e.nth_child)&&void 0!==t?t:0,"nth-of-type":null!==(n=e.nth_of_type)&&void 0!==n?n:0},e.href?{href:e.href}:{},e.attr_id?{attr_id:e.attr_id}:{},e.attributes),a={};return Ua(s).sort((function(e,t){var n=e[0],r=t[0];return n.localeCompare(r)})).forEach((function(e){var t=e[0],n=e[1];return a[Jf(t.toString())]=Jf(n.toString())})),r+=":",r+=Ua(a).map((function(e){return e[0]+'="'+e[1]+'"'})).join("")}));return t.join(";")}(function(e){return e.map((function(e){var t,n,r={text:null==(t=e.$el_text)?void 0:t.slice(0,400),tag_name:e.tag_name,href:null==(n=e.attr__href)?void 0:n.slice(0,2048),attr_class:Kf(e),attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return Ua(e).filter((function(e){return 0===e[0].indexOf("attr__")})).forEach((function(e){var t=e[0],n=e[1];return r.attributes[t]=n})),r}))}(e))}function Jf(e){return e.replace(/"|\\"/g,'\\"')}function Kf(e){var t=e.attr__class;return t?qs(t)?t:Ef(t):void 0}var ep=function(){function e(e){this.disabled=!1===e;var t=Ns(e)?e:{};this.thresholdPx=t.threshold_px||30,this.timeoutMs=t.timeout_ms||1e3,this.clickCount=t.click_count||3,this.clicks=[]}return e.prototype.isRageClick=function(e,t,n){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&&n-r.timestamp<this.timeoutMs){if(this.clicks.push({x:e,y:t,timestamp:n}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:e,y:t,timestamp:n}];return!1},e}(),tp=Da("[AutoCapture]");function np(e,t){return t.length>e?t.slice(0,e)+"...":t}function rp(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do{t=t.previousSibling}while(t&&!bf(t));return t}function ip(e,t,n,r){var i=e.tagName.toLowerCase(),o={tag_name:i};Ff.indexOf(i)>-1&&!n&&("a"===i.toLowerCase()||"button"===i.toLowerCase()?o.$el_text=np(1024,Yf(e)):o.$el_text=np(1024,Tf(e)));var s=Pf(e);s.length>0&&(o.classes=s.filter((function(e){return""!==e}))),Na(e.attributes,(function(n){var i;if((!jf(e)||-1!==["name","id","class","aria-label"].indexOf(n.name))&&((null==r||!r.includes(n.name))&&!t&&Zf(n.value)&&(i=n.name,!Us(i)||"_ngcontent"!==i.substring(0,10)&&"_nghost"!==i.substring(0,7)))){var s=n.value;"class"===n.name&&(s=Ef(s).join(" ")),o["attr__"+n.name]=np(1024,s)}}));for(var a=1,u=1,l=e;l=rp(l);)a++,l.tagName===e.tagName&&u++;return o.nth_child=a,o.nth_of_type=u,o}function op(e,t){for(var n,r,i=t.e,o=t.maskAllElementAttributes,s=t.maskAllText,a=t.elementAttributeIgnoreList,u=t.elementsChainAsString,l=[e],c=e;c.parentNode&&!wf(c,"body");)xf(c.parentNode)?(l.push(c.parentNode.host),c=c.parentNode.host):(l.push(c.parentNode),c=c.parentNode);var d,f=[],p={},_=!1,h=!1;if(Na(l,(function(e){var t=Hf(e);"a"===e.tagName.toLowerCase()&&(_=e.getAttribute("href"),_=t&&_&&Zf(_)&&_),Fs(Pf(e),"ph-no-capture")&&(h=!0),f.push(ip(e,o,s,a));var n=function(e){if(!Hf(e))return{};var t={};return Na(e.attributes,(function(e){if(e.name&&0===e.name.indexOf("data-ph-capture-attribute")){var n=e.name.replace("data-ph-capture-attribute-",""),r=e.value;n&&r&&Zf(r)&&(t[n]=r)}})),t}(e);Ha(p,n)})),h)return{props:{},explicitNoCapture:h};if(s||("a"===e.tagName.toLowerCase()||"button"===e.tagName.toLowerCase()?f[0].$el_text=Yf(e):f[0].$el_text=Tf(e)),_){var v,g;f[0].attr__href=_;var m=null==(v=vl(_))?void 0:v.host,y=null==ps||null==(g=ps.location)?void 0:g.host;m&&y&&m!==y&&(d=_)}return{props:Ha({$event_type:i.type,$ce_version:1},u?{}:{$elements:f},{$elements_chain:Xf(f)},null!=(n=f[0])&&n.$el_text?{$el_text:null==(r=f[0])?void 0:r.$el_text}:{},d&&"click"===i.type?{$external_click_url:d}:{},p)}}var sp=function(){function e(e){this._initialized=!1,this._isDisabledServerSide=null,this._elementsChainAsString=!1,this.instance=e,this.rageclicks=new ep(e.config.rageclick),this._elementSelectors=null}var t=e.prototype;return t._addDomEventHandlers=function(){var e=this;if(this.isBrowserSupported()){if(ps&&ys){var t=function(t){t=t||(null==ps?void 0:ps.event);try{e._captureEvent(t)}catch(e){tp.error("Failed to capture event",e)}};if(Qa(ys,"submit",t,{capture:!0}),Qa(ys,"change",t,{capture:!0}),Qa(ys,"click",t,{capture:!0}),this._config.capture_copied_text){var n=function(t){t=t||(null==ps?void 0:ps.event),e._captureEvent(t,_l)};Qa(ys,"copy",n,{capture:!0}),Qa(ys,"cut",n,{capture:!0})}}}else tp.info("Disabling Automatic Event Collection because this browser is not supported")},t.startIfEnabled=function(){this.isEnabled&&!this._initialized&&(this._addDomEventHandlers(),this._initialized=!0)},t.onRemoteConfig=function(e){var t;(e.elementsChainAsString&&(this._elementsChainAsString=e.elementsChainAsString),this.instance.persistence)&&this.instance.persistence.register(((t={})[Md]=!!e.autocapture_opt_out,t));this._isDisabledServerSide=!!e.autocapture_opt_out,this.startIfEnabled()},t.setElementSelectors=function(e){this._elementSelectors=e},t.getElementSelectors=function(e){var t,n=[];return null==(t=this._elementSelectors)||t.forEach((function(t){var r=null==ys?void 0:ys.querySelectorAll(t);null==r||r.forEach((function(r){e===r&&n.push(t)}))})),n},t._captureEvent=function(e,t){if(void 0===t&&(t="$autocapture"),this.isEnabled){var n,r=If(e);if(Sf(r)&&(r=r.parentNode||null),"$autocapture"===t&&"click"===e.type&&e instanceof MouseEvent)this.instance.config.rageclick&&null!=(n=this.rageclicks)&&n.isRageClick(e.clientX,e.clientY,e.timeStamp||(new Date).getTime())&&Df(r,this.instance.config.rageclick)&&this._captureEvent(e,"$rageclick");var i=t===_l;if(r&&Nf(r,e,this._config,i,i?["copy","cut"]:void 0)){var o=op(r,{e:e,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this._config.element_attribute_ignorelist,elementsChainAsString:this._elementsChainAsString}),s=o.props;if(o.explicitNoCapture)return!1;var a=this.getElementSelectors(r);if(a&&a.length>0&&(s.$element_selectors=a),t===_l){var u,l=Cf(null==ps||null==(u=ps.getSelection())?void 0:u.toString()),c=e.type||"clipboard";if(!l)return!1;s.$selected_content=l,s.$copy_type=c}return this.instance.capture(t,s),!0}}},t.isBrowserSupported=function(){return $s(null==ys?void 0:ys.querySelectorAll)},Hi(e,[{key:"_config",get:function(){var e,t,n=Ns(this.instance.config.autocapture)?this.instance.config.autocapture:{};return n.url_allowlist=null==(e=n.url_allowlist)?void 0:e.map((function(e){return new RegExp(e)})),n.url_ignorelist=null==(t=n.url_ignorelist)?void 0:t.map((function(e){return new RegExp(e)})),n}},{key:"isEnabled",get:function(){var e,t,n=null==(e=this.instance.persistence)?void 0:e.props[Md],r=this._isDisabledServerSide;if(zs(r)&&!Gs(n)&&!this.instance._shouldDisableFlags())return!1;var i=null!==(t=this._isDisabledServerSide)&&void 0!==t?t:!!n;return!!this.instance.config.autocapture&&!i}}])}(),ap="";var up=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i;function lp(e,t){if(t){var n=function(e,t){if(void 0===t&&(t=ys),ap)return ap;if(!t)return"";if(["localhost","127.0.0.1"].includes(e))return"";for(var n=e.split("."),r=Math.min(n.length,8),i="dmn_chk_"+hu();!ap&&r--;){var o=n.slice(r).join("."),s=i+"=1;domain=."+o+";path=/";t.cookie=s+";max-age=3",t.cookie.includes(i)&&(t.cookie=s+";max-age=0",ap=o)}return ap}(e);if(!n){var r=function(e){var t=e.match(up);return t?t[0]:""}(e);r!==n&&Aa.info("Warning: cookie subdomain discovery mismatch",r,n),n=r}return n?"; domain=."+n:""}return""}var cp={_is_supported:function(){return!!ys},_error:function(e){Aa.error("cookieStore error: "+e)},_get:function(e){if(ys){try{for(var t=e+"=",n=ys.cookie.split(";").filter((function(e){return e.length})),r=0;r<n.length;r++){for(var i=n[r];" "==i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return decodeURIComponent(i.substring(t.length,i.length))}}catch(e){}return null}},_parse:function(e){var t;try{t=JSON.parse(cp._get(e))||{}}catch(e){}return t},_set:function(e,t,n,r,i){if(ys)try{var o="",s="",a=lp(ys.location.hostname,r);if(n){var u=new Date;u.setTime(u.getTime()+24*n*60*60*1e3),o="; expires="+u.toUTCString()}i&&(s="; secure");var l=e+"="+encodeURIComponent(JSON.stringify(t))+o+"; SameSite=Lax; path=/"+a+s;return l.length>3686.4&&Aa.warn("cookieStore warning: large cookie, len="+l.length),ys.cookie=l,l}catch(e){return}},_remove:function(e,t){if(null!=ys&&ys.cookie)try{cp._set(e,"",-1,t)}catch(e){return}}},dp=null,fp={_is_supported:function(){if(!zs(dp))return dp;var e=!0;if(js(ps))e=!1;else try{var t="__mplssupport__";fp._set(t,"xyz"),'"xyz"'!==fp._get(t)&&(e=!1),fp._remove(t)}catch(t){e=!1}return e||Aa.error("localStorage unsupported; falling back to cookie store"),dp=e,e},_error:function(e){Aa.error("localStorage error: "+e)},_get:function(e){try{return null==ps?void 0:ps.localStorage.getItem(e)}catch(e){fp._error(e)}return null},_parse:function(e){try{return JSON.parse(fp._get(e))||{}}catch(e){}return null},_set:function(e,t){try{null==ps||ps.localStorage.setItem(e,JSON.stringify(t))}catch(e){fp._error(e)}},_remove:function(e){try{null==ps||ps.localStorage.removeItem(e)}catch(e){fp._error(e)}}},pp=["distinct_id",Vd,zd,sf,of],_p=Ui({},fp,{_parse:function(e){try{var t={};try{t=cp._parse(e)||{}}catch(e){}var n=Ha(t,JSON.parse(fp._get(e)||"{}"));return fp._set(e,n),n}catch(e){}return null},_set:function(e,t,n,r,i,o){try{fp._set(e,t,void 0,void 0,o);var s={};pp.forEach((function(e){t[e]&&(s[e]=t[e])})),Object.keys(s).length&&cp._set(e,s,n,r,i,o)}catch(e){fp._error(e)}},_remove:function(e,t){try{null==ps||ps.localStorage.removeItem(e),cp._remove(e,t)}catch(e){fp._error(e)}}}),hp={},vp={_is_supported:function(){return!0},_error:function(e){Aa.error("memoryStorage error: "+e)},_get:function(e){return hp[e]||null},_parse:function(e){return hp[e]||null},_set:function(e,t){hp[e]=t},_remove:function(e){delete hp[e]}},gp=null,mp={_is_supported:function(){if(!zs(gp))return gp;if(gp=!0,js(ps))gp=!1;else try{var e="__support__";mp._set(e,"xyz"),'"xyz"'!==mp._get(e)&&(gp=!1),mp._remove(e)}catch(e){gp=!1}return gp},_error:function(e){Aa.error("sessionStorage error: ",e)},_get:function(e){try{return null==ps?void 0:ps.sessionStorage.getItem(e)}catch(e){mp._error(e)}return null},_parse:function(e){try{return JSON.parse(mp._get(e))||null}catch(e){}return null},_set:function(e,t){try{null==ps||ps.sessionStorage.setItem(e,JSON.stringify(t))}catch(e){mp._error(e)}},_remove:function(e){try{null==ps||ps.sessionStorage.removeItem(e)}catch(e){mp._error(e)}}},yp=function(e){return e[e.PENDING=-1]="PENDING",e[e.DENIED=0]="DENIED",e[e.GRANTED=1]="GRANTED",e}({}),bp=function(){function e(e){this._instance=e}var t=e.prototype;return t.isOptedOut=function(){return"always"===this._config.cookieless_mode||(this.consent===yp.DENIED||this.consent===yp.PENDING&&(this._config.opt_out_capturing_by_default||"on_reject"===this._config.cookieless_mode))},t.isOptedIn=function(){return!this.isOptedOut()},t.isExplicitlyOptedOut=function(){return this.consent===yp.DENIED},t.optInOut=function(e){this._storage._set(this._storageKey,e?1:0,this._config.cookie_expiration,this._config.cross_subdomain_cookie,this._config.secure_cookie)},t.reset=function(){this._storage._remove(this._storageKey,this._config.cross_subdomain_cookie)},t._getDnt=function(){return!!this._config.respect_dnt&&!!Ya([null==ms?void 0:ms.doNotTrack,null==ms?void 0:ms.msDoNotTrack,ks.doNotTrack],(function(e){return ea(e)}))},Hi(e,[{key:"_config",get:function(){return this._instance.config}},{key:"consent",get:function(){return this._getDnt()?yp.DENIED:this._storedConsent}},{key:"_storageKey",get:function(){var e=this._instance.config,t=e.token,n=e.opt_out_capturing_cookie_prefix,r=e.consent_persistence_name;return r||(n?n+t:"__ph_opt_in_out_"+t)}},{key:"_storedConsent",get:function(){var e=this._storage._get(this._storageKey);return ea(e)?yp.GRANTED:Fs(ta,e)?yp.DENIED:yp.PENDING}},{key:"_storage",get:function(){if(!this._persistentStore){var e=this._config.opt_out_capturing_persistence_type;this._persistentStore="localStorage"===e?fp:cp;var t="localStorage"===e?cp:fp;t._get(this._storageKey)&&(this._persistentStore._get(this._storageKey)||this.optInOut(ea(t._get(this._storageKey))),t._remove(this._storageKey,this._config.cross_subdomain_cookie))}return this._persistentStore}}])}(),wp=Da("[Dead Clicks]"),Sp=function(){return!0},xp=function(e){var t,n=!(null==(t=e.instance.persistence)||!t.get_property(Hd)),r=e.instance.config.capture_dead_clicks;return Gs(r)?r:!!Ns(r)||n},Ep=function(){function e(e,t,n){this.instance=e,this.isEnabled=t,this.onCapture=n,this.startIfEnabled()}var t=e.prototype;return t.onRemoteConfig=function(e){var t;this.instance.persistence&&this.instance.persistence.register(((t={})[Hd]=null==e?void 0:e.captureDeadClicks,t));this.startIfEnabled()},t.startIfEnabled=function(){var e=this;this.isEnabled(this)&&this._loadScript((function(){e._start()}))},t._loadScript=function(e){var t,n;null!=(t=ks.__PosthogExtensions__)&&t.initDeadClicksAutocapture&&e(),null==(n=ks.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this.instance,"dead-clicks-autocapture",(function(t){t?wp.error("failed to load script",t):e()}))},t._start=function(){var e;if(ys){if(!this._lazyLoadedDeadClicksAutocapture&&null!=(e=ks.__PosthogExtensions__)&&e.initDeadClicksAutocapture){var t=Ns(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};t.__onCapture=this.onCapture,this._lazyLoadedDeadClicksAutocapture=ks.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,t),this._lazyLoadedDeadClicksAutocapture.start(ys),wp.info("starting...")}}else wp.error("`document` not found. Cannot start.")},t.stop=function(){this._lazyLoadedDeadClicksAutocapture&&(this._lazyLoadedDeadClicksAutocapture.stop(),this._lazyLoadedDeadClicksAutocapture=void 0,wp.info("stopping..."))},Hi(e,[{key:"lazyLoadedDeadClicksAutocapture",get:function(){return this._lazyLoadedDeadClicksAutocapture}}])}(),kp=Da("[ExceptionAutocapture]"),Pp=function(){function e(e){var t,n,r,i=this;this._startCapturing=function(){var e;if(ps&&i.isEnabled&&null!=(e=ks.__PosthogExtensions__)&&e.errorWrappingFunctions){var t=ks.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,n=ks.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,r=ks.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!i._unwrapOnError&&i._config.capture_unhandled_errors&&(i._unwrapOnError=t(i.captureException.bind(i))),!i._unwrapUnhandledRejection&&i._config.capture_unhandled_rejections&&(i._unwrapUnhandledRejection=n(i.captureException.bind(i))),!i._unwrapConsoleError&&i._config.capture_console_errors&&(i._unwrapConsoleError=r(i.captureException.bind(i)))}catch(e){kp.error("failed to start",e),i._stopCapturing()}}},this._instance=e,this._remoteEnabled=!(null==(t=this._instance.persistence)||!t.props[Dd]),this._config=this._requiredConfig(),this._rateLimiter=new sa({refillRate:null!==(n=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)&&void 0!==n?n:1,bucketSize:null!==(r=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)&&void 0!==r?r:10,refillInterval:1e4,_logger:kp}),this.startIfEnabled()}var t=e.prototype;return t._requiredConfig=function(){var e=this._instance.config.capture_exceptions,t={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return Ns(e)?t=Ui({},t,e):(js(e)?this._remoteEnabled:e)&&(t=Ui({},t,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),t},t.startIfEnabled=function(){this.isEnabled&&(kp.info("enabled"),this._loadScript(this._startCapturing))},t._loadScript=function(e){var t,n;null!=(t=ks.__PosthogExtensions__)&&t.errorWrappingFunctions&&e(),null==(n=ks.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this._instance,"exception-autocapture",(function(t){if(t)return kp.error("failed to load script",t);e()}))},t._stopCapturing=function(){var e,t,n;null==(e=this._unwrapOnError)||e.call(this),this._unwrapOnError=void 0,null==(t=this._unwrapUnhandledRejection)||t.call(this),this._unwrapUnhandledRejection=void 0,null==(n=this._unwrapConsoleError)||n.call(this),this._unwrapConsoleError=void 0},t.onRemoteConfig=function(e){var t,n=e.autocaptureExceptions;(this._remoteEnabled=!!n||!1,this._config=this._requiredConfig(),this._instance.persistence)&&this._instance.persistence.register(((t={})[Dd]=this._remoteEnabled,t));this.startIfEnabled()},t.captureException=function(e){var t,n,r=null!==(t=null==e||null==(n=e.$exception_list)||null==(n=n[0])?void 0:n.type)&&void 0!==t?t:"Exception";this._rateLimiter.consumeRateLimit(r)?kp.info("Skipping exception capture because of client rate limiting.",{exception:r}):this._instance.exceptions.sendExceptionEvent(e)},Hi(e,[{key:"isEnabled",get:function(){return this._config.capture_console_errors||this._config.capture_unhandled_errors||this._config.capture_unhandled_rejections}}])}(),Cp=function(){function e(e){var t;this._instance=e,this._lastPathname=(null==ps||null==(t=ps.location)?void 0:t.pathname)||""}var t=e.prototype;return t.startIfEnabled=function(){this.isEnabled&&(Aa.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())},t.stop=function(){this._popstateListener&&this._popstateListener(),this._popstateListener=void 0,Aa.info("History API monitoring stopped")},t.monitorHistoryChanges=function(){var e,t;if(ps&&ps.history){var n=this;null!=(e=ps.history.pushState)&&e.__posthog_wrapped__||vf(ps.history,"pushState",(function(e){return function(t,r,i){e.call(this,t,r,i),n._capturePageview("pushState")}})),null!=(t=ps.history.replaceState)&&t.__posthog_wrapped__||vf(ps.history,"replaceState",(function(e){return function(t,r,i){e.call(this,t,r,i),n._capturePageview("replaceState")}})),this._setupPopstateListener()}},t._capturePageview=function(e){try{var t,n=null==ps||null==(t=ps.location)?void 0:t.pathname;if(!n)return;n!==this._lastPathname&&this.isEnabled&&this._instance.capture("$pageview",{navigation_type:e}),this._lastPathname=n}catch(t){Aa.error("Error capturing "+e+" pageview",t)}},t._setupPopstateListener=function(){var e=this;if(!this._popstateListener){var t=function(){e._capturePageview("popstate")};Qa(ps,"popstate",t),this._popstateListener=function(){ps&&ps.removeEventListener("popstate",t)}}},Hi(e,[{key:"isEnabled",get:function(){return"history_change"===this._instance.config.capture_pageview}}])}(),Tp=Da("[SegmentIntegration]");function Ip(e,t){var n=e.config.segment;if(!n)return t();!function(e,t){var n=e.config.segment;if(!n)return t();var r=function(n){var r=function(){return n.anonymousId()||hu()};e.config.get_device_id=r,n.id()&&(e.register({distinct_id:n.id(),$device_id:r()}),e.persistence.set_property(Kd,"identified")),t()},i=n.user();"then"in i&&$s(i.then)?i.then((function(e){return r(e)})):r(i)}(e,(function(){n.register(function(e){Promise&&Promise.resolve||Tp.warn("This browser does not have Promise support, and can not use the segment integration");var t=function(t,n){if(!n)return t;t.event.userId||t.event.anonymousId===e.get_distinct_id()||(Tp.info("No userId set, resetting PostHog"),e.reset()),t.event.userId&&t.event.userId!==e.get_distinct_id()&&(Tp.info("UserId set, identifying with PostHog"),e.identify(t.event.userId));var r=e.calculateEventProperties(n,t.event.properties);return t.event.properties=Object.assign({},r,t.event.properties),t};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:function(e){return t(e,e.event.event)},page:function(e){return t(e,"$pageview")},identify:function(e){return t(e,"$identify")},screen:function(e){return t(e,"$screen")}}}(e)).then((function(){t()}))}))}var Fp="posthog-js";function Lp(e,t){var n=void 0===t?{}:t,r=n.organization,i=n.projectId,o=n.prefix,s=n.severityAllowList,a=void 0===s?["error"]:s,u=n.sendExceptionsToPostHog,l=void 0===u||u;return function(t){var n,s,u,c,d;if(!("*"===a||a.includes(t.level))||!e.__loaded)return t;t.tags||(t.tags={});var f=e.requestRouter.endpointFor("ui","/project/"+e.config.token+"/person/"+e.get_distinct_id());t.tags["PostHog Person URL"]=f,e.sessionRecordingStarted()&&(t.tags["PostHog Recording URL"]=e.get_session_replay_url({withTimestamp:!0}));var p=(null==(n=t.exception)?void 0:n.values)||[],_=p.map((function(e){return Ui({},e,{stacktrace:e.stacktrace?Ui({},e.stacktrace,{type:"raw",frames:(e.stacktrace.frames||[]).map((function(e){return Ui({},e,{platform:"web:javascript"})}))}):void 0})})),h={$exception_message:(null==(s=p[0])?void 0:s.value)||t.message,$exception_type:null==(u=p[0])?void 0:u.type,$exception_level:t.level,$exception_list:_,$sentry_event_id:t.event_id,$sentry_exception:t.exception,$sentry_exception_message:(null==(c=p[0])?void 0:c.value)||t.message,$sentry_exception_type:null==(d=p[0])?void 0:d.type,$sentry_tags:t.tags};return r&&i&&(h.$sentry_url=(o||"https://sentry.io/organizations/")+r+"/issues/?project="+i+"&query="+t.event_id),l&&e.exceptions.sendExceptionEvent(h),t}}var Rp=function(e,t,n,r,i,o){this.name=Fp,this.setupOnce=function(s){s(Lp(e,{organization:t,projectId:n,prefix:r,severityAllowList:i,sendExceptionsToPostHog:null==o||o}))}},Op=null!=ps&&ps.location?bl(ps.location.hash,"__posthog")||bl(location.hash,"state"):null,Mp="_postHogToolbarParams",Ap=Da("[Toolbar]"),Dp=function(e){return e[e.UNINITIALIZED=0]="UNINITIALIZED",e[e.LOADING=1]="LOADING",e[e.LOADED=2]="LOADED",e}(Dp||{}),qp=function(){function e(e){this.instance=e}var t=e.prototype;return t._setToolbarState=function(e){ks.ph_toolbar_state=e},t._getToolbarState=function(){var e;return null!==(e=ks.ph_toolbar_state)&&void 0!==e?e:Dp.UNINITIALIZED},t.maybeLoadToolbar=function(e,t,n){if(void 0===e&&(e=void 0),void 0===t&&(t=void 0),void 0===n&&(n=void 0),!ps||!ys)return!1;e=null!=e?e:ps.location,n=null!=n?n:ps.history;try{if(!t){try{ps.localStorage.setItem("test","test"),ps.localStorage.removeItem("test")}catch(e){return!1}t=null==ps?void 0:ps.localStorage}var r,i=Op||bl(e.hash,"__posthog")||bl(e.hash,"state"),o=i?Va((function(){return JSON.parse(atob(decodeURIComponent(i)))}))||Va((function(){return JSON.parse(decodeURIComponent(i))})):null;return o&&"ph_authorize"===o.action?((r=o).source="url",r&&Object.keys(r).length>0&&(o.desiredHash?e.hash=o.desiredHash:n?n.replaceState(n.state,"",e.pathname+e.search):e.hash="")):((r=JSON.parse(t.getItem(Mp)||"{}")).source="localstorage",delete r.userIntent),!(!r.token||this.instance.config.token!==r.token)&&(this.loadToolbar(r),!0)}catch(e){return!1}},t._callLoadToolbar=function(e){var t=ks.ph_load_toolbar||ks.ph_load_editor;!Bs(t)&&$s(t)?t(e,this.instance):Ap.warn("No toolbar load function found")},t.loadToolbar=function(e){var t=this,n=!(null==ys||!ys.getElementById(af));if(!ps||n)return!1;var r="custom"===this.instance.requestRouter.region&&this.instance.config.advanced_disable_toolbar_metrics,i=Ui({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor("ui")},r?{instrument:!1}:{});if(ps.localStorage.setItem(Mp,JSON.stringify(Ui({},i,{source:void 0}))),this._getToolbarState()===Dp.LOADED)this._callLoadToolbar(i);else if(this._getToolbarState()===Dp.UNINITIALIZED){var o;this._setToolbarState(Dp.LOADING),null==(o=ks.__PosthogExtensions__)||null==o.loadExternalDependency||o.loadExternalDependency(this.instance,"toolbar",(function(e){if(e)return Ap.error("[Toolbar] Failed to load",e),void t._setToolbarState(Dp.UNINITIALIZED);t._setToolbarState(Dp.LOADED),t._callLoadToolbar(i)})),Qa(ps,"turbolinks:load",(function(){t._setToolbarState(Dp.UNINITIALIZED),t.loadToolbar(i)}))}return!0},t._loadEditor=function(e){return this.loadToolbar(e)},t.maybeLoadEditor=function(e,t,n){return void 0===e&&(e=void 0),void 0===t&&(t=void 0),void 0===n&&(n=void 0),this.maybeLoadToolbar(e,t,n)},e}(),$p=Da("[TracingHeaders]"),Np=function(){function e(e){var t=this;this._restoreXHRPatch=void 0,this._restoreFetchPatch=void 0,this._startCapturing=function(){var e,n;js(t._restoreXHRPatch)&&(null==(e=ks.__PosthogExtensions__)||null==(e=e.tracingHeadersPatchFns)||e._patchXHR(t._instance.config.__add_tracing_headers||[],t._instance.get_distinct_id(),t._instance.sessionManager));js(t._restoreFetchPatch)&&(null==(n=ks.__PosthogExtensions__)||null==(n=n.tracingHeadersPatchFns)||n._patchFetch(t._instance.config.__add_tracing_headers||[],t._instance.get_distinct_id(),t._instance.sessionManager))},this._instance=e}var t=e.prototype;return t._loadScript=function(e){var t,n;null!=(t=ks.__PosthogExtensions__)&&t.tracingHeadersPatchFns&&e(),null==(n=ks.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this._instance,"tracing-headers",(function(t){if(t)return $p.error("failed to load script",t);e()}))},t.startIfEnabledOrStop=function(){var e,t;this._instance.config.__add_tracing_headers?this._loadScript(this._startCapturing):(null==(e=this._restoreXHRPatch)||e.call(this),null==(t=this._restoreFetchPatch)||t.call(this),this._restoreXHRPatch=void 0,this._restoreFetchPatch=void 0)},e}(),Hp="https?://(.*)",jp=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],Up=ja(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],jp),Vp="<masked>",zp=["li_fat_id"];function Bp(e,t,n){if(!ys)return{};var r,i=t?ja([],jp,n||[]):[],o=Wp(yl(ys.URL,i,Vp),e),s=(r={},Na(zp,(function(e){var t=cp._get(e);r[e]=t||null})),r);return Ha(s,o)}function Wp(e,t){var n=Up.concat(t||[]),r={};return Na(n,(function(t){var n=ml(e,t);r[t]=n||null})),r}function Gp(e){var t=function(e){return e?0===e.search(Hp+"google.([^/?]*)")?"google":0===e.search(Hp+"bing.com")?"bing":0===e.search(Hp+"yahoo.com")?"yahoo":0===e.search(Hp+"duckduckgo.com")?"duckduckgo":null:null}(e),n="yahoo"!=t?"q":"p",r={};if(!zs(t)){r.$search_engine=t;var i=ys?ml(ys.referrer,n):"";i.length&&(r.ph_keyword=i)}return r}function Zp(){return navigator.language||navigator.userLanguage}function Yp(){return(null==ys?void 0:ys.referrer)||"$direct"}function Qp(e,t){var n=e?ja([],jp,t||[]):[],r=null==bs?void 0:bs.href.substring(0,1e3);return{r:Yp().substring(0,1e3),u:r?yl(r,n,Vp):void 0}}function Xp(e){var t,n=e.r,r=e.u,i={$referrer:n,$referring_domain:null==n?void 0:"$direct"==n?"$direct":null==(t=vl(n))?void 0:t.host};if(r){i.$current_url=r;var o=vl(r);i.$host=null==o?void 0:o.host,i.$pathname=null==o?void 0:o.pathname;var s=Wp(r);Ha(i,s)}if(n){var a=Gp(n);Ha(i,a)}return i}function Jp(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}}function Kp(){try{return(new Date).getTimezoneOffset()}catch(e){return}}function e_(e,t){if(!Es)return{};var n,r=e?ja([],jp,t||[]):[],i=function(e){for(var t=0;t<dl.length;t++){var n=dl[t],r=n[0],i=n[1],o=r.exec(e),s=o&&($s(i)?i(o,e):i);if(s)return s}return["",""]}(Es),o=i[0],s=i[1];return Ha(Ba({$os:o,$os_version:s,$browser:ul(Es,navigator.vendor),$device:fl(Es),$device_type:pl(Es),$timezone:Jp(),$timezone_offset:Kp()}),{$current_url:yl(null==bs?void 0:bs.href,r,Vp),$host:null==bs?void 0:bs.host,$pathname:null==bs?void 0:bs.pathname,$raw_user_agent:Es.length>1e3?Es.substring(0,997)+"...":Es,$browser_version:cl(Es,navigator.vendor),$browser_language:Zp(),$browser_language_prefix:(n=Zp(),"string"==typeof n?n.split("-")[0]:void 0),$screen_height:null==ps?void 0:ps.screen.height,$screen_width:null==ps?void 0:ps.screen.width,$viewport_height:null==ps?void 0:ps.innerHeight,$viewport_width:null==ps?void 0:ps.innerWidth,$lib:"web",$lib_version:Ps.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})}var t_=Da("[Web Vitals]"),n_=9e5,r_=function(){function e(e){var t,n=this;this._enabledServerSide=!1,this._initialized=!1,this._buffer={url:void 0,metrics:[],firstMetricTimestamp:void 0},this._flushToCapture=function(){clearTimeout(n._delayedFlushTimer),0!==n._buffer.metrics.length&&(n._instance.capture("$web_vitals",n._buffer.metrics.reduce((function(e,t){var n;return Ui({},e,((n={})["$web_vitals_"+t.name+"_event"]=Ui({},t),n["$web_vitals_"+t.name+"_value"]=t.value,n))}),{})),n._buffer={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this._addToBuffer=function(e){var t,r=null==(t=n._instance.sessionManager)?void 0:t.checkAndGetSessionAndWindowId(!0);if(js(r))t_.error("Could not read session ID. Dropping metrics!");else{n._buffer=n._buffer||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var i=n._currentURL();if(!js(i))if(Bs(null==e?void 0:e.name)||Bs(null==e?void 0:e.value))t_.error("Invalid metric received",e);else if(n._maxAllowedValue&&e.value>=n._maxAllowedValue)t_.error("Ignoring metric with value >= "+n._maxAllowedValue,e);else n._buffer.url!==i&&(n._flushToCapture(),n._delayedFlushTimer=setTimeout(n._flushToCapture,n.flushToCaptureTimeoutMs)),js(n._buffer.url)&&(n._buffer.url=i),n._buffer.firstMetricTimestamp=js(n._buffer.firstMetricTimestamp)?Date.now():n._buffer.firstMetricTimestamp,e.attribution&&e.attribution.interactionTargetElement&&(e.attribution.interactionTargetElement=void 0),n._buffer.metrics.push(Ui({},e,{$current_url:i,$session_id:r.sessionId,$window_id:r.windowId,timestamp:Date.now()})),n._buffer.metrics.length===n.allowedMetrics.length&&n._flushToCapture()}},this._startCapturing=function(){var e,t,r,i,o=ks.__PosthogExtensions__;if(!js(o)&&!js(o.postHogWebVitalsCallbacks)){var s=o.postHogWebVitalsCallbacks;e=s.onLCP,t=s.onCLS,r=s.onFCP,i=s.onINP}e&&t&&r&&i?(n.allowedMetrics.indexOf("LCP")>-1&&e(n._addToBuffer.bind(n)),n.allowedMetrics.indexOf("CLS")>-1&&t(n._addToBuffer.bind(n)),n.allowedMetrics.indexOf("FCP")>-1&&r(n._addToBuffer.bind(n)),n.allowedMetrics.indexOf("INP")>-1&&i(n._addToBuffer.bind(n)),n._initialized=!0):t_.error("web vitals callbacks not loaded - not starting")},this._instance=e,this._enabledServerSide=!(null==(t=this._instance.persistence)||!t.props[Nd]),this.startIfEnabled()}var t=e.prototype;return t.startIfEnabled=function(){this.isEnabled&&!this._initialized&&(t_.info("enabled, starting..."),this._loadScript(this._startCapturing))},t.onRemoteConfig=function(e){var t,n,r=Ns(e.capturePerformance)&&!!e.capturePerformance.web_vitals,i=Ns(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register(((t={})[Nd]=r,t)),this._instance.persistence.register(((n={})[jd]=i,n)));this._enabledServerSide=r,this.startIfEnabled()},t._loadScript=function(e){var t,n;null!=(t=ks.__PosthogExtensions__)&&t.postHogWebVitalsCallbacks&&e(),null==(n=ks.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this._instance,"web-vitals",(function(t){t?t_.error("failed to load script",t):e()}))},t._currentURL=function(){var e=ps?ps.location.href:void 0;if(e){var t=this._instance.config.mask_personal_data_properties,n=this._instance.config.custom_personal_data_properties,r=t?ja([],jp,n||[]):[];return yl(e,r,Vp)}t_.error("Could not determine current URL")},Hi(e,[{key:"allowedMetrics",get:function(){var e,t,n=Ns(this._instance.config.capture_performance)?null==(e=this._instance.config.capture_performance)?void 0:e.web_vitals_allowed_metrics:void 0;return js(n)?(null==(t=this._instance.persistence)?void 0:t.props[jd])||["CLS","FCP","INP","LCP"]:n}},{key:"flushToCaptureTimeoutMs",get:function(){return(Ns(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals_delayed_flush_ms:void 0)||5e3}},{key:"_maxAllowedValue",get:function(){var e=Ns(this._instance.config.capture_performance)&&Ws(this._instance.config.capture_performance.__web_vitals_max_value)?this._instance.config.capture_performance.__web_vitals_max_value:n_;return 0<e&&e<=6e4?n_:e}},{key:"isEnabled",get:function(){var e=null==bs?void 0:bs.protocol;if("http:"!==e&&"https:"!==e)return t_.info("Web Vitals are disabled on non-http/https protocols"),!1;var t=Ns(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals:Gs(this._instance.config.capture_performance)?this._instance.config.capture_performance:void 0;return Gs(t)?t:this._enabledServerSide}}])}(),i_=Da("[Heatmaps]");function o_(e){return Ns(e)&&"clientX"in e&&"clientY"in e&&Ws(e.clientX)&&Ws(e.clientY)}var s_=function(){function e(e){var t;this._enabledServerSide=!1,this._initialized=!1,this._flushInterval=null,this.instance=e,this._enabledServerSide=!(null==(t=this.instance.persistence)||!t.props[Ad]),this.rageclicks=new ep(e.config.rageclick)}var t=e.prototype;return t.startIfEnabled=function(){if(this.isEnabled){if(this._initialized)return;i_.info("starting..."),this._setupListeners(),this._onVisibilityChange()}else{var e;clearInterval(null!==(e=this._flushInterval)&&void 0!==e?e:void 0),this._removeListeners(),this.getAndClearBuffer()}},t.onRemoteConfig=function(e){var t,n=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register(((t={})[Ad]=n,t));this._enabledServerSide=n,this.startIfEnabled()},t.getAndClearBuffer=function(){var e=this._buffer;return this._buffer=void 0,e},t._onDeadClick=function(e){this._onClick(e.originalEvent,"deadclick")},t._onVisibilityChange=function(){this._flushInterval&&clearInterval(this._flushInterval),this._flushInterval=function(e){return"visible"===(null==e?void 0:e.visibilityState)}(ys)?setInterval(this._flush.bind(this),this.flushIntervalMilliseconds):null},t._setupListeners=function(){var e=this;ps&&ys&&(this._flushHandler=this._flush.bind(this),Qa(ps,"beforeunload",this._flushHandler),this._onClickHandler=function(t){return e._onClick(t||(null==ps?void 0:ps.event))},Qa(ys,"click",this._onClickHandler,{capture:!0}),this._onMouseMoveHandler=function(t){return e._onMouseMove(t||(null==ps?void 0:ps.event))},Qa(ys,"mousemove",this._onMouseMoveHandler,{capture:!0}),this._deadClicksCapture=new Ep(this.instance,Sp,this._onDeadClick.bind(this)),this._deadClicksCapture.startIfEnabled(),this._onVisibilityChange_handler=this._onVisibilityChange.bind(this),Qa(ys,"visibilitychange",this._onVisibilityChange_handler),this._initialized=!0)},t._removeListeners=function(){var e;ps&&ys&&(this._flushHandler&&ps.removeEventListener("beforeunload",this._flushHandler),this._onClickHandler&&ys.removeEventListener("click",this._onClickHandler,{capture:!0}),this._onMouseMoveHandler&&ys.removeEventListener("mousemove",this._onMouseMoveHandler,{capture:!0}),this._onVisibilityChange_handler&&ys.removeEventListener("visibilitychange",this._onVisibilityChange_handler),clearTimeout(this._mouseMoveTimeout),null==(e=this._deadClicksCapture)||e.stop(),this._initialized=!1)},t._getProperties=function(e,t){var n=this.instance.scrollManager.scrollY(),r=this.instance.scrollManager.scrollX(),i=this.instance.scrollManager.scrollElement(),o=function(e,t,n){for(var r=e;r&&bf(r)&&!wf(r,"body");){if(r===n)return!1;if(Fs(t,null==ps?void 0:ps.getComputedStyle(r).position))return!0;r=Rf(r)}return!1}(If(e),["fixed","sticky"],i);return{x:e.clientX+(o?0:r),y:e.clientY+(o?0:n),target_fixed:o,type:t}},t._onClick=function(e,t){var n;if(void 0===t&&(t="click"),!yf(e.target)&&o_(e)){var r=this._getProperties(e,t);null!=(n=this.rageclicks)&&n.isRageClick(e.clientX,e.clientY,(new Date).getTime())&&this._capture(Ui({},r,{type:"rageclick"})),this._capture(r)}},t._onMouseMove=function(e){var t=this;!yf(e.target)&&o_(e)&&(clearTimeout(this._mouseMoveTimeout),this._mouseMoveTimeout=setTimeout((function(){t._capture(t._getProperties(e,"mousemove"))}),500))},t._capture=function(e){if(ps){var t=ps.location.href,n=this.instance.config.mask_personal_data_properties,r=this.instance.config.custom_personal_data_properties,i=n?ja([],jp,r||[]):[],o=yl(t,i,Vp);this._buffer=this._buffer||{},this._buffer[o]||(this._buffer[o]=[]),this._buffer[o].push(e)}},t._flush=function(){this._buffer&&!Hs(this._buffer)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})},Hi(e,[{key:"flushIntervalMilliseconds",get:function(){var e=5e3;return Ns(this.instance.config.capture_heatmaps)&&this.instance.config.capture_heatmaps.flush_interval_milliseconds&&(e=this.instance.config.capture_heatmaps.flush_interval_milliseconds),e}},{key:"isEnabled",get:function(){return js(this.instance.config.capture_heatmaps)?js(this.instance.config.enable_heatmaps)?this._enabledServerSide:this.instance.config.enable_heatmaps:!1!==this.instance.config.capture_heatmaps}}])}(),a_=function(){function e(e){this._instance=e}var t=e.prototype;return t.doPageView=function(e,t){var n,r=this._previousPageViewProperties(e,t);return this._currentPageview={pathname:null!==(n=null==ps?void 0:ps.location.pathname)&&void 0!==n?n:"",pageViewId:t,timestamp:e},this._instance.scrollManager.resetContext(),r},t.doPageLeave=function(e){var t;return this._previousPageViewProperties(e,null==(t=this._currentPageview)?void 0:t.pageViewId)},t.doEvent=function(){var e;return{$pageview_id:null==(e=this._currentPageview)?void 0:e.pageViewId}},t._previousPageViewProperties=function(e,t){var n=this._currentPageview;if(!n)return{$pageview_id:t};var r={$pageview_id:t,$prev_pageview_id:n.pageViewId},i=this._instance.scrollManager.getContext();if(i&&!this._instance.config.disable_scroll_properties){var o=i.maxScrollHeight,s=i.lastScrollY,a=i.maxScrollY,u=i.maxContentHeight,l=i.lastContentY,c=i.maxContentY;if(!(js(o)||js(s)||js(a)||js(u)||js(l)||js(c))){o=Math.ceil(o),s=Math.ceil(s),a=Math.ceil(a),u=Math.ceil(u),l=Math.ceil(l),c=Math.ceil(c);var d=o<=1?1:na(s/o,0,1,Aa),f=o<=1?1:na(a/o,0,1,Aa),p=u<=1?1:na(l/u,0,1,Aa),_=u<=1?1:na(c/u,0,1,Aa);r=Ha(r,{$prev_pageview_last_scroll:s,$prev_pageview_last_scroll_percentage:d,$prev_pageview_max_scroll:a,$prev_pageview_max_scroll_percentage:f,$prev_pageview_last_content:l,$prev_pageview_last_content_percentage:p,$prev_pageview_max_content:c,$prev_pageview_max_content_percentage:_})}}return n.pathname&&(r.$prev_pageview_pathname=n.pathname),n.timestamp&&(r.$prev_pageview_duration=(e.getTime()-n.timestamp.getTime())/1e3),r},e}(),u_=Da("[FeatureFlags]"),l_=Da("[FeatureFlags]",{debugEnabled:!0}),c_="$active_feature_flags",d_="$override_feature_flags",f_="$feature_flag_payloads",p_="$override_feature_flag_payloads",__="$feature_flag_request_id",h_="$feature_flag_evaluated_at",v_=function(e){for(var t,n={},r=ji(Ua(e||{}));!(t=r()).done;){var i=t.value,o=i[0],s=i[1];s&&(n[o]=s)}return n},g_=function(e){var t=e.flags;return t?(e.featureFlags=Object.fromEntries(Object.keys(t).map((function(e){var n;return[e,null!==(n=t[e].variant)&&void 0!==n?n:t[e].enabled]}))),e.featureFlagPayloads=Object.fromEntries(Object.keys(t).filter((function(e){return t[e].enabled})).filter((function(e){var n;return null==(n=t[e].metadata)?void 0:n.payload})).map((function(e){var n;return[e,null==(n=t[e].metadata)?void 0:n.payload]})))):u_.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),e},m_=function(e){return e.FeatureFlags="feature_flags",e.Recordings="recordings",e}({}),y_=function(){function e(e){this._override_warning=!1,this._hasLoadedFlags=!1,this._requestInFlight=!1,this._reloadingDisabled=!1,this._additionalReloadRequested=!1,this._flagsCalled=!1,this._flagsLoadedFromRemote=!1,this._instance=e,this.featureFlagEventHandlers=[]}var t=e.prototype;return t._getValidEvaluationEnvironments=function(){var e=this._instance.config.evaluation_environments;return null!=e&&e.length?e.filter((function(e){var t=e&&"string"==typeof e&&e.trim().length>0;return t||u_.error("Invalid evaluation environment found:",e,"Expected non-empty string"),t})):[]},t._shouldIncludeEvaluationEnvironments=function(){return this._getValidEvaluationEnvironments().length>0},t.flags=function(){if(this._instance.config.__preview_remote_config)this._flagsCalled=!0;else{var e=!this._reloadDebouncer&&(this._instance.config.advanced_disable_feature_flags||this._instance.config.advanced_disable_feature_flags_on_first_load);this._callFlagsEndpoint({disableFlags:e})}},t.getFlags=function(){return Object.keys(this.getFlagVariants())},t.getFlagsWithDetails=function(){var e=this._instance.get_property(Gd),t=this._instance.get_property(d_),n=this._instance.get_property(p_);if(!n&&!t)return e||{};for(var r,i=Ha({},e||{}),o=ji([].concat(new Set([].concat(Object.keys(n||{}),Object.keys(t||{})))));!(r=o()).done;){var s,a,u=r.value,l=i[u],c=null==t?void 0:t[u],d=js(c)?null!==(s=null==l?void 0:l.enabled)&&void 0!==s&&s:!!c,f=js(c)?l.variant:"string"==typeof c?c:void 0,p=null==n?void 0:n[u],_=Ui({},l,{enabled:d,variant:d?null!=f?f:null==l?void 0:l.variant:void 0});if(d!==(null==l?void 0:l.enabled)&&(_.original_enabled=null==l?void 0:l.enabled),f!==(null==l?void 0:l.variant)&&(_.original_variant=null==l?void 0:l.variant),p)_.metadata=Ui({},null==l?void 0:l.metadata,{payload:p,original_payload:null==l||null==(a=l.metadata)?void 0:a.payload});i[u]=_}return this._override_warning||(u_.warn(" Overriding feature flag details!",{flagDetails:e,overriddenPayloads:n,finalDetails:i}),this._override_warning=!0),i},t.getFlagVariants=function(){var e=this._instance.get_property(Bd),t=this._instance.get_property(d_);if(!t)return e||{};for(var n=Ha({},e),r=Object.keys(t),i=0;i<r.length;i++)n[r[i]]=t[r[i]];return this._override_warning||(u_.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:n}),this._override_warning=!0),n},t.getFlagPayloads=function(){var e=this._instance.get_property(f_),t=this._instance.get_property(p_);if(!t)return e||{};for(var n=Ha({},e||{}),r=Object.keys(t),i=0;i<r.length;i++)n[r[i]]=t[r[i]];return this._override_warning||(u_.warn(" Overriding feature flag payloads!",{flagPayloads:e,overriddenPayloads:t,finalPayloads:n}),this._override_warning=!0),n},t.reloadFeatureFlags=function(){var e=this;this._reloadingDisabled||this._instance.config.advanced_disable_feature_flags||this._reloadDebouncer||(this._reloadDebouncer=setTimeout((function(){e._callFlagsEndpoint()}),5))},t._clearDebouncer=function(){clearTimeout(this._reloadDebouncer),this._reloadDebouncer=void 0},t.ensureFlagsLoaded=function(){this._hasLoadedFlags||this._requestInFlight||this._reloadDebouncer||this.reloadFeatureFlags()},t.setAnonymousDistinctId=function(e){this.$anon_distinct_id=e},t.setReloadingPaused=function(e){this._reloadingDisabled=e},t._callFlagsEndpoint=function(e){var t,n=this;if(this._clearDebouncer(),!this._instance._shouldDisableFlags())if(this._requestInFlight)this._additionalReloadRequested=!0;else{var r=this._instance.config.token,i=this._instance.get_property("$device_id"),o={token:r,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:Ui({},(null==(t=this._instance.persistence)?void 0:t.get_initial_props())||{},this._instance.get_property(Zd)||{}),group_properties:this._instance.get_property(Yd)};zs(i)||js(i)||(o.$device_id=i),(null!=e&&e.disableFlags||this._instance.config.advanced_disable_feature_flags)&&(o.disable_flags=!0),this._shouldIncludeEvaluationEnvironments()&&(o.evaluation_environments=this._getValidEvaluationEnvironments());var s=this._instance.config.__preview_remote_config,a=s?"/flags/?v=2":"/flags/?v=2&config=true",u=this._instance.config.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":"",l=this._instance.requestRouter.endpointFor("flags",a+u);s&&(o.timezone=Jp()),this._requestInFlight=!0,this._instance._send_request({method:"POST",url:l,data:o,compression:this._instance.config.disable_compression?void 0:hl.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:function(e){var t,r,i=!0;(200===e.statusCode&&(n._additionalReloadRequested||(n.$anon_distinct_id=void 0),i=!1),n._requestInFlight=!1,n._flagsCalled)||(n._flagsCalled=!0,n._instance._onRemoteConfig(null!==(r=e.json)&&void 0!==r?r:{}));if(!o.disable_flags||n._additionalReloadRequested)if(n._flagsLoadedFromRemote=!i,e.json&&null!=(t=e.json.quotaLimited)&&t.includes(m_.FeatureFlags))u_.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.");else{var s;if(!o.disable_flags)n.receivedFeatureFlags(null!==(s=e.json)&&void 0!==s?s:{},i);n._additionalReloadRequested&&(n._additionalReloadRequested=!1,n._callFlagsEndpoint())}}})}},t.getFeatureFlag=function(e,t){if(void 0===t&&(t={}),this._hasLoadedFlags||this.getFlags()&&this.getFlags().length>0){var n=this.getFlagVariants()[e],r=""+n,i=this._instance.get_property(__)||void 0,o=this._instance.get_property(h_)||void 0,s=this._instance.get_property(Jd)||{};if((t.send_event||!("send_event"in t))&&(!(e in s)||!s[e].includes(r))){var a,u,l,c,d,f,p,_,h,v;qs(s[e])?s[e].push(r):s[e]=[r],null==(a=this._instance.persistence)||a.register(((u={})[Jd]=s,u));var g=this.getFeatureFlagDetails(e),m={$feature_flag:e,$feature_flag_response:n,$feature_flag_payload:this.getFeatureFlagPayload(e)||null,$feature_flag_request_id:i,$feature_flag_evaluated_at:o,$feature_flag_bootstrapped_response:(null==(l=this._instance.config.bootstrap)||null==(l=l.featureFlags)?void 0:l[e])||null,$feature_flag_bootstrapped_payload:(null==(c=this._instance.config.bootstrap)||null==(c=c.featureFlagPayloads)?void 0:c[e])||null,$used_bootstrap_value:!this._flagsLoadedFromRemote};js(null==g||null==(d=g.metadata)?void 0:d.version)||(m.$feature_flag_version=g.metadata.version);var y,b=null!==(f=null==g||null==(p=g.reason)?void 0:p.description)&&void 0!==f?f:null==g||null==(_=g.reason)?void 0:_.code;if(b&&(m.$feature_flag_reason=b),null!=g&&null!=(h=g.metadata)&&h.id&&(m.$feature_flag_id=g.metadata.id),js(null==g?void 0:g.original_variant)&&js(null==g?void 0:g.original_enabled)||(m.$feature_flag_original_response=js(g.original_variant)?g.original_enabled:g.original_variant),null!=g&&null!=(v=g.metadata)&&v.original_payload)m.$feature_flag_original_payload=null==g||null==(y=g.metadata)?void 0:y.original_payload;this._instance.capture("$feature_flag_called",m)}return n}u_.warn('getFeatureFlag for key "'+e+"\" failed. Feature flags didn't load in time.")},t.getFeatureFlagDetails=function(e){return this.getFlagsWithDetails()[e]},t.getFeatureFlagPayload=function(e){return this.getFlagPayloads()[e]},t.getRemoteConfigPayload=function(e,t){var n=this._instance.config.token,r={distinct_id:this._instance.get_distinct_id(),token:n};this._shouldIncludeEvaluationEnvironments()&&(r.evaluation_environments=this._getValidEvaluationEnvironments()),this._instance._send_request({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2&config=true"),data:r,compression:this._instance.config.disable_compression?void 0:hl.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:function(n){var r,i=null==(r=n.json)?void 0:r.featureFlagPayloads;t((null==i?void 0:i[e])||void 0)}})},t.isFeatureEnabled=function(e,t){if(void 0===t&&(t={}),this._hasLoadedFlags||this.getFlags()&&this.getFlags().length>0){var n=this.getFeatureFlag(e,t);return js(n)?void 0:!!n}u_.warn('isFeatureEnabled for key "'+e+"\" failed. Feature flags didn't load in time.")},t.addFeatureFlagsHandler=function(e){this.featureFlagEventHandlers.push(e)},t.removeFeatureFlagsHandler=function(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter((function(t){return t!==e}))},t.receivedFeatureFlags=function(e,t){if(this._instance.persistence){this._hasLoadedFlags=!0;var n=this.getFlagVariants(),r=this.getFlagPayloads(),i=this.getFlagsWithDetails();!function(e,t,n,r,i){var o,s,a;void 0===n&&(n={}),void 0===r&&(r={}),void 0===i&&(i={});var u=g_(e),l=u.flags,c=u.featureFlags,d=u.featureFlagPayloads;if(c){var f=e.requestId,p=e.evaluatedAt;if(qs(c)){var _;u_.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var h={};if(c)for(var v=0;v<c.length;v++)h[c[v]]=!0;t&&t.register(((_={})[c_]=c,_[Bd]=h,_))}else{var g=c,m=d,y=l;e.errorsWhileComputingFlags&&(g=Ui({},n,g),m=Ui({},r,m),y=Ui({},i,y)),t&&t.register(Ui(((o={})[c_]=Object.keys(v_(g)),o[Bd]=g||{},o[f_]=m||{},o[Gd]=y||{},o),f?((s={})[__]=f,s):{},p?((a={})[h_]=p,a):{}))}}}(e,this._instance.persistence,n,r,i),this._fireFeatureFlagsCallbacks(t)}},t.override=function(e,t){void 0===t&&(t=!1),u_.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:e,suppressWarning:t})},t.overrideFeatureFlags=function(e){if(!this._instance.__loaded||!this._instance.persistence)return u_.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(!1===e)return this._instance.persistence.unregister(d_),this._instance.persistence.unregister(p_),this._fireFeatureFlagsCallbacks(),l_.info("All overrides cleared");if(e&&"object"==typeof e&&("flags"in e||"payloads"in e)){var t,n=e;if(this._override_warning=Boolean(null!==(t=n.suppressWarning)&&void 0!==t&&t),"flags"in n)if(!1===n.flags)this._instance.persistence.unregister(d_),l_.info("Flag overrides cleared");else if(n.flags){if(qs(n.flags)){for(var r,i={},o=0;o<n.flags.length;o++)i[n.flags[o]]=!0;this._instance.persistence.register(((r={})[d_]=i,r))}else{var s;this._instance.persistence.register(((s={})[d_]=n.flags,s))}l_.info("Flag overrides set",{flags:n.flags})}if("payloads"in n)if(!1===n.payloads)this._instance.persistence.unregister(p_),l_.info("Payload overrides cleared");else if(n.payloads){var a;this._instance.persistence.register(((a={})[p_]=n.payloads,a)),l_.info("Payload overrides set",{payloads:n.payloads})}this._fireFeatureFlagsCallbacks()}else this._fireFeatureFlagsCallbacks()},t.onFeatureFlags=function(e){var t=this;if(this.addFeatureFlagsHandler(e),this._hasLoadedFlags){var n=this._prepareFeatureFlagsForCallbacks(),r=n.flags,i=n.flagVariants;e(r,i)}return function(){return t.removeFeatureFlagsHandler(e)}},t.updateEarlyAccessFeatureEnrollment=function(e,t,n){var r,i,o,s,a=(this._instance.get_property(Wd)||[]).find((function(t){return t.flagKey===e})),u=((r={})["$feature_enrollment/"+e]=t,r),l={$feature_flag:e,$feature_enrollment:t,$set:u};a&&(l.$early_access_feature_name=a.name),n&&(l.$feature_enrollment_stage=n),this._instance.capture("$feature_enrollment_update",l),this.setPersonPropertiesForFlags(u,!1);var c=Ui({},this.getFlagVariants(),((i={})[e]=t,i));null==(o=this._instance.persistence)||o.register(((s={})[c_]=Object.keys(v_(c)),s[Bd]=c,s)),this._fireFeatureFlagsCallbacks()},t.getEarlyAccessFeatures=function(e,t,n){var r=this;void 0===t&&(t=!1);var i=this._instance.get_property(Wd),o=n?"&"+n.map((function(e){return"stage="+e})).join("&"):"";if(i&&!t)return e(i);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this._instance.config.token+o),method:"GET",callback:function(t){var n,i,o;if(t.json){var s=t.json.earlyAccessFeatures;return null==(n=r._instance.persistence)||n.unregister(Wd),null==(i=r._instance.persistence)||i.register(((o={})[Wd]=s,o)),e(s)}}})},t._prepareFeatureFlagsForCallbacks=function(){var e=this.getFlags(),t=this.getFlagVariants();return{flags:e.filter((function(e){return t[e]})),flagVariants:Object.keys(t).filter((function(e){return t[e]})).reduce((function(e,n){return e[n]=t[n],e}),{})}},t._fireFeatureFlagsCallbacks=function(e){var t=this._prepareFeatureFlagsForCallbacks(),n=t.flags,r=t.flagVariants;this.featureFlagEventHandlers.forEach((function(t){return t(n,r,{errorsLoading:e})}))},t.setPersonPropertiesForFlags=function(e,t){var n;void 0===t&&(t=!0);var r=this._instance.get_property(Zd)||{};this._instance.register(((n={})[Zd]=Ui({},r,e),n)),t&&this._instance.reloadFeatureFlags()},t.resetPersonPropertiesForFlags=function(){this._instance.unregister(Zd)},t.setGroupPropertiesForFlags=function(e,t){var n;void 0===t&&(t=!0);var r=this._instance.get_property(Yd)||{};0!==Object.keys(r).length&&Object.keys(r).forEach((function(t){r[t]=Ui({},r[t],e[t]),delete e[t]})),this._instance.register(((n={})[Yd]=Ui({},r,e),n)),t&&this._instance.reloadFeatureFlags()},t.resetGroupPropertiesForFlags=function(e){if(e){var t,n,r=this._instance.get_property(Yd)||{};this._instance.register(((n={})[Yd]=Ui({},r,((t={})[e]={},t)),n))}else this._instance.unregister(Yd)},t.reset=function(){this._hasLoadedFlags=!1,this._requestInFlight=!1,this._reloadingDisabled=!1,this._additionalReloadRequested=!1,this._flagsCalled=!1,this._flagsLoadedFromRemote=!1,this.$anon_distinct_id=void 0,this._clearDebouncer(),this._override_warning=!1},Hi(e,[{key:"hasLoadedFlags",get:function(){return this._hasLoadedFlags}}])}(),b_=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"],w_=function(){function e(e,t){this._config=e,this.props={},this._campaign_params_saved=!1,this._name=function(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._storage=this._buildStorage(e),this.load(),e.debug&&Aa.info("Persistence loaded",e.persistence,Ui({},this.props)),this.update_config(e,e,t),this.save()}var t=e.prototype;return t.isDisabled=function(){return!!this._disabled},t._buildStorage=function(e){-1===b_.indexOf(e.persistence.toLowerCase())&&(Aa.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var t=e.persistence.toLowerCase();return"localstorage"===t&&fp._is_supported()?fp:"localstorage+cookie"===t&&_p._is_supported()?_p:"sessionstorage"===t&&mp._is_supported()?mp:"memory"===t?vp:"cookie"===t?cp:_p._is_supported()?_p:cp},t.properties=function(){var e={};return Na(this.props,(function(t,n){if(n===Bd&&Ns(t))for(var r=Object.keys(t),i=0;i<r.length;i++)e["$feature/"+r[i]]=t[r[i]];else s=n,a=!1,(zs(o=lf)?a:gs&&o.indexOf===gs?-1!=o.indexOf(s):(Na(o,(function(e){if(a||(a=e===s))return qa})),a))||(e[n]=t);var o,s,a})),e},t.load=function(){if(!this._disabled){var e=this._storage._parse(this._name);e&&(this.props=Ha({},e))}},t.save=function(){this._disabled||this._storage._set(this._name,this.props,this._expire_days,this._cross_subdomain,this._secure,this._config.debug)},t.remove=function(){this._storage._remove(this._name,!1),this._storage._remove(this._name,!0)},t.clear=function(){this.remove(),this.props={}},t.register_once=function(e,t,n){var r=this;if(Ns(e)){js(t)&&(t="None"),this._expire_days=js(n)?this._default_expiry:n;var i=!1;if(Na(e,(function(e,n){r.props.hasOwnProperty(n)&&r.props[n]!==t||(r.props[n]=e,i=!0)})),i)return this.save(),!0}return!1},t.register=function(e,t){var n=this;if(Ns(e)){this._expire_days=js(t)?this._default_expiry:t;var r=!1;if(Na(e,(function(t,i){e.hasOwnProperty(i)&&n.props[i]!==t&&(n.props[i]=t,r=!0)})),r)return this.save(),!0}return!1},t.unregister=function(e){e in this.props&&(delete this.props[e],this.save())},t.update_campaign_params=function(){if(!this._campaign_params_saved){var e=Bp(this._config.custom_campaign_params,this._config.mask_personal_data_properties,this._config.custom_personal_data_properties);Hs(Ba(e))||this.register(e),this._campaign_params_saved=!0}},t.update_search_keyword=function(){var e;this.register((e=null==ys?void 0:ys.referrer)?Gp(e):{})},t.update_referrer_info=function(){var e;this.register_once({$referrer:Yp(),$referring_domain:null!=ys&&ys.referrer&&(null==(e=vl(ys.referrer))?void 0:e.host)||"$direct"},void 0)},t.set_initial_person_info=function(){var e;this.props[nf]||this.props[rf]||this.register_once(((e={})[of]=Qp(this._config.mask_personal_data_properties,this._config.custom_personal_data_properties),e),void 0)},t.get_initial_props=function(){var e=this,t={};Na([rf,nf],(function(n){var r=e.props[n];r&&Na(r,(function(e,n){t["$initial_"+Rs(n)]=e}))}));var n,r,i=this.props[of];if(i){var o=(n=Xp(i),r={},Na(n,(function(e,t){r["$initial_"+Rs(t)]=e})),r);Ha(t,o)}return t},t.safe_merge=function(e){return Na(this.props,(function(t,n){n in e||(e[n]=t)})),e},t.update_config=function(e,t,n){if(this._default_expiry=this._expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence||!!n),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie),e.persistence!==t.persistence){var r=this._buildStorage(e),i=this.props;this.clear(),this._storage=r,this.props=i,this.save()}},t.set_disabled=function(e){this._disabled=e,this._disabled?this.remove():this.save()},t.set_cross_subdomain=function(e){e!==this._cross_subdomain&&(this._cross_subdomain=e,this.remove(),this.save())},t.set_secure=function(e){e!==this._secure&&(this._secure=e,this.remove(),this.save())},t.set_event_timer=function(e,t){var n=this.props[Od]||{};n[e]=t,this.props[Od]=n,this.save()},t.remove_event_timer=function(e){var t=(this.props[Od]||{})[e];return js(t)||(delete this.props[Od][e],this.save()),t},t.get_property=function(e){return this.props[e]},t.set_property=function(e,t){this.props[e]=t,this.save()},e}(),S_=Da("[Product Tours]"),x_="ph_product_tours",E_=function(){function e(e){this._cachedTours=null,this._productTourManager=null,this._isProductToursEnabled=void 0,this._isInitializing=!1,this._instance=e}var t=e.prototype;return t.onRemoteConfig=function(e){if(this._instance.config.disable_product_tours)S_.info("Product tours disabled via config");else{var t=e.productTours;Bs(t)?S_.info("Product tours not enabled in remote config"):(this._isProductToursEnabled=t,S_.info("Remote config received, isProductToursEnabled: "+this._isProductToursEnabled),this.loadIfEnabled())}},t.loadIfEnabled=function(){var e,t=this;if(!this._productTourManager)if(this._isInitializing)S_.info("Already initializing product tours, skipping...");else if(this._instance.config.disable_product_tours)S_.info("Product tours disabled via config");else{var n=null==ks?void 0:ks.__PosthogExtensions__;if(n){var r=null==(e=this._instance.featureFlags)?void 0:e.isFeatureEnabled("product-tours-2025");if(!js(this._isProductToursEnabled)||r){var i=this._isProductToursEnabled||r;if(i){this._isInitializing=!0;try{var o=n.generateProductTours;if(o)return void this._completeInitialization(o,i);var s=n.loadExternalDependency;if(!s)return S_.error("PostHog loadExternalDependency extension not found."),void(this._isInitializing=!1);s(this._instance,"product-tours",(function(e){e||!n.generateProductTours?S_.error("Could not load product tours script",e):t._completeInitialization(n.generateProductTours,i),t._isInitializing=!1}))}catch(e){S_.error("Error initializing product tours",e),this._isInitializing=!1}}else S_.info("Product tours not enabled")}else S_.info("Waiting for remote config or feature flag to enable product tours")}else S_.error("PostHog Extensions not found.")}},t._completeInitialization=function(e,t){this._productTourManager=e(this._instance,t)||null,S_.info("Product tours loaded successfully")},t.getProductTours=function(e,t){var n=this;if(void 0===t&&(t=!1),!qs(this._cachedTours)||t){var r=this._instance.persistence;if(r){var i=r.props[x_];if(qs(i)&&!t)return this._cachedTours=i,void e(i,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",callback:function(t){var i=t.statusCode;if(200!==i||!t.json){var o="Product Tours API could not be loaded, status: "+i;return S_.error(o),void e([],{isLoaded:!1,error:o})}var s,a=qs(t.json.product_tours)?t.json.product_tours:[];(n._cachedTours=a,r)&&r.register(((s={})[x_]=a,s));e(a,{isLoaded:!0})}})}else e(this._cachedTours,{isLoaded:!0})},t.getActiveProductTours=function(e){if(Bs(this._productTourManager))return S_.warn("Product tours not loaded yet"),void e([],{isLoaded:!1,error:"Product tours not loaded"});this._productTourManager.getActiveProductTours(e)},t.showProductTour=function(e){var t;S_.info("showProductTour("+e+")"),null==(t=this._productTourManager)||t.showTourById(e)},t.dismissProductTour=function(){var e;null==(e=this._productTourManager)||e.dismissTour("user_clicked_skip")},t.nextStep=function(){var e;null==(e=this._productTourManager)||e.nextStep()},t.previousStep=function(){var e;null==(e=this._productTourManager)||e.previousStep()},t.clearCache=function(){this._cachedTours=null;var e=this._instance.persistence;e&&e.unregister(x_)},t.resetTour=function(e){var t;null==(t=this._productTourManager)||t.resetTour(e)},t.resetAllTours=function(){var e;null==(e=this._productTourManager)||e.resetAllTours()},e}(),k_=function(){function e(){this._events={},this._events={}}var t=e.prototype;return t.on=function(e,t){var n=this;return this._events[e]||(this._events[e]=[]),this._events[e].push(t),function(){n._events[e]=n._events[e].filter((function(e){return e!==t}))}},t.emit=function(e,t){for(var n,r=ji(this._events[e]||[]);!(n=r()).done;){(0,n.value)(t)}for(var i,o=ji(this._events["*"]||[]);!(i=o()).done;){(0,i.value)(e,t)}},e}();function P_(e,t,n){if(Bs(e))return!1;switch(n){case"exact":return e===t;case"contains":var r=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*");return new RegExp(r,"i").test(e);case"regex":try{return new RegExp(t).test(e)}catch(e){return!1}default:return!1}}var C_=function(){function e(e){var t=this;this._debugEventEmitter=new k_,this._checkStep=function(e,n){return t._checkStepEvent(e,n)&&t._checkStepUrl(e,n)&&t._checkStepElement(e,n)&&t._checkStepProperties(e,n)},this._checkStepEvent=function(e,t){return null==t||!t.event||(null==e?void 0:e.event)===(null==t?void 0:t.event)},this._instance=e,this._actionEvents=new Set,this._actionRegistry=new Set}var t=e.prototype;return t.init=function(){var e,t=this;if(!js(null==(e=this._instance)?void 0:e._addCaptureHook)){var n;null==(n=this._instance)||n._addCaptureHook((function(e,n){t.on(e,n)}))}},t.register=function(e){var t,n,r=this;if(!js(null==(t=this._instance)?void 0:t._addCaptureHook)&&(e.forEach((function(e){var t,n;null==(t=r._actionRegistry)||t.add(e),null==(n=e.steps)||n.forEach((function(e){var t;null==(t=r._actionEvents)||t.add((null==e?void 0:e.event)||"")}))})),null!=(n=this._instance)&&n.autocapture)){var i,o=new Set;e.forEach((function(e){var t;null==(t=e.steps)||t.forEach((function(e){null!=e&&e.selector&&o.add(null==e?void 0:e.selector)}))})),null==(i=this._instance)||i.autocapture.setElementSelectors(o)}},t.on=function(e,t){var n,r=this;null!=t&&0!=e.length&&(this._actionEvents.has(e)||this._actionEvents.has(null==t?void 0:t.event))&&this._actionRegistry&&(null==(n=this._actionRegistry)?void 0:n.size)>0&&this._actionRegistry.forEach((function(e){r._checkAction(t,e)&&r._debugEventEmitter.emit("actionCaptured",e.name)}))},t._addActionHook=function(e){this.onAction("actionCaptured",(function(t){return e(t)}))},t._checkAction=function(e,t){if(null==(null==t?void 0:t.steps))return!1;for(var n,r=ji(t.steps);!(n=r()).done;){var i=n.value;if(this._checkStep(e,i))return!0}return!1},t.onAction=function(e,t){return this._debugEventEmitter.on(e,t)},t._checkStepUrl=function(e,t){if(null!=t&&t.url){var n,r=null==e||null==(n=e.properties)?void 0:n.$current_url;if(!r||"string"!=typeof r)return!1;if(!P_(r,t.url,t.url_matching||"contains"))return!1}return!0},t._checkStepElement=function(e,t){return!!this._checkStepHref(e,t)&&(!!this._checkStepText(e,t)&&!!this._checkStepSelector(e,t))},t._checkStepHref=function(e,t){var n;if(null==t||!t.href)return!0;var r=this._getElementsList(e);if(r.length>0)return r.some((function(e){return P_(e.href,t.href,t.href_matching||"exact")}));var i,o=(null==e||null==(n=e.properties)?void 0:n.$elements_chain)||"";return!!o&&P_((i=o.match(/(?::|")href="(.*?)"/))?i[1]:"",t.href,t.href_matching||"exact")},t._checkStepText=function(e,t){var n;if(null==t||!t.text)return!0;var r=this._getElementsList(e);if(r.length>0)return r.some((function(e){return P_(e.text,t.text,t.text_matching||"exact")||P_(e.$el_text,t.text,t.text_matching||"exact")}));var i,o,s,a=(null==e||null==(n=e.properties)?void 0:n.$elements_chain)||"";return!!a&&(i=function(e){for(var t,n=[],r=/(?::|")text="(.*?)"/g;!Bs(t=r.exec(e));)n.includes(t[1])||n.push(t[1]);return n}(a),o=t.text,s=t.text_matching||"exact",i.some((function(e){return P_(e,o,s)})))},t._checkStepSelector=function(e,t){var n,r;if(null==t||!t.selector)return!0;var i=null==e||null==(n=e.properties)?void 0:n.$element_selectors;if(null!=i&&i.includes(t.selector))return!0;var o=(null==e||null==(r=e.properties)?void 0:r.$elements_chain)||"";if(t.selector_regex&&o)try{return new RegExp(t.selector_regex).test(o)}catch(e){return!1}return!1},t._getElementsList=function(e){var t;return null==(null==e||null==(t=e.properties)?void 0:t.$elements)?[]:null==e?void 0:e.properties.$elements},t._checkStepProperties=function(e,t){return null==t||!t.properties||0===t.properties.length||fc(t.properties.reduce((function(e,t){var n=qs(t.value)?t.value.map(String):null!=t.value?[String(t.value)]:[];return e[t.key]={values:n,operator:t.operator||"exact"},e}),{}),null==e?void 0:e.properties)},e}(),T_=function(){function e(e){this._instance=e,this._eventToSurveys=new Map,this._cancelEventToSurveys=new Map,this._actionToSurveys=new Map}var t=e.prototype;return t._doesEventMatchFilter=function(e,t){return!!e&&fc(e.propertyFilters,null==t?void 0:t.properties)},t._buildEventToSurveyMap=function(e,t){var n=new Map;return e.forEach((function(e){var r;null==(r=e.conditions)||null==(r=r[t])||null==(r=r.values)||r.forEach((function(t){if(null!=t&&t.name){var r=n.get(t.name)||[];r.push(e.id),n.set(t.name,r)}}))})),n},t._getMatchingSurveys=function(e,t,n){var r,i=this,o=(n===ns.Activation?this._eventToSurveys:this._cancelEventToSurveys).get(e),s=[];return null==(r=this._instance)||r.getSurveys((function(e){s=e.filter((function(e){return null==o?void 0:o.includes(e.id)}))})),s.filter((function(r){var o,s=null==(o=r.conditions)||null==(o=o[n])||null==(o=o.values)?void 0:o.find((function(t){return t.name===e}));return i._doesEventMatchFilter(s,t)}))},t.register=function(e){var t;js(null==(t=this._instance)?void 0:t._addCaptureHook)||(this._setupEventBasedSurveys(e),this._setupActionBasedSurveys(e))},t._setupActionBasedSurveys=function(e){var t=this,n=e.filter((function(e){var t,n;return(null==(t=e.conditions)?void 0:t.actions)&&(null==(n=e.conditions)||null==(n=n.actions)||null==(n=n.values)?void 0:n.length)>0}));if(0!==n.length){if(null==this._actionMatcher){this._actionMatcher=new C_(this._instance),this._actionMatcher.init();this._actionMatcher._addActionHook((function(e){t.onAction(e)}))}n.forEach((function(e){var n,r,i,o,s;e.conditions&&null!=(n=e.conditions)&&n.actions&&null!=(r=e.conditions)&&null!=(r=r.actions)&&r.values&&(null==(i=e.conditions)||null==(i=i.actions)||null==(i=i.values)?void 0:i.length)>0&&(null==(o=t._actionMatcher)||o.register(e.conditions.actions.values),null==(s=e.conditions)||null==(s=s.actions)||null==(s=s.values)||s.forEach((function(n){if(n&&n.name){var r=t._actionToSurveys.get(n.name);r&&r.push(e.id),t._actionToSurveys.set(n.name,r||[e.id])}})))}))}},t._setupEventBasedSurveys=function(e){var t,n=this,r=e.filter((function(e){var t,n;return(null==(t=e.conditions)?void 0:t.events)&&(null==(n=e.conditions)||null==(n=n.events)||null==(n=n.values)?void 0:n.length)>0})),i=e.filter((function(e){var t,n;return(null==(t=e.conditions)?void 0:t.cancelEvents)&&(null==(n=e.conditions)||null==(n=n.cancelEvents)||null==(n=n.values)?void 0:n.length)>0}));if(0!==r.length||0!==i.length){null==(t=this._instance)||t._addCaptureHook((function(e,t){n.onEvent(e,t)})),this._eventToSurveys=this._buildEventToSurveyMap(e,ns.Activation),this._cancelEventToSurveys=this._buildEventToSurveyMap(e,ns.Cancellation)}},t.onEvent=function(e,t){var n,r=this,i=(null==(n=this._instance)||null==(n=n.persistence)?void 0:n.props[Xd])||[];if(cs.SHOWN===e&&t&&i.length>0){var o;Xa.info("survey event matched, removing survey from activated surveys",{event:e,eventPayload:t,existingActivatedSurveys:i});var s=null==t||null==(o=t.properties)?void 0:o.$survey_id;if(s){var a=i.indexOf(s);a>=0&&(i.splice(a,1),this._updateActivatedSurveys(i))}}else{if(this._cancelEventToSurveys.has(e)){var u=this._getMatchingSurveys(e,t,ns.Cancellation);u.length>0&&(Xa.info("cancel event matched, cancelling surveys",{event:e,surveysToCancel:u.map((function(e){return e.id}))}),u.forEach((function(e){var t,n=i.indexOf(e.id);n>=0&&i.splice(n,1),null==(t=r._instance)||t.cancelPendingSurvey(e.id)})),this._updateActivatedSurveys(i))}if(this._eventToSurveys.has(e)){Xa.info("survey event name matched",{event:e,eventPayload:t,surveys:this._eventToSurveys.get(e)});var l=this._getMatchingSurveys(e,t,ns.Activation);this._updateActivatedSurveys(i.concat(l.map((function(e){return e.id}))||[]))}}},t.onAction=function(e){var t,n=(null==(t=this._instance)||null==(t=t.persistence)?void 0:t.props[Xd])||[];this._actionToSurveys.has(e)&&this._updateActivatedSurveys(n.concat(this._actionToSurveys.get(e)||[]))},t._updateActivatedSurveys=function(e){var t,n;Xa.info("updating activated surveys",{activatedSurveys:e}),null==(t=this._instance)||null==(t=t.persistence)||t.register(((n={})[Xd]=[].concat(new Set(e)),n))},t.getSurveys=function(){var e,t=null==(e=this._instance)||null==(e=e.persistence)?void 0:e.props[Xd];return t||[]},t.getEventToSurveys=function(){return this._eventToSurveys},t._getActionMatcher=function(){return this._actionMatcher},e}(),I_=function(){function e(e){this._isSurveysEnabled=void 0,this._surveyManager=null,this._isFetchingSurveys=!1,this._isInitializingSurveys=!1,this._surveyCallbacks=[],this._instance=e,this._surveyEventReceiver=null}var t=e.prototype;return t.onRemoteConfig=function(e){if(!this._instance.config.disable_surveys){var t=e.surveys;if(Bs(t))return Xa.warn("Flags not loaded yet. Not loading surveys.");var n=qs(t);this._isSurveysEnabled=n?t.length>0:t,Xa.info("flags response received, isSurveysEnabled: "+this._isSurveysEnabled),this.loadIfEnabled()}},t.reset=function(){localStorage.removeItem("lastSeenSurveyDate");for(var e=[],t=0;t<localStorage.length;t++){var n=localStorage.key(t);(null!=n&&n.startsWith(tu)||null!=n&&n.startsWith(nu))&&e.push(n)}e.forEach((function(e){return localStorage.removeItem(e)}))},t.loadIfEnabled=function(){var e=this;if(!this._surveyManager)if(this._isInitializingSurveys)Xa.info("Already initializing surveys, skipping...");else if(this._instance.config.disable_surveys)Xa.info("Disabled. Not loading surveys.");else if(this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())Xa.info("Not loading surveys in cookieless mode without consent.");else{var t=null==ks?void 0:ks.__PosthogExtensions__;if(t){if(!js(this._isSurveysEnabled)||this._instance.config.advanced_enable_surveys){var n=this._isSurveysEnabled||this._instance.config.advanced_enable_surveys;this._isInitializingSurveys=!0;try{var r=t.generateSurveys;if(r)return void this._completeSurveyInitialization(r,n);var i=t.loadExternalDependency;if(!i)return void this._handleSurveyLoadError("PostHog loadExternalDependency extension not found.");i(this._instance,"surveys",(function(r){r||!t.generateSurveys?e._handleSurveyLoadError("Could not load surveys script",r):e._completeSurveyInitialization(t.generateSurveys,n)}))}catch(e){throw this._handleSurveyLoadError("Error initializing surveys",e),e}finally{this._isInitializingSurveys=!1}}}else Xa.error("PostHog Extensions not found.")}},t._completeSurveyInitialization=function(e,t){this._surveyManager=e(this._instance,t),this._surveyEventReceiver=new T_(this._instance),Xa.info("Surveys loaded successfully"),this._notifySurveyCallbacks({isLoaded:!0})},t._handleSurveyLoadError=function(e,t){Xa.error(e,t),this._notifySurveyCallbacks({isLoaded:!1,error:e})},t.onSurveysLoaded=function(e){var t=this;return this._surveyCallbacks.push(e),this._surveyManager&&this._notifySurveyCallbacks({isLoaded:!0}),function(){t._surveyCallbacks=t._surveyCallbacks.filter((function(t){return t!==e}))}},t.getSurveys=function(e,t){var n=this;if(void 0===t&&(t=!1),this._instance.config.disable_surveys)return Xa.info("Disabled. Not loading surveys."),e([]);var r=this._instance.get_property(Qd);if(r&&!t)return e(r,{isLoaded:!0});if(this._isFetchingSurveys)return e([],{isLoaded:!1,error:"Surveys are already being loaded"});try{this._isFetchingSurveys=!0,this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this._instance.config.token),method:"GET",timeout:this._instance.config.surveys_request_timeout_ms,callback:function(t){var r,i;n._isFetchingSurveys=!1;var o=t.statusCode;if(200!==o||!t.json){var s="Surveys API could not be loaded, status: "+o;return Xa.error(s),e([],{isLoaded:!1,error:s})}var a,u=t.json.surveys||[],l=u.filter((function(e){return Ja(e)&&(Ka(e)||eu(e))}));l.length>0&&(null==(a=n._surveyEventReceiver)||a.register(l));return null==(r=n._instance.persistence)||r.register(((i={})[Qd]=u,i)),e(u,{isLoaded:!0})}})}catch(e){throw this._isFetchingSurveys=!1,e}},t._notifySurveyCallbacks=function(e){for(var t,n=ji(this._surveyCallbacks);!(t=n()).done;){var r=t.value;try{if(!e.isLoaded)return r([],e);this.getSurveys(r)}catch(e){Xa.error("Error in survey callback",e)}}},t.getActiveMatchingSurveys=function(e,t){if(void 0===t&&(t=!1),!Bs(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,t);Xa.warn("init was not called")},t._getSurveyById=function(e){var t=null;return this.getSurveys((function(n){var r;t=null!==(r=n.find((function(t){return t.id===e})))&&void 0!==r?r:null})),t},t._checkSurveyEligibility=function(e){if(Bs(this._surveyManager))return{eligible:!1,reason:"SDK is not enabled or survey functionality is not yet loaded"};var t="string"==typeof e?this._getSurveyById(e):e;return t?this._surveyManager.checkSurveyEligibility(t):{eligible:!1,reason:"Survey not found"}},t.canRenderSurvey=function(e){if(Bs(this._surveyManager))return Xa.warn("init was not called"),{visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"};var t=this._checkSurveyEligibility(e);return{visible:t.eligible,disabledReason:t.reason}},t.canRenderSurveyAsync=function(e,t){var n=this;return Bs(this._surveyManager)?(Xa.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"})):new Promise((function(r){n.getSurveys((function(t){var i,o=null!==(i=t.find((function(t){return t.id===e})))&&void 0!==i?i:null;if(o){var s=n._checkSurveyEligibility(o);r({visible:s.eligible,disabledReason:s.reason})}else r({visible:!1,disabledReason:"Survey not found"})}),t)}))},t.renderSurvey=function(e,t){var n,r=this;if(Bs(this._surveyManager))Xa.warn("init was not called");else{var i="string"==typeof e?this._getSurveyById(e):e;if(null!=i&&i.id)if(su.includes(i.type)){var o=null==ys?void 0:ys.querySelector(t);if(o)return null!=(n=i.appearance)&&n.surveyPopupDelaySeconds?(Xa.info("Rendering survey "+i.id+" with delay of "+i.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout((function(){var e,t;Xa.info("Rendering survey "+i.id+" with delay of "+(null==(e=i.appearance)?void 0:e.surveyPopupDelaySeconds)+" seconds"),null==(t=r._surveyManager)||t.renderSurvey(i,o),Xa.info("Survey "+i.id+" rendered")}),1e3*i.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(i,o);Xa.warn("Survey element not found")}else Xa.warn("Surveys of type "+i.type+" cannot be rendered in the app");else Xa.warn("Survey not found")}},t.displaySurvey=function(e,t){var n;if(Bs(this._surveyManager))Xa.warn("init was not called");else{var r=this._getSurveyById(e);if(r){var i=r;if(null!=(n=r.appearance)&&n.surveyPopupDelaySeconds&&t.ignoreDelay&&(i=Ui({},r,{appearance:Ui({},r.appearance,{surveyPopupDelaySeconds:0})})),!1===t.ignoreConditions){var o=this.canRenderSurvey(r);if(!o.visible)return void Xa.warn("Survey is not eligible to be displayed: ",o.disabledReason)}t.displayType!==fs.Inline?this._surveyManager.handlePopoverSurvey(i):this.renderSurvey(i,t.selector)}else Xa.warn("Survey not found")}},t.cancelPendingSurvey=function(e){Bs(this._surveyManager)?Xa.warn("init was not called"):this._surveyManager.cancelSurvey(e)},e}(),F_=Da("[Conversations]");var L_=function(){function e(e){this._isConversationsEnabled=void 0,this._conversationsManager=null,this._isInitializing=!1,this._remoteConfig=null,this._instance=e}var t=e.prototype;return t.onRemoteConfig=function(e){if(!this._instance.config.disable_conversations){var t=e.conversations;Bs(t)||(Gs(t)?this._isConversationsEnabled=t:(this._isConversationsEnabled=t.enabled,this._remoteConfig=t),this.loadIfEnabled())}},t.reset=function(){var e;null==(e=this._conversationsManager)||e.reset(),this._conversationsManager=null,this._isConversationsEnabled=void 0,this._remoteConfig=null},t.loadIfEnabled=function(){var e=this;if(!this._conversationsManager&&!this._isInitializing&&!(this._instance.config.disable_conversations||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var t=null==ks?void 0:ks.__PosthogExtensions__;if(t&&!js(this._isConversationsEnabled)&&this._isConversationsEnabled)if(this._remoteConfig&&this._remoteConfig.token){if(function(e){var t;if(!e||0===e.length)return!0;var n=null==ps||null==(t=ps.location)?void 0:t.hostname;return!n||e.some((function(e){var t=function(e){var t=e.replace(/^https?:\/\//,"");return(t=t.split("/")[0].split("?")[0].split(":")[0])||null}(e);if(!t)return!1;if(t.startsWith("*.")){var r=t.slice(2);return n.endsWith("."+r)||n===r}return n===t}))}(this._remoteConfig.domains)){this._isInitializing=!0;try{var n=t.initConversations;if(n)return this._completeInitialization(n),void(this._isInitializing=!1);var r=t.loadExternalDependency;if(!r)return void this._handleLoadError("PostHog loadExternalDependency extension not found.");r(this._instance,"conversations",(function(n){n||!t.initConversations?e._handleLoadError("Could not load conversations script",n):e._completeInitialization(t.initConversations),e._isInitializing=!1}))}catch(e){this._handleLoadError("Error initializing conversations",e),this._isInitializing=!1}}}else F_.error("Conversations enabled but missing token in remote config.")}},t._completeInitialization=function(e){if(this._remoteConfig)try{this._conversationsManager=e(this._remoteConfig,this._instance),F_.info("Conversations loaded successfully")}catch(e){this._handleLoadError("Error completing conversations initialization",e)}else F_.error("Cannot complete initialization: remote config is null")},t._handleLoadError=function(e,t){F_.error(e,t),this._conversationsManager=null,this._isInitializing=!1},t.enable=function(){this._conversationsManager?this._conversationsManager.enable():F_.warn("Conversations not loaded yet.")},t.disable=function(){this._conversationsManager&&this._conversationsManager.disable()},t.isLoaded=function(){return!zs(this._conversationsManager)},t.isEnabled=function(){return!0===this._isConversationsEnabled},e}(),R_=Da("[RateLimiter]"),O_=function(){function e(e){var t,n,r=this;this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=function(e){var t=e.text;if(t&&t.length)try{(JSON.parse(t).quota_limited||[]).forEach((function(e){R_.info((e||"events")+" is quota limited."),r.serverLimits[e]=(new Date).getTime()+6e4}))}catch(e){return void R_.warn('could not rate limit - continuing. Error: "'+(null==e?void 0:e.message)+'"',{text:t})}},this.instance=e,this.captureEventsPerSecond=(null==(t=e.config.rate_limiting)?void 0:t.events_per_second)||10,this.captureEventsBurstLimit=Math.max((null==(n=e.config.rate_limiting)?void 0:n.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond),this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}var t=e.prototype;return t.clientRateLimitContext=function(e){var t,n,r;void 0===e&&(e=!1);var i=(new Date).getTime(),o=null!==(t=null==(n=this.instance.persistence)?void 0:n.get_property(tf))&&void 0!==t?t:{tokens:this.captureEventsBurstLimit,last:i};o.tokens+=(i-o.last)/1e3*this.captureEventsPerSecond,o.last=i,o.tokens>this.captureEventsBurstLimit&&(o.tokens=this.captureEventsBurstLimit);var s=o.tokens<1;return s||e||(o.tokens=Math.max(0,o.tokens-1)),!s||this.lastEventRateLimited||e||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+this.captureEventsPerSecond+" events per second and "+this.captureEventsBurstLimit+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=s,null==(r=this.instance.persistence)||r.set_property(tf,o),{isRateLimited:s,remainingTokens:o.tokens}},t.isServerRateLimited=function(e){var t=this.serverLimits[e||"events"]||!1;return!1!==t&&(new Date).getTime()<t},e}(),M_=Da("[RemoteConfig]"),A_=function(){function e(e){this._instance=e}var t=e.prototype;return t._loadRemoteConfigJs=function(e){var t,n,r=this;null!=(t=ks.__PosthogExtensions__)&&t.loadExternalDependency?null==(n=ks.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this._instance,"remote-config",(function(){return e(r.remoteConfig)})):(M_.error("PostHog Extensions not found. Cannot load remote config."),e())},t._loadRemoteConfigJSON=function(e){this._instance._send_request({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback:function(t){e(t.json)}})},t.load=function(){var e=this;try{if(this.remoteConfig)return M_.info("Using preloaded remote config",this.remoteConfig),void this._onRemoteConfig(this.remoteConfig);if(this._instance._shouldDisableFlags())return void M_.warn("Remote config is disabled. Falling back to local config.");this._loadRemoteConfigJs((function(t){if(!t)return M_.info("No config found after loading remote JS config. Falling back to JSON."),void e._loadRemoteConfigJSON((function(t){e._onRemoteConfig(t)}));e._onRemoteConfig(t)}))}catch(e){M_.error("Error loading remote config",e)}},t._onRemoteConfig=function(e){e?this._instance.config.__preview_remote_config?(this._instance._onRemoteConfig(e),!1!==e.hasFeatureFlags&&this._instance.featureFlags.ensureFlagsLoaded()):M_.info("__preview_remote_config is disabled. Logging config instead",e):M_.error("Failed to fetch remote config from PostHog.")},Hi(e,[{key:"remoteConfig",get:function(){var e;return null==(e=ks._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.config}}])}(),D_=3e3,q_=function(){function e(e,t){this._isPaused=!0,this._queue=[],this._flushTimeoutMs=na((null==t?void 0:t.flush_interval_ms)||D_,250,5e3,Aa.createLogger("flush interval"),D_),this._sendRequest=e}var t=e.prototype;return t.enqueue=function(e){this._queue.push(e),this._flushTimeout||this._setFlushTimeout()},t.unload=function(){var e=this;this._clearFlushTimeout();var t=this._queue.length>0?this._formatQueue():{},n=Object.values(t),r=[].concat(n.filter((function(e){return 0===e.url.indexOf("/e")})),n.filter((function(e){return 0!==e.url.indexOf("/e")})));r.map((function(t){e._sendRequest(Ui({},t,{transport:"sendBeacon"}))}))},t.enable=function(){this._isPaused=!1,this._setFlushTimeout()},t._setFlushTimeout=function(){var e=this;this._isPaused||(this._flushTimeout=setTimeout((function(){if(e._clearFlushTimeout(),e._queue.length>0){var t=e._formatQueue(),n=function(){var n=t[r],i=(new Date).getTime();n.data&&qs(n.data)&&Na(n.data,(function(e){e.offset=Math.abs(e.timestamp-i),delete e.timestamp})),e._sendRequest(n)};for(var r in t)n()}}),this._flushTimeoutMs))},t._clearFlushTimeout=function(){clearTimeout(this._flushTimeout),this._flushTimeout=void 0},t._formatQueue=function(){var e={};return Na(this._queue,(function(t){var n,r=t,i=(r?r.batchKey:null)||r.url;js(e[i])&&(e[i]=Ui({},r,{data:[]})),null==(n=e[i].data)||n.push(r.data)})),this._queue=[],e},e}(),$_=["retriesPerformedSoFar"];var N_=function(){function e(e){var t=this;this._isPolling=!1,this._pollIntervalMs=3e3,this._queue=[],this._instance=e,this._queue=[],this._areWeOnline=!0,!js(ps)&&"onLine"in ps.navigator&&(this._areWeOnline=ps.navigator.onLine,this._onlineListener=function(){t._areWeOnline=!0,t._flush()},this._offlineListener=function(){t._areWeOnline=!1},Qa(ps,"online",this._onlineListener),Qa(ps,"offline",this._offlineListener))}var t=e.prototype;return t.retriableRequest=function(e){var t=this,n=e.retriesPerformedSoFar,r=Vi(e,$_);Ws(n)&&n>0&&(r.url=ic(r.url,{retry_count:n})),this._instance._send_request(Ui({},r,{callback:function(e){200!==e.statusCode&&(e.statusCode<400||e.statusCode>=500)&&(null!=n?n:0)<10?t._enqueue(Ui({retriesPerformedSoFar:n},r)):null==r.callback||r.callback(e)}}))},t._enqueue=function(e){var t=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=t+1;var n=function(e){var t=3e3*Math.pow(2,e),n=t/2,r=Math.min(18e5,t),i=(Math.random()-.5)*(r-n);return Math.ceil(r+i)}(t),r=Date.now()+n;this._queue.push({retryAt:r,requestOptions:e});var i="Enqueued failed request for retry in "+n;navigator.onLine||(i+=" (Browser is offline)"),Aa.warn(i),this._isPolling||(this._isPolling=!0,this._poll())},t._poll=function(){var e=this;if(this._poller&&clearTimeout(this._poller),0===this._queue.length)return this._isPolling=!1,void(this._poller=void 0);this._poller=setTimeout((function(){e._areWeOnline&&e._queue.length>0&&e._flush(),e._poll()}),this._pollIntervalMs)},t._flush=function(){var e=Date.now(),t=[],n=this._queue.filter((function(n){return n.retryAt<e||(t.push(n),!1)}));if(this._queue=t,n.length>0)for(var r,i=ji(n);!(r=i()).done;){var o=r.value.requestOptions;this.retriableRequest(o)}},t.unload=function(){this._poller&&(clearTimeout(this._poller),this._poller=void 0),this._isPolling=!1,js(ps)||(this._onlineListener&&(ps.removeEventListener("online",this._onlineListener),this._onlineListener=void 0),this._offlineListener&&(ps.removeEventListener("offline",this._offlineListener),this._offlineListener=void 0));for(var e,t=ji(this._queue);!(e=t()).done;){var n=e.value.requestOptions;try{this._instance._send_request(Ui({},n,{transport:"sendBeacon"}))}catch(e){Aa.error(e)}}this._queue=[]},Hi(e,[{key:"length",get:function(){return this._queue.length}}])}(),H_=function(){function e(e){var t=this;this._updateScrollData=function(){var e,n,r,i;t._context||(t._context={});var o=t.scrollElement(),s=t.scrollY(),a=o?Math.max(0,o.scrollHeight-o.clientHeight):0,u=s+((null==o?void 0:o.clientHeight)||0),l=(null==o?void 0:o.scrollHeight)||0;t._context.lastScrollY=Math.ceil(s),t._context.maxScrollY=Math.max(s,null!==(e=t._context.maxScrollY)&&void 0!==e?e:0),t._context.maxScrollHeight=Math.max(a,null!==(n=t._context.maxScrollHeight)&&void 0!==n?n:0),t._context.lastContentY=u,t._context.maxContentY=Math.max(u,null!==(r=t._context.maxContentY)&&void 0!==r?r:0),t._context.maxContentHeight=Math.max(l,null!==(i=t._context.maxContentHeight)&&void 0!==i?i:0)},this._instance=e}var t=e.prototype;return t.getContext=function(){return this._context},t.resetContext=function(){var e=this._context;return setTimeout(this._updateScrollData,0),e},t.startMeasuringScrollPosition=function(){Qa(ps,"scroll",this._updateScrollData,{capture:!0}),Qa(ps,"scrollend",this._updateScrollData,{capture:!0}),Qa(ps,"resize",this._updateScrollData)},t.scrollElement=function(){if(!this._instance.config.scroll_root_selector)return null==ps?void 0:ps.document.documentElement;for(var e,t=ji(qs(this._instance.config.scroll_root_selector)?this._instance.config.scroll_root_selector:[this._instance.config.scroll_root_selector]);!(e=t()).done;){var n=e.value,r=null==ps?void 0:ps.document.querySelector(n);if(r)return r}},t.scrollY=function(){if(this._instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollTop||0}return ps&&(ps.scrollY||ps.pageYOffset||ps.document.documentElement.scrollTop)||0},t.scrollX=function(){if(this._instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollLeft||0}return ps&&(ps.scrollX||ps.pageXOffset||ps.document.documentElement.scrollLeft)||0},e}(),j_=function(e){return Qp(null==e?void 0:e.config.mask_personal_data_properties,null==e?void 0:e.config.custom_personal_data_properties)},U_=function(){function e(e,t,n,r){var i=this;this._onSessionIdCallback=function(e){var t,n=i._getStored();if(!n||n.sessionId!==e){var r={sessionId:e,props:i._sessionSourceParamGenerator(i._instance)};i._persistence.register(((t={})[ef]=r,t))}},this._instance=e,this._sessionIdManager=t,this._persistence=n,this._sessionSourceParamGenerator=r||j_,this._sessionIdManager.onSessionId(this._onSessionIdCallback)}var t=e.prototype;return t._getStored=function(){return this._persistence.props[ef]},t.getSetOnceProps=function(){var e,t=null==(e=this._getStored())?void 0:e.props;return t?"r"in t?Xp(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}:{}},t.getSessionProps=function(){var e={};return Na(Ba(this.getSetOnceProps()),(function(t,n){"$current_url"===n&&(n="url"),e["$session_entry_"+Rs(n)]=t})),e},e}(),V_=Da("[SessionId]"),z_=function(){function e(e,t,n){var r,i=this;if(this._sessionIdChangedHandlers=[],this._beforeUnloadListener=void 0,this._eventEmitter=new k_,this._sessionHasBeenIdleTooLong=function(e,t){return Math.abs(e-t)>i.sessionTimeoutMs},!e.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if("always"===e.config.cookieless_mode)throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this._config=e.config,this._persistence=e.persistence,this._windowId=void 0,this._sessionId=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this._sessionIdGenerator=t||hu,this._windowIdGenerator=n||hu;var o=this._config.persistence_name||this._config.token,s=this._config.session_idle_timeout_seconds||1800;if(this._sessionTimeoutMs=1e3*na(s,60,36e3,V_.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this._resetIdleTimer(),this._window_id_storage_key="ph_"+o+"_window_id",this._primary_window_exists_storage_key="ph_"+o+"_primary_window_exists",this._canUseSessionStorage()){var a=mp._parse(this._window_id_storage_key),u=mp._parse(this._primary_window_exists_storage_key);a&&!u?this._windowId=a:mp._remove(this._window_id_storage_key),mp._set(this._primary_window_exists_storage_key,!0)}if(null!=(r=this._config.bootstrap)&&r.sessionID)try{var l=function(e){var t=e.replace(/-/g,"");if(32!==t.length)throw new Error("Not a valid UUID");if("7"!==t[12])throw new Error("Not a UUIDv7");return parseInt(t.substring(0,12),16)}(this._config.bootstrap.sessionID);this._setSessionId(this._config.bootstrap.sessionID,(new Date).getTime(),l)}catch(e){V_.error("Invalid sessionID in bootstrap",e)}this._listenToReloadWindow()}var t=e.prototype;return t.on=function(e,t){return this._eventEmitter.on(e,t)},t.onSessionId=function(e){var t=this;return js(this._sessionIdChangedHandlers)&&(this._sessionIdChangedHandlers=[]),this._sessionIdChangedHandlers.push(e),this._sessionId&&e(this._sessionId,this._windowId),function(){t._sessionIdChangedHandlers=t._sessionIdChangedHandlers.filter((function(t){return t!==e}))}},t._canUseSessionStorage=function(){return"memory"!==this._config.persistence&&!this._persistence._disabled&&mp._is_supported()},t._setWindowId=function(e){e!==this._windowId&&(this._windowId=e,this._canUseSessionStorage()&&mp._set(this._window_id_storage_key,e))},t._getWindowId=function(){return this._windowId?this._windowId:this._canUseSessionStorage()?mp._parse(this._window_id_storage_key):null},t._setSessionId=function(e,t,n){var r;e===this._sessionId&&t===this._sessionActivityTimestamp&&n===this._sessionStartTimestamp||(this._sessionStartTimestamp=n,this._sessionActivityTimestamp=t,this._sessionId=e,this._persistence.register(((r={})[Vd]=[t,e,n],r)))},t._getSessionId=function(){var e=this._persistence.props[Vd];return qs(e)&&2===e.length&&e.push(e[0]),e||[0,null,0]},t.resetSessionId=function(){this._setSessionId(null,null,null)},t.destroy=function(){clearTimeout(this._enforceIdleTimeout),this._enforceIdleTimeout=void 0,this._beforeUnloadListener&&ps&&(ps.removeEventListener("beforeunload",this._beforeUnloadListener,{capture:!1}),this._beforeUnloadListener=void 0),this._sessionIdChangedHandlers=[]},t._listenToReloadWindow=function(){var e=this;this._beforeUnloadListener=function(){e._canUseSessionStorage()&&mp._remove(e._primary_window_exists_storage_key)},Qa(ps,"beforeunload",this._beforeUnloadListener,{capture:!1})},t.checkAndGetSessionAndWindowId=function(e,t){if(void 0===e&&(e=!1),void 0===t&&(t=null),"always"===this._config.cookieless_mode)throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var n=t||(new Date).getTime(),r=this._getSessionId(),i=r[0],o=r[1],s=r[2],a=this._getWindowId(),u=Ws(s)&&s>0&&Math.abs(n-s)>864e5,l=!1,c=!o,d=!c&&!e&&this._sessionHasBeenIdleTooLong(n,i);c||d||u?(o=this._sessionIdGenerator(),a=this._windowIdGenerator(),V_.info("new session ID generated",{sessionId:o,windowId:a,changeReason:{noSessionId:c,activityTimeout:d,sessionPastMaximumLength:u}}),s=n,l=!0):a||(a=this._windowIdGenerator(),l=!0);var f=0===i||!e||u?n:i,p=0===s?(new Date).getTime():s;return this._setWindowId(a),this._setSessionId(o,f,p),e||this._resetIdleTimer(),l&&this._sessionIdChangedHandlers.forEach((function(e){return e(o,a,l?{noSessionId:c,activityTimeout:d,sessionPastMaximumLength:u}:void 0)})),{sessionId:o,windowId:a,sessionStartTimestamp:p,changeReason:l?{noSessionId:c,activityTimeout:d,sessionPastMaximumLength:u}:void 0,lastActivityTimestamp:i}},t._resetIdleTimer=function(){var e=this;clearTimeout(this._enforceIdleTimeout),this._enforceIdleTimeout=setTimeout((function(){var t=e._getSessionId()[0];if(e._sessionHasBeenIdleTooLong((new Date).getTime(),t)){var n=e._sessionId;e.resetSessionId(),e._eventEmitter.emit("forcedIdleReset",{idleSessionId:n})}}),1.1*this.sessionTimeoutMs)},Hi(e,[{key:"sessionTimeoutMs",get:function(){return this._sessionTimeoutMs}}])}(),B_=["$set_once","$set"],W_=Da("[SiteApps]"),G_=function(){function e(e){this._instance=e,this._bufferedInvocations=[],this.apps={}}var t=e.prototype;return t._eventCollector=function(e,t){if(t){var n=this.globalsForEvent(t);this._bufferedInvocations.push(n),this._bufferedInvocations.length>1e3&&(this._bufferedInvocations=this._bufferedInvocations.slice(10))}},t.init=function(){var e=this;if(this.isEnabled){var t=this._instance._addCaptureHook(this._eventCollector.bind(this));this._stopBuffering=function(){t(),e._bufferedInvocations=[],e._stopBuffering=void 0}}},t.globalsForEvent=function(e){var t,n,r,i,o,s,a;if(!e)throw new Error("Event payload is required");for(var u={},l=this._instance.get_property("$groups")||[],c=this._instance.get_property("$stored_group_properties")||{},d=0,f=Object.entries(c);d<f.length;d++){var p=f[d],_=p[0],h=p[1];u[_]={id:l[_],type:_,properties:h}}var v=e.$set_once,g=e.$set;return{event:Ui({},Vi(e,B_),{properties:Ui({},e.properties,g?{$set:Ui({},null!==(t=null==(n=e.properties)?void 0:n.$set)&&void 0!==t?t:{},g)}:{},v?{$set_once:Ui({},null!==(r=null==(i=e.properties)?void 0:i.$set_once)&&void 0!==r?r:{},v)}:{}),elements_chain:null!==(o=null==(s=e.properties)?void 0:s.$elements_chain)&&void 0!==o?o:"",distinct_id:null==(a=e.properties)?void 0:a.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:u}},t.setupSiteApp=function(e){var t=this,n=this.apps[e.id],r=function(){!n.errored&&t._bufferedInvocations.length&&(W_.info("Processing "+t._bufferedInvocations.length+" events for site app with id "+e.id),t._bufferedInvocations.forEach((function(e){return null==n.processEvent?void 0:n.processEvent(e)})),n.processedBuffer=!0),Object.values(t.apps).every((function(e){return e.processedBuffer||e.errored}))&&(null==t._stopBuffering||t._stopBuffering())},i=!1,o=function(t){n.errored=!t,n.loaded=!0,W_.info("Site app with id "+e.id+" "+(t?"loaded":"errored")),i&&r()};try{var s=e.init({posthog:this._instance,callback:function(e){o(e)}}).processEvent;s&&(n.processEvent=s),i=!0}catch(t){W_.error("Error while initializing PostHog app with config id "+e.id,t),o(!1)}if(i&&n.loaded)try{r()}catch(t){W_.error("Error while processing buffered events PostHog app with config id "+e.id,t),n.errored=!0}},t._setupSiteApps=function(){for(var e,t=this.siteAppLoaders||[],n=ji(t);!(e=n()).done;){var r=e.value;this.apps[r.id]={id:r.id,loaded:!1,errored:!1,processedBuffer:!1}}for(var i,o=ji(t);!(i=o()).done;){var s=i.value;this.setupSiteApp(s)}},t._onCapturedEvent=function(e){if(0!==Object.keys(this.apps).length)for(var t=this.globalsForEvent(e),n=0,r=Object.values(this.apps);n<r.length;n++){var i=r[n];try{null==i.processEvent||i.processEvent(t)}catch(t){W_.error("Error while processing event "+e.event+" for site app "+i.id,t)}}},t.onRemoteConfig=function(e){var t,n,r,i=this;if(null!=(t=this.siteAppLoaders)&&t.length)return this.isEnabled?(this._setupSiteApps(),void this._instance.on("eventCaptured",(function(e){return i._onCapturedEvent(e)}))):void W_.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if(null==(n=this._stopBuffering)||n.call(this),null!=(r=e.siteApps)&&r.length)if(this.isEnabled)for(var o,s=function(){var e,t=o.value,n=t.id,r=t.url;ks["__$$ph_site_app_"+n]=i._instance,null==(e=ks.__PosthogExtensions__)||null==e.loadSiteApp||e.loadSiteApp(i._instance,r,(function(e){if(e)return W_.error("Error while initializing PostHog app with config id "+n,e)}))},a=ji(e.siteApps);!(o=a()).done;)s();else W_.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')},Hi(e,[{key:"isEnabled",get:function(){return!!this._instance.config.opt_in_site_apps}},{key:"siteAppLoaders",get:function(){var e;return null==(e=ks._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.siteApps}}])}(),Z_=function(e,t){if(!e)return!1;var n=e.userAgent;if(n&&Ts(n,t))return!0;try{var r=null==e?void 0:e.userAgentData;if(null!=r&&r.brands&&r.brands.some((function(e){return Ts(null==e?void 0:e.brand,t)})))return!0}catch(e){}return!!e.webdriver},Y_=function(e){return e.US="us",e.EU="eu",e.CUSTOM="custom",e}({}),Q_="i.posthog.com",X_=function(){function e(e){this._regionCache={},this.instance=e}return e.prototype.endpointFor=function(e,t){if(void 0===t&&(t=""),t&&(t="/"===t[0]?t:"/"+t),"ui"===e)return this.uiHost+t;if("flags"===e)return this.flagsApiHost+t;if(this.region===Y_.CUSTOM)return this.apiHost+t;var n=Q_+t;switch(e){case"assets":return"https://"+this.region+"-assets."+n;case"api":return"https://"+this.region+"."+n}},Hi(e,[{key:"apiHost",get:function(){var e=this.instance.config.api_host.trim().replace(/\/$/,"");return"https://app.posthog.com"===e?"https://us.i.posthog.com":e}},{key:"flagsApiHost",get:function(){var e=this.instance.config.flags_api_host;return e?e.trim().replace(/\/$/,""):this.apiHost}},{key:"uiHost",get:function(){var e,t=null==(e=this.instance.config.ui_host)?void 0:e.replace(/\/$/,"");return t||(t=this.apiHost.replace("."+Q_,".posthog.com")),"https://app.posthog.com"===t?"https://us.posthog.com":t}},{key:"region",get:function(){return this._regionCache[this.apiHost]||(/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this._regionCache[this.apiHost]=Y_.US:/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this._regionCache[this.apiHost]=Y_.EU:this._regionCache[this.apiHost]=Y_.CUSTOM),this._regionCache[this.apiHost]}}])}(),J_={icontains:function(e,t){return!!ps&&t.href.toLowerCase().indexOf(e.toLowerCase())>-1},not_icontains:function(e,t){return!!ps&&-1===t.href.toLowerCase().indexOf(e.toLowerCase())},regex:function(e,t){return!!ps&&uc(t.href,e)},not_regex:function(e,t){return!!ps&&!uc(t.href,e)},exact:function(e,t){return t.href===e},is_not:function(e,t){return t.href!==e}},K_=function(){function e(t){var n=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(t){void 0===t&&(t=!1),n.getWebExperiments((function(t){e._logInfo("retrieved web experiments from the server"),n._flagToExperiments=new Map,t.forEach((function(t){if(t.feature_flag_key){var r;if(n._flagToExperiments)e._logInfo("setting flag key ",t.feature_flag_key," to web experiment ",t),null==(r=n._flagToExperiments)||r.set(t.feature_flag_key,t);var i=n._instance.getFeatureFlag(t.feature_flag_key);Us(i)&&t.variants[i]&&n._applyTransforms(t.name,i,t.variants[i].transforms)}else if(t.variants)for(var o in t.variants){var s=t.variants[o];e._matchesTestVariant(s)&&n._applyTransforms(t.name,o,s.transforms)}}))}),t)},this._instance=t,this._instance.onFeatureFlags((function(e){n.onFeatureFlags(e)}))}var t=e.prototype;return t.onFeatureFlags=function(t){var n=this;if(this._is_bot())e._logInfo("Refusing to render web experiment since the viewer is a likely bot");else if(!this._instance.config.disable_web_experiments){if(Bs(this._flagToExperiments))return this._flagToExperiments=new Map,this.loadIfEnabled(),void this.previewWebExperiment();e._logInfo("applying feature flags",t),t.forEach((function(e){var t;if(n._flagToExperiments&&null!=(t=n._flagToExperiments)&&t.has(e)){var r,i=n._instance.getFeatureFlag(e),o=null==(r=n._flagToExperiments)?void 0:r.get(e);i&&null!=o&&o.variants[i]&&n._applyTransforms(o.name,i,o.variants[i].transforms)}}))}},t.previewWebExperiment=function(){var t=this,n=e.getWindowLocation();if(null!=n&&n.search){var r=ml(null==n?void 0:n.search,"__experiment_id"),i=ml(null==n?void 0:n.search,"__experiment_variant");r&&i&&(e._logInfo("previewing web experiments "+r+" && "+i),this.getWebExperiments((function(e){t._showPreviewWebExperiment(parseInt(r),i,e)}),!1,!0))}},t.loadIfEnabled=function(){this._instance.config.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()},t.getWebExperiments=function(e,t,n){if(this._instance.config.disable_web_experiments&&!n)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._instance.config.token),method:"GET",callback:function(t){if(200!==t.statusCode||!t.json)return e([]);var n=t.json.experiments||[];return e(n)}})},t._showPreviewWebExperiment=function(t,n,r){var i=r.filter((function(e){return e.id===t}));i&&i.length>0&&(e._logInfo("Previewing web experiment ["+i[0].name+"] with variant ["+n+"]"),this._applyTransforms(i[0].name,n,i[0].variants[n].transforms))},e._matchesTestVariant=function(t){return!Bs(t.conditions)&&(e._matchUrlConditions(t)&&e._matchUTMConditions(t))},e._matchUrlConditions=function(t){var n;if(Bs(t.conditions)||Bs(null==(n=t.conditions)?void 0:n.url))return!0;var r,i,o,s=e.getWindowLocation();return!!s&&(null==(r=t.conditions)||!r.url||J_[null!==(i=null==(o=t.conditions)?void 0:o.urlMatchType)&&void 0!==i?i:"icontains"](t.conditions.url,s))},e.getWindowLocation=function(){return null==ps?void 0:ps.location},e._matchUTMConditions=function(e){var t;if(Bs(e.conditions)||Bs(null==(t=e.conditions)?void 0:t.utm))return!0;var n=Bp();if(n.utm_source){var r,i,o,s,a,u,l,c,d=null==(r=e.conditions)||null==(r=r.utm)||!r.utm_campaign||(null==(i=e.conditions)||null==(i=i.utm)?void 0:i.utm_campaign)==n.utm_campaign,f=null==(o=e.conditions)||null==(o=o.utm)||!o.utm_source||(null==(s=e.conditions)||null==(s=s.utm)?void 0:s.utm_source)==n.utm_source,p=null==(a=e.conditions)||null==(a=a.utm)||!a.utm_medium||(null==(u=e.conditions)||null==(u=u.utm)?void 0:u.utm_medium)==n.utm_medium,_=null==(l=e.conditions)||null==(l=l.utm)||!l.utm_term||(null==(c=e.conditions)||null==(c=c.utm)?void 0:c.utm_term)==n.utm_term;return d&&p&&_&&f}return!1},e._logInfo=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];Aa.info("[WebExperiments] "+e,n)},t._applyTransforms=function(t,n,r){this._is_bot()?e._logInfo("Refusing to render web experiment since the viewer is a likely bot"):"control"!==n?r.forEach((function(r){if(r.selector){var i;e._logInfo("applying transform of variant "+n+" for experiment "+t+" ",r);var o=null==(i=document)?void 0:i.querySelectorAll(r.selector);null==o||o.forEach((function(e){var t=e;r.html&&(t.innerHTML=r.html),r.css&&t.setAttribute("style",r.css)}))}})):e._logInfo("Control variants leave the page unmodified.")},t._is_bot=function(){return ms&&this._instance?Z_(ms,this._instance.config.custom_blocked_useragents):void 0},e}(),eh=Da("[PostHog ExternalIntegrations]"),th={intercom:"intercom-integration",crispChat:"crisp-chat-integration"},nh=function(){function e(e){this._instance=e}var t=e.prototype;return t._loadScript=function(e,t){var n;null==(n=ks.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this._instance,e,(function(e){if(e)return eh.error("failed to load script",e);t()}))},t.startIfEnabledOrStop=function(){for(var e=this,t=function(){var t,i,o,s=r[n],a=s[0],u=s[1];(!u||null!=(t=ks.__PosthogExtensions__)&&null!=(t=t.integrations)&&t[a]||e._loadScript(th[a],(function(){var t;null==(t=ks.__PosthogExtensions__)||null==(t=t.integrations)||null==(t=t[a])||t.start(e._instance)})),!u&&null!=(i=ks.__PosthogExtensions__)&&null!=(i=i.integrations)&&i[a])&&(null==(o=ks.__PosthogExtensions__)||null==(o=o.integrations)||null==(o=o[a])||o.stop())},n=0,r=Object.entries(null!==(i=this._instance.config.integrations)&&void 0!==i?i:{});n<r.length;n++){var i;t()}},e}(),rh="[SessionRecording]",ih=Da(rh),oh=function(){function e(e){if(this._forceAllowLocalhostNetworkCapture=!1,this._receivedFlags=!1,this._persistFlagsOnSessionListener=void 0,this._instance=e,!this._instance.sessionManager)throw ih.error("started without valid sessionManager"),new Error(rh+" started without valid sessionManager. This is a bug.");if("always"===this._instance.config.cookieless_mode)throw new Error(rh+' cannot be used with cookieless_mode="always"')}var t=e.prototype;return t.startIfEnabledOrStop=function(e){var t;if(!this._isRecordingEnabled||null==(t=this._lazyLoadedSessionRecording)||!t.isStarted){var n=!js(Object.assign)&&!js(Array.from);this._isRecordingEnabled&&n?(this._lazyLoadAndStart(e),ih.info("starting")):this.stopRecording()}},t._lazyLoadAndStart=function(e){var t,n,r,i=this;this._isRecordingEnabled&&(null!=ks&&null!=(t=ks.__PosthogExtensions__)&&null!=(t=t.rrweb)&&t.record&&null!=(n=ks.__PosthogExtensions__)&&n.initSessionRecording?this._onScriptLoaded(e):null==(r=ks.__PosthogExtensions__)||null==r.loadExternalDependency||r.loadExternalDependency(this._instance,this._scriptName,(function(t){if(t)return ih.error("could not load recorder",t);i._onScriptLoaded(e)})))},t.stopRecording=function(){var e,t;null==(e=this._persistFlagsOnSessionListener)||e.call(this),this._persistFlagsOnSessionListener=void 0,null==(t=this._lazyLoadedSessionRecording)||t.stop()},t._resetSampling=function(){var e;null==(e=this._instance.persistence)||e.unregister(zd)},t._persistRemoteConfig=function(e){var t=this;if(this._instance.persistence){var n,r,i=this._instance.persistence,o=function(){var n,r=!1===e.sessionRecording?void 0:e.sessionRecording,o=null==r?void 0:r.sampleRate,s=Bs(o)?null:parseFloat(o);Bs(s)&&t._resetSampling();var a=null==r?void 0:r.minimumDurationMilliseconds;i.register(((n={})[Ud]=Ui({enabled:!!r},r,{networkPayloadCapture:Ui({capturePerformance:e.capturePerformance},null==r?void 0:r.networkPayloadCapture),canvasRecording:{enabled:null==r?void 0:r.recordCanvas,fps:null==r?void 0:r.canvasFps,quality:null==r?void 0:r.canvasQuality},sampleRate:s,minimumDurationMilliseconds:js(a)?null:a,endpoint:null==r?void 0:r.endpoint,triggerMatchType:null==r?void 0:r.triggerMatchType,masking:null==r?void 0:r.masking,urlTriggers:null==r?void 0:r.urlTriggers}),n))};o(),null==(n=this._persistFlagsOnSessionListener)||n.call(this),this._persistFlagsOnSessionListener=null==(r=this._instance.sessionManager)?void 0:r.onSessionId(o)}},t.onRemoteConfig=function(e){"sessionRecording"in e?!1!==e.sessionRecording?(this._persistRemoteConfig(e),this._receivedFlags=!0,this.startIfEnabledOrStop()):this._receivedFlags=!0:ih.info("skipping remote config with no sessionRecording",e)},t.log=function(e,t){var n;void 0===t&&(t="log"),null!=(n=this._lazyLoadedSessionRecording)&&n.log?this._lazyLoadedSessionRecording.log(e,t):ih.warn("log called before recorder was ready")},t._onScriptLoaded=function(e){var t,n;if(null==(t=ks.__PosthogExtensions__)||!t.initSessionRecording)throw Error("Called on script loaded before session recording is available");this._lazyLoadedSessionRecording||(this._lazyLoadedSessionRecording=null==(n=ks.__PosthogExtensions__)?void 0:n.initSessionRecording(this._instance),this._lazyLoadedSessionRecording._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture);this._lazyLoadedSessionRecording.start(e)},t.onRRwebEmit=function(e){var t;null==(t=this._lazyLoadedSessionRecording)||null==t.onRRwebEmit||t.onRRwebEmit(e)},t.overrideLinkedFlag=function(){var e,t,n;this._lazyLoadedSessionRecording||(null==(t=this._instance.persistence)||t.register(((n={}).$replay_override_linked_flag=!0,n)));null==(e=this._lazyLoadedSessionRecording)||e.overrideLinkedFlag()},t.overrideSampling=function(){var e,t,n;this._lazyLoadedSessionRecording||(null==(t=this._instance.persistence)||t.register(((n={}).$replay_override_sampling=!0,n)));null==(e=this._lazyLoadedSessionRecording)||e.overrideSampling()},t.overrideTrigger=function(e){var t,n,r;this._lazyLoadedSessionRecording||(null==(n=this._instance.persistence)||n.register(((r={})["url"===e?"$replay_override_url_trigger":"$replay_override_event_trigger"]=!0,r)));null==(t=this._lazyLoadedSessionRecording)||t.overrideTrigger(e)},t.tryAddCustomEvent=function(e,t){var n;return!(null==(n=this._lazyLoadedSessionRecording)||!n.tryAddCustomEvent(e,t))},Hi(e,[{key:"started",get:function(){var e;return!(null==(e=this._lazyLoadedSessionRecording)||!e.isStarted)}},{key:"status",get:function(){return this._lazyLoadedSessionRecording?this._lazyLoadedSessionRecording.status:this._receivedFlags&&!this._isRecordingEnabled?"disabled":"lazy_loading"}},{key:"_isRecordingEnabled",get:function(){var e,t=!(null==(e=this._instance.get_property(Ud))||!e.enabled),n=!this._instance.config.disable_session_recording,r=this._instance.config.disable_session_recording||this._instance.consent.isOptedOut();return ps&&t&&n&&!r}},{key:"_scriptName",get:function(){var e,t,n=null==(e=this._instance)||null==(e=e.persistence)?void 0:e.get_property(Ud);return(null==n||null==(t=n.scriptConfig)?void 0:t.script)||"lazy-recorder"}},{key:"sdkDebugProperties",get:function(){var e;return(null==(e=this._lazyLoadedSessionRecording)?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}}])}(),sh={},ah=function(){},uh="posthog",lh=!nc&&-1===(null==Es?void 0:Es.indexOf("MSIE"))&&-1===(null==Es?void 0:Es.indexOf("Mozilla")),ch=function(e){var t;return Ui({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,token:"",autocapture:!0,cross_subdomain_cookie:Za(null==ys?void 0:ys.location),persistence:"localStorage+cookie",persistence_name:"",loaded:ah,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:null!=e?e:"unset",__preview_deferred_init_extensions:!1,debug:bs&&Us(null==bs?void 0:bs.search)&&-1!==bs.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:!0,disable_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:"https:"===(null==ps||null==(t=ps.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_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error:function(e){var t="Bad HTTP status: "+e.statusCode+" "+e.text;Aa.error(t)},get_device_id:function(e){return e},capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:"identified_only",before_send:void 0,request_queue_config:{flush_interval_ms:D_},error_tracking:{},_onCapture:ah,__preview_eager_load_replay:!1},function(e){return{rageclick:!(e&&e>="2025-11-30")||{content_ignorelist:!0},capture_pageview:!(e&&e>="2025-05-24")||"history_change",session_recording:e&&e>="2025-11-30"?{strictMinimumDuration:!0}:{}}}(e))},dh=function(e){var t={};js(e.process_person)||(t.person_profiles=e.process_person),js(e.xhr_headers)||(t.request_headers=e.xhr_headers),js(e.cookie_name)||(t.persistence_name=e.cookie_name),js(e.disable_cookie)||(t.disable_persistence=e.disable_cookie),js(e.store_google)||(t.save_campaign_params=e.store_google),js(e.verbose)||(t.debug=e.verbose);var n=Ha({},t,e);return qs(e.property_blacklist)&&(js(e.property_denylist)?n.property_denylist=e.property_blacklist:qs(e.property_denylist)?n.property_denylist=[].concat(e.property_blacklist,e.property_denylist):Aa.error("Invalid value for property_denylist config: "+e.property_denylist)),n},fh=function(){return Hi((function(){this.__forceAllowLocalhost=!1}),[{key:"_forceAllowLocalhost",get:function(){return this.__forceAllowLocalhost},set:function(e){Aa.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}])}(),ph=function(){function e(){var e=this;this.webPerformance=new fh,this._personProcessingSetOncePropertiesSent=!1,this.version=Ps.LIB_VERSION,this._internalEventEmitter=new k_,this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=ch(),this.SentryIntegration=Rp,this.sentryIntegration=function(t){return function(e,t){var n=Lp(e,t);return{name:Fp,processEvent:function(e){return n(e)}}}(e,t)},this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this._initialPageviewCaptured=!1,this._visibilityStateListener=null,this._initialPersonProfilesConfig=null,this._cachedPersonProperties=null,this.featureFlags=new y_(this),this.toolbar=new qp(this),this.scrollManager=new H_(this),this.pageViewManager=new a_(this),this.surveys=new I_(this),this.conversations=new L_(this),this.productTours=new E_(this),this.experiments=new K_(this),this.exceptions=new ff(this),this.rateLimiter=new O_(this),this.requestRouter=new X_(this),this.consent=new bp(this),this.externalIntegrations=new nh(this),this.people={set:function(t,n,r){var i,o=Us(t)?((i={})[t]=n,i):t;e.setPersonProperties(o),null==r||r({})},set_once:function(t,n,r){var i,o=Us(t)?((i={})[t]=n,i):t;e.setPersonProperties(void 0,o),null==r||r({})}},this.on("eventCaptured",(function(e){return Aa.info('send "'+(null==e?void 0:e.event)+'"',e)}))}var t=e.prototype;return t.init=function(t,n,r){if(r&&r!==uh){var i,o=null!==(i=sh[r])&&void 0!==i?i:new e;return o._init(t,n,r),sh[r]=o,sh[uh][r]=o,o}return this._init(t,n,r)},t._init=function(e,t,n){var r,i=this;if(void 0===t&&(t={}),js(e)||Vs(e))return Aa.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._checkLocalStorageForDebug(t.debug),this._originalUserConfig=t,this._triggered_notifs=[],t.person_profiles&&(this._initialPersonProfilesConfig=t.person_profiles),this.set_config(Ha({},ch(t.defaults),dh(t),{name:n,token:e})),this.config.on_xhr_error&&Aa.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=t.disable_compression?void 0:hl.GZipJS;var o=this._is_persistence_disabled();this.persistence=new w_(this.config,o),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new w_(Ui({},this.config,{persistence:"sessionStorage"}),o);var s=Ui({},this.persistence.props),a=Ui({},this.sessionPersistence.props);this.register({$initialization_time:(new Date).toISOString()}),this._requestQueue=new q_((function(e){return i._send_retriable_request(e)}),this.config.request_queue_config),this._retryQueue=new N_(this),this.__request_queue=[];var u="always"===this.config.cookieless_mode||"on_reject"===this.config.cookieless_mode&&this.consent.isExplicitlyOptedOut();if(u||(this.sessionManager=new z_(this),this.sessionPropsManager=new U_(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(Aa.info("Deferring extension initialization to improve startup performance"),setTimeout((function(){i._initExtensions(u)}),0)):(Aa.info("Initializing extensions synchronously"),this._initExtensions(u)),Ps.DEBUG=Ps.DEBUG||this.config.debug,Ps.DEBUG&&Aa.info("Starting in debug mode",{this:this,config:t,thisC:Ui({},this.config),p:s,s:a}),void 0!==(null==(r=t.bootstrap)?void 0:r.distinctID)){var l,c,d=this.config.get_device_id(hu()),f=null!=(l=t.bootstrap)&&l.isIdentifiedID?d:t.bootstrap.distinctID;this.persistence.set_property(Kd,null!=(c=t.bootstrap)&&c.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:t.bootstrap.distinctID,$device_id:f})}if(this._hasBootstrappedFeatureFlags()){var p,_,h=Object.keys((null==(p=t.bootstrap)?void 0:p.featureFlags)||{}).filter((function(e){var n;return!(null==(n=t.bootstrap)||null==(n=n.featureFlags)||!n[e])})).reduce((function(e,n){var r;return e[n]=(null==(r=t.bootstrap)||null==(r=r.featureFlags)?void 0:r[n])||!1,e}),{}),v=Object.keys((null==(_=t.bootstrap)?void 0:_.featureFlagPayloads)||{}).filter((function(e){return h[e]})).reduce((function(e,n){var r,i;null!=(r=t.bootstrap)&&null!=(r=r.featureFlagPayloads)&&r[n]&&(e[n]=null==(i=t.bootstrap)||null==(i=i.featureFlagPayloads)?void 0:i[n]);return e}),{});this.featureFlags.receivedFeatureFlags({featureFlags:h,featureFlagPayloads:v})}if(u)this.register_once({distinct_id:uf,$device_id:null},"");else if(!this.get_distinct_id()){var g=this.config.get_device_id(hu());this.register_once({distinct_id:g,$device_id:g},""),this.persistence.set_property(Kd,"anonymous")}return Qa(ps,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),this.toolbar.maybeLoadToolbar(),t.segment?Ip(this,(function(){return i._loaded()})):this._loaded(),$s(this.config._onCapture)&&this.config._onCapture!==ah&&(Aa.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",(function(e){return i.config._onCapture(e.event,e)}))),this.config.ip&&Aa.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},t._initExtensions=function(e){var t=this,n=performance.now();this.historyAutocapture=new Cp(this),this.historyAutocapture.startIfEnabled();var r=[];r.push((function(){new Np(t).startIfEnabledOrStop()})),r.push((function(){var e;t.siteApps=new G_(t),null==(e=t.siteApps)||e.init()})),e||r.push((function(){t.sessionRecording=new oh(t),t.sessionRecording.startIfEnabledOrStop()})),this.config.disable_scroll_properties||r.push((function(){t.scrollManager.startMeasuringScrollPosition()})),r.push((function(){t.autocapture=new sp(t),t.autocapture.startIfEnabled()})),r.push((function(){t.surveys.loadIfEnabled()})),r.push((function(){t.conversations.loadIfEnabled()})),r.push((function(){t.productTours.loadIfEnabled()})),r.push((function(){t.heatmaps=new s_(t),t.heatmaps.startIfEnabled()})),r.push((function(){t.webVitalsAutocapture=new r_(t)})),r.push((function(){t.exceptionObserver=new Pp(t),t.exceptionObserver.startIfEnabled()})),r.push((function(){t.deadClicksAutocapture=new Ep(t,xp),t.deadClicksAutocapture.startIfEnabled()})),r.push((function(){if(t._pendingRemoteConfig){var e=t._pendingRemoteConfig;t._pendingRemoteConfig=void 0,t._onRemoteConfig(e)}})),this._processInitTaskQueue(r,n)},t._processInitTaskQueue=function(e,t){for(var n=this;e.length>0;){if(this.config.__preview_deferred_init_extensions)if(performance.now()-t>=30&&e.length>0)return void setTimeout((function(){n._processInitTaskQueue(e,t)}),0);var r=e.shift();if(r)try{r()}catch(e){Aa.error("Error initializing extension:",e)}}var i=Math.round(performance.now()-t);this.register_for_session({$sdk_debug_extensions_init_method:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",$sdk_debug_extensions_init_time_ms:i}),this.config.__preview_deferred_init_extensions&&Aa.info("PostHog extensions initialized ("+i+"ms)")},t._onRemoteConfig=function(e){var t,n,r,i,o,s,a,u,l=this;if(!ys||!ys.body)return Aa.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout((function(){l._onRemoteConfig(e)}),500);this.config.__preview_deferred_init_extensions&&(this._pendingRemoteConfig=e),this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=Fs(e.supportedCompression,hl.GZipJS)?hl.GZipJS:Fs(e.supportedCompression,hl.Base64)?hl.Base64:void 0),null!=(t=e.analytics)&&t.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),this.set_config({person_profiles:this._initialPersonProfilesConfig?this._initialPersonProfilesConfig:"identified_only"}),null==(n=this.siteApps)||n.onRemoteConfig(e),null==(r=this.sessionRecording)||r.onRemoteConfig(e),null==(i=this.autocapture)||i.onRemoteConfig(e),null==(o=this.heatmaps)||o.onRemoteConfig(e),this.surveys.onRemoteConfig(e),this.conversations.onRemoteConfig(e),this.productTours.onRemoteConfig(e),null==(s=this.webVitalsAutocapture)||s.onRemoteConfig(e),null==(a=this.exceptionObserver)||a.onRemoteConfig(e),this.exceptions.onRemoteConfig(e),null==(u=this.deadClicksAutocapture)||u.onRemoteConfig(e)},t._loaded=function(){var e=this;try{this.config.loaded(this)}catch(e){Aa.critical("`loaded` function failed",e)}this._start_queue_if_opted_in(),this.config.capture_pageview&&setTimeout((function(){(e.consent.isOptedIn()||"always"===e.config.cookieless_mode)&&e._captureInitialPageview()}),1),new A_(this).load(),this.featureFlags.flags()},t._start_queue_if_opted_in=function(){var e;this.is_capturing()&&(this.config.request_batching&&(null==(e=this._requestQueue)||e.enable()))},t._dom_loaded=function(){var e=this;this.is_capturing()&&$a(this.__request_queue,(function(t){return e._send_retriable_request(t)})),this.__request_queue=[],this._start_queue_if_opted_in()},t._handle_unload=function(){var e,t;this.config.request_batching?(this._shouldCapturePageleave()&&this.capture("$pageleave"),null==(e=this._requestQueue)||e.unload(),null==(t=this._retryQueue)||t.unload()):this._shouldCapturePageleave()&&this.capture("$pageleave",null,{transport:"sendBeacon"})},t._send_request=function(e){var t=this;this.__loaded&&(lh?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)||(e.transport=e.transport||this.config.api_transport,e.url=ic(e.url,{ip:this.config.ip?1:0}),e.headers=Ui({},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,function(e){var t,n,r,i=Ui({},e);i.timeout=i.timeout||6e4,i.url=ic(i.url,{_:(new Date).getTime().toString(),ver:Ps.LIB_VERSION,compression:i.compression});var o=null!==(t=i.transport)&&void 0!==t?t:"fetch",s=ac.filter((function(e){return!i.disableTransport||!e.transport||!i.disableTransport.includes(e.transport)})),a=null!==(n=null==(r=Ya(s,(function(e){return e.transport===o})))?void 0:r.method)&&void 0!==n?n:s[0].method;if(!a)throw new Error("No available transport method");a(i)}(Ui({},e,{callback:function(n){t.rateLimiter.checkForLimiting(n),n.statusCode>=400&&(null==t.config.on_request_error||t.config.on_request_error(n)),null==e.callback||e.callback(n)}}))))},t._send_retriable_request=function(e){this._retryQueue?this._retryQueue.retriableRequest(e):this._send_request(e)},t._execute_array=function(e){var t,n=this,r=[],i=[],o=[];$a(e,(function(e){e&&(t=e[0],qs(t)?o.push(e):$s(e)?e.call(n):qs(e)&&"alias"===t?r.push(e):qs(e)&&-1!==t.indexOf("capture")&&$s(n[t])?o.push(e):i.push(e))}));var s=function(e,t){$a(e,(function(e){if(qs(e[0])){var n=t;Na(e,(function(e){n=n[e[0]].apply(n,e.slice(1))}))}else this[e[0]].apply(this,e.slice(1))}),t)};s(r,this),s(i,this),s(o,this)},t._hasBootstrappedFeatureFlags=function(){var e,t;return(null==(e=this.config.bootstrap)?void 0:e.featureFlags)&&Object.keys(null==(t=this.config.bootstrap)?void 0:t.featureFlags).length>0||!1},t.push=function(e){this._execute_array([e])},t.capture=function(e,t,n){var r;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this._requestQueue){if(this.is_capturing())if(!js(e)&&Us(e)){var i=!this.config.opt_out_useragent_filter&&this._is_bot();if(!(i&&!this.config.__preview_capture_bot_pageviews)){var o=null!=n&&n.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(null==o||!o.isRateLimited){null!=t&&t.$current_url&&!Us(null==t?void 0:t.$current_url)&&(Aa.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),null==t||delete t.$current_url),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var s=new Date,a=(null==n?void 0:n.timestamp)||s,u=hu(),l={uuid:u,event:e,properties:this.calculateEventProperties(e,t||{},a,u)};"$pageview"===e&&this.config.__preview_capture_bot_pageviews&&i&&(l.event="$bot_pageview",l.properties.$browser_type="bot"),o&&(l.properties.$lib_rate_limit_remaining_tokens=o.remainingTokens),(null==n?void 0:n.$set)&&(l.$set=null==n?void 0:n.$set);var c="$groupidentify"!==e,d=this._calculate_set_once_properties(null==n?void 0:n.$set_once,c);if(d&&(l.$set_once=d),(l=Wa(l,null!=n&&n._noTruncate?null:this.config.properties_string_max_length)).timestamp=a,js(null==n?void 0:n.timestamp)||(l.properties.$event_time_override_provided=!0,l.properties.$event_time_override_system_time=s),e===cs.DISMISSED||e===cs.SENT){var f,p=null==t?void 0:t[ds.SURVEY_ID],_=null==t?void 0:t[ds.SURVEY_ITERATION];ou({id:p,current_iteration:_}),l.$set=Ui({},l.$set,((f={})[ru({id:p,current_iteration:_},e===cs.SENT?"responded":"dismissed")]=!0,f))}var h=Ui({},l.properties.$set,l.$set);if(Hs(h)||this.setPersonPropertiesForFlags(h),!Bs(this.config.before_send)){var v=this._runBeforeSend(l);if(!v)return;l=v}this._internalEventEmitter.emit("eventCaptured",l);var g={method:"POST",url:null!==(r=null==n?void 0:n._url)&&void 0!==r?r:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:l,compression:"best-available",batchKey:null==n?void 0:n._batchKey};return!this.config.request_batching||n&&(null==n||!n._batchKey)||null!=n&&n.send_instantly?this._send_retriable_request(g):this._requestQueue.enqueue(g),l}Aa.critical("This capture call is ignored due to client rate limiting.")}}else Aa.error("No event name provided to posthog.capture")}else Aa.uninitializedWarning("posthog.capture")},t._addCaptureHook=function(e){return this.on("eventCaptured",(function(t){return e(t.event,t)}))},t.calculateEventProperties=function(e,t,n,r,i){if(n=n||new Date,!this.persistence||!this.sessionPersistence)return t;var o=i?void 0:this.persistence.remove_event_timer(e),s=Ui({},t);if(s.token=this.config.token,s.$config_defaults=this.config.defaults,("always"==this.config.cookieless_mode||"on_reject"==this.config.cookieless_mode&&this.consent.isExplicitlyOptedOut())&&(s.$cookieless_mode=!0),"$snapshot"===e){var a=Ui({},this.persistence.properties(),this.sessionPersistence.properties());return s.distinct_id=a.distinct_id,(!Us(s.distinct_id)&&!Ws(s.distinct_id)||Vs(s.distinct_id))&&Aa.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),s}var u,l=e_(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties);if(this.sessionManager){var c=this.sessionManager.checkAndGetSessionAndWindowId(i,n.getTime()),d=c.sessionId,f=c.windowId;s.$session_id=d,s.$window_id=f}this.sessionPropsManager&&Ha(s,this.sessionPropsManager.getSessionProps());try{var p;this.sessionRecording&&Ha(s,this.sessionRecording.sdkDebugProperties),s.$sdk_debug_retry_queue_size=null==(p=this._retryQueue)?void 0:p.length}catch(e){s.$sdk_debug_error_capturing_properties=String(e)}if(this.requestRouter.region===Y_.CUSTOM&&(s.$lib_custom_api_host=this.config.api_host),u="$pageview"!==e||i?"$pageleave"!==e||i?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(n):this.pageViewManager.doPageView(n,r),s=Ha(s,u),"$pageview"===e&&ys&&(s.title=ys.title),!js(o)){var _=n.getTime()-o;s.$duration=parseFloat((_/1e3).toFixed(3))}Es&&this.config.opt_out_useragent_filter&&(s.$browser_type=this._is_bot()?"bot":"browser"),(s=Ha({},l,this.persistence.properties(),this.sessionPersistence.properties(),s)).$is_identified=this._isIdentified(),qs(this.config.property_denylist)?Na(this.config.property_denylist,(function(e){delete s[e]})):Aa.error("Invalid value for property_denylist config: "+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var h=this.config.sanitize_properties;h&&(Aa.error("sanitize_properties is deprecated. Use before_send instead"),s=h(s,e));var v=this._hasPersonProcessing();return s.$process_person_profile=v,v&&!i&&this._requirePersonProcessing("_calculate_event_properties"),s},t._calculate_set_once_properties=function(e,t){var n;if(void 0===t&&(t=!0),!this.persistence||!this._hasPersonProcessing())return e;if(this._personProcessingSetOncePropertiesSent)return e;var r=this.persistence.get_initial_props(),i=null==(n=this.sessionPropsManager)?void 0:n.getSetOnceProps(),o=Ha({},r,i||{},e||{}),s=this.config.sanitize_properties;return s&&(Aa.error("sanitize_properties is deprecated. Use before_send instead"),o=s(o,"$set_once")),t&&(this._personProcessingSetOncePropertiesSent=!0),Hs(o)?void 0:o},t.register=function(e,t){var n;null==(n=this.persistence)||n.register(e,t)},t.register_once=function(e,t,n){var r;null==(r=this.persistence)||r.register_once(e,t,n)},t.register_for_session=function(e){var t;null==(t=this.sessionPersistence)||t.register(e)},t.unregister=function(e){var t;null==(t=this.persistence)||t.unregister(e)},t.unregister_for_session=function(e){var t;null==(t=this.sessionPersistence)||t.unregister(e)},t._register_single=function(e,t){var n;this.register(((n={})[e]=t,n))},t.getFeatureFlag=function(e,t){return this.featureFlags.getFeatureFlag(e,t)},t.getFeatureFlagPayload=function(e){var t=this.featureFlags.getFeatureFlagPayload(e);try{return JSON.parse(t)}catch(e){return t}},t.isFeatureEnabled=function(e,t){return this.featureFlags.isFeatureEnabled(e,t)},t.reloadFeatureFlags=function(){this.featureFlags.reloadFeatureFlags()},t.updateEarlyAccessFeatureEnrollment=function(e,t,n){this.featureFlags.updateEarlyAccessFeatureEnrollment(e,t,n)},t.getEarlyAccessFeatures=function(e,t,n){return void 0===t&&(t=!1),this.featureFlags.getEarlyAccessFeatures(e,t,n)},t.on=function(e,t){return this._internalEventEmitter.on(e,t)},t.onFeatureFlags=function(e){return this.featureFlags.onFeatureFlags(e)},t.onSurveysLoaded=function(e){return this.surveys.onSurveysLoaded(e)},t.onSessionId=function(e){var t,n;return null!==(t=null==(n=this.sessionManager)?void 0:n.onSessionId(e))&&void 0!==t?t:function(){}},t.getSurveys=function(e,t){void 0===t&&(t=!1),this.surveys.getSurveys(e,t)},t.getActiveMatchingSurveys=function(e,t){void 0===t&&(t=!1),this.surveys.getActiveMatchingSurveys(e,t)},t.renderSurvey=function(e,t){this.surveys.renderSurvey(e,t)},t.displaySurvey=function(e,t){void 0===t&&(t=au),this.surveys.displaySurvey(e,t)},t.cancelPendingSurvey=function(e){this.surveys.cancelPendingSurvey(e)},t.canRenderSurvey=function(e){return this.surveys.canRenderSurvey(e)},t.canRenderSurveyAsync=function(e,t){return void 0===t&&(t=!1),this.surveys.canRenderSurveyAsync(e,t)},t.identify=function(e,t,n){if(!this.__loaded||!this.persistence)return Aa.uninitializedWarning("posthog.identify");if(Ws(e)&&(e=e.toString(),Aa.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),e)if(["distinct_id","distinctid"].includes(e.toLowerCase()))Aa.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.');else if(e!==uf){if(this._requirePersonProcessing("posthog.identify")){var r=this.get_distinct_id();if(this.register({$user_id:e}),!this.get_property("$device_id")){var i=r;this.register_once({$had_persisted_distinct_id:!0,$device_id:i},"")}e!==r&&e!==this.get_property(Rd)&&(this.unregister(Rd),this.register({distinct_id:e}));var o="anonymous"===(this.persistence.get_property(Kd)||"anonymous");e!==r&&o?(this.persistence.set_property(Kd,"identified"),this.setPersonPropertiesForFlags(Ui({},n||{},t||{}),!1),this.capture("$identify",{distinct_id:e,$anon_distinct_id:r},{$set:t||{},$set_once:n||{}}),this._cachedPersonProperties=lc(e,t,n),this.featureFlags.setAnonymousDistinctId(r)):(t||n)&&this.setPersonProperties(t,n),e!==r&&(this.reloadFeatureFlags(),this.unregister(Jd))}}else Aa.critical('The string "'+uf+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.');else Aa.error("Unique user id has not been set in posthog.identify")},t.setPersonProperties=function(e,t){if((e||t)&&this._requirePersonProcessing("posthog.setPersonProperties")){var n=lc(this.get_distinct_id(),e,t);this._cachedPersonProperties!==n?(this.setPersonPropertiesForFlags(Ui({},t||{},e||{})),this.capture("$set",{$set:e||{},$set_once:t||{}}),this._cachedPersonProperties=n):Aa.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}},t.group=function(e,t,n){var r;if(e&&t){var i,o=this.getGroups();if(o[e]!==t&&this.resetGroupPropertiesForFlags(e),this.register({$groups:Ui({},o,(r={},r[e]=t,r))}),n)this.capture("$groupidentify",{$group_type:e,$group_key:t,$group_set:n}),this.setGroupPropertiesForFlags(((i={})[e]=n,i));o[e]===t||n||this.reloadFeatureFlags()}else Aa.error("posthog.group requires a group type and group key")},t.resetGroups=function(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()},t.setPersonPropertiesForFlags=function(e,t){void 0===t&&(t=!0),this.featureFlags.setPersonPropertiesForFlags(e,t)},t.resetPersonPropertiesForFlags=function(){this.featureFlags.resetPersonPropertiesForFlags()},t.setGroupPropertiesForFlags=function(e,t){void 0===t&&(t=!0),this._requirePersonProcessing("posthog.setGroupPropertiesForFlags")&&this.featureFlags.setGroupPropertiesForFlags(e,t)},t.resetGroupPropertiesForFlags=function(e){this.featureFlags.resetGroupPropertiesForFlags(e)},t.reset=function(e){var t,n,r,i;if(Aa.info("reset"),!this.__loaded)return Aa.uninitializedWarning("posthog.reset");var o=this.get_property("$device_id");if(this.consent.reset(),null==(t=this.persistence)||t.clear(),null==(n=this.sessionPersistence)||n.clear(),this.surveys.reset(),this.featureFlags.reset(),null==(r=this.persistence)||r.set_property(Kd,"anonymous"),null==(i=this.sessionManager)||i.resetSessionId(),this._cachedPersonProperties=null,"always"===this.config.cookieless_mode)this.register_once({distinct_id:uf,$device_id:null},"");else{var s=this.config.get_device_id(hu());this.register_once({distinct_id:s,$device_id:e?s:o},"")}this.register({$last_posthog_reset:(new Date).toISOString()},1)},t.get_distinct_id=function(){return this.get_property("distinct_id")},t.getGroups=function(){return this.get_property("$groups")||{}},t.get_session_id=function(){var e,t;return null!==(e=null==(t=this.sessionManager)?void 0:t.checkAndGetSessionAndWindowId(!0).sessionId)&&void 0!==e?e:""},t.get_session_replay_url=function(e){if(!this.sessionManager)return"";var t=this.sessionManager.checkAndGetSessionAndWindowId(!0),n=t.sessionId,r=t.sessionStartTimestamp,i=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+n);if(null!=e&&e.withTimestamp&&r){var o,s=null!==(o=e.timestampLookBack)&&void 0!==o?o:10;if(!r)return i;i+="?t="+Math.max(Math.floor(((new Date).getTime()-r)/1e3)-s,0)}return i},t.alias=function(e,t){return e===this.get_property(Ld)?(Aa.critical("Attempting to create alias for existing People user - aborting."),-2):this._requirePersonProcessing("posthog.alias")?(js(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single(Rd,e),this.capture("$create_alias",{alias:e,distinct_id:t})):(Aa.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0},t.set_config=function(e){var t=Ui({},this.config);if(Ns(e)){var n,r,i,o,s;Ha(this.config,dh(e));var a=this._is_persistence_disabled();null==(n=this.persistence)||n.update_config(this.config,t,a),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new w_(Ui({},this.config,{persistence:"sessionStorage"}),a);var u=this._checkLocalStorageForDebug(this.config.debug);Gs(u)&&(this.config.debug=u),Gs(this.config.debug)&&(this.config.debug?(Ps.DEBUG=!0,fp._is_supported()&&fp._set("ph_debug","true"),Aa.info("set_config",{config:e,oldConfig:t,newConfig:Ui({},this.config)})):(Ps.DEBUG=!1,fp._is_supported()&&fp._remove("ph_debug"))),null==(r=this.sessionRecording)||r.startIfEnabledOrStop(),null==(i=this.autocapture)||i.startIfEnabled(),null==(o=this.heatmaps)||o.startIfEnabled(),this.surveys.loadIfEnabled(),this._sync_opt_out_with_persistence(),null==(s=this.externalIntegrations)||s.startIfEnabledOrStop()}},t.startSessionRecording=function(e){var t=!0===e,n={sampling:t||!(null==e||!e.sampling),linked_flag:t||!(null==e||!e.linked_flag),url_trigger:t||!(null==e||!e.url_trigger),event_trigger:t||!(null==e||!e.event_trigger)};if(Object.values(n).some(Boolean)){var r,i,o,s,a;if(null==(r=this.sessionManager)||r.checkAndGetSessionAndWindowId(),n.sampling)null==(i=this.sessionRecording)||i.overrideSampling();if(n.linked_flag)null==(o=this.sessionRecording)||o.overrideLinkedFlag();if(n.url_trigger)null==(s=this.sessionRecording)||s.overrideTrigger("url");if(n.event_trigger)null==(a=this.sessionRecording)||a.overrideTrigger("event")}this.set_config({disable_session_recording:!1})},t.stopSessionRecording=function(){this.set_config({disable_session_recording:!0})},t.sessionRecordingStarted=function(){var e;return!(null==(e=this.sessionRecording)||!e.started)},t.captureException=function(e,t){var n=new Error("PostHog syntheticException"),r=this.exceptions.buildProperties(e,{handled:!0,syntheticException:n});return this.exceptions.sendExceptionEvent(Ui({},r,t))},t.loadToolbar=function(e){return this.toolbar.loadToolbar(e)},t.get_property=function(e){var t;return null==(t=this.persistence)?void 0:t.props[e]},t.getSessionProperty=function(e){var t;return null==(t=this.sessionPersistence)?void 0:t.props[e]},t.toString=function(){var e,t=null!==(e=this.config.name)&&void 0!==e?e:uh;return t!==uh&&(t=uh+"."+t),t},t._isIdentified=function(){var e,t;return"identified"===(null==(e=this.persistence)?void 0:e.get_property(Kd))||"identified"===(null==(t=this.sessionPersistence)?void 0:t.get_property(Kd))},t._hasPersonProcessing=function(){var e,t;return!("never"===this.config.person_profiles||"identified_only"===this.config.person_profiles&&!this._isIdentified()&&Hs(this.getGroups())&&(null==(e=this.persistence)||null==(e=e.props)||!e[Rd])&&(null==(t=this.persistence)||null==(t=t.props)||!t[sf]))},t._shouldCapturePageleave=function(){return!0===this.config.capture_pageleave||"if_capture_pageview"===this.config.capture_pageleave&&(!0===this.config.capture_pageview||"history_change"===this.config.capture_pageview)},t.createPersonProfile=function(){this._hasPersonProcessing()||this._requirePersonProcessing("posthog.createPersonProfile")&&this.setPersonProperties({},{})},t._requirePersonProcessing=function(e){return"never"===this.config.person_profiles?(Aa.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this._register_single(sf,!0),!0)},t._is_persistence_disabled=function(){if("always"===this.config.cookieless_mode)return!0;var e=this.consent.isOptedOut(),t=this.config.opt_out_persistence_by_default||"on_reject"===this.config.cookieless_mode;return this.config.disable_persistence||e&&!!t},t._sync_opt_out_with_persistence=function(){var e,t,n,r,i=this._is_persistence_disabled();(null==(e=this.persistence)?void 0:e._disabled)!==i&&(null==(n=this.persistence)||n.set_disabled(i));(null==(t=this.sessionPersistence)?void 0:t._disabled)!==i&&(null==(r=this.sessionPersistence)||r.set_disabled(i));return i},t.opt_in_capturing=function(e){var t;if("always"!==this.config.cookieless_mode){var n,r;if("on_reject"===this.config.cookieless_mode&&this.consent.isExplicitlyOptedOut())this.reset(!0),null==(n=this.sessionManager)||n.destroy(),this.sessionManager=new z_(this),this.persistence&&(this.sessionPropsManager=new U_(this,this.sessionManager,this.persistence)),this.sessionRecording=new oh(this),this.sessionRecording.startIfEnabledOrStop();if(this.consent.optInOut(!0),this._sync_opt_out_with_persistence(),this._start_queue_if_opted_in(),null==(t=this.sessionRecording)||t.startIfEnabledOrStop(),"on_reject"==this.config.cookieless_mode&&this.surveys.loadIfEnabled(),js(null==e?void 0:e.captureEventName)||null!=e&&e.captureEventName)this.capture(null!==(r=null==e?void 0:e.captureEventName)&&void 0!==r?r:"$opt_in",null==e?void 0:e.captureProperties,{send_instantly:!0});this.config.capture_pageview&&this._captureInitialPageview()}else Aa.warn('Consent opt in/out is not valid with cookieless_mode="always" and will be ignored')},t.opt_out_capturing=function(){var e,t;"always"!==this.config.cookieless_mode?("on_reject"===this.config.cookieless_mode&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this._sync_opt_out_with_persistence(),"on_reject"===this.config.cookieless_mode&&(this.register({distinct_id:uf,$device_id:null}),null==(e=this.sessionManager)||e.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,null==(t=this.sessionRecording)||t.stopRecording(),this.sessionRecording=void 0,this._captureInitialPageview())):Aa.warn('Consent opt in/out is not valid with cookieless_mode="always" and will be ignored')},t.has_opted_in_capturing=function(){return this.consent.isOptedIn()},t.has_opted_out_capturing=function(){return this.consent.isOptedOut()},t.get_explicit_consent_status=function(){var e=this.consent.consent;return e===yp.GRANTED?"granted":e===yp.DENIED?"denied":"pending"},t.is_capturing=function(){return"always"===this.config.cookieless_mode||("on_reject"===this.config.cookieless_mode?this.consent.isExplicitlyOptedOut()||this.consent.isOptedIn():!this.has_opted_out_capturing())},t.clear_opt_in_out_capturing=function(){this.consent.reset(),this._sync_opt_out_with_persistence()},t._is_bot=function(){return ms?Z_(ms,this.config.custom_blocked_useragents):void 0},t._captureInitialPageview=function(){ys&&("visible"===ys.visibilityState?this._initialPageviewCaptured||(this._initialPageviewCaptured=!0,this.capture("$pageview",{title:ys.title},{send_instantly:!0}),this._visibilityStateListener&&(ys.removeEventListener("visibilitychange",this._visibilityStateListener),this._visibilityStateListener=null)):this._visibilityStateListener||(this._visibilityStateListener=this._captureInitialPageview.bind(this),Qa(ys,"visibilitychange",this._visibilityStateListener)))},t.debug=function(e){!1===e?(null==ps||ps.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(null==ps||ps.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}))},t._shouldDisableFlags=function(){var e,t,n,r,i,o,s,a=this._originalUserConfig||{};return"advanced_disable_flags"in a?!!a.advanced_disable_flags:!1!==this.config.advanced_disable_flags?!!this.config.advanced_disable_flags:!0===this.config.advanced_disable_decide?(Aa.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):(n="advanced_disable_decide",r=!1,i=Aa,o=(t="advanced_disable_flags")in(e=a)&&!js(e[t]),s=n in e&&!js(e[n]),o?e[t]:s?(i&&i.warn("Config field '"+n+"' is deprecated. Please use '"+t+"' instead. The old field will be removed in a future major version."),e[n]):r)},t._runBeforeSend=function(e){if(Bs(this.config.before_send))return e;for(var t,n=e,r=ji(qs(this.config.before_send)?this.config.before_send:[this.config.before_send]);!(t=r()).done;){if(n=(0,t.value)(n),Bs(n)){var i="Event '"+e.event+"' was rejected in beforeSend function";return Ys(e.event)?Aa.warn(i+". This can cause unexpected behavior."):Aa.info(i),null}n.properties&&!Hs(n.properties)||Aa.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}return n},t.getPageViewId=function(){var e;return null==(e=this.pageViewManager._currentPageview)?void 0:e.pageViewId},t.captureTraceFeedback=function(e,t){this.capture("$ai_feedback",{$ai_trace_id:String(e),$ai_feedback_text:t})},t.captureTraceMetric=function(e,t,n){this.capture("$ai_metric",{$ai_trace_id:String(e),$ai_metric_name:t,$ai_metric_value:String(n)})},t._checkLocalStorageForDebug=function(e){var t=Gs(e)&&!e,n=fp._is_supported()&&"true"===fp._get("ph_debug");return!t&&(!!n||e)},Hi(e,[{key:"decideEndpointWasHit",get:function(){var e,t;return null!==(e=null==(t=this.featureFlags)?void 0:t.hasLoadedFlags)&&void 0!==e&&e}},{key:"flagsEndpointWasHit",get:function(){var e,t;return null!==(e=null==(t=this.featureFlags)?void 0:t.hasLoadedFlags)&&void 0!==e&&e}}])}();!function(e,t){for(var n=0;n<t.length;n++)e.prototype[t[n]]=za(e.prototype[t[n]])}(ph,["identify"]);var _h,hh;if(_h=sh[uh]=new ph,(hh=ks.posthog)&&Na(hh._i,(function(e){if(e&&qs(e)){var t=_h.init(e[0],e[1],e[2]),n=hh[e[2]]||hh;t&&(t._execute_array.call(t.people,n.people),t._execute_array(n))}})),ks.posthog=_h,function(){function e(){e.done||(e.done=!0,lh=!1,Na(sh,(function(e){e._dom_loaded()})))}null!=ys&&ys.addEventListener?"complete"===ys.readyState?e():Qa(ys,"DOMContentLoaded",e,{capture:!1}):ps&&Aa.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")}(),"undefined"==typeof performance||"function"!=typeof performance.now){var vh="undefined"!=typeof performance?performance:{};vh.now=vh.now||function(){return Date.now()},"undefined"==typeof performance&&(window.performance=vh)}}();
1
+ !function(){"use strict";var e,t,n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},r={};function i(){if(t)return e;t=1;var r=function(e){return e&&e.Math===Math&&e};return e=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n&&n)||r("object"==typeof e&&e)||function(){return this}()||Function("return this")()}var o,s,a,u,l,c,d,f,p={};function _(){return s?o:(s=1,o=function(e){try{return!!e()}catch(e){return!0}})}function h(){if(u)return a;u=1;var e=_();return a=!e((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))}function v(){if(c)return l;c=1;var e=_();return l=!e((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))}function g(){if(f)return d;f=1;var e=v(),t=Function.prototype.call;return d=e?t.bind(t):function(){return t.apply(t,arguments)},d}var m,y,b,w,S,x,E,k,P,C,T,I,F,L,R,O,M,A,D,q,N,H,j,U,V,z,B,W,G,Z,Y,Q,X,J,K,ee,te,ne,re,ie,oe,se={};function ae(){if(m)return se;m=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,n=t&&!e.call({1:2},1);return se.f=n?function(e){var n=t(this,e);return!!n&&n.enumerable}:e,se}function ue(){return b?y:(b=1,y=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}})}function le(){if(S)return w;S=1;var e=v(),t=Function.prototype,n=t.call,r=e&&t.bind.bind(n,n);return w=e?r:function(e){return function(){return n.apply(e,arguments)}},w}function ce(){if(E)return x;E=1;var e=le(),t=e({}.toString),n=e("".slice);return x=function(e){return n(t(e),8,-1)}}function de(){return T?C:(T=1,C=function(e){return null==e})}function fe(){if(F)return I;F=1;var e=de(),t=TypeError;return I=function(n){if(e(n))throw new t("Can't call method on "+n);return n}}function pe(){if(R)return L;R=1;var e=function(){if(P)return k;P=1;var e=le(),t=_(),n=ce(),r=Object,i=e("".split);return k=t((function(){return!r("z").propertyIsEnumerable(0)}))?function(e){return"String"===n(e)?i(e,""):r(e)}:r}(),t=fe();return L=function(n){return e(t(n))}}function _e(){if(M)return O;M=1;var e="object"==typeof document&&document.all;return O=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(e){return"function"==typeof e}}function he(){if(D)return A;D=1;var e=_e();return A=function(t){return"object"==typeof t?null!==t:e(t)}}function ve(){if(N)return q;N=1;var e=i(),t=_e();return q=function(n,r){return arguments.length<2?(i=e[n],t(i)?i:void 0):e[n]&&e[n][r];var i},q}function ge(){if(j)return H;j=1;var e=le();return H=e({}.isPrototypeOf)}function me(){if(B)return z;B=1;var e,t,n=i(),r=function(){if(V)return U;V=1;var e=i().navigator,t=e&&e.userAgent;return U=t?String(t):""}(),o=n.process,s=n.Deno,a=o&&o.versions||s&&s.version,u=a&&a.v8;return u&&(t=(e=u.split("."))[0]>0&&e[0]<4?1:+(e[0]+e[1])),!t&&r&&(!(e=r.match(/Edge\/(\d+)/))||e[1]>=74)&&(e=r.match(/Chrome\/(\d+)/))&&(t=+e[1]),z=t}function ye(){if(G)return W;G=1;var e=me(),t=_(),n=i().String;return W=!!Object.getOwnPropertySymbols&&!t((function(){var t=Symbol("symbol detection");return!n(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41}))}function be(){if(Y)return Z;Y=1;var e=ye();return Z=e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}function we(){if(X)return Q;X=1;var e=ve(),t=_e(),n=ge(),r=be(),i=Object;return Q=r?function(e){return"symbol"==typeof e}:function(r){var o=e("Symbol");return t(o)&&n(o.prototype,i(r))}}function Se(){if(K)return J;K=1;var e=String;return J=function(t){try{return e(t)}catch(e){return"Object"}}}function xe(){if(te)return ee;te=1;var e=_e(),t=Se(),n=TypeError;return ee=function(r){if(e(r))return r;throw new n(t(r)+" is not a function")}}function Ee(){if(re)return ne;re=1;var e=xe(),t=de();return ne=function(n,r){var i=n[r];return t(i)?void 0:e(i)},ne}function ke(){if(oe)return ie;oe=1;var e=g(),t=_e(),n=he(),r=TypeError;return ie=function(i,o){var s,a;if("string"===o&&t(s=i.toString)&&!n(a=e(s,i)))return a;if(t(s=i.valueOf)&&!n(a=e(s,i)))return a;if("string"!==o&&t(s=i.toString)&&!n(a=e(s,i)))return a;throw new r("Can't convert object to primitive value")}}var Pe,Ce,Te,Ie,Fe,Le,Re,Oe,Me,Ae,De,qe,$e,Ne,He,je,Ue,Ve,ze,Be,We,Ge,Ze,Ye,Qe={exports:{}};function Xe(){return Ce?Pe:(Ce=1,Pe=!1)}function Je(){if(Ie)return Te;Ie=1;var e=i(),t=Object.defineProperty;return Te=function(n,r){try{t(e,n,{value:r,configurable:!0,writable:!0})}catch(t){e[n]=r}return r}}function Ke(){if(Fe)return Qe.exports;Fe=1;var e=Xe(),t=i(),n=Je(),r="__core-js_shared__",o=Qe.exports=t[r]||n(r,{});return(o.versions||(o.versions=[])).push({version:"3.38.1",mode:e?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"}),Qe.exports}function et(){if(Re)return Le;Re=1;var e=Ke();return Le=function(t,n){return e[t]||(e[t]=n||{})}}function tt(){if(Me)return Oe;Me=1;var e=fe(),t=Object;return Oe=function(n){return t(e(n))}}function nt(){if(De)return Ae;De=1;var e=le(),t=tt(),n=e({}.hasOwnProperty);return Ae=Object.hasOwn||function(e,r){return n(t(e),r)}}function rt(){if($e)return qe;$e=1;var e=le(),t=0,n=Math.random(),r=e(1..toString);return qe=function(e){return"Symbol("+(void 0===e?"":e)+")_"+r(++t+n,36)}}function it(){if(He)return Ne;He=1;var e=i(),t=et(),n=nt(),r=rt(),o=ye(),s=be(),a=e.Symbol,u=t("wks"),l=s?a.for||a:a&&a.withoutSetter||r;return Ne=function(e){return n(u,e)||(u[e]=o&&n(a,e)?a[e]:l("Symbol."+e)),u[e]}}function ot(){if(Ue)return je;Ue=1;var e=g(),t=he(),n=we(),r=Ee(),i=ke(),o=it(),s=TypeError,a=o("toPrimitive");return je=function(o,u){if(!t(o)||n(o))return o;var l,c=r(o,a);if(c){if(void 0===u&&(u="default"),l=e(c,o,u),!t(l)||n(l))return l;throw new s("Can't convert object to primitive value")}return void 0===u&&(u="number"),i(o,u)}}function st(){if(ze)return Ve;ze=1;var e=ot(),t=we();return Ve=function(n){var r=e(n,"string");return t(r)?r:r+""}}function at(){if(We)return Be;We=1;var e=i(),t=he(),n=e.document,r=t(n)&&t(n.createElement);return Be=function(e){return r?n.createElement(e):{}}}function ut(){if(Ze)return Ge;Ze=1;var e=h(),t=_(),n=at();return Ge=!e&&!t((function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a}))}function lt(){if(Ye)return p;Ye=1;var e=h(),t=g(),n=ae(),r=ue(),i=pe(),o=st(),s=nt(),a=ut(),u=Object.getOwnPropertyDescriptor;return p.f=e?u:function(e,l){if(e=i(e),l=o(l),a)try{return u(e,l)}catch(e){}if(s(e,l))return r(!t(n.f,e,l),e[l])},p}var ct,dt,ft,pt,_t,ht,vt,gt={};function mt(){if(dt)return ct;dt=1;var e=h(),t=_();return ct=e&&t((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))}function yt(){if(pt)return ft;pt=1;var e=he(),t=String,n=TypeError;return ft=function(r){if(e(r))return r;throw new n(t(r)+" is not an object")}}function bt(){if(_t)return gt;_t=1;var e=h(),t=ut(),n=mt(),r=yt(),i=st(),o=TypeError,s=Object.defineProperty,a=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return gt.f=e?n?function(e,t,n){if(r(e),t=i(t),r(n),"function"==typeof e&&"prototype"===t&&"value"in n&&c in n&&!n[c]){var o=a(e,t);o&&o[c]&&(e[t]=n.value,n={configurable:l in n?n[l]:o[l],enumerable:u in n?n[u]:o[u],writable:!1})}return s(e,t,n)}:s:function(e,n,a){if(r(e),n=i(n),r(a),t)try{return s(e,n,a)}catch(e){}if("get"in a||"set"in a)throw new o("Accessors not supported");return"value"in a&&(e[n]=a.value),e},gt}function wt(){if(vt)return ht;vt=1;var e=h(),t=bt(),n=ue();return ht=e?function(e,r,i){return t.f(e,r,n(1,i))}:function(e,t,n){return e[t]=n,e}}var St,xt,Et,kt,Pt,Ct,Tt,It,Ft,Lt,Rt,Ot,Mt,At,Dt,qt={exports:{}};function $t(){if(xt)return St;xt=1;var e=h(),t=nt(),n=Function.prototype,r=e&&Object.getOwnPropertyDescriptor,i=t(n,"name"),o=i&&"something"===function(){}.name,s=i&&(!e||e&&r(n,"name").configurable);return St={EXISTS:i,PROPER:o,CONFIGURABLE:s}}function Nt(){if(kt)return Et;kt=1;var e=le(),t=_e(),n=Ke(),r=e(Function.toString);return t(n.inspectSource)||(n.inspectSource=function(e){return r(e)}),Et=n.inspectSource}function Ht(){if(It)return Tt;It=1;var e=et(),t=rt(),n=e("keys");return Tt=function(e){return n[e]||(n[e]=t(e))}}function jt(){return Lt?Ft:(Lt=1,Ft={})}function Ut(){if(Ot)return Rt;Ot=1;var e,t,n,r=function(){if(Ct)return Pt;Ct=1;var e=i(),t=_e(),n=e.WeakMap;return Pt=t(n)&&/native code/.test(String(n))}(),o=i(),s=he(),a=wt(),u=nt(),l=Ke(),c=Ht(),d=jt(),f="Object already initialized",p=o.TypeError,_=o.WeakMap;if(r||l.state){var h=l.state||(l.state=new _);h.get=h.get,h.has=h.has,h.set=h.set,e=function(e,t){if(h.has(e))throw new p(f);return t.facade=e,h.set(e,t),t},t=function(e){return h.get(e)||{}},n=function(e){return h.has(e)}}else{var v=c("state");d[v]=!0,e=function(e,t){if(u(e,v))throw new p(f);return t.facade=e,a(e,v,t),t},t=function(e){return u(e,v)?e[v]:{}},n=function(e){return u(e,v)}}return Rt={set:e,get:t,has:n,enforce:function(r){return n(r)?t(r):e(r,{})},getterFor:function(e){return function(n){var r;if(!s(n)||(r=t(n)).type!==e)throw new p("Incompatible receiver, "+e+" required");return r}}}}function Vt(){if(Mt)return qt.exports;Mt=1;var e=le(),t=_(),n=_e(),r=nt(),i=h(),o=$t().CONFIGURABLE,s=Nt(),a=Ut(),u=a.enforce,l=a.get,c=String,d=Object.defineProperty,f=e("".slice),p=e("".replace),v=e([].join),g=i&&!t((function(){return 8!==d((function(){}),"length",{value:8}).length})),m=String(String).split("String"),y=qt.exports=function(e,t,n){"Symbol("===f(c(t),0,7)&&(t="["+p(c(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!r(e,"name")||o&&e.name!==t)&&(i?d(e,"name",{value:t,configurable:!0}):e.name=t),g&&n&&r(n,"arity")&&e.length!==n.arity&&d(e,"length",{value:n.arity});try{n&&r(n,"constructor")&&n.constructor?i&&d(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var s=u(e);return r(s,"source")||(s.source=v(m,"string"==typeof t?t:"")),e};return Function.prototype.toString=y((function(){return n(this)&&l(this).source||s(this)}),"toString"),qt.exports}function zt(){if(Dt)return At;Dt=1;var e=_e(),t=bt(),n=Vt(),r=Je();return At=function(i,o,s,a){a||(a={});var u=a.enumerable,l=void 0!==a.name?a.name:o;if(e(s)&&n(s,l,a),a.global)u?i[o]=s:r(o,s);else{try{a.unsafe?i[o]&&(u=!0):delete i[o]}catch(e){}u?i[o]=s:t.f(i,o,{value:s,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return i},At}var Bt,Wt,Gt,Zt,Yt,Qt,Xt,Jt,Kt,en,tn,nn,rn,on,sn,an,un,ln={};function cn(){if(Zt)return Gt;Zt=1;var e=function(){if(Wt)return Bt;Wt=1;var e=Math.ceil,t=Math.floor;return Bt=Math.trunc||function(n){var r=+n;return(r>0?t:e)(r)},Bt}();return Gt=function(t){var n=+t;return n!=n||0===n?0:e(n)}}function dn(){if(Qt)return Yt;Qt=1;var e=cn(),t=Math.max,n=Math.min;return Yt=function(r,i){var o=e(r);return o<0?t(o+i,0):n(o,i)}}function fn(){if(Jt)return Xt;Jt=1;var e=cn(),t=Math.min;return Xt=function(n){var r=e(n);return r>0?t(r,9007199254740991):0}}function pn(){if(en)return Kt;en=1;var e=fn();return Kt=function(t){return e(t.length)}}function _n(){if(on)return rn;on=1;var e=le(),t=nt(),n=pe(),r=function(){if(nn)return tn;nn=1;var e=pe(),t=dn(),n=pn(),r=function(r){return function(i,o,s){var a=e(i),u=n(a);if(0===u)return!r&&-1;var l,c=t(s,u);if(r&&o!=o){for(;u>c;)if((l=a[c++])!=l)return!0}else for(;u>c;c++)if((r||c in a)&&a[c]===o)return r||c||0;return!r&&-1}};return tn={includes:r(!0),indexOf:r(!1)}}().indexOf,i=jt(),o=e([].push);return rn=function(e,s){var a,u=n(e),l=0,c=[];for(a in u)!t(i,a)&&t(u,a)&&o(c,a);for(;s.length>l;)t(u,a=s[l++])&&(~r(c,a)||o(c,a));return c},rn}function hn(){return an?sn:(an=1,sn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}var vn,gn,mn,yn,bn,wn,Sn,xn,En,kn,Pn,Cn,Tn,In,Fn,Ln,Rn,On,Mn,An,Dn,qn,$n,Nn,Hn,jn,Un,Vn,zn,Bn={};function Wn(){if(mn)return gn;mn=1;var e=ve(),t=le(),n=function(){if(un)return ln;un=1;var e=_n(),t=hn().concat("length","prototype");return ln.f=Object.getOwnPropertyNames||function(n){return e(n,t)},ln}(),r=(vn||(vn=1,Bn.f=Object.getOwnPropertySymbols),Bn),i=yt(),o=t([].concat);return gn=e("Reflect","ownKeys")||function(e){var t=n.f(i(e)),s=r.f;return s?o(t,s(e)):t}}function Gn(){if(bn)return yn;bn=1;var e=nt(),t=Wn(),n=lt(),r=bt();return yn=function(i,o,s){for(var a=t(o),u=r.f,l=n.f,c=0;c<a.length;c++){var d=a[c];e(i,d)||s&&e(s,d)||u(i,d,l(o,d))}},yn}function Zn(){if(En)return xn;En=1;var e=i(),t=lt().f,n=wt(),r=zt(),o=Je(),s=Gn(),a=function(){if(Sn)return wn;Sn=1;var e=_(),t=_e(),n=/#|\.prototype\./,r=function(n,r){var u=o[i(n)];return u===a||u!==s&&(t(r)?e(r):!!r)},i=r.normalize=function(e){return String(e).replace(n,".").toLowerCase()},o=r.data={},s=r.NATIVE="N",a=r.POLYFILL="P";return wn=r}();return xn=function(i,u){var l,c,d,f,p,_=i.target,h=i.global,v=i.stat;if(l=h?e:v?e[_]||o(_,{}):e[_]&&e[_].prototype)for(c in u){if(f=u[c],d=i.dontCallGetSet?(p=t(l,c))&&p.value:l[c],!a(h?c:_+(v?".":"#")+c,i.forced)&&void 0!==d){if(typeof f==typeof d)continue;s(f,d)}(i.sham||d&&d.sham)&&n(f,"sham",!0),r(l,c,f,i)}}}function Yn(){if(Tn)return Cn;Tn=1;var e=nt(),t=_e(),n=tt(),r=Ht(),i=function(){if(Pn)return kn;Pn=1;var e=_();return kn=!e((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),kn}(),o=r("IE_PROTO"),s=Object,a=s.prototype;return Cn=i?s.getPrototypeOf:function(r){var i=n(r);if(e(i,o))return i[o];var u=i.constructor;return t(u)&&i instanceof u?u.prototype:i instanceof s?a:null},Cn}function Qn(){if(Fn)return In;Fn=1;var e=_n(),t=hn();return In=Object.keys||function(n){return e(n,t)},In}function Xn(){if(On)return r;On=1;var $=Zn(),e=function(){if(Rn)return Ln;Rn=1;var e=h(),t=_(),n=le(),r=Yn(),i=Qn(),o=pe(),s=n(ae().f),a=n([].push),u=e&&t((function(){var e=Object.create(null);return e[2]=2,!s(e,2)})),l=function(t){return function(n){for(var l,c=o(n),d=i(c),f=u&&null===r(c),p=d.length,_=0,h=[];p>_;)l=d[_++],e&&!(f?l in c:s(c,l))||a(h,t?[l,c[l]]:c[l]);return h}};return Ln={entries:l(!0),values:l(!1)}}().entries;return $({target:"Object",stat:!0},{entries:function(t){return e(t)}}),r}function Jn(){if(An)return Mn;An=1;var e=i();return Mn=e}function Kn(){if(Nn)return $n;Nn=1;var e=function(){if(qn)return Dn;qn=1,Xn();var e=Jn();return Dn=e.Object.entries}();return $n=e}function er(){if(Vn)return Un;Vn=1;var e=function(){if(jn)return Hn;jn=1;var e=Kn();return Hn=e}();return Un=e}zn||(zn=1,er());var tr,nr,rr,ir,or,sr,ar,ur,lr,cr,dr,fr,pr,_r,hr,vr,gr,mr,yr,br,wr,Sr,xr,Er,kr,Pr,Cr,Tr,Ir,Fr={};function Lr(){if(rr)return nr;rr=1;var e=ve();return nr=e("document","documentElement")}function Rr(){if(or)return ir;or=1;var e,t=yt(),n=function(){if(tr)return Fr;tr=1;var e=h(),t=mt(),n=bt(),r=yt(),i=pe(),o=Qn();return Fr.f=e&&!t?Object.defineProperties:function(e,t){r(e);for(var s,a=i(t),u=o(t),l=u.length,c=0;l>c;)n.f(e,s=u[c++],a[s]);return e},Fr}(),r=hn(),i=jt(),o=Lr(),s=at(),a=Ht(),u="prototype",l="script",c=a("IE_PROTO"),d=function(){},f=function(e){return"<"+l+">"+e+"</"+l+">"},p=function(e){e.write(f("")),e.close();var t=e.parentWindow.Object;return e=null,t},_=function(){try{e=new ActiveXObject("htmlfile")}catch(e){}var t,n,i;_="undefined"!=typeof document?document.domain&&e?p(e):(n=s("iframe"),i="java"+l+":",n.style.display="none",o.appendChild(n),n.src=String(i),(t=n.contentWindow.document).open(),t.write(f("document.F=Object")),t.close(),t.F):p(e);for(var a=r.length;a--;)delete _[u][r[a]];return _()};return i[c]=!0,ir=Object.create||function(e,r){var i;return null!==e?(d[u]=t(e),i=new d,d[u]=null,i[c]=e):i=_(),void 0===r?i:n.f(i,r)},ir}function Or(){if(ar)return sr;ar=1;var e=it(),t=Rr(),n=bt().f,r=e("unscopables"),i=Array.prototype;return void 0===i[r]&&n(i,r,{configurable:!0,value:t(null)}),sr=function(e){i[r][e]=!0}}function Mr(){return lr?ur:(lr=1,ur={})}function Ar(){if(dr)return cr;dr=1;var e,t,n,r=_(),i=_e(),o=he(),s=Rr(),a=Yn(),u=zt(),l=it(),c=Xe(),d=l("iterator"),f=!1;return[].keys&&("next"in(n=[].keys())?(t=a(a(n)))!==Object.prototype&&(e=t):f=!0),!o(e)||r((function(){var t={};return e[d].call(t)!==t}))?e={}:c&&(e=s(e)),i(e[d])||u(e,d,(function(){return this})),cr={IteratorPrototype:e,BUGGY_SAFARI_ITERATORS:f}}function Dr(){if(pr)return fr;pr=1;var e=bt().f,t=nt(),n=it()("toStringTag");return fr=function(r,i,o){r&&!o&&(r=r.prototype),r&&!t(r,n)&&e(r,n,{configurable:!0,value:i})}}function qr(){if(yr)return mr;yr=1;var e=he();return mr=function(t){return e(t)||null===t}}function $r(){if(wr)return br;wr=1;var e=qr(),t=String,n=TypeError;return br=function(r){if(e(r))return r;throw new n("Can't set "+t(r)+" as a prototype")}}function Nr(){if(xr)return Sr;xr=1;var e=function(){if(gr)return vr;gr=1;var e=le(),t=xe();return vr=function(n,r,i){try{return e(t(Object.getOwnPropertyDescriptor(n,r)[i]))}catch(e){}}}(),t=he(),n=fe(),r=$r();return Sr=Object.setPrototypeOf||("__proto__"in{}?function(){var i,o=!1,s={};try{(i=e(Object.prototype,"__proto__","set"))(s,[]),o=s instanceof Array}catch(e){}return function(e,s){return n(e),r(s),t(e)?(o?i(e,s):e.__proto__=s,e):e}}():void 0),Sr}function Hr(){if(kr)return Er;kr=1;var $=Zn(),e=g(),t=Xe(),n=$t(),r=_e(),i=function(){if(hr)return _r;hr=1;var e=Ar().IteratorPrototype,t=Rr(),n=ue(),r=Dr(),i=Mr(),o=function(){return this};return _r=function(s,a,u,l){var c=a+" Iterator";return s.prototype=t(e,{next:n(+!l,u)}),r(s,c,!1,!0),i[c]=o,s},_r}(),o=Yn(),s=Nr(),a=Dr(),u=wt(),l=zt(),c=it(),d=Mr(),f=Ar(),p=n.PROPER,_=n.CONFIGURABLE,h=f.IteratorPrototype,v=f.BUGGY_SAFARI_ITERATORS,m=c("iterator"),y="keys",b="values",w="entries",S=function(){return this};return Er=function(n,c,f,g,x,E,k){i(f,c,g);var P,C,T,I=function(e){if(e===x&&M)return M;if(!v&&e&&e in R)return R[e];switch(e){case y:case b:case w:return function(){return new f(this,e)}}return function(){return new f(this)}},F=c+" Iterator",L=!1,R=n.prototype,O=R[m]||R["@@iterator"]||x&&R[x],M=!v&&O||I(x),A="Array"===c&&R.entries||O;if(A&&(P=o(A.call(new n)))!==Object.prototype&&P.next&&(t||o(P)===h||(s?s(P,h):r(P[m])||l(P,m,S)),a(P,F,!0,!0),t&&(d[F]=S)),p&&x===b&&O&&O.name!==b&&(!t&&_?u(R,"name",b):(L=!0,M=function(){return e(O,this)})),x)if(C={values:I(b),keys:E?M:I(y),entries:I(w)},k)for(T in C)(v||L||!(T in R))&&l(R,T,C[T]);else $({target:c,proto:!0,forced:v||L},C);return t&&!k||R[m]===M||l(R,m,M,{name:x}),d[c]=M,C},Er}function jr(){return Cr?Pr:(Cr=1,Pr=function(e,t){return{value:e,done:t}})}function Ur(){if(Ir)return Tr;Ir=1;var e=pe(),t=Or(),n=Mr(),r=Ut(),i=bt().f,o=Hr(),s=jr(),a=Xe(),u=h(),l="Array Iterator",c=r.set,d=r.getterFor(l);Tr=o(Array,"Array",(function(t,n){c(this,{type:l,target:e(t),index:0,kind:n})}),(function(){var e=d(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,s(void 0,!0);switch(e.kind){case"keys":return s(n,!1);case"values":return s(t[n],!1)}return s([n,t[n]],!1)}),"values");var f=n.Arguments=n.Array;if(t("keys"),t("values"),t("entries"),!a&&u&&"values"!==f.name)try{i(f,"name",{value:"values"})}catch(e){}return Tr}var Vr,zr,Br,Wr,Gr,Zr,Yr,Qr,Xr,Jr,Kr,ei,ti,ni,ri,ii,oi,si,ai,ui,li,ci,di,fi={};function pi(){if(Wr)return Br;Wr=1;var e=function(){if(zr)return Vr;zr=1;var e=ce(),t=le();return Vr=function(n){if("Function"===e(n))return t(n)}}(),t=xe(),n=v(),r=e(e.bind);return Br=function(e,i){return t(e),void 0===i?e:n?r(e,i):function(){return e.apply(i,arguments)}},Br}function _i(){if(Zr)return Gr;Zr=1;var e=it(),t=Mr(),n=e("iterator"),r=Array.prototype;return Gr=function(e){return void 0!==e&&(t.Array===e||r[n]===e)}}function hi(){if(Jr)return Xr;Jr=1;var e=function(){if(Qr)return Yr;Qr=1;var e={};return e[it()("toStringTag")]="z",Yr="[object z]"===String(e)}(),t=_e(),n=ce(),r=it()("toStringTag"),i=Object,o="Arguments"===n(function(){return arguments}());return Xr=e?n:function(e){var s,a,u;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(a=function(e,t){try{return e[t]}catch(e){}}(s=i(e),r))?a:o?n(s):"Object"===(u=n(s))&&t(s.callee)?"Arguments":u},Xr}function vi(){if(ei)return Kr;ei=1;var e=hi(),t=Ee(),n=de(),r=Mr(),i=it()("iterator");return Kr=function(o){if(!n(o))return t(o,i)||t(o,"@@iterator")||r[e(o)]}}function gi(){if(ni)return ti;ni=1;var e=g(),t=xe(),n=yt(),r=Se(),i=vi(),o=TypeError;return ti=function(s,a){var u=arguments.length<2?i(s):a;if(t(u))return n(e(u,s));throw new o(r(s)+" is not iterable")},ti}function mi(){if(ii)return ri;ii=1;var e=g(),t=yt(),n=Ee();return ri=function(r,i,o){var s,a;t(r);try{if(!(s=n(r,"return"))){if("throw"===i)throw o;return o}s=e(s,r)}catch(e){a=!0,s=e}if("throw"===i)throw o;if(a)throw s;return t(s),o}}function yi(){if(si)return oi;si=1;var e=pi(),t=g(),n=yt(),r=Se(),i=_i(),o=pn(),s=ge(),a=gi(),u=vi(),l=mi(),c=TypeError,d=function(e,t){this.stopped=e,this.result=t},f=d.prototype;return oi=function(p,_,h){var v,g,m,y,b,w,S,x=h&&h.that,E=!(!h||!h.AS_ENTRIES),k=!(!h||!h.IS_RECORD),P=!(!h||!h.IS_ITERATOR),C=!(!h||!h.INTERRUPTED),T=e(_,x),I=function(e){return v&&l(v,"normal",e),new d(!0,e)},F=function(e){return E?(n(e),C?T(e[0],e[1],I):T(e[0],e[1])):C?T(e,I):T(e)};if(k)v=p.iterator;else if(P)v=p;else{if(!(g=u(p)))throw new c(r(p)+" is not iterable");if(i(g)){for(m=0,y=o(p);y>m;m++)if((b=F(p[m]))&&s(f,b))return b;return new d(!1)}v=a(p,g)}for(w=k?p.next:v.next;!(S=t(w,v)).done;){try{b=F(S.value)}catch(e){l(v,"throw",e)}if("object"==typeof b&&b&&s(f,b))return b}return new d(!1)}}function bi(){if(ui)return ai;ui=1;var e=h(),t=bt(),n=ue();return ai=function(r,i,o){e?t.f(r,i,n(0,o)):r[i]=o}}function wi(){if(di)return ci;di=1,Ur(),function(){if(li)return fi;li=1;var $=Zn(),e=yi(),t=bi();$({target:"Object",stat:!0},{fromEntries:function(n){var r={};return e(n,(function(e,n){t(r,e,n)}),{AS_ENTRIES:!0}),r}})}();var e=Jn();return ci=e.Object.fromEntries}var Si,xi,Ei,ki,Pi,Ci,Ti,Ii,Fi,Li,Ri,Oi,Mi={};function Ai(){if(Pi)return Mi;Pi=1;var e=i(),t=xi?Si:(xi=1,Si={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),n=function(){if(ki)return Ei;ki=1;var e=at()("span").classList,t=e&&e.constructor&&e.constructor.prototype;return Ei=t===Object.prototype?void 0:t}(),r=Ur(),o=wt(),s=Dr(),a=it()("iterator"),u=r.values,l=function(e,n){if(e){if(e[a]!==u)try{o(e,a,u)}catch(t){e[a]=u}if(s(e,n,!0),t[n])for(var i in r)if(e[i]!==r[i])try{o(e,i,r[i])}catch(t){e[i]=r[i]}}};for(var c in t)l(e[c]&&e[c].prototype,c);return l(n,"DOMTokenList"),Mi}function Di(){if(Fi)return Ii;Fi=1;var e=function(){if(Ti)return Ci;Ti=1;var e=wi();return Ai(),Ci=e}();return Ii=e}function qi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function $i(e,t,n,r,i,o,s){try{var a=e[o](s),u=a.value}catch(e){return void n(e)}a.done?t(u):Promise.resolve(u).then(r,i)}function Ni(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){$i(o,r,i,s,a,"next",e)}function a(e){$i(o,r,i,s,a,"throw",e)}s(void 0)}))}}function Hi(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Wi(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ji(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return qi(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qi(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ui(){return Ui=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ui.apply(null,arguments)}function Vi(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}function zi(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var u=r&&r.prototype instanceof a?r:a,l=Object.create(u.prototype);return Bi(l,"_invoke",function(n,r,i){var o,a,u,l=0,c=i||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return o=t,a=0,u=e,f.n=n,s}};function p(n,r){for(a=n,u=r,t=0;!d&&l&&!i&&t<c.length;t++){var i,o=c[t],p=f.p,_=o[2];n>3?(i=_===r)&&(u=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=e):o[0]<=p&&((i=n<2&&p<o[1])?(a=0,f.v=r,f.n=o[1]):p<_&&(i=n<3||o[0]>r||r>_)&&(o[4]=n,o[5]=r,f.n=_,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,_){if(l>1)throw TypeError("Generator is already running");for(d&&1===c&&p(c,_),a=c,u=_;(t=a<2?e:u)||!d;){o||(a?a<3?(a>1&&(f.n=-1),p(a,u)):f.n=u:f.v=u);try{if(l=2,o){if(a||(i="next"),t=o[i]){if(!(t=t.call(o,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,a<2&&(a=0)}else 1===a&&(t=o.return)&&t.call(o),a<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=e}else if((t=(d=f.n<0)?u:n.call(r,f))!==s)break}catch(t){o=e,a=1,u=t}finally{l=1}}return{value:t,done:d}}}(n,i,o),!0),l}var s={};function a(){}function u(){}function l(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(Bi(t={},r,(function(){return this})),t),d=l.prototype=a.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,Bi(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return u.prototype=l,Bi(d,"constructor",l),Bi(l,"constructor",u),u.displayName="GeneratorFunction",Bi(l,i,"GeneratorFunction"),Bi(d),Bi(d,i,"Generator"),Bi(d,r,(function(){return this})),Bi(d,"toString",(function(){return"[object Generator]"})),(zi=function(){return{w:o,m:f}})()}function Bi(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}Bi=function(e,t,n,r){function o(t,n){Bi(e,t,(function(e){return this._invoke(t,n,e)}))}t?i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(o("next",0),o("throw",1),o("return",2))},Bi(e,t,n,r)}function Wi(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}Oi||(Oi=1,function(){if(Ri)return Li;Ri=1;var e=Di();Li=e}());var Gi,Zi,Yi,Qi,Xi,Ji,Ki,eo,to={},no=[],ro=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,io=Array.isArray;function oo(e,t){for(var n in t)e[n]=t[n];return e}function so(e){var t=e.parentNode;t&&t.removeChild(e)}function ao(e,t,n){var r,i,o,s={};for(o in t)"key"==o?r=t[o]:"ref"==o?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?Gi.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===s[o]&&(s[o]=e.defaultProps[o]);return uo(e,s,r,i,null)}function uo(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==i?++Yi:i,__i:-1,__u:0};return null==i&&null!=Zi.vnode&&Zi.vnode(o),o}function lo(e){return e.children}function co(e,t){this.props=e,this.context=t}function fo(e,t){if(null==t)return e.__?fo(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?fo(e):null}function po(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return po(e)}}function _o(e){(!e.__d&&(e.__d=!0)&&Qi.push(e)&&!ho.__r++||Xi!==Zi.debounceRendering)&&((Xi=Zi.debounceRendering)||Ji)(ho)}function ho(){var e,t,n,r,i,o,s,a,u;for(Qi.sort(Ki);e=Qi.shift();)e.__d&&(t=Qi.length,r=void 0,o=(i=(n=e).__v).__e,a=[],u=[],(s=n.__P)&&((r=oo({},i)).__v=i.__v+1,Zi.vnode&&Zi.vnode(r),xo(s,r,i,n.__n,void 0!==s.ownerSVGElement,32&i.__u?[o]:null,a,null==o?fo(i):o,!!(32&i.__u),u),r.__.__k[r.__i]=r,Eo(a,r,u),r.__e!=o&&po(r)),Qi.length>t&&Qi.sort(Ki));ho.__r=0}function vo(e,t,n,r,i,o,s,a,u,l,c){var d,f,p,_,h,v=r&&r.__k||no,g=t.length;for(n.__d=u,function(e,t,n){var r,i,o,s,a,u=t.length,l=n.length,c=l,d=0;for(e.__k=[],r=0;r<u;r++)null!=(i=e.__k[r]=null==(i=t[r])||"boolean"==typeof i||"function"==typeof i?null:"string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?uo(null,i,null,null,i):io(i)?uo(lo,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?uo(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=e,i.__b=e.__b+1,a=mo(i,n,s=r+d,c),i.__i=a,o=null,-1!==a&&(c--,(o=n[a])&&(o.__u|=131072)),null==o||null===o.__v?(-1==a&&d--,"function"!=typeof i.type&&(i.__u|=65536)):a!==s&&(a===s+1?d++:a>s?c>u-s?d+=a-s:d--:d=a<s&&a==s-1?a-s:0,a!==r+d&&(i.__u|=65536))):(o=n[r])&&null==o.key&&o.__e&&(o.__e==e.__d&&(e.__d=fo(o)),Co(o,o,!1),n[r]=null,c--);if(c)for(r=0;r<l;r++)null!=(o=n[r])&&0==(131072&o.__u)&&(o.__e==e.__d&&(e.__d=fo(o)),Co(o,o))}(n,t,v),u=n.__d,d=0;d<g;d++)null!=(p=n.__k[d])&&"boolean"!=typeof p&&"function"!=typeof p&&(f=-1===p.__i?to:v[p.__i]||to,p.__i=d,xo(e,p,f,i,o,s,a,u,l,c),_=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&Po(f.ref,null,p),c.push(p.ref,p.__c||_,p)),null==h&&null!=_&&(h=_),65536&p.__u||f.__k===p.__k?u=go(p,u,e):"function"==typeof p.type&&void 0!==p.__d?u=p.__d:_&&(u=_.nextSibling),p.__d=void 0,p.__u&=-196609);n.__d=u,n.__e=h}function go(e,t,n){var r,i;if("function"==typeof e.type){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,t=go(r[i],t,n));return t}return e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e),t&&t.nextSibling}function mo(e,t,n,r){var i=e.key,o=e.type,s=n-1,a=n+1,u=t[n];if(null===u||u&&i==u.key&&o===u.type)return n;if(r>(null!=u&&0==(131072&u.__u)?1:0))for(;s>=0||a<t.length;){if(s>=0){if((u=t[s])&&0==(131072&u.__u)&&i==u.key&&o===u.type)return s;s--}if(a<t.length){if((u=t[a])&&0==(131072&u.__u)&&i==u.key&&o===u.type)return a;a++}}return-1}function yo(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||ro.test(t)?n:n+"px"}function bo(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||yo(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||yo(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/(PointerCapture)$|Capture$/,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,o?So:wo,o)):e.removeEventListener(t,o?So:wo,o);else{if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&"rowSpan"!==t&&"colSpan"!==t&&"role"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function wo(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(Zi.event?Zi.event(e):e)}function So(e){return this.l[e.type+!0](Zi.event?Zi.event(e):e)}function xo(e,t,n,r,i,o,s,a,u,l){var c,d,f,p,_,h,v,g,m,y,b,$,w,S,x,E=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(u=!!(32&n.__u),o=[a=t.__e=n.__e]),(c=Zi.__b)&&c(t);e:if("function"==typeof E)try{if(g=t.props,m=(c=E.contextType)&&r[c.__c],y=c?m?m.props.value:c.__:r,n.__c?v=(d=t.__c=n.__c).__=d.__E:("prototype"in E&&E.prototype.render?t.__c=d=new E(g,y):(t.__c=d=new co(g,y),d.constructor=E,d.render=To),m&&m.sub(d),d.props=g,d.state||(d.state={}),d.context=y,d.__n=r,f=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=E.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=oo({},d.__s)),oo(d.__s,E.getDerivedStateFromProps(g,d.__s))),p=d.props,_=d.state,d.__v=t,f)null==E.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==E.getDerivedStateFromProps&&g!==p&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(g,y),!d.__e&&(null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(g,d.__s,y)||t.__v===n.__v)){for(t.__v!==n.__v&&(d.props=g,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),b=0;b<d._sb.length;b++)d.__h.push(d._sb[b]);d._sb=[],d.__h.length&&s.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(g,d.__s,y),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(p,_,h)}))}if(d.context=y,d.props=g,d.__P=e,d.__e=!1,$=Zi.__r,w=0,"prototype"in E&&E.prototype.render){for(d.state=d.__s,d.__d=!1,$&&$(t),c=d.render(d.props,d.state,d.context),S=0;S<d._sb.length;S++)d.__h.push(d._sb[S]);d._sb=[]}else do{d.__d=!1,$&&$(t),c=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++w<25);d.state=d.__s,null!=d.getChildContext&&(r=oo(oo({},r),d.getChildContext())),f||null==d.getSnapshotBeforeUpdate||(h=d.getSnapshotBeforeUpdate(p,_)),vo(e,io(x=null!=c&&c.type===lo&&null==c.key?c.props.children:c)?x:[x],t,n,r,i,o,s,a,u,l),d.base=t.__e,t.__u&=-161,d.__h.length&&s.push(d),v&&(d.__E=d.__=null)}catch(e){t.__v=null,u||null!=o?(t.__e=a,t.__u|=u?160:32,o[o.indexOf(a)]=null):(t.__e=n.__e,t.__k=n.__k),Zi.__e(e,t,n)}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=ko(n.__e,t,n,r,i,o,s,u,l);(c=Zi.diffed)&&c(t)}function Eo(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)Po(n[r],n[++r],n[++r]);Zi.__c&&Zi.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){Zi.__e(e,t.__v)}}))}function ko(e,t,n,r,i,o,s,a,u){var l,c,d,f,p,_,h,v=n.props,g=t.props,m=t.type;if("svg"===m&&(i=!0),null!=o)for(l=0;l<o.length;l++)if((p=o[l])&&"setAttribute"in p==!!m&&(m?p.localName===m:3===p.nodeType)){e=p,o[l]=null;break}if(null==e){if(null===m)return document.createTextNode(g);e=i?document.createElementNS("http://www.w3.org/2000/svg",m):document.createElement(m,g.is&&g),o=null,a=!1}if(null===m)v===g||a&&e.data===g||(e.data=g);else{if(o=o&&Gi.call(e.childNodes),v=n.props||to,!a&&null!=o)for(v={},l=0;l<e.attributes.length;l++)v[(p=e.attributes[l]).name]=p.value;for(l in v)p=v[l],"children"==l||("dangerouslySetInnerHTML"==l?d=p:"key"===l||l in g||bo(e,l,null,p,i));for(l in g)p=g[l],"children"==l?f=p:"dangerouslySetInnerHTML"==l?c=p:"value"==l?_=p:"checked"==l?h=p:"key"===l||a&&"function"!=typeof p||v[l]===p||bo(e,l,p,v[l],i);if(c)a||d&&(c.__html===d.__html||c.__html===e.innerHTML)||(e.innerHTML=c.__html),t.__k=[];else if(d&&(e.innerHTML=""),vo(e,io(f)?f:[f],t,n,r,i&&"foreignObject"!==m,o,s,o?o[0]:n.__k&&fo(n,0),a,u),null!=o)for(l=o.length;l--;)null!=o[l]&&so(o[l]);a||(l="value",void 0!==_&&(_!==e[l]||"progress"===m&&!_||"option"===m&&_!==v[l])&&bo(e,l,_,v[l],!1),l="checked",void 0!==h&&h!==e[l]&&bo(e,l,h,v[l],!1))}return e}function Po(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){Zi.__e(e,n)}}function Co(e,t,n){var r,i;if(Zi.unmount&&Zi.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Po(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){Zi.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Co(r[i],t,n||"function"!=typeof e.type);n||null==e.__e||so(e.__e),e.__=e.__e=e.__d=void 0}function To(e,t,n){return this.constructor(e,n)}function Io(e,t,n){var r,i,o;Zi.__&&Zi.__(e,t),r=!1?null:t.__k,i=[],o=[],xo(t,e=t.__k=ao(lo,null,[e]),r||to,to,void 0!==t.ownerSVGElement,r?null:t.firstChild?Gi.call(t.childNodes):null,i,r?r.__e:t.firstChild,false,o),Eo(i,e,o)}function Fo(e,t,n){var r,i,o,s,a=oo({},e.props);for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)"key"==o?r=t[o]:"ref"==o?i=t[o]:a[o]=void 0===t[o]&&void 0!==s?s[o]:t[o];return arguments.length>2&&(a.children=arguments.length>3?Gi.call(arguments,2):n),uo(e.type,a,r||e.key,i||e.ref,null)}Gi=no.slice,Zi={__e:function(e,t,n,r){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(t){e=t}throw e}},Yi=0,co.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=oo({},this.state),"function"==typeof e&&(e=e(oo({},n),this.props)),e&&oo(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),_o(this))},co.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),_o(this))},co.prototype.render=lo,Qi=[],Ji="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ki=function(e,t){return e.__v.__b-t.__v.__b},ho.__r=0,eo=0;var Lo,Ro,Oo,Mo,Ao=0,Do=[],qo=[],$o=Zi.__b,No=Zi.__r,Ho=Zi.diffed,jo=Zi.__c,Uo=Zi.unmount;function Vo(e,t){Zi.__h&&Zi.__h(Ro,e,Ao||t),Ao=0;var n=Ro.__H||(Ro.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:qo}),n.__[e]}function zo(e){return Ao=1,function(e,t,n){var r=Vo(Lo++,2);if(r.t=e,!r.__c&&(r.__=[ts(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=Ro,!Ro.u)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter((function(e){return e.__c}));if(i.every((function(e){return!e.__N})))return!o||o.call(this,e,t,n);var s=!1;return i.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(s=!0)}})),!(!s&&r.__c.props===e)&&(!o||o.call(this,e,t,n))};Ro.u=!0;var o=Ro.shouldComponentUpdate,s=Ro.componentWillUpdate;Ro.componentWillUpdate=function(e,t,n){if(this.__e){var r=o;o=void 0,i(e,t,n),o=r}s&&s.call(this,e,t,n)},Ro.shouldComponentUpdate=i}return r.__N||r.__}(ts,e)}function Bo(e,t){var n=Vo(Lo++,3);!Zi.__s&&es(n.__H,t)&&(n.__=e,n.i=t,Ro.__H.__h.push(n))}function Wo(e){return Ao=5,Go((function(){return{current:e}}),[])}function Go(e,t){var n=Vo(Lo++,7);return es(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function Zo(e){var t=Ro.context[e.__c],n=Vo(Lo++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(Ro)),t.props.value):e.__}function Yo(){for(var e;e=Do.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Jo),e.__H.__h.forEach(Ko),e.__H.__h=[]}catch(t){e.__H.__h=[],Zi.__e(t,e.__v)}}Zi.__b=function(e){Ro=null,$o&&$o(e)},Zi.__r=function(e){No&&No(e),Lo=0;var t=(Ro=e.__c).__H;t&&(Oo===Ro?(t.__h=[],Ro.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=qo,e.__N=e.i=void 0}))):(t.__h.forEach(Jo),t.__h.forEach(Ko),t.__h=[],Lo=0)),Oo=Ro},Zi.diffed=function(e){Ho&&Ho(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==Do.push(t)&&Mo===Zi.requestAnimationFrame||((Mo=Zi.requestAnimationFrame)||Xo)(Yo)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==qo&&(e.__=e.__V),e.i=void 0,e.__V=qo}))),Oo=Ro=null},Zi.__c=function(e,t){t.some((function(e){try{e.__h.forEach(Jo),e.__h=e.__h.filter((function(e){return!e.__||Ko(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],Zi.__e(n,e.__v)}})),jo&&jo(e,t)},Zi.unmount=function(e){Uo&&Uo(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{Jo(e)}catch(e){t=e}})),n.__H=void 0,t&&Zi.__e(t,n.__v))};var Qo="function"==typeof requestAnimationFrame;function Xo(e){var t,n=function(){clearTimeout(r),Qo&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Qo&&(t=requestAnimationFrame(n))}function Jo(e){var t=Ro,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),Ro=t}function Ko(e){var t=Ro;e.__c=e.__(),Ro=t}function es(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function ts(e,t){return"function"==typeof t?t(e):t}var ns=function(e){return e.Activation="events",e.Cancellation="cancelEvents",e}({}),rs=function(e){return e.Button="button",e.Tab="tab",e.Selector="selector",e}({}),is=function(e){return e.TopLeft="top_left",e.TopRight="top_right",e.TopCenter="top_center",e.MiddleLeft="middle_left",e.MiddleRight="middle_right",e.MiddleCenter="middle_center",e.Left="left",e.Center="center",e.Right="right",e.NextToTrigger="next_to_trigger",e}({}),os=function(e){return e.Top="top",e.Left="left",e.Right="right",e.Bottom="bottom",e}({}),ss=function(e){return e.Popover="popover",e.API="api",e.Widget="widget",e.ExternalSurvey="external_survey",e}({}),as=function(e){return e.Open="open",e.MultipleChoice="multiple_choice",e.SingleChoice="single_choice",e.Rating="rating",e.Link="link",e}({}),us=function(e){return e.NextQuestion="next_question",e.End="end",e.ResponseBased="response_based",e.SpecificQuestion="specific_question",e}({}),ls=function(e){return e.Once="once",e.Recurring="recurring",e.Always="always",e}({}),cs=function(e){return e.SHOWN="survey shown",e.DISMISSED="survey dismissed",e.SENT="survey sent",e}({}),ds=function(e){return e.SURVEY_ID="$survey_id",e.SURVEY_NAME="$survey_name",e.SURVEY_RESPONSE="$survey_response",e.SURVEY_ITERATION="$survey_iteration",e.SURVEY_ITERATION_START_DATE="$survey_iteration_start_date",e.SURVEY_PARTIALLY_COMPLETED="$survey_partially_completed",e.SURVEY_SUBMISSION_ID="$survey_submission_id",e.SURVEY_QUESTIONS="$survey_questions",e.SURVEY_COMPLETED="$survey_completed",e}({}),fs=function(e){return e.Popover="popover",e.Inline="inline",e}({}),ps="undefined"!=typeof window?window:void 0,_s="undefined"!=typeof globalThis?globalThis:ps;"undefined"==typeof self&&(_s.self=_s),"undefined"==typeof File&&(_s.File=function(){});var hs=Array.prototype,vs=hs.forEach,gs=hs.indexOf,ms=null==_s?void 0:_s.navigator,ys=null==_s?void 0:_s.document,bs=null==_s?void 0:_s.location,ws=null==_s?void 0:_s.fetch,Ss=null!=_s&&_s.XMLHttpRequest&&"withCredentials"in new _s.XMLHttpRequest?_s.XMLHttpRequest:void 0,xs=null==_s?void 0:_s.AbortController,Es=null==ms?void 0:ms.userAgent,ks=null!=ps?ps:{},Ps={DEBUG:!1,LIB_VERSION:"1.307.2"},Cs=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],Ts=function(e,t){if(void 0===t&&(t=[]),!e)return!1;var n=e.toLowerCase();return Cs.concat(t).some((function(e){var t=e.toLowerCase();return-1!==n.indexOf(t)}))},Is=["$snapshot","$pageview","$pageleave","$set","survey dismissed","survey sent","survey shown","$identify","$groupidentify","$create_alias","$$client_ingestion_warning","$web_experiment_applied","$feature_enrollment_update","$feature_flag_called"];function Fs(e,t){return-1!==e.indexOf(t)}var Ls=function(e){return e.trim()},Rs=function(e){return e.replace(/^\$/,"")};var Os=Array.isArray,Ms=Object.prototype,As=Ms.hasOwnProperty,Ds=Ms.toString,qs=Os||function(e){return"[object Array]"===Ds.call(e)},$s=function(e){return"function"==typeof e},Ns=function(e){return e===Object(e)&&!qs(e)},Hs=function(e){if(Ns(e)){for(var t in e)if(As.call(e,t))return!1;return!0}return!1},js=function(e){return void 0===e},Us=function(e){return"[object String]"==Ds.call(e)},Vs=function(e){return Us(e)&&0===e.trim().length},zs=function(e){return null===e},Bs=function(e){return js(e)||zs(e)},Ws=function(e){return"[object Number]"==Ds.call(e)},Gs=function(e){return"[object Boolean]"===Ds.call(e)},Zs=function(e){return e instanceof FormData},Ys=function(e){return Fs(Is,e)};function Qs(e){return null===e||"object"!=typeof e}function Xs(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function Js(e){return!js(Event)&&function(e,t){try{return e instanceof t}catch(e){return!1}}(e,Event)}var Ks=[!0,"true",1,"1","yes"],ea=function(e){return Fs(Ks,e)},ta=[!1,"false",0,"0","no"];function na(e,t,n,r,i){return t>n&&(r.warn("min cannot be greater than max."),t=n),Ws(e)?e>n?(r.warn(" cannot be greater than max: "+n+". Using max value instead."),n):e<t?(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: "+n+", fallback: "+i),na(i||n,t,n,r))}var ra,ia,oa,sa=function(){function e(e){this._buckets={},this._onBucketRateLimited=e._onBucketRateLimited,this._bucketSize=na(e.bucketSize,0,100,e._logger),this._refillRate=na(e.refillRate,0,this._bucketSize,e._logger),this._refillInterval=na(e.refillInterval,0,864e5,e._logger)}var t=e.prototype;return t._applyRefill=function(e,t){var n=t-e.lastAccess,r=Math.floor(n/this._refillInterval);if(r>0){var i=r*this._refillRate;e.tokens=Math.min(e.tokens+i,this._bucketSize),e.lastAccess=e.lastAccess+r*this._refillInterval}},t.consumeRateLimit=function(e){var t,n=Date.now(),r=String(e),i=this._buckets[r];return i?this._applyRefill(i,n):(i={tokens:this._bucketSize,lastAccess:n},this._buckets[r]=i),0===i.tokens||(i.tokens--,0===i.tokens&&(null==(t=this._onBucketRateLimited)||t.call(this,e)),0===i.tokens)},t.stop=function(){this._buckets={}},e}(),aa=function(e){return e instanceof Error};function ua(e){var t=globalThis._posthogChunkIds;if(t){var n=Object.keys(t);return oa&&n.length===ia||(ia=n.length,oa=n.reduce((function(n,r){ra||(ra={});var i=ra[r];if(i)n[i[0]]=i[1];else for(var o=e(r),s=o.length-1;s>=0;s--){var a=o[s],u=null==a?void 0:a.filename,l=t[r];if(u&&l){n[u]=l,ra[r]=[u,l];break}}return n}),{})),oa}}var la=function(){function e(e,t,n){void 0===n&&(n=[]),this.coercers=e,this.stackParser=t,this.modifiers=n}var t=e.prototype;return t.buildFromUnknown=function(e,t){void 0===t&&(t={});var n=t&&t.mechanism||{handled:!0,type:"generic"},r=this.buildCoercingContext(n,t,0).apply(e),i=this.buildParsingContext(),o=this.parseStacktrace(r,i);return{$exception_list:this.convertToExceptionList(o,n),$exception_level:"error"}},t.modifyFrames=function(){var e=Ni(zi().m((function e(t){var n,r,i;return zi().w((function(e){for(;;)switch(e.n){case 0:n=ji(t);case 1:if((r=n()).done){e.n=4;break}if(!((i=r.value).stacktrace&&i.stacktrace.frames&&qs(i.stacktrace.frames))){e.n=3;break}return e.n=2,this.applyModifiers(i.stacktrace.frames);case 2:i.stacktrace.frames=e.v;case 3:e.n=1;break;case 4:return e.a(2,t)}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),t.coerceFallback=function(e){var t;return{type:"Error",value:"Unknown error",stack:null==(t=e.syntheticException)?void 0:t.stack,synthetic:!0}},t.parseStacktrace=function(e,t){var n,r;return null!=e.cause&&(n=this.parseStacktrace(e.cause,t)),""!=e.stack&&null!=e.stack&&(r=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?1:0),t.chunkIdMap)),Ui({},e,{cause:n,stack:r})},t.applyChunkIds=function(e,t){return e.map((function(e){return e.filename&&t&&(e.chunk_id=t[e.filename]),e}))},t.applyCoercers=function(e,t){for(var n,r=ji(this.coercers);!(n=r()).done;){var i=n.value;if(i.match(e))return i.coerce(e,t)}return this.coerceFallback(t)},t.applyModifiers=function(){var e=Ni(zi().m((function e(t){var n,r,i,o;return zi().w((function(e){for(;;)switch(e.n){case 0:n=t,r=ji(this.modifiers);case 1:if((i=r()).done){e.n=4;break}return o=i.value,e.n=2,o(n);case 2:n=e.v;case 3:e.n=1;break;case 4:return e.a(2,n)}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),t.convertToExceptionList=function(e,t){var n,r,i,o={type:e.type,value:e.value,mechanism:{type:null!==(n=t.type)&&void 0!==n?n:"generic",handled:null===(r=t.handled)||void 0===r||r,synthetic:null!==(i=e.synthetic)&&void 0!==i&&i}};e.stack&&(o.stacktrace={type:"raw",frames:e.stack});var s=[o];return null!=e.cause&&s.push.apply(s,this.convertToExceptionList(e.cause,Ui({},t,{handled:!0}))),s},t.buildParsingContext=function(){return{chunkIdMap:ua(this.stackParser)}},t.buildCoercingContext=function(e,t,n){var r=this;void 0===n&&(n=0);var i=function(n,i){if(i<=4){var o=r.buildCoercingContext(e,t,i);return r.applyCoercers(n,o)}};return Ui({},t,{syntheticException:0==n?t.syntheticException:void 0,mechanism:e,apply:function(e){return i(e,n)},next:function(e){return i(e,n+1)}})},e}(),ca="?";function da(e,t,n,r,i){var o={platform:e,filename:t,function:"<anonymous>"===n?ca:n,in_app:!0};return js(r)||(o.lineno=r),js(i)||(o.colno=i),o}var fa=function(e,t){var n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:ca,n?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},pa=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,_a=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ha=/\((\S*)(?::(\d+))(?::(\d+))\)/,va=function(e,t){var n=pa.exec(e);if(n){var r=n[1],i=n[2],o=n[3];return da(t,r,ca,+i,+o)}var s=_a.exec(e);if(s){if(s[2]&&0===s[2].indexOf("eval")){var a=ha.exec(s[2]);a&&(s[2]=a[1],s[3]=a[2],s[4]=a[3])}var u=fa(s[1]||ca,s[2]),l=u[0];return da(t,u[1],l,s[3]?+s[3]:void 0,s[4]?+s[4]:void 0)}},ga=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ma=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,ya=function(e,t){var n=ga.exec(e);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){var r=ma.exec(n[3]);r&&(n[1]=n[1]||"eval",n[3]=r[1],n[4]=r[2],n[5]="")}var i=n[3],o=n[1]||ca,s=fa(o,i);return o=s[0],da(t,i=s[1],o,n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}},ba=/\(error: (.*)\)/,wa=50;function Sa(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return function(t,r){void 0===r&&(r=0);for(var i=[],o=t.split("\n"),s=r;s<o.length;s++){var a=o[s];if(!(a.length>1024)){var u=ba.test(a)?a.replace(ba,"$1"):a;if(!u.match(/\S*Error: /)){for(var l=0,c=n;l<c.length;l++){var d=(0,c[l])(u,e);if(d){i.push(d);break}}if(i.length>=wa)break}}}return function(e){if(!e.length)return[];var t=Array.from(e);return t.reverse(),t.slice(0,wa).map((function(e){return Ui({},e,{filename:e.filename||(n=t,n[n.length-1]||{}).filename,function:e.function||ca});var n}))}(i)}}var xa=function(){function e(){}var t=e.prototype;return t.match=function(e){return this.isDOMException(e)||this.isDOMError(e)},t.coerce=function(e,t){var n=Us(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:n?e.stack:void 0,cause:e.cause?t.next(e.cause):void 0,synthetic:!1}},t.getType=function(e){return this.isDOMError(e)?"DOMError":"DOMException"},t.getValue=function(e){var t=e.name||(this.isDOMError(e)?"DOMError":"DOMException");return e.message?t+": "+e.message:t},t.isDOMException=function(e){return Xs(e,"DOMException")},t.isDOMError=function(e){return Xs(e,"DOMError")},e}(),Ea=function(){function e(){}var t=e.prototype;return t.match=function(e){return function(e){return e instanceof Error}(e)},t.coerce=function(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}},t.getType=function(e){return e.name||e.constructor.name},t.getMessage=function(e,t){var n=e.message;return n.error&&"string"==typeof n.error.message?String(n.error.message):String(n)},t.getStack=function(e){return e.stacktrace||e.stack||void 0},e}(),ka=function(){function e(){}var t=e.prototype;return t.match=function(e){return Xs(e,"ErrorEvent")&&null!=e.error},t.coerce=function(e,t){var n,r=t.apply(e.error);return r||{type:"ErrorEvent",value:e.message,stack:null==(n=t.syntheticException)?void 0:n.stack,synthetic:!0}},e}(),Pa=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,Ca=function(){function e(){}var t=e.prototype;return t.match=function(e){return"string"==typeof e},t.coerce=function(e,t){var n,r=this.getInfos(e),i=r[0],o=r[1];return{type:null!=i?i:"Error",value:null!=o?o:e,stack:null==(n=t.syntheticException)?void 0:n.stack,synthetic:!0}},t.getInfos=function(e){var t="Error",n=e,r=e.match(Pa);return r&&(t=r[1],n=r[2]),[t,n]},e}(),Ta=["fatal","error","warning","log","info","debug"];function Ia(e,t){void 0===t&&(t=40);var n=Object.keys(e);if(n.sort(),!n.length)return"[object has no keys]";for(var r=n.length;r>0;r--){var i=n.slice(0,r).join(", ");if(!(i.length>t))return r===n.length||i.length<=t?i:i.slice(0,t)+"..."}return""}var Fa=function(){function e(){}var t=e.prototype;return t.match=function(e){return"object"==typeof e&&null!==e},t.coerce=function(e,t){var n,r=this.getErrorPropertyFromObject(e);return r?t.apply(r):{type:this.getType(e),value:this.getValue(e),stack:null==(n=t.syntheticException)?void 0:n.stack,level:this.isSeverityLevel(e.level)?e.level:"error",synthetic:!0}},t.getType=function(e){return Js(e)?e.constructor.name:"Error"},t.getValue=function(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 n=this.getObjectClassName(e);return(n&&"Object"!==n?"'"+n+"'":"Object")+" captured as exception with keys: "+Ia(e)},t.isSeverityLevel=function(e){return Us(e)&&!Vs(e)&&Ta.indexOf(e)>=0},t.getErrorPropertyFromObject=function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var n=e[t];if(aa(n))return n}},t.getObjectClassName=function(e){try{var t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){return}},e}(),La=function(){function e(){}var t=e.prototype;return t.match=function(e){return Js(e)},t.coerce=function(e,t){var n,r=e.constructor.name;return{type:r,value:r+" captured as exception with keys: "+Ia(e),stack:null==(n=t.syntheticException)?void 0:n.stack,synthetic:!0}},e}(),Ra=function(){function e(){}var t=e.prototype;return t.match=function(e){return Qs(e)},t.coerce=function(e,t){var n;return{type:"Error",value:"Primitive value captured as exception: "+String(e),stack:null==(n=t.syntheticException)?void 0:n.stack,synthetic:!0}},e}(),Oa=function(){function e(){}var t=e.prototype;return t.match=function(e){return Xs(e,"PromiseRejectionEvent")},t.coerce=function(e,t){var n,r=this.getUnhandledRejectionReason(e);return Qs(r)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(r),stack:null==(n=t.syntheticException)?void 0:n.stack,synthetic:!0}:t.apply(r)},t.getUnhandledRejectionReason=function(e){if(Qs(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch(e){}return e},e}(),Ma=function(e,t){var n=(void 0===t?{}:t).debugEnabled,r={_log:function(t){if(ps&&(Ps.DEBUG||ks.POSTHOG_DEBUG||n)&&!js(ps.console)&&ps.console){for(var r=("__rrweb_original__"in ps.console[t]?ps.console[t].__rrweb_original__:ps.console[t]),i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];r.apply(void 0,[e].concat(o))}},info:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r._log.apply(r,["log"].concat(t))},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r._log.apply(r,["warn"].concat(t))},error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r._log.apply(r,["error"].concat(t))},critical:function(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];(t=console).error.apply(t,[e].concat(r))},uninitializedWarning:function(e){r.error("You must initialize PostHog before calling "+e)},createLogger:function(t,n){return Ma(e+" "+t,n)}};return r},Aa=Ma("[PostHog.js]"),Da=Aa.createLogger,qa={};function $a(e,t,n){if(qs(e))if(vs&&e.forEach===vs)e.forEach(t,n);else if("length"in e&&e.length===+e.length)for(var r=0,i=e.length;r<i;r++)if(r in e&&t.call(n,e[r],r)===qa)return}function Na(e,t,n){if(!Bs(e)){if(qs(e))return $a(e,t,n);if(Zs(e))for(var r,i=ji(e.entries());!(r=i()).done;){var o=r.value;if(t.call(n,o[1],o[0])===qa)return}else for(var s in e)if(As.call(e,s)&&t.call(n,e[s],s)===qa)return}}var Ha=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return $a(n,(function(t){for(var n in t)void 0!==t[n]&&(e[n]=t[n])})),e},ja=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return $a(n,(function(t){$a(t,(function(t){e.push(t)}))})),e};function Ua(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r}var Va=function(e){try{return e()}catch(e){return}},za=function(e){return function(){try{for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(this,n)}catch(e){Aa.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),Aa.critical(e)}}},Ba=function(e){var t={};return Na(e,(function(e,n){(Us(e)&&e.length>0||Ws(e))&&(t[n]=e)})),t};function Wa(e,t){return n=e,r=function(e){return Us(e)&&!zs(t)?e.slice(0,t):e},i=new Set,function e(t,n){return t!==Object(t)?r?r(t,n):t:i.has(t)?void 0:(i.add(t),qs(t)?(o=[],$a(t,(function(t){o.push(e(t))}))):(o={},Na(t,(function(t,n){i.has(t)||(o[n]=e(t,n))}))),o);var o}(n);var n,r,i}var Ga=["herokuapp.com","vercel.app","netlify.app"];function Za(e){var t=null==e?void 0:e.hostname;if(!Us(t))return!1;for(var n,r=t.split(".").slice(-2).join("."),i=ji(Ga);!(n=i()).done;){if(r===n.value)return!1}return!0}function Ya(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]}function Qa(e,t,n,r){var i=null!=r?r:{},o=i.capture,s=void 0!==o&&o,a=i.passive,u=void 0===a||a;null==e||e.addEventListener(t,n,{capture:s,passive:u})}var Xa=Da("[Surveys]");function Ja(e){return!(!e.start_date||e.end_date)}function Ka(e){var t;return!(null==(t=e.conditions)||null==(t=t.events)||null==(t=t.values)||!t.length)}function eu(e){var t;return!(null==(t=e.conditions)||null==(t=t.actions)||null==(t=t.values)||!t.length)}var tu="seenSurvey_",nu="inProgressSurvey_",ru=function(e,t){var n="$survey_"+t+"/"+e.id;return e.current_iteration&&e.current_iteration>0&&(n="$survey_"+t+"/"+e.id+"/"+e.current_iteration),n},iu=function(e){var t=""+tu+e.id;return e.current_iteration&&e.current_iteration>0&&(t=""+tu+e.id+"_"+e.current_iteration),t},ou=function(e){localStorage.getItem(iu(e))||localStorage.setItem(iu(e),"true")},su=[ss.Popover,ss.Widget,ss.API],au={ignoreConditions:!1,ignoreDelay:!1,displayType:fs.Popover};Math.trunc||(Math.trunc=function(e){return e<0?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return Ws(e)&&isFinite(e)&&Math.floor(e)===e});var uu="0123456789abcdef",lu=function(){function e(e){if(this.bytes=e,16!==e.length)throw new TypeError("not 128-bit length")}e.fromFieldsV7=function(t,n,r,i){if(!Number.isInteger(t)||!Number.isInteger(n)||!Number.isInteger(r)||!Number.isInteger(i)||t<0||n<0||r<0||i<0||t>0xffffffffffff||n>4095||r>1073741823||i>4294967295)throw new RangeError("invalid field value");var o=new Uint8Array(16);return o[0]=t/Math.pow(2,40),o[1]=t/Math.pow(2,32),o[2]=t/Math.pow(2,24),o[3]=t/Math.pow(2,16),o[4]=t/Math.pow(2,8),o[5]=t,o[6]=112|n>>>8,o[7]=n,o[8]=128|r>>>24,o[9]=r>>>16,o[10]=r>>>8,o[11]=r,o[12]=i>>>24,o[13]=i>>>16,o[14]=i>>>8,o[15]=i,new e(o)};var t=e.prototype;return t.toString=function(){for(var e="",t=0;t<this.bytes.length;t++)e=e+uu.charAt(this.bytes[t]>>>4)+uu.charAt(15&this.bytes[t]),3!==t&&5!==t&&7!==t&&9!==t||(e+="-");if(36!==e.length)throw new Error("Invalid UUIDv7 was generated");return e},t.clone=function(){return new e(this.bytes.slice(0))},t.equals=function(e){return 0===this.compareTo(e)},t.compareTo=function(e){for(var t=0;t<16;t++){var n=this.bytes[t]-e.bytes[t];if(0!==n)return Math.sign(n)}return 0},e}(),cu=function(){function e(){this._timestamp=0,this._counter=0,this._random=new _u}var t=e.prototype;return t.generate=function(){var e=this.generateOrAbort();if(js(e)){this._timestamp=0;var t=this.generateOrAbort();if(js(t))throw new Error("Could not generate UUID after timestamp reset");return t}return e},t.generateOrAbort=function(){var e=Date.now();if(e>this._timestamp)this._timestamp=e,this._resetCounter();else{if(!(e+1e4>this._timestamp))return;this._counter++,this._counter>4398046511103&&(this._timestamp++,this._resetCounter())}return lu.fromFieldsV7(this._timestamp,Math.trunc(this._counter/Math.pow(2,30)),this._counter&Math.pow(2,30)-1,this._random.nextUint32())},t._resetCounter=function(){this._counter=1024*this._random.nextUint32()+(1023&this._random.nextUint32())},e}(),du=function(e){if("undefined"!=typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var t=0;t<e.length;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};ps&&!js(ps.crypto)&&crypto.getRandomValues&&(du=function(e){return crypto.getRandomValues(e)});var fu,pu,_u=function(){function e(){this._buffer=new Uint32Array(8),this._cursor=1/0}return e.prototype.nextUint32=function(){return this._cursor>=this._buffer.length&&(du(this._buffer),this._cursor=0),this._buffer[this._cursor++]},e}(),hu=function(){return vu().toString()},vu=function(){return(fu||(fu=new cu)).generate()},gu="Mobile",mu="iOS",yu="Android",bu="Tablet",wu=yu+" "+bu,Su="iPad",xu="Apple",Eu=xu+" Watch",ku="Safari",Pu="BlackBerry",Cu="Samsung",Tu=Cu+"Browser",Iu=Cu+" Internet",Fu="Chrome",Lu=Fu+" OS",Ru=Fu+" "+mu,Ou="Internet Explorer",Mu=Ou+" "+gu,Au="Opera",Du=Au+" Mini",qu="Edge",$u="Microsoft "+qu,Nu="Firefox",Hu=Nu+" "+mu,ju="Nintendo",Uu="PlayStation",Vu="Xbox",zu=yu+" "+gu,Bu=gu+" "+ku,Wu="Windows",Gu=Wu+" Phone",Zu="Nokia",Yu="Ouya",Qu="Generic",Xu=Qu+" "+gu.toLowerCase(),Ju=Qu+" "+bu.toLowerCase(),Ku="Konqueror",el="(\\d+(\\.\\d+)?)",tl=new RegExp("Version/"+el),nl=new RegExp(Vu,"i"),rl=new RegExp(Uu+" \\w+","i"),il=new RegExp(ju+" \\w+","i"),ol=new RegExp(Pu+"|PlayBook|BB10","i"),sl={"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"};var al=function(e,t){return t&&Fs(t,xu)||function(e){return Fs(e,ku)&&!Fs(e,Fu)&&!Fs(e,yu)}(e)},ul=function(e,t){return t=t||"",Fs(e," OPR/")&&Fs(e,"Mini")?Du:Fs(e," OPR/")?Au:ol.test(e)?Pu:Fs(e,"IE"+gu)||Fs(e,"WPDesktop")?Mu:Fs(e,Tu)?Iu:Fs(e,qu)||Fs(e,"Edg/")?$u:Fs(e,"FBIOS")?"Facebook "+gu:Fs(e,"UCWEB")||Fs(e,"UCBrowser")?"UC Browser":Fs(e,"CriOS")?Ru:Fs(e,"CrMo")||Fs(e,Fu)?Fu:Fs(e,yu)&&Fs(e,ku)?zu:Fs(e,"FxiOS")?Hu:Fs(e.toLowerCase(),Ku.toLowerCase())?Ku:al(e,t)?Fs(e,gu)?Bu:ku:Fs(e,Nu)?Nu:Fs(e,"MSIE")||Fs(e,"Trident/")?Ou:Fs(e,"Gecko")?Nu:""},ll=((pu={})[Mu]=[new RegExp("rv:"+el)],pu[$u]=[new RegExp(qu+"?\\/"+el)],pu[Fu]=[new RegExp("("+Fu+"|CrMo)\\/"+el)],pu[Ru]=[new RegExp("CriOS\\/"+el)],pu["UC Browser"]=[new RegExp("(UCBrowser|UCWEB)\\/"+el)],pu[ku]=[tl],pu[Bu]=[tl],pu[Au]=[new RegExp("(Opera|OPR)\\/"+el)],pu[Nu]=[new RegExp(Nu+"\\/"+el)],pu[Hu]=[new RegExp("FxiOS\\/"+el)],pu[Ku]=[new RegExp("Konqueror[:/]?"+el,"i")],pu[Pu]=[new RegExp(Pu+" "+el),tl],pu[zu]=[new RegExp("android\\s"+el,"i")],pu[Iu]=[new RegExp(Tu+"\\/"+el)],pu[Ou]=[new RegExp("(rv:|MSIE )"+el)],pu.Mozilla=[new RegExp("rv:"+el)],pu),cl=function(e,t){var n=ul(e,t),r=ll[n];if(js(r))return null;for(var i=0;i<r.length;i++){var o=r[i],s=e.match(o);if(s)return parseFloat(s[s.length-2])}return null},dl=[[new RegExp(Vu+"; "+Vu+" (.*?)[);]","i"),function(e){return[Vu,e&&e[1]||""]}],[new RegExp(ju,"i"),[ju,""]],[new RegExp(Uu,"i"),[Uu,""]],[ol,[Pu,""]],[new RegExp(Wu,"i"),function(e,t){if(/Phone/.test(t)||/WPDesktop/.test(t))return[Gu,""];if(new RegExp(gu).test(t)&&!/IEMobile\b/.test(t))return[Wu+" "+gu,""];var n=/Windows NT ([0-9.]+)/i.exec(t);if(n&&n[1]){var r=n[1],i=sl[r]||"";return/arm/i.test(t)&&(i="RT"),[Wu,i]}return[Wu,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,function(e){if(e&&e[3]){var t=[e[3],e[4],e[5]||"0"];return[mu,t.join(".")]}return[mu,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,function(e){var t="";return e&&e.length>=3&&(t=js(e[2])?e[3]:e[2]),["watchOS",t]}],[new RegExp("("+yu+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+yu+")","i"),function(e){if(e&&e[2]){var t=[e[2],e[3],e[4]||"0"];return[yu,t.join(".")]}return[yu,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,function(e){var t=["Mac OS X",""];if(e&&e[1]){var n=[e[1],e[2],e[3]||"0"];t[1]=n.join(".")}return t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[Lu,""]],[/Linux|debian/i,["Linux",""]]],fl=function(e){return il.test(e)?ju:rl.test(e)?Uu:nl.test(e)?Vu:new RegExp(Yu,"i").test(e)?Yu:new RegExp("("+Gu+"|WPDesktop)","i").test(e)?Gu:/iPad/.test(e)?Su:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?Eu:ol.test(e)?Pu:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(Zu,"i").test(e)?Zu:/(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(gu).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)?yu:wu:yu:new RegExp("(pda|"+gu+")","i").test(e)?Xu:new RegExp(bu,"i").test(e)&&!new RegExp(bu+" pc","i").test(e)?Ju:""},pl=function(e){var t=fl(e);return t===Su||t===wu||"Kobo"===t||"Kindle Fire"===t||t===Ju?bu:t===ju||t===Vu||t===Uu||t===Yu?"Console":t===Eu?"Wearable":t?gu:"Desktop"},_l="$copy_autocapture",hl=function(e){return e.GZipJS="gzip-js",e.Base64="base64",e}({}),vl=function(e){var t=null==ys?void 0:ys.createElement("a");return js(t)?null:(t.href=e,t)},gl=function(e,t){var n,r;void 0===t&&(t="&");var i=[];return Na(e,(function(e,t){js(e)||js(t)||"undefined"===t||(n=encodeURIComponent(function(e){return e instanceof File}(e)?e.name:e.toString()),r=encodeURIComponent(t),i[i.length]=r+"="+n)})),i.join(t)},ml=function(e,t){for(var n,r=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),i=0;i<r.length;i++){var o=r[i].split("=");if(o[0]===t){n=o;break}}if(!qs(n)||n.length<2)return"";var s=n[1];try{s=decodeURIComponent(s)}catch(e){Aa.error("Skipping decoding for malformed query param: "+s)}return s.replace(/\+/g," ")},yl=function(e,t,n){if(!e||!t||!t.length)return e;for(var r=e.split("#"),i=r[0]||"",o=r[1],s=i.split("?"),a=s[1],u=s[0],l=(a||"").split("&"),c=[],d=0;d<l.length;d++){var f=l[d].split("=");qs(f)&&(t.includes(f[0])?c.push(f[0]+"="+n):c.push(l[d]))}var p=u;return null!=a&&(p+="?"+c.join("&")),null!=o&&(p+="#"+o),p},bl=function(e,t){var n=e.match(new RegExp(t+"=([^&]*)"));return n?n[1]:null},wl=Uint8Array,Sl=Uint16Array,xl=Uint32Array,El=new wl([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]),kl=new wl([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]),Pl=new wl([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Cl=function(e,t){for(var n=new Sl(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var i=new xl(n[30]);for(r=1;r<30;++r)for(var o=n[r];o<n[r+1];++o)i[o]=o-n[r]<<5|r;return[n,i]},Tl=Cl(El,2),Il=Tl[0],Fl=Tl[1];Il[28]=258,Fl[258]=28;for(var Ll=Cl(kl,0)[1],Rl=new Sl(32768),Ol=0;Ol<32768;++Ol){var Ml=(43690&Ol)>>>1|(21845&Ol)<<1;Ml=(61680&(Ml=(52428&Ml)>>>2|(13107&Ml)<<2))>>>4|(3855&Ml)<<4,Rl[Ol]=((65280&Ml)>>>8|(255&Ml)<<8)>>>1}var Al=function(e,t,n){for(var r=e.length,i=0,o=new Sl(t);i<r;++i)++o[e[i]-1];var s,a=new Sl(t);for(i=0;i<t;++i)a[i]=a[i-1]+o[i-1]<<1;if(n){s=new Sl(1<<t);var u=15-t;for(i=0;i<r;++i)if(e[i])for(var l=i<<4|e[i],c=t-e[i],d=a[e[i]-1]++<<c,f=d|(1<<c)-1;d<=f;++d)s[Rl[d]>>>u]=l}else for(s=new Sl(r),i=0;i<r;++i)s[i]=Rl[a[e[i]-1]++]>>>15-e[i];return s},Dl=new wl(288);for(Ol=0;Ol<144;++Ol)Dl[Ol]=8;for(Ol=144;Ol<256;++Ol)Dl[Ol]=9;for(Ol=256;Ol<280;++Ol)Dl[Ol]=7;for(Ol=280;Ol<288;++Ol)Dl[Ol]=8;var ql=new wl(32);for(Ol=0;Ol<32;++Ol)ql[Ol]=5;var $l=Al(Dl,9,0),Nl=Al(ql,5,0),Hl=function(e){return(e/8>>0)+(7&e&&1)},jl=function(e,t,n){(null==n||n>e.length)&&(n=e.length);var r=new(e instanceof Sl?Sl:e instanceof xl?xl:wl)(n-t);return r.set(e.subarray(t,n)),r},Ul=function(e,t,n){n<<=7&t;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8},Vl=function(e,t,n){n<<=7&t;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},zl=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,o=n.slice();if(!i)return[new wl(0),0];if(1==i){var s=new wl(n[0].s+1);return s[n[0].s]=1,[s,1]}n.sort((function(e,t){return e.f-t.f})),n.push({s:-1,f:25001});var a=n[0],u=n[1],l=0,c=1,d=2;for(n[0]={s:-1,f:a.f+u.f,l:a,r:u};c!=i-1;)a=n[n[l].f<n[d].f?l++:d++],u=n[l!=c&&n[l].f<n[d].f?l++:d++],n[c++]={s:-1,f:a.f+u.f,l:a,r:u};var f=o[0].s;for(r=1;r<i;++r)o[r].s>f&&(f=o[r].s);var p=new Sl(f+1),_=Bl(n[c-1],p,0);if(_>t){r=0;var h=0,v=_-t,g=1<<v;for(o.sort((function(e,t){return p[t.s]-p[e.s]||e.f-t.f}));r<i;++r){var m=o[r].s;if(!(p[m]>t))break;h+=g-(1<<_-p[m]),p[m]=t}for(h>>>=v;h>0;){var y=o[r].s;p[y]<t?h-=1<<t-p[y]++-1:++r}for(;r>=0&&h;--r){var b=o[r].s;p[b]==t&&(--p[b],++h)}_=t}return[new wl(p),_]},Bl=function(e,t,n){return-1==e.s?Math.max(Bl(e.l,t,n+1),Bl(e.r,t,n+1)):t[e.s]=n},Wl=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new Sl(++t),r=0,i=e[0],o=1,s=function(e){n[r++]=e},a=1;a<=t;++a)if(e[a]==i&&a!=t)++o;else{if(!i&&o>2){for(;o>138;o-=138)s(32754);o>2&&(s(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(s(i),--o;o>6;o-=6)s(8304);o>2&&(s(o-3<<5|8208),o=0)}for(;o--;)s(i);o=1,i=e[a]}return[n.subarray(0,r),t]},Gl=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},Zl=function(e,t,n){var r=n.length,i=Hl(t+2);e[i]=255&r,e[i+1]=r>>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var o=0;o<r;++o)e[i+o+4]=n[o];return 8*(i+4+r)},Yl=function(e,t,n,r,i,o,s,a,u,l,c){Ul(t,c++,n),++i[256];for(var d=zl(i,15),f=d[0],p=d[1],_=zl(o,15),h=_[0],v=_[1],g=Wl(f),m=g[0],y=g[1],b=Wl(h),w=b[0],S=b[1],x=new Sl(19),E=0;E<m.length;++E)x[31&m[E]]++;for(E=0;E<w.length;++E)x[31&w[E]]++;for(var k=zl(x,7),P=k[0],C=k[1],T=19;T>4&&!P[Pl[T-1]];--T);var I,F,L,R,O=l+5<<3,M=Gl(i,Dl)+Gl(o,ql)+s,A=Gl(i,f)+Gl(o,h)+s+14+3*T+Gl(x,P)+(2*x[16]+3*x[17]+7*x[18]);if(O<=M&&O<=A)return Zl(t,c,e.subarray(u,u+l));if(Ul(t,c,1+(A<M)),c+=2,A<M){I=Al(f,p,0),F=f,L=Al(h,v,0),R=h;var D=Al(P,C,0);Ul(t,c,y-257),Ul(t,c+5,S-1),Ul(t,c+10,T-4),c+=14;for(E=0;E<T;++E)Ul(t,c+3*E,P[Pl[E]]);c+=3*T;for(var q=[m,w],N=0;N<2;++N){var H=q[N];for(E=0;E<H.length;++E){var j=31&H[E];Ul(t,c,D[j]),c+=P[j],j>15&&(Ul(t,c,H[E]>>>5&127),c+=H[E]>>>12)}}}else I=$l,F=Dl,L=Nl,R=ql;for(E=0;E<a;++E)if(r[E]>255){j=r[E]>>>18&31;Vl(t,c,I[j+257]),c+=F[j+257],j>7&&(Ul(t,c,r[E]>>>23&31),c+=El[j]);var U=31&r[E];Vl(t,c,L[U]),c+=R[U],U>3&&(Vl(t,c,r[E]>>>5&8191),c+=kl[U])}else Vl(t,c,I[r[E]]),c+=F[r[E]];return Vl(t,c,I[256]),c+F[256]},Ql=new xl([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Xl=function(){for(var e=new xl(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(1&n&&3988292384)^n>>>1;e[t]=n}return e}(),Jl=function(e,t,n,r,i){return function(e,t,n,r,i,o){var s=e.length,a=new wl(r+s+5*(1+Math.floor(s/7e3))+i),u=a.subarray(r,a.length-i),l=0;if(!t||s<8)for(var c=0;c<=s;c+=65535){var d=c+65535;d<s?l=Zl(u,l,e.subarray(c,d)):(u[c]=o,l=Zl(u,l,e.subarray(c,s)))}else{for(var f=Ql[t-1],p=f>>>13,_=8191&f,h=(1<<n)-1,v=new Sl(32768),g=new Sl(h+1),m=Math.ceil(n/3),y=2*m,b=function(t){return(e[t]^e[t+1]<<m^e[t+2]<<y)&h},w=new xl(25e3),S=new Sl(288),x=new Sl(32),E=0,k=0,P=(c=0,0),C=0,T=0;c<s;++c){var I=b(c),F=32767&c,L=g[I];if(v[F]=L,g[I]=F,C<=c){var R=s-c;if((E>7e3||P>24576)&&R>423){l=Yl(e,u,0,w,S,x,k,P,T,c-T,l),P=E=k=0,T=c;for(var O=0;O<286;++O)S[O]=0;for(O=0;O<30;++O)x[O]=0}var M=2,A=0,D=_,q=F-L&32767;if(R>2&&I==b(c-q))for(var N=Math.min(p,R)-1,H=Math.min(32767,c),j=Math.min(258,R);q<=H&&--D&&F!=L;){if(e[c+M]==e[c+M-q]){for(var U=0;U<j&&e[c+U]==e[c+U-q];++U);if(U>M){if(M=U,A=q,U>N)break;var V=Math.min(q,U-2),z=0;for(O=0;O<V;++O){var B=c-q+O+32768&32767,W=B-v[B]+32768&32767;W>z&&(z=W,L=B)}}}q+=(F=L)-(L=v[F])+32768&32767}if(A){w[P++]=268435456|Fl[M]<<18|Ll[A];var G=31&Fl[M],Z=31&Ll[A];k+=El[G]+kl[Z],++S[257+G],++x[Z],C=c+M,++E}else w[P++]=e[c],++S[e[c]]}}l=Yl(e,u,o,w,S,x,k,P,T,c-T,l)}return jl(a,0,r+Hl(l)+i)}(e,null==t.level?6:t.level,null==t.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,n,r,!0)},Kl=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};function ec(e,t){void 0===t&&(t={});var n=function(){var e=4294967295;return{p:function(t){for(var n=e,r=0;r<t.length;++r)n=Xl[255&n^t[r]]^n>>>8;e=n},d:function(){return 4294967295^e}}}(),r=e.length;n.p(e);var i=Jl(e,t,function(e){return 10+(e.filename&&e.filename.length+1||0)}(t),8),o=i.length;return function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&Kl(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var r=0;r<=n.length;++r)e[r+10]=n.charCodeAt(r)}}(i,t),Kl(i,o-8,n.d()),Kl(i,o-4,r),i}var tc=function(e){var t,n,r,i,o="";for(t=n=0,r=(e=(e+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n")).length,i=0;i<r;i++){var s=e.charCodeAt(i),a=null;s<128?n++:a=s>127&&s<2048?String.fromCharCode(s>>6|192,63&s|128):String.fromCharCode(s>>12|224,s>>6&63|128,63&s|128),zs(a)||(n>t&&(o+=e.substring(t,n)),o+=a,t=n=i+1)}return n>t&&(o+=e.substring(t,e.length)),o},nc=!!Ss||!!ws,rc="text/plain",ic=function(e,t,n){var r;void 0===n&&(n=!0);var i=e.split("?"),o=i[0],s=i[1],a=Ui({},t),u=null!==(r=null==s?void 0:s.split("&").map((function(e){var t,r=e.split("="),i=r[0],o=r[1],s=n&&null!==(t=a[i])&&void 0!==t?t:o;return delete a[i],i+"="+s})))&&void 0!==r?r:[],l=gl(a);return l&&u.push(l),o+"?"+u.join("&")},oc=function(e,t){return JSON.stringify(e,(function(e,t){return"bigint"==typeof t?t.toString():t}),t)},sc=function(e){var t=e.data,n=e.compression;if(t){if(n===hl.GZipJS){var r=ec(function(e,t){var n=e.length;if("undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e);for(var r=new wl(e.length+(e.length>>>1)),i=0,o=function(e){r[i++]=e},s=0;s<n;++s){if(i+5>r.length){var a=new wl(i+8+(n-s<<1));a.set(r),r=a}var u=e.charCodeAt(s);u<128||t?o(u):u<2048?(o(192|u>>>6),o(128|63&u)):u>55295&&u<57344?(o(240|(u=65536+(1047552&u)|1023&e.charCodeAt(++s))>>>18),o(128|u>>>12&63),o(128|u>>>6&63),o(128|63&u)):(o(224|u>>>12),o(128|u>>>6&63),o(128|63&u))}return jl(r,0,i)}(oc(t)),{mtime:0}),i=new Blob([r],{type:rc});return{contentType:rc,body:i,estimatedSize:i.size}}if(n===hl.Base64){var o=function(e){var t,n,r,i,o,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a=0,u=0,l="",c=[];if(!e)return e;e=tc(e);do{t=(o=e.charCodeAt(a++)<<16|e.charCodeAt(a++)<<8|e.charCodeAt(a++))>>18&63,n=o>>12&63,r=o>>6&63,i=63&o,c[u++]=s.charAt(t)+s.charAt(n)+s.charAt(r)+s.charAt(i)}while(a<e.length);switch(l=c.join(""),e.length%3){case 1:l=l.slice(0,-2)+"==";break;case 2:l=l.slice(0,-1)+"="}return l}(oc(t)),s=function(e){return"data="+encodeURIComponent("string"==typeof e?e:oc(e))}(o);return{contentType:"application/x-www-form-urlencoded",body:s,estimatedSize:new Blob([s]).size}}var a=oc(t);return{contentType:"application/json",body:a,estimatedSize:new Blob([a]).size}}},ac=[];ws&&ac.push({transport:"fetch",method:function(e){var t,n,r=null!==(t=sc(e))&&void 0!==t?t:{},i=r.contentType,o=r.body,s=r.estimatedSize,a=new Headers;Na(e.headers,(function(e,t){a.append(t,e)})),i&&a.append("Content-Type",i);var u=e.url,l=null;if(xs){var c=new xs;l={signal:c.signal,timeout:setTimeout((function(){return c.abort()}),e.timeout)}}ws(u,Ui({method:(null==e?void 0:e.method)||"GET",headers:a,keepalive:"POST"===e.method&&(s||0)<52428.8,body:o,signal:null==(n=l)?void 0:n.signal},e.fetchOptions)).then((function(t){return t.text().then((function(n){var r={statusCode:t.status,text:n};if(200===t.status)try{r.json=JSON.parse(n)}catch(e){Aa.error(e)}null==e.callback||e.callback(r)}))})).catch((function(t){Aa.error(t),null==e.callback||e.callback({statusCode:0,text:t})})).finally((function(){return l?clearTimeout(l.timeout):null}))}}),Ss&&ac.push({transport:"XHR",method:function(e){var t,n=new Ss;n.open(e.method||"GET",e.url,!0);var r=null!==(t=sc(e))&&void 0!==t?t:{},i=r.contentType,o=r.body;Na(e.headers,(function(e,t){n.setRequestHeader(t,e)})),i&&n.setRequestHeader("Content-Type",i),e.timeout&&(n.timeout=e.timeout),e.disableXHRCredentials||(n.withCredentials=!0),n.onreadystatechange=function(){if(4===n.readyState){var t={statusCode:n.status,text:n.responseText};if(200===n.status)try{t.json=JSON.parse(n.responseText)}catch(e){}null==e.callback||e.callback(t)}},n.send(o)}}),null!=ms&&ms.sendBeacon&&ac.push({transport:"sendBeacon",method:function(e){var t=ic(e.url,{beacon:"1"});try{var n,r=null!==(n=sc(e))&&void 0!==n?n:{},i=r.contentType,o=r.body,s="string"==typeof o?new Blob([o],{type:i}):o;ms.sendBeacon(t,s)}catch(e){}}});var uc=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 lc(e,t,n){return oc({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:n})}var cc={exact:function(e,t){return t.some((function(t){return e.some((function(e){return t===e}))}))},is_not:function(e,t){return t.every((function(t){return e.every((function(e){return t!==e}))}))},regex:function(e,t){return t.some((function(t){return e.some((function(e){return uc(t,e)}))}))},not_regex:function(e,t){return t.every((function(t){return e.every((function(e){return!uc(t,e)}))}))},icontains:function(e,t){return t.map(dc).some((function(t){return e.map(dc).some((function(e){return t.includes(e)}))}))},not_icontains:function(e,t){return t.map(dc).every((function(t){return e.map(dc).every((function(e){return!t.includes(e)}))}))}},dc=function(e){return e.toLowerCase()};function fc(e,t){return!e||Object.entries(e).every((function(e){var n=e[0],r=e[1],i=null==t?void 0:t[n];if(js(i)||zs(i))return!1;var o=[String(i)],s=cc[r.operator];return!!s&&s(r.values,o)}))}var pc=Da("[Stylesheet Loader]"),_c=ps,hc=ys;function vc(e){return"$survey_response_"+e}var gc="#020617",mc={fontFamily:"inherit",backgroundColor:"#eeeded",submitButtonColor:"black",submitButtonTextColor:"white",ratingButtonColor:"white",ratingButtonActiveColor:"black",borderColor:"#c9c6c6",placeholder:"Start typing...",whiteLabel:!1,displayThankYouMessage:!0,thankYouMessageHeader:"Thank you for your feedback!",position:is.Right,widgetType:rs.Tab,widgetLabel:"Feedback",widgetColor:"black",zIndex:"2147483647",disabledButtonOpacity:"0.6",maxWidth:"300px",textSubtleColor:"#939393",boxPadding:"20px 24px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",borderRadius:"10px",shuffleQuestions:!1,surveyPopupDelaySeconds:void 0,outlineColor:"rgba(59, 130, 246, 0.8)",inputBackground:"white",inputTextColor:gc,scrollbarThumbColor:"var(--ph-survey-border-color)",scrollbarTrackColor:"var(--ph-survey-background-color)"};function yc(e){if("#"===e[0]){var t=e.replace(/^#/,"");return"rgb("+parseInt(t.slice(0,2),16)+","+parseInt(t.slice(2,4),16)+","+parseInt(t.slice(4,6),16)+")"}return"rgb(255, 255, 255)"}function bc(e){var t;void 0===e&&(e=mc.backgroundColor),"#"===e[0]&&(t=yc(e)),e.startsWith("rgb")&&(t=e);var n={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}[e.toLowerCase()];if(n&&(t=yc(n)),!t)return gc;var r=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(r){var i=parseInt(r[1]),o=parseInt(r[2]),s=parseInt(r[3]);return Math.sqrt(i*i*.299+o*o*.587+s*s*.114)>127.5?gc:"white"}return gc}function wc(e){var t=function(e,t,n){var r,i=e.createElement("style");return i.innerText=t,null!=n&&null!=(r=n.config)&&r.prepare_external_dependency_stylesheet&&(i=n.config.prepare_external_dependency_stylesheet(i)),i||(pc.error("prepare_external_dependency_stylesheet returned null"),null)}(hc,':host{--ph-survey-font-family:-apple-system,BlinkMacSystemFont,"Inter","Segoe UI","Roboto",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--ph-survey-box-padding:20px 24px;--ph-survey-max-width:300px;--ph-survey-z-index:2147483647;--ph-survey-border-color:#dcdcdc;--ph-survey-border-bottom:1.5px solid var(--ph-survey-border-color);--ph-survey-border-radius:10px;--ph-survey-background-color:#eeeded;--ph-survey-box-shadow:0 4px 12px rgba(0,0,0,.15);--ph-survey-submit-button-color:#000;--ph-survey-submit-button-text-color:#fff;--ph-survey-rating-bg-color:#fff;--ph-survey-rating-text-color:#020617;--ph-survey-rating-active-bg-color:#000;--ph-survey-rating-active-text-color:#fff;--ph-survey-text-primary-color:#020617;--ph-survey-text-subtle-color:#939393;--ph-widget-color:#e0a045;--ph-widget-text-color:#fff;--ph-survey-scrollbar-thumb-color:var(--ph-survey-border-color);--ph-survey-scrollbar-track-color:var(--ph-survey-background-color);--ph-survey-outline-color:rgba(59,130,246,.8);--ph-survey-input-background:#fff;--ph-survey-input-text-color:#020617;--ph-survey-disabled-button-opacity:0.6}.ph-survey{bottom:0;height:fit-content;margin:0;max-width:85%;min-width:300px;position:fixed;width:var(--ph-survey-max-width);z-index:var(--ph-survey-z-index)}.ph-survey h3,.ph-survey p{margin:0}.ph-survey *{box-sizing:border-box;color:var(--ph-survey-text-primary-color);font-family:var(--ph-survey-font-family)}.ph-survey .multiple-choice-options label,.ph-survey input[type=text],.ph-survey textarea{background:var(--ph-survey-input-background);border:1.5px solid var(--ph-survey-border-color);border-radius:4px;color:var(--ph-survey-input-text-color);padding:10px;transition:border-color .2s ease-out,box-shadow .2s ease-out,transform .15s ease-out}.ph-survey input[type=text],.ph-survey textarea{transition:border-color .2s ease-out,box-shadow .2s ease-out,transform .15s ease-out}.ph-survey input{margin:0}.ph-survey .form-submit:focus,.ph-survey .form-submit:focus-visible,.ph-survey input[type=checkbox]:focus,.ph-survey input[type=checkbox]:focus-visible,.ph-survey input[type=radio]:focus,.ph-survey input[type=radio]:focus-visible,.ph-survey input[type=text]:focus,.ph-survey input[type=text]:focus-visible,.ph-survey textarea:focus,.ph-survey textarea:focus-visible{border-color:var(--ph-survey-rating-active-bg-color);outline:1.5px solid var(--ph-survey-outline-color);outline-offset:2px}.ph-survey button:focus:not(:focus-visible),.ph-survey input[type=checkbox]:focus:not(:focus-visible),.ph-survey input[type=radio]:focus:not(:focus-visible),.ph-survey input[type=text]:focus:not(:focus-visible),.ph-survey textarea:focus:not(:focus-visible){outline:none}.ph-survey input[type=text]:hover:not(:focus),.ph-survey textarea:hover:not(:focus){border-color:var(--ph-survey-rating-active-bg-color)}@media (max-width:768px){.ph-survey input[type=text],.ph-survey textarea{font-size:1rem}}.ph-survey .form-cancel,.ph-survey .multiple-choice-options label,.ph-survey .rating-options-number,.ph-survey input[type=checkbox],.ph-survey input[type=radio]{border:1.5px solid var(--ph-survey-border-color)}.ph-survey .footer-branding,.ph-survey .form-cancel,.ph-survey .form-submit,.ph-survey .ratings-emoji,.ph-survey .ratings-number,.ph-survey input[type=checkbox],.ph-survey input[type=radio],.ph-survey label{transition:all .2s ease-out}@media (prefers-reduced-motion:no-preference){.ph-survey button:active,.ph-survey input[type=checkbox]:active,.ph-survey input[type=radio]:active,.ph-survey label:active{transition-duration:.1s}}.ph-survey-widget-tab{background:var(--ph-widget-color);border:none;border-radius:3px 3px 0 0;color:var(--ph-widget-text-color);cursor:pointer;padding:10px 12px;position:fixed;text-align:center;transition:padding .2s ease-out;z-index:var(--ph-survey-z-index)}.ph-survey-widget-tab:hover:not(.widget-tab-top){padding-bottom:16px}.ph-survey-widget-tab.widget-tab-top{border-radius:0 0 3px 3px}.ph-survey-widget-tab.widget-tab-top:hover{padding-top:16px}@keyframes ph-survey-fade-in{0%{opacity:0}to{opacity:1}}.survey-box{gap:16px}.bottom-section,.survey-box{display:flex;flex-direction:column}.bottom-section{gap:8px}.thank-you-message-header~.bottom-section{padding-top:16px}.question-container,.thank-you-message{display:flex;flex-direction:column;gap:8px}.survey-question{font-size:14px;font-weight:500}.survey-question-description{font-size:13px;opacity:.8;padding-top:4px}.survey-question-description,.thank-you-message-body{word-wrap:break-word;overflow-wrap:break-word}:is(.survey-question-description,.thank-you-message-body) embed,:is(.survey-question-description,.thank-you-message-body) iframe,:is(.survey-question-description,.thank-you-message-body) img,:is(.survey-question-description,.thank-you-message-body) object,:is(.survey-question-description,.thank-you-message-body) video{height:auto;max-width:100%}:is(.survey-question-description,.thank-you-message-body) svg{height:auto;max-width:100%}.question-textarea-wrapper{display:flex;flex-direction:column}.survey-form{animation:ph-survey-fade-in .3s ease-out forwards}.survey-form,.thank-you-message{background:var(--ph-survey-background-color);border:1.5px solid var(--ph-survey-border-color);border-bottom:var(--ph-survey-border-bottom);border-radius:var(--ph-survey-border-radius);box-shadow:var(--ph-survey-box-shadow);margin:0;padding:var(--ph-survey-box-padding);position:relative;text-align:left;width:100%;z-index:var(--ph-survey-z-index)}.survey-form input[type=text],.survey-form textarea{min-width:100%}:is(.survey-form textarea):focus,:is(.survey-form textarea):focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.08)}:is(.survey-form textarea):focus:not(:focus-visible){box-shadow:none}.survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) .multiple-choice-options,.survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) textarea{margin-top:0}.multiple-choice-options{border:none;display:flex;flex-direction:column;font-size:14px;gap:8px;margin:0;padding:1px 0}.multiple-choice-options .response-choice,.multiple-choice-options label{align-items:center;color:inherit;display:flex;gap:8px}.multiple-choice-options label{cursor:pointer;font-size:13px}:is(.multiple-choice-options label):hover:not(:has(input:checked)){border-color:var(--ph-survey-text-subtle-color);box-shadow:0 2px 8px rgba(0,0,0,.08)}:is(.multiple-choice-options label):has(input:checked){border-color:var(--ph-survey-rating-active-bg-color);box-shadow:0 1px 4px rgba(0,0,0,.05)}.choice-option-open:is(.multiple-choice-options label){flex-wrap:wrap}:is(.multiple-choice-options label) span{color:inherit}.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]{appearance:none;-webkit-appearance:none;-moz-appearance:none;background:var(--ph-survey-input-background);border-radius:3px;cursor:pointer;flex-shrink:0;height:1rem;position:relative;transition:all .2s cubic-bezier(.4,0,.2,1),transform .15s ease-out;width:1rem;z-index:1}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):focus{transform:scale(1.05)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):hover{border-color:var(--ph-survey-rating-active-bg-color);transform:scale(1.05)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):active{transform:scale(.95)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):checked{background:var(--ph-survey-rating-active-bg-color);border-color:var(--ph-survey-rating-active-bg-color);transform:scale(1)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):checked:hover{transform:scale(1.05)}.multiple-choice-options input[type=checkbox]:checked:after{animation:ph-survey-checkmark-reveal .2s ease-out .1s forwards;border:solid var(--ph-survey-rating-active-text-color);border-width:0 2px 2px 0;height:8px;left:4px;transform:rotate(45deg) scale(0);width:4px}.multiple-choice-options input[type=radio]:checked:after{animation:ph-survey-radio-reveal .15s ease-out .05s forwards;background:var(--ph-survey-rating-active-text-color);border-radius:50%;height:6px;left:5px;top:5px;transform:scale(0);width:6px}.multiple-choice-options input[type=checkbox]:checked:after,.multiple-choice-options input[type=radio]:checked:after{box-sizing:content-box;content:"";position:absolute}.multiple-choice-options input[type=radio]{border-radius:50%}.multiple-choice-options input[type=radio]:checked{border:none}:is(.multiple-choice-options input[type=checkbox]:checked,.multiple-choice-options input[type=radio]:checked)~*{font-weight:700}:is(:is(.multiple-choice-options .choice-option-open) input[type=text])::placeholder{color:var(--ph-survey-text-subtle-color);font-weight:400}.rating-options-emoji{display:flex;justify-content:space-between}.ratings-emoji{background-color:transparent;border:none;font-size:16px;opacity:.5;padding:0}.ratings-emoji:hover{cursor:pointer;opacity:1;transform:scale(1.15)}.ratings-emoji.rating-active{opacity:1}.ratings-emoji svg{fill:var(--ph-survey-text-primary-color);transition:fill .2s ease-out}.rating-options-number{border-radius:6px;display:grid;grid-auto-columns:1fr;grid-auto-flow:column;overflow:hidden}.rating-options-number .ratings-number{border:none;border-right:1px solid var(--ph-survey-border-color);color:var(--ph-survey-rating-text-color);cursor:pointer;font-weight:700;text-align:center}:is(.rating-options-number .ratings-number):last-of-type{border-right:0}.rating-active:is(.rating-options-number .ratings-number){background:var(--ph-survey-rating-active-bg-color);color:var(--ph-survey-rating-active-text-color)}.ratings-number{background-color:var(--ph-survey-rating-bg-color);border:none;padding:8px 0}.ratings-number .rating-active{background-color:var(--ph-survey-rating-active-bg-color)}.ratings-number:hover{cursor:pointer}.rating-text{display:flex;flex-direction:row;font-size:11px;justify-content:space-between;opacity:.7}.form-submit{background:var(--ph-survey-submit-button-color);border:none;border-radius:6px;box-shadow:0 2px 0 rgba(0,0,0,.045);color:var(--ph-survey-submit-button-text-color);cursor:pointer;font-weight:700;min-width:100%;padding:12px;text-align:center;user-select:none}.form-submit:not([disabled]):hover{box-shadow:0 4px 8px rgba(0,0,0,.1);transform:scale(1.02)}.form-submit:not([disabled]):active{box-shadow:0 1px 2px rgba(0,0,0,.05);transform:scale(.98)}.form-submit[disabled]{cursor:not-allowed;opacity:var(--ph-survey-disabled-button-opacity)}.form-cancel{background:#fff;border-radius:100%;cursor:pointer;line-height:0;padding:12px;position:absolute;right:0;top:0;transform:translate(50%,-50%)}.form-cancel:hover{opacity:.7;transform:translate(50%,-50%) scale(1.1)}.footer-branding{align-items:center;display:flex;font-size:11px;font-weight:500;gap:4px;justify-content:center;opacity:.6;text-decoration:none}.footer-branding:hover{opacity:1}.footer-branding a{text-decoration:none}.thank-you-message{text-align:center}.thank-you-message-header{margin:10px 0 0}.thank-you-message-body{font-size:14px;opacity:.8}.limit-height{max-height:256px;overflow-x:hidden;overflow-y:auto;scrollbar-color:var(--ph-survey-scrollbar-thumb-color) var(--ph-survey-scrollbar-track-color);scrollbar-width:thin}.limit-height::-webkit-scrollbar{width:8px}.limit-height::-webkit-scrollbar-track{background:var(--ph-survey-scrollbar-track-color);border-radius:4px}.limit-height::-webkit-scrollbar-thumb{background-color:var(--ph-survey-scrollbar-thumb-color);border:2px solid var(--ph-survey-scrollbar-track-color);border-radius:4px}:is(.limit-height::-webkit-scrollbar-thumb):hover{background-color:var(--ph-survey-text-subtle-color)}.sr-only{clip:rect(0,0,0,0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}@media (prefers-reduced-motion:reduce){.ph-survey *{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}@keyframes ph-survey-checkmark-reveal{0%{opacity:0;transform:rotate(45deg) scale(0)}50%{opacity:1;transform:rotate(45deg) scale(1.2)}to{opacity:1;transform:rotate(45deg) scale(1)}}@keyframes ph-survey-radio-reveal{0%{opacity:0;transform:scale(0)}50%{opacity:1;transform:scale(1.3)}to{opacity:1;transform:scale(1)}}',e);return null==t||t.setAttribute("data-ph-survey-style","true"),t}var Sc=function(e,t,n){var r=Hc(e),i=hc.querySelector("."+r);if(i&&i.shadowRoot)return{shadow:i.shadowRoot,isNewlyCreated:!1};var o=hc.createElement("div");!function(e,t,n){var r=Ui({},mc,n),i=e.style,o=![is.Center,is.Left,is.Right].includes(r.position)||t===ss.Widget&&(null==n?void 0:n.widgetType)===rs.Tab;i.setProperty("--ph-survey-font-family",function(e){if("inherit"===e)return"inherit";var t='BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"';return e?e+", "+t:"-apple-system, "+t}(r.fontFamily)),i.setProperty("--ph-survey-box-padding",r.boxPadding),i.setProperty("--ph-survey-max-width",r.maxWidth),i.setProperty("--ph-survey-z-index",r.zIndex),i.setProperty("--ph-survey-border-color",r.borderColor),o?(i.setProperty("--ph-survey-border-radius",r.borderRadius),i.setProperty("--ph-survey-border-bottom","1.5px solid var(--ph-survey-border-color)")):(i.setProperty("--ph-survey-border-bottom","none"),i.setProperty("--ph-survey-border-radius",r.borderRadius+" "+r.borderRadius+" 0 0")),i.setProperty("--ph-survey-background-color",r.backgroundColor),i.setProperty("--ph-survey-box-shadow",r.boxShadow),i.setProperty("--ph-survey-disabled-button-opacity",r.disabledButtonOpacity),i.setProperty("--ph-survey-submit-button-color",r.submitButtonColor),i.setProperty("--ph-survey-submit-button-text-color",(null==n?void 0:n.submitButtonTextColor)||bc(r.submitButtonColor)),i.setProperty("--ph-survey-rating-bg-color",r.ratingButtonColor),i.setProperty("--ph-survey-rating-text-color",bc(r.ratingButtonColor)),i.setProperty("--ph-survey-rating-active-bg-color",r.ratingButtonActiveColor),i.setProperty("--ph-survey-rating-active-text-color",bc(r.ratingButtonActiveColor)),i.setProperty("--ph-survey-text-primary-color",bc(r.backgroundColor)),i.setProperty("--ph-survey-text-subtle-color",r.textSubtleColor),i.setProperty("--ph-widget-color",r.widgetColor),i.setProperty("--ph-widget-text-color",bc(r.widgetColor)),i.setProperty("--ph-widget-z-index",r.zIndex);var s=(null==n?void 0:n.inputBackgroundColor)||r.inputBackground;null!=n&&n.inputBackgroundColor||"white"!==r.backgroundColor||(s="#f8f8f8"),i.setProperty("--ph-survey-input-background",s),i.setProperty("--ph-survey-input-text-color",(null==n?void 0:n.inputTextColor)||bc(s)),i.setProperty("--ph-survey-scrollbar-thumb-color",r.scrollbarThumbColor),i.setProperty("--ph-survey-scrollbar-track-color",r.scrollbarTrackColor),i.setProperty("--ph-survey-outline-color",r.outlineColor)}(o,e.type,e.appearance),o.className=r;var s=o.attachShadow({mode:"open"}),a=wc(t);if(a){var u=s.querySelector("style");u&&s.removeChild(u),s.appendChild(a)}return hc.body.appendChild(o),{shadow:s,isNewlyCreated:!0}},xc=function(e,t){if(!t)return null;var n=e[vc(t)];return qs(n)?[].concat(n):n},Ec=function(e){var t,n,r=e.responses,i=e.survey,o=e.surveySubmissionId,s=e.posthog,a=e.isSurveyCompleted;s?(ou(i),s.capture(cs.SENT,Ui(((t={})[ds.SURVEY_NAME]=i.name,t[ds.SURVEY_ID]=i.id,t[ds.SURVEY_ITERATION]=i.current_iteration,t[ds.SURVEY_ITERATION_START_DATE]=i.current_iteration_start_date,t[ds.SURVEY_QUESTIONS]=i.questions.map((function(e){return{id:e.id,question:e.question,response:xc(r,e.id)}})),t[ds.SURVEY_SUBMISSION_ID]=o,t[ds.SURVEY_COMPLETED]=a,t.sessionRecordingUrl=null==s.get_session_replay_url?void 0:s.get_session_replay_url(),t),r,{$set:(n={},n[ru(i,"responded")]=!0,n)})),a&&(_c.dispatchEvent(new CustomEvent("PHSurveySent",{detail:{surveyId:i.id}})),Nc(i))):Xa.error("[survey sent] event not captured, PostHog instance not found.")},kc=function(e,t,n){var r,i,o;if(t){if(!n){var s=qc(e);t.capture(cs.DISMISSED,Ui(((r={})[ds.SURVEY_NAME]=e.name,r[ds.SURVEY_ID]=e.id,r[ds.SURVEY_ITERATION]=e.current_iteration,r[ds.SURVEY_ITERATION_START_DATE]=e.current_iteration_start_date,r[ds.SURVEY_PARTIALLY_COMPLETED]=Object.values((null==s?void 0:s.responses)||{}).filter((function(e){return!Bs(e)})).length>0,r.sessionRecordingUrl=null==t.get_session_replay_url?void 0:t.get_session_replay_url(),r),null==s?void 0:s.responses,((o={})[ds.SURVEY_SUBMISSION_ID]=null==s?void 0:s.surveySubmissionId,o[ds.SURVEY_QUESTIONS]=e.questions.map((function(e){return{id:e.id,question:e.question,response:xc((null==s?void 0:s.responses)||{},e.id)}})),o.$set=((i={})[ru(e,"dismissed")]=!0,i),o))),Nc(e),ou(e),_c.dispatchEvent(new CustomEvent("PHSurveyClosed",{detail:{surveyId:e.id}}))}}else Xa.error("[survey dismissed] event not captured, PostHog instance not found.")},Pc=function(e){return e.map((function(e){return{sort:Math.floor(10*Math.random()),value:e}})).sort((function(e,t){return e.sort-t.sort})).map((function(e){return e.value}))},Cc=function(e,t){return e.length===t.length&&e.every((function(e,n){return e===t[n]}))?t.reverse():t},Tc=function(e){return e.appearance&&e.appearance.shuffleQuestions&&!e.enable_partial_responses?Cc(e.questions,Pc(e.questions)):e.questions},Ic=function(e){var t;return!(null==(t=e.conditions)||null==(t=t.events)||!t.repeatedActivation||!function(e){var t,n;return null!=(null==(t=e.conditions)||null==(t=t.events)||null==(t=t.values)?void 0:t.length)&&(null==(n=e.conditions)||null==(n=n.events)||null==(n=n.values)?void 0:n.length)>0}(e))||e.schedule===ls.Always||$c(e)},Fc=function(e,t){var n={__c:t="__cC"+eo++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,_o(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}({isPreviewMode:!1,previewPageIndex:0,onPopupSurveyDismissed:function(){},isPopup:!0,onPreviewSubmit:function(){},surveySubmissionId:""}),Lc=function(){return Zo(Fc)},Rc=function(e){var t=e.component,n=e.children,r=e.renderAsHtml,i=e.style;return Fo(t,r?{dangerouslySetInnerHTML:{__html:n},style:i}:{children:n,style:i})};function Oc(e){return null!=e?e:"icontains"}function Mc(e){var t,n,r;if(null==(t=e.conditions)||!t.url)return!0;var i=null==_c||null==(n=_c.location)?void 0:n.href;if(!i)return!1;var o=[e.conditions.url],s=Oc(null==(r=e.conditions)?void 0:r.urlMatchType);return cc[s](o,[i])}var Ac=function(e){var t=""+nu+e.id;return e.current_iteration&&e.current_iteration>0&&(t=""+nu+e.id+"_"+e.current_iteration),t},Dc=function(e,t){try{localStorage.setItem(Ac(e),JSON.stringify(t))}catch(e){Xa.error("Error setting in-progress survey state in localStorage",e)}},qc=function(e){try{var t=localStorage.getItem(Ac(e));if(t)return JSON.parse(t)}catch(e){Xa.error("Error getting in-progress survey state from localStorage",e)}return null},$c=function(e){var t=qc(e);return!Bs(null==t?void 0:t.surveySubmissionId)},Nc=function(e){try{localStorage.removeItem(Ac(e))}catch(e){Xa.error("Error clearing in-progress survey state from localStorage",e)}};function Hc(e,t){void 0===t&&(t=!1);var n="PostHogSurvey-"+e.id;return t?"."+n:n}var jc=0;function Uc(e,t,n,r,i,o){var s,a,u={};for(a in t)"ref"==a?s=t[a]:u[a]=t[a];var l={type:e,props:u,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--jc,__i:-1,__u:0,__source:i,__self:o};if("function"==typeof e&&(s=e.defaultProps))for(a in s)void 0===u[a]&&(u[a]=s[a]);return Zi.vnode&&Zi.vnode(l),l}var Vc=Uc("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Uc("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm146 272q66 0 121.5-35.5T682-393h-52q-23 40-63 61.5T480.5-310q-46.5 0-87-21T331-393h-53q26 61 81 96.5T480-261Zm0 181q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),zc=Uc("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Uc("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm20 194h253v-49H354v49ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Bc=Uc("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Uc("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm146.174 116Q413-417 358.5-379.5T278-280h53q22-42 62.173-65t87.5-23Q528-368 567.5-344.5T630-280h52q-25-63-79.826-100-54.826-37-122-37ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Wc=Uc("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Uc("path",{d:"M480-417q-67 0-121.5 37.5T278-280h404q-25-63-80-100t-122-37Zm-183-72 50-45 45 45 31-36-45-45 45-45-31-36-45 45-50-45-31 36 45 45-45 45 31 36Zm272 0 44-45 51 45 31-36-45-45 45-45-31-36-51 45-44-45-31 36 44 45-44 45 31 36ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142 0 241-99t99-241q0-142-99-241t-241-99q-142 0-241 99t-99 241q0 142 99 241t241 99Z"})}),Gc=Uc("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Uc("path",{d:"M479.504-261Q537-261 585.5-287q48.5-26 78.5-72.4 6-11.6-.75-22.6-6.75-11-20.25-11H316.918Q303-393 296.5-382t-.5 22.6q30 46.4 78.5 72.4 48.5 26 105.004 26ZM347-578l27 27q7.636 8 17.818 8Q402-543 410-551q8-8 8-18t-8-18l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.636-8 17.818Q276-559 284-551q8 8 18 8t18-8l27-27Zm267 0 27 27q7.714 8 18 8t18-8q8-7.636 8-17.818Q685-579 677-587l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.714-8 18t8 18q7.636 8 17.818 8Q579-543 587-551l27-27ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Zc=Uc("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"close-survey-title",children:[Uc("title",{id:"close-survey-title",children:"Close survey"}),Uc("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.164752 0.164752C0.384422 -0.0549175 0.740578 -0.0549175 0.960248 0.164752L6 5.20451L11.0398 0.164752C11.2594 -0.0549175 11.6156 -0.0549175 11.8352 0.164752C12.0549 0.384422 12.0549 0.740578 11.8352 0.960248L6.79549 6L11.8352 11.0398C12.0549 11.2594 12.0549 11.6156 11.8352 11.8352C11.6156 12.0549 11.2594 12.0549 11.0398 11.8352L6 6.79549L0.960248 11.8352C0.740578 12.0549 0.384422 12.0549 0.164752 11.8352C-0.0549175 11.6156 -0.0549175 11.2594 0.164752 11.0398L5.20451 6L0.164752 0.960248C-0.0549175 0.740578 -0.0549175 0.384422 0.164752 0.164752Z",fill:"black"})]}),Yc=Uc("svg",{width:"77",height:"14",viewBox:"0 0 77 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Uc("g",{"clip-path":"url(#clip0_2415_6911)",children:[Uc("mask",{id:"mask0_2415_6911",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"77",height:"14",children:Uc("path",{d:"M0.5 0H76.5V14H0.5V0Z",fill:"white"})}),Uc("g",{mask:"url(#mask0_2415_6911)",children:[Uc("path",{d:"M5.77226 8.02931C5.59388 8.37329 5.08474 8.37329 4.90634 8.02931L4.4797 7.20672C4.41155 7.07535 4.41155 6.9207 4.4797 6.78933L4.90634 5.96669C5.08474 5.62276 5.59388 5.62276 5.77226 5.96669L6.19893 6.78933C6.26709 6.9207 6.26709 7.07535 6.19893 7.20672L5.77226 8.02931ZM5.77226 12.6946C5.59388 13.0386 5.08474 13.0386 4.90634 12.6946L4.4797 11.872C4.41155 11.7406 4.41155 11.586 4.4797 11.4546L4.90634 10.632C5.08474 10.288 5.59388 10.288 5.77226 10.632L6.19893 11.4546C6.26709 11.586 6.26709 11.7406 6.19893 11.872L5.77226 12.6946Z",fill:"#1D4AFF"}),Uc("path",{d:"M0.5 10.9238C0.5 10.508 1.02142 10.2998 1.32637 10.5938L3.54508 12.7327C3.85003 13.0267 3.63405 13.5294 3.20279 13.5294H0.984076C0.716728 13.5294 0.5 13.3205 0.5 13.0627V10.9238ZM0.5 8.67083C0.5 8.79459 0.551001 8.91331 0.641783 9.00081L5.19753 13.3927C5.28831 13.4802 5.41144 13.5294 5.53982 13.5294H8.0421C8.47337 13.5294 8.68936 13.0267 8.3844 12.7327L1.32637 5.92856C1.02142 5.63456 0.5 5.84278 0.5 6.25854V8.67083ZM0.5 4.00556C0.5 4.12932 0.551001 4.24802 0.641783 4.33554L10.0368 13.3927C10.1276 13.4802 10.2508 13.5294 10.3791 13.5294H12.8814C13.3127 13.5294 13.5287 13.0267 13.2237 12.7327L1.32637 1.26329C1.02142 0.969312 0.5 1.17752 0.5 1.59327V4.00556ZM5.33931 4.00556C5.33931 4.12932 5.39033 4.24802 5.4811 4.33554L14.1916 12.7327C14.4965 13.0267 15.0179 12.8185 15.0179 12.4028V9.99047C15.0179 9.86671 14.9669 9.74799 14.8762 9.66049L6.16568 1.26329C5.86071 0.969307 5.33931 1.17752 5.33931 1.59327V4.00556ZM11.005 1.26329C10.7 0.969307 10.1786 1.17752 10.1786 1.59327V4.00556C10.1786 4.12932 10.2296 4.24802 10.3204 4.33554L14.1916 8.06748C14.4965 8.36148 15.0179 8.15325 15.0179 7.7375V5.3252C15.0179 5.20144 14.9669 5.08272 14.8762 4.99522L11.005 1.26329Z",fill:"#F9BD2B"}),Uc("path",{d:"M21.0852 10.981L16.5288 6.58843C16.2238 6.29443 15.7024 6.50266 15.7024 6.91841V13.0627C15.7024 13.3205 15.9191 13.5294 16.1865 13.5294H23.2446C23.5119 13.5294 23.7287 13.3205 23.7287 13.0627V12.5032C23.7287 12.2455 23.511 12.0396 23.2459 12.0063C22.4323 11.9042 21.6713 11.546 21.0852 10.981ZM18.0252 12.0365C17.5978 12.0365 17.251 11.7021 17.251 11.2901C17.251 10.878 17.5978 10.5436 18.0252 10.5436C18.4527 10.5436 18.7996 10.878 18.7996 11.2901C18.7996 11.7021 18.4527 12.0365 18.0252 12.0365Z",fill:"currentColor"}),Uc("path",{d:"M0.5 13.0627C0.5 13.3205 0.716728 13.5294 0.984076 13.5294H3.20279C3.63405 13.5294 3.85003 13.0267 3.54508 12.7327L1.32637 10.5938C1.02142 10.2998 0.5 10.508 0.5 10.9238V13.0627ZM5.33931 5.13191L1.32637 1.26329C1.02142 0.969306 0.5 1.17752 0.5 1.59327V4.00556C0.5 4.12932 0.551001 4.24802 0.641783 4.33554L5.33931 8.86412V5.13191ZM1.32637 5.92855C1.02142 5.63455 0.5 5.84278 0.5 6.25853V8.67083C0.5 8.79459 0.551001 8.91331 0.641783 9.00081L5.33931 13.5294V9.79717L1.32637 5.92855Z",fill:"#1D4AFF"}),Uc("path",{d:"M10.1787 5.3252C10.1787 5.20144 10.1277 5.08272 10.0369 4.99522L6.16572 1.26329C5.8608 0.969306 5.33936 1.17752 5.33936 1.59327V4.00556C5.33936 4.12932 5.39037 4.24802 5.48114 4.33554L10.1787 8.86412V5.3252ZM5.33936 13.5294H8.04214C8.47341 13.5294 8.6894 13.0267 8.38443 12.7327L5.33936 9.79717V13.5294ZM5.33936 5.13191V8.67083C5.33936 8.79459 5.39037 8.91331 5.48114 9.00081L10.1787 13.5294V9.99047C10.1787 9.86671 10.1277 9.74803 10.0369 9.66049L5.33936 5.13191Z",fill:"#F54E00"}),Uc("path",{d:"M29.375 11.6667H31.3636V8.48772H33.0249C34.8499 8.48772 36.0204 7.4443 36.0204 5.83052C36.0204 4.21681 34.8499 3.17334 33.0249 3.17334H29.375V11.6667ZM31.3636 6.84972V4.81136H32.8236C33.5787 4.81136 34.0318 5.19958 34.0318 5.83052C34.0318 6.4615 33.5787 6.84972 32.8236 6.84972H31.3636ZM39.618 11.7637C41.5563 11.7637 42.9659 10.429 42.9659 8.60905C42.9659 6.78905 41.5563 5.45438 39.618 5.45438C37.6546 5.45438 36.2701 6.78905 36.2701 8.60905C36.2701 10.429 37.6546 11.7637 39.618 11.7637ZM38.1077 8.60905C38.1077 7.63838 38.7118 6.97105 39.618 6.97105C40.5116 6.97105 41.1157 7.63838 41.1157 8.60905C41.1157 9.57972 40.5116 10.2471 39.618 10.2471C38.7118 10.2471 38.1077 9.57972 38.1077 8.60905ZM46.1482 11.7637C47.6333 11.7637 48.6402 10.8658 48.6402 9.81025C48.6402 7.33505 45.2294 8.13585 45.2294 7.16518C45.2294 6.8983 45.5189 6.72843 45.9342 6.72843C46.3622 6.72843 46.8782 6.98318 47.0418 7.54132L48.527 6.94678C48.2375 6.06105 47.1677 5.45438 45.8713 5.45438C44.4743 5.45438 43.6058 6.25518 43.6058 7.21372C43.6058 9.53118 46.9663 8.88812 46.9663 9.84665C46.9663 10.1864 46.6391 10.417 46.1482 10.417C45.4434 10.417 44.9525 9.94376 44.8015 9.3735L43.3164 9.93158C43.6436 10.8537 44.6001 11.7637 46.1482 11.7637ZM53.4241 11.606L53.2982 10.0651C53.0843 10.1743 52.8074 10.2106 52.5808 10.2106C52.1278 10.2106 51.8257 9.89523 51.8257 9.34918V7.03172H53.3612V5.55145H51.8257V3.78001H49.9755V5.55145H48.9687V7.03172H49.9755V9.57972C49.9755 11.06 51.0202 11.7637 52.3921 11.7637C52.7696 11.7637 53.122 11.7031 53.4241 11.606ZM59.8749 3.17334V6.47358H56.376V3.17334H54.3874V11.6667H56.376V8.11158H59.8749V11.6667H61.8761V3.17334H59.8749ZM66.2899 11.7637C68.2281 11.7637 69.6378 10.429 69.6378 8.60905C69.6378 6.78905 68.2281 5.45438 66.2899 5.45438C64.3265 5.45438 62.942 6.78905 62.942 8.60905C62.942 10.429 64.3265 11.7637 66.2899 11.7637ZM64.7796 8.60905C64.7796 7.63838 65.3837 6.97105 66.2899 6.97105C67.1835 6.97105 67.7876 7.63838 67.7876 8.60905C67.7876 9.57972 67.1835 10.2471 66.2899 10.2471C65.3837 10.2471 64.7796 9.57972 64.7796 8.60905ZM73.2088 11.4725C73.901 11.4725 74.5177 11.242 74.845 10.8416V11.424C74.845 12.1034 74.2786 12.5767 73.4102 12.5767C72.7935 12.5767 72.2523 12.2854 72.1642 11.788L70.4776 12.0428C70.7042 13.1955 71.925 13.972 73.4102 13.972C75.361 13.972 76.6574 12.8679 76.6574 11.2298V5.55145H74.8324V6.07318C74.4926 5.69705 73.9136 5.45438 73.171 5.45438C71.409 5.45438 70.3014 6.61918 70.3014 8.46345C70.3014 10.3077 71.409 11.4725 73.2088 11.4725ZM72.1012 8.46345C72.1012 7.55345 72.655 6.97105 73.5109 6.97105C74.3793 6.97105 74.9331 7.55345 74.9331 8.46345C74.9331 9.37345 74.3793 9.95585 73.5109 9.95585C72.655 9.95585 72.1012 9.37345 72.1012 8.46345Z",fill:"currentColor"})]})]}),Uc("defs",{children:Uc("clipPath",{id:"clip0_2415_6911",children:Uc("rect",{width:"76",height:"14",fill:"white",transform:"translate(0.5)"})})})]});function Qc(){return Uc("a",{href:"https://posthog.com/surveys",target:"_blank",rel:"noopener",className:"footer-branding",children:["Survey by ",Yc]})}function Xc(e){var t=e.text,n=e.submitDisabled,r=e.appearance,i=e.onSubmit,o=e.link,s=e.onPreviewSubmit,a=e.skipSubmitButton,u=Zo(Fc).isPreviewMode;return Uc("div",{className:"bottom-section",children:[!a&&Uc("button",{className:"form-submit",disabled:n,"aria-label":"Submit survey",type:"button",onClick:function(){o&&(null==ps||ps.open(o)),u?null==s||s():i()},children:t}),!r.whiteLabel&&Uc(Qc,{})]})}function Jc(e){var t=e.question,n=e.forceDisableHtml,r=e.htmlFor;return Uc("div",{class:"question-header",children:[Uc(t.type===as.Open?"label":"h3",{className:"survey-question",htmlFor:r,children:t.question}),t.description&&Rc({component:ao("p",{className:"survey-question-description"}),children:t.description,renderAsHtml:!n&&"text"!==t.descriptionContentType})]})}function Kc(e){return Uc("button",{className:"form-cancel",onClick:e.onClick,disabled:Zo(Fc).isPreviewMode,"aria-label":"Close survey",type:"button",children:Zc})}Uc("svg",{width:"16",height:"12",viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Uc("path",{d:"M5.30769 10.6923L4.77736 11.2226C4.91801 11.3633 5.10878 11.4423 5.30769 11.4423C5.5066 11.4423 5.69737 11.3633 5.83802 11.2226L5.30769 10.6923ZM15.5303 1.53033C15.8232 1.23744 15.8232 0.762563 15.5303 0.46967C15.2374 0.176777 14.7626 0.176777 14.4697 0.46967L15.5303 1.53033ZM1.53033 5.85429C1.23744 5.56139 0.762563 5.56139 0.46967 5.85429C0.176777 6.14718 0.176777 6.62205 0.46967 6.91495L1.53033 5.85429ZM5.83802 11.2226L15.5303 1.53033L14.4697 0.46967L4.77736 10.162L5.83802 11.2226ZM0.46967 6.91495L4.77736 11.2226L5.83802 10.162L1.53033 5.85429L0.46967 6.91495Z",fill:"currentColor"})});var ed=ps;function td(e){var t=e.header,n=e.description,r=e.contentType,i=e.forceDisableHtml,o=e.appearance,s=e.onClose,a=Zo(Fc).isPopup;return Bo((function(){var e=function(e){"Enter"!==e.key&&"Escape"!==e.key||(e.preventDefault(),s())};return Qa(ed,"keydown",e),function(){ed.removeEventListener("keydown",e)}}),[s]),Uc("div",{className:"thank-you-message",role:"status",tabIndex:0,"aria-atomic":"true",children:[a&&!0!==o.hideCancelButton&&Uc(Kc,{onClick:function(){return s()}}),Uc("h3",{className:"thank-you-message-header",children:t}),n&&Rc({component:ao("p",{className:"thank-you-message-body"}),children:n,renderAsHtml:!i&&"text"!==r}),a&&Uc(Xc,{text:o.thankYouMessageCloseButtonText||"Close",submitDisabled:!1,appearance:o,onSubmit:function(){return s()}})]})}var nd=function(e){return qs(e)&&e.every((function(e){return Us(e)}))};function rd(e){var t=e.question,n=e.forceDisableHtml,r=e.appearance,i=e.onSubmit,o=e.onPreviewSubmit,s=e.displayQuestionIndex,a=e.initialValue,u=Lc().isPreviewMode,l=Wo(null),c=zo((function(){return Us(a)?a:""})),d=c[0],f=c[1];Bo((function(){setTimeout((function(){var e;u||(null==(e=l.current)||e.focus())}),100)}),[u]);var p="surveyQuestion"+s;return Uc(lo,{children:[Uc("div",{className:"question-container",children:[Uc(Jc,{question:t,forceDisableHtml:n,htmlFor:p}),Uc("textarea",{ref:l,id:p,rows:4,placeholder:null==r?void 0:r.placeholder,onInput:function(e){f(e.currentTarget.value),e.stopPropagation()},onKeyDown:function(e){e.stopPropagation()},value:d})]}),Uc(Xc,{text:t.buttonText||"Submit",submitDisabled:!d&&!t.optional,appearance:r,onSubmit:function(){return i(d)},onPreviewSubmit:function(){return o(d)}})]})}function id(e){var t=e.question,n=e.forceDisableHtml,r=e.appearance,i=e.onSubmit,o=e.onPreviewSubmit;return Uc(lo,{children:[Uc("div",{className:"question-container",children:Uc(Jc,{question:t,forceDisableHtml:n})}),Uc(Xc,{text:t.buttonText||"Submit",submitDisabled:!1,link:t.link,appearance:r,onSubmit:function(){return i("link clicked")},onPreviewSubmit:function(){return o("link clicked")}})]})}function od(e){var t=e.question,n=e.forceDisableHtml,r=e.displayQuestionIndex,i=e.appearance,o=e.onSubmit,s=e.onPreviewSubmit,a=e.initialValue,u=t.scale,l=10===t.scale?0:1,c=zo((function(){return Ws(a)?a:qs(a)&&a.length>0&&Ws(parseInt(a[0]))?parseInt(a[0]):Us(a)&&Ws(parseInt(a))?parseInt(a):null})),d=c[0],f=c[1],p=Lc().isPreviewMode,_=function(e){return p?s(e):o(e)};return Uc(lo,{children:[Uc("div",{className:"question-container",children:[Uc(Jc,{question:t,forceDisableHtml:n}),Uc("div",{className:"rating-section",children:[Uc("div",{className:"rating-options",children:["emoji"===t.display&&Uc("div",{className:"rating-options-emoji",children:(3===t.scale?ud:ld).map((function(e,n){return Uc("button",{"aria-label":"Rate "+(n+1),className:"ratings-emoji question-"+r+"-rating-"+n+" "+(n+1===d?"rating-active":""),value:n+1,type:"button",onClick:function(){var e=n+1;f(e),t.skipSubmitButton&&_(e)},children:e},n)}))}),"number"===t.display&&Uc("div",{className:"rating-options-number",style:{gridTemplateColumns:"repeat("+(u-l+1)+", minmax(0, 1fr))"},children:pd(t.scale).map((function(e,n){return Uc(sd,{displayQuestionIndex:r,active:d===e,appearance:i,num:e,setActiveNumber:function(e){f(e),t.skipSubmitButton&&_(e)}},n)}))})]}),Uc("div",{className:"rating-text",children:[Uc("div",{children:t.lowerBoundLabel}),Uc("div",{children:t.upperBoundLabel})]})]})]}),Uc(Xc,{text:t.buttonText||(null==i?void 0:i.submitButtonText)||"Submit",submitDisabled:zs(d)&&!t.optional,appearance:i,onSubmit:function(){return o(d)},onPreviewSubmit:function(){return s(d)},skipSubmitButton:t.skipSubmitButton})]})}function sd(e){var t=e.num,n=e.active,r=e.displayQuestionIndex,i=e.setActiveNumber;return Uc("button",{"aria-label":"Rate "+t,className:"ratings-number question-"+r+"-rating-"+t+" "+(n?"rating-active":""),type:"button",onClick:function(){i(t)},children:t})}function ad(e){var t=e.question,n=e.forceDisableHtml,r=e.displayQuestionIndex,i=e.appearance,o=e.onSubmit,s=e.onPreviewSubmit,a=e.initialValue,u=Wo(null),l=Go((function(){return function(e){if(!e.shuffleOptions)return e.choices;var t=e.choices,n="";e.hasOpenChoice&&(n=t.pop());var r=Cc(t,Pc(t));return e.hasOpenChoice&&(e.choices.push(n),r.push(n)),r}(t)}),[t]),c=zo((function(){return function(e,t){return Us(e)||nd(e)?e:t===as.SingleChoice?null:[]}(a,t.type)})),d=c[0],f=c[1],p=zo((function(){return function(e,t){if(Us(e)&&!t.includes(e))return{isSelected:!0,inputValue:e};if(nd(e)){var n=e.find((function(e){return!t.includes(e)}));if(n)return{isSelected:!0,inputValue:n}}return{isSelected:!1,inputValue:""}}(a,l)})),_=p[0],h=p[1],v=Lc().isPreviewMode,g=t.type===as.SingleChoice,m=t.type===as.MultipleChoice,y=t.skipSubmitButton&&g&&!t.hasOpenChoice,b=function(e,t){if(t){var n=!_.isSelected;return h((function(e){return Ui({},e,{isSelected:n,inputValue:n?e.inputValue:""})})),g&&f(""),void(n&&setTimeout((function(){var e;return null==(e=u.current)?void 0:e.focus()}),75))}if(g)return f(e),h((function(e){return Ui({},e,{isSelected:!1,inputValue:""})})),void(y&&(o(e),v&&s(e)));m&&qs(d)&&(d.includes(e)?f(d.filter((function(t){return t!==e}))):f([].concat(d,[e])))},w=function(e){e.stopPropagation();var t=e.currentTarget.value;h((function(e){return Ui({},e,{inputValue:t})})),g&&f(t)},S=function(e){e.stopPropagation(),"Enter"!==e.key||x()||(e.preventDefault(),E()),"Escape"===e.key&&(e.preventDefault(),h((function(e){return Ui({},e,{isSelected:!1,inputValue:""})})),g&&f(null))},x=function(){return!t.optional&&(!!zs(d)||(!(!qs(d)||_.isSelected||0!==d.length)||!(!_.isSelected||""!==_.inputValue.trim())))},E=function(){_.isSelected&&m?qs(d)&&(v?s([].concat(d,[_.inputValue])):o([].concat(d,[_.inputValue]))):v?s(d):o(d)};return Uc(lo,{children:[Uc("div",{className:"question-container",children:[Uc(Jc,{question:t,forceDisableHtml:n}),Uc("fieldset",{className:"multiple-choice-options limit-height",children:[Uc("legend",{className:"sr-only",children:m?" Select all that apply":" Select one"}),l.map((function(e,n){var i=!!t.hasOpenChoice&&n===t.choices.length-1,o="surveyQuestion"+r+"Choice"+n,s=o+"Open",a=i?_.isSelected:g?d===e:qs(d)&&d.includes(e);return Uc("label",{className:i?"choice-option-open":"",children:[Uc("div",{className:"response-choice",children:[Uc("input",{type:g?"radio":"checkbox",name:o,checked:a,onChange:function(){return b(e,i)},id:o,"aria-controls":s}),Uc("span",{children:i?e+":":e})]}),i&&Uc("input",{type:"text",ref:u,id:s,name:"question"+r+"Open",value:_.inputValue,onKeyDown:S,onInput:w,onClick:function(t){_.isSelected||b(e,!0),t.stopPropagation()},"aria-label":e+" - please specify"})]},n)}))]})]}),Uc(Xc,{text:t.buttonText||"Submit",submitDisabled:x(),appearance:i,onSubmit:E,onPreviewSubmit:E,skipSubmitButton:y})]})}var ud=[Bc,zc,Vc],ld=[Wc,Bc,zc,Vc,Gc],cd=[1,2,3,4,5],dd=[1,2,3,4,5,6,7],fd=[0,1,2,3,4,5,6,7,8,9,10];function pd(e){switch(e){case 5:default:return cd;case 7:return dd;case 10:return fd}}var _d=ps,hd=ys,vd="ph:show_survey_widget",gd="PHWidgetSurveyClickListener";function md(e,t,n){var r,i=e.questions[t],o=t+1;if(null==(r=i.branching)||!r.type)return t===e.questions.length-1?us.End:o;if(i.branching.type===us.End)return us.End;if(i.branching.type===us.SpecificQuestion){if(Number.isInteger(i.branching.index))return i.branching.index}else if(i.branching.type===us.ResponseBased){if(i.type===as.SingleChoice){var s,a=i.choices.indexOf(""+n);if(-1===a&&i.hasOpenChoice&&(a=i.choices.length-1),null!=(s=i.branching)&&null!=(s=s.responseValues)&&s.hasOwnProperty(a)){var u=i.branching.responseValues[a];return Number.isInteger(u)?u:u===us.End?us.End:o}}else if(i.type===as.Rating){var l;if("number"!=typeof n||!Number.isInteger(n))throw new Error("The response type must be an integer");var c=function(e,t){if(3===t){if(e<1||e>3)throw new Error("The response must be in range 1-3");return 1===e?"negative":2===e?"neutral":"positive"}if(5===t){if(e<1||e>5)throw new Error("The response must be in range 1-5");return e<=2?"negative":3===e?"neutral":"positive"}if(7===t){if(e<1||e>7)throw new Error("The response must be in range 1-7");return e<=3?"negative":4===e?"neutral":"positive"}if(10===t){if(e<0||e>10)throw new Error("The response must be in range 0-10");return e<=6?"detractors":e<=8?"passives":"promoters"}throw new Error("The scale must be one of: 3, 5, 7, 10")}(n,i.scale);if(null!=(l=i.branching)&&null!=(l=l.responseValues)&&l.hasOwnProperty(c)){var d=i.branching.responseValues[c];return Number.isInteger(d)?d:d===us.End?us.End:o}}return o}return Xa.warn("Falling back to next question index due to unexpected branching type"),o}var yd=250,bd=20,wd=12;var Sd=function(){function e(e){var t=this;this._surveyTimeouts=new Map,this._widgetSelectorListeners=new Map,this._prefillHandledSurveys=new Set,this.handlePopoverSurvey=function(e){var n;t._clearSurveyTimeout(e.id),t._addSurveyToFocus(e);var r=(null==(n=e.appearance)?void 0:n.surveyPopupDelaySeconds)||0,i=Sc(e,t._posthog).shadow;if(r<=0)return Io(Uc(Cd,{posthog:t._posthog,survey:e,removeSurveyFromFocus:t._removeSurveyFromFocus}),i);var o=setTimeout((function(){if(t._surveyTimeouts.delete(e.id),!Mc(e))return t._removeSurveyFromFocus(e);Io(Uc(Cd,{posthog:t._posthog,survey:Ui({},e,{appearance:Ui({},e.appearance,{surveyPopupDelaySeconds:0})}),removeSurveyFromFocus:t._removeSurveyFromFocus}),i)}),1e3*r);t._surveyTimeouts.set(e.id,o)},this._handleWidget=function(e){var n=Sc(e,t._posthog),r=n.shadow;n.isNewlyCreated&&Io(Uc(Id,{posthog:t._posthog,survey:e},e.id),r)},this._removeWidgetSelectorListener=function(e){t._removeSurveyFromDom(e);var n=t._widgetSelectorListeners.get(e.id);n&&(n.element.removeEventListener("click",n.listener),n.element.removeAttribute(gd),t._widgetSelectorListeners.delete(e.id),Xa.info("Removed click listener for survey "+e.id))},this._manageWidgetSelectorListener=function(e,n){var r=hd.querySelector(n),i=t._widgetSelectorListeners.get(e.id);if(r){if(t._handleWidget(e),i){if(r===i.element)return;Xa.info("Selector element changed for survey "+e.id+". Re-attaching listener."),t._removeWidgetSelectorListener(e)}if(!r.hasAttribute(gd)){var o=function(t){var n,r;t.stopPropagation();var i=(null==(n=e.appearance)?void 0:n.position)===is.NextToTrigger?function(e,t){try{var n=e.getBoundingClientRect(),r=_d.innerHeight,i=_d.innerWidth,o=yd,s=n.left+n.width/2-t/2;s+t>i-bd&&(s=i-t-bd),s<bd&&(s=bd);var a=wd,u=r-n.bottom,l=n.top,c=u<o&&l>u;return{position:"fixed",top:c?"auto":n.bottom+a+"px",left:s+"px",right:"auto",bottom:c?r-n.top+a+"px":"auto",zIndex:mc.zIndex}}catch(e){return Xa.warn("Failed to calculate trigger position:",e),null}}(t.currentTarget,parseInt((null==(r=e.appearance)?void 0:r.maxWidth)||mc.maxWidth)):{};_d.dispatchEvent(new CustomEvent(vd,{detail:{surveyId:e.id,position:i}}))};Qa(r,"click",o),r.setAttribute(gd,"true"),t._widgetSelectorListeners.set(e.id,{element:r,listener:o,survey:e}),Xa.info("Attached click listener for feedback button survey "+e.id)}}else i&&t._removeWidgetSelectorListener(e)},this.renderPopover=function(e){var n=Sc(e,t._posthog).shadow;Io(Uc(Cd,{posthog:t._posthog,survey:e,removeSurveyFromFocus:t._removeSurveyFromFocus}),n)},this.renderSurvey=function(e,n){var r;null!=(r=t._posthog.config)&&null!=(r=r.surveys)&&r.prefillFromUrl&&t._handleUrlPrefill(e),Io(Uc(Cd,{posthog:t._posthog,survey:e,removeSurveyFromFocus:t._removeSurveyFromFocus,isPopup:!1}),n)},this.getActiveMatchingSurveys=function(e,n){var r;void 0===n&&(n=!1),null==(r=t._posthog)||r.surveys.getSurveys((function(n){var r=n.filter((function(e){return t.checkSurveyEligibility(e).eligible&&t._isSurveyConditionMatched(e)&&t._hasActionOrEventTriggeredSurvey(e)&&t._checkFlags(e)}));e(r)}),n)},this.callSurveysAndEvaluateDisplayLogic=function(e){void 0===e&&(e=!1),t.getActiveMatchingSurveys((function(e){var n=e.filter((function(e){return e.type===ss.Popover||e.type===ss.Widget})),r=t._sortSurveysByAppearanceDelay(n),i=new Set;r.forEach((function(e){if(e.type===ss.Widget){var n,r,o,s;if((null==(n=e.appearance)?void 0:n.widgetType)===rs.Tab)return void t._handleWidget(e);if((null==(r=e.appearance)?void 0:r.widgetType)===rs.Selector&&null!=(o=e.appearance)&&o.widgetSelector)i.add(e.id),t._manageWidgetSelectorListener(e,null==(s=e.appearance)?void 0:s.widgetSelector)}zs(t._surveyInFocus)&&e.type===ss.Popover&&t.handlePopoverSurvey(e)})),t._widgetSelectorListeners.forEach((function(e){var n=e.survey;i.has(n.id)||t._removeWidgetSelectorListener(n)}))}),e)},this._addSurveyToFocus=function(e){zs(t._surveyInFocus)||Xa.error("Survey "+t._surveyInFocus+" already in focus. Cannot add survey "+e.id+"."),t._surveyInFocus=e.id},this._removeSurveyFromFocus=function(e){t._surveyInFocus!==e.id&&Xa.error("Survey "+e.id+" is not in focus. Cannot remove survey "+e.id+"."),t._clearSurveyTimeout(e.id),t._surveyInFocus=null,t._removeSurveyFromDom(e)},this._posthog=e,this._surveyInFocus=null}var t=e.prototype;return t._clearSurveyTimeout=function(e){var t=this._surveyTimeouts.get(e);t&&(clearTimeout(t),this._surveyTimeouts.delete(e))},t.cancelSurvey=function(e){this._surveyTimeouts.has(e)&&(Xa.info("Cancelled pending survey "+e),this._clearSurveyTimeout(e),this._surveyInFocus===e&&(this._surveyInFocus=null))},t._sortSurveysByAppearanceDelay=function(e){return e.sort((function(e,t){var n,r,i=$c(e),o=$c(t);if(i&&!o)return-1;if(!i&&o)return 1;var s=e.schedule===ls.Always,a=t.schedule===ls.Always;return s&&!a?1:!s&&a?-1:((null==(n=e.appearance)?void 0:n.surveyPopupDelaySeconds)||0)-((null==(r=t.appearance)?void 0:r.surveyPopupDelaySeconds)||0)}))},t._handleUrlPrefill=function(e){if(!this._prefillHandledSurveys.has(e.id))try{var t=function(e){var t={},n=!1,r=e.replace(/^\?/,"");if(!r)return{params:t,autoSubmit:n};for(var i,o=ji(r.split("&"));!(i=o()).done;){var s=i.value.split("="),a=s[0],u=s[1];if(a&&!js(u)){var l=decodeURIComponent(a),c=decodeURIComponent(u);if("auto_submit"!==l||"true"!==c){var d=l.match(/^q(\d+)$/);if(d){var f=parseInt(d[1],10);t[f]||(t[f]=[]),t[f].push(c)}}else n=!0}}return{params:t,autoSubmit:n}}(_d.location.search),n=t.params;if(0===Object.keys(n).length)return;Xa.info("[Survey Prefill] Detected URL prefill parameters");var r=function(e,t){var n={};return e.questions.forEach((function(e,r){if(t[r]&&e.id){var i=t[r],o=vc(e.id);try{switch(e.type){case as.SingleChoice:if(!e.choices||0===e.choices.length)return void Aa.warn("[Survey Prefill] Question "+r+" has no choices");var s=parseInt(i[0],10);if(isNaN(s)||s<0||s>=e.choices.length)return void Aa.warn("[Survey Prefill] Invalid choice index for q"+r+": "+i[0]);n[o]=e.choices[s];break;case as.MultipleChoice:if(!e.choices||0===e.choices.length)return void Aa.warn("[Survey Prefill] Question "+r+" has no choices");var a=i.map((function(e){return parseInt(e,10)})).filter((function(t){return!isNaN(t)&&t>=0&&t<e.choices.length}));if(0===a.length)return void Aa.warn("[Survey Prefill] No valid choices for q"+r);var u=[].concat(new Set(a.map((function(t){return e.choices[t]}))));u.length<a.length&&Aa.warn("[Survey Prefill] Removed duplicate choices for q"+r),n[o]=u;break;case as.Rating:var l=parseInt(i[0],10),c=e.scale||10;if(isNaN(l)||l<0||l>c)return void Aa.warn("[Survey Prefill] Invalid rating for q"+r+": "+i[0]+" (scale: 0-"+c+")");n[o]=l;break;default:Aa.info("[Survey Prefill] Question type "+e.type+" does not support prefill")}}catch(e){Aa.error("[Survey Prefill] Error converting q"+r+":",e)}}})),n}(e,n);if(0===Object.keys(r).length)return void Xa.warn("[Survey Prefill] No valid responses after conversion");var i=hu(),o=Object.keys(n).map((function(e){return parseInt(e,10)})),s=function(e,t){for(var n=0,r=0;r<e.length&&t.includes(r);r++){var i=e[r];if(!(i&&"skipSubmitButton"in i&&i.skipSubmitButton))break;n=r+1}return n}(e.questions,o),a=s>=e.questions.length;Dc(e,{surveySubmissionId:i,responses:r,lastQuestionIndex:a?e.questions.length-1:s}),Xa.info("[Survey Prefill] Stored prefilled responses in localStorage"),(e.enable_partial_responses||a)&&(Xa.info("[Survey Prefill] Auto-submitting survey (completed: "+a+")"),Ec({responses:r,survey:e,surveySubmissionId:i,posthog:this._posthog,isSurveyCompleted:a})),this._prefillHandledSurveys.add(e.id)}catch(e){Xa.error("[Survey Prefill] Error handling URL prefill:",e)}},t._isSurveyFeatureFlagEnabled=function(e,t){if(void 0===t&&(t=void 0),!e)return!0;var n=!!this._posthog.featureFlags.isFeatureEnabled(e,{send_event:!e.startsWith("survey-targeting-")}),r=!0;t&&(r=this._posthog.featureFlags.getFeatureFlag(e,{send_event:!1})===t||"any"===t);return n&&r},t._isSurveyConditionMatched=function(e){return!e.conditions||Mc(e)&&function(e){var t,n,r;if(null==(t=e.conditions)||!t.deviceTypes||0===(null==(n=e.conditions)?void 0:n.deviceTypes.length))return!0;if(!Es)return!1;var i=pl(Es);return cc[Oc(null==(r=e.conditions)?void 0:r.deviceTypesMatchType)](e.conditions.deviceTypes,[i])}(e)&&function(e){var t;return null==(t=e.conditions)||!t.selector||!(null==hc||!hc.querySelector(e.conditions.selector))}(e)},t._internalFlagCheckSatisfied=function(e){return Ic(e)||this._isSurveyFeatureFlagEnabled(e.internal_targeting_flag_key)||$c(e)},t.checkSurveyEligibility=function(e){var t,n,r={eligible:!0,reason:void 0};if(!Ja(e))return r.eligible=!1,r.reason="Survey is not running. It was completed on "+e.end_date,r;if(!su.includes(e.type))return r.eligible=!1,r.reason="Surveys of type "+e.type+" are never eligible to be shown in the app",r;var i=null==(t=e.conditions)?void 0:t.linkedFlagVariant;return this._isSurveyFeatureFlagEnabled(e.linked_flag_key,i)?this._isSurveyFeatureFlagEnabled(e.targeting_flag_key)?this._internalFlagCheckSatisfied(e)?function(e){var t=localStorage.getItem("lastSeenSurveyDate");if(!e||!t)return!0;var n=new Date,r=Math.abs(n.getTime()-new Date(t).getTime());return Math.ceil(r/864e5)>e}(null==(n=e.conditions)?void 0:n.seenSurveyWaitPeriodInDays)?function(e){return!!localStorage.getItem(iu(e))&&!Ic(e)}(e)?(r.eligible=!1,r.reason="Survey has already been seen and it can't be activated again",r):r:(r.eligible=!1,r.reason="Survey wait period has not passed",r):(r.eligible=!1,r.reason="Survey internal targeting flag is not enabled and survey cannot activate repeatedly and survey is not in progress",r):(r.eligible=!1,r.reason="Survey targeting feature flag is not enabled",r):(r.eligible=!1,r.reason=i?"Survey linked feature flag is not enabled for variant "+i:"Survey linked feature flag is not enabled",r)},t._hasActionOrEventTriggeredSurvey=function(e){var t;if(!Ka(e)&&!eu(e))return!0;var n=null==(t=this._posthog.surveys._surveyEventReceiver)?void 0:t.getSurveys();return!(null==n||!n.includes(e.id))},t._checkFlags=function(e){var t,n=this;return null==(t=e.feature_flag_keys)||!t.length||e.feature_flag_keys.every((function(e){var t=e.key,r=e.value;return!t||!r||n._isSurveyFeatureFlagEnabled(r)}))},t._removeSurveyFromDom=function(e){try{var t=hd.querySelector(Hc(e,!0));null!=t&&t.shadowRoot&&Io(null,t.shadowRoot),null==t||t.remove()}catch(t){Xa.warn("Failed to remove survey "+e.id+" from DOM:",t)}},t.getTestAPI=function(){return{addSurveyToFocus:this._addSurveyToFocus,removeSurveyFromFocus:this._removeSurveyFromFocus,surveyInFocus:this._surveyInFocus,surveyTimeouts:this._surveyTimeouts,handleWidget:this._handleWidget,handlePopoverSurvey:this.handlePopoverSurvey,manageWidgetSelectorListener:this._manageWidgetSelectorListener,sortSurveysByAppearanceDelay:this._sortSurveysByAppearanceDelay,checkFlags:this._checkFlags.bind(this),isSurveyFeatureFlagEnabled:this._isSurveyFeatureFlagEnabled.bind(this)}},e}();function xd(e,t){if(hd&&_d){var n,r=new Sd(e);if(e.config.disable_surveys_automatic_display)return Xa.info("Surveys automatic display is disabled. Skipping call surveys and evaluate display logic."),r;if(!1===t)return Xa.info("There are no surveys to load or Surveys is disabled in the project settings."),r;r.callSurveysAndEvaluateDisplayLogic(!0);var i=function(){js(n)&&(n=setInterval((function(){r.callSurveysAndEvaluateDisplayLogic(!1)}),1e3))};return i(),Qa(hd,"visibilitychange",(function(){hd.hidden?js(n)||(clearInterval(n),n=void 0):(r.callSurveysAndEvaluateDisplayLogic(!1),i())})),r}}function Ed(e){var t=e.survey,n=e.removeSurveyFromFocus,r=void 0===n?function(){}:n,i=e.setSurveyVisible,o=e.isPreviewMode,s=void 0!==o&&o;Bo((function(){var e;if(!s&&null!=(e=t.conditions)&&e.url){var n=function(){var e,n=t.type===ss.Widget,o=Mc(t),s=(null==(e=t.appearance)?void 0:e.widgetType)===rs.Tab&&n;if(!o)return Xa.info("Hiding survey "+t.id+" because URL does not match"),i(!1),r(t);s&&(Xa.info("Showing survey "+t.id+" because it is a feedback button tab and URL matches"),i(!0))};Qa(_d,"popstate",n),Qa(_d,"hashchange",n);var o=_d.history.pushState,a=_d.history.replaceState;return _d.history.pushState=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];o.apply(this,t),n()},_d.history.replaceState=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];a.apply(this,t),n()},function(){_d.removeEventListener("popstate",n),_d.removeEventListener("hashchange",n),_d.history.pushState=o,_d.history.replaceState=a}}}),[s,t,r,i])}function kd(e,t,n){if(void 0===t&&(t=is.Right),e===ss.ExternalSurvey)return{};switch(t){case is.TopLeft:return{top:"0",left:"0",transform:"translate(30px, 30px)"};case is.TopRight:return{top:"0",right:"0",transform:"translate(-30px, 30px)"};case is.TopCenter:return{top:"0",left:"50%",transform:"translate(-50%, 30px)"};case is.MiddleLeft:return{top:"50%",left:"0",transform:"translate(30px, -50%)"};case is.MiddleRight:return{top:"50%",right:"0",transform:"translate(-30px, -50%)"};case is.MiddleCenter:return{top:"50%",left:"50%",transform:"translate(-50%, -50%)"};case is.Left:return{left:"30px"};case is.Center:return{left:"50%",transform:"translateX(-50%)"};default:case is.Right:return{right:e===ss.Widget&&n===rs.Tab?"60px":"30px"}}}function Pd(e){switch(void 0===e&&(e=os.Right),e){case os.Top:return{top:"0",left:"50%",transform:"translateX(-50%)"};case os.Left:return{top:"50%",left:"0",transform:"rotate(90deg) translateY(-100%)",transformOrigin:"left top"};case os.Bottom:return{bottom:"0",left:"50%",transform:"translateX(-50%)"};default:case os.Right:return{top:"50%",right:"0",transform:"rotate(-90deg) translateY(-100%)",transformOrigin:"right top"}}}function Cd(e){var t,n,r,i,o,s,a=e.survey,u=e.forceDisableHtml,l=e.posthog,c=e.style,d=void 0===c?{}:c,f=e.previewPageIndex,p=e.removeSurveyFromFocus,_=void 0===p?function(){}:p,h=e.isPopup,v=void 0===h||h,g=e.onPreviewSubmit,m=void 0===g?function(){}:g,y=e.onPopupSurveyDismissed,b=void 0===y?function(){}:y,w=e.onCloseConfirmationMessage,S=void 0===w?function(){}:w,x=Wo(null),E=Number.isInteger(f),k=null!=(t=a.appearance)&&t.surveyPopupDelaySeconds?1e3*a.appearance.surveyPopupDelaySeconds:0,P=function(e,t,n,r,i,o,s){var a=zo(r||0===n||e.type===ss.ExternalSurvey),u=a[0],l=a[1],c=zo(!1),d=c[0],f=c[1],p=function(){var t=function(){o&&i(e),l(!1)};hd.startViewTransition?hd.startViewTransition((function(){var e;null==s||null==(e=s.current)||e.remove()})).finished.then((function(){setTimeout((function(){t()}),100)})):t()},_=function(t){t.detail.surveyId===e.id&&p()};return Bo((function(){if(t){if(!r){var i=function(t){var n,r;if(t.detail.surveyId===e.id){if(null==(n=e.appearance)||!n.displayThankYouMessage)return p();f(!0),null!=(r=e.appearance)&&r.autoDisappear&&setTimeout((function(){p()}),5e3)}},o=function(){var n;Mc(e)&&(l(!0),_d.dispatchEvent(new Event("PHSurveyShown")),t.capture(cs.SHOWN,((n={})[ds.SURVEY_NAME]=e.name,n[ds.SURVEY_ID]=e.id,n[ds.SURVEY_ITERATION]=e.current_iteration,n[ds.SURVEY_ITERATION_START_DATE]=e.current_iteration_start_date,n.sessionRecordingUrl=null==t.get_session_replay_url?void 0:t.get_session_replay_url(),n)),localStorage.setItem("lastSeenSurveyDate",(new Date).toISOString()))};if(Qa(_d,"PHSurveyClosed",_),Qa(_d,"PHSurveySent",i),n>0){var s=setTimeout(o,n);return function(){clearTimeout(s),_d.removeEventListener("PHSurveyClosed",_),_d.removeEventListener("PHSurveySent",i)}}return o(),function(){_d.removeEventListener("PHSurveyClosed",_),_d.removeEventListener("PHSurveySent",i)}}}else Xa.error("usePopupVisibility hook called without a PostHog instance.")}),[]),Ed({survey:e,removeSurveyFromFocus:i,setSurveyVisible:l,isPreviewMode:r}),{isPopupVisible:u,isSurveySent:d,setIsPopupVisible:l,hidePopupWithViewTransition:p}}(a,l,k,E,_,v,x),C=P.isPopupVisible,T=P.isSurveySent,I=P.hidePopupWithViewTransition,F=T||f===a.questions.length,L=Go((function(){var e=qc(a);return{isPreviewMode:E,previewPageIndex:f,onPopupSurveyDismissed:function(){kc(a,l,E),b()},isPopup:v||!1,surveySubmissionId:(null==e?void 0:e.surveySubmissionId)||hu(),onPreviewSubmit:m,posthog:l}}),[E,f,v,l,a,b,m]);return C?Uc(Fc.Provider,{value:L,children:Uc("div",{className:"ph-survey",style:Ui({},kd(a.type,null==(n=a.appearance)?void 0:n.position,null==(r=a.appearance)?void 0:r.widgetType),d),ref:x,children:F?Uc(td,{header:(null==(i=a.appearance)?void 0:i.thankYouMessageHeader)||"Thank you!",description:(null==(o=a.appearance)?void 0:o.thankYouMessageDescription)||"",forceDisableHtml:!!u,contentType:null==(s=a.appearance)?void 0:s.thankYouMessageDescriptionContentType,appearance:a.appearance||mc,onClose:function(){I(),S()}}):Uc(Td,{survey:a,forceDisableHtml:!!u,posthog:l})})}):null}function Td(e){var t,n=e.survey,r=e.forceDisableHtml,i=e.posthog,o=zo((function(){var e=qc(n);return null!=e&&e.responses&&Xa.info("Survey is already in progress, filling in initial responses"),(null==e?void 0:e.responses)||{}})),s=o[0],a=o[1],u=Zo(Fc),l=u.previewPageIndex,c=u.onPopupSurveyDismissed,d=u.isPopup,f=u.onPreviewSubmit,p=u.surveySubmissionId,_=u.isPreviewMode,h=zo((function(){var e=qc(n);return l||(null==e?void 0:e.lastQuestionIndex)||0})),v=h[0],g=h[1],m=Go((function(){return Tc(n)}),[n]);Bo((function(){_&&!js(l)&&g(l)}),[l,_]);var y=m.at(v);return y?Uc("form",{className:"survey-form",name:"surveyForm",children:[d&&!0!==(null==(t=n.appearance)?void 0:t.hideCancelButton)&&Uc(Kc,{onClick:function(){c()}}),Uc("div",{className:"survey-box",children:Fd({question:y,forceDisableHtml:r,displayQuestionIndex:v,appearance:n.appearance||mc,onSubmit:function(e){return function(e){var t,r=e.res,o=e.displayQuestionIndex,u=e.questionId;if(i)if(u){var l=vc(u),c=Ui({},s,((t={})[l]=r,t));a(c);var d=md(n,o,r),f=d===us.End;f||(g(d),Dc(n,{surveySubmissionId:p,responses:c,lastQuestionIndex:d})),(n.enable_partial_responses||f)&&Ec({responses:c,survey:n,surveySubmissionId:p,isSurveyCompleted:f,posthog:i})}else Xa.error("onNextButtonClick called without a questionId.");else Xa.error("onNextButtonClick called without a PostHog instance.")}({res:e,displayQuestionIndex:v,questionId:y.id})},onPreviewSubmit:f,initialValue:y.id?s[vc(y.id)]:void 0})})]}):null}function Id(e){var t,n,r,i,o,s,a,u=e.survey,l=e.forceDisableHtml,c=e.posthog,d=e.readOnly,f=zo(!0),p=f[0],_=f[1],h=zo(!1),v=h[0],g=h[1],m=zo({}),y=m[0],b=m[1],w=function(){g(!v)};if(Bo((function(){var e;if(c){if(!d){"tab"===(null==(e=u.appearance)?void 0:e.widgetType)&&b({top:"50%",bottom:"auto"});var t=function(e){var t,n=e;(null==(t=n.detail)?void 0:t.surveyId)===u.id&&(Xa.info("Received show event for feedback button survey "+u.id),b(n.detail.position||{}),w())};return Qa(_d,vd,t),function(){_d.removeEventListener(vd,t)}}}else Xa.error("FeedbackWidget called without a PostHog instance.")}),[c,d,u.id,null==(t=u.appearance)?void 0:t.widgetType,null==(n=u.appearance)?void 0:n.widgetSelector,null==(r=u.appearance)?void 0:r.borderColor]),Ed({survey:u,setSurveyVisible:_}),!p)return null;var S=function(){u.schedule!==ls.Always&&_(!1),setTimeout((function(){g(!1)}),200)};return Uc(lo,{children:["tab"===(null==(i=u.appearance)?void 0:i.widgetType)&&Uc("button",{className:"ph-survey-widget-tab "+((null==(o=u.appearance)?void 0:o.tabPosition)===os.Top?"widget-tab-top":""),onClick:w,disabled:d,style:Pd(null==(s=u.appearance)?void 0:s.tabPosition),children:(null==(a=u.appearance)?void 0:a.widgetLabel)||""}),v&&Uc(Cd,{posthog:c,survey:u,forceDisableHtml:l,style:y,onPopupSurveyDismissed:S,onCloseConfirmationMessage:S})]})}var Fd=function(e){var t=e.question,n=e.forceDisableHtml,r=e.displayQuestionIndex,i=e.appearance,o=e.onSubmit,s=e.onPreviewSubmit,a={forceDisableHtml:n,appearance:i,onPreviewSubmit:function(e){s(e)},onSubmit:function(e){o(e)},initialValue:e.initialValue,displayQuestionIndex:r};switch(t.type){case as.Open:return ao(rd,Ui({},a,{question:t,key:t.id}));case as.Link:return ao(id,Ui({},a,{question:t,key:t.id}));case as.Rating:return ao(od,Ui({},a,{question:t,key:t.id}));case as.SingleChoice:case as.MultipleChoice:return ao(ad,Ui({},a,{question:t,key:t.id}));default:return Xa.error("Unsupported question type: "+t.type),null}};ks.__PosthogExtensions__=ks.__PosthogExtensions__||{},ks.__PosthogExtensions__.generateSurveys=xd,ks.extendPostHogWithSurveys=xd;var Ld="$people_distinct_id",Rd="__alias",Od="__timers",Md="$autocapture_disabled_server_side",Ad="$heatmaps_enabled_server_side",Dd="$exception_capture_enabled_server_side",qd="$error_tracking_suppression_rules",$d="$error_tracking_capture_extension_exceptions",Nd="$web_vitals_enabled_server_side",Hd="$dead_clicks_enabled_server_side",jd="$web_vitals_allowed_metrics",Ud="$session_recording_remote_config",Vd="$sesid",zd="$session_is_sampled",Bd="$enabled_feature_flags",Wd="$early_access_features",Gd="$feature_flag_details",Zd="$stored_person_properties",Yd="$stored_group_properties",Qd="$surveys",Xd="$surveys_activated",Jd="$flag_call_reported",Kd="$user_state",ef="$client_session_props",tf="$capture_rate_limit",nf="$initial_campaign_params",rf="$initial_referrer_info",of="$initial_person_info",sf="$epp",af="__POSTHOG_TOOLBAR__",uf="$posthog_cookieless",lf=[Ld,Rd,"__cmpns",Od,"$session_recording_enabled_server_side",Ad,Vd,Bd,qd,Kd,Wd,Gd,Yd,Zd,Qd,Jd,ef,tf,nf,rf,sf,of,"$conversations_widget_session_id","$conversations_ticket_id","$conversations_widget_state","$conversations_user_traits"],cf=Da("[Error tracking]");function df(){return new la([new xa,new Oa,new ka,new Ea,new La,new Fa,new Ca,new Ra],Sa("web:javascript",va,ya))}var ff=function(){function e(e){var t,n;this._suppressionRules=[],this._errorPropertiesBuilder=df(),this._instance=e,this._suppressionRules=null!==(t=null==(n=this._instance.persistence)?void 0:n.get_property(qd))&&void 0!==t?t:[]}var t=e.prototype;return t.onRemoteConfig=function(e){var t,n,r,i,o=null!==(t=null==(n=e.errorTracking)?void 0:n.suppressionRules)&&void 0!==t?t:[],s=null==(r=e.errorTracking)?void 0:r.captureExtensionExceptions;(this._suppressionRules=o,this._instance.persistence)&&this._instance.persistence.register(((i={})[qd]=this._suppressionRules,i[$d]=s,i))},t.buildProperties=function(e,t){return this._errorPropertiesBuilder.buildFromUnknown(e,{syntheticException:null==t?void 0:t.syntheticException,mechanism:{handled:null==t?void 0:t.handled}})},t.sendExceptionEvent=function(e){var t=e.$exception_list;if(this._isExceptionList(t)){if(this._matchesSuppressionRule(t))return void cf.info("Skipping exception capture because a suppression rule matched");if(!this._captureExtensionExceptions&&this._isExtensionException(t))return void cf.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this._isPostHogException(t))return void cf.info("Skipping exception capture because it was thrown by the PostHog SDK")}return this._instance.capture("$exception",e,{_noTruncate:!0,_batchKey:"exceptionEvent"})},t._matchesSuppressionRule=function(e){if(0===e.length)return!1;var t=e.reduce((function(e,t){var n=t.type,r=t.value;return Us(n)&&n.length>0&&e.$exception_types.push(n),Us(r)&&r.length>0&&e.$exception_values.push(r),e}),{$exception_types:[],$exception_values:[]});return this._suppressionRules.some((function(e){var n=e.values.map((function(e){var n,r=cc[e.operator],i=qs(e.value)?e.value:[e.value],o=null!==(n=t[e.key])&&void 0!==n?n:[];return i.length>0&&r(i,o)}));return"OR"===e.type?n.some(Boolean):n.every(Boolean)}))},t._isExtensionException=function(e){var t=e.flatMap((function(e){var t,n;return null!==(t=null==(n=e.stacktrace)?void 0:n.frames)&&void 0!==t?t:[]}));return t.some((function(e){return e.filename&&e.filename.startsWith("chrome-extension://")}))},t._isPostHogException=function(e){if(e.length>0){var t,n,r,i,o=null!==(t=null==(n=e[0].stacktrace)?void 0:n.frames)&&void 0!==t?t:[],s=o[o.length-1];return null!==(r=null==s||null==(i=s.filename)?void 0:i.includes("posthog.com/static"))&&void 0!==r&&r}return!1},t._isExceptionList=function(e){return!Bs(e)&&qs(e)},Hi(e,[{key:"_captureExtensionExceptions",get:function(){var e,t=!!this._instance.get_property($d),n=this._instance.config.error_tracking.captureExtensionExceptions;return null!==(e=null!=n?n:t)&&void 0!==e&&e}}])}(),pf=Da("[ExceptionAutocapture]"),_f=df(),hf={wrapOnError:function(e){var t=ps;t||pf.info("window not available, cannot wrap onerror");var n=t.onerror;return t.onerror=function(){for(var t,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var s=i[4],a=i[0],u=_f.buildFromUnknown(s||a,{mechanism:{handled:!1}});return e(u),null!==(t=null==n?void 0:n.apply(void 0,i))&&void 0!==t&&t},t.onerror.__POSTHOG_INSTRUMENTED__=!0,function(){var e;null==(e=t.onerror)||delete e.__POSTHOG_INSTRUMENTED__,t.onerror=n}},wrapUnhandledRejection:function(e){var t=ps;t||pf.info("window not available, cannot wrap onUnhandledRejection");var n=t.onunhandledrejection;return t.onunhandledrejection=function(r){var i,o=_f.buildFromUnknown(r,{mechanism:{handled:!1}});return e(o),null!==(i=null==n?void 0:n.apply(t,[r]))&&void 0!==i&&i},t.onunhandledrejection.__POSTHOG_INSTRUMENTED__=!0,function(){var e;null==(e=t.onunhandledrejection)||delete e.__POSTHOG_INSTRUMENTED__,t.onunhandledrejection=n}},wrapConsoleError:function(e){var t=console;t||pf.info("console not available, cannot wrap console.error");var n=t.error;return t.error=function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];var o=r.join(" "),s=r.find((function(e){return e instanceof Error})),a=_f.buildFromUnknown(s||o,{mechanism:{handled:!1},syntheticException:new Error("PostHog syntheticException")});return e(a),null==n?void 0:n.apply(void 0,r)},t.error.__POSTHOG_INSTRUMENTED__=!0,function(){var e;null==(e=t.error)||delete e.__POSTHOG_INSTRUMENTED__,t.error=n}}};function vf(e,t,n){try{if(!(t in e))return function(){};var r=e[t],i=n(r);return $s(i)&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=i,function(){e[t]=r}}catch(e){return function(){}}}ks.__PosthogExtensions__=ks.__PosthogExtensions__||{},ks.__PosthogExtensions__.errorWrappingFunctions=hf,ks.posthogErrorWrappingFunctions=hf;var gf=function(e,t,n,r){var i;try{i=new URL(r.url).hostname}catch(e){return}if(!qs(e)||e.includes(i)){if(n){var o=n.checkAndGetSessionAndWindowId(!0),s=o.sessionId,a=o.windowId;r.headers.set("X-POSTHOG-SESSION-ID",s),r.headers.set("X-POSTHOG-WINDOW-ID",a)}t!==uf&&r.headers.set("X-POSTHOG-DISTINCT-ID",t)}};ks.__PosthogExtensions__=ks.__PosthogExtensions__||{};var mf={_patchFetch:function(e,t,n){return vf(ps,"fetch",(function(r){return function(){var i=Ni(zi().m((function i(o,s){var a;return zi().w((function(i){for(;;)if(0===i.n)return a=new Request(o,s),gf(e,t,n,a),i.a(2,r(a))}),i)})));return function(e,t){return i.apply(this,arguments)}}()}))},_patchXHR:function(e,t,n){return vf(ps.XMLHttpRequest.prototype,"open",(function(r){return function(i,o,s,a,u){void 0===s&&(s=!0);var l=new Request(o);return gf(e,t,n,l),r.call(this,i,l.url,s,a,u)}}))}};function yf(e){return e instanceof Element&&(e.id===af||!(null==e.closest||!e.closest(".toolbar-global-fade-container")))}function bf(e){return!!e&&1===e.nodeType}function wf(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function Sf(e){return!!e&&3===e.nodeType}function xf(e){return!!e&&11===e.nodeType}function Ef(e){return e?Ls(e).split(/\s+/):[]}function kf(e){var t=null==ps?void 0:ps.location.href;return!!(t&&e&&e.some((function(e){return t.match(e)})))}function Pf(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 Ef(t)}function Cf(e){return Bs(e)?null:Ls(e).split(/(\s+)/).filter((function(e){return Zf(e)})).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function Tf(e){var t="";return Hf(e)&&!jf(e)&&e.childNodes&&e.childNodes.length&&Na(e.childNodes,(function(e){var n;Sf(e)&&e.textContent&&(t+=null!==(n=Cf(e.textContent))&&void 0!==n?n:"")})),Ls(t)}function If(e){return js(e.target)?e.srcElement||null:null!=(t=e.target)&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t}ks.__PosthogExtensions__.tracingHeadersPatchFns=mf,ks.postHogTracingHeadersPatchFns=mf;var Ff=["a","button","form","input","select","textarea","label"];function Lf(e,t){if(js(t))return!0;for(var n,r,i=function(){var e=r.value;if(t.some((function(t){return e.matches(t)})))return{v:!0}},o=ji(e);!(r=o()).done;)if(n=i())return n.v;return!1}function Rf(e){var t=e.parentNode;return!(!t||!bf(t))&&t}var Of=["next","previous","prev",">","<"],Mf=10;var Af=[".ph-no-rageclick",".ph-no-capture"];function Df(e,t){if(!ps||qf(e))return!1;var n,r,i;Gs(t)?(n=!!t&&Af,r=void 0):(n=null!==(i=null==t?void 0:t.css_selector_ignorelist)&&void 0!==i?i:Af,r=null==t?void 0:t.content_ignorelist);if(!1===n)return!1;var o=$f(e,!1).targetElementList;return!function(e,t){if(!1===e||js(e))return!1;var n;if(!0===e)n=Of;else{if(!qs(e))return!1;if(e.length>Mf)return Aa.error("[PostHog] content_ignorelist array cannot exceed "+Mf+" items. Use css_selector_ignorelist for more complex matching."),!1;n=e.map((function(e){return e.toLowerCase()}))}return t.some((function(e){var t=e.safeText,r=e.ariaLabel;return n.some((function(e){return t.includes(e)||r.includes(e)}))}))}(r,o.map((function(e){var t;return{safeText:Tf(e).toLowerCase(),ariaLabel:(null==(t=e.getAttribute("aria-label"))?void 0:t.toLowerCase().trim())||""}})))&&!Lf(o,n)}var qf=function(e){return!e||wf(e,"html")||!bf(e)},$f=function(e,t){if(!ps||qf(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var n=!1,r=[e],i=e;i.parentNode&&!wf(i,"body");)if(xf(i.parentNode))r.push(i.parentNode.host),i=i.parentNode.host;else{var o=Rf(i);if(!o)break;if(t||Ff.indexOf(o.tagName.toLowerCase())>-1)n=!0;else{var s=ps.getComputedStyle(o);s&&"pointer"===s.getPropertyValue("cursor")&&(n=!0)}r.push(o),i=o}return{parentIsUsefulElement:n,targetElementList:r}};function Nf(e,t,n,r,i){var o,s,a,u;if(void 0===n&&(n=void 0),!ps||qf(e))return!1;if(null!=(o=n)&&o.url_allowlist&&!kf(n.url_allowlist))return!1;if(null!=(s=n)&&s.url_ignorelist&&kf(n.url_ignorelist))return!1;if(null!=(a=n)&&a.dom_event_allowlist){var l=n.dom_event_allowlist;if(l&&!l.some((function(e){return t.type===e})))return!1}var c=$f(e,r),d=c.parentIsUsefulElement,f=c.targetElementList;if(!function(e,t){var n=null==t?void 0:t.element_allowlist;if(js(n))return!0;for(var r,i,o=function(){var e=i.value;if(n.some((function(t){return e.tagName.toLowerCase()===t})))return{v:!0}},s=ji(e);!(i=s()).done;)if(r=o())return r.v;return!1}(f,n))return!1;if(!Lf(f,null==(u=n)?void 0:u.css_selector_allowlist))return!1;var p=ps.getComputedStyle(e);if(p&&"pointer"===p.getPropertyValue("cursor")&&"click"===t.type)return!0;var _=e.tagName.toLowerCase();switch(_){case"html":return!1;case"form":return(i||["submit"]).indexOf(t.type)>=0;case"input":case"select":case"textarea":return(i||["change","click"]).indexOf(t.type)>=0;default:return d?(i||["click"]).indexOf(t.type)>=0:(i||["click"]).indexOf(t.type)>=0&&(Ff.indexOf(_)>-1||"true"===e.getAttribute("contenteditable"))}}function Hf(e){for(var t=e;t.parentNode&&!wf(t,"body");t=t.parentNode){var n=Pf(t);if(Fs(n,"ph-sensitive")||Fs(n,"ph-no-capture"))return!1}if(Fs(Pf(e),"ph-include"))return!0;var r=e.type||"";if(Us(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var i=e.name||e.id||"";if(Us(i)){if(/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(i.replace(/[^a-zA-Z0-9]/g,"")))return!1}return!0}function jf(e){return!!(wf(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||wf(e,"select")||wf(e,"textarea")||"true"===e.getAttribute("contenteditable"))}var Uf="(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})",Vf=new RegExp("^(?:"+Uf+")$"),zf=new RegExp(Uf),Bf="\\d{3}-?\\d{2}-?\\d{4}",Wf=new RegExp("^("+Bf+")$"),Gf=new RegExp("("+Bf+")");function Zf(e,t){if(void 0===t&&(t=!0),Bs(e))return!1;if(Us(e)){if(e=Ls(e),(t?Vf:zf).test((e||"").replace(/[- ]/g,"")))return!1;if((t?Wf:Gf).test(e))return!1}return!0}function Yf(e){var t=Tf(e);return Zf(t=(t+" "+Qf(e)).trim())?t:""}function Qf(e){var t="";return e&&e.childNodes&&e.childNodes.length&&Na(e.childNodes,(function(e){var n;if(e&&"span"===(null==(n=e.tagName)?void 0:n.toLowerCase()))try{var r=Tf(e);t=(t+" "+r).trim(),e.childNodes&&e.childNodes.length&&(t=(t+" "+Qf(e)).trim())}catch(e){Aa.error("[AutoCapture]",e)}})),t}function Xf(e){return function(e){var t=e.map((function(e){var t,n,r="";if(e.tag_name&&(r+=e.tag_name),e.attr_class){e.attr_class.sort();for(var i,o=ji(e.attr_class);!(i=o()).done;){r+="."+i.value.replace(/"/g,"")}}var s=Ui({},e.text?{text:e.text}:{},{"nth-child":null!==(t=e.nth_child)&&void 0!==t?t:0,"nth-of-type":null!==(n=e.nth_of_type)&&void 0!==n?n:0},e.href?{href:e.href}:{},e.attr_id?{attr_id:e.attr_id}:{},e.attributes),a={};return Ua(s).sort((function(e,t){var n=e[0],r=t[0];return n.localeCompare(r)})).forEach((function(e){var t=e[0],n=e[1];return a[Jf(t.toString())]=Jf(n.toString())})),r+=":",r+=Ua(a).map((function(e){return e[0]+'="'+e[1]+'"'})).join("")}));return t.join(";")}(function(e){return e.map((function(e){var t,n,r={text:null==(t=e.$el_text)?void 0:t.slice(0,400),tag_name:e.tag_name,href:null==(n=e.attr__href)?void 0:n.slice(0,2048),attr_class:Kf(e),attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return Ua(e).filter((function(e){return 0===e[0].indexOf("attr__")})).forEach((function(e){var t=e[0],n=e[1];return r.attributes[t]=n})),r}))}(e))}function Jf(e){return e.replace(/"|\\"/g,'\\"')}function Kf(e){var t=e.attr__class;return t?qs(t)?t:Ef(t):void 0}var ep=function(){function e(e){this.disabled=!1===e;var t=Ns(e)?e:{};this.thresholdPx=t.threshold_px||30,this.timeoutMs=t.timeout_ms||1e3,this.clickCount=t.click_count||3,this.clicks=[]}return e.prototype.isRageClick=function(e,t,n){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&&n-r.timestamp<this.timeoutMs){if(this.clicks.push({x:e,y:t,timestamp:n}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:e,y:t,timestamp:n}];return!1},e}(),tp=Da("[AutoCapture]");function np(e,t){return t.length>e?t.slice(0,e)+"...":t}function rp(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do{t=t.previousSibling}while(t&&!bf(t));return t}function ip(e,t,n,r){var i=e.tagName.toLowerCase(),o={tag_name:i};Ff.indexOf(i)>-1&&!n&&("a"===i.toLowerCase()||"button"===i.toLowerCase()?o.$el_text=np(1024,Yf(e)):o.$el_text=np(1024,Tf(e)));var s=Pf(e);s.length>0&&(o.classes=s.filter((function(e){return""!==e}))),Na(e.attributes,(function(n){var i;if((!jf(e)||-1!==["name","id","class","aria-label"].indexOf(n.name))&&((null==r||!r.includes(n.name))&&!t&&Zf(n.value)&&(i=n.name,!Us(i)||"_ngcontent"!==i.substring(0,10)&&"_nghost"!==i.substring(0,7)))){var s=n.value;"class"===n.name&&(s=Ef(s).join(" ")),o["attr__"+n.name]=np(1024,s)}}));for(var a=1,u=1,l=e;l=rp(l);)a++,l.tagName===e.tagName&&u++;return o.nth_child=a,o.nth_of_type=u,o}function op(e,t){for(var n,r,i=t.e,o=t.maskAllElementAttributes,s=t.maskAllText,a=t.elementAttributeIgnoreList,u=t.elementsChainAsString,l=[e],c=e;c.parentNode&&!wf(c,"body");)xf(c.parentNode)?(l.push(c.parentNode.host),c=c.parentNode.host):(l.push(c.parentNode),c=c.parentNode);var d,f=[],p={},_=!1,h=!1;if(Na(l,(function(e){var t=Hf(e);"a"===e.tagName.toLowerCase()&&(_=e.getAttribute("href"),_=t&&_&&Zf(_)&&_),Fs(Pf(e),"ph-no-capture")&&(h=!0),f.push(ip(e,o,s,a));var n=function(e){if(!Hf(e))return{};var t={};return Na(e.attributes,(function(e){if(e.name&&0===e.name.indexOf("data-ph-capture-attribute")){var n=e.name.replace("data-ph-capture-attribute-",""),r=e.value;n&&r&&Zf(r)&&(t[n]=r)}})),t}(e);Ha(p,n)})),h)return{props:{},explicitNoCapture:h};if(s||("a"===e.tagName.toLowerCase()||"button"===e.tagName.toLowerCase()?f[0].$el_text=Yf(e):f[0].$el_text=Tf(e)),_){var v,g;f[0].attr__href=_;var m=null==(v=vl(_))?void 0:v.host,y=null==ps||null==(g=ps.location)?void 0:g.host;m&&y&&m!==y&&(d=_)}return{props:Ha({$event_type:i.type,$ce_version:1},u?{}:{$elements:f},{$elements_chain:Xf(f)},null!=(n=f[0])&&n.$el_text?{$el_text:null==(r=f[0])?void 0:r.$el_text}:{},d&&"click"===i.type?{$external_click_url:d}:{},p)}}var sp=function(){function e(e){this._initialized=!1,this._isDisabledServerSide=null,this._elementsChainAsString=!1,this.instance=e,this.rageclicks=new ep(e.config.rageclick),this._elementSelectors=null}var t=e.prototype;return t._addDomEventHandlers=function(){var e=this;if(this.isBrowserSupported()){if(ps&&ys){var t=function(t){t=t||(null==ps?void 0:ps.event);try{e._captureEvent(t)}catch(e){tp.error("Failed to capture event",e)}};if(Qa(ys,"submit",t,{capture:!0}),Qa(ys,"change",t,{capture:!0}),Qa(ys,"click",t,{capture:!0}),this._config.capture_copied_text){var n=function(t){t=t||(null==ps?void 0:ps.event),e._captureEvent(t,_l)};Qa(ys,"copy",n,{capture:!0}),Qa(ys,"cut",n,{capture:!0})}}}else tp.info("Disabling Automatic Event Collection because this browser is not supported")},t.startIfEnabled=function(){this.isEnabled&&!this._initialized&&(this._addDomEventHandlers(),this._initialized=!0)},t.onRemoteConfig=function(e){var t;(e.elementsChainAsString&&(this._elementsChainAsString=e.elementsChainAsString),this.instance.persistence)&&this.instance.persistence.register(((t={})[Md]=!!e.autocapture_opt_out,t));this._isDisabledServerSide=!!e.autocapture_opt_out,this.startIfEnabled()},t.setElementSelectors=function(e){this._elementSelectors=e},t.getElementSelectors=function(e){var t,n=[];return null==(t=this._elementSelectors)||t.forEach((function(t){var r=null==ys?void 0:ys.querySelectorAll(t);null==r||r.forEach((function(r){e===r&&n.push(t)}))})),n},t._captureEvent=function(e,t){if(void 0===t&&(t="$autocapture"),this.isEnabled){var n,r=If(e);if(Sf(r)&&(r=r.parentNode||null),"$autocapture"===t&&"click"===e.type&&e instanceof MouseEvent)this.instance.config.rageclick&&null!=(n=this.rageclicks)&&n.isRageClick(e.clientX,e.clientY,e.timeStamp||(new Date).getTime())&&Df(r,this.instance.config.rageclick)&&this._captureEvent(e,"$rageclick");var i=t===_l;if(r&&Nf(r,e,this._config,i,i?["copy","cut"]:void 0)){var o=op(r,{e:e,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this._config.element_attribute_ignorelist,elementsChainAsString:this._elementsChainAsString}),s=o.props;if(o.explicitNoCapture)return!1;var a=this.getElementSelectors(r);if(a&&a.length>0&&(s.$element_selectors=a),t===_l){var u,l=Cf(null==ps||null==(u=ps.getSelection())?void 0:u.toString()),c=e.type||"clipboard";if(!l)return!1;s.$selected_content=l,s.$copy_type=c}return this.instance.capture(t,s),!0}}},t.isBrowserSupported=function(){return $s(null==ys?void 0:ys.querySelectorAll)},Hi(e,[{key:"_config",get:function(){var e,t,n=Ns(this.instance.config.autocapture)?this.instance.config.autocapture:{};return n.url_allowlist=null==(e=n.url_allowlist)?void 0:e.map((function(e){return new RegExp(e)})),n.url_ignorelist=null==(t=n.url_ignorelist)?void 0:t.map((function(e){return new RegExp(e)})),n}},{key:"isEnabled",get:function(){var e,t,n=null==(e=this.instance.persistence)?void 0:e.props[Md],r=this._isDisabledServerSide;if(zs(r)&&!Gs(n)&&!this.instance._shouldDisableFlags())return!1;var i=null!==(t=this._isDisabledServerSide)&&void 0!==t?t:!!n;return!!this.instance.config.autocapture&&!i}}])}(),ap="";var up=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i;function lp(e,t){if(t){var n=function(e,t){if(void 0===t&&(t=ys),ap)return ap;if(!t)return"";if(["localhost","127.0.0.1"].includes(e))return"";for(var n=e.split("."),r=Math.min(n.length,8),i="dmn_chk_"+hu();!ap&&r--;){var o=n.slice(r).join("."),s=i+"=1;domain=."+o+";path=/";t.cookie=s+";max-age=3",t.cookie.includes(i)&&(t.cookie=s+";max-age=0",ap=o)}return ap}(e);if(!n){var r=function(e){var t=e.match(up);return t?t[0]:""}(e);r!==n&&Aa.info("Warning: cookie subdomain discovery mismatch",r,n),n=r}return n?"; domain=."+n:""}return""}var cp={_is_supported:function(){return!!ys},_error:function(e){Aa.error("cookieStore error: "+e)},_get:function(e){if(ys){try{for(var t=e+"=",n=ys.cookie.split(";").filter((function(e){return e.length})),r=0;r<n.length;r++){for(var i=n[r];" "==i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return decodeURIComponent(i.substring(t.length,i.length))}}catch(e){}return null}},_parse:function(e){var t;try{t=JSON.parse(cp._get(e))||{}}catch(e){}return t},_set:function(e,t,n,r,i){if(ys)try{var o="",s="",a=lp(ys.location.hostname,r);if(n){var u=new Date;u.setTime(u.getTime()+24*n*60*60*1e3),o="; expires="+u.toUTCString()}i&&(s="; secure");var l=e+"="+encodeURIComponent(JSON.stringify(t))+o+"; SameSite=Lax; path=/"+a+s;return l.length>3686.4&&Aa.warn("cookieStore warning: large cookie, len="+l.length),ys.cookie=l,l}catch(e){return}},_remove:function(e,t){if(null!=ys&&ys.cookie)try{cp._set(e,"",-1,t)}catch(e){return}}},dp=null,fp={_is_supported:function(){if(!zs(dp))return dp;var e=!0;if(js(ps))e=!1;else try{var t="__mplssupport__";fp._set(t,"xyz"),'"xyz"'!==fp._get(t)&&(e=!1),fp._remove(t)}catch(t){e=!1}return e||Aa.error("localStorage unsupported; falling back to cookie store"),dp=e,e},_error:function(e){Aa.error("localStorage error: "+e)},_get:function(e){try{return null==ps?void 0:ps.localStorage.getItem(e)}catch(e){fp._error(e)}return null},_parse:function(e){try{return JSON.parse(fp._get(e))||{}}catch(e){}return null},_set:function(e,t){try{null==ps||ps.localStorage.setItem(e,JSON.stringify(t))}catch(e){fp._error(e)}},_remove:function(e){try{null==ps||ps.localStorage.removeItem(e)}catch(e){fp._error(e)}}},pp=["distinct_id",Vd,zd,sf,of],_p=Ui({},fp,{_parse:function(e){try{var t={};try{t=cp._parse(e)||{}}catch(e){}var n=Ha(t,JSON.parse(fp._get(e)||"{}"));return fp._set(e,n),n}catch(e){}return null},_set:function(e,t,n,r,i,o){try{fp._set(e,t,void 0,void 0,o);var s={};pp.forEach((function(e){t[e]&&(s[e]=t[e])})),Object.keys(s).length&&cp._set(e,s,n,r,i,o)}catch(e){fp._error(e)}},_remove:function(e,t){try{null==ps||ps.localStorage.removeItem(e),cp._remove(e,t)}catch(e){fp._error(e)}}}),hp={},vp={_is_supported:function(){return!0},_error:function(e){Aa.error("memoryStorage error: "+e)},_get:function(e){return hp[e]||null},_parse:function(e){return hp[e]||null},_set:function(e,t){hp[e]=t},_remove:function(e){delete hp[e]}},gp=null,mp={_is_supported:function(){if(!zs(gp))return gp;if(gp=!0,js(ps))gp=!1;else try{var e="__support__";mp._set(e,"xyz"),'"xyz"'!==mp._get(e)&&(gp=!1),mp._remove(e)}catch(e){gp=!1}return gp},_error:function(e){Aa.error("sessionStorage error: ",e)},_get:function(e){try{return null==ps?void 0:ps.sessionStorage.getItem(e)}catch(e){mp._error(e)}return null},_parse:function(e){try{return JSON.parse(mp._get(e))||null}catch(e){}return null},_set:function(e,t){try{null==ps||ps.sessionStorage.setItem(e,JSON.stringify(t))}catch(e){mp._error(e)}},_remove:function(e){try{null==ps||ps.sessionStorage.removeItem(e)}catch(e){mp._error(e)}}},yp=function(e){return e[e.PENDING=-1]="PENDING",e[e.DENIED=0]="DENIED",e[e.GRANTED=1]="GRANTED",e}({}),bp=function(){function e(e){this._instance=e}var t=e.prototype;return t.isOptedOut=function(){return"always"===this._config.cookieless_mode||(this.consent===yp.DENIED||this.consent===yp.PENDING&&(this._config.opt_out_capturing_by_default||"on_reject"===this._config.cookieless_mode))},t.isOptedIn=function(){return!this.isOptedOut()},t.isExplicitlyOptedOut=function(){return this.consent===yp.DENIED},t.optInOut=function(e){this._storage._set(this._storageKey,e?1:0,this._config.cookie_expiration,this._config.cross_subdomain_cookie,this._config.secure_cookie)},t.reset=function(){this._storage._remove(this._storageKey,this._config.cross_subdomain_cookie)},t._getDnt=function(){return!!this._config.respect_dnt&&!!Ya([null==ms?void 0:ms.doNotTrack,null==ms?void 0:ms.msDoNotTrack,ks.doNotTrack],(function(e){return ea(e)}))},Hi(e,[{key:"_config",get:function(){return this._instance.config}},{key:"consent",get:function(){return this._getDnt()?yp.DENIED:this._storedConsent}},{key:"_storageKey",get:function(){var e=this._instance.config,t=e.token,n=e.opt_out_capturing_cookie_prefix,r=e.consent_persistence_name;return r||(n?n+t:"__ph_opt_in_out_"+t)}},{key:"_storedConsent",get:function(){var e=this._storage._get(this._storageKey);return ea(e)?yp.GRANTED:Fs(ta,e)?yp.DENIED:yp.PENDING}},{key:"_storage",get:function(){if(!this._persistentStore){var e=this._config.opt_out_capturing_persistence_type;this._persistentStore="localStorage"===e?fp:cp;var t="localStorage"===e?cp:fp;t._get(this._storageKey)&&(this._persistentStore._get(this._storageKey)||this.optInOut(ea(t._get(this._storageKey))),t._remove(this._storageKey,this._config.cross_subdomain_cookie))}return this._persistentStore}}])}(),wp=Da("[Dead Clicks]"),Sp=function(){return!0},xp=function(e){var t,n=!(null==(t=e.instance.persistence)||!t.get_property(Hd)),r=e.instance.config.capture_dead_clicks;return Gs(r)?r:!!Ns(r)||n},Ep=function(){function e(e,t,n){this.instance=e,this.isEnabled=t,this.onCapture=n,this.startIfEnabled()}var t=e.prototype;return t.onRemoteConfig=function(e){var t;this.instance.persistence&&this.instance.persistence.register(((t={})[Hd]=null==e?void 0:e.captureDeadClicks,t));this.startIfEnabled()},t.startIfEnabled=function(){var e=this;this.isEnabled(this)&&this._loadScript((function(){e._start()}))},t._loadScript=function(e){var t,n;null!=(t=ks.__PosthogExtensions__)&&t.initDeadClicksAutocapture&&e(),null==(n=ks.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this.instance,"dead-clicks-autocapture",(function(t){t?wp.error("failed to load script",t):e()}))},t._start=function(){var e;if(ys){if(!this._lazyLoadedDeadClicksAutocapture&&null!=(e=ks.__PosthogExtensions__)&&e.initDeadClicksAutocapture){var t=Ns(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};t.__onCapture=this.onCapture,this._lazyLoadedDeadClicksAutocapture=ks.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,t),this._lazyLoadedDeadClicksAutocapture.start(ys),wp.info("starting...")}}else wp.error("`document` not found. Cannot start.")},t.stop=function(){this._lazyLoadedDeadClicksAutocapture&&(this._lazyLoadedDeadClicksAutocapture.stop(),this._lazyLoadedDeadClicksAutocapture=void 0,wp.info("stopping..."))},Hi(e,[{key:"lazyLoadedDeadClicksAutocapture",get:function(){return this._lazyLoadedDeadClicksAutocapture}}])}(),kp=Da("[ExceptionAutocapture]"),Pp=function(){function e(e){var t,n,r,i=this;this._startCapturing=function(){var e;if(ps&&i.isEnabled&&null!=(e=ks.__PosthogExtensions__)&&e.errorWrappingFunctions){var t=ks.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,n=ks.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,r=ks.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!i._unwrapOnError&&i._config.capture_unhandled_errors&&(i._unwrapOnError=t(i.captureException.bind(i))),!i._unwrapUnhandledRejection&&i._config.capture_unhandled_rejections&&(i._unwrapUnhandledRejection=n(i.captureException.bind(i))),!i._unwrapConsoleError&&i._config.capture_console_errors&&(i._unwrapConsoleError=r(i.captureException.bind(i)))}catch(e){kp.error("failed to start",e),i._stopCapturing()}}},this._instance=e,this._remoteEnabled=!(null==(t=this._instance.persistence)||!t.props[Dd]),this._config=this._requiredConfig(),this._rateLimiter=new sa({refillRate:null!==(n=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)&&void 0!==n?n:1,bucketSize:null!==(r=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)&&void 0!==r?r:10,refillInterval:1e4,_logger:kp}),this.startIfEnabled()}var t=e.prototype;return t._requiredConfig=function(){var e=this._instance.config.capture_exceptions,t={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return Ns(e)?t=Ui({},t,e):(js(e)?this._remoteEnabled:e)&&(t=Ui({},t,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),t},t.startIfEnabled=function(){this.isEnabled&&(kp.info("enabled"),this._loadScript(this._startCapturing))},t._loadScript=function(e){var t,n;null!=(t=ks.__PosthogExtensions__)&&t.errorWrappingFunctions&&e(),null==(n=ks.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this._instance,"exception-autocapture",(function(t){if(t)return kp.error("failed to load script",t);e()}))},t._stopCapturing=function(){var e,t,n;null==(e=this._unwrapOnError)||e.call(this),this._unwrapOnError=void 0,null==(t=this._unwrapUnhandledRejection)||t.call(this),this._unwrapUnhandledRejection=void 0,null==(n=this._unwrapConsoleError)||n.call(this),this._unwrapConsoleError=void 0},t.onRemoteConfig=function(e){var t,n=e.autocaptureExceptions;(this._remoteEnabled=!!n||!1,this._config=this._requiredConfig(),this._instance.persistence)&&this._instance.persistence.register(((t={})[Dd]=this._remoteEnabled,t));this.startIfEnabled()},t.captureException=function(e){var t,n,r=null!==(t=null==e||null==(n=e.$exception_list)||null==(n=n[0])?void 0:n.type)&&void 0!==t?t:"Exception";this._rateLimiter.consumeRateLimit(r)?kp.info("Skipping exception capture because of client rate limiting.",{exception:r}):this._instance.exceptions.sendExceptionEvent(e)},Hi(e,[{key:"isEnabled",get:function(){return this._config.capture_console_errors||this._config.capture_unhandled_errors||this._config.capture_unhandled_rejections}}])}(),Cp=function(){function e(e){var t;this._instance=e,this._lastPathname=(null==ps||null==(t=ps.location)?void 0:t.pathname)||""}var t=e.prototype;return t.startIfEnabled=function(){this.isEnabled&&(Aa.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())},t.stop=function(){this._popstateListener&&this._popstateListener(),this._popstateListener=void 0,Aa.info("History API monitoring stopped")},t.monitorHistoryChanges=function(){var e,t;if(ps&&ps.history){var n=this;null!=(e=ps.history.pushState)&&e.__posthog_wrapped__||vf(ps.history,"pushState",(function(e){return function(t,r,i){e.call(this,t,r,i),n._capturePageview("pushState")}})),null!=(t=ps.history.replaceState)&&t.__posthog_wrapped__||vf(ps.history,"replaceState",(function(e){return function(t,r,i){e.call(this,t,r,i),n._capturePageview("replaceState")}})),this._setupPopstateListener()}},t._capturePageview=function(e){try{var t,n=null==ps||null==(t=ps.location)?void 0:t.pathname;if(!n)return;n!==this._lastPathname&&this.isEnabled&&this._instance.capture("$pageview",{navigation_type:e}),this._lastPathname=n}catch(t){Aa.error("Error capturing "+e+" pageview",t)}},t._setupPopstateListener=function(){var e=this;if(!this._popstateListener){var t=function(){e._capturePageview("popstate")};Qa(ps,"popstate",t),this._popstateListener=function(){ps&&ps.removeEventListener("popstate",t)}}},Hi(e,[{key:"isEnabled",get:function(){return"history_change"===this._instance.config.capture_pageview}}])}(),Tp=Da("[SegmentIntegration]");function Ip(e,t){var n=e.config.segment;if(!n)return t();!function(e,t){var n=e.config.segment;if(!n)return t();var r=function(n){var r=function(){return n.anonymousId()||hu()};e.config.get_device_id=r,n.id()&&(e.register({distinct_id:n.id(),$device_id:r()}),e.persistence.set_property(Kd,"identified")),t()},i=n.user();"then"in i&&$s(i.then)?i.then((function(e){return r(e)})):r(i)}(e,(function(){n.register(function(e){Promise&&Promise.resolve||Tp.warn("This browser does not have Promise support, and can not use the segment integration");var t=function(t,n){if(!n)return t;t.event.userId||t.event.anonymousId===e.get_distinct_id()||(Tp.info("No userId set, resetting PostHog"),e.reset()),t.event.userId&&t.event.userId!==e.get_distinct_id()&&(Tp.info("UserId set, identifying with PostHog"),e.identify(t.event.userId));var r=e.calculateEventProperties(n,t.event.properties);return t.event.properties=Object.assign({},r,t.event.properties),t};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:function(e){return t(e,e.event.event)},page:function(e){return t(e,"$pageview")},identify:function(e){return t(e,"$identify")},screen:function(e){return t(e,"$screen")}}}(e)).then((function(){t()}))}))}var Fp="posthog-js";function Lp(e,t){var n=void 0===t?{}:t,r=n.organization,i=n.projectId,o=n.prefix,s=n.severityAllowList,a=void 0===s?["error"]:s,u=n.sendExceptionsToPostHog,l=void 0===u||u;return function(t){var n,s,u,c,d;if(!("*"===a||a.includes(t.level))||!e.__loaded)return t;t.tags||(t.tags={});var f=e.requestRouter.endpointFor("ui","/project/"+e.config.token+"/person/"+e.get_distinct_id());t.tags["PostHog Person URL"]=f,e.sessionRecordingStarted()&&(t.tags["PostHog Recording URL"]=e.get_session_replay_url({withTimestamp:!0}));var p=(null==(n=t.exception)?void 0:n.values)||[],_=p.map((function(e){return Ui({},e,{stacktrace:e.stacktrace?Ui({},e.stacktrace,{type:"raw",frames:(e.stacktrace.frames||[]).map((function(e){return Ui({},e,{platform:"web:javascript"})}))}):void 0})})),h={$exception_message:(null==(s=p[0])?void 0:s.value)||t.message,$exception_type:null==(u=p[0])?void 0:u.type,$exception_level:t.level,$exception_list:_,$sentry_event_id:t.event_id,$sentry_exception:t.exception,$sentry_exception_message:(null==(c=p[0])?void 0:c.value)||t.message,$sentry_exception_type:null==(d=p[0])?void 0:d.type,$sentry_tags:t.tags};return r&&i&&(h.$sentry_url=(o||"https://sentry.io/organizations/")+r+"/issues/?project="+i+"&query="+t.event_id),l&&e.exceptions.sendExceptionEvent(h),t}}var Rp=function(e,t,n,r,i,o){this.name=Fp,this.setupOnce=function(s){s(Lp(e,{organization:t,projectId:n,prefix:r,severityAllowList:i,sendExceptionsToPostHog:null==o||o}))}},Op=null!=ps&&ps.location?bl(ps.location.hash,"__posthog")||bl(location.hash,"state"):null,Mp="_postHogToolbarParams",Ap=Da("[Toolbar]"),Dp=function(e){return e[e.UNINITIALIZED=0]="UNINITIALIZED",e[e.LOADING=1]="LOADING",e[e.LOADED=2]="LOADED",e}(Dp||{}),qp=function(){function e(e){this.instance=e}var t=e.prototype;return t._setToolbarState=function(e){ks.ph_toolbar_state=e},t._getToolbarState=function(){var e;return null!==(e=ks.ph_toolbar_state)&&void 0!==e?e:Dp.UNINITIALIZED},t.maybeLoadToolbar=function(e,t,n){if(void 0===e&&(e=void 0),void 0===t&&(t=void 0),void 0===n&&(n=void 0),!ps||!ys)return!1;e=null!=e?e:ps.location,n=null!=n?n:ps.history;try{if(!t){try{ps.localStorage.setItem("test","test"),ps.localStorage.removeItem("test")}catch(e){return!1}t=null==ps?void 0:ps.localStorage}var r,i=Op||bl(e.hash,"__posthog")||bl(e.hash,"state"),o=i?Va((function(){return JSON.parse(atob(decodeURIComponent(i)))}))||Va((function(){return JSON.parse(decodeURIComponent(i))})):null;return o&&"ph_authorize"===o.action?((r=o).source="url",r&&Object.keys(r).length>0&&(o.desiredHash?e.hash=o.desiredHash:n?n.replaceState(n.state,"",e.pathname+e.search):e.hash="")):((r=JSON.parse(t.getItem(Mp)||"{}")).source="localstorage",delete r.userIntent),!(!r.token||this.instance.config.token!==r.token)&&(this.loadToolbar(r),!0)}catch(e){return!1}},t._callLoadToolbar=function(e){var t=ks.ph_load_toolbar||ks.ph_load_editor;!Bs(t)&&$s(t)?t(e,this.instance):Ap.warn("No toolbar load function found")},t.loadToolbar=function(e){var t=this,n=!(null==ys||!ys.getElementById(af));if(!ps||n)return!1;var r="custom"===this.instance.requestRouter.region&&this.instance.config.advanced_disable_toolbar_metrics,i=Ui({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor("ui")},r?{instrument:!1}:{});if(ps.localStorage.setItem(Mp,JSON.stringify(Ui({},i,{source:void 0}))),this._getToolbarState()===Dp.LOADED)this._callLoadToolbar(i);else if(this._getToolbarState()===Dp.UNINITIALIZED){var o;this._setToolbarState(Dp.LOADING),null==(o=ks.__PosthogExtensions__)||null==o.loadExternalDependency||o.loadExternalDependency(this.instance,"toolbar",(function(e){if(e)return Ap.error("[Toolbar] Failed to load",e),void t._setToolbarState(Dp.UNINITIALIZED);t._setToolbarState(Dp.LOADED),t._callLoadToolbar(i)})),Qa(ps,"turbolinks:load",(function(){t._setToolbarState(Dp.UNINITIALIZED),t.loadToolbar(i)}))}return!0},t._loadEditor=function(e){return this.loadToolbar(e)},t.maybeLoadEditor=function(e,t,n){return void 0===e&&(e=void 0),void 0===t&&(t=void 0),void 0===n&&(n=void 0),this.maybeLoadToolbar(e,t,n)},e}(),$p=Da("[TracingHeaders]"),Np=function(){function e(e){var t=this;this._restoreXHRPatch=void 0,this._restoreFetchPatch=void 0,this._startCapturing=function(){var e,n;js(t._restoreXHRPatch)&&(null==(e=ks.__PosthogExtensions__)||null==(e=e.tracingHeadersPatchFns)||e._patchXHR(t._instance.config.__add_tracing_headers||[],t._instance.get_distinct_id(),t._instance.sessionManager));js(t._restoreFetchPatch)&&(null==(n=ks.__PosthogExtensions__)||null==(n=n.tracingHeadersPatchFns)||n._patchFetch(t._instance.config.__add_tracing_headers||[],t._instance.get_distinct_id(),t._instance.sessionManager))},this._instance=e}var t=e.prototype;return t._loadScript=function(e){var t,n;null!=(t=ks.__PosthogExtensions__)&&t.tracingHeadersPatchFns&&e(),null==(n=ks.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this._instance,"tracing-headers",(function(t){if(t)return $p.error("failed to load script",t);e()}))},t.startIfEnabledOrStop=function(){var e,t;this._instance.config.__add_tracing_headers?this._loadScript(this._startCapturing):(null==(e=this._restoreXHRPatch)||e.call(this),null==(t=this._restoreFetchPatch)||t.call(this),this._restoreXHRPatch=void 0,this._restoreFetchPatch=void 0)},e}(),Hp="https?://(.*)",jp=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],Up=ja(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],jp),Vp="<masked>",zp=["li_fat_id"];function Bp(e,t,n){if(!ys)return{};var r,i=t?ja([],jp,n||[]):[],o=Wp(yl(ys.URL,i,Vp),e),s=(r={},Na(zp,(function(e){var t=cp._get(e);r[e]=t||null})),r);return Ha(s,o)}function Wp(e,t){var n=Up.concat(t||[]),r={};return Na(n,(function(t){var n=ml(e,t);r[t]=n||null})),r}function Gp(e){var t=function(e){return e?0===e.search(Hp+"google.([^/?]*)")?"google":0===e.search(Hp+"bing.com")?"bing":0===e.search(Hp+"yahoo.com")?"yahoo":0===e.search(Hp+"duckduckgo.com")?"duckduckgo":null:null}(e),n="yahoo"!=t?"q":"p",r={};if(!zs(t)){r.$search_engine=t;var i=ys?ml(ys.referrer,n):"";i.length&&(r.ph_keyword=i)}return r}function Zp(){return navigator.language||navigator.userLanguage}function Yp(){return(null==ys?void 0:ys.referrer)||"$direct"}function Qp(e,t){var n=e?ja([],jp,t||[]):[],r=null==bs?void 0:bs.href.substring(0,1e3);return{r:Yp().substring(0,1e3),u:r?yl(r,n,Vp):void 0}}function Xp(e){var t,n=e.r,r=e.u,i={$referrer:n,$referring_domain:null==n?void 0:"$direct"==n?"$direct":null==(t=vl(n))?void 0:t.host};if(r){i.$current_url=r;var o=vl(r);i.$host=null==o?void 0:o.host,i.$pathname=null==o?void 0:o.pathname;var s=Wp(r);Ha(i,s)}if(n){var a=Gp(n);Ha(i,a)}return i}function Jp(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}}function Kp(){try{return(new Date).getTimezoneOffset()}catch(e){return}}function e_(e,t){if(!Es)return{};var n,r=e?ja([],jp,t||[]):[],i=function(e){for(var t=0;t<dl.length;t++){var n=dl[t],r=n[0],i=n[1],o=r.exec(e),s=o&&($s(i)?i(o,e):i);if(s)return s}return["",""]}(Es),o=i[0],s=i[1];return Ha(Ba({$os:o,$os_version:s,$browser:ul(Es,navigator.vendor),$device:fl(Es),$device_type:pl(Es),$timezone:Jp(),$timezone_offset:Kp()}),{$current_url:yl(null==bs?void 0:bs.href,r,Vp),$host:null==bs?void 0:bs.host,$pathname:null==bs?void 0:bs.pathname,$raw_user_agent:Es.length>1e3?Es.substring(0,997)+"...":Es,$browser_version:cl(Es,navigator.vendor),$browser_language:Zp(),$browser_language_prefix:(n=Zp(),"string"==typeof n?n.split("-")[0]:void 0),$screen_height:null==ps?void 0:ps.screen.height,$screen_width:null==ps?void 0:ps.screen.width,$viewport_height:null==ps?void 0:ps.innerHeight,$viewport_width:null==ps?void 0:ps.innerWidth,$lib:"web",$lib_version:Ps.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})}var t_=Da("[Web Vitals]"),n_=9e5,r_=function(){function e(e){var t,n=this;this._enabledServerSide=!1,this._initialized=!1,this._buffer={url:void 0,metrics:[],firstMetricTimestamp:void 0},this._flushToCapture=function(){clearTimeout(n._delayedFlushTimer),0!==n._buffer.metrics.length&&(n._instance.capture("$web_vitals",n._buffer.metrics.reduce((function(e,t){var n;return Ui({},e,((n={})["$web_vitals_"+t.name+"_event"]=Ui({},t),n["$web_vitals_"+t.name+"_value"]=t.value,n))}),{})),n._buffer={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this._addToBuffer=function(e){var t,r=null==(t=n._instance.sessionManager)?void 0:t.checkAndGetSessionAndWindowId(!0);if(js(r))t_.error("Could not read session ID. Dropping metrics!");else{n._buffer=n._buffer||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var i=n._currentURL();if(!js(i))if(Bs(null==e?void 0:e.name)||Bs(null==e?void 0:e.value))t_.error("Invalid metric received",e);else if(n._maxAllowedValue&&e.value>=n._maxAllowedValue)t_.error("Ignoring metric with value >= "+n._maxAllowedValue,e);else n._buffer.url!==i&&(n._flushToCapture(),n._delayedFlushTimer=setTimeout(n._flushToCapture,n.flushToCaptureTimeoutMs)),js(n._buffer.url)&&(n._buffer.url=i),n._buffer.firstMetricTimestamp=js(n._buffer.firstMetricTimestamp)?Date.now():n._buffer.firstMetricTimestamp,e.attribution&&e.attribution.interactionTargetElement&&(e.attribution.interactionTargetElement=void 0),n._buffer.metrics.push(Ui({},e,{$current_url:i,$session_id:r.sessionId,$window_id:r.windowId,timestamp:Date.now()})),n._buffer.metrics.length===n.allowedMetrics.length&&n._flushToCapture()}},this._startCapturing=function(){var e,t,r,i,o=ks.__PosthogExtensions__;if(!js(o)&&!js(o.postHogWebVitalsCallbacks)){var s=o.postHogWebVitalsCallbacks;e=s.onLCP,t=s.onCLS,r=s.onFCP,i=s.onINP}e&&t&&r&&i?(n.allowedMetrics.indexOf("LCP")>-1&&e(n._addToBuffer.bind(n)),n.allowedMetrics.indexOf("CLS")>-1&&t(n._addToBuffer.bind(n)),n.allowedMetrics.indexOf("FCP")>-1&&r(n._addToBuffer.bind(n)),n.allowedMetrics.indexOf("INP")>-1&&i(n._addToBuffer.bind(n)),n._initialized=!0):t_.error("web vitals callbacks not loaded - not starting")},this._instance=e,this._enabledServerSide=!(null==(t=this._instance.persistence)||!t.props[Nd]),this.startIfEnabled()}var t=e.prototype;return t.startIfEnabled=function(){this.isEnabled&&!this._initialized&&(t_.info("enabled, starting..."),this._loadScript(this._startCapturing))},t.onRemoteConfig=function(e){var t,n,r=Ns(e.capturePerformance)&&!!e.capturePerformance.web_vitals,i=Ns(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register(((t={})[Nd]=r,t)),this._instance.persistence.register(((n={})[jd]=i,n)));this._enabledServerSide=r,this.startIfEnabled()},t._loadScript=function(e){var t,n;null!=(t=ks.__PosthogExtensions__)&&t.postHogWebVitalsCallbacks&&e(),null==(n=ks.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this._instance,"web-vitals",(function(t){t?t_.error("failed to load script",t):e()}))},t._currentURL=function(){var e=ps?ps.location.href:void 0;if(e){var t=this._instance.config.mask_personal_data_properties,n=this._instance.config.custom_personal_data_properties,r=t?ja([],jp,n||[]):[];return yl(e,r,Vp)}t_.error("Could not determine current URL")},Hi(e,[{key:"allowedMetrics",get:function(){var e,t,n=Ns(this._instance.config.capture_performance)?null==(e=this._instance.config.capture_performance)?void 0:e.web_vitals_allowed_metrics:void 0;return js(n)?(null==(t=this._instance.persistence)?void 0:t.props[jd])||["CLS","FCP","INP","LCP"]:n}},{key:"flushToCaptureTimeoutMs",get:function(){return(Ns(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals_delayed_flush_ms:void 0)||5e3}},{key:"_maxAllowedValue",get:function(){var e=Ns(this._instance.config.capture_performance)&&Ws(this._instance.config.capture_performance.__web_vitals_max_value)?this._instance.config.capture_performance.__web_vitals_max_value:n_;return 0<e&&e<=6e4?n_:e}},{key:"isEnabled",get:function(){var e=null==bs?void 0:bs.protocol;if("http:"!==e&&"https:"!==e)return t_.info("Web Vitals are disabled on non-http/https protocols"),!1;var t=Ns(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals:Gs(this._instance.config.capture_performance)?this._instance.config.capture_performance:void 0;return Gs(t)?t:this._enabledServerSide}}])}(),i_=Da("[Heatmaps]");function o_(e){return Ns(e)&&"clientX"in e&&"clientY"in e&&Ws(e.clientX)&&Ws(e.clientY)}var s_=function(){function e(e){var t;this._enabledServerSide=!1,this._initialized=!1,this._flushInterval=null,this.instance=e,this._enabledServerSide=!(null==(t=this.instance.persistence)||!t.props[Ad]),this.rageclicks=new ep(e.config.rageclick)}var t=e.prototype;return t.startIfEnabled=function(){if(this.isEnabled){if(this._initialized)return;i_.info("starting..."),this._setupListeners(),this._onVisibilityChange()}else{var e;clearInterval(null!==(e=this._flushInterval)&&void 0!==e?e:void 0),this._removeListeners(),this.getAndClearBuffer()}},t.onRemoteConfig=function(e){var t,n=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register(((t={})[Ad]=n,t));this._enabledServerSide=n,this.startIfEnabled()},t.getAndClearBuffer=function(){var e=this._buffer;return this._buffer=void 0,e},t._onDeadClick=function(e){this._onClick(e.originalEvent,"deadclick")},t._onVisibilityChange=function(){this._flushInterval&&clearInterval(this._flushInterval),this._flushInterval=function(e){return"visible"===(null==e?void 0:e.visibilityState)}(ys)?setInterval(this._flush.bind(this),this.flushIntervalMilliseconds):null},t._setupListeners=function(){var e=this;ps&&ys&&(this._flushHandler=this._flush.bind(this),Qa(ps,"beforeunload",this._flushHandler),this._onClickHandler=function(t){return e._onClick(t||(null==ps?void 0:ps.event))},Qa(ys,"click",this._onClickHandler,{capture:!0}),this._onMouseMoveHandler=function(t){return e._onMouseMove(t||(null==ps?void 0:ps.event))},Qa(ys,"mousemove",this._onMouseMoveHandler,{capture:!0}),this._deadClicksCapture=new Ep(this.instance,Sp,this._onDeadClick.bind(this)),this._deadClicksCapture.startIfEnabled(),this._onVisibilityChange_handler=this._onVisibilityChange.bind(this),Qa(ys,"visibilitychange",this._onVisibilityChange_handler),this._initialized=!0)},t._removeListeners=function(){var e;ps&&ys&&(this._flushHandler&&ps.removeEventListener("beforeunload",this._flushHandler),this._onClickHandler&&ys.removeEventListener("click",this._onClickHandler,{capture:!0}),this._onMouseMoveHandler&&ys.removeEventListener("mousemove",this._onMouseMoveHandler,{capture:!0}),this._onVisibilityChange_handler&&ys.removeEventListener("visibilitychange",this._onVisibilityChange_handler),clearTimeout(this._mouseMoveTimeout),null==(e=this._deadClicksCapture)||e.stop(),this._initialized=!1)},t._getProperties=function(e,t){var n=this.instance.scrollManager.scrollY(),r=this.instance.scrollManager.scrollX(),i=this.instance.scrollManager.scrollElement(),o=function(e,t,n){for(var r=e;r&&bf(r)&&!wf(r,"body");){if(r===n)return!1;if(Fs(t,null==ps?void 0:ps.getComputedStyle(r).position))return!0;r=Rf(r)}return!1}(If(e),["fixed","sticky"],i);return{x:e.clientX+(o?0:r),y:e.clientY+(o?0:n),target_fixed:o,type:t}},t._onClick=function(e,t){var n;if(void 0===t&&(t="click"),!yf(e.target)&&o_(e)){var r=this._getProperties(e,t);null!=(n=this.rageclicks)&&n.isRageClick(e.clientX,e.clientY,(new Date).getTime())&&this._capture(Ui({},r,{type:"rageclick"})),this._capture(r)}},t._onMouseMove=function(e){var t=this;!yf(e.target)&&o_(e)&&(clearTimeout(this._mouseMoveTimeout),this._mouseMoveTimeout=setTimeout((function(){t._capture(t._getProperties(e,"mousemove"))}),500))},t._capture=function(e){if(ps){var t=ps.location.href,n=this.instance.config.mask_personal_data_properties,r=this.instance.config.custom_personal_data_properties,i=n?ja([],jp,r||[]):[],o=yl(t,i,Vp);this._buffer=this._buffer||{},this._buffer[o]||(this._buffer[o]=[]),this._buffer[o].push(e)}},t._flush=function(){this._buffer&&!Hs(this._buffer)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})},Hi(e,[{key:"flushIntervalMilliseconds",get:function(){var e=5e3;return Ns(this.instance.config.capture_heatmaps)&&this.instance.config.capture_heatmaps.flush_interval_milliseconds&&(e=this.instance.config.capture_heatmaps.flush_interval_milliseconds),e}},{key:"isEnabled",get:function(){return js(this.instance.config.capture_heatmaps)?js(this.instance.config.enable_heatmaps)?this._enabledServerSide:this.instance.config.enable_heatmaps:!1!==this.instance.config.capture_heatmaps}}])}(),a_=function(){function e(e){this._instance=e}var t=e.prototype;return t.doPageView=function(e,t){var n,r=this._previousPageViewProperties(e,t);return this._currentPageview={pathname:null!==(n=null==ps?void 0:ps.location.pathname)&&void 0!==n?n:"",pageViewId:t,timestamp:e},this._instance.scrollManager.resetContext(),r},t.doPageLeave=function(e){var t;return this._previousPageViewProperties(e,null==(t=this._currentPageview)?void 0:t.pageViewId)},t.doEvent=function(){var e;return{$pageview_id:null==(e=this._currentPageview)?void 0:e.pageViewId}},t._previousPageViewProperties=function(e,t){var n=this._currentPageview;if(!n)return{$pageview_id:t};var r={$pageview_id:t,$prev_pageview_id:n.pageViewId},i=this._instance.scrollManager.getContext();if(i&&!this._instance.config.disable_scroll_properties){var o=i.maxScrollHeight,s=i.lastScrollY,a=i.maxScrollY,u=i.maxContentHeight,l=i.lastContentY,c=i.maxContentY;if(!(js(o)||js(s)||js(a)||js(u)||js(l)||js(c))){o=Math.ceil(o),s=Math.ceil(s),a=Math.ceil(a),u=Math.ceil(u),l=Math.ceil(l),c=Math.ceil(c);var d=o<=1?1:na(s/o,0,1,Aa),f=o<=1?1:na(a/o,0,1,Aa),p=u<=1?1:na(l/u,0,1,Aa),_=u<=1?1:na(c/u,0,1,Aa);r=Ha(r,{$prev_pageview_last_scroll:s,$prev_pageview_last_scroll_percentage:d,$prev_pageview_max_scroll:a,$prev_pageview_max_scroll_percentage:f,$prev_pageview_last_content:l,$prev_pageview_last_content_percentage:p,$prev_pageview_max_content:c,$prev_pageview_max_content_percentage:_})}}return n.pathname&&(r.$prev_pageview_pathname=n.pathname),n.timestamp&&(r.$prev_pageview_duration=(e.getTime()-n.timestamp.getTime())/1e3),r},e}(),u_=Da("[FeatureFlags]"),l_=Da("[FeatureFlags]",{debugEnabled:!0}),c_="$active_feature_flags",d_="$override_feature_flags",f_="$feature_flag_payloads",p_="$override_feature_flag_payloads",__="$feature_flag_request_id",h_="$feature_flag_evaluated_at",v_=function(e){for(var t,n={},r=ji(Ua(e||{}));!(t=r()).done;){var i=t.value,o=i[0],s=i[1];s&&(n[o]=s)}return n},g_=function(e){var t=e.flags;return t?(e.featureFlags=Object.fromEntries(Object.keys(t).map((function(e){var n;return[e,null!==(n=t[e].variant)&&void 0!==n?n:t[e].enabled]}))),e.featureFlagPayloads=Object.fromEntries(Object.keys(t).filter((function(e){return t[e].enabled})).filter((function(e){var n;return null==(n=t[e].metadata)?void 0:n.payload})).map((function(e){var n;return[e,null==(n=t[e].metadata)?void 0:n.payload]})))):u_.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),e},m_=function(e){return e.FeatureFlags="feature_flags",e.Recordings="recordings",e}({}),y_=function(){function e(e){this._override_warning=!1,this._hasLoadedFlags=!1,this._requestInFlight=!1,this._reloadingDisabled=!1,this._additionalReloadRequested=!1,this._flagsCalled=!1,this._flagsLoadedFromRemote=!1,this._instance=e,this.featureFlagEventHandlers=[]}var t=e.prototype;return t._getValidEvaluationEnvironments=function(){var e=this._instance.config.evaluation_environments;return null!=e&&e.length?e.filter((function(e){var t=e&&"string"==typeof e&&e.trim().length>0;return t||u_.error("Invalid evaluation environment found:",e,"Expected non-empty string"),t})):[]},t._shouldIncludeEvaluationEnvironments=function(){return this._getValidEvaluationEnvironments().length>0},t.flags=function(){if(this._instance.config.__preview_remote_config)this._flagsCalled=!0;else{var e=!this._reloadDebouncer&&(this._instance.config.advanced_disable_feature_flags||this._instance.config.advanced_disable_feature_flags_on_first_load);this._callFlagsEndpoint({disableFlags:e})}},t.getFlags=function(){return Object.keys(this.getFlagVariants())},t.getFlagsWithDetails=function(){var e=this._instance.get_property(Gd),t=this._instance.get_property(d_),n=this._instance.get_property(p_);if(!n&&!t)return e||{};for(var r,i=Ha({},e||{}),o=ji([].concat(new Set([].concat(Object.keys(n||{}),Object.keys(t||{})))));!(r=o()).done;){var s,a,u=r.value,l=i[u],c=null==t?void 0:t[u],d=js(c)?null!==(s=null==l?void 0:l.enabled)&&void 0!==s&&s:!!c,f=js(c)?l.variant:"string"==typeof c?c:void 0,p=null==n?void 0:n[u],_=Ui({},l,{enabled:d,variant:d?null!=f?f:null==l?void 0:l.variant:void 0});if(d!==(null==l?void 0:l.enabled)&&(_.original_enabled=null==l?void 0:l.enabled),f!==(null==l?void 0:l.variant)&&(_.original_variant=null==l?void 0:l.variant),p)_.metadata=Ui({},null==l?void 0:l.metadata,{payload:p,original_payload:null==l||null==(a=l.metadata)?void 0:a.payload});i[u]=_}return this._override_warning||(u_.warn(" Overriding feature flag details!",{flagDetails:e,overriddenPayloads:n,finalDetails:i}),this._override_warning=!0),i},t.getFlagVariants=function(){var e=this._instance.get_property(Bd),t=this._instance.get_property(d_);if(!t)return e||{};for(var n=Ha({},e),r=Object.keys(t),i=0;i<r.length;i++)n[r[i]]=t[r[i]];return this._override_warning||(u_.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:n}),this._override_warning=!0),n},t.getFlagPayloads=function(){var e=this._instance.get_property(f_),t=this._instance.get_property(p_);if(!t)return e||{};for(var n=Ha({},e||{}),r=Object.keys(t),i=0;i<r.length;i++)n[r[i]]=t[r[i]];return this._override_warning||(u_.warn(" Overriding feature flag payloads!",{flagPayloads:e,overriddenPayloads:t,finalPayloads:n}),this._override_warning=!0),n},t.reloadFeatureFlags=function(){var e=this;this._reloadingDisabled||this._instance.config.advanced_disable_feature_flags||this._reloadDebouncer||(this._reloadDebouncer=setTimeout((function(){e._callFlagsEndpoint()}),5))},t._clearDebouncer=function(){clearTimeout(this._reloadDebouncer),this._reloadDebouncer=void 0},t.ensureFlagsLoaded=function(){this._hasLoadedFlags||this._requestInFlight||this._reloadDebouncer||this.reloadFeatureFlags()},t.setAnonymousDistinctId=function(e){this.$anon_distinct_id=e},t.setReloadingPaused=function(e){this._reloadingDisabled=e},t._callFlagsEndpoint=function(e){var t,n=this;if(this._clearDebouncer(),!this._instance._shouldDisableFlags())if(this._requestInFlight)this._additionalReloadRequested=!0;else{var r=this._instance.config.token,i=this._instance.get_property("$device_id"),o={token:r,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:Ui({},(null==(t=this._instance.persistence)?void 0:t.get_initial_props())||{},this._instance.get_property(Zd)||{}),group_properties:this._instance.get_property(Yd)};zs(i)||js(i)||(o.$device_id=i),(null!=e&&e.disableFlags||this._instance.config.advanced_disable_feature_flags)&&(o.disable_flags=!0),this._shouldIncludeEvaluationEnvironments()&&(o.evaluation_environments=this._getValidEvaluationEnvironments());var s=this._instance.config.__preview_remote_config,a=s?"/flags/?v=2":"/flags/?v=2&config=true",u=this._instance.config.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":"",l=this._instance.requestRouter.endpointFor("flags",a+u);s&&(o.timezone=Jp()),this._requestInFlight=!0,this._instance._send_request({method:"POST",url:l,data:o,compression:this._instance.config.disable_compression?void 0:hl.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:function(e){var t,r,i=!0;(200===e.statusCode&&(n._additionalReloadRequested||(n.$anon_distinct_id=void 0),i=!1),n._requestInFlight=!1,n._flagsCalled)||(n._flagsCalled=!0,n._instance._onRemoteConfig(null!==(r=e.json)&&void 0!==r?r:{}));if(!o.disable_flags||n._additionalReloadRequested)if(n._flagsLoadedFromRemote=!i,e.json&&null!=(t=e.json.quotaLimited)&&t.includes(m_.FeatureFlags))u_.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.");else{var s;if(!o.disable_flags)n.receivedFeatureFlags(null!==(s=e.json)&&void 0!==s?s:{},i);n._additionalReloadRequested&&(n._additionalReloadRequested=!1,n._callFlagsEndpoint())}}})}},t.getFeatureFlag=function(e,t){if(void 0===t&&(t={}),this._hasLoadedFlags||this.getFlags()&&this.getFlags().length>0){var n=this.getFlagVariants()[e],r=""+n,i=this._instance.get_property(__)||void 0,o=this._instance.get_property(h_)||void 0,s=this._instance.get_property(Jd)||{};if((t.send_event||!("send_event"in t))&&(!(e in s)||!s[e].includes(r))){var a,u,l,c,d,f,p,_,h,v;qs(s[e])?s[e].push(r):s[e]=[r],null==(a=this._instance.persistence)||a.register(((u={})[Jd]=s,u));var g=this.getFeatureFlagDetails(e),m={$feature_flag:e,$feature_flag_response:n,$feature_flag_payload:this.getFeatureFlagPayload(e)||null,$feature_flag_request_id:i,$feature_flag_evaluated_at:o,$feature_flag_bootstrapped_response:(null==(l=this._instance.config.bootstrap)||null==(l=l.featureFlags)?void 0:l[e])||null,$feature_flag_bootstrapped_payload:(null==(c=this._instance.config.bootstrap)||null==(c=c.featureFlagPayloads)?void 0:c[e])||null,$used_bootstrap_value:!this._flagsLoadedFromRemote};js(null==g||null==(d=g.metadata)?void 0:d.version)||(m.$feature_flag_version=g.metadata.version);var y,b=null!==(f=null==g||null==(p=g.reason)?void 0:p.description)&&void 0!==f?f:null==g||null==(_=g.reason)?void 0:_.code;if(b&&(m.$feature_flag_reason=b),null!=g&&null!=(h=g.metadata)&&h.id&&(m.$feature_flag_id=g.metadata.id),js(null==g?void 0:g.original_variant)&&js(null==g?void 0:g.original_enabled)||(m.$feature_flag_original_response=js(g.original_variant)?g.original_enabled:g.original_variant),null!=g&&null!=(v=g.metadata)&&v.original_payload)m.$feature_flag_original_payload=null==g||null==(y=g.metadata)?void 0:y.original_payload;this._instance.capture("$feature_flag_called",m)}return n}u_.warn('getFeatureFlag for key "'+e+"\" failed. Feature flags didn't load in time.")},t.getFeatureFlagDetails=function(e){return this.getFlagsWithDetails()[e]},t.getFeatureFlagPayload=function(e){return this.getFlagPayloads()[e]},t.getRemoteConfigPayload=function(e,t){var n=this._instance.config.token,r={distinct_id:this._instance.get_distinct_id(),token:n};this._shouldIncludeEvaluationEnvironments()&&(r.evaluation_environments=this._getValidEvaluationEnvironments()),this._instance._send_request({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2&config=true"),data:r,compression:this._instance.config.disable_compression?void 0:hl.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:function(n){var r,i=null==(r=n.json)?void 0:r.featureFlagPayloads;t((null==i?void 0:i[e])||void 0)}})},t.isFeatureEnabled=function(e,t){if(void 0===t&&(t={}),this._hasLoadedFlags||this.getFlags()&&this.getFlags().length>0){var n=this.getFeatureFlag(e,t);return js(n)?void 0:!!n}u_.warn('isFeatureEnabled for key "'+e+"\" failed. Feature flags didn't load in time.")},t.addFeatureFlagsHandler=function(e){this.featureFlagEventHandlers.push(e)},t.removeFeatureFlagsHandler=function(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter((function(t){return t!==e}))},t.receivedFeatureFlags=function(e,t){if(this._instance.persistence){this._hasLoadedFlags=!0;var n=this.getFlagVariants(),r=this.getFlagPayloads(),i=this.getFlagsWithDetails();!function(e,t,n,r,i){var o,s,a;void 0===n&&(n={}),void 0===r&&(r={}),void 0===i&&(i={});var u=g_(e),l=u.flags,c=u.featureFlags,d=u.featureFlagPayloads;if(c){var f=e.requestId,p=e.evaluatedAt;if(qs(c)){var _;u_.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var h={};if(c)for(var v=0;v<c.length;v++)h[c[v]]=!0;t&&t.register(((_={})[c_]=c,_[Bd]=h,_))}else{var g=c,m=d,y=l;e.errorsWhileComputingFlags&&(g=Ui({},n,g),m=Ui({},r,m),y=Ui({},i,y)),t&&t.register(Ui(((o={})[c_]=Object.keys(v_(g)),o[Bd]=g||{},o[f_]=m||{},o[Gd]=y||{},o),f?((s={})[__]=f,s):{},p?((a={})[h_]=p,a):{}))}}}(e,this._instance.persistence,n,r,i),this._fireFeatureFlagsCallbacks(t)}},t.override=function(e,t){void 0===t&&(t=!1),u_.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:e,suppressWarning:t})},t.overrideFeatureFlags=function(e){if(!this._instance.__loaded||!this._instance.persistence)return u_.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(!1===e)return this._instance.persistence.unregister(d_),this._instance.persistence.unregister(p_),this._fireFeatureFlagsCallbacks(),l_.info("All overrides cleared");if(e&&"object"==typeof e&&("flags"in e||"payloads"in e)){var t,n=e;if(this._override_warning=Boolean(null!==(t=n.suppressWarning)&&void 0!==t&&t),"flags"in n)if(!1===n.flags)this._instance.persistence.unregister(d_),l_.info("Flag overrides cleared");else if(n.flags){if(qs(n.flags)){for(var r,i={},o=0;o<n.flags.length;o++)i[n.flags[o]]=!0;this._instance.persistence.register(((r={})[d_]=i,r))}else{var s;this._instance.persistence.register(((s={})[d_]=n.flags,s))}l_.info("Flag overrides set",{flags:n.flags})}if("payloads"in n)if(!1===n.payloads)this._instance.persistence.unregister(p_),l_.info("Payload overrides cleared");else if(n.payloads){var a;this._instance.persistence.register(((a={})[p_]=n.payloads,a)),l_.info("Payload overrides set",{payloads:n.payloads})}this._fireFeatureFlagsCallbacks()}else this._fireFeatureFlagsCallbacks()},t.onFeatureFlags=function(e){var t=this;if(this.addFeatureFlagsHandler(e),this._hasLoadedFlags){var n=this._prepareFeatureFlagsForCallbacks(),r=n.flags,i=n.flagVariants;e(r,i)}return function(){return t.removeFeatureFlagsHandler(e)}},t.updateEarlyAccessFeatureEnrollment=function(e,t,n){var r,i,o,s,a=(this._instance.get_property(Wd)||[]).find((function(t){return t.flagKey===e})),u=((r={})["$feature_enrollment/"+e]=t,r),l={$feature_flag:e,$feature_enrollment:t,$set:u};a&&(l.$early_access_feature_name=a.name),n&&(l.$feature_enrollment_stage=n),this._instance.capture("$feature_enrollment_update",l),this.setPersonPropertiesForFlags(u,!1);var c=Ui({},this.getFlagVariants(),((i={})[e]=t,i));null==(o=this._instance.persistence)||o.register(((s={})[c_]=Object.keys(v_(c)),s[Bd]=c,s)),this._fireFeatureFlagsCallbacks()},t.getEarlyAccessFeatures=function(e,t,n){var r=this;void 0===t&&(t=!1);var i=this._instance.get_property(Wd),o=n?"&"+n.map((function(e){return"stage="+e})).join("&"):"";if(i&&!t)return e(i);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this._instance.config.token+o),method:"GET",callback:function(t){var n,i,o;if(t.json){var s=t.json.earlyAccessFeatures;return null==(n=r._instance.persistence)||n.unregister(Wd),null==(i=r._instance.persistence)||i.register(((o={})[Wd]=s,o)),e(s)}}})},t._prepareFeatureFlagsForCallbacks=function(){var e=this.getFlags(),t=this.getFlagVariants();return{flags:e.filter((function(e){return t[e]})),flagVariants:Object.keys(t).filter((function(e){return t[e]})).reduce((function(e,n){return e[n]=t[n],e}),{})}},t._fireFeatureFlagsCallbacks=function(e){var t=this._prepareFeatureFlagsForCallbacks(),n=t.flags,r=t.flagVariants;this.featureFlagEventHandlers.forEach((function(t){return t(n,r,{errorsLoading:e})}))},t.setPersonPropertiesForFlags=function(e,t){var n;void 0===t&&(t=!0);var r=this._instance.get_property(Zd)||{};this._instance.register(((n={})[Zd]=Ui({},r,e),n)),t&&this._instance.reloadFeatureFlags()},t.resetPersonPropertiesForFlags=function(){this._instance.unregister(Zd)},t.setGroupPropertiesForFlags=function(e,t){var n;void 0===t&&(t=!0);var r=this._instance.get_property(Yd)||{};0!==Object.keys(r).length&&Object.keys(r).forEach((function(t){r[t]=Ui({},r[t],e[t]),delete e[t]})),this._instance.register(((n={})[Yd]=Ui({},r,e),n)),t&&this._instance.reloadFeatureFlags()},t.resetGroupPropertiesForFlags=function(e){if(e){var t,n,r=this._instance.get_property(Yd)||{};this._instance.register(((n={})[Yd]=Ui({},r,((t={})[e]={},t)),n))}else this._instance.unregister(Yd)},t.reset=function(){this._hasLoadedFlags=!1,this._requestInFlight=!1,this._reloadingDisabled=!1,this._additionalReloadRequested=!1,this._flagsCalled=!1,this._flagsLoadedFromRemote=!1,this.$anon_distinct_id=void 0,this._clearDebouncer(),this._override_warning=!1},Hi(e,[{key:"hasLoadedFlags",get:function(){return this._hasLoadedFlags}}])}(),b_=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"],w_=function(){function e(e,t){this._config=e,this.props={},this._campaign_params_saved=!1,this._name=function(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._storage=this._buildStorage(e),this.load(),e.debug&&Aa.info("Persistence loaded",e.persistence,Ui({},this.props)),this.update_config(e,e,t),this.save()}var t=e.prototype;return t.isDisabled=function(){return!!this._disabled},t._buildStorage=function(e){-1===b_.indexOf(e.persistence.toLowerCase())&&(Aa.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var t=e.persistence.toLowerCase();return"localstorage"===t&&fp._is_supported()?fp:"localstorage+cookie"===t&&_p._is_supported()?_p:"sessionstorage"===t&&mp._is_supported()?mp:"memory"===t?vp:"cookie"===t?cp:_p._is_supported()?_p:cp},t.properties=function(){var e={};return Na(this.props,(function(t,n){if(n===Bd&&Ns(t))for(var r=Object.keys(t),i=0;i<r.length;i++)e["$feature/"+r[i]]=t[r[i]];else s=n,a=!1,(zs(o=lf)?a:gs&&o.indexOf===gs?-1!=o.indexOf(s):(Na(o,(function(e){if(a||(a=e===s))return qa})),a))||(e[n]=t);var o,s,a})),e},t.load=function(){if(!this._disabled){var e=this._storage._parse(this._name);e&&(this.props=Ha({},e))}},t.save=function(){this._disabled||this._storage._set(this._name,this.props,this._expire_days,this._cross_subdomain,this._secure,this._config.debug)},t.remove=function(){this._storage._remove(this._name,!1),this._storage._remove(this._name,!0)},t.clear=function(){this.remove(),this.props={}},t.register_once=function(e,t,n){var r=this;if(Ns(e)){js(t)&&(t="None"),this._expire_days=js(n)?this._default_expiry:n;var i=!1;if(Na(e,(function(e,n){r.props.hasOwnProperty(n)&&r.props[n]!==t||(r.props[n]=e,i=!0)})),i)return this.save(),!0}return!1},t.register=function(e,t){var n=this;if(Ns(e)){this._expire_days=js(t)?this._default_expiry:t;var r=!1;if(Na(e,(function(t,i){e.hasOwnProperty(i)&&n.props[i]!==t&&(n.props[i]=t,r=!0)})),r)return this.save(),!0}return!1},t.unregister=function(e){e in this.props&&(delete this.props[e],this.save())},t.update_campaign_params=function(){if(!this._campaign_params_saved){var e=Bp(this._config.custom_campaign_params,this._config.mask_personal_data_properties,this._config.custom_personal_data_properties);Hs(Ba(e))||this.register(e),this._campaign_params_saved=!0}},t.update_search_keyword=function(){var e;this.register((e=null==ys?void 0:ys.referrer)?Gp(e):{})},t.update_referrer_info=function(){var e;this.register_once({$referrer:Yp(),$referring_domain:null!=ys&&ys.referrer&&(null==(e=vl(ys.referrer))?void 0:e.host)||"$direct"},void 0)},t.set_initial_person_info=function(){var e;this.props[nf]||this.props[rf]||this.register_once(((e={})[of]=Qp(this._config.mask_personal_data_properties,this._config.custom_personal_data_properties),e),void 0)},t.get_initial_props=function(){var e=this,t={};Na([rf,nf],(function(n){var r=e.props[n];r&&Na(r,(function(e,n){t["$initial_"+Rs(n)]=e}))}));var n,r,i=this.props[of];if(i){var o=(n=Xp(i),r={},Na(n,(function(e,t){r["$initial_"+Rs(t)]=e})),r);Ha(t,o)}return t},t.safe_merge=function(e){return Na(this.props,(function(t,n){n in e||(e[n]=t)})),e},t.update_config=function(e,t,n){if(this._default_expiry=this._expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence||!!n),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie),e.persistence!==t.persistence){var r=this._buildStorage(e),i=this.props;this.clear(),this._storage=r,this.props=i,this.save()}},t.set_disabled=function(e){this._disabled=e,this._disabled?this.remove():this.save()},t.set_cross_subdomain=function(e){e!==this._cross_subdomain&&(this._cross_subdomain=e,this.remove(),this.save())},t.set_secure=function(e){e!==this._secure&&(this._secure=e,this.remove(),this.save())},t.set_event_timer=function(e,t){var n=this.props[Od]||{};n[e]=t,this.props[Od]=n,this.save()},t.remove_event_timer=function(e){var t=(this.props[Od]||{})[e];return js(t)||(delete this.props[Od][e],this.save()),t},t.get_property=function(e){return this.props[e]},t.set_property=function(e,t){this.props[e]=t,this.save()},e}(),S_=Da("[Product Tours]"),x_="ph_product_tours",E_=function(){function e(e){this._cachedTours=null,this._productTourManager=null,this._isProductToursEnabled=void 0,this._isInitializing=!1,this._instance=e}var t=e.prototype;return t.onRemoteConfig=function(e){if(this._instance.config.disable_product_tours)S_.info("Product tours disabled via config");else{var t=e.productTours;Bs(t)?S_.info("Product tours not enabled in remote config"):(this._isProductToursEnabled=t,S_.info("Remote config received, isProductToursEnabled: "+this._isProductToursEnabled),this.loadIfEnabled())}},t.loadIfEnabled=function(){var e,t=this;if(!this._productTourManager)if(this._isInitializing)S_.info("Already initializing product tours, skipping...");else if(this._instance.config.disable_product_tours)S_.info("Product tours disabled via config");else{var n=null==ks?void 0:ks.__PosthogExtensions__;if(n){var r=null==(e=this._instance.featureFlags)?void 0:e.isFeatureEnabled("product-tours-2025");if(!js(this._isProductToursEnabled)||r){var i=this._isProductToursEnabled||r;if(i){this._isInitializing=!0;try{var o=n.generateProductTours;if(o)return void this._completeInitialization(o,i);var s=n.loadExternalDependency;if(!s)return S_.error("PostHog loadExternalDependency extension not found."),void(this._isInitializing=!1);s(this._instance,"product-tours",(function(e){e||!n.generateProductTours?S_.error("Could not load product tours script",e):t._completeInitialization(n.generateProductTours,i),t._isInitializing=!1}))}catch(e){S_.error("Error initializing product tours",e),this._isInitializing=!1}}else S_.info("Product tours not enabled")}else S_.info("Waiting for remote config or feature flag to enable product tours")}else S_.error("PostHog Extensions not found.")}},t._completeInitialization=function(e,t){this._productTourManager=e(this._instance,t)||null,S_.info("Product tours loaded successfully")},t.getProductTours=function(e,t){var n=this;if(void 0===t&&(t=!1),!qs(this._cachedTours)||t){var r=this._instance.persistence;if(r){var i=r.props[x_];if(qs(i)&&!t)return this._cachedTours=i,void e(i,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",callback:function(t){var i=t.statusCode;if(200!==i||!t.json){var o="Product Tours API could not be loaded, status: "+i;return S_.error(o),void e([],{isLoaded:!1,error:o})}var s,a=qs(t.json.product_tours)?t.json.product_tours:[];(n._cachedTours=a,r)&&r.register(((s={})[x_]=a,s));e(a,{isLoaded:!0})}})}else e(this._cachedTours,{isLoaded:!0})},t.getActiveProductTours=function(e){if(Bs(this._productTourManager))return S_.warn("Product tours not loaded yet"),void e([],{isLoaded:!1,error:"Product tours not loaded"});this._productTourManager.getActiveProductTours(e)},t.showProductTour=function(e){var t;S_.info("showProductTour("+e+")"),null==(t=this._productTourManager)||t.showTourById(e)},t.dismissProductTour=function(){var e;null==(e=this._productTourManager)||e.dismissTour("user_clicked_skip")},t.nextStep=function(){var e;null==(e=this._productTourManager)||e.nextStep()},t.previousStep=function(){var e;null==(e=this._productTourManager)||e.previousStep()},t.clearCache=function(){this._cachedTours=null;var e=this._instance.persistence;e&&e.unregister(x_)},t.resetTour=function(e){var t;null==(t=this._productTourManager)||t.resetTour(e)},t.resetAllTours=function(){var e;null==(e=this._productTourManager)||e.resetAllTours()},e}(),k_=function(){function e(){this._events={},this._events={}}var t=e.prototype;return t.on=function(e,t){var n=this;return this._events[e]||(this._events[e]=[]),this._events[e].push(t),function(){n._events[e]=n._events[e].filter((function(e){return e!==t}))}},t.emit=function(e,t){for(var n,r=ji(this._events[e]||[]);!(n=r()).done;){(0,n.value)(t)}for(var i,o=ji(this._events["*"]||[]);!(i=o()).done;){(0,i.value)(e,t)}},e}();function P_(e,t,n){if(Bs(e))return!1;switch(n){case"exact":return e===t;case"contains":var r=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*");return new RegExp(r,"i").test(e);case"regex":try{return new RegExp(t).test(e)}catch(e){return!1}default:return!1}}var C_=function(){function e(e){var t=this;this._debugEventEmitter=new k_,this._checkStep=function(e,n){return t._checkStepEvent(e,n)&&t._checkStepUrl(e,n)&&t._checkStepElement(e,n)&&t._checkStepProperties(e,n)},this._checkStepEvent=function(e,t){return null==t||!t.event||(null==e?void 0:e.event)===(null==t?void 0:t.event)},this._instance=e,this._actionEvents=new Set,this._actionRegistry=new Set}var t=e.prototype;return t.init=function(){var e,t=this;if(!js(null==(e=this._instance)?void 0:e._addCaptureHook)){var n;null==(n=this._instance)||n._addCaptureHook((function(e,n){t.on(e,n)}))}},t.register=function(e){var t,n,r=this;if(!js(null==(t=this._instance)?void 0:t._addCaptureHook)&&(e.forEach((function(e){var t,n;null==(t=r._actionRegistry)||t.add(e),null==(n=e.steps)||n.forEach((function(e){var t;null==(t=r._actionEvents)||t.add((null==e?void 0:e.event)||"")}))})),null!=(n=this._instance)&&n.autocapture)){var i,o=new Set;e.forEach((function(e){var t;null==(t=e.steps)||t.forEach((function(e){null!=e&&e.selector&&o.add(null==e?void 0:e.selector)}))})),null==(i=this._instance)||i.autocapture.setElementSelectors(o)}},t.on=function(e,t){var n,r=this;null!=t&&0!=e.length&&(this._actionEvents.has(e)||this._actionEvents.has(null==t?void 0:t.event))&&this._actionRegistry&&(null==(n=this._actionRegistry)?void 0:n.size)>0&&this._actionRegistry.forEach((function(e){r._checkAction(t,e)&&r._debugEventEmitter.emit("actionCaptured",e.name)}))},t._addActionHook=function(e){this.onAction("actionCaptured",(function(t){return e(t)}))},t._checkAction=function(e,t){if(null==(null==t?void 0:t.steps))return!1;for(var n,r=ji(t.steps);!(n=r()).done;){var i=n.value;if(this._checkStep(e,i))return!0}return!1},t.onAction=function(e,t){return this._debugEventEmitter.on(e,t)},t._checkStepUrl=function(e,t){if(null!=t&&t.url){var n,r=null==e||null==(n=e.properties)?void 0:n.$current_url;if(!r||"string"!=typeof r)return!1;if(!P_(r,t.url,t.url_matching||"contains"))return!1}return!0},t._checkStepElement=function(e,t){return!!this._checkStepHref(e,t)&&(!!this._checkStepText(e,t)&&!!this._checkStepSelector(e,t))},t._checkStepHref=function(e,t){var n;if(null==t||!t.href)return!0;var r=this._getElementsList(e);if(r.length>0)return r.some((function(e){return P_(e.href,t.href,t.href_matching||"exact")}));var i,o=(null==e||null==(n=e.properties)?void 0:n.$elements_chain)||"";return!!o&&P_((i=o.match(/(?::|")href="(.*?)"/))?i[1]:"",t.href,t.href_matching||"exact")},t._checkStepText=function(e,t){var n;if(null==t||!t.text)return!0;var r=this._getElementsList(e);if(r.length>0)return r.some((function(e){return P_(e.text,t.text,t.text_matching||"exact")||P_(e.$el_text,t.text,t.text_matching||"exact")}));var i,o,s,a=(null==e||null==(n=e.properties)?void 0:n.$elements_chain)||"";return!!a&&(i=function(e){for(var t,n=[],r=/(?::|")text="(.*?)"/g;!Bs(t=r.exec(e));)n.includes(t[1])||n.push(t[1]);return n}(a),o=t.text,s=t.text_matching||"exact",i.some((function(e){return P_(e,o,s)})))},t._checkStepSelector=function(e,t){var n,r;if(null==t||!t.selector)return!0;var i=null==e||null==(n=e.properties)?void 0:n.$element_selectors;if(null!=i&&i.includes(t.selector))return!0;var o=(null==e||null==(r=e.properties)?void 0:r.$elements_chain)||"";if(t.selector_regex&&o)try{return new RegExp(t.selector_regex).test(o)}catch(e){return!1}return!1},t._getElementsList=function(e){var t;return null==(null==e||null==(t=e.properties)?void 0:t.$elements)?[]:null==e?void 0:e.properties.$elements},t._checkStepProperties=function(e,t){return null==t||!t.properties||0===t.properties.length||fc(t.properties.reduce((function(e,t){var n=qs(t.value)?t.value.map(String):null!=t.value?[String(t.value)]:[];return e[t.key]={values:n,operator:t.operator||"exact"},e}),{}),null==e?void 0:e.properties)},e}(),T_=function(){function e(e){this._instance=e,this._eventToSurveys=new Map,this._cancelEventToSurveys=new Map,this._actionToSurveys=new Map}var t=e.prototype;return t._doesEventMatchFilter=function(e,t){return!!e&&fc(e.propertyFilters,null==t?void 0:t.properties)},t._buildEventToSurveyMap=function(e,t){var n=new Map;return e.forEach((function(e){var r;null==(r=e.conditions)||null==(r=r[t])||null==(r=r.values)||r.forEach((function(t){if(null!=t&&t.name){var r=n.get(t.name)||[];r.push(e.id),n.set(t.name,r)}}))})),n},t._getMatchingSurveys=function(e,t,n){var r,i=this,o=(n===ns.Activation?this._eventToSurveys:this._cancelEventToSurveys).get(e),s=[];return null==(r=this._instance)||r.getSurveys((function(e){s=e.filter((function(e){return null==o?void 0:o.includes(e.id)}))})),s.filter((function(r){var o,s=null==(o=r.conditions)||null==(o=o[n])||null==(o=o.values)?void 0:o.find((function(t){return t.name===e}));return i._doesEventMatchFilter(s,t)}))},t.register=function(e){var t;js(null==(t=this._instance)?void 0:t._addCaptureHook)||(this._setupEventBasedSurveys(e),this._setupActionBasedSurveys(e))},t._setupActionBasedSurveys=function(e){var t=this,n=e.filter((function(e){var t,n;return(null==(t=e.conditions)?void 0:t.actions)&&(null==(n=e.conditions)||null==(n=n.actions)||null==(n=n.values)?void 0:n.length)>0}));if(0!==n.length){if(null==this._actionMatcher){this._actionMatcher=new C_(this._instance),this._actionMatcher.init();this._actionMatcher._addActionHook((function(e){t.onAction(e)}))}n.forEach((function(e){var n,r,i,o,s;e.conditions&&null!=(n=e.conditions)&&n.actions&&null!=(r=e.conditions)&&null!=(r=r.actions)&&r.values&&(null==(i=e.conditions)||null==(i=i.actions)||null==(i=i.values)?void 0:i.length)>0&&(null==(o=t._actionMatcher)||o.register(e.conditions.actions.values),null==(s=e.conditions)||null==(s=s.actions)||null==(s=s.values)||s.forEach((function(n){if(n&&n.name){var r=t._actionToSurveys.get(n.name);r&&r.push(e.id),t._actionToSurveys.set(n.name,r||[e.id])}})))}))}},t._setupEventBasedSurveys=function(e){var t,n=this,r=e.filter((function(e){var t,n;return(null==(t=e.conditions)?void 0:t.events)&&(null==(n=e.conditions)||null==(n=n.events)||null==(n=n.values)?void 0:n.length)>0})),i=e.filter((function(e){var t,n;return(null==(t=e.conditions)?void 0:t.cancelEvents)&&(null==(n=e.conditions)||null==(n=n.cancelEvents)||null==(n=n.values)?void 0:n.length)>0}));if(0!==r.length||0!==i.length){null==(t=this._instance)||t._addCaptureHook((function(e,t){n.onEvent(e,t)})),this._eventToSurveys=this._buildEventToSurveyMap(e,ns.Activation),this._cancelEventToSurveys=this._buildEventToSurveyMap(e,ns.Cancellation)}},t.onEvent=function(e,t){var n,r=this,i=(null==(n=this._instance)||null==(n=n.persistence)?void 0:n.props[Xd])||[];if(cs.SHOWN===e&&t&&i.length>0){var o;Xa.info("survey event matched, removing survey from activated surveys",{event:e,eventPayload:t,existingActivatedSurveys:i});var s=null==t||null==(o=t.properties)?void 0:o.$survey_id;if(s){var a=i.indexOf(s);a>=0&&(i.splice(a,1),this._updateActivatedSurveys(i))}}else{if(this._cancelEventToSurveys.has(e)){var u=this._getMatchingSurveys(e,t,ns.Cancellation);u.length>0&&(Xa.info("cancel event matched, cancelling surveys",{event:e,surveysToCancel:u.map((function(e){return e.id}))}),u.forEach((function(e){var t,n=i.indexOf(e.id);n>=0&&i.splice(n,1),null==(t=r._instance)||t.cancelPendingSurvey(e.id)})),this._updateActivatedSurveys(i))}if(this._eventToSurveys.has(e)){Xa.info("survey event name matched",{event:e,eventPayload:t,surveys:this._eventToSurveys.get(e)});var l=this._getMatchingSurveys(e,t,ns.Activation);this._updateActivatedSurveys(i.concat(l.map((function(e){return e.id}))||[]))}}},t.onAction=function(e){var t,n=(null==(t=this._instance)||null==(t=t.persistence)?void 0:t.props[Xd])||[];this._actionToSurveys.has(e)&&this._updateActivatedSurveys(n.concat(this._actionToSurveys.get(e)||[]))},t._updateActivatedSurveys=function(e){var t,n;Xa.info("updating activated surveys",{activatedSurveys:e}),null==(t=this._instance)||null==(t=t.persistence)||t.register(((n={})[Xd]=[].concat(new Set(e)),n))},t.getSurveys=function(){var e,t=null==(e=this._instance)||null==(e=e.persistence)?void 0:e.props[Xd];return t||[]},t.getEventToSurveys=function(){return this._eventToSurveys},t._getActionMatcher=function(){return this._actionMatcher},e}(),I_=function(){function e(e){this._isSurveysEnabled=void 0,this._surveyManager=null,this._isFetchingSurveys=!1,this._isInitializingSurveys=!1,this._surveyCallbacks=[],this._instance=e,this._surveyEventReceiver=null}var t=e.prototype;return t.onRemoteConfig=function(e){if(!this._instance.config.disable_surveys){var t=e.surveys;if(Bs(t))return Xa.warn("Flags not loaded yet. Not loading surveys.");var n=qs(t);this._isSurveysEnabled=n?t.length>0:t,Xa.info("flags response received, isSurveysEnabled: "+this._isSurveysEnabled),this.loadIfEnabled()}},t.reset=function(){localStorage.removeItem("lastSeenSurveyDate");for(var e=[],t=0;t<localStorage.length;t++){var n=localStorage.key(t);(null!=n&&n.startsWith(tu)||null!=n&&n.startsWith(nu))&&e.push(n)}e.forEach((function(e){return localStorage.removeItem(e)}))},t.loadIfEnabled=function(){var e=this;if(!this._surveyManager)if(this._isInitializingSurveys)Xa.info("Already initializing surveys, skipping...");else if(this._instance.config.disable_surveys)Xa.info("Disabled. Not loading surveys.");else if(this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())Xa.info("Not loading surveys in cookieless mode without consent.");else{var t=null==ks?void 0:ks.__PosthogExtensions__;if(t){if(!js(this._isSurveysEnabled)||this._instance.config.advanced_enable_surveys){var n=this._isSurveysEnabled||this._instance.config.advanced_enable_surveys;this._isInitializingSurveys=!0;try{var r=t.generateSurveys;if(r)return void this._completeSurveyInitialization(r,n);var i=t.loadExternalDependency;if(!i)return void this._handleSurveyLoadError("PostHog loadExternalDependency extension not found.");i(this._instance,"surveys",(function(r){r||!t.generateSurveys?e._handleSurveyLoadError("Could not load surveys script",r):e._completeSurveyInitialization(t.generateSurveys,n)}))}catch(e){throw this._handleSurveyLoadError("Error initializing surveys",e),e}finally{this._isInitializingSurveys=!1}}}else Xa.error("PostHog Extensions not found.")}},t._completeSurveyInitialization=function(e,t){this._surveyManager=e(this._instance,t),this._surveyEventReceiver=new T_(this._instance),Xa.info("Surveys loaded successfully"),this._notifySurveyCallbacks({isLoaded:!0})},t._handleSurveyLoadError=function(e,t){Xa.error(e,t),this._notifySurveyCallbacks({isLoaded:!1,error:e})},t.onSurveysLoaded=function(e){var t=this;return this._surveyCallbacks.push(e),this._surveyManager&&this._notifySurveyCallbacks({isLoaded:!0}),function(){t._surveyCallbacks=t._surveyCallbacks.filter((function(t){return t!==e}))}},t.getSurveys=function(e,t){var n=this;if(void 0===t&&(t=!1),this._instance.config.disable_surveys)return Xa.info("Disabled. Not loading surveys."),e([]);var r=this._instance.get_property(Qd);if(r&&!t)return e(r,{isLoaded:!0});if(this._isFetchingSurveys)return e([],{isLoaded:!1,error:"Surveys are already being loaded"});try{this._isFetchingSurveys=!0,this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this._instance.config.token),method:"GET",timeout:this._instance.config.surveys_request_timeout_ms,callback:function(t){var r,i;n._isFetchingSurveys=!1;var o=t.statusCode;if(200!==o||!t.json){var s="Surveys API could not be loaded, status: "+o;return Xa.error(s),e([],{isLoaded:!1,error:s})}var a,u=t.json.surveys||[],l=u.filter((function(e){return Ja(e)&&(Ka(e)||eu(e))}));l.length>0&&(null==(a=n._surveyEventReceiver)||a.register(l));return null==(r=n._instance.persistence)||r.register(((i={})[Qd]=u,i)),e(u,{isLoaded:!0})}})}catch(e){throw this._isFetchingSurveys=!1,e}},t._notifySurveyCallbacks=function(e){for(var t,n=ji(this._surveyCallbacks);!(t=n()).done;){var r=t.value;try{if(!e.isLoaded)return r([],e);this.getSurveys(r)}catch(e){Xa.error("Error in survey callback",e)}}},t.getActiveMatchingSurveys=function(e,t){if(void 0===t&&(t=!1),!Bs(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,t);Xa.warn("init was not called")},t._getSurveyById=function(e){var t=null;return this.getSurveys((function(n){var r;t=null!==(r=n.find((function(t){return t.id===e})))&&void 0!==r?r:null})),t},t._checkSurveyEligibility=function(e){if(Bs(this._surveyManager))return{eligible:!1,reason:"SDK is not enabled or survey functionality is not yet loaded"};var t="string"==typeof e?this._getSurveyById(e):e;return t?this._surveyManager.checkSurveyEligibility(t):{eligible:!1,reason:"Survey not found"}},t.canRenderSurvey=function(e){if(Bs(this._surveyManager))return Xa.warn("init was not called"),{visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"};var t=this._checkSurveyEligibility(e);return{visible:t.eligible,disabledReason:t.reason}},t.canRenderSurveyAsync=function(e,t){var n=this;return Bs(this._surveyManager)?(Xa.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"})):new Promise((function(r){n.getSurveys((function(t){var i,o=null!==(i=t.find((function(t){return t.id===e})))&&void 0!==i?i:null;if(o){var s=n._checkSurveyEligibility(o);r({visible:s.eligible,disabledReason:s.reason})}else r({visible:!1,disabledReason:"Survey not found"})}),t)}))},t.renderSurvey=function(e,t){var n,r=this;if(Bs(this._surveyManager))Xa.warn("init was not called");else{var i="string"==typeof e?this._getSurveyById(e):e;if(null!=i&&i.id)if(su.includes(i.type)){var o=null==ys?void 0:ys.querySelector(t);if(o)return null!=(n=i.appearance)&&n.surveyPopupDelaySeconds?(Xa.info("Rendering survey "+i.id+" with delay of "+i.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout((function(){var e,t;Xa.info("Rendering survey "+i.id+" with delay of "+(null==(e=i.appearance)?void 0:e.surveyPopupDelaySeconds)+" seconds"),null==(t=r._surveyManager)||t.renderSurvey(i,o),Xa.info("Survey "+i.id+" rendered")}),1e3*i.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(i,o);Xa.warn("Survey element not found")}else Xa.warn("Surveys of type "+i.type+" cannot be rendered in the app");else Xa.warn("Survey not found")}},t.displaySurvey=function(e,t){var n;if(Bs(this._surveyManager))Xa.warn("init was not called");else{var r=this._getSurveyById(e);if(r){var i=r;if(null!=(n=r.appearance)&&n.surveyPopupDelaySeconds&&t.ignoreDelay&&(i=Ui({},r,{appearance:Ui({},r.appearance,{surveyPopupDelaySeconds:0})})),!1===t.ignoreConditions){var o=this.canRenderSurvey(r);if(!o.visible)return void Xa.warn("Survey is not eligible to be displayed: ",o.disabledReason)}t.displayType!==fs.Inline?this._surveyManager.handlePopoverSurvey(i):this.renderSurvey(i,t.selector)}else Xa.warn("Survey not found")}},t.cancelPendingSurvey=function(e){Bs(this._surveyManager)?Xa.warn("init was not called"):this._surveyManager.cancelSurvey(e)},e}(),F_=Da("[Conversations]");var L_=function(){function e(e){this._isConversationsEnabled=void 0,this._conversationsManager=null,this._isInitializing=!1,this._remoteConfig=null,this._instance=e}var t=e.prototype;return t.onRemoteConfig=function(e){if(!this._instance.config.disable_conversations){var t=e.conversations;Bs(t)||(Gs(t)?this._isConversationsEnabled=t:(this._isConversationsEnabled=t.enabled,this._remoteConfig=t),this.loadIfEnabled())}},t.reset=function(){var e;null==(e=this._conversationsManager)||e.reset(),this._conversationsManager=null,this._isConversationsEnabled=void 0,this._remoteConfig=null},t.loadIfEnabled=function(){var e=this;if(!this._conversationsManager&&!this._isInitializing&&!(this._instance.config.disable_conversations||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var t=null==ks?void 0:ks.__PosthogExtensions__;if(t&&!js(this._isConversationsEnabled)&&this._isConversationsEnabled)if(this._remoteConfig&&this._remoteConfig.token){if(function(e){var t;if(!e||0===e.length)return!0;var n=null==ps||null==(t=ps.location)?void 0:t.hostname;return!n||e.some((function(e){var t=function(e){var t=e.replace(/^https?:\/\//,"");return(t=t.split("/")[0].split("?")[0].split(":")[0])||null}(e);if(!t)return!1;if(t.startsWith("*.")){var r=t.slice(2);return n.endsWith("."+r)||n===r}return n===t}))}(this._remoteConfig.domains)){this._isInitializing=!0;try{var n=t.initConversations;if(n)return this._completeInitialization(n),void(this._isInitializing=!1);var r=t.loadExternalDependency;if(!r)return void this._handleLoadError("PostHog loadExternalDependency extension not found.");r(this._instance,"conversations",(function(n){n||!t.initConversations?e._handleLoadError("Could not load conversations script",n):e._completeInitialization(t.initConversations),e._isInitializing=!1}))}catch(e){this._handleLoadError("Error initializing conversations",e),this._isInitializing=!1}}}else F_.error("Conversations enabled but missing token in remote config.")}},t._completeInitialization=function(e){if(this._remoteConfig)try{this._conversationsManager=e(this._remoteConfig,this._instance),F_.info("Conversations loaded successfully")}catch(e){this._handleLoadError("Error completing conversations initialization",e)}else F_.error("Cannot complete initialization: remote config is null")},t._handleLoadError=function(e,t){F_.error(e,t),this._conversationsManager=null,this._isInitializing=!1},t.enable=function(){this._conversationsManager?this._conversationsManager.enable():F_.warn("Conversations not loaded yet.")},t.disable=function(){this._conversationsManager&&this._conversationsManager.disable()},t.isLoaded=function(){return!zs(this._conversationsManager)},t.isEnabled=function(){return!0===this._isConversationsEnabled},e}(),R_=Da("[RateLimiter]"),O_=function(){function e(e){var t,n,r=this;this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=function(e){var t=e.text;if(t&&t.length)try{(JSON.parse(t).quota_limited||[]).forEach((function(e){R_.info((e||"events")+" is quota limited."),r.serverLimits[e]=(new Date).getTime()+6e4}))}catch(e){return void R_.warn('could not rate limit - continuing. Error: "'+(null==e?void 0:e.message)+'"',{text:t})}},this.instance=e,this.captureEventsPerSecond=(null==(t=e.config.rate_limiting)?void 0:t.events_per_second)||10,this.captureEventsBurstLimit=Math.max((null==(n=e.config.rate_limiting)?void 0:n.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond),this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}var t=e.prototype;return t.clientRateLimitContext=function(e){var t,n,r;void 0===e&&(e=!1);var i=(new Date).getTime(),o=null!==(t=null==(n=this.instance.persistence)?void 0:n.get_property(tf))&&void 0!==t?t:{tokens:this.captureEventsBurstLimit,last:i};o.tokens+=(i-o.last)/1e3*this.captureEventsPerSecond,o.last=i,o.tokens>this.captureEventsBurstLimit&&(o.tokens=this.captureEventsBurstLimit);var s=o.tokens<1;return s||e||(o.tokens=Math.max(0,o.tokens-1)),!s||this.lastEventRateLimited||e||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+this.captureEventsPerSecond+" events per second and "+this.captureEventsBurstLimit+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=s,null==(r=this.instance.persistence)||r.set_property(tf,o),{isRateLimited:s,remainingTokens:o.tokens}},t.isServerRateLimited=function(e){var t=this.serverLimits[e||"events"]||!1;return!1!==t&&(new Date).getTime()<t},e}(),M_=Da("[RemoteConfig]"),A_=function(){function e(e){this._instance=e}var t=e.prototype;return t._loadRemoteConfigJs=function(e){var t,n,r=this;null!=(t=ks.__PosthogExtensions__)&&t.loadExternalDependency?null==(n=ks.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this._instance,"remote-config",(function(){return e(r.remoteConfig)})):(M_.error("PostHog Extensions not found. Cannot load remote config."),e())},t._loadRemoteConfigJSON=function(e){this._instance._send_request({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback:function(t){e(t.json)}})},t.load=function(){var e=this;try{if(this.remoteConfig)return M_.info("Using preloaded remote config",this.remoteConfig),void this._onRemoteConfig(this.remoteConfig);if(this._instance._shouldDisableFlags())return void M_.warn("Remote config is disabled. Falling back to local config.");this._loadRemoteConfigJs((function(t){if(!t)return M_.info("No config found after loading remote JS config. Falling back to JSON."),void e._loadRemoteConfigJSON((function(t){e._onRemoteConfig(t)}));e._onRemoteConfig(t)}))}catch(e){M_.error("Error loading remote config",e)}},t._onRemoteConfig=function(e){e?this._instance.config.__preview_remote_config?(this._instance._onRemoteConfig(e),!1!==e.hasFeatureFlags&&this._instance.featureFlags.ensureFlagsLoaded()):M_.info("__preview_remote_config is disabled. Logging config instead",e):M_.error("Failed to fetch remote config from PostHog.")},Hi(e,[{key:"remoteConfig",get:function(){var e;return null==(e=ks._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.config}}])}(),D_=3e3,q_=function(){function e(e,t){this._isPaused=!0,this._queue=[],this._flushTimeoutMs=na((null==t?void 0:t.flush_interval_ms)||D_,250,5e3,Aa.createLogger("flush interval"),D_),this._sendRequest=e}var t=e.prototype;return t.enqueue=function(e){this._queue.push(e),this._flushTimeout||this._setFlushTimeout()},t.unload=function(){var e=this;this._clearFlushTimeout();var t=this._queue.length>0?this._formatQueue():{},n=Object.values(t),r=[].concat(n.filter((function(e){return 0===e.url.indexOf("/e")})),n.filter((function(e){return 0!==e.url.indexOf("/e")})));r.map((function(t){e._sendRequest(Ui({},t,{transport:"sendBeacon"}))}))},t.enable=function(){this._isPaused=!1,this._setFlushTimeout()},t._setFlushTimeout=function(){var e=this;this._isPaused||(this._flushTimeout=setTimeout((function(){if(e._clearFlushTimeout(),e._queue.length>0){var t=e._formatQueue(),n=function(){var n=t[r],i=(new Date).getTime();n.data&&qs(n.data)&&Na(n.data,(function(e){e.offset=Math.abs(e.timestamp-i),delete e.timestamp})),e._sendRequest(n)};for(var r in t)n()}}),this._flushTimeoutMs))},t._clearFlushTimeout=function(){clearTimeout(this._flushTimeout),this._flushTimeout=void 0},t._formatQueue=function(){var e={};return Na(this._queue,(function(t){var n,r=t,i=(r?r.batchKey:null)||r.url;js(e[i])&&(e[i]=Ui({},r,{data:[]})),null==(n=e[i].data)||n.push(r.data)})),this._queue=[],e},e}(),$_=["retriesPerformedSoFar"];var N_=function(){function e(e){var t=this;this._isPolling=!1,this._pollIntervalMs=3e3,this._queue=[],this._instance=e,this._queue=[],this._areWeOnline=!0,!js(ps)&&"onLine"in ps.navigator&&(this._areWeOnline=ps.navigator.onLine,this._onlineListener=function(){t._areWeOnline=!0,t._flush()},this._offlineListener=function(){t._areWeOnline=!1},Qa(ps,"online",this._onlineListener),Qa(ps,"offline",this._offlineListener))}var t=e.prototype;return t.retriableRequest=function(e){var t=this,n=e.retriesPerformedSoFar,r=Vi(e,$_);Ws(n)&&n>0&&(r.url=ic(r.url,{retry_count:n})),this._instance._send_request(Ui({},r,{callback:function(e){200!==e.statusCode&&(e.statusCode<400||e.statusCode>=500)&&(null!=n?n:0)<10?t._enqueue(Ui({retriesPerformedSoFar:n},r)):null==r.callback||r.callback(e)}}))},t._enqueue=function(e){var t=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=t+1;var n=function(e){var t=3e3*Math.pow(2,e),n=t/2,r=Math.min(18e5,t),i=(Math.random()-.5)*(r-n);return Math.ceil(r+i)}(t),r=Date.now()+n;this._queue.push({retryAt:r,requestOptions:e});var i="Enqueued failed request for retry in "+n;navigator.onLine||(i+=" (Browser is offline)"),Aa.warn(i),this._isPolling||(this._isPolling=!0,this._poll())},t._poll=function(){var e=this;if(this._poller&&clearTimeout(this._poller),0===this._queue.length)return this._isPolling=!1,void(this._poller=void 0);this._poller=setTimeout((function(){e._areWeOnline&&e._queue.length>0&&e._flush(),e._poll()}),this._pollIntervalMs)},t._flush=function(){var e=Date.now(),t=[],n=this._queue.filter((function(n){return n.retryAt<e||(t.push(n),!1)}));if(this._queue=t,n.length>0)for(var r,i=ji(n);!(r=i()).done;){var o=r.value.requestOptions;this.retriableRequest(o)}},t.unload=function(){this._poller&&(clearTimeout(this._poller),this._poller=void 0),this._isPolling=!1,js(ps)||(this._onlineListener&&(ps.removeEventListener("online",this._onlineListener),this._onlineListener=void 0),this._offlineListener&&(ps.removeEventListener("offline",this._offlineListener),this._offlineListener=void 0));for(var e,t=ji(this._queue);!(e=t()).done;){var n=e.value.requestOptions;try{this._instance._send_request(Ui({},n,{transport:"sendBeacon"}))}catch(e){Aa.error(e)}}this._queue=[]},Hi(e,[{key:"length",get:function(){return this._queue.length}}])}(),H_=function(){function e(e){var t=this;this._updateScrollData=function(){var e,n,r,i;t._context||(t._context={});var o=t.scrollElement(),s=t.scrollY(),a=o?Math.max(0,o.scrollHeight-o.clientHeight):0,u=s+((null==o?void 0:o.clientHeight)||0),l=(null==o?void 0:o.scrollHeight)||0;t._context.lastScrollY=Math.ceil(s),t._context.maxScrollY=Math.max(s,null!==(e=t._context.maxScrollY)&&void 0!==e?e:0),t._context.maxScrollHeight=Math.max(a,null!==(n=t._context.maxScrollHeight)&&void 0!==n?n:0),t._context.lastContentY=u,t._context.maxContentY=Math.max(u,null!==(r=t._context.maxContentY)&&void 0!==r?r:0),t._context.maxContentHeight=Math.max(l,null!==(i=t._context.maxContentHeight)&&void 0!==i?i:0)},this._instance=e}var t=e.prototype;return t.getContext=function(){return this._context},t.resetContext=function(){var e=this._context;return setTimeout(this._updateScrollData,0),e},t.startMeasuringScrollPosition=function(){Qa(ps,"scroll",this._updateScrollData,{capture:!0}),Qa(ps,"scrollend",this._updateScrollData,{capture:!0}),Qa(ps,"resize",this._updateScrollData)},t.scrollElement=function(){if(!this._instance.config.scroll_root_selector)return null==ps?void 0:ps.document.documentElement;for(var e,t=ji(qs(this._instance.config.scroll_root_selector)?this._instance.config.scroll_root_selector:[this._instance.config.scroll_root_selector]);!(e=t()).done;){var n=e.value,r=null==ps?void 0:ps.document.querySelector(n);if(r)return r}},t.scrollY=function(){if(this._instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollTop||0}return ps&&(ps.scrollY||ps.pageYOffset||ps.document.documentElement.scrollTop)||0},t.scrollX=function(){if(this._instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollLeft||0}return ps&&(ps.scrollX||ps.pageXOffset||ps.document.documentElement.scrollLeft)||0},e}(),j_=function(e){return Qp(null==e?void 0:e.config.mask_personal_data_properties,null==e?void 0:e.config.custom_personal_data_properties)},U_=function(){function e(e,t,n,r){var i=this;this._onSessionIdCallback=function(e){var t,n=i._getStored();if(!n||n.sessionId!==e){var r={sessionId:e,props:i._sessionSourceParamGenerator(i._instance)};i._persistence.register(((t={})[ef]=r,t))}},this._instance=e,this._sessionIdManager=t,this._persistence=n,this._sessionSourceParamGenerator=r||j_,this._sessionIdManager.onSessionId(this._onSessionIdCallback)}var t=e.prototype;return t._getStored=function(){return this._persistence.props[ef]},t.getSetOnceProps=function(){var e,t=null==(e=this._getStored())?void 0:e.props;return t?"r"in t?Xp(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}:{}},t.getSessionProps=function(){var e={};return Na(Ba(this.getSetOnceProps()),(function(t,n){"$current_url"===n&&(n="url"),e["$session_entry_"+Rs(n)]=t})),e},e}(),V_=Da("[SessionId]"),z_=function(){function e(e,t,n){var r,i=this;if(this._sessionIdChangedHandlers=[],this._beforeUnloadListener=void 0,this._eventEmitter=new k_,this._sessionHasBeenIdleTooLong=function(e,t){return Math.abs(e-t)>i.sessionTimeoutMs},!e.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if("always"===e.config.cookieless_mode)throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this._config=e.config,this._persistence=e.persistence,this._windowId=void 0,this._sessionId=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this._sessionIdGenerator=t||hu,this._windowIdGenerator=n||hu;var o=this._config.persistence_name||this._config.token,s=this._config.session_idle_timeout_seconds||1800;if(this._sessionTimeoutMs=1e3*na(s,60,36e3,V_.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this._resetIdleTimer(),this._window_id_storage_key="ph_"+o+"_window_id",this._primary_window_exists_storage_key="ph_"+o+"_primary_window_exists",this._canUseSessionStorage()){var a=mp._parse(this._window_id_storage_key),u=mp._parse(this._primary_window_exists_storage_key);a&&!u?this._windowId=a:mp._remove(this._window_id_storage_key),mp._set(this._primary_window_exists_storage_key,!0)}if(null!=(r=this._config.bootstrap)&&r.sessionID)try{var l=function(e){var t=e.replace(/-/g,"");if(32!==t.length)throw new Error("Not a valid UUID");if("7"!==t[12])throw new Error("Not a UUIDv7");return parseInt(t.substring(0,12),16)}(this._config.bootstrap.sessionID);this._setSessionId(this._config.bootstrap.sessionID,(new Date).getTime(),l)}catch(e){V_.error("Invalid sessionID in bootstrap",e)}this._listenToReloadWindow()}var t=e.prototype;return t.on=function(e,t){return this._eventEmitter.on(e,t)},t.onSessionId=function(e){var t=this;return js(this._sessionIdChangedHandlers)&&(this._sessionIdChangedHandlers=[]),this._sessionIdChangedHandlers.push(e),this._sessionId&&e(this._sessionId,this._windowId),function(){t._sessionIdChangedHandlers=t._sessionIdChangedHandlers.filter((function(t){return t!==e}))}},t._canUseSessionStorage=function(){return"memory"!==this._config.persistence&&!this._persistence._disabled&&mp._is_supported()},t._setWindowId=function(e){e!==this._windowId&&(this._windowId=e,this._canUseSessionStorage()&&mp._set(this._window_id_storage_key,e))},t._getWindowId=function(){return this._windowId?this._windowId:this._canUseSessionStorage()?mp._parse(this._window_id_storage_key):null},t._setSessionId=function(e,t,n){var r;e===this._sessionId&&t===this._sessionActivityTimestamp&&n===this._sessionStartTimestamp||(this._sessionStartTimestamp=n,this._sessionActivityTimestamp=t,this._sessionId=e,this._persistence.register(((r={})[Vd]=[t,e,n],r)))},t._getSessionId=function(){var e=this._persistence.props[Vd];return qs(e)&&2===e.length&&e.push(e[0]),e||[0,null,0]},t.resetSessionId=function(){this._setSessionId(null,null,null)},t.destroy=function(){clearTimeout(this._enforceIdleTimeout),this._enforceIdleTimeout=void 0,this._beforeUnloadListener&&ps&&(ps.removeEventListener("beforeunload",this._beforeUnloadListener,{capture:!1}),this._beforeUnloadListener=void 0),this._sessionIdChangedHandlers=[]},t._listenToReloadWindow=function(){var e=this;this._beforeUnloadListener=function(){e._canUseSessionStorage()&&mp._remove(e._primary_window_exists_storage_key)},Qa(ps,"beforeunload",this._beforeUnloadListener,{capture:!1})},t.checkAndGetSessionAndWindowId=function(e,t){if(void 0===e&&(e=!1),void 0===t&&(t=null),"always"===this._config.cookieless_mode)throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var n=t||(new Date).getTime(),r=this._getSessionId(),i=r[0],o=r[1],s=r[2],a=this._getWindowId(),u=Ws(s)&&s>0&&Math.abs(n-s)>864e5,l=!1,c=!o,d=!c&&!e&&this._sessionHasBeenIdleTooLong(n,i);c||d||u?(o=this._sessionIdGenerator(),a=this._windowIdGenerator(),V_.info("new session ID generated",{sessionId:o,windowId:a,changeReason:{noSessionId:c,activityTimeout:d,sessionPastMaximumLength:u}}),s=n,l=!0):a||(a=this._windowIdGenerator(),l=!0);var f=0===i||!e||u?n:i,p=0===s?(new Date).getTime():s;return this._setWindowId(a),this._setSessionId(o,f,p),e||this._resetIdleTimer(),l&&this._sessionIdChangedHandlers.forEach((function(e){return e(o,a,l?{noSessionId:c,activityTimeout:d,sessionPastMaximumLength:u}:void 0)})),{sessionId:o,windowId:a,sessionStartTimestamp:p,changeReason:l?{noSessionId:c,activityTimeout:d,sessionPastMaximumLength:u}:void 0,lastActivityTimestamp:i}},t._resetIdleTimer=function(){var e=this;clearTimeout(this._enforceIdleTimeout),this._enforceIdleTimeout=setTimeout((function(){var t=e._getSessionId()[0];if(e._sessionHasBeenIdleTooLong((new Date).getTime(),t)){var n=e._sessionId;e.resetSessionId(),e._eventEmitter.emit("forcedIdleReset",{idleSessionId:n})}}),1.1*this.sessionTimeoutMs)},Hi(e,[{key:"sessionTimeoutMs",get:function(){return this._sessionTimeoutMs}}])}(),B_=["$set_once","$set"],W_=Da("[SiteApps]"),G_=function(){function e(e){this._instance=e,this._bufferedInvocations=[],this.apps={}}var t=e.prototype;return t._eventCollector=function(e,t){if(t){var n=this.globalsForEvent(t);this._bufferedInvocations.push(n),this._bufferedInvocations.length>1e3&&(this._bufferedInvocations=this._bufferedInvocations.slice(10))}},t.init=function(){var e=this;if(this.isEnabled){var t=this._instance._addCaptureHook(this._eventCollector.bind(this));this._stopBuffering=function(){t(),e._bufferedInvocations=[],e._stopBuffering=void 0}}},t.globalsForEvent=function(e){var t,n,r,i,o,s,a;if(!e)throw new Error("Event payload is required");for(var u={},l=this._instance.get_property("$groups")||[],c=this._instance.get_property("$stored_group_properties")||{},d=0,f=Object.entries(c);d<f.length;d++){var p=f[d],_=p[0],h=p[1];u[_]={id:l[_],type:_,properties:h}}var v=e.$set_once,g=e.$set;return{event:Ui({},Vi(e,B_),{properties:Ui({},e.properties,g?{$set:Ui({},null!==(t=null==(n=e.properties)?void 0:n.$set)&&void 0!==t?t:{},g)}:{},v?{$set_once:Ui({},null!==(r=null==(i=e.properties)?void 0:i.$set_once)&&void 0!==r?r:{},v)}:{}),elements_chain:null!==(o=null==(s=e.properties)?void 0:s.$elements_chain)&&void 0!==o?o:"",distinct_id:null==(a=e.properties)?void 0:a.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:u}},t.setupSiteApp=function(e){var t=this,n=this.apps[e.id],r=function(){!n.errored&&t._bufferedInvocations.length&&(W_.info("Processing "+t._bufferedInvocations.length+" events for site app with id "+e.id),t._bufferedInvocations.forEach((function(e){return null==n.processEvent?void 0:n.processEvent(e)})),n.processedBuffer=!0),Object.values(t.apps).every((function(e){return e.processedBuffer||e.errored}))&&(null==t._stopBuffering||t._stopBuffering())},i=!1,o=function(t){n.errored=!t,n.loaded=!0,W_.info("Site app with id "+e.id+" "+(t?"loaded":"errored")),i&&r()};try{var s=e.init({posthog:this._instance,callback:function(e){o(e)}}).processEvent;s&&(n.processEvent=s),i=!0}catch(t){W_.error("Error while initializing PostHog app with config id "+e.id,t),o(!1)}if(i&&n.loaded)try{r()}catch(t){W_.error("Error while processing buffered events PostHog app with config id "+e.id,t),n.errored=!0}},t._setupSiteApps=function(){for(var e,t=this.siteAppLoaders||[],n=ji(t);!(e=n()).done;){var r=e.value;this.apps[r.id]={id:r.id,loaded:!1,errored:!1,processedBuffer:!1}}for(var i,o=ji(t);!(i=o()).done;){var s=i.value;this.setupSiteApp(s)}},t._onCapturedEvent=function(e){if(0!==Object.keys(this.apps).length)for(var t=this.globalsForEvent(e),n=0,r=Object.values(this.apps);n<r.length;n++){var i=r[n];try{null==i.processEvent||i.processEvent(t)}catch(t){W_.error("Error while processing event "+e.event+" for site app "+i.id,t)}}},t.onRemoteConfig=function(e){var t,n,r,i=this;if(null!=(t=this.siteAppLoaders)&&t.length)return this.isEnabled?(this._setupSiteApps(),void this._instance.on("eventCaptured",(function(e){return i._onCapturedEvent(e)}))):void W_.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if(null==(n=this._stopBuffering)||n.call(this),null!=(r=e.siteApps)&&r.length)if(this.isEnabled)for(var o,s=function(){var e,t=o.value,n=t.id,r=t.url;ks["__$$ph_site_app_"+n]=i._instance,null==(e=ks.__PosthogExtensions__)||null==e.loadSiteApp||e.loadSiteApp(i._instance,r,(function(e){if(e)return W_.error("Error while initializing PostHog app with config id "+n,e)}))},a=ji(e.siteApps);!(o=a()).done;)s();else W_.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')},Hi(e,[{key:"isEnabled",get:function(){return!!this._instance.config.opt_in_site_apps}},{key:"siteAppLoaders",get:function(){var e;return null==(e=ks._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.siteApps}}])}(),Z_=function(e,t){if(!e)return!1;var n=e.userAgent;if(n&&Ts(n,t))return!0;try{var r=null==e?void 0:e.userAgentData;if(null!=r&&r.brands&&r.brands.some((function(e){return Ts(null==e?void 0:e.brand,t)})))return!0}catch(e){}return!!e.webdriver},Y_=function(e){return e.US="us",e.EU="eu",e.CUSTOM="custom",e}({}),Q_="i.posthog.com",X_=function(){function e(e){this._regionCache={},this.instance=e}return e.prototype.endpointFor=function(e,t){if(void 0===t&&(t=""),t&&(t="/"===t[0]?t:"/"+t),"ui"===e)return this.uiHost+t;if("flags"===e)return this.flagsApiHost+t;if(this.region===Y_.CUSTOM)return this.apiHost+t;var n=Q_+t;switch(e){case"assets":return"https://"+this.region+"-assets."+n;case"api":return"https://"+this.region+"."+n}},Hi(e,[{key:"apiHost",get:function(){var e=this.instance.config.api_host.trim().replace(/\/$/,"");return"https://app.posthog.com"===e?"https://us.i.posthog.com":e}},{key:"flagsApiHost",get:function(){var e=this.instance.config.flags_api_host;return e?e.trim().replace(/\/$/,""):this.apiHost}},{key:"uiHost",get:function(){var e,t=null==(e=this.instance.config.ui_host)?void 0:e.replace(/\/$/,"");return t||(t=this.apiHost.replace("."+Q_,".posthog.com")),"https://app.posthog.com"===t?"https://us.posthog.com":t}},{key:"region",get:function(){return this._regionCache[this.apiHost]||(/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this._regionCache[this.apiHost]=Y_.US:/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this._regionCache[this.apiHost]=Y_.EU:this._regionCache[this.apiHost]=Y_.CUSTOM),this._regionCache[this.apiHost]}}])}(),J_={icontains:function(e,t){return!!ps&&t.href.toLowerCase().indexOf(e.toLowerCase())>-1},not_icontains:function(e,t){return!!ps&&-1===t.href.toLowerCase().indexOf(e.toLowerCase())},regex:function(e,t){return!!ps&&uc(t.href,e)},not_regex:function(e,t){return!!ps&&!uc(t.href,e)},exact:function(e,t){return t.href===e},is_not:function(e,t){return t.href!==e}},K_=function(){function e(t){var n=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(t){void 0===t&&(t=!1),n.getWebExperiments((function(t){e._logInfo("retrieved web experiments from the server"),n._flagToExperiments=new Map,t.forEach((function(t){if(t.feature_flag_key){var r;if(n._flagToExperiments)e._logInfo("setting flag key ",t.feature_flag_key," to web experiment ",t),null==(r=n._flagToExperiments)||r.set(t.feature_flag_key,t);var i=n._instance.getFeatureFlag(t.feature_flag_key);Us(i)&&t.variants[i]&&n._applyTransforms(t.name,i,t.variants[i].transforms)}else if(t.variants)for(var o in t.variants){var s=t.variants[o];e._matchesTestVariant(s)&&n._applyTransforms(t.name,o,s.transforms)}}))}),t)},this._instance=t,this._instance.onFeatureFlags((function(e){n.onFeatureFlags(e)}))}var t=e.prototype;return t.onFeatureFlags=function(t){var n=this;if(this._is_bot())e._logInfo("Refusing to render web experiment since the viewer is a likely bot");else if(!this._instance.config.disable_web_experiments){if(Bs(this._flagToExperiments))return this._flagToExperiments=new Map,this.loadIfEnabled(),void this.previewWebExperiment();e._logInfo("applying feature flags",t),t.forEach((function(e){var t;if(n._flagToExperiments&&null!=(t=n._flagToExperiments)&&t.has(e)){var r,i=n._instance.getFeatureFlag(e),o=null==(r=n._flagToExperiments)?void 0:r.get(e);i&&null!=o&&o.variants[i]&&n._applyTransforms(o.name,i,o.variants[i].transforms)}}))}},t.previewWebExperiment=function(){var t=this,n=e.getWindowLocation();if(null!=n&&n.search){var r=ml(null==n?void 0:n.search,"__experiment_id"),i=ml(null==n?void 0:n.search,"__experiment_variant");r&&i&&(e._logInfo("previewing web experiments "+r+" && "+i),this.getWebExperiments((function(e){t._showPreviewWebExperiment(parseInt(r),i,e)}),!1,!0))}},t.loadIfEnabled=function(){this._instance.config.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()},t.getWebExperiments=function(e,t,n){if(this._instance.config.disable_web_experiments&&!n)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._instance.config.token),method:"GET",callback:function(t){if(200!==t.statusCode||!t.json)return e([]);var n=t.json.experiments||[];return e(n)}})},t._showPreviewWebExperiment=function(t,n,r){var i=r.filter((function(e){return e.id===t}));i&&i.length>0&&(e._logInfo("Previewing web experiment ["+i[0].name+"] with variant ["+n+"]"),this._applyTransforms(i[0].name,n,i[0].variants[n].transforms))},e._matchesTestVariant=function(t){return!Bs(t.conditions)&&(e._matchUrlConditions(t)&&e._matchUTMConditions(t))},e._matchUrlConditions=function(t){var n;if(Bs(t.conditions)||Bs(null==(n=t.conditions)?void 0:n.url))return!0;var r,i,o,s=e.getWindowLocation();return!!s&&(null==(r=t.conditions)||!r.url||J_[null!==(i=null==(o=t.conditions)?void 0:o.urlMatchType)&&void 0!==i?i:"icontains"](t.conditions.url,s))},e.getWindowLocation=function(){return null==ps?void 0:ps.location},e._matchUTMConditions=function(e){var t;if(Bs(e.conditions)||Bs(null==(t=e.conditions)?void 0:t.utm))return!0;var n=Bp();if(n.utm_source){var r,i,o,s,a,u,l,c,d=null==(r=e.conditions)||null==(r=r.utm)||!r.utm_campaign||(null==(i=e.conditions)||null==(i=i.utm)?void 0:i.utm_campaign)==n.utm_campaign,f=null==(o=e.conditions)||null==(o=o.utm)||!o.utm_source||(null==(s=e.conditions)||null==(s=s.utm)?void 0:s.utm_source)==n.utm_source,p=null==(a=e.conditions)||null==(a=a.utm)||!a.utm_medium||(null==(u=e.conditions)||null==(u=u.utm)?void 0:u.utm_medium)==n.utm_medium,_=null==(l=e.conditions)||null==(l=l.utm)||!l.utm_term||(null==(c=e.conditions)||null==(c=c.utm)?void 0:c.utm_term)==n.utm_term;return d&&p&&_&&f}return!1},e._logInfo=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];Aa.info("[WebExperiments] "+e,n)},t._applyTransforms=function(t,n,r){this._is_bot()?e._logInfo("Refusing to render web experiment since the viewer is a likely bot"):"control"!==n?r.forEach((function(r){if(r.selector){var i;e._logInfo("applying transform of variant "+n+" for experiment "+t+" ",r);var o=null==(i=document)?void 0:i.querySelectorAll(r.selector);null==o||o.forEach((function(e){var t=e;r.html&&(t.innerHTML=r.html),r.css&&t.setAttribute("style",r.css)}))}})):e._logInfo("Control variants leave the page unmodified.")},t._is_bot=function(){return ms&&this._instance?Z_(ms,this._instance.config.custom_blocked_useragents):void 0},e}(),eh=Da("[PostHog ExternalIntegrations]"),th={intercom:"intercom-integration",crispChat:"crisp-chat-integration"},nh=function(){function e(e){this._instance=e}var t=e.prototype;return t._loadScript=function(e,t){var n;null==(n=ks.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this._instance,e,(function(e){if(e)return eh.error("failed to load script",e);t()}))},t.startIfEnabledOrStop=function(){for(var e=this,t=function(){var t,i,o,s=r[n],a=s[0],u=s[1];(!u||null!=(t=ks.__PosthogExtensions__)&&null!=(t=t.integrations)&&t[a]||e._loadScript(th[a],(function(){var t;null==(t=ks.__PosthogExtensions__)||null==(t=t.integrations)||null==(t=t[a])||t.start(e._instance)})),!u&&null!=(i=ks.__PosthogExtensions__)&&null!=(i=i.integrations)&&i[a])&&(null==(o=ks.__PosthogExtensions__)||null==(o=o.integrations)||null==(o=o[a])||o.stop())},n=0,r=Object.entries(null!==(i=this._instance.config.integrations)&&void 0!==i?i:{});n<r.length;n++){var i;t()}},e}(),rh="[SessionRecording]",ih=Da(rh),oh=function(){function e(e){if(this._forceAllowLocalhostNetworkCapture=!1,this._receivedFlags=!1,this._persistFlagsOnSessionListener=void 0,this._instance=e,!this._instance.sessionManager)throw ih.error("started without valid sessionManager"),new Error(rh+" started without valid sessionManager. This is a bug.");if("always"===this._instance.config.cookieless_mode)throw new Error(rh+' cannot be used with cookieless_mode="always"')}var t=e.prototype;return t.startIfEnabledOrStop=function(e){var t;if(!this._isRecordingEnabled||null==(t=this._lazyLoadedSessionRecording)||!t.isStarted){var n=!js(Object.assign)&&!js(Array.from);this._isRecordingEnabled&&n?(this._lazyLoadAndStart(e),ih.info("starting")):this.stopRecording()}},t._lazyLoadAndStart=function(e){var t,n,r,i=this;this._isRecordingEnabled&&(null!=ks&&null!=(t=ks.__PosthogExtensions__)&&null!=(t=t.rrweb)&&t.record&&null!=(n=ks.__PosthogExtensions__)&&n.initSessionRecording?this._onScriptLoaded(e):null==(r=ks.__PosthogExtensions__)||null==r.loadExternalDependency||r.loadExternalDependency(this._instance,this._scriptName,(function(t){if(t)return ih.error("could not load recorder",t);i._onScriptLoaded(e)})))},t.stopRecording=function(){var e,t;null==(e=this._persistFlagsOnSessionListener)||e.call(this),this._persistFlagsOnSessionListener=void 0,null==(t=this._lazyLoadedSessionRecording)||t.stop()},t._resetSampling=function(){var e;null==(e=this._instance.persistence)||e.unregister(zd)},t._persistRemoteConfig=function(e){var t=this;if(this._instance.persistence){var n,r,i=this._instance.persistence,o=function(){var n,r=!1===e.sessionRecording?void 0:e.sessionRecording,o=null==r?void 0:r.sampleRate,s=Bs(o)?null:parseFloat(o);Bs(s)&&t._resetSampling();var a=null==r?void 0:r.minimumDurationMilliseconds;i.register(((n={})[Ud]=Ui({enabled:!!r},r,{networkPayloadCapture:Ui({capturePerformance:e.capturePerformance},null==r?void 0:r.networkPayloadCapture),canvasRecording:{enabled:null==r?void 0:r.recordCanvas,fps:null==r?void 0:r.canvasFps,quality:null==r?void 0:r.canvasQuality},sampleRate:s,minimumDurationMilliseconds:js(a)?null:a,endpoint:null==r?void 0:r.endpoint,triggerMatchType:null==r?void 0:r.triggerMatchType,masking:null==r?void 0:r.masking,urlTriggers:null==r?void 0:r.urlTriggers}),n))};o(),null==(n=this._persistFlagsOnSessionListener)||n.call(this),this._persistFlagsOnSessionListener=null==(r=this._instance.sessionManager)?void 0:r.onSessionId(o)}},t.onRemoteConfig=function(e){"sessionRecording"in e?!1!==e.sessionRecording?(this._persistRemoteConfig(e),this._receivedFlags=!0,this.startIfEnabledOrStop()):this._receivedFlags=!0:ih.info("skipping remote config with no sessionRecording",e)},t.log=function(e,t){var n;void 0===t&&(t="log"),null!=(n=this._lazyLoadedSessionRecording)&&n.log?this._lazyLoadedSessionRecording.log(e,t):ih.warn("log called before recorder was ready")},t._onScriptLoaded=function(e){var t,n;if(null==(t=ks.__PosthogExtensions__)||!t.initSessionRecording)throw Error("Called on script loaded before session recording is available");this._lazyLoadedSessionRecording||(this._lazyLoadedSessionRecording=null==(n=ks.__PosthogExtensions__)?void 0:n.initSessionRecording(this._instance),this._lazyLoadedSessionRecording._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture);this._lazyLoadedSessionRecording.start(e)},t.onRRwebEmit=function(e){var t;null==(t=this._lazyLoadedSessionRecording)||null==t.onRRwebEmit||t.onRRwebEmit(e)},t.overrideLinkedFlag=function(){var e,t,n;this._lazyLoadedSessionRecording||(null==(t=this._instance.persistence)||t.register(((n={}).$replay_override_linked_flag=!0,n)));null==(e=this._lazyLoadedSessionRecording)||e.overrideLinkedFlag()},t.overrideSampling=function(){var e,t,n;this._lazyLoadedSessionRecording||(null==(t=this._instance.persistence)||t.register(((n={}).$replay_override_sampling=!0,n)));null==(e=this._lazyLoadedSessionRecording)||e.overrideSampling()},t.overrideTrigger=function(e){var t,n,r;this._lazyLoadedSessionRecording||(null==(n=this._instance.persistence)||n.register(((r={})["url"===e?"$replay_override_url_trigger":"$replay_override_event_trigger"]=!0,r)));null==(t=this._lazyLoadedSessionRecording)||t.overrideTrigger(e)},t.tryAddCustomEvent=function(e,t){var n;return!(null==(n=this._lazyLoadedSessionRecording)||!n.tryAddCustomEvent(e,t))},Hi(e,[{key:"started",get:function(){var e;return!(null==(e=this._lazyLoadedSessionRecording)||!e.isStarted)}},{key:"status",get:function(){return this._lazyLoadedSessionRecording?this._lazyLoadedSessionRecording.status:this._receivedFlags&&!this._isRecordingEnabled?"disabled":"lazy_loading"}},{key:"_isRecordingEnabled",get:function(){var e,t=!(null==(e=this._instance.get_property(Ud))||!e.enabled),n=!this._instance.config.disable_session_recording,r=this._instance.config.disable_session_recording||this._instance.consent.isOptedOut();return ps&&t&&n&&!r}},{key:"_scriptName",get:function(){var e,t,n=null==(e=this._instance)||null==(e=e.persistence)?void 0:e.get_property(Ud);return(null==n||null==(t=n.scriptConfig)?void 0:t.script)||"lazy-recorder"}},{key:"sdkDebugProperties",get:function(){var e;return(null==(e=this._lazyLoadedSessionRecording)?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}}])}(),sh={},ah=function(){},uh="posthog",lh=!nc&&-1===(null==Es?void 0:Es.indexOf("MSIE"))&&-1===(null==Es?void 0:Es.indexOf("Mozilla")),ch=function(e){var t;return Ui({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,token:"",autocapture:!0,cross_subdomain_cookie:Za(null==ys?void 0:ys.location),persistence:"localStorage+cookie",persistence_name:"",loaded:ah,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:null!=e?e:"unset",__preview_deferred_init_extensions:!1,debug:bs&&Us(null==bs?void 0:bs.search)&&-1!==bs.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:!0,disable_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:"https:"===(null==ps||null==(t=ps.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_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error:function(e){var t="Bad HTTP status: "+e.statusCode+" "+e.text;Aa.error(t)},get_device_id:function(e){return e},capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:"identified_only",before_send:void 0,request_queue_config:{flush_interval_ms:D_},error_tracking:{},_onCapture:ah,__preview_eager_load_replay:!1},function(e){return{rageclick:!(e&&e>="2025-11-30")||{content_ignorelist:!0},capture_pageview:!(e&&e>="2025-05-24")||"history_change",session_recording:e&&e>="2025-11-30"?{strictMinimumDuration:!0}:{}}}(e))},dh=function(e){var t={};js(e.process_person)||(t.person_profiles=e.process_person),js(e.xhr_headers)||(t.request_headers=e.xhr_headers),js(e.cookie_name)||(t.persistence_name=e.cookie_name),js(e.disable_cookie)||(t.disable_persistence=e.disable_cookie),js(e.store_google)||(t.save_campaign_params=e.store_google),js(e.verbose)||(t.debug=e.verbose);var n=Ha({},t,e);return qs(e.property_blacklist)&&(js(e.property_denylist)?n.property_denylist=e.property_blacklist:qs(e.property_denylist)?n.property_denylist=[].concat(e.property_blacklist,e.property_denylist):Aa.error("Invalid value for property_denylist config: "+e.property_denylist)),n},fh=function(){return Hi((function(){this.__forceAllowLocalhost=!1}),[{key:"_forceAllowLocalhost",get:function(){return this.__forceAllowLocalhost},set:function(e){Aa.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}])}(),ph=function(){function e(){var e=this;this.webPerformance=new fh,this._personProcessingSetOncePropertiesSent=!1,this.version=Ps.LIB_VERSION,this._internalEventEmitter=new k_,this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=ch(),this.SentryIntegration=Rp,this.sentryIntegration=function(t){return function(e,t){var n=Lp(e,t);return{name:Fp,processEvent:function(e){return n(e)}}}(e,t)},this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this._initialPageviewCaptured=!1,this._visibilityStateListener=null,this._initialPersonProfilesConfig=null,this._cachedPersonProperties=null,this.featureFlags=new y_(this),this.toolbar=new qp(this),this.scrollManager=new H_(this),this.pageViewManager=new a_(this),this.surveys=new I_(this),this.conversations=new L_(this),this.productTours=new E_(this),this.experiments=new K_(this),this.exceptions=new ff(this),this.rateLimiter=new O_(this),this.requestRouter=new X_(this),this.consent=new bp(this),this.externalIntegrations=new nh(this),this.people={set:function(t,n,r){var i,o=Us(t)?((i={})[t]=n,i):t;e.setPersonProperties(o),null==r||r({})},set_once:function(t,n,r){var i,o=Us(t)?((i={})[t]=n,i):t;e.setPersonProperties(void 0,o),null==r||r({})}},this.on("eventCaptured",(function(e){return Aa.info('send "'+(null==e?void 0:e.event)+'"',e)}))}var t=e.prototype;return t.init=function(t,n,r){if(r&&r!==uh){var i,o=null!==(i=sh[r])&&void 0!==i?i:new e;return o._init(t,n,r),sh[r]=o,sh[uh][r]=o,o}return this._init(t,n,r)},t._init=function(e,t,n){var r,i=this;if(void 0===t&&(t={}),js(e)||Vs(e))return Aa.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._checkLocalStorageForDebug(t.debug),this._originalUserConfig=t,this._triggered_notifs=[],t.person_profiles&&(this._initialPersonProfilesConfig=t.person_profiles),this.set_config(Ha({},ch(t.defaults),dh(t),{name:n,token:e})),this.config.on_xhr_error&&Aa.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=t.disable_compression?void 0:hl.GZipJS;var o=this._is_persistence_disabled();this.persistence=new w_(this.config,o),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new w_(Ui({},this.config,{persistence:"sessionStorage"}),o);var s=Ui({},this.persistence.props),a=Ui({},this.sessionPersistence.props);this.register({$initialization_time:(new Date).toISOString()}),this._requestQueue=new q_((function(e){return i._send_retriable_request(e)}),this.config.request_queue_config),this._retryQueue=new N_(this),this.__request_queue=[];var u="always"===this.config.cookieless_mode||"on_reject"===this.config.cookieless_mode&&this.consent.isExplicitlyOptedOut();if(u||(this.sessionManager=new z_(this),this.sessionPropsManager=new U_(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(Aa.info("Deferring extension initialization to improve startup performance"),setTimeout((function(){i._initExtensions(u)}),0)):(Aa.info("Initializing extensions synchronously"),this._initExtensions(u)),Ps.DEBUG=Ps.DEBUG||this.config.debug,Ps.DEBUG&&Aa.info("Starting in debug mode",{this:this,config:t,thisC:Ui({},this.config),p:s,s:a}),void 0!==(null==(r=t.bootstrap)?void 0:r.distinctID)){var l,c,d=this.config.get_device_id(hu()),f=null!=(l=t.bootstrap)&&l.isIdentifiedID?d:t.bootstrap.distinctID;this.persistence.set_property(Kd,null!=(c=t.bootstrap)&&c.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:t.bootstrap.distinctID,$device_id:f})}if(this._hasBootstrappedFeatureFlags()){var p,_,h=Object.keys((null==(p=t.bootstrap)?void 0:p.featureFlags)||{}).filter((function(e){var n;return!(null==(n=t.bootstrap)||null==(n=n.featureFlags)||!n[e])})).reduce((function(e,n){var r;return e[n]=(null==(r=t.bootstrap)||null==(r=r.featureFlags)?void 0:r[n])||!1,e}),{}),v=Object.keys((null==(_=t.bootstrap)?void 0:_.featureFlagPayloads)||{}).filter((function(e){return h[e]})).reduce((function(e,n){var r,i;null!=(r=t.bootstrap)&&null!=(r=r.featureFlagPayloads)&&r[n]&&(e[n]=null==(i=t.bootstrap)||null==(i=i.featureFlagPayloads)?void 0:i[n]);return e}),{});this.featureFlags.receivedFeatureFlags({featureFlags:h,featureFlagPayloads:v})}if(u)this.register_once({distinct_id:uf,$device_id:null},"");else if(!this.get_distinct_id()){var g=this.config.get_device_id(hu());this.register_once({distinct_id:g,$device_id:g},""),this.persistence.set_property(Kd,"anonymous")}return Qa(ps,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),this.toolbar.maybeLoadToolbar(),t.segment?Ip(this,(function(){return i._loaded()})):this._loaded(),$s(this.config._onCapture)&&this.config._onCapture!==ah&&(Aa.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",(function(e){return i.config._onCapture(e.event,e)}))),this.config.ip&&Aa.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},t._initExtensions=function(e){var t=this,n=performance.now();this.historyAutocapture=new Cp(this),this.historyAutocapture.startIfEnabled();var r=[];r.push((function(){new Np(t).startIfEnabledOrStop()})),r.push((function(){var e;t.siteApps=new G_(t),null==(e=t.siteApps)||e.init()})),e||r.push((function(){t.sessionRecording=new oh(t),t.sessionRecording.startIfEnabledOrStop()})),this.config.disable_scroll_properties||r.push((function(){t.scrollManager.startMeasuringScrollPosition()})),r.push((function(){t.autocapture=new sp(t),t.autocapture.startIfEnabled()})),r.push((function(){t.surveys.loadIfEnabled()})),r.push((function(){t.conversations.loadIfEnabled()})),r.push((function(){t.productTours.loadIfEnabled()})),r.push((function(){t.heatmaps=new s_(t),t.heatmaps.startIfEnabled()})),r.push((function(){t.webVitalsAutocapture=new r_(t)})),r.push((function(){t.exceptionObserver=new Pp(t),t.exceptionObserver.startIfEnabled()})),r.push((function(){t.deadClicksAutocapture=new Ep(t,xp),t.deadClicksAutocapture.startIfEnabled()})),r.push((function(){if(t._pendingRemoteConfig){var e=t._pendingRemoteConfig;t._pendingRemoteConfig=void 0,t._onRemoteConfig(e)}})),this._processInitTaskQueue(r,n)},t._processInitTaskQueue=function(e,t){for(var n=this;e.length>0;){if(this.config.__preview_deferred_init_extensions)if(performance.now()-t>=30&&e.length>0)return void setTimeout((function(){n._processInitTaskQueue(e,t)}),0);var r=e.shift();if(r)try{r()}catch(e){Aa.error("Error initializing extension:",e)}}var i=Math.round(performance.now()-t);this.register_for_session({$sdk_debug_extensions_init_method:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",$sdk_debug_extensions_init_time_ms:i}),this.config.__preview_deferred_init_extensions&&Aa.info("PostHog extensions initialized ("+i+"ms)")},t._onRemoteConfig=function(e){var t,n,r,i,o,s,a,u,l=this;if(!ys||!ys.body)return Aa.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout((function(){l._onRemoteConfig(e)}),500);this.config.__preview_deferred_init_extensions&&(this._pendingRemoteConfig=e),this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=Fs(e.supportedCompression,hl.GZipJS)?hl.GZipJS:Fs(e.supportedCompression,hl.Base64)?hl.Base64:void 0),null!=(t=e.analytics)&&t.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),this.set_config({person_profiles:this._initialPersonProfilesConfig?this._initialPersonProfilesConfig:"identified_only"}),null==(n=this.siteApps)||n.onRemoteConfig(e),null==(r=this.sessionRecording)||r.onRemoteConfig(e),null==(i=this.autocapture)||i.onRemoteConfig(e),null==(o=this.heatmaps)||o.onRemoteConfig(e),this.surveys.onRemoteConfig(e),this.conversations.onRemoteConfig(e),this.productTours.onRemoteConfig(e),null==(s=this.webVitalsAutocapture)||s.onRemoteConfig(e),null==(a=this.exceptionObserver)||a.onRemoteConfig(e),this.exceptions.onRemoteConfig(e),null==(u=this.deadClicksAutocapture)||u.onRemoteConfig(e)},t._loaded=function(){var e=this;try{this.config.loaded(this)}catch(e){Aa.critical("`loaded` function failed",e)}this._start_queue_if_opted_in(),this.config.capture_pageview&&setTimeout((function(){(e.consent.isOptedIn()||"always"===e.config.cookieless_mode)&&e._captureInitialPageview()}),1),new A_(this).load(),this.featureFlags.flags()},t._start_queue_if_opted_in=function(){var e;this.is_capturing()&&(this.config.request_batching&&(null==(e=this._requestQueue)||e.enable()))},t._dom_loaded=function(){var e=this;this.is_capturing()&&$a(this.__request_queue,(function(t){return e._send_retriable_request(t)})),this.__request_queue=[],this._start_queue_if_opted_in()},t._handle_unload=function(){var e,t;this.config.request_batching?(this._shouldCapturePageleave()&&this.capture("$pageleave"),null==(e=this._requestQueue)||e.unload(),null==(t=this._retryQueue)||t.unload()):this._shouldCapturePageleave()&&this.capture("$pageleave",null,{transport:"sendBeacon"})},t._send_request=function(e){var t=this;this.__loaded&&(lh?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)||(e.transport=e.transport||this.config.api_transport,e.url=ic(e.url,{ip:this.config.ip?1:0}),e.headers=Ui({},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,function(e){var t,n,r,i=Ui({},e);i.timeout=i.timeout||6e4,i.url=ic(i.url,{_:(new Date).getTime().toString(),ver:Ps.LIB_VERSION,compression:i.compression});var o=null!==(t=i.transport)&&void 0!==t?t:"fetch",s=ac.filter((function(e){return!i.disableTransport||!e.transport||!i.disableTransport.includes(e.transport)})),a=null!==(n=null==(r=Ya(s,(function(e){return e.transport===o})))?void 0:r.method)&&void 0!==n?n:s[0].method;if(!a)throw new Error("No available transport method");a(i)}(Ui({},e,{callback:function(n){t.rateLimiter.checkForLimiting(n),n.statusCode>=400&&(null==t.config.on_request_error||t.config.on_request_error(n)),null==e.callback||e.callback(n)}}))))},t._send_retriable_request=function(e){this._retryQueue?this._retryQueue.retriableRequest(e):this._send_request(e)},t._execute_array=function(e){var t,n=this,r=[],i=[],o=[];$a(e,(function(e){e&&(t=e[0],qs(t)?o.push(e):$s(e)?e.call(n):qs(e)&&"alias"===t?r.push(e):qs(e)&&-1!==t.indexOf("capture")&&$s(n[t])?o.push(e):i.push(e))}));var s=function(e,t){$a(e,(function(e){if(qs(e[0])){var n=t;Na(e,(function(e){n=n[e[0]].apply(n,e.slice(1))}))}else this[e[0]].apply(this,e.slice(1))}),t)};s(r,this),s(i,this),s(o,this)},t._hasBootstrappedFeatureFlags=function(){var e,t;return(null==(e=this.config.bootstrap)?void 0:e.featureFlags)&&Object.keys(null==(t=this.config.bootstrap)?void 0:t.featureFlags).length>0||!1},t.push=function(e){this._execute_array([e])},t.capture=function(e,t,n){var r;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this._requestQueue){if(this.is_capturing())if(!js(e)&&Us(e)){var i=!this.config.opt_out_useragent_filter&&this._is_bot();if(!(i&&!this.config.__preview_capture_bot_pageviews)){var o=null!=n&&n.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(null==o||!o.isRateLimited){null!=t&&t.$current_url&&!Us(null==t?void 0:t.$current_url)&&(Aa.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),null==t||delete t.$current_url),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var s=new Date,a=(null==n?void 0:n.timestamp)||s,u=hu(),l={uuid:u,event:e,properties:this.calculateEventProperties(e,t||{},a,u)};"$pageview"===e&&this.config.__preview_capture_bot_pageviews&&i&&(l.event="$bot_pageview",l.properties.$browser_type="bot"),o&&(l.properties.$lib_rate_limit_remaining_tokens=o.remainingTokens),(null==n?void 0:n.$set)&&(l.$set=null==n?void 0:n.$set);var c="$groupidentify"!==e,d=this._calculate_set_once_properties(null==n?void 0:n.$set_once,c);if(d&&(l.$set_once=d),(l=Wa(l,null!=n&&n._noTruncate?null:this.config.properties_string_max_length)).timestamp=a,js(null==n?void 0:n.timestamp)||(l.properties.$event_time_override_provided=!0,l.properties.$event_time_override_system_time=s),e===cs.DISMISSED||e===cs.SENT){var f,p=null==t?void 0:t[ds.SURVEY_ID],_=null==t?void 0:t[ds.SURVEY_ITERATION];ou({id:p,current_iteration:_}),l.$set=Ui({},l.$set,((f={})[ru({id:p,current_iteration:_},e===cs.SENT?"responded":"dismissed")]=!0,f))}var h=Ui({},l.properties.$set,l.$set);if(Hs(h)||this.setPersonPropertiesForFlags(h),!Bs(this.config.before_send)){var v=this._runBeforeSend(l);if(!v)return;l=v}this._internalEventEmitter.emit("eventCaptured",l);var g={method:"POST",url:null!==(r=null==n?void 0:n._url)&&void 0!==r?r:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:l,compression:"best-available",batchKey:null==n?void 0:n._batchKey};return!this.config.request_batching||n&&(null==n||!n._batchKey)||null!=n&&n.send_instantly?this._send_retriable_request(g):this._requestQueue.enqueue(g),l}Aa.critical("This capture call is ignored due to client rate limiting.")}}else Aa.error("No event name provided to posthog.capture")}else Aa.uninitializedWarning("posthog.capture")},t._addCaptureHook=function(e){return this.on("eventCaptured",(function(t){return e(t.event,t)}))},t.calculateEventProperties=function(e,t,n,r,i){if(n=n||new Date,!this.persistence||!this.sessionPersistence)return t;var o=i?void 0:this.persistence.remove_event_timer(e),s=Ui({},t);if(s.token=this.config.token,s.$config_defaults=this.config.defaults,("always"==this.config.cookieless_mode||"on_reject"==this.config.cookieless_mode&&this.consent.isExplicitlyOptedOut())&&(s.$cookieless_mode=!0),"$snapshot"===e){var a=Ui({},this.persistence.properties(),this.sessionPersistence.properties());return s.distinct_id=a.distinct_id,(!Us(s.distinct_id)&&!Ws(s.distinct_id)||Vs(s.distinct_id))&&Aa.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),s}var u,l=e_(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties);if(this.sessionManager){var c=this.sessionManager.checkAndGetSessionAndWindowId(i,n.getTime()),d=c.sessionId,f=c.windowId;s.$session_id=d,s.$window_id=f}this.sessionPropsManager&&Ha(s,this.sessionPropsManager.getSessionProps());try{var p;this.sessionRecording&&Ha(s,this.sessionRecording.sdkDebugProperties),s.$sdk_debug_retry_queue_size=null==(p=this._retryQueue)?void 0:p.length}catch(e){s.$sdk_debug_error_capturing_properties=String(e)}if(this.requestRouter.region===Y_.CUSTOM&&(s.$lib_custom_api_host=this.config.api_host),u="$pageview"!==e||i?"$pageleave"!==e||i?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(n):this.pageViewManager.doPageView(n,r),s=Ha(s,u),"$pageview"===e&&ys&&(s.title=ys.title),!js(o)){var _=n.getTime()-o;s.$duration=parseFloat((_/1e3).toFixed(3))}Es&&this.config.opt_out_useragent_filter&&(s.$browser_type=this._is_bot()?"bot":"browser"),(s=Ha({},l,this.persistence.properties(),this.sessionPersistence.properties(),s)).$is_identified=this._isIdentified(),qs(this.config.property_denylist)?Na(this.config.property_denylist,(function(e){delete s[e]})):Aa.error("Invalid value for property_denylist config: "+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var h=this.config.sanitize_properties;h&&(Aa.error("sanitize_properties is deprecated. Use before_send instead"),s=h(s,e));var v=this._hasPersonProcessing();return s.$process_person_profile=v,v&&!i&&this._requirePersonProcessing("_calculate_event_properties"),s},t._calculate_set_once_properties=function(e,t){var n;if(void 0===t&&(t=!0),!this.persistence||!this._hasPersonProcessing())return e;if(this._personProcessingSetOncePropertiesSent)return e;var r=this.persistence.get_initial_props(),i=null==(n=this.sessionPropsManager)?void 0:n.getSetOnceProps(),o=Ha({},r,i||{},e||{}),s=this.config.sanitize_properties;return s&&(Aa.error("sanitize_properties is deprecated. Use before_send instead"),o=s(o,"$set_once")),t&&(this._personProcessingSetOncePropertiesSent=!0),Hs(o)?void 0:o},t.register=function(e,t){var n;null==(n=this.persistence)||n.register(e,t)},t.register_once=function(e,t,n){var r;null==(r=this.persistence)||r.register_once(e,t,n)},t.register_for_session=function(e){var t;null==(t=this.sessionPersistence)||t.register(e)},t.unregister=function(e){var t;null==(t=this.persistence)||t.unregister(e)},t.unregister_for_session=function(e){var t;null==(t=this.sessionPersistence)||t.unregister(e)},t._register_single=function(e,t){var n;this.register(((n={})[e]=t,n))},t.getFeatureFlag=function(e,t){return this.featureFlags.getFeatureFlag(e,t)},t.getFeatureFlagPayload=function(e){var t=this.featureFlags.getFeatureFlagPayload(e);try{return JSON.parse(t)}catch(e){return t}},t.isFeatureEnabled=function(e,t){return this.featureFlags.isFeatureEnabled(e,t)},t.reloadFeatureFlags=function(){this.featureFlags.reloadFeatureFlags()},t.updateEarlyAccessFeatureEnrollment=function(e,t,n){this.featureFlags.updateEarlyAccessFeatureEnrollment(e,t,n)},t.getEarlyAccessFeatures=function(e,t,n){return void 0===t&&(t=!1),this.featureFlags.getEarlyAccessFeatures(e,t,n)},t.on=function(e,t){return this._internalEventEmitter.on(e,t)},t.onFeatureFlags=function(e){return this.featureFlags.onFeatureFlags(e)},t.onSurveysLoaded=function(e){return this.surveys.onSurveysLoaded(e)},t.onSessionId=function(e){var t,n;return null!==(t=null==(n=this.sessionManager)?void 0:n.onSessionId(e))&&void 0!==t?t:function(){}},t.getSurveys=function(e,t){void 0===t&&(t=!1),this.surveys.getSurveys(e,t)},t.getActiveMatchingSurveys=function(e,t){void 0===t&&(t=!1),this.surveys.getActiveMatchingSurveys(e,t)},t.renderSurvey=function(e,t){this.surveys.renderSurvey(e,t)},t.displaySurvey=function(e,t){void 0===t&&(t=au),this.surveys.displaySurvey(e,t)},t.cancelPendingSurvey=function(e){this.surveys.cancelPendingSurvey(e)},t.canRenderSurvey=function(e){return this.surveys.canRenderSurvey(e)},t.canRenderSurveyAsync=function(e,t){return void 0===t&&(t=!1),this.surveys.canRenderSurveyAsync(e,t)},t.identify=function(e,t,n){if(!this.__loaded||!this.persistence)return Aa.uninitializedWarning("posthog.identify");if(Ws(e)&&(e=e.toString(),Aa.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),e)if(["distinct_id","distinctid"].includes(e.toLowerCase()))Aa.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.');else if(e!==uf){if(this._requirePersonProcessing("posthog.identify")){var r=this.get_distinct_id();if(this.register({$user_id:e}),!this.get_property("$device_id")){var i=r;this.register_once({$had_persisted_distinct_id:!0,$device_id:i},"")}e!==r&&e!==this.get_property(Rd)&&(this.unregister(Rd),this.register({distinct_id:e}));var o="anonymous"===(this.persistence.get_property(Kd)||"anonymous");e!==r&&o?(this.persistence.set_property(Kd,"identified"),this.setPersonPropertiesForFlags(Ui({},n||{},t||{}),!1),this.capture("$identify",{distinct_id:e,$anon_distinct_id:r},{$set:t||{},$set_once:n||{}}),this._cachedPersonProperties=lc(e,t,n),this.featureFlags.setAnonymousDistinctId(r)):(t||n)&&this.setPersonProperties(t,n),e!==r&&(this.reloadFeatureFlags(),this.unregister(Jd))}}else Aa.critical('The string "'+uf+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.');else Aa.error("Unique user id has not been set in posthog.identify")},t.setPersonProperties=function(e,t){if((e||t)&&this._requirePersonProcessing("posthog.setPersonProperties")){var n=lc(this.get_distinct_id(),e,t);this._cachedPersonProperties!==n?(this.setPersonPropertiesForFlags(Ui({},t||{},e||{})),this.capture("$set",{$set:e||{},$set_once:t||{}}),this._cachedPersonProperties=n):Aa.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}},t.group=function(e,t,n){var r;if(e&&t){var i,o=this.getGroups();if(o[e]!==t&&this.resetGroupPropertiesForFlags(e),this.register({$groups:Ui({},o,(r={},r[e]=t,r))}),n)this.capture("$groupidentify",{$group_type:e,$group_key:t,$group_set:n}),this.setGroupPropertiesForFlags(((i={})[e]=n,i));o[e]===t||n||this.reloadFeatureFlags()}else Aa.error("posthog.group requires a group type and group key")},t.resetGroups=function(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()},t.setPersonPropertiesForFlags=function(e,t){void 0===t&&(t=!0),this.featureFlags.setPersonPropertiesForFlags(e,t)},t.resetPersonPropertiesForFlags=function(){this.featureFlags.resetPersonPropertiesForFlags()},t.setGroupPropertiesForFlags=function(e,t){void 0===t&&(t=!0),this._requirePersonProcessing("posthog.setGroupPropertiesForFlags")&&this.featureFlags.setGroupPropertiesForFlags(e,t)},t.resetGroupPropertiesForFlags=function(e){this.featureFlags.resetGroupPropertiesForFlags(e)},t.reset=function(e){var t,n,r,i;if(Aa.info("reset"),!this.__loaded)return Aa.uninitializedWarning("posthog.reset");var o=this.get_property("$device_id");if(this.consent.reset(),null==(t=this.persistence)||t.clear(),null==(n=this.sessionPersistence)||n.clear(),this.surveys.reset(),this.featureFlags.reset(),null==(r=this.persistence)||r.set_property(Kd,"anonymous"),null==(i=this.sessionManager)||i.resetSessionId(),this._cachedPersonProperties=null,"always"===this.config.cookieless_mode)this.register_once({distinct_id:uf,$device_id:null},"");else{var s=this.config.get_device_id(hu());this.register_once({distinct_id:s,$device_id:e?s:o},"")}this.register({$last_posthog_reset:(new Date).toISOString()},1)},t.get_distinct_id=function(){return this.get_property("distinct_id")},t.getGroups=function(){return this.get_property("$groups")||{}},t.get_session_id=function(){var e,t;return null!==(e=null==(t=this.sessionManager)?void 0:t.checkAndGetSessionAndWindowId(!0).sessionId)&&void 0!==e?e:""},t.get_session_replay_url=function(e){if(!this.sessionManager)return"";var t=this.sessionManager.checkAndGetSessionAndWindowId(!0),n=t.sessionId,r=t.sessionStartTimestamp,i=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+n);if(null!=e&&e.withTimestamp&&r){var o,s=null!==(o=e.timestampLookBack)&&void 0!==o?o:10;if(!r)return i;i+="?t="+Math.max(Math.floor(((new Date).getTime()-r)/1e3)-s,0)}return i},t.alias=function(e,t){return e===this.get_property(Ld)?(Aa.critical("Attempting to create alias for existing People user - aborting."),-2):this._requirePersonProcessing("posthog.alias")?(js(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single(Rd,e),this.capture("$create_alias",{alias:e,distinct_id:t})):(Aa.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0},t.set_config=function(e){var t=Ui({},this.config);if(Ns(e)){var n,r,i,o,s;Ha(this.config,dh(e));var a=this._is_persistence_disabled();null==(n=this.persistence)||n.update_config(this.config,t,a),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new w_(Ui({},this.config,{persistence:"sessionStorage"}),a);var u=this._checkLocalStorageForDebug(this.config.debug);Gs(u)&&(this.config.debug=u),Gs(this.config.debug)&&(this.config.debug?(Ps.DEBUG=!0,fp._is_supported()&&fp._set("ph_debug","true"),Aa.info("set_config",{config:e,oldConfig:t,newConfig:Ui({},this.config)})):(Ps.DEBUG=!1,fp._is_supported()&&fp._remove("ph_debug"))),null==(r=this.sessionRecording)||r.startIfEnabledOrStop(),null==(i=this.autocapture)||i.startIfEnabled(),null==(o=this.heatmaps)||o.startIfEnabled(),this.surveys.loadIfEnabled(),this._sync_opt_out_with_persistence(),null==(s=this.externalIntegrations)||s.startIfEnabledOrStop()}},t.startSessionRecording=function(e){var t=!0===e,n={sampling:t||!(null==e||!e.sampling),linked_flag:t||!(null==e||!e.linked_flag),url_trigger:t||!(null==e||!e.url_trigger),event_trigger:t||!(null==e||!e.event_trigger)};if(Object.values(n).some(Boolean)){var r,i,o,s,a;if(null==(r=this.sessionManager)||r.checkAndGetSessionAndWindowId(),n.sampling)null==(i=this.sessionRecording)||i.overrideSampling();if(n.linked_flag)null==(o=this.sessionRecording)||o.overrideLinkedFlag();if(n.url_trigger)null==(s=this.sessionRecording)||s.overrideTrigger("url");if(n.event_trigger)null==(a=this.sessionRecording)||a.overrideTrigger("event")}this.set_config({disable_session_recording:!1})},t.stopSessionRecording=function(){this.set_config({disable_session_recording:!0})},t.sessionRecordingStarted=function(){var e;return!(null==(e=this.sessionRecording)||!e.started)},t.captureException=function(e,t){var n=new Error("PostHog syntheticException"),r=this.exceptions.buildProperties(e,{handled:!0,syntheticException:n});return this.exceptions.sendExceptionEvent(Ui({},r,t))},t.loadToolbar=function(e){return this.toolbar.loadToolbar(e)},t.get_property=function(e){var t;return null==(t=this.persistence)?void 0:t.props[e]},t.getSessionProperty=function(e){var t;return null==(t=this.sessionPersistence)?void 0:t.props[e]},t.toString=function(){var e,t=null!==(e=this.config.name)&&void 0!==e?e:uh;return t!==uh&&(t=uh+"."+t),t},t._isIdentified=function(){var e,t;return"identified"===(null==(e=this.persistence)?void 0:e.get_property(Kd))||"identified"===(null==(t=this.sessionPersistence)?void 0:t.get_property(Kd))},t._hasPersonProcessing=function(){var e,t;return!("never"===this.config.person_profiles||"identified_only"===this.config.person_profiles&&!this._isIdentified()&&Hs(this.getGroups())&&(null==(e=this.persistence)||null==(e=e.props)||!e[Rd])&&(null==(t=this.persistence)||null==(t=t.props)||!t[sf]))},t._shouldCapturePageleave=function(){return!0===this.config.capture_pageleave||"if_capture_pageview"===this.config.capture_pageleave&&(!0===this.config.capture_pageview||"history_change"===this.config.capture_pageview)},t.createPersonProfile=function(){this._hasPersonProcessing()||this._requirePersonProcessing("posthog.createPersonProfile")&&this.setPersonProperties({},{})},t._requirePersonProcessing=function(e){return"never"===this.config.person_profiles?(Aa.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this._register_single(sf,!0),!0)},t._is_persistence_disabled=function(){if("always"===this.config.cookieless_mode)return!0;var e=this.consent.isOptedOut(),t=this.config.opt_out_persistence_by_default||"on_reject"===this.config.cookieless_mode;return this.config.disable_persistence||e&&!!t},t._sync_opt_out_with_persistence=function(){var e,t,n,r,i=this._is_persistence_disabled();(null==(e=this.persistence)?void 0:e._disabled)!==i&&(null==(n=this.persistence)||n.set_disabled(i));(null==(t=this.sessionPersistence)?void 0:t._disabled)!==i&&(null==(r=this.sessionPersistence)||r.set_disabled(i));return i},t.opt_in_capturing=function(e){var t;if("always"!==this.config.cookieless_mode){var n,r;if("on_reject"===this.config.cookieless_mode&&this.consent.isExplicitlyOptedOut())this.reset(!0),null==(n=this.sessionManager)||n.destroy(),this.sessionManager=new z_(this),this.persistence&&(this.sessionPropsManager=new U_(this,this.sessionManager,this.persistence)),this.sessionRecording=new oh(this),this.sessionRecording.startIfEnabledOrStop();if(this.consent.optInOut(!0),this._sync_opt_out_with_persistence(),this._start_queue_if_opted_in(),null==(t=this.sessionRecording)||t.startIfEnabledOrStop(),"on_reject"==this.config.cookieless_mode&&this.surveys.loadIfEnabled(),js(null==e?void 0:e.captureEventName)||null!=e&&e.captureEventName)this.capture(null!==(r=null==e?void 0:e.captureEventName)&&void 0!==r?r:"$opt_in",null==e?void 0:e.captureProperties,{send_instantly:!0});this.config.capture_pageview&&this._captureInitialPageview()}else Aa.warn('Consent opt in/out is not valid with cookieless_mode="always" and will be ignored')},t.opt_out_capturing=function(){var e,t;"always"!==this.config.cookieless_mode?("on_reject"===this.config.cookieless_mode&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this._sync_opt_out_with_persistence(),"on_reject"===this.config.cookieless_mode&&(this.register({distinct_id:uf,$device_id:null}),null==(e=this.sessionManager)||e.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,null==(t=this.sessionRecording)||t.stopRecording(),this.sessionRecording=void 0,this._captureInitialPageview())):Aa.warn('Consent opt in/out is not valid with cookieless_mode="always" and will be ignored')},t.has_opted_in_capturing=function(){return this.consent.isOptedIn()},t.has_opted_out_capturing=function(){return this.consent.isOptedOut()},t.get_explicit_consent_status=function(){var e=this.consent.consent;return e===yp.GRANTED?"granted":e===yp.DENIED?"denied":"pending"},t.is_capturing=function(){return"always"===this.config.cookieless_mode||("on_reject"===this.config.cookieless_mode?this.consent.isExplicitlyOptedOut()||this.consent.isOptedIn():!this.has_opted_out_capturing())},t.clear_opt_in_out_capturing=function(){this.consent.reset(),this._sync_opt_out_with_persistence()},t._is_bot=function(){return ms?Z_(ms,this.config.custom_blocked_useragents):void 0},t._captureInitialPageview=function(){ys&&("visible"===ys.visibilityState?this._initialPageviewCaptured||(this._initialPageviewCaptured=!0,this.capture("$pageview",{title:ys.title},{send_instantly:!0}),this._visibilityStateListener&&(ys.removeEventListener("visibilitychange",this._visibilityStateListener),this._visibilityStateListener=null)):this._visibilityStateListener||(this._visibilityStateListener=this._captureInitialPageview.bind(this),Qa(ys,"visibilitychange",this._visibilityStateListener)))},t.debug=function(e){!1===e?(null==ps||ps.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(null==ps||ps.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}))},t._shouldDisableFlags=function(){var e,t,n,r,i,o,s,a=this._originalUserConfig||{};return"advanced_disable_flags"in a?!!a.advanced_disable_flags:!1!==this.config.advanced_disable_flags?!!this.config.advanced_disable_flags:!0===this.config.advanced_disable_decide?(Aa.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):(n="advanced_disable_decide",r=!1,i=Aa,o=(t="advanced_disable_flags")in(e=a)&&!js(e[t]),s=n in e&&!js(e[n]),o?e[t]:s?(i&&i.warn("Config field '"+n+"' is deprecated. Please use '"+t+"' instead. The old field will be removed in a future major version."),e[n]):r)},t._runBeforeSend=function(e){if(Bs(this.config.before_send))return e;for(var t,n=e,r=ji(qs(this.config.before_send)?this.config.before_send:[this.config.before_send]);!(t=r()).done;){if(n=(0,t.value)(n),Bs(n)){var i="Event '"+e.event+"' was rejected in beforeSend function";return Ys(e.event)?Aa.warn(i+". This can cause unexpected behavior."):Aa.info(i),null}n.properties&&!Hs(n.properties)||Aa.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}return n},t.getPageViewId=function(){var e;return null==(e=this.pageViewManager._currentPageview)?void 0:e.pageViewId},t.captureTraceFeedback=function(e,t){this.capture("$ai_feedback",{$ai_trace_id:String(e),$ai_feedback_text:t})},t.captureTraceMetric=function(e,t,n){this.capture("$ai_metric",{$ai_trace_id:String(e),$ai_metric_name:t,$ai_metric_value:String(n)})},t._checkLocalStorageForDebug=function(e){var t=Gs(e)&&!e,n=fp._is_supported()&&"true"===fp._get("ph_debug");return!t&&(!!n||e)},Hi(e,[{key:"decideEndpointWasHit",get:function(){var e,t;return null!==(e=null==(t=this.featureFlags)?void 0:t.hasLoadedFlags)&&void 0!==e&&e}},{key:"flagsEndpointWasHit",get:function(){var e,t;return null!==(e=null==(t=this.featureFlags)?void 0:t.hasLoadedFlags)&&void 0!==e&&e}}])}();!function(e,t){for(var n=0;n<t.length;n++)e.prototype[t[n]]=za(e.prototype[t[n]])}(ph,["identify"]);var _h,hh;if(_h=sh[uh]=new ph,(hh=ks.posthog)&&Na(hh._i,(function(e){if(e&&qs(e)){var t=_h.init(e[0],e[1],e[2]),n=hh[e[2]]||hh;t&&(t._execute_array.call(t.people,n.people),t._execute_array(n))}})),ks.posthog=_h,function(){function e(){e.done||(e.done=!0,lh=!1,Na(sh,(function(e){e._dom_loaded()})))}null!=ys&&ys.addEventListener?"complete"===ys.readyState?e():Qa(ys,"DOMContentLoaded",e,{capture:!1}):ps&&Aa.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")}(),"undefined"==typeof performance||"function"!=typeof performance.now){var vh="undefined"!=typeof performance?performance:{};vh.now=vh.now||function(){return Date.now()},"undefined"==typeof performance&&(window.performance=vh)}}();
2
2
  //# sourceMappingURL=array.full.es5.js.map