posthog-js 1.455.0 → 1.455.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/all-external-dependencies.js +1 -1
- package/dist/all-external-dependencies.js.map +1 -1
- package/dist/array.full.es5.js +1 -1
- package/dist/array.full.es5.js.map +1 -1
- package/dist/array.full.js +1 -1
- package/dist/array.full.js.map +1 -1
- package/dist/array.full.no-external.js +1 -1
- package/dist/array.full.no-external.js.map +1 -1
- package/dist/array.js +1 -1
- package/dist/array.no-external.js +1 -1
- package/dist/customizations.full.js +1 -1
- package/dist/customizations.js +1 -1
- package/dist/default-extensions.js +1 -1
- package/dist/exception-autocapture.d.ts +4 -3
- package/dist/exception-autocapture.js +1 -1
- package/dist/exception-autocapture.js.map +1 -1
- package/dist/extension-bundles.js +1 -1
- package/dist/external-scripts-loader.js +1 -1
- package/dist/integrity.json +28 -28
- package/dist/lazy-recorder.js +1 -1
- package/dist/main.js +1 -1
- package/dist/module.full.cjs +1 -1
- package/dist/module.full.js +1 -1
- package/dist/module.full.js.map +1 -1
- package/dist/module.full.no-external.cjs +1 -1
- package/dist/module.full.no-external.js +1 -1
- package/dist/module.full.no-external.js.map +1 -1
- package/dist/module.js +1 -1
- package/dist/module.mjs +1 -1
- package/dist/module.no-external.cjs +1 -1
- package/dist/module.no-external.js +1 -1
- package/dist/module.slim.js +1 -1
- package/dist/module.slim.no-external.js +1 -1
- package/dist/posthog-recorder.js +1 -1
- package/dist/src/entrypoints/exception-autocapture.d.ts +4 -3
- package/dist/surveys-preview.js +1 -1
- package/dist/surveys.js +1 -1
- package/lib/package.json +1 -1
- package/lib/src/entrypoints/exception-autocapture.d.ts +4 -3
- package/lib/src/entrypoints/exception-autocapture.js +92 -42
- package/lib/src/entrypoints/exception-autocapture.js.map +1 -1
- package/package.json +4 -4
package/dist/surveys-preview.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e,t,n,r,o,i,s,a,l,u,c,d,f,p,h,v={},m=[],y=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,g=Array.isArray;function b(e,t){for(var n in t)e[n]=t[n];return e}function w(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function x(t,n,r){var o,i,s,a={};for(s in n)"key"==s?o=n[s]:"ref"==s?i=n[s]:a[s]=n[s];if(arguments.length>2&&(a.children=arguments.length>3?e.call(arguments,2):r),"function"==typeof t&&null!=t.defaultProps)for(s in t.defaultProps)void 0===a[s]&&(a[s]=t.defaultProps[s]);return k(t,a,o,i,null)}function k(e,r,o,i,s){var a={type:e,props:r,key:o,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==s?++n:s,__i:-1,__u:0};return null==s&&null!=t.vnode&&t.vnode(a),a}function S(e){return e.children}function T(e,t){this.props=e,this.context=t}function $(e,t){if(null==t)return e.__?$(e.__,e.__i+1):null;for(var n;e.__k.length>t;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?$(e):null}function q(e){if(e.__P&&e.__d){var n=e.__v,r=n.__e,o=[],i=[],s=b({},n);s.__v=n.__v+1,t.vnode&&t.vnode(s),C(e.__P,s,n,e.__n,e.__P.namespaceURI,32&n.__u?[r]:null,o,null==r?$(n):r,!!(32&n.__u),i),s.__v=n.__v,s.__.__k[s.__i]=s,j(o,s,i),n.__e=n.__=null,s.__e!=r&&_(s)}}function _(e){if(null!=(e=e.__)&&null!=e.__c)return e.__e=e.__c.base=null,e.__k.some(function(t){if(null!=t&&null!=t.__e)return e.__e=e.__c.base=t.__e}),_(e)}function M(e){(!e.__d&&(e.__d=!0)&&r.push(e)&&!P.__r++||o!=t.debounceRendering)&&((o=t.debounceRendering)||i)(P)}function P(){try{for(var e,t=1;r.length;)r.length>t&&r.sort(s),e=r.shift(),t=r.length,q(e)}finally{r.length=P.__r=0}}function A(e,t,n,r,o,i,s,a,l,u,c){var d,f,p,h,y,g,b,w=r&&r.__k||m,x=t.length;for(l=E(n,t,w,l,x),d=0;x>d;d++)null!=(p=n.__k[d])&&(f=-1!=p.__i&&w[p.__i]||v,p.__i=d,g=C(e,p,f,o,i,s,a,l,u,c),h=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&R(f.ref,null,p),c.push(p.ref,p.__c||h,p)),null==y&&null!=h&&(y=h),(b=!!(4&p.__u))||f.__k===p.__k?(l=I(p,l,e,b),b&&f.__e&&(f.__e=null)):"function"==typeof p.type&&void 0!==g?l=g:h&&(l=h.nextSibling),p.__u&=-7);return n.__e=y,l}function E(e,t,n,r,o){var i,s,a,l,u,c=n.length,d=c,f=0;for(e.__k=new Array(o),i=0;o>i;i++)null!=(s=t[i])&&"boolean"!=typeof s&&"function"!=typeof s?("string"==typeof s||"number"==typeof s||"bigint"==typeof s||s.constructor==String?s=e.__k[i]=k(null,s,null,null,null):g(s)?s=e.__k[i]=k(S,{children:s},null,null,null):void 0===s.constructor&&s.__b>0?s=e.__k[i]=k(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[i]=s,l=i+f,s.__=e,s.__b=e.__b+1,a=null,-1!=(u=s.__i=D(s,n,l,d))&&(d--,(a=n[u])&&(a.__u|=2)),null==a||null==a.__v?(-1==u&&(o>c?f--:c>o&&f++),"function"!=typeof s.type&&(s.__u|=4)):u!=l&&(u==l-1?f--:u==l+1?f++:(u>l?f--:f++,s.__u|=4))):e.__k[i]=null;if(d)for(i=0;c>i;i++)null!=(a=n[i])&&!(2&a.__u)&&(a.__e==r&&(r=$(a)),F(a,a));return r}function I(e,t,n,r){var o,i;if("function"==typeof e.type){for(o=e.__k,i=0;o&&o.length>i;i++)o[i]&&(o[i].__=e,t=I(o[i],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=$(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8==t.nodeType);return t}function D(e,t,n,r){var o,i,s,a=e.key,l=e.type,u=t[n],c=null!=u&&!(2&u.__u);if(null===u&&null==a||c&&a==u.key&&l==u.type)return n;if(r>(c?1:0))for(o=n-1,i=n+1;o>=0||t.length>i;)if(null!=(u=t[s=0>o?i++:o--])&&!(2&u.__u)&&a==u.key&&l==u.type)return s;return-1}function O(e,t,n){"-"==t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||y.test(t)?n:n+"px"}function N(e,t,n,r,o){var i,s;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||O(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||O(e.style,t,n[t])}else if("o"==t[0]&&"n"==t[1])i=t!=(t=t.replace(c,"$1")),s=t.toLowerCase(),t=s in e||"onFocusOut"==t||"onFocusIn"==t?s.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n[u]=r[u]:(n[u]=d,e.addEventListener(t,i?p:f,i)):e.removeEventListener(t,i?p:f,i);else{if("http://www.w3.org/2000/svg"==o)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&&"popover"!=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,"popover"==t&&1==n?"":n))}}function z(e){return function(n){if(this.l){var r=this.l[n.type+e];if(null==n[l])n[l]=d++;else if(r[u]>n[l])return;return r(t.event?t.event(n):n)}}}function C(e,n,r,o,i,s,a,l,u,c){var d,f,p,h,v,y,x,k,q,_,$,M,P,E,I,D,O=n.type;if(void 0!==n.constructor)return null;128&r.__u&&(u=!!(32&r.__u),s=[l=n.__e=r.__e]),(d=t.__b)&&d(n);e:if("function"==typeof O){f=a.length;try{if(q=n.props,_=O.prototype&&O.prototype.render,$=(d=O.contextType)&&o[d.__c],M=d?$?$.props.value:d.__:o,r.__c?k=(p=n.__c=r.__c).__=p.__E:(_?n.__c=p=new O(q,M):(n.__c=p=new T(q,M),p.constructor=O,p.render=U),$&&$.sub(p),p.state||(p.state={}),p.__n=o,h=p.__d=!0,p.__h=[],p._sb=[]),_&&null==p.__s&&(p.__s=p.state),_&&null!=O.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=b({},p.__s)),b(p.__s,O.getDerivedStateFromProps(q,p.__s))),v=p.props,y=p.state,p.__v=n,h)_&&null==O.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),_&&null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(_&&null==O.getDerivedStateFromProps&&q!==v&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(q,M),n.__v==r.__v||!p.__e&&null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(q,p.__s,M)){n.__v!=r.__v&&(p.props=q,p.state=p.__s,p.__d=!1),n.__e=r.__e,n.__k=r.__k,n.__k.some(function(e){e&&(e.__=n)}),m.push.apply(p.__h,p._sb),p._sb=[],p.__h.length&&a.push(p);break e}null!=p.componentWillUpdate&&p.componentWillUpdate(q,p.__s,M),_&&null!=p.componentDidUpdate&&p.__h.push(function(){p.componentDidUpdate(v,y,x)})}if(p.context=M,p.props=q,p.__P=e,p.__e=!1,P=t.__r,E=0,_)p.state=p.__s,p.__d=!1,P&&P(n),d=p.render(p.props,p.state,p.context),m.push.apply(p.__h,p._sb),p._sb=[];else do{p.__d=!1,P&&P(n),d=p.render(p.props,p.state,p.context),p.state=p.__s}while(p.__d&&25>++E);p.state=p.__s,null!=p.getChildContext&&(o=b(b({},o),p.getChildContext())),_&&!h&&null!=p.getSnapshotBeforeUpdate&&(x=p.getSnapshotBeforeUpdate(v,y)),I=null!=d&&d.type===S&&null==d.key?B(d.props.children):d,l=A(e,g(I)?I:[I],n,r,o,i,s,a,l,u,c),p.base=n.__e,n.__u&=-161,p.__h.length&&a.push(p),k&&(p.__E=p.__=null)}catch(e){if(a.length=f,n.__v=null,u||null!=s)if(e.then){for(n.__u|=u?160:128;l&&8==l.nodeType&&l.nextSibling;)l=l.nextSibling;null!=s&&(s[s.indexOf(l)]=null),n.__e=l}else{if(null!=s)for(D=s.length;D--;)w(s[D]);L(n)}else n.__e=r.__e,!n.__k&&r.__k&&(n.__k=r.__k),e.then||L(n);t.__e(e,n,r)}}else null==s&&n.__v==r.__v?(n.__k=r.__k,n.__e=r.__e):l=n.__e=H(r.__e,n,r,o,i,s,a,u,c);return(d=t.diffed)&&d(n),128&n.__u?void 0:l}function L(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(L))}function j(e,n,r){for(var o=0;r.length>o;o++)R(r[o],r[++o],r[++o]);t.__c&&t.__c(n,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(e){e.call(n)})}catch(e){t.__e(e,n.__v)}})}function B(e){return"object"!=typeof e||null==e||e.__b>0?e:g(e)?e.map(B):void 0!==e.constructor?null:b({},e)}function H(n,r,o,i,s,a,l,u,c){var d,f,p,h,m,y,b,x=o.props||v,k=r.props,S=r.type;if("svg"==S?s="http://www.w3.org/2000/svg":"math"==S?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),null!=a)for(d=0;a.length>d;d++)if((m=a[d])&&"setAttribute"in m==!!S&&(S?m.localName==S:3==m.nodeType)){n=m,a[d]=null;break}if(null==n){if(null==S)return document.createTextNode(k);n=document.createElementNS(s,S,k.is&&k),u&&(t.__m&&t.__m(r,a),u=!1),a=null}if(null==S)x===k||u&&n.data==k||(n.data=k);else{if(a="textarea"==S&&null!=k.defaultValue?null:a&&e.call(n.childNodes),!u&&null!=a)for(x={},d=0;n.attributes.length>d;d++)x[(m=n.attributes[d]).name]=m.value;for(d in x)m=x[d],"dangerouslySetInnerHTML"==d?p=m:"children"==d||d in k||"value"==d&&"defaultValue"in k||"checked"==d&&"defaultChecked"in k||N(n,d,null,m,s);for(d in k)m=k[d],"children"==d?h=m:"dangerouslySetInnerHTML"==d?f=m:"value"==d?y=m:"checked"==d?b=m:u&&"function"!=typeof m||x[d]===m||N(n,d,m,x[d],s);if(f)u||p&&(f.__html==p.__html||f.__html==n.innerHTML)||(n.innerHTML=f.__html),r.__k=[];else if(p&&(n.innerHTML=""),A("template"==r.type?n.content:n,g(h)?h:[h],r,o,i,"foreignObject"==S?"http://www.w3.org/1999/xhtml":s,a,l,a?a[0]:o.__k&&$(o,0),u,c),null!=a)for(d=a.length;d--;)w(a[d]);u&&"textarea"!=S||(d="value","progress"==S&&null==y?n.removeAttribute("value"):null!=y&&(y!==n[d]||"progress"==S&&!y||"option"==S&&y!=x[d])&&N(n,d,y,x[d],s),d="checked",null!=b&&b!=n[d]&&N(n,d,b,x[d],s))}return n}function R(e,n,r){try{if("function"==typeof e){var o="function"==typeof e.__u;o&&e.__u(),o&&null==n||(e.__u=e(n))}else e.current=n}catch(e){t.__e(e,r)}}function F(e,n,r){var o,i;if(t.unmount&&t.unmount(e),(o=e.ref)&&(o.current&&o.current!=e.__e||R(o,null,n)),null!=(o=e.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(e){t.__e(e,n)}o.base=o.__P=o.__n=null}if(o=e.__k)for(i=0;o.length>i;i++)o[i]&&F(o[i],n,r||"function"!=typeof e.type);r||w(e.__e),e.__c=e.__=e.__e=void 0}function U(e,t,n){return this.constructor(e,n)}function V(n,r,o){var i,s,a,l;r==document&&(r=document.documentElement),t.__&&t.__(n,r),s=(i="function"==typeof o)?null:o&&o.__k||r.__k,a=[],l=[],C(r,n=(!i&&o||r).__k=x(S,null,[n]),s||v,v,r.namespaceURI,!i&&o?[o]:s?null:r.firstChild?e.call(r.childNodes):null,a,!i&&o?o:s?s.__e:r.firstChild,i,l),j(a,n,l),n.props.children=null}e=m.slice,t={__e(e,t,n,r){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(t){e=t}throw e}},n=0,T.prototype.setState=function(e,t){var n=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=b({},this.state);"function"==typeof e&&(e=e(b({},n),this.props)),e&&b(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),M(this))},T.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),M(this))},T.prototype.render=S,r=[],i="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,s=function(e,t){return e.__v.__b-t.__v.__b},P.__r=0,a=Math.random().toString(8),l="__d"+a,u="__a"+a,c=/(PointerCapture)$|Capture$/i,d=0,f=z(!1),p=z(!0),h=0;var G=0;function Q(e,n,r,o,i,s){n||(n={});var a,l,u=n;if("ref"in u)for(l in u={},n)"ref"==l?a=n[l]:u[l]=n[l];var c={type:e,props:u,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--G,__i:-1,__u:0,__source:i,__self:s};if("function"==typeof e&&(a=e.defaultProps))for(l in a)void 0===u[l]&&(u[l]=a[l]);return t.vnode&&t.vnode(c),c}function Z({client:e,config:t}){var n;if(!e||!t.uiHost)return;const r=null===(n=e.session)||void 0===n?void 0:n.sessionId;return r?`${t.uiHost}/project/${e.projectToken}/replay/${r}`:void 0}var W=function(e){return e.GZipJS="gzip-js",e.Base64="base64",e}({});const Y="min_length",K="max_length",J=Object.prototype,X=J.hasOwnProperty,ee=J.toString,te=Array.isArray||function(e){return"[object Array]"===ee.call(e)},ne=e=>"function"==typeof e,re=e=>void 0===e,oe=e=>"[object String]"==ee.call(e),ie=e=>null===e,se=e=>re(e)||ie(e),ae=e=>"[object Number]"==ee.call(e)&&e==e;function le(e,t,n,r,o,i,s){try{var a=e[i](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,o)}function ue(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function s(e){le(i,r,o,s,a,"next",e)}function a(e){le(i,r,o,s,a,"throw",e)}s(void 0)})}}function ce(e){return ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ce(e)}function de(e,t,n){return(t=function(e){var t=function(e){if("object"!=ce(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ce(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ce(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function pe(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fe(Object(n),!0).forEach(function(t){de(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fe(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}let he;const ve=e=>{throw function(e,t){const n=new Error(t);try{Object.defineProperty(n,"name",{value:"NativeGzipValidationError",writable:!0,enumerable:!0,configurable:!0})}catch(e){}return n}(0,`Native gzip produced invalid output: ${e}`)};let me=0,ye=!1;const ge=function(){var e=ue(function*(e,t){18>e.size&&ve("too-short");const n=new Uint8Array(yield e.slice(0,10).arrayBuffer());var r;(2>(r=n).length||31!==r[0]||139!==r[1]||8!==n[2])&&ve("invalid-header");const o=new DataView(yield e.slice(e.size-8).arrayBuffer()),i=t.length>>>0;o.getUint32(4,!0)!==i&&ve("invalid-size"),(ye||3>me)&&(o.getUint32(0,!0)!==(e=>{const t=(()=>{if(he)return he;he=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)t=1&t?3988292384^t>>>1:t>>>1;he[e]=t>>>0}return he})();let n=4294967295;for(let r=0;e.length>r;r++)n=t[255&(n^e[r])]^n>>>8;return(4294967295^n)>>>0})(t)&&(ye=!0,ve("invalid-crc")),me++)});return function(t,n){return e.apply(this,arguments)}}();function be(){return be=ue(function*(e,t=!0,n){try{const t=(new TextEncoder).encode(e),n=new globalThis.CompressionStream("gzip"),o=n.writable.getWriter(),i=o.write(t).then(()=>o.close()).catch((r=ue(function*(e){try{yield o.abort(e)}catch(e){}throw e}),function(e){return r.apply(this,arguments)})),s=new Response(n.readable).blob(),[a]=yield Promise.all([s,i]);return yield ge(a,t),a}catch(e){if(null==n?void 0:n.rethrow)throw e;return t&&console.error("Failed to gzip compress data",e),null}var r}),be.apply(this,arguments)}function we(e,t){if(!e)return;const n=e.find(e=>e.type===t);return null==n?void 0:n.value}var xe=class e{constructor(e){if(this.bytes=e,16!==e.length)throw new TypeError("not 128-bit length")}static fromFieldsV7(t,n,r,o){if(!Number.isInteger(t)||!Number.isInteger(n)||!Number.isInteger(r)||!Number.isInteger(o)||0>t||0>n||0>r||0>o||t>0xffffffffffff||n>4095||r>1073741823||o>4294967295)throw new RangeError("invalid field value");const i=new Uint8Array(16);return i[0]=t/Math.pow(2,40),i[1]=t/Math.pow(2,32),i[2]=t/Math.pow(2,24),i[3]=t/Math.pow(2,16),i[4]=t/256,i[5]=t,i[6]=112|n>>>8,i[7]=n,i[8]=128|r>>>24,i[9]=r>>>16,i[10]=r>>>8,i[11]=r,i[12]=o>>>24,i[13]=o>>>16,i[14]=o>>>8,i[15]=o,new e(i)}toString(){let e="";for(let t=0;this.bytes.length>t;t++)e=e+(this.bytes[t]>>>4).toString(16)+(15&this.bytes[t]).toString(16),3!==t&&5!==t&&7!==t&&9!==t||(e+="-");if(36!==e.length)throw new Error("Invalid UUIDv7 was generated");return e}clone(){return new e(this.bytes.slice(0))}equals(e){return 0===this.compareTo(e)}compareTo(e){for(let t=0;16>t;t++){const n=this.bytes[t]-e.bytes[t];if(0!==n)return Math.sign(n)}return 0}},ke=class{generate(){const e=this.generateOrAbort();if(!re(e))return e;{this.Mt=0;const e=this.generateOrAbort();if(re(e))throw new Error("Could not generate UUID after timestamp reset");return e}}generateOrAbort(){const e=(()=>{const e=Date.now();return ae(e)&&isFinite(e)?Math.min(Math.max(Math.floor(e),0),0xffffffffffff):0})();if(e>this.Mt)this.Mt=e,this.Tt();else{if(this.Mt>=e+1e4)return;this.It++,this.It>4398046511103&&(this.Mt++,this.Tt())}return xe.fromFieldsV7(this.Mt,Math.trunc(this.It/Math.pow(2,30)),this.It&Math.pow(2,30)-1,this.At.nextUint32())}Tt(){this.It=1024*this.At.nextUint32()+(1023&this.At.nextUint32())}constructor(){this.Mt=0,this.It=0,this.At=new qe}};const Se=e=>{if("u">typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(let t=0;e.length>t;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};let Te;var qe=class{nextUint32(){var e;return this.Rt.length>this.Et||((null!==(e=Te)&&void 0!==e?e:Te="u">typeof window&&!re(window.crypto)&&crypto.getRandomValues?e=>{try{return crypto.getRandomValues(e)}catch(t){return Se(e)}}:Se)(this.Rt),this.Et=0),this.Rt[this.Et++]}constructor(){this.Rt=new Uint32Array(8),this.Et=1/0}};let _e;var Me,Pe,Ae,Ee,Ie=0,De=[],Oe=t,Ne=Oe.__b,$e=Oe.__r,ze=Oe.diffed,Ce=Oe.__c,Le=Oe.unmount,je=Oe.__;function Be(e,t){Oe.__h&&Oe.__h(Pe,e,Ie||t),Ie=0;var n=Pe.__H||(Pe.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function He(e){return Ie=1,function(e,t){var n=Be(Me++,2);if(n.t=e,!n.__c&&(n.__=[Je(void 0,t),function(e){var t=n.__N?n.__N[0]:n.__[0],r=n.t(t,e);t!==r&&(n.__N=[r,n.__[1]],n.__c.setState({}))}],n.__c=Pe,!Pe.__f)){var r=function(e,t,r){if(!n.__c.__H)return!0;var i=!1,s=n.__c.props!==e;if(n.__c.__H.__.some(function(e){if(e.__N){i=!0;var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(s=!0)}}),o){var a=o.call(this,e,t,r);return i?a||s:a}return!i||s};Pe.__f=!0;var o=Pe.shouldComponentUpdate,i=Pe.componentWillUpdate;Pe.componentWillUpdate=function(e,t,n){if(this.__e){var s=o;o=void 0,r(e,t,n),o=s}i&&i.call(this,e,t,n)},Pe.shouldComponentUpdate=r}return n.__N||n.__}(Je,e)}function Re(e,t){var n=Be(Me++,3);!Oe.__s&&Ke(n.__H,t)&&(n.__=e,n.u=t,Pe.__H.__h.push(n))}function Fe(e){return Ie=5,Ue(function(){return{current:e}},[])}function Ue(e,t){var n=Be(Me++,7);return Ke(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Ve(e){var t=Pe.context[e.__c],n=Be(Me++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(Pe)),t.props.value):e.__}function Ge(){for(var e;e=De.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(We),t.__h.some(Ye),t.__h=[]}catch(n){t.__h=[],Oe.__e(n,e.__v)}}}Oe.__b=function(e){Pe=null,Ne&&Ne(e)},Oe.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),je&&je(e,t)},Oe.__r=function(e){$e&&$e(e),Me=0;var t=(Pe=e.__c).__H;t&&(Ae===Pe?(t.__h=[],Pe.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.length&&Ge(),Me=0)),Ae=Pe},Oe.diffed=function(e){ze&&ze(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==De.push(t)&&Ee===Oe.requestAnimationFrame||((Ee=Oe.requestAnimationFrame)||Ze)(Ge)),t.__H.__.some(function(e){e.u&&(e.__H=e.u,e.u=void 0)})),Ae=Pe=null},Oe.__c=function(e,t){t.some(function(e){try{e.__h.some(We),e.__h=e.__h.filter(function(e){return!e.__||Ye(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],Oe.__e(n,e.__v)}}),Ce&&Ce(e,t)},Oe.unmount=function(e){Le&&Le(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{We(e)}catch(e){t=e}}),n.__H=void 0,t&&Oe.__e(t,n.__v))};var Qe="function"==typeof requestAnimationFrame;function Ze(e){var t,n=function(){clearTimeout(r),Qe&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Qe&&(t=requestAnimationFrame(n))}function We(e){var t=Pe,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),Pe=t}function Ye(e){var t=Pe;e.__c=e.__(),Pe=t}function Ke(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function Je(e,t){return"function"==typeof t?t(e):t}const Xe="tab",et="left",tt="center",nt="right",rt="widget",ot="external_survey",it="open",st="multiple_choice",at="single_choice",lt="rating",ut="end",ct="survey shown",dt="survey dismissed",ft="survey sent",pt="$survey_id",ht="$survey_name",vt="$survey_iteration",mt="$survey_iteration_start_date",yt="$survey_language",gt="0.14.1",bt={DEBUG:!1,LIB_VERSION:gt,LIB_NAME:"browser-common",JS_SDK_VERSION:gt},wt=(e,{debugEnabled:t}={})=>{const n={N(n,...r){let o;try{o=typeof window>"u"?void 0:window}catch(e){return}o&&(bt.DEBUG||o.POSTHOG_DEBUG||t)&&!re(o.console)&&o.console&&("__rrweb_original__"in o.console[n]?o.console[n].__rrweb_original__:o.console[n])(e,...r)},debug(...e){n.N("debug",...e)},info(...e){n.N("log",...e)},warn(...e){n.N("warn",...e)},error(...e){n.N("error",...e)},critical(...t){console.error(e,...t)},uninitializedWarning(e){n.error(`You must initialize PostHog before calling ${e}`)},createLogger:(t,n)=>wt(`${e} ${t}`,n)};return n},xt=wt("[PostHog.js]"),kt=(e,t)=>xt.createLogger(e,t);function St(e,t,n,r){const{capture:o=!1,passive:i=!0}=null!=r?r:{};null==e||e.addEventListener(t,n,{capture:o,passive:i})}function Tt(e){return`$survey_response_${e}`}function qt(e,t){if(!t)return null;const n=e[Tt(t)];return te(n)?[...n]:n}function _t({event:e,survey:t,responses:n={},submissionId:r,completed:o,surveyLanguage:i,questionSnapshots:s}){return pe(pe(pe(pe({},!re(r)&&{$survey_submission_id:r}),"sent"===e?!re(o)&&{$survey_completed:o}:{$survey_partially_completed:Mt(n)}),i&&{$survey_language:i}),function(e={},t,n){const r={};return t.questions.forEach(t=>{if(re(t.originalQuestionIndex))return;const n=0===(o=t.originalQuestionIndex)?"$survey_response":`$survey_response_${o}`;var o;const i=qt(e,t.id);re(i)||(r[n]=i)}),pe(pe({$survey_questions:t.questions.map(t=>{var r,o;return{id:t.id,question:null!==(r=null==n?void 0:n[null!==(o=t.id)&&void 0!==o?o:""])&&void 0!==r?r:t.question,response:qt(e,t.id)}})},e),r)}(n,t,s))}function Mt(e={}){return Object.values(e).some(e=>!se(e))}function Pt(e,t){let n=`$survey_${t}/${e.id}`;return e.current_iteration&&e.current_iteration>0&&(n=`$survey_${t}/${e.id}/${e.current_iteration}`),n}const At=(e,t)=>{if(!(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}},Et=e=>e.toLowerCase(),It={exact:(e,t)=>t.some(t=>e.some(e=>t===e)),is_not:(e,t)=>t.every(t=>e.every(e=>t!==e)),regex:(e,t)=>t.some(t=>e.some(e=>At(t,e))),not_regex:(e,t)=>t.every(t=>e.every(e=>!At(t,e))),icontains:(e,t)=>t.map(Et).some(t=>e.map(Et).some(e=>t.includes(e))),not_icontains:(e,t)=>t.map(Et).every(t=>e.map(Et).every(e=>!t.includes(e))),gt:(e,t)=>t.some(t=>{const n=parseFloat(t);return!isNaN(n)&&e.some(e=>n>parseFloat(e))}),lt:(e,t)=>t.some(t=>{const n=parseFloat(t);return!isNaN(n)&&e.some(e=>n<parseFloat(e))})},Dt=e=>{const t=[...e];for(let e=t.length-1;e>0;e--){const n=Math.floor(Math.random()*(e+1));[t[e],t[n]]=[t[n],t[e]]}return t},Ot=kt("[Surveys]"),Nt=(e,t)=>`${e}${function(e){return e.current_iteration&&e.current_iteration>0?`${e.id}_${e.current_iteration}`:e.id}(t)}`;function $t(e,t){this.v=e,this.k=t}function zt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);t>n;n++)r[n]=e[n];return r}function Ct(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,s,a=[],l=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return zt(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)?zt(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Lt(e){var t,n;function r(t,n){try{var i=e[t](n),s=i.value,a=s instanceof $t;Promise.resolve(a?s.v:s).then(function(n){if(a){var l="return"===t&&s.k?t:"next";if(!s.k||n.done)return r(l,n);n=e[l](n).value}o(!!i.done,n)},function(e){r("throw",e)})}catch(e){o(2,e)}}function o(e,o){2===e?t.reject(o):t.resolve({value:o,done:e}),(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,o){return new Promise(function(i,s){var a={key:e,arg:o,resolve:i,reject:s,next:null};n?n=n.next=a:(t=n=a,r(e,o))})},"function"!=typeof e.return&&(this.return=void 0)}Lt.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},Lt.prototype.next=function(e){return this._invoke("next",e)},Lt.prototype.throw=function(e){return this._invoke("throw",e)},Lt.prototype.return=function(e){return this._invoke("return",e)};const jt=Object.entries,Bt=Object.keys,Ht=Object.setPrototypeOf,Rt=Object.isFrozen,Ft=Object.getPrototypeOf,Ut=Object.getOwnPropertyDescriptor;let Vt=Object.freeze,Gt=Object.seal,Qt=Object.create,Zt="undefined"!=typeof Reflect&&Reflect,Wt=Zt.apply,Yt=Zt.construct;Vt||(Vt=function(e){return e}),Gt||(Gt=function(e){return e}),Wt||(Wt=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;n>o;o++)r[o-2]=arguments[o];return e.apply(t,r)}),Yt||(Yt=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;t>r;r++)n[r-1]=arguments[r];return new e(...n)});const Kt=Sn([].forEach),Jt=Sn([].lastIndexOf),Xt=Sn([].pop),en=Sn([].push),tn=Sn([].slice),nn=Sn([].splice),rn=Array.isArray,on=Tn(Set),sn=Sn(Set.prototype.add),an=Sn(Set.prototype.has),ln=Sn("".toLowerCase),un=Sn("".toString),cn=Sn("".match),dn=Sn("".replace),fn=Sn("".indexOf),pn=Sn("".trim),hn=Sn((0).toString),vn=Sn(Boolean.prototype.toString),mn="undefined"==typeof BigInt?null:Sn(BigInt.prototype.toString),yn="undefined"==typeof Symbol?null:Sn(Symbol.prototype.toString),gn=Sn({}.hasOwnProperty),bn=Sn({}.toString),wn=/t/.test,xn=function(e,t){return e instanceof RegExp&&(e.lastIndex=0),Wt(wn,e,[t])},kn=Tn(TypeError);function Sn(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;n>o;o++)r[o-1]=arguments[o];return Wt(e,t,r)}}function Tn(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;t>r;r++)n[r]=arguments[r];return Yt(e,n)}}function qn(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ln;if(Ht&&Ht(e,null),!rn(t))return e;let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(Rt(t)||(t[r]=e),o=e)}e[o]=!0}return e}function _n(e){for(let t=0;e.length>t;t++)gn(e,t)||(e[t]=null);return e}function Mn(e){const t=Qt(null);for(const r of jt(e)){var n=Ct(r,2);const o=n[0],i=n[1];gn(e,o)&&(t[o]=rn(i)?_n(i):i&&"object"==typeof i&&i.constructor===Object?Mn(i):i)}return t}function Pn(e){const t=Qt(null),n=Bt(e);let r=n.length;for(;r--;)t[n[r]]=e[n[r]];return t}function An(e,t){for(;null!==e;){const n=Ut(e,t);if(n){if(n.get)return Sn(n.get);if("function"==typeof n.value)return Sn(n.value)}e=Ft(e)}return function(){return null}}const En=Vt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),In=Vt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Dn=Vt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),On=Vt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Nn=Vt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),$n=Vt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),zn=Vt(["#text"]),Cn=Vt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Ln=Vt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),jn=Vt(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Bn=Vt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Hn=Gt(/{{[\w\W]*|^[\w\W]*}}/g),Rn=Gt(/<%[\w\W]*|^[\w\W]*%>/g),Fn=Gt(/\${[\w\W]*/g),Un=Gt(/{{|}}|\${|<%|%>|<%|%>/),Vn=Gt(/^data-[\-\w.\u00B7-\uFFFF]+$/),Gn=Gt(/^aria-[\-\w]+$/),Qn=Gt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Zn=Gt(/^(?:\w+script|data):/i),Wn=Gt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Yn=Gt(/^html$/i),Kn=Gt(/^[a-z][.\w]*(-[.\w]+)+$/i),Jn=Gt(/<[/\w!]/g),Xn=Gt(/<[/\w]/g),er=Gt(/<\/no(script|embed|frames)/i),tr=Gt(/\/>/i),nr=Gt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i),rr=Gt(/^[\r\n\t ]+/),or=Vt(qn({},["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"])),ir=function(){return"undefined"==typeof window?null:window},sr=function(e,t,n,r){return gn(e,t)&&rn(e[t])?qn(r.base?Pn(r.base):{},e[t],r.transform):n},ar=function(e,t,n){const r=gn(e,t)?e[t]:void 0;return r&&"object"==typeof r?Mn(r):n};var lr=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ir();const n=t=>e(t);if(n.version="3.4.18",n.removed=[],!t||!t.document||9!==t.document.nodeType||!t.Element)return n.isSupported=!1,n;let r=t.document;const o=r,i=o.currentScript,s=t.HTMLTemplateElement,a=t.Node,l=t.NodeFilter,u=t.DOMParser,c=t.trustedTypes,d=t.Element.prototype,f=An(d,"cloneNode"),p=An(d,"remove"),h=An(d,"removeAttributeNode"),v=An(d,"nextSibling"),m=An(d,"childNodes"),y=An(d,"parentNode"),g=An(d,"shadowRoot"),b=An(d,"attributes"),w=a&&a.prototype?An(a.prototype,"nodeType"):null,x=a&&a.prototype?An(a.prototype,"nodeName"):null,k=a&&a.prototype?An(a.prototype,"ownerDocument"):null,S=function(e){return w?w(e):e.nodeType},T=function(e){return x?x(e):e.nodeName},q=function(e){for(;null!==e;){const t=Ut(e,"namespaceURI");if(t)return t.get?Sn(t.get):null;e=Ft(e)}return null}(d),_=function(e){return q?q(e):e.namespaceURI};if("function"==typeof s){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let M,P,A="",E=!1,I=0;const D=function(){if(I>0)throw kn('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},O=function(e){D(),I++;try{return M.createHTML(e)}finally{I--}},N=function(e){return M&&ge?O(e):e},z=r.implementation,C=r.createNodeIterator,L=r.createDocumentFragment,j=r.getElementsByTagName,B=o.importNode;let H={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof jt&&"function"==typeof y&&z&&void 0!==z.createHTMLDocument;const R=Hn,F=Rn,U=Fn,V=Vn,G=Gn,Q=Zn,Z=Wn,W=Kn;let Y=Qn,K=null;const J=qn({},[...En,...In,...Dn,...Nn,...zn]);let X=null;const ee=qn({},[...Cn,...Ln,...jn,...Bn]);let te=null,ne=null,re=null;const oe=Object.seal(Qt(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ie=!0,se=!0,ae=!1,le=!0,ue=!1,ce=!0,de=!1,fe=!1,pe=null,he=null,ve=!1,me=!1,ye=!1,ge=!1,be=!0,we=!1;const xe="user-content-";let ke=!0,Se=!1,Te=null,qe=!1,_e=null;const Me=qn({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Pe=null;const Ae=qn({},["audio","video","img","source","image","track"]);let Ee=null;const Ie=qn({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),De="http://www.w3.org/1998/Math/MathML",Oe="http://www.w3.org/2000/svg",Ne="http://www.w3.org/1999/xhtml";let $e=Ne,ze=!1,Ce=null;const Le=qn({},[De,Oe,Ne],un),je=Vt(qn({},["mi","mo","mn","ms","mtext"]));let Be=null;const He=Vt(qn({},["annotation-xml"]));let Re=null;const Fe=Vt(Qt(null)),Ue=qn({},["title","style","font","a","script"]);let Ve=null;const Ge=["application/xhtml+xml","text/html"];let Qe=null,Ze=null;const We=r.createElement("form"),Ye=function(e){return e instanceof RegExp||e instanceof Function},Ke=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e&&"object"==typeof e||(e={}),e=Mn(e),Ve=-1===Ge.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Qe="application/xhtml+xml"===Ve?un:ln,K=sr(e,"ALLOWED_TAGS",J,{transform:Qe}),X=sr(e,"ALLOWED_ATTR",ee,{transform:Qe}),Ce=sr(e,"ALLOWED_NAMESPACES",Le,{transform:un}),Ee=sr(e,"ADD_URI_SAFE_ATTR",Ie,{transform:Qe,base:Ie}),Pe=sr(e,"ADD_DATA_URI_TAGS",Ae,{transform:Qe,base:Ae}),_e=sr(e,"FORBID_CONTENTS",Me,{transform:Qe}),ne=sr(e,"FORBID_TAGS",Qt(null),{transform:Qe}),re=sr(e,"FORBID_ATTR",Qt(null),{transform:Qe}),qe=!!gn(e,"USE_PROFILES")&&(e.USE_PROFILES&&"object"==typeof e.USE_PROFILES?Mn(e.USE_PROFILES):e.USE_PROFILES),ie=!1!==e.ALLOW_ARIA_ATTR,se=!1!==e.ALLOW_DATA_ATTR,ae=e.ALLOW_UNKNOWN_PROTOCOLS||!1,le=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,ue=e.SAFE_FOR_TEMPLATES||!1,ce=!1!==e.SAFE_FOR_XML,de=e.WHOLE_DOCUMENT||!1,me=e.RETURN_DOM||!1,ye=e.RETURN_DOM_FRAGMENT||!1,ge=e.RETURN_TRUSTED_TYPE||!1,ve=e.FORCE_BODY||!1,be=!1!==e.SANITIZE_DOM,we=e.SANITIZE_NAMED_PROPS||!1,ke=!1!==e.KEEP_CONTENT,Se=e.IN_PLACE||!1,Y=function(e){if(!e)return!1;try{return xn(e,""),!0}catch(e){return!1}}(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Qn,$e="string"==typeof e.NAMESPACE?e.NAMESPACE:Ne,Be=ar(e,"MATHML_TEXT_INTEGRATION_POINTS",je),Re=ar(e,"HTML_INTEGRATION_POINTS",He);const t=ar(e,"CUSTOM_ELEMENT_HANDLING",Fe);if(te=Qt(null),gn(t,"tagNameCheck")&&Ye(t.tagNameCheck)&&(te.tagNameCheck=t.tagNameCheck),gn(t,"attributeNameCheck")&&Ye(t.attributeNameCheck)&&(te.attributeNameCheck=t.attributeNameCheck),gn(t,"allowCustomizedBuiltInElements")&&"boolean"==typeof t.allowCustomizedBuiltInElements&&(te.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),Gt(te),ue&&(se=!1),ye&&(me=!0),qe&&((gn(e,"ALLOWED_TAGS")||gn(e,"ALLOWED_ATTR"))&&"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn("DOMPurify: USE_PROFILES overrides ALLOWED_TAGS and ALLOWED_ATTR. Do not use these options together."),K=qn({},zn),X=Qt(null),!0===qe.html&&(qn(K,En),qn(X,Cn)),!0===qe.svg&&(qn(K,In),qn(X,Ln),qn(X,Bn)),!0===qe.svgFilters&&(qn(K,Dn),qn(X,Ln),qn(X,Bn)),!0===qe.mathMl&&(qn(K,Nn),qn(X,jn),qn(X,Bn))),oe.tagCheck=null,oe.attributeCheck=null,gn(e,"ADD_TAGS")&&("function"==typeof e.ADD_TAGS?oe.tagCheck=e.ADD_TAGS:rn(e.ADD_TAGS)&&(K===J&&(K=Pn(K)),qn(K,e.ADD_TAGS,Qe))),gn(e,"ADD_ATTR")&&("function"==typeof e.ADD_ATTR?oe.attributeCheck=e.ADD_ATTR:rn(e.ADD_ATTR)&&(X===ee&&(X=Pn(X)),qn(X,e.ADD_ATTR,Qe))),gn(e,"ADD_FORBID_CONTENTS")&&rn(e.ADD_FORBID_CONTENTS)&&(_e===Me&&(_e=Pn(_e)),qn(_e,e.ADD_FORBID_CONTENTS,Qe)),ke&&(K["#text"]=!0),de&&qn(K,["html","head","body"]),K.table&&(K.tbody=!0,delete ne.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw kn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw kn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const t=M;M=e.TRUSTED_TYPES_POLICY;try{A=O("")}catch(e){throw M=t,e}}else null===e.TRUSTED_TYPES_POLICY?(M=void 0,A=""):(void 0===M&&(E||(P=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(c,i),E=!0),M=P),M&&"string"==typeof A&&(A=O("")));Ze=Vt(e)},Je=qn({},[...In,...Dn,...On]),Xe=qn({},[...Nn,...$n]),et=function(e){en(n.removed,{element:e});try{y(e).removeChild(e)}catch(t){if(p(e),!y(e))throw kn("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},tt=function(e,t,n){try{h(e,t)}catch(t){try{e.removeAttribute(n)}catch(e){}}},nt=function(e){st(e);const t=m(e);t&&Kt(tn(t),e=>{try{p(e)}catch(e){}}),1===S(e)&&ot(e,!1)},rt=function(e,t,r){if(!r)try{r=t.getAttributeNode(e)}catch(e){r=null}if(en(n.removed,{attribute:r||null,from:t}),r)tt(t,r,e);else try{t.removeAttribute(e)}catch(e){}if("is"===e)if(me||ye)try{et(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},ot=function(e,t){const n=b(e);if(n)for(let r=n.length-1;r>=0;--r){const o=n[r],i=o&&o.name;"string"!=typeof i||t&&X[Qe(i)]||tt(e,o,i)}},it=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=[e];for(;r.length>0;){const e=r.pop();if(!1===t(e))continue;if(n&&1===S(e)){const t=g(e);gt(t)&&r.push(t)}const o=m(e);if(o)for(let e=o.length-1;e>=0;--e)r.push(o[e])}},st=function(e){it(e,e=>{1===S(e)&&ot(e,!0)})},at=function(e){const t=[];return it(e,e=>{t.push(e)},!0),t},lt=function(e,t){let r=!1;return Kt(n.removed,t=>{t.element&&(r=r||t.element===e,st(t.element))}),function(e,t){const n=on();Kt(at(e),e=>{1===S(e)&&sn(n,e)}),Kt(t,e=>{1!==S(e)||an(n,e)||ot(e,!0)})}(e,t),r},ut=function(e,t,n,r){const o=ft(e);let i;for(;i=o.nextNode();)an(r,i)&&!an(Te,i)&&(t&&wt(H.uponSanitizeShadowNode,i,null),It(i,n))},ct=function(e,t){return!!ce&&("patchsrc"===e||"for"===e&&"label"!==t&&"output"!==t)},dt=function(e){let t=null,n=null;if(ve)e="<remove></remove>"+e;else{const t=cn(e,rr);n=t&&t[0]}"application/xhtml+xml"===Ve&&$e===Ne&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=M?O(e):e;if($e===Ne)try{t=(new u).parseFromString(o,Ve)}catch(e){}if(!t||!t.documentElement){t=z.createDocument($e,"template",null);try{t.documentElement.innerHTML=ze?A:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),$e===Ne?j.call(t,de?"html":"body")[0]:de?t.documentElement:i},ft=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=k?k(e):e.ownerDocument;return C.call(n||e,e,(t?0:l.SHOW_ELEMENT)|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},pt=function(e){return e=dn(e,R," "),e=dn(e,F," "),dn(e,U," ")},ht=function(e){var t;vt(e);const n=null===(t=e.querySelectorAll)||void 0===t?void 0:t.call(e,"template");n&&Kt(n,e=>{gt(e.content)&&ht(e.content)})},vt=function(e){e.normalize();const t=ft(e,!0);let n=t.nextNode();for(;n;)n.data=pt(n.data),n=t.nextNode()},mt=function(e){const t=x?x(e):null;return"string"==typeof t&&"form"===Qe(t)&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||e.attributes!==b(e)||"function"!=typeof e.removeAttribute||"function"!=typeof e.removeAttributeNode||"function"!=typeof e.getAttributeNode||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes||e.nodeType!==w(e)||e.childNodes!==m(e))},yt=function(e){if(!w||"object"!=typeof e||null===e)return null;try{const t=w(e);return"number"==typeof t?t:null}catch(e){return null}},gt=function(e){return 11===yt(e)},bt=function(e){return null!==yt(e)};function wt(e,t,r){0!==e.length&&Kt(e,e=>{e.call(n,t,r,Ze)})}const xt=function(e,t){if(e instanceof RegExp)return xn(e,t);if(e instanceof Function){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;n>o;o++)r[o-2]=arguments[o];return Boolean(e(t,...r))}return!1},kt=function(e,t,n,r){return 0===e.length?t:t===n||t===r?Pn(t):t},St=function(e,t){return e!==t&&null===y(e)&&(Se&&st(e),!0)},Tt=function(e,t){if(Te&&sn(Te,e),wt(H.beforeSanitizeElements,e,null),St(e,t))return!0;if(mt(e))return et(e),!0;const r=Qe(T(e)),o=S(e);if(K=kt(H.uponSanitizeElement,K,J,pe),wt(H.uponSanitizeElement,e,{tagName:r,allowedTags:K}),St(e,t))return!0;if(function(e,t,n){return!!(ce&&1===n&&e.hasChildNodes()&&!bt(e.firstElementChild)&&xn(Jn,e.textContent)&&xn(Jn,e.innerHTML))||!!(ce&&or[t]&&1===n&&_(e)===Ne&&(bt(e.firstElementChild)||"string"==typeof e.textContent&&xn(Jn,e.textContent)))||7===n||!(!ce||8!==n||!xn(Xn,e.data))}(e,r,o))return et(e),!0;if(ne[r]||!(oe.tagCheck instanceof Function&&oe.tagCheck(r))&&!K[r]){const n=function(e,t,n){if(!ne[t]&&Mt(t)&&xt(te.tagNameCheck,t))return!1;if(ke&&!_e[t]&&!_e[ln(t)]){const t=y(e),r=m(e);if(r&&t)for(let o=r.length-1;o>=0;--o){const i=e===n?f(r[o],!0):r[o];t.insertBefore(i,v(e))}}return et(e),!0}(e,r,t);return!(!1!==n||(wt(H.afterSanitizeElements,e,null),!St(e,t)))||n}if(1===o&&!function(e){const t=_(e),n=ln(T(e)),r=y(e);let o=$e,i="template";return r&&1===S(r)&&(o=_(r),i=ln(T(r))),!!Ce[t]&&(t===Oe?function(e,t,n){return t===Ne?"svg"===e:t===De?"svg"===e&&("annotation-xml"===n||Be[n]):Boolean(Je[e])}(n,o,i):t===De?function(e,t,n){return t===Ne?"math"===e:t===Oe?"math"===e&&Re[n]:Boolean(Xe[e])}(n,o,i):t===Ne?function(e,t,n){return!(t===Oe&&!Re[n])&&!(t===De&&!Be[n])&&!Xe[e]&&(Ue[e]||!Je[e])}(n,o,i):"application/xhtml+xml"===Ve)}(e))return et(e),!0;if(("noscript"===r||"noembed"===r||"noframes"===r)&&xn(er,e.innerHTML))return et(e),!0;if(ue&&3===o){const t=e.textContent,r=pt(t);t!==r&&(en(n.removed,{element:e.cloneNode()}),e.textContent=r)}return wt(H.afterSanitizeElements,e,null),St(e,t)},qt=function(e,t,n){if(re[t])return!1;if(ct(t,e))return!1;if(be&&("id"===t||"name"===t)&&(n in r||n in We))return!1;const o=X[t]||oe.attributeCheck instanceof Function&&oe.attributeCheck(t,e);if(se&&xn(V,t))return!0;if(ie&&xn(G,t))return!0;if(!o)return Mt(e)&&xt(te.tagNameCheck,e)&&xt(te.attributeNameCheck,t,e)||"is"===t&&te.allowCustomizedBuiltInElements&&xt(te.tagNameCheck,n);if(Ee[t])return!0;const i=dn(n,Z,"");return!(!xn(Y,i)&&("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==fn(n,"data:")||!Pe[e])&&(!ae||xn(Q,i))&&n)},_t=qn({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Mt=function(e){return!_t[ln(e)]&&xn(W,e)},Pt=function(e,t,n,r){if(M&&"object"==typeof c&&"function"==typeof c.getAttributeType&&!n)switch(c.getAttributeType(e,t)){case"TrustedHTML":return O(r);case"TrustedScriptURL":return function(e){D(),I++;try{return M.createScriptURL(e)}finally{I--}}(r)}return r},At=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),!mt(e)||(et(e),!1)}catch(n){return rt(t,e),!1}},Et=function(e,t){return!(!ce||!xn(nr,t))||"attributename"===ln(e)&&-1!==fn(t,"href")},It=function(e,t){Tt(e,t),function(e,t){if(wt(H.beforeSanitizeAttributes,e,null),St(e,t))return;const r=e.attributes;if(!r||mt(e))return;X=kt(H.uponSanitizeAttribute,X,ee,he);const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:X,forceKeepAttr:void 0};let i=r.length;const s=Qe(T(e));for(;i--;){const t=r[i],a=t.name,l=t.namespaceURI,u=t.value,c=Qe(a),d=u;let f="value"===a?d:pn(d),p=!1;o.attrName=c,o.attrValue=f,o.keepAttr=!0,o.forceKeepAttr=void 0,wt(H.uponSanitizeAttribute,e,o),f=o.attrValue,!we||"id"!==c&&"name"!==c||0===fn(f,xe)||(rt(a,e,t),f=xe+f,p=!0),Et(a,f)?rt(a,e,t):o.forceKeepAttr||(!o.keepAttr||!le&&xn(tr,f)?rt(a,e,t):(ue&&(f=pt(f)),qt(s,c,f)?(f=Pt(s,c,l,f),f!==d&&At(e,a,l,f)&&p&&Xt(n.removed)):rt(a,e,t)))}wt(H.afterSanitizeAttributes,e,null),St(e,t)}(e,t),gt(e.content)&&Dt(e.content)},Dt=function(e){let t=null;const n=ft(e);for(wt(H.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(wt(H.uponSanitizeShadowNode,t,null),It(t,e),1===S(t)){const e=g(t);gt(e)&&(Ot(e),Dt(e))}ue&&vt(e),wt(H.afterSanitizeShadowDOM,e,null)},Ot=function(e){const t=[{node:e,shadow:null}];for(;t.length>0;){const e=t.pop();if(e.shadow){Dt(e.shadow);continue}const n=e.node,r=1===S(n),o=m(n);if(o)for(let e=o.length-1;e>=0;--e)t.push({node:o[e],shadow:null});if(r){const e=x?x(n):null;if("string"==typeof e&&"template"===Qe(e)){const e=n.content;gt(e)&&t.push({node:e,shadow:null})}}if(r){const e=g(n);gt(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,s=null,a=null;if(ze=!e,ze&&(e="\x3c!--\x3e"),"string"!=typeof e&&!bt(e)&&"string"!=typeof(e=function(e){switch(typeof e){case"string":return e;case"number":return hn(e);case"boolean":return vn(e);case"bigint":return mn?mn(e):"0";case"symbol":return yn?yn(e):"Symbol()";case"undefined":default:return bn(e);case"function":case"object":{if(null===e)return bn(e);const t=e,n=An(t,"toString");if("function"==typeof n){const e=n(t);return"string"==typeof e?e:bn(e)}return bn(e)}}}(e)))throw kn("dirty is not a string, aborting");if(!n.isSupported)return e;fe?(K=pe,X=he):Ke(t),n.removed=[];const l=Se&&"string"!=typeof e&&bt(e);let u=[];const c=Te;if(l){ce&&it(e,e=>{const t=S(e);if(7===t||8===t&&xn(Xn,e.data)){try{p(e)}catch(e){}return!1}if(1===t){const t=e,n=Qe(T(e));try{t.hasAttribute&&t.hasAttribute("patchsrc")&&t.removeAttribute("patchsrc"),t.hasAttribute&&t.hasAttribute("for")&&ct("for",n)&&t.removeAttribute("for")}catch(e){}}return!0});const t=T(e);if("string"==typeof t){const n=Qe(t);if(!K[n]||ne[n])throw nt(e),kn("root node is forbidden and cannot be sanitized in-place")}if(mt(e))throw nt(e),kn("root node is clobbered and cannot be sanitized in-place");u=at(e),Te=on()}else if(bt(e))r=dt("\x3c!----\x3e"),i=r.ownerDocument.importNode(e,!0),1===i.nodeType&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i),Ot(r);else{if(!me&&!ue&&!de&&-1===e.indexOf("<"))return N(e);if(r=dt(e),!r)return me?null:ge?A:""}r&&ve&&et(r.firstChild);const d=l?e:r;try{l&&Ot(e);const t=ft(d);for(;s=t.nextNode();)It(s,d);l&&function(e,t){const n=Te;let r=null;const o=()=>(r||(r=on(),Kt(t,e=>{sn(r,e)})),r);for(let t=0;;t++){const r=at(e),i=[e];let s=!1;if(Kt(r,e=>{11===S(e)?en(i,e):s||an(n,e)||(s=an(o(),e))}),!s)return;if(t>=8)throw kn("the tree kept changing during in-place sanitization; refusing to return it");Kt(i,(t,n)=>{ut(t,n>0,e,o())})}}(e,u)}catch(t){throw l&&(nt(e),lt(e,u)),t}finally{Te=c}if(l){if(lt(e,u))throw kn("a node selected for removal could not be safely returned; refusing to sanitize in place");return ue&&ht(e),e}if(me){if(ue&&ht(r),ye)for(a=L.call(r.ownerDocument);r.firstChild;)a.appendChild(r.firstChild);else a=r;return(X.shadowroot||X.shadowrootmode)&&(a=B.call(o,a,!0)),a}const f=()=>de?r.outerHTML:r.innerHTML;let h=f();return ue&&xn(Un,h)&&(vt(r),h=f()),de&&K["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&xn(Yn,r.ownerDocument.doctype.name)&&(h="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+h),N(h)},n.setConfig=function(){Ke(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),fe=!0,pe=K,he=X},n.clearConfig=function(){Ze=null,fe=!1,pe=null,he=null,M=P,A=""},n.isValidAttribute=function(e,t,n){Ze||Ke({});const r=Qe(e),o=Qe(t);return("string"!=typeof n||!(Et(t,n)||!le&&xn(tr,n)))&&qt(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&gn(H,e)&&en(H[e],t)},n.removeHook=function(e,t){if(gn(H,e)){if(void 0!==t){const n=Jt(H[e],t);return-1===n?void 0:nn(H[e],n,1)[0]}return Xt(H[e])}},n.removeHooks=function(e){gn(H,e)&&(H[e]=[])},n.removeAllHooks=function(){H={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();const ur=["a","abbr","acronym","area","article","aside","b","bdi","bdo","blockquote","br","caption","center","cite","code","col","colgroup","data","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","footer","h1","h2","h3","h4","h5","h6","header","hgroup","hr","i","img","ins","kbd","li","map","mark","nav","ol","p","pre","q","rp","rt","rtc","ruby","s","samp","small","span","strike","strong","sub","summary","sup","table","tbody","td","th","thead","time","tr","tt","u","ul","var","wbr"],cr=["style","lang","title","width","height"],dr=["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"],fr={a:["href","hreflang","target","rel"],bdo:["dir"],blockquote:["cite"],col:["align","char","charoff","span"],colgroup:["align","char","charoff","span"],del:["cite","datetime"],hr:["align","size","width"],img:["align","alt","height","src","width"],ins:["cite","datetime"],ol:["start","type"],q:["cite"],table:["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"],tbody:["align","char","charoff","valign"],td:dr,tfoot:["align","char","charoff","valign"],th:dr,thead:["align","char","charoff","valign"],tr:["align","bgcolor","char","charoff","valign"]};let pr;function hr(e){var t;const n=(null!==(t=pr)&&void 0!==t?t:pr=lr()).sanitize(e,{ALLOWED_TAGS:ur,ALLOWED_ATTR:[],ALLOW_ARIA_ATTR:!1,ALLOW_DATA_ATTR:!1,ALLOWED_NAMESPACES:["http://www.w3.org/1999/xhtml"],ADD_ATTR:(e,t)=>-1!==cr.indexOf(e)||{}.hasOwnProperty.call(fr,t)&&-1!==(fr[t]||[]).indexOf(e),RETURN_DOM_FRAGMENT:!0}),r=n.querySelectorAll("a");for(let e=0;r.length>e;e++)r.item(e).relList.add("noopener");const o=document.createElement("div");return o.appendChild(n),o.innerHTML}const vr=kt("[Stylesheet Loader]"),mr="#020617",yr={fontFamily:"inherit",backgroundColor:"#eeeded",submitButtonColor:"black",submitButtonTextColor:"white",ratingButtonColor:"white",ratingButtonActiveColor:"black",borderColor:"#c9c6c6",whiteLabel:!1,displayThankYouMessage:!0,thankYouMessageHeader:"Thank you for your feedback!",position:nt,widgetType:Xe,widgetLabel:"Feedback",widgetColor:"black",zIndex:String(2147483645),disabledButtonOpacity:"0.6",maxWidth:"300px",textSubtleColor:"#939393",boxPadding:"20px 24px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",borderRadius:"10px",shuffleQuestions:!1,outlineColor:"rgba(59, 130, 246, 0.8)",inputBackground:"white",inputTextColor:mr,scrollbarThumbColor:"var(--ph-survey-border-color)",scrollbarTrackColor:"var(--ph-survey-background-color)"},gr=[tt,et,nt],br=(e,t,n)=>{const r=pe(pe({},yr),n),o=e.style,i=!gr.includes(r.position)||t===rt&&(null==n?void 0:n.widgetType)===Xe;var s;o.setProperty("--ph-survey-font-family",function(e){if("inherit"===e)return"inherit";const 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)),o.setProperty("--ph-survey-box-padding",r.boxPadding),o.setProperty("--ph-survey-max-width",r.maxWidth),o.setProperty("--ph-survey-z-index",r.zIndex),o.setProperty("--ph-survey-border-color",r.borderColor),i?(o.setProperty("--ph-survey-border-radius",r.borderRadius),o.setProperty("--ph-survey-border-bottom","1.5px solid var(--ph-survey-border-color)")):(o.setProperty("--ph-survey-border-bottom","none"),o.setProperty("--ph-survey-border-radius",`${r.borderRadius} ${r.borderRadius} 0 0`)),o.setProperty("--ph-survey-background-color",r.backgroundColor),o.setProperty("--ph-survey-box-shadow",r.boxShadow),o.setProperty("--ph-survey-disabled-button-opacity",r.disabledButtonOpacity),o.setProperty("--ph-survey-submit-button-color",r.submitButtonColor),o.setProperty("--ph-survey-submit-button-text-color",(null==n?void 0:n.submitButtonTextColor)||xr(r.submitButtonColor)),o.setProperty("--ph-survey-rating-bg-color",r.ratingButtonColor),o.setProperty("--ph-survey-rating-active-bg-color",r.ratingButtonActiveColor),o.setProperty("--ph-survey-rating-active-text-color",xr(r.ratingButtonActiveColor)),o.setProperty("--ph-survey-text-primary-color",(null==n?void 0:n.textColor)||xr(r.backgroundColor)),o.setProperty("--ph-survey-text-subtle-color",r.textSubtleColor),s=o,"white"===xr(r.backgroundColor)?s.setProperty("--ph-logo-mono","1"):s.removeProperty("--ph-logo-mono"),o.setProperty("--ph-widget-color",r.widgetColor),o.setProperty("--ph-widget-text-color",xr(r.widgetColor)),o.setProperty("--ph-widget-z-index",r.zIndex);const a=(null==n?void 0:n.inputBackground)||(null==n?void 0:n.inputBackgroundColor);let l=a||r.inputBackground;a||"white"!==r.backgroundColor||(l="#f8f8f8"),o.setProperty("--ph-survey-input-background",l);const u=(null==n?void 0:n.inputTextColor)||xr(l);o.setProperty("--ph-survey-input-text-color",u),o.setProperty("--ph-survey-rating-text-color",u),o.setProperty("--ph-survey-scrollbar-thumb-color",r.scrollbarThumbColor),o.setProperty("--ph-survey-scrollbar-track-color",r.scrollbarTrackColor),o.setProperty("--ph-survey-outline-color",r.outlineColor)};function wr(e){if(e.startsWith("#")){let t=e.replace(/^#/,"");return/^[0-9A-Fa-f]{3}$/.test(t)&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),/^[0-9A-Fa-f]{6}$/.test(t)?`rgb(${parseInt(t.slice(0,2),16)},${parseInt(t.slice(2,4),16)},${parseInt(t.slice(4,6),16)})`:"rgb(255, 255, 255)"}return"rgb(255, 255, 255)"}function xr(e=yr.backgroundColor){let t;"#"===e[0]&&(t=wr(e)),e.startsWith("rgb")&&(t=e);const 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=wr(n)),!t)return mr;const r=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(r){const e=parseInt(r[1]),t=parseInt(r[2]),n=parseInt(r[3]);return Math.sqrt(e*e*.299+t*t*.587+n*n*.114)>127.5?mr:"white"}return mr}function kr(e){const t=((e,t,n)=>{let r=e.createElement("style");r.innerText=t;const o=(e=>{var t;return ne(e)?e:null==e||null===(t=e.config)||void 0===t?void 0:t.prepare_external_dependency_stylesheet})(n);return o&&(r=o(r)),r||(vr.error("prepare_external_dependency_stylesheet returned null"),null)})(document,':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:calc(2147480000 + 3645);--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 #00000026;--ph-survey-submit-button-color:black;--ph-survey-submit-button-text-color:white;--ph-survey-rating-bg-color:white;--ph-survey-rating-text-color:#020617;--ph-survey-rating-active-bg-color:black;--ph-survey-rating-active-text-color:white;--ph-survey-text-primary-color:#020617;--ph-survey-text-subtle-color:#939393;--ph-widget-color:#e0a045;--ph-widget-text-color:white;--ph-survey-scrollbar-thumb-color:var(--ph-survey-border-color);--ph-survey-scrollbar-track-color:var(--ph-survey-background-color);--ph-survey-outline-color:#3b82f6cc;--ph-survey-input-background:white;--ph-survey-input-text-color:#020617;--ph-survey-disabled-button-opacity:.6}.ph-survey{min-width:300px;width:var(--ph-survey-max-width);max-width:85%;z-index:var(--ph-survey-z-index);height:fit-content;margin:0;position:fixed;bottom:0}.ph-survey h3,.ph-survey p{margin:0}.ph-survey *{box-sizing:border-box;font-family:var(--ph-survey-font-family);color:var(--ph-survey-text-primary-color)}.ph-survey textarea,.ph-survey input[type=text],.ph-survey .multiple-choice-options label{color:var(--ph-survey-input-text-color);background:var(--ph-survey-input-background);border:1.5px solid var(--ph-survey-border-color);border-radius:4px;padding:10px;transition:border-color .2s ease-out,box-shadow .2s ease-out,transform .15s ease-out}.ph-survey textarea,.ph-survey input[type=text]{transition:border-color .2s ease-out,box-shadow .2s ease-out,transform .15s ease-out}.ph-survey input{margin:0}.ph-survey textarea:focus,.ph-survey textarea:focus-visible,.ph-survey input[type=text]:focus,.ph-survey input[type=text]:focus-visible,.ph-survey .form-submit:focus,.ph-survey .form-submit:focus-visible,.ph-survey input[type=checkbox]:focus,.ph-survey input[type=radio]:focus,.ph-survey input[type=checkbox]:focus-visible,.ph-survey input[type=radio]:focus-visible{outline:1.5px solid var(--ph-survey-outline-color);border-color:var(--ph-survey-rating-active-bg-color);outline-offset:2px}.ph-survey textarea:focus:not(:focus-visible),.ph-survey input[type=text]:focus:not(:focus-visible),.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){outline:none}.ph-survey textarea:hover:not(:focus),.ph-survey input[type=text]:hover:not(:focus){border-color:var(--ph-survey-rating-active-bg-color)}@media (max-width:768px){.ph-survey textarea,.ph-survey input[type=text]{font-size:1rem}}.ph-survey .multiple-choice-options label,.ph-survey .rating-options-number,.ph-survey .form-cancel,.ph-survey input[type=checkbox],.ph-survey input[type=radio]{border:1.5px solid var(--ph-survey-border-color)}.ph-survey label,.ph-survey input[type=checkbox],.ph-survey input[type=radio],.ph-survey .ratings-emoji,.ph-survey .ratings-number,.ph-survey .footer-branding,.ph-survey .form-cancel,.ph-survey .form-submit{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);color:var(--ph-widget-text-color);text-align:center;cursor:pointer;z-index:var(--ph-survey-z-index);border:none;border-radius:3px 3px 0 0;padding:10px 12px;transition:padding .2s ease-out;position:fixed}.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{flex-direction:column;gap:16px;display:flex}.bottom-section{flex-direction:column;gap:8px;display:flex}.thank-you-message-header~.bottom-section,.intro-screen-header~.bottom-section{padding-top:16px}.question-container,.thank-you-message,.intro-screen{flex-direction:column;gap:8px;display:flex}.survey-question{font-size:14px;font-weight:500}.survey-question-description{opacity:.8;padding-top:4px;font-size:13px}.survey-question-description,.thank-you-message-body,.intro-screen-body{word-wrap:break-word;overflow-wrap:break-word}:is(.survey-question-description,.thank-you-message-body,.intro-screen-body) img,:is(.survey-question-description,.thank-you-message-body,.intro-screen-body) video,:is(.survey-question-description,.thank-you-message-body,.intro-screen-body) iframe,:is(.survey-question-description,.thank-you-message-body,.intro-screen-body) embed,:is(.survey-question-description,.thank-you-message-body,.intro-screen-body) object,:is(.survey-question-description,.thank-you-message-body,.intro-screen-body) svg{max-width:100%;height:auto}.question-textarea-wrapper{flex-direction:column;display:flex}.survey-form{animation:.3s ease-out forwards ph-survey-fade-in}.survey-form,.thank-you-message,.intro-screen{text-align:left;width:100%;z-index:var(--ph-survey-z-index);border:1.5px solid var(--ph-survey-border-color);border-bottom:var(--ph-survey-border-bottom);background:var(--ph-survey-background-color);border-radius:var(--ph-survey-border-radius);box-shadow:var(--ph-survey-box-shadow);padding:var(--ph-survey-box-padding);margin:0;position:relative}.survey-form textarea,.survey-form input[type=text]{min-width:100%}.survey-form textarea:focus,.survey-form textarea:focus-visible{box-shadow:0 4px 12px #00000014}.survey-form textarea:focus:not(:focus-visible){box-shadow:none}.survey-box .question-header--empty~.multiple-choice-options,.survey-box .question-header--empty~textarea{margin-top:0}.multiple-choice-options{border:none;flex-direction:column;gap:8px;margin:0;padding:1px 0;font-size:14px;display:flex}.multiple-choice-options label,.multiple-choice-options .response-choice{color:inherit;align-items:center;gap:8px;display:flex}.multiple-choice-options label{cursor:pointer;font-size:13px}.multiple-choice-options label:hover:not(:has(input:checked)){border-color:var(--ph-survey-text-subtle-color);box-shadow:0 2px 8px #00000014}.multiple-choice-options label:has(input:checked){border-color:var(--ph-survey-rating-active-bg-color);box-shadow:0 1px 4px #0000000d}.multiple-choice-options label.choice-option-open{flex-wrap:wrap}.multiple-choice-options label span{color:inherit}.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ph-survey-input-background);cursor:pointer;z-index:1;border-radius:3px;flex-shrink:0;width:1rem;height:1rem;transition:all .2s cubic-bezier(.4,0,.2,1),transform .15s ease-out;position:relative}: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{border:solid var(--ph-survey-rating-active-text-color);border-width:0 2px 2px 0;width:4px;height:8px;animation:.2s ease-out .1s forwards ph-survey-checkmark-reveal;left:4px;transform:rotate(45deg)scale(0)}.multiple-choice-options input[type=radio]:checked:after{background:var(--ph-survey-rating-active-text-color);border-radius:50%;width:6px;height:6px;animation:.15s ease-out 50ms forwards ph-survey-radio-reveal;top:5px;left:5px;transform:scale(0)}.multiple-choice-options input[type=checkbox]:checked:after,.multiple-choice-options input[type=radio]:checked:after{content:"";box-sizing:content-box;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}.multiple-choice-options .choice-option-open input[type=text]::placeholder{color:var(--ph-survey-text-subtle-color);font-weight:400}.rating-options-emoji{justify-content:space-between;display:flex}.rating-options-emoji-2{justify-content:space-around}.ratings-emoji{opacity:.5;background-color:#0000;border:none;padding:0;font-size:16px}.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;grid-auto-columns:1fr;grid-auto-flow:column;display:grid;overflow:hidden}.rating-options-number .ratings-number{border-right:1px solid var(--ph-survey-border-color);text-align:center;cursor:pointer;color:var(--ph-survey-rating-text-color);border-top:none;border-bottom:none;border-left:none;font-weight:700}.rating-options-number .ratings-number:last-of-type{border-right:0}.rating-options-number .ratings-number.rating-active{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{cursor:pointer}@media (hover:hover) and (pointer:fine){.ratings-number:hover:not(.rating-active){background-color:color-mix(in srgb, var(--ph-survey-rating-active-bg-color) 14%, var(--ph-survey-rating-bg-color))}}.rating-text{opacity:.7;flex-direction:row;justify-content:space-between;font-size:11px;display:flex}.form-buttons{flex-direction:row;gap:8px;width:100%;display:flex}.form-buttons-with-back>.form-submit{flex:auto;min-width:0}.form-submit{text-align:center;cursor:pointer;user-select:none;background:var(--ph-survey-submit-button-color);color:var(--ph-survey-submit-button-text-color);border:none;border-radius:6px;min-width:100%;padding:12px;font-weight:700;box-shadow:0 2px #0000000b}.form-submit:not([disabled]):hover{transform:scale(1.02);box-shadow:0 4px 8px #0000001a}.form-submit:not([disabled]):active{transform:scale(.98);box-shadow:0 1px 2px #0000000d}.form-submit[disabled]{opacity:var(--ph-survey-disabled-button-opacity);cursor:not-allowed}.form-back{text-align:center;cursor:pointer;user-select:none;color:var(--ph-survey-text-primary-color);border:1.5px solid var(--ph-survey-border-color);background:0 0;border-radius:6px;flex:none;padding:12px 16px;font-weight:600}.form-back:hover{transform:scale(1.02)}.form-back:active{transform:scale(.98)}.validation-hint{opacity:.7;margin-top:4px;font-size:12px}.form-cancel{cursor:pointer;background:#fff;border-radius:100%;padding:12px;line-height:0;position:absolute;top:0;right:0;transform:translate(50%,-50%)}.form-cancel:hover{opacity:.7;transform:translate(50%,-50%)scale(1.1)}.footer-branding{opacity:.6;justify-content:center;align-items:center;gap:4px;font-size:11px;font-weight:500;text-decoration:none;display:flex}.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{opacity:.8;font-size:14px}.intro-screen{text-align:center;animation:.3s ease-out forwards ph-survey-fade-in}.intro-screen-header{margin:10px 0 0}.intro-screen-body{opacity:.8;font-size:14px}.limit-height{scrollbar-width:thin;scrollbar-color:var(--ph-survey-scrollbar-thumb-color) var(--ph-survey-scrollbar-track-color);max-height:256px;overflow:hidden auto}.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}.limit-height::-webkit-scrollbar-thumb:hover{background-color:var(--ph-survey-text-subtle-color)}.sr-only{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}@media (prefers-reduced-motion:reduce){.ph-survey *{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!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)}}',null==e?void 0:e.config.prepareStylesheet);return null==t||t.setAttribute("data-ph-survey-style","true"),t}const Sr=e=>{try{const t=(e=>Nt("seenSurvey_",e))(e);localStorage.getItem(t)||localStorage.setItem(t,"true")}catch(e){Ot.error("Failed to persist survey seen state",e)}},Tr=(e,t,n,r)=>{var o;if(!t)return void Ot.error("[survey dismissed] event not captured, PostHog instance not found.");if(n)return;const i=Nr(e),s=i?i.surveyLanguage:r,a=pe(pe(pe({},((e,t,n,r)=>pe({[ht]:t.name,[pt]:t.id,[vt]:t.current_iteration,[mt]:t.current_iteration_start_date,sessionRecordingUrl:Z(r)},_t(pe(pe(pe(pe({event:"dismissed",survey:t},!re(null==n?void 0:n.responses)&&{responses:n.responses}),!re(null==n?void 0:n.surveySubmissionId)&&{submissionId:n.surveySubmissionId}),!re(null==n?void 0:n.surveyLanguage)&&{surveyLanguage:n.surveyLanguage}),!re(null==n?void 0:n.questionSnapshots)&&{questionSnapshots:n.questionSnapshots}))))(0,e,i,t)),s&&{[yt]:s}),{},{$set:{[Pt(e,"dismissed")]:!0}});$r(e),Sr(e),null===(o=t.client)||void 0===o||o.capture(dt,a),window.dispatchEvent(new CustomEvent("PHSurveyClosed",{detail:{surveyId:e.id}}))},qr=e=>{const t=e.map(e=>e.id);return t.every(e=>!!e)?t:void 0},_r=(e,t)=>{var n,r,o;return(e=>e.questions.some(e=>{var t;return!!(null===(t=e.branching)||void 0===t?void 0:t.type)}))(e)?e.questions:t?null!==(n=((e,t)=>{if(!t||t.length!==e.questions.length)return null;const n=new Map(e.questions.map(e=>[e.id,e])),r=[];for(const e of t){const t=n.get(e);if(!t)return null;r.push(t)}return r})(e,t.questionOrder))&&void 0!==n?n:e.questions:e.appearance&&e.appearance.shuffleQuestions&&!e.enable_partial_responses?(r=e.questions,o=Dt(e.questions),r.length===o.length&&r.every((e,t)=>e===o[t])?o.reverse():o):e.questions},Mr=function(e){function t(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&n.forEach(function(e){e.__e=!0,M(e)})},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}return t.__c="__cC"+h++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}({isPreviewMode:!1,previewPageIndex:0,onPopupSurveyDismissed(){},isPopup:!0,onPreviewSubmit(){},onPreviewBack(){},surveySubmissionId:"",properties:void 0,surveyLanguage:null}),Pr=()=>Ve(Mr),Ar=({component:t,children:n,renderAsHtml:r,style:o})=>function(t,n,r){var o,i,s,a,l=b({},t.props);for(s in t.type&&t.type.defaultProps&&(a=t.type.defaultProps),n)"key"==s?o=n[s]:"ref"==s?i=n[s]:l[s]=void 0===n[s]&&null!=a?a[s]:n[s];return arguments.length>2&&(l.children=arguments.length>3?e.call(arguments,2):r),k(t.type,l,o||t.key,i||t.ref,null)}(t,r?{dangerouslySetInnerHTML:{__html:hr(n)},style:o}:{children:n,style:o});function Er(e,t){var n,r,o;if(!(null===(n=e.conditions)||void 0===n?void 0:n.url))return!0;const i=null!==(r=function(e){var t;const n=typeof window>"u"?void 0:window,r=null==n||null===(t=n.location)||void 0===t?void 0:t.href;return re(r)?void 0:function(e,t){var n;const r=null==e||null===(n=e.config)||void 0===n?void 0:n.get_current_url;if(!ne(r))return t;try{const e=r(t);return oe(e)&&e?e:t}catch(e){return xt.error("Error in get_current_url, falling back to window.location.href",e),t}}(e,r)}(t))&&void 0!==r?r:"u">typeof window?window.location.href:void 0;if(!i)return!1;const s=[e.conditions.url],a=function(e){return null!=e?e:"icontains"}(null===(o=e.conditions)||void 0===o?void 0:o.urlMatchType);return It[a](s,[i])}const Ir=e=>Nt("inProgressSurvey_",e),Dr={},Or=(e,t)=>{const n=Ir(e);try{localStorage.setItem(n,JSON.stringify(t)),delete Dr[n]}catch(e){Ot.error("Error setting in-progress survey state in localStorage",e),Dr[n]=t}},Nr=e=>{const t=Ir(e),n=Dr[t];if(n)return n;try{const e=localStorage.getItem(t);if(e)return JSON.parse(e)}catch(e){Ot.error("Error getting in-progress survey state from localStorage",e)}return null},$r=e=>{const t=Ir(e);delete Dr[t];try{localStorage.removeItem(t)}catch(e){Ot.error("Error clearing in-progress survey state from localStorage",e)}};function zr(e,t=nt,n){if(e===ot)return{};switch(t){case"top_left":return{top:"0",left:"0",transform:"translate(30px, 30px)"};case"top_right":return{top:"0",right:"0",transform:"translate(-30px, 30px)"};case"top_center":return{top:"0",left:"50%",transform:"translate(-50%, 30px)"};case"middle_left":return{top:"50%",left:"0",transform:"translate(30px, -50%)"};case"middle_right":return{top:"50%",right:"0",transform:"translate(-30px, -50%)"};case"middle_center":return{top:"50%",left:"50%",transform:"translate(-50%, -50%)"};case et:return{left:"30px"};case tt:return{left:"50%",transform:"translateX(-50%)"};default:return{right:e===rt&&n===Xe?"60px":"30px"}}}const Cr=Q("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Q("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"})}),Lr=Q("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Q("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"})}),jr=Q("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Q("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"})}),Br=Q("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Q("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"})}),Hr=Q("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Q("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"})}),Rr=Q("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 0 24 24",width:"48",children:Q("path",{d:"M2 20h2c.55 0 1-.45 1-1v-9c0-.55-.45-1-1-1H2v11zm19.83-7.12c.11-.25.17-.52.17-.8V11c0-1.1-.9-2-2-2h-5.5l.92-4.65c.05-.22.02-.46-.08-.66-.23-.45-.52-.86-.88-1.22L14 2 7.59 8.41C7.21 8.79 7 9.3 7 9.83v7.84C7 18.95 8.05 20 9.34 20h8.11c.7 0 1.36-.37 1.72-.97l2.66-6.15z"})}),Fr=Q("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 0 24 24",width:"48",children:Q("path",{d:"M22 4h-2c-.55 0-1 .45-1 1v9c0 .55.45 1 1 1h2V4zM2.17 11.12c-.11.25-.17.52-.17.8V13c0 1.1.9 2 2 2h5.5l-.92 4.65c-.05.22-.02.46.08.66.23.45.52.86.88 1.22L10 22l6.41-6.41c.38-.38.59-.89.59-1.42V6.34C17 5.05 15.95 4 14.66 4H6.55c-.7 0-1.36.37-1.72.97l-2.66 6.15z"})}),Ur=({fill:e="currentColor"}={})=>Q("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:e,xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"close-survey-title-adam",children:[Q("title",{id:"close-survey-title",className:"adam-testing",children:"Close survey"}),Q("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:e})]}),Vr=Q("svg",{width:"80",height:"14",viewBox:"0 0 160 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Q("g",{"clip-path":"url(#ph-survey-logo-clip)",style:"opacity: calc(1 - var(--ph-logo-mono, 0))",children:[Q("path",{fill:"currentColor",d:"M51.66 25.22A1.9 1.9 0 0 0 50 23.33l-.34-.04c-1-.13-1.94-.6-2.65-1.33L33.28 7.75V28H49a2.66 2.66 0 0 0 2.67-2.67zM39.2 23.54h-.09a1.78 1.78 0 1 1 .1 0"}),Q("path",{fill:"url(#ph-survey-logo-paint0)",d:"M21.96 2.67v4.96l11.3 11.6h.02V7.75L26.63.85a2.8 2.8 0 0 0-2-.85 2.67 2.67 0 0 0-2.67 2.67"}),Q("path",{fill:"url(#ph-survey-logo-paint1)",d:"M21.96 7.63v11.05L31.03 28h2.25v-8.75z"}),Q("path",{fill:"url(#ph-survey-logo-paint2)",d:"M21.96 28h9.07l-9.07-9.32z"}),Q("path",{fill:"url(#ph-survey-logo-paint3)",d:"M10.74 2.66v4.5l11.22 11.52V7.63L15.3.8a2.66 2.66 0 0 0-4.56 1.86"}),Q("path",{fill:"url(#ph-survey-logo-paint4)",d:"M10.74 28h8.96l-8.96-9.32z"}),Q("path",{fill:"url(#ph-survey-logo-paint5)",d:"M10.74 7.16v11.52L19.7 28h2.26v-9.32z"}),Q("path",{fill:"url(#ph-survey-logo-paint6)",d:"M10.74 7.16 4.54.8A2.66 2.66 0 0 0 0 2.66V7.5l10.74 11.18z"}),Q("path",{fill:"url(#ph-survey-logo-paint7)",d:"M9.19 28h1.55v-9.32L0 7.5v10.73z"}),Q("path",{fill:"url(#ph-survey-logo-paint8)",d:"M0 25.41A2.6 2.6 0 0 0 2.58 28H9.2L0 18.23z"})]}),Q("path",{"clip-path":"url(#ph-survey-logo-clip)",fill:"currentColor",style:"opacity: var(--ph-logo-mono, 0)",d:"m50.02 23.34-.34-.04c-1-.13-1.95-.6-2.66-1.33L35.58 10.11a.5.5 0 0 0-.86.35V27.5c0 .28.22.5.5.5H49c1.48 0 2.67-1.2 2.67-2.67v-.1a1.9 1.9 0 0 0-1.66-1.9m-10.81.2a1.78 1.78 0 1 1 0-3.56 1.78 1.78 0 0 1 0 3.57M0 25.41A2.6 2.6 0 0 0 2.59 28h5.22a.5.5 0 0 0 .37-.84L.87 19.13a.5.5 0 0 0-.87.34zm18.81 1.74a.5.5 0 0 1-.36.85h-7.09a.5.5 0 0 1-.37-.17L8.94 25.5.13 15.82A.5.5 0 0 1 0 15.5V8.75a.5.5 0 0 1 .86-.34zM0 2.68C0 .28 2.92-.91 4.59.82l25.6 26.33a.5.5 0 0 1-.36.85h-7.76a.5.5 0 0 1-.37-.17l-2.1-2.33L.28 5.3A1 1 0 0 1 0 4.6zm10.74 0c0-2.4 2.92-3.59 4.59-1.87L32.5 18.48l.5.51v7.3a.5.5 0 0 1-.86.35l-1.12-1.14L11.3 5.23a2 2 0 0 1-.57-1.4zM33 7.46v7.8a.5.5 0 0 1-.85.36l-9.61-9.89a2 2 0 0 1-.57-1.4V2.69c0-2.4 2.92-3.59 4.59-1.86z"}),Q("path",{fill:"currentColor",d:"M64.9 22.88c-.67 0-1.23-.56-1.23-1.24V5.24c0-.69.56-1.24 1.24-1.24h6.55c3.89 0 6.39 2.32 6.39 5.9 0 3.6-2.5 5.91-6.4 5.91h-3.53v5.83c0 .68-.56 1.24-1.24 1.24zm3.02-11.94c0 .68.55 1.23 1.23 1.23h1.88c1.6 0 2.58-.86 2.58-2.26s-.97-2.27-2.58-2.27h-1.88c-.68 0-1.23.55-1.23 1.23zM84.71 23.1c-4.18 0-7.14-2.97-7.14-7.02s2.96-7.01 7.14-7.01c4.14 0 7.14 2.97 7.14 7.01 0 4.05-3 7.01-7.14 7.01m-3.22-7.02c0 2.16 1.3 3.64 3.22 3.64 1.9 0 3.2-1.48 3.2-3.64s-1.3-3.64-3.2-3.64c-1.93 0-3.22 1.48-3.22 3.64m16.34 7.03a6.2 6.2 0 0 1-5.54-3.01c-.34-.57-.01-1.26.6-1.5l.77-.3c.7-.27 1.45.15 1.92.73a2.8 2.8 0 0 0 2.25 1.08c1.05 0 1.75-.51 1.75-1.27 0-2.13-7.17-.7-7.17-5.85 0-2.13 1.85-3.91 4.83-3.91 2.27 0 4.2.9 5.17 2.31.36.53.05 1.2-.54 1.44l-.85.35c-.68.29-1.45-.14-2-.63a2.5 2.5 0 0 0-1.64-.64c-.89 0-1.5.38-1.5.97 0 2.16 7.27.38 7.27 5.88 0 2.35-2.15 4.34-5.32 4.34m14.64-1.31c.04.57-.3 1.1-.86 1.2q-.6.1-1.27.11c-2.92 0-5.15-1.56-5.15-4.85v-5.66h-.91c-.69 0-1.24-.56-1.24-1.24v-.82c0-.68.55-1.23 1.24-1.23h.91v-2.7c0-.69.55-1.24 1.23-1.24h1.48c.68 0 1.24.55 1.24 1.23v2.7h2.04c.68 0 1.23.56 1.23 1.24v.82c0 .68-.55 1.24-1.23 1.24h-2.04v5.15c0 1.2.64 1.91 1.6 1.91.75 0 1.6.5 1.66 1.25zM125.5 5.23c0-.68.55-1.23 1.23-1.23h1.8c.68 0 1.23.55 1.23 1.23v16.41c0 .68-.55 1.24-1.23 1.24h-1.8c-.68 0-1.23-.56-1.23-1.24v-5.43c0-.68-.56-1.23-1.24-1.23h-5c-.67 0-1.23.55-1.23 1.23v5.43c0 .68-.55 1.24-1.23 1.24h-1.77c-.69 0-1.24-.56-1.24-1.24V5.24c0-.69.55-1.24 1.24-1.24h1.77c.68 0 1.23.55 1.23 1.23v4.87c0 .68.56 1.23 1.24 1.23h5c.67 0 1.23-.55 1.23-1.23zm12.87 17.87c-4.19 0-7.14-2.97-7.14-7.02s2.95-7.01 7.14-7.01c4.13 0 7.14 2.97 7.14 7.01 0 4.05-3 7.01-7.14 7.01m-3.22-7.02c0 2.16 1.29 3.64 3.22 3.64 1.9 0 3.2-1.48 3.2-3.64s-1.3-3.64-3.2-3.64c-1.93 0-3.22 1.48-3.22 3.64m17.17 6.37c-3.84 0-6.2-2.58-6.2-6.68s2.36-6.69 6.12-6.69c1.58 0 2.82.54 3.54 1.37 0-.64.52-1.15 1.16-1.15h1.5c.68 0 1.24.55 1.24 1.23V21.9c0 3.64-2.77 6.09-6.93 6.09-2.64 0-4.9-1.2-5.85-3.09-.31-.62.16-1.29.85-1.4l1.14-.17c.67-.11 1.29.4 1.78.85.5.46 1.26.7 2.08.7 1.85 0 3.06-1.04 3.06-2.55v-1.3c-.7.9-2.01 1.4-3.49 1.4m-2.36-6.68c0 2.02 1.18 3.31 3 3.31 1.86 0 3.04-1.29 3.04-3.31s-1.18-3.32-3.03-3.32c-1.83 0-3.01 1.3-3.01 3.32"}),Q("defs",{children:[Q("linearGradient",{id:"ph-survey-logo-paint0",x1:"21.96",x2:"33.28",y1:"9.62",y2:"9.62",gradientUnits:"userSpaceOnUse",children:[Q("stop",{"stop-color":"#ffd849"}),Q("stop",{offset:".96","stop-color":"#fbae01"})]}),Q("linearGradient",{id:"ph-survey-logo-paint1",x1:"21.96",x2:"33.28",y1:"17.81",y2:"17.81",gradientUnits:"userSpaceOnUse",children:[Q("stop",{"stop-color":"#ffb700"}),Q("stop",{offset:"1","stop-color":"#f9aa01"})]}),Q("linearGradient",{id:"ph-survey-logo-paint2",x1:"21.96",x2:"31.03",y1:"23.34",y2:"23.34",gradientUnits:"userSpaceOnUse",children:[Q("stop",{"stop-color":"#ff9500"}),Q("stop",{offset:"1","stop-color":"#f8aa00"})]}),Q("linearGradient",{id:"ph-survey-logo-paint3",x1:"10.74",x2:"21.96",y1:"9.34",y2:"9.34",gradientUnits:"userSpaceOnUse",children:[Q("stop",{"stop-color":"#ff651e"}),Q("stop",{offset:"1","stop-color":"#e4400a"})]}),Q("linearGradient",{id:"ph-survey-logo-paint4",x1:"10.74",x2:"19.7",y1:"23.34",y2:"23.34",gradientUnits:"userSpaceOnUse",children:[Q("stop",{"stop-color":"#c42c00"}),Q("stop",{offset:"1","stop-color":"#d63600"})]}),Q("linearGradient",{id:"ph-survey-logo-paint5",x1:"10.74",x2:"21.96",y1:"17.58",y2:"17.58",gradientUnits:"userSpaceOnUse",children:[Q("stop",{"stop-color":"#ef3c00"}),Q("stop",{offset:"1","stop-color":"#d63601"})]}),Q("linearGradient",{id:"ph-survey-logo-paint6",x1:"0",x2:"10.74",y1:"9.34",y2:"9.34",gradientUnits:"userSpaceOnUse",children:[Q("stop",{"stop-color":"#3f80ff"}),Q("stop",{offset:"1","stop-color":"#084fe0"})]}),Q("linearGradient",{id:"ph-survey-logo-paint7",x1:"0",x2:"10.74",y1:"17.75",y2:"17.75",gradientUnits:"userSpaceOnUse",children:[Q("stop",{"stop-color":"#0255ff"}),Q("stop",{offset:"1","stop-color":"#0145d2"})]}),Q("linearGradient",{id:"ph-survey-logo-paint8",x1:"0",x2:"9.19",y1:"23.11",y2:"23.11",gradientUnits:"userSpaceOnUse",children:[Q("stop",{"stop-color":"#0041c6"}),Q("stop",{offset:"1","stop-color":"#0045d0"})]}),Q("clipPath",{id:"ph-survey-logo-clip",children:Q("path",{fill:"#fff",d:"M0 0h51.67v28H0z"})})]})]});function Gr({urlParams:e}){const t=e?Object.entries(e).map(([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`).join("&"):"";return Q("a",{href:"https://posthog.com/surveys"+(t?`?${t}`:""),target:"_blank",rel:"noopener",className:"footer-branding",children:["Survey by ",Vr]})}function Qr({text:e,submitDisabled:t,appearance:n,onSubmit:r,link:o,onPreviewSubmit:i,skipSubmitButton:s,canGoBack:a,onBack:l}){const{isPreviewMode:u}=Ve(Mr),c=!!a&&!!l,d=!s&&Q("button",{className:"form-submit",disabled:t,type:"button",onClick(){var e;o&&(null===(e=window)||void 0===e||e.open(o)),u?null==i||i():r()},children:e});return Q("div",{className:"bottom-section",children:[c?Q("div",{className:"form-buttons form-buttons-with-back",children:[Q("button",{className:"form-back",type:"button","aria-label":"Go to previous question",onClick:l,children:n.backButtonText||"Back"}),d]}):d,!n.whiteLabel&&Q(Gr,{urlParams:{utm_source:"survey-footer"}})]})}function Zr({question:e,forceDisableHtml:t,htmlFor:n}){return Q("div",{class:e.question||e.description?"question-header":"question-header question-header--empty",children:[Q(e.type===it?"label":"h3",{className:"survey-question",htmlFor:n,children:e.question}),e.description&&Ar({component:x("p",{className:"survey-question-description"}),children:e.description,renderAsHtml:!t&&"text"!==e.descriptionContentType})]})}function Wr({onClick:e}){const{isPreviewMode:t}=Ve(Mr);return Q("button",{className:"form-cancel",onClick:e,disabled:t,"aria-label":"Close survey",type:"button",children:Ur({fill:"black"})})}function Yr({header:e,description:t,contentType:n,forceDisableHtml:r,appearance:o,onClose:i}){const{isPopup:s}=Ve(Mr);return Re(()=>{const e=e=>{"Enter"!==e.key&&"Escape"!==e.key||(e.preventDefault(),i())};return St(window,"keydown",e),()=>{window.removeEventListener("keydown",e)}},[i]),Q("div",{className:"thank-you-message",role:"status",tabIndex:0,"aria-atomic":"true",children:[s&&!0!==o.hideCancelButton&&Q(Wr,{onClick:()=>i()}),Q("h3",{className:"thank-you-message-header",children:e}),t&&Ar({component:x("p",{className:"thank-you-message-body"}),children:t,renderAsHtml:!r&&"text"!==n}),s&&Q(Qr,{text:o.thankYouMessageCloseButtonText||"Close",submitDisabled:!1,appearance:o,onSubmit:()=>i()})]})}function Kr({header:e,description:t,contentType:n,forceDisableHtml:r,appearance:o,onStart:i}){const{isPopup:s,onPreviewSubmit:a,onPopupSurveyDismissed:l}=Ve(Mr);return Q("div",{className:"intro-screen",role:"status",tabIndex:0,"aria-atomic":"true",children:[s&&!0!==o.hideCancelButton&&Q(Wr,{onClick:()=>l()}),e&&Q("h3",{className:"intro-screen-header",children:e}),t&&Ar({component:x("p",{className:"intro-screen-body"}),children:t,renderAsHtml:!r&&"text"!==n}),Q(Qr,{text:o.introScreenButtonText||"Get started",submitDisabled:!1,appearance:o,onSubmit:i,onPreviewSubmit:()=>a(null)})]})}const Jr=e=>te(e)&&e.every(e=>oe(e));function Xr({question:e,forceDisableHtml:t,appearance:n,onSubmit:r,onPreviewSubmit:o,displayQuestionIndex:i,initialValue:s,canGoBack:a,onBack:l}){const{isPreviewMode:u}=Pr(),c=Fe(null),[d,f]=He(()=>oe(s)?s:""),p=null==n?void 0:n.disableAutofocus;Re(()=>{p||setTimeout(()=>{var e;u||null===(e=c.current)||void 0===e||e.focus()},100)},[u,p]);const h=`surveyQuestion${i}`,v=Ue(()=>function(e,t,n){const r=e.trim();if(!n&&""===r)return"This field is required";if(""===r)return!1;if(t&&t.length>0)for(const e of t)switch(e.type){case Y:var o;if(void 0!==e.value&&e.value>r.length)return null!==(o=e.errorMessage)&&void 0!==o?o:`Please enter at least ${e.value} characters`;break;case K:var i;if(void 0!==e.value&&r.length>e.value)return null!==(i=e.errorMessage)&&void 0!==i?i:`Please enter no more than ${e.value} characters`}return!1}(d,e.validation,e.optional),[d,e.validation,e.optional]),m=we(e.validation,Y),y=we(e.validation,K),g=Ue(()=>function(e,t){const n=1===e?void 0:e;return n&&t?`Enter ${n}-${t} characters`:n?`Enter at least ${n} ${1===n?"character":"characters"}`:t?`Maximum ${t} ${1===t?"character":"characters"}`:void 0}(m,y),[m,y]),b=()=>{v||r(d.trim())},w=()=>{v||o(d.trim())};return Q(S,{children:[Q("div",{className:"question-container",children:[Q(Zr,{question:e,forceDisableHtml:t,htmlFor:h}),Q("textarea",{ref:c,id:h,rows:4,placeholder:null==n?void 0:n.placeholder,minLength:m,maxLength:y,onInput(e){f(e.currentTarget.value),e.stopPropagation()},onKeyDown(e){e.stopPropagation(),"Enter"!==e.key||!e.metaKey&&!e.ctrlKey||v||(e.preventDefault(),u?w():b())},value:d}),g&&Q("div",{className:"validation-hint",children:g})]}),Q(Qr,{text:e.buttonText||"Submit",submitDisabled:!!v,appearance:n,onSubmit:b,onPreviewSubmit:w,canGoBack:a,onBack:l})]})}function eo({question:e,forceDisableHtml:t,appearance:n,onSubmit:r,onPreviewSubmit:o,canGoBack:i,onBack:s}){return Q(S,{children:[Q("div",{className:"question-container",children:Q(Zr,{question:e,forceDisableHtml:t})}),Q(Qr,{text:e.buttonText||"Submit",submitDisabled:!1,link:e.link,appearance:n,onSubmit:()=>r("link clicked"),onPreviewSubmit:()=>o("link clicked"),canGoBack:i,onBack:s})]})}function to({question:e,forceDisableHtml:t,displayQuestionIndex:n,appearance:r,onSubmit:o,onPreviewSubmit:i,initialValue:s,canGoBack:a,onBack:l}){var u;const c=e.scale,d=10===e.scale?0:1,[f,p]=He(()=>ae(s)?s:te(s)&&s.length>0&&ae(parseInt(s[0]))?parseInt(s[0]):oe(s)&&ae(parseInt(s))?parseInt(s):null),h="emoji"===e.display&&2===e.scale,{isPreviewMode:v}=Pr(),m=e=>v?i(e):o(e);return Q(S,{children:[Q("div",{className:"question-container",children:[Q(Zr,{question:e,forceDisableHtml:t}),Q("div",{className:"rating-section",children:[Q("div",{className:"rating-options",children:["emoji"===e.display&&Q("div",{className:"rating-options-emoji"+(h?" rating-options-emoji-2":""),children:null===(u=ao[e.scale])||void 0===u?void 0:u.map((t,r)=>Q("button",{"aria-label":`Rate ${r+1}`,className:`ratings-emoji question-${n}-rating-${r} ${r+1===f?"rating-active":""}`,value:r+1,type:"button",onClick(){const t=r+1;p(t),e.skipSubmitButton&&m(t)},children:t},r))}),"number"===e.display&&Q("div",{className:"rating-options-number",style:{gridTemplateColumns:`repeat(${c-d+1}, minmax(0, 1fr))`},children:lo(e.scale).map((t,o)=>Q(no,{displayQuestionIndex:n,active:f===t,appearance:r,num:t,setActiveNumber(t){p(t),e.skipSubmitButton&&m(t)}},o))})]}),!h&&Q("div",{className:"rating-text",children:[Q("div",{children:e.lowerBoundLabel}),Q("div",{children:e.upperBoundLabel})]})]})]}),Q(Qr,{text:e.buttonText||(null==r?void 0:r.submitButtonText)||"Submit",submitDisabled:ie(f)&&!e.optional,appearance:r,onSubmit:()=>o(f),onPreviewSubmit:()=>i(f),skipSubmitButton:e.skipSubmitButton,canGoBack:a,onBack:l})]})}function no({num:e,active:t,displayQuestionIndex:n,setActiveNumber:r}){return Q("button",{"aria-label":`Rate ${e}`,className:`ratings-number question-${n}-rating-${e} ${t?"rating-active":""}`,type:"button",onClick(){r(e)},children:e})}function ro({question:e,forceDisableHtml:t,displayQuestionIndex:n,appearance:r,onSubmit:o,onPreviewSubmit:i,initialValue:s,canGoBack:a,onBack:l}){const u=Fe(null),c=Ue(()=>(e=>{var t;if(!e.shuffleOptions)return e.choices;const n=[...e.choices],r=e.hasOpenChoice&&null!==(t=n.pop())&&void 0!==t?t:null,o=(i=n,(s=Dt(n)).length>1&&i.every((e,t)=>e===s[t])?s.reverse():s);var i,s;return ie(r)||o.push(r),o})(e),[e]),[d,f]=He(()=>((e,t)=>oe(e)||Jr(e)?e:t===at?null:[])(s,e.type)),[p,h]=He(()=>((e,t)=>{if(oe(e)&&!t.includes(e))return{isSelected:!0,inputValue:e};if(Jr(e)){const n=e.find(e=>!t.includes(e));if(n)return{isSelected:!0,inputValue:n}}return{isSelected:!1,inputValue:""}})(s,c)),{isPreviewMode:v}=Pr(),m=e.type===at,y=e.type===st,g=e.skipSubmitButton&&m&&!e.hasOpenChoice,b=(e,t)=>{if(t){const e=!p.isSelected;return h(t=>pe(pe({},t),{},{isSelected:e,inputValue:e?t.inputValue:""})),m&&f(""),void(e&&setTimeout(()=>{var e;return null===(e=u.current)||void 0===e?void 0:e.focus()},75))}if(m)return f(e),h(e=>pe(pe({},e),{},{isSelected:!1,inputValue:""})),void(g&&(o(e),v&&i(e)));y&&te(d)&&(d.includes(e)?f(d.filter(t=>t!==e)):f([...d,e]))},w=e=>{e.stopPropagation();const t=e.currentTarget.value;h(e=>pe(pe({},e),{},{inputValue:t})),m&&f(t)},x=e=>{e.stopPropagation(),"Enter"!==e.key||k()||(e.preventDefault(),T()),"Escape"===e.key&&(e.preventDefault(),h(e=>pe(pe({},e),{},{isSelected:!1,inputValue:""})),m&&f(null))},k=()=>!(e.optional||!ie(d)&&(!te(d)||p.isSelected||0!==d.length)&&(!p.isSelected||""!==p.inputValue.trim())),T=()=>{p.isSelected&&y?te(d)&&(v?i([...d,p.inputValue]):o([...d,p.inputValue])):v?i(d):o(d)};return Q(S,{children:[Q("div",{className:"question-container",children:[Q(Zr,{question:e,forceDisableHtml:t}),Q("fieldset",{className:"multiple-choice-options limit-height",children:[Q("legend",{className:"sr-only",children:y?" Select all that apply":" Select one"}),c.map((t,r)=>{const o=!!e.hasOpenChoice&&r===e.choices.length-1,i=`surveyQuestion${n}Choice${r}`,s=`${i}Open`,a=o?p.isSelected:m?d===t:te(d)&&d.includes(t);return Q("label",{className:o?"choice-option-open":"",children:[Q("div",{className:"response-choice",children:[Q("input",{type:m?"radio":"checkbox",name:i,checked:a,onChange:()=>b(t,o),id:i,"aria-controls":s}),Q("span",{children:o?`${t}:`:t})]}),o&&Q("input",{type:"text",ref:u,id:s,name:`question${n}Open`,value:p.inputValue,onKeyDown:x,onInput:w,onClick(e){p.isSelected||b(t,!0),e.stopPropagation()},"aria-label":`${t} - please specify`})]},r)})]})]}),Q(Qr,{text:e.buttonText||"Submit",submitDisabled:k(),appearance:r,onSubmit:T,onPreviewSubmit:T,skipSubmitButton:g,canGoBack:a,onBack:l})]})}const oo=[1,2,3,4,5],io=[1,2,3,4,5,6,7],so=[0,1,2,3,4,5,6,7,8,9,10],ao={2:[Rr,Fr],3:[jr,Lr,Cr],5:[Br,jr,Lr,Cr,Hr]};function lo(e){switch(e){case 5:default:return oo;case 7:return io;case 10:return so}}const uo=kt("[Surveys]");function co(e,t,n){var r;const o=e.questions[t],i=t+1;if(!(null===(r=o.branching)||void 0===r?void 0:r.type))return t===e.questions.length-1?ut:i;if(o.branching.type===ut)return ut;if("specific_question"===o.branching.type){if(Number.isInteger(o.branching.index))return o.branching.index}else if("response_based"===o.branching.type){if(o.type===at){var s;let e=o.choices.indexOf(`${n}`);if(-1===e&&o.hasOpenChoice&&(e=o.choices.length-1),null===(s=o.branching)||void 0===s||null===(s=s.responseValues)||void 0===s?void 0:s.hasOwnProperty(e)){const t=o.branching.responseValues[e];if(Number.isInteger(t))return t;if(t===ut)return ut}}else if(o.type===lt){var a;if(o.optional&&se(n))return i===e.questions.length?ut:i;if("number"!=typeof n||!Number.isInteger(n))throw new Error("The response type must be an integer");const t=function(e,t){if(2===t){if(1>e||e>2)throw new Error("The response must be in range 1-2");return 1===e?"positive":"negative"}if(3===t){if(1>e||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(1>e||e>5)throw new Error("The response must be in range 1-5");return e>2?3===e?"neutral":"positive":"negative"}if(7===t){if(1>e||e>7)throw new Error("The response must be in range 1-7");return e>3?4===e?"neutral":"positive":"negative"}if(10===t){if(0>e||e>10)throw new Error("The response must be in range 0-10");return e>6?e>8?"promoters":"passives":"detractors"}throw new Error("The scale must be one of: 2, 3, 5, 7, 10")}(n,o.scale);if(null===(a=o.branching)||void 0===a||null===(a=a.responseValues)||void 0===a?void 0:a.hasOwnProperty(t)){const e=o.branching.responseValues[t];if(Number.isInteger(e))return e;if(e===ut)return ut}}return i}return uo.warn("Falling back to next question index due to unexpected branching type"),i}const fo=-1,po="ph:show_survey_widget",ho={position:"relative",left:"unset",right:"unset",top:"unset",bottom:"unset",transform:"unset"};function vo({survey:e,removeSurveyFromFocus:t=()=>{},setSurveyVisible:n,isPreviewMode:r=!1,posthog:o}){Re(()=>{var i;if(r||!(null===(i=e.conditions)||void 0===i?void 0:i.url))return;const s=()=>{var r;const i=e.type===rt,s=Er(e,o),a=(null===(r=e.appearance)||void 0===r?void 0:r.widgetType)===Xe&&i;if(!s)return Ot.info(`Hiding survey ${e.id} because URL does not match`),n(!1),t(e);a&&(Ot.info(`Showing survey ${e.id} because it is a feedback button tab and URL matches`),n(!0))};St(window,"popstate",s),St(window,"hashchange",s);const a=window.history.pushState,l=window.history.replaceState;return window.history.pushState=function(...e){a.apply(this,e),s()},window.history.replaceState=function(...e){l.apply(this,e),s()},()=>{window.removeEventListener("popstate",s),window.removeEventListener("hashchange",s),window.history.pushState=a,window.history.replaceState=l}},[r,e,t,n,o])}function mo(e="right"){switch(e){case"top":return{top:"0",left:"50%",transform:"translateX(-50%)"};case"left":return{top:"50%",left:"0",transform:"rotate(90deg) translateY(-100%)",transformOrigin:"left top"};case"bottom":return{bottom:"0",left:"50%",transform:"translateX(-50%)"};default:return{top:"50%",right:"0",transform:"rotate(-90deg) translateY(-100%)",transformOrigin:"right top"}}}function yo({survey:e,forceDisableHtml:t,posthog:n,style:r={},previewPageIndex:o,removeSurveyFromFocus:i=()=>{},isPopup:s=!0,onPreviewSubmit:a=()=>{},onPreviewBack:l=()=>{},onPopupSurveyDismissed:u=()=>{},onCloseConfirmationMessage:c=()=>{},properties:d,isSurveyCompleted:f,skipShownEvent:p,surveyLanguage:h}){var v,m,y,g,b,w,x,k,S,T,q,_;const M=Fe(null),P=Number.isInteger(o),{isPopupVisible:A,isSurveySent:E,hidePopupWithAnimation:I}=function(e,t,n,r,o,i,s,a,l){const[u,c]=He(r||0===n||e.type===ot),[d,f]=He(!1),p=Fe(!1),h=()=>{const t=()=>{i&&o(e),c(!1)};if(p.current)return;const n=null==s?void 0:s.current;n?(p.current=!0,n.style.transition="opacity 200ms ease-out",n.style.opacity="0",setTimeout(()=>{p.current=!1,t()},250)):t()},v=t=>{t.detail.surveyId===e.id&&h()};return Re(()=>{if(!t)return void Ot.error("usePopupVisibility hook called without a PostHog instance.");if(r)return;let o;const i=t=>{var n,r;if(t.detail.surveyId===e.id){if(!(null===(n=e.appearance)||void 0===n?void 0:n.displayThankYouMessage))return h();f(!0),(null===(r=e.appearance)||void 0===r?void 0:r.autoDisappear)&&(o&&clearTimeout(o),o=setTimeout(h,5e3))}},s=()=>{var n;if(Er(e,t)){c(!0);try{localStorage.setItem("lastSeenSurveyDate",(new Date).toISOString())}catch(e){}window.dispatchEvent(new Event("PHSurveyShown")),a||null===(n=t.client)||void 0===n||n.capture(ct,pe(pe({[ht]:e.name,[pt]:e.id,[vt]:e.current_iteration,[mt]:e.current_iteration_start_date},l&&{[yt]:l}),{},{sessionRecordingUrl:Z(t)}))}};St(window,"PHSurveyClosed",v),St(window,"PHSurveySent",i);const u=n>0?setTimeout(s,n):void 0;return re(u)&&s(),()=>{re(u)||clearTimeout(u),re(o)||clearTimeout(o),window.removeEventListener("PHSurveyClosed",v),window.removeEventListener("PHSurveySent",i)}},[]),vo({survey:e,removeSurveyFromFocus:o,setSurveyVisible:c,isPreviewMode:r,posthog:t}),{isPopupVisible:u,isSurveySent:d,setIsPopupVisible:c,hidePopupWithAnimation:h}}(e,n,(null===(v=e.appearance)||void 0===v?void 0:v.surveyPopupDelaySeconds)?1e3*e.appearance.surveyPopupDelaySeconds:0,P,i,s,M,p,h),D=E||o===e.questions.length||!0===f,[O,N]=He(!1),z=Ue(()=>!!Nr(e),[e]),C=!(!(null===(m=e.appearance)||void 0===m?void 0:m.introScreenHeader)&&!(null===(y=e.appearance)||void 0===y?void 0:y.introScreenDescription)),L=P?-1===o:!!(null===(g=e.appearance)||void 0===g?void 0:g.displayIntroScreen)&&C&&!O&&!z,j=Ue(()=>{const t=Nr(e),r=(null==t?void 0:t.surveySubmissionId)||(_e||(_e=new ke)).generate().toString()||"";return{isPreviewMode:P,previewPageIndex:o,onPopupSurveyDismissed(){h?Tr(e,n,P,h):Tr(e,n,P),u()},isPopup:s||!1,surveySubmissionId:r,onPreviewSubmit:a,onPreviewBack:l,posthog:n,properties:d,surveyLanguage:h}},[P,o,s,n,e,u,a,l,d,h]);return A?Q(Mr.Provider,{value:j,children:Q("div",{className:"ph-survey",style:pe(pe({},zr(e.type,null===(b=e.appearance)||void 0===b?void 0:b.position,null===(w=e.appearance)||void 0===w?void 0:w.widgetType)),r),ref:M,children:D?Q(Yr,{header:(null===(x=e.appearance)||void 0===x?void 0:x.thankYouMessageHeader)||"Thank you!",description:(null===(k=e.appearance)||void 0===k?void 0:k.thankYouMessageDescription)||"",forceDisableHtml:!!t,contentType:null===(S=e.appearance)||void 0===S?void 0:S.thankYouMessageDescriptionContentType,appearance:e.appearance||yr,onClose(){I(),c()}}):L?Q(Kr,{header:(null===(T=e.appearance)||void 0===T?void 0:T.introScreenHeader)||"",description:(null===(q=e.appearance)||void 0===q?void 0:q.introScreenDescription)||"",forceDisableHtml:!!t,contentType:null===(_=e.appearance)||void 0===_?void 0:_.introScreenDescriptionContentType,appearance:e.appearance||yr,onStart:()=>N(!0)}):Q(go,{survey:e,forceDisableHtml:!!t,posthog:n})})}):null}function go({survey:e,forceDisableHtml:t,posthog:n}){var r,o;const i=Ue(()=>{const t=Nr(e);if(!t)return null;const n=ae(t.lastQuestionIndex);return!n||n&&t.lastQuestionIndex>=0&&e.questions.length>t.lastQuestionIndex?t:($r(e),null)},[e]),[s,a]=He(()=>((null==i?void 0:i.responses)&&Ot.info("Survey is already in progress, filling in initial responses"),(null==i?void 0:i.responses)||{})),[l,u]=He(!1),{previewPageIndex:c,onPopupSurveyDismissed:d,isPopup:f,onPreviewSubmit:p,onPreviewBack:h,surveySubmissionId:v,isPreviewMode:m,properties:y,surveyLanguage:g}=Ve(Mr),[b,w]=He(()=>{const t=null==i?void 0:i.lastQuestionIndex,n=ae(t)&&t>=0&&e.questions.length>t?t:0;return ae(c)&&c>=0?c:n}),[x,k]=He(()=>{var t;return(null!==(t=null==i?void 0:i.visitedIndices)&&void 0!==t?t:[]).filter(t=>t>=0&&e.questions.length>t)}),[S,T]=He(()=>{var t;const n=Nr(e);return null!==(t=null==n?void 0:n.questionSnapshots)&&void 0!==t?t:{}}),q=Ue(()=>qr(_r(e,i)),[e.id,i]),_=Ue(()=>{if(!q||new Set(q).size!==q.length)return _r(e,i);const t=new Map(e.questions.map(e=>[e.id,e])),n=q.map(e=>t.get(e)).filter(e=>!!e);return n.length===q.length?n:e.questions},[q,e.questions,e,i]);Re(()=>{!m||re(c)||0>c||w(c)},[c,m]);const M=!!(null===(r=e.appearance)||void 0===r?void 0:r.allowGoBack)&&(m?(null!=c?c:0)>0:x.length>0),P=_.at(b);return P?Q("form",{className:"survey-form",name:"surveyForm",children:[f&&!0!==(null===(o=e.appearance)||void 0===o?void 0:o.hideCancelButton)&&Q(Wr,{onClick(){d()}}),Q("div",{className:"survey-box","data-question-index":b,children:[l&&Q("p",{role:"alert",children:"Your response could not be sent. Please try again later."}),wo({question:P,forceDisableHtml:t,displayQuestionIndex:b,appearance:e.appearance||yr,onSubmit:t=>(({res:t,displayQuestionIndex:r,questionId:o})=>{var i;if(!n)return void Ot.error("onNextButtonClick called without a PostHog instance.");if(!(null===(i=n.client)||void 0===i?void 0:i.canCapture))return void u(!0);if(u(!1),!o)return void Ot.error("onNextButtonClick called without a questionId.");const{responses:l,questionSnapshots:c}=function({responses:e,questionSnapshots:t={}},n,r,o){return{responses:pe(pe({},e),{},{[Tt(n)]:r}),questionSnapshots:(null==o?void 0:o.id)?pe(pe({},t),{},{[o.id]:o.question}):t}}({responses:s,questionSnapshots:S},o,t,_[r]);a(l),T(c);const d=co(e,r,t),f=d===ut,p=[...x,r];if(f||(k(p),w(d),Or(e,{surveySubmissionId:v,responses:l,lastQuestionIndex:d,questionOrder:qr(_),visitedIndices:p,surveyLanguage:g,questionSnapshots:c})),e.enable_partial_responses||f){const t=new Set(p.map(e=>{var t;return null===(t=_[e])||void 0===t?void 0:t.id}).filter(e=>!!e).map(e=>Tt(e)));(({responses:e,survey:t,surveySubmissionId:n,posthog:r,isSurveyCompleted:o,properties:i,surveyLanguage:s,questionSnapshots:a})=>{var l,u,c;r?(null===(l=r.client)||void 0===l?void 0:l.canCapture)&&(Sr(t),o&&$r(t),null===(u=r.client)||void 0===u||u.capture(ft,pe(pe(pe({[ht]:t.name,[pt]:t.id,[vt]:t.current_iteration,[mt]:t.current_iteration_start_date,sessionRecordingUrl:Z(r)},_t(pe(pe({event:"sent",survey:t,responses:e,submissionId:n,completed:o},!re(s)&&{surveyLanguage:s}),!re(a)&&{questionSnapshots:a}))),i),{},{$set:{[Pt(t,"responded")]:!0}})),o&&(window.dispatchEvent(new CustomEvent("PHSurveySent",{detail:{surveyId:t.id}})),null===(c=r.client)||void 0===c||null===(c=c.getExtension("featureFlagsCommon"))||void 0===c||c.reloadFeatureFlags())):Ot.error("[survey sent] event not captured, PostHog instance not found.")})({responses:Object.fromEntries(Object.entries(l).filter(([e])=>t.has(e))),survey:e,surveySubmissionId:v,isSurveyCompleted:f,posthog:n,properties:y,surveyLanguage:g,questionSnapshots:c})}})({res:t,displayQuestionIndex:b,questionId:P.id}),onPreviewSubmit:p,initialValue:P.id?s[Tt(P.id)]:void 0,canGoBack:M,onBack(){if(m)return void h();if(0===x.length)return;const t=x[x.length-1],n=x.slice(0,-1);k(n),w(t),Or(e,{surveySubmissionId:v,responses:s,lastQuestionIndex:t,questionOrder:qr(_),visitedIndices:n,surveyLanguage:g,questionSnapshots:S})}})]})]}):null}function bo({survey:e,forceDisableHtml:t,posthog:n,readOnly:r,surveyLanguage:o}){var i,s,a,l,u,c,d,f;const[p,h]=He(!0),[v,m]=He(!1),[y,g]=He({}),b=Fe(void 0),w=()=>{var e;(v||!n||r||(null===(e=n.client)||void 0===e?void 0:e.canCapture))&&m(!v)};if(Re(()=>{var t,o,i;if(!n)return void Ot.error("FeedbackWidget called without a PostHog instance.");if(r)return;"tab"===(null===(t=e.appearance)||void 0===t?void 0:t.widgetType)&&g((i=null===(o=e.appearance)||void 0===o?void 0:o.position)&&i!==nt&&"next_to_trigger"!==i?{}:{top:"50%",bottom:"auto"});const s=t=>{var n;const r=t;(null===(n=r.detail)||void 0===n?void 0:n.surveyId)===e.id&&(Ot.info(`Received show event for feedback button survey ${e.id}`),g(r.detail.position||{}),w())};return St(window,po,s),()=>{re(b.current)||(clearTimeout(b.current),b.current=void 0),window.removeEventListener(po,s)}},[n,r,e.id,null===(i=e.appearance)||void 0===i?void 0:i.widgetType,null===(s=e.appearance)||void 0===s?void 0:s.position,null===(a=e.appearance)||void 0===a?void 0:a.widgetSelector,null===(l=e.appearance)||void 0===l?void 0:l.borderColor]),vo({survey:e,setSurveyVisible:h,posthog:n}),!p)return null;const x=()=>{"always"!==e.schedule&&h(!1),re(b.current)||clearTimeout(b.current),b.current=setTimeout(()=>{b.current=void 0,m(!1)},200)};return Q(S,{children:["tab"===(null===(u=e.appearance)||void 0===u?void 0:u.widgetType)&&Q("button",{className:"ph-survey-widget-tab "+("top"===(null===(c=e.appearance)||void 0===c?void 0:c.tabPosition)?"widget-tab-top":""),onClick:w,disabled:r,style:mo(null===(d=e.appearance)||void 0===d?void 0:d.tabPosition),children:(null===(f=e.appearance)||void 0===f?void 0:f.widgetLabel)||""}),v&&Q(yo,{posthog:n,survey:e,forceDisableHtml:t,style:y,onPopupSurveyDismissed:x,onCloseConfirmationMessage:x,surveyLanguage:o})]})}const wo=({question:e,forceDisableHtml:t,displayQuestionIndex:n,appearance:r,onSubmit:o,onPreviewSubmit:i,initialValue:s,canGoBack:a,onBack:l})=>{const u={forceDisableHtml:t,appearance:r,onPreviewSubmit(e){i(e)},onSubmit(e){o(e)},initialValue:s,displayQuestionIndex:n,canGoBack:a,onBack:l};switch(e.type){case it:return x(Xr,pe(pe({},u),{},{question:e,key:e.id}));case"link":return x(eo,pe(pe({},u),{},{question:e,key:e.id}));case lt:return x(to,pe(pe({},u),{},{question:e,key:e.id}));case at:case st:return x(ro,pe(pe({},u),{},{question:e,key:e.id}));default:return Ot.error(`Unsupported question type: ${e.type}`),null}};function xo(e){let t=!0;return{dispose(){if(t){t=!1;const n=e();n&&ne(n.then)&&n.then(void 0,()=>{})}}}}const ko="u">typeof window?window:void 0,So="u">typeof globalThis?globalThis:ko;null!=So&&So.XMLHttpRequest&&new So.XMLHttpRequest;const To="undefined"!=typeof globalThis?globalThis:ko;To&&"undefined"==typeof self&&(To.self=To),To&&"undefined"==typeof File&&(To.File=function(){});const qo=null!=ko?ko:{},_o=e=>{const t=typeof document>"u"?void 0:document,n=null==t?void 0:t.createElement("a");return re(n)?null:(n.href=e,n)},Mo=(e,t)=>{try{let n;return JSON.stringify(e,(e,t)=>{var r;return function(e){switch({}.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object DOMError]":case"[object WebAssembly.Exception]":return!0;default:return function(e,t){try{return e instanceof t}catch(e){return!1}}(e,Error)}}(t)?(null!==(r=n)&&void 0!==r||(n=new WeakMap),n.has(t)||n.set(t,function(e){const t=pe({},e);for(const n of["name","message","stack","cause","errors"])try{n in e&&(t[n]=e[n])}catch(e){}return t}(t)),n.get(t)):"bigint"==typeof t?t.toString():t},t)}catch(t){return function(e){var t;const n=[];return null!==(t=JSON.stringify(e,function(e,t){if("bigint"==typeof t)return t.toString();if("function"!=typeof t&&"symbol"!=typeof t){if(t instanceof Error)return{name:t.name,message:t.message,stack:t.stack};if(t&&"object"==typeof t){for(;n.length>0&&n[n.length-1]!==this;)n.pop();if(n.includes(t))return"[Circular]";n.push(t)}return t}}))&&void 0!==t?t:"null"}(e)}},Po=function(e,t="&"){let n,r;const o=[];return function(e,t){if(!se(e))if(te(e))e.forEach(t);else if((e=>e instanceof FormData)(e))e.forEach((e,n)=>t(e,n));else for(const n in e)X.call(e,n)&&t(e[n],n)}(e,function(e,t){re(e)||re(t)||"undefined"===t||(n=encodeURIComponent((e=>e instanceof File)(e)?e.name:e.toString()),r=encodeURIComponent(t),o[o.length]=r+"="+n)}),o.join(t)};bt.DEBUG=!1,bt.LIB_VERSION="1.455.0",bt.LIB_NAME="web";var Ao=bt;ue(function*(e){const t=yield function(e){return be.apply(this,arguments)}(Mo(e.data),Ao.DEBUG,{rethrow:!0});if(!t)return e;const n=yield t.arrayBuffer();return pe(pe({},e),{},{Mr:{contentType:"text/plain",body:n,estimatedSize:n.byteLength}})});const Eo=()=>{var e;return(null==ko||null===(e=ko.performance)||void 0===e?void 0:e.now)?ko.performance.now():Date.now()},Io=[],Do=[50,75,100,150,200,300,400,500,750,1e3,1500,2e3,3e3,5e3,1e4],Oo=[5,10,25,...Do];var No=class{constructor(e){this._instance=e}initialize(){}get(e){const t=this._instance.persistence;if("string"==typeof e)return null==t?void 0:t.get_property(e);const n={};for(const r of e){const e=null==t?void 0:t.get_property(r);re(e)||(n[r]=e)}return n}set(e,t){var n;null===(n=this._instance.persistence)||void 0===n||n.register("string"==typeof e?{[e]:t}:e)}remove(e){var t;null===(t=this._instance.persistence)||void 0===t||t.unregister(e)}},$o=class{constructor(e){this.instance=e,this.R=xt,this.kv=new No(e),this.onSession=e=>xo(this.instance.onSessionId(t=>{try{e(t)}catch(e){this.R.error("Browser extension session listener failed",e)}})),this.onEvent=e=>xo(this.instance._addCaptureHook((t,n)=>{if(n)try{e({event:t,properties:n.properties})}catch(e){this.R.error("Browser extension event listener failed",e)}})),this.onRemoteConfig=e=>{const t=t=>{try{e(t)}catch(e){this.R.error("Browser extension remote config listener failed",e)}},n=this.instance.Tr.on("extensionsRemoteConfig",t);return this.instance.Ir&&t(this.instance.Ir),xo(n)}}get logger(){return this.R}get distinctId(){return this.instance.get_distinct_id()}get anonymousId(){var e;return null!==(e=this.instance.get_property("$device_id"))&&void 0!==e?e:this.distinctId}get deviceId(){const e=this.instance.get_property("$device_id");return"string"==typeof e?e:void 0}get library(){return{name:Ao.LIB_NAME,version:Ao.LIB_VERSION}}get initialPersonProperties(){var e,t;return null!==(e=null===(t=this.instance.persistence)||void 0===t?void 0:t.get_initial_props())&&void 0!==e?e:{}}get groups(){return this.instance.getGroups()}get session(){try{var e,t,n,r,o;const i=null===(e=this.instance.sessionManager)||void 0===e?void 0:e.checkAndGetSessionAndWindowId(!0);return{sessionId:null!==(t=null==i?void 0:i.sessionId)&&void 0!==t?t:"",windowId:null!==(n=null==i?void 0:i.windowId)&&void 0!==n?n:"",sessionStartTimestamp:null!==(r=null==i?void 0:i.sessionStartTimestamp)&&void 0!==r?r:0,lastActivityTimestamp:null!==(o=null==i?void 0:i.lastActivityTimestamp)&&void 0!==o?o:0}}catch(e){return{sessionId:"",windowId:"",sessionStartTimestamp:0,lastActivityTimestamp:0}}}get isOptedOut(){return this.instance.has_opted_out_capturing()}get canCapture(){return ne(this.instance.is_capturing)?this.instance.is_capturing():!this.isOptedOut}get isRateLimited(){var e;return!!(null===(e=this.instance.rateLimiter)||void 0===e?void 0:e.isClientRateLimited)}get projectToken(){return this.instance.config.token}getExtension(e){let t;switch(e){case"featureFlags":case"featureFlagsCommon":t=this.instance.featureFlags;break;case"logs":t=this.instance.logs;break;case"surveys":t=this.instance.surveys;break;case"autocapture":t=this.instance.autocapture}return t}capture(e,t,n){if(!n)return this.Ar(this.instance.capture(e,t));const r=pe(pe({timestamp:n.timestamp,uuid:n.uuid,$set:n.set,$set_once:n.setOnce},"unload"===n.delivery?{transport:"sendBeacon",send_instantly:!0}:{}),"immediate"===n.delivery?{send_instantly:!0}:{});return this.Ar(this.instance.capture(e,t,r))}Ar(e){var t;return!re(e)||!(null===(t=this.instance.rateLimiter)||void 0===t?void 0:t.lastEventRateLimited)}registerDynamicEventProperties(e){return xo(this.instance.Rr(e))}sendRequest(e){var t=this;return ue(function*(e,n={}){var r;const o=null!==(r=n.target)&&void 0!==r?r:"api",i=n.query?((e,t,n=!0)=>{const r=e.indexOf("#"),o=-1===r?"":e.slice(r),i=-1===r?e:e.slice(0,r),s=i.indexOf("?"),a=-1===s?i:i.slice(0,s),l=-1===s?"":i.slice(s+1),u=pe({},t),c=l.split("&").filter(e=>""!==e).map(e=>{const t=e.indexOf("="),r=-1===t?e:e.slice(0,t),o=n?u[r]:void 0;return delete u[r],se(o)?e:`${r}=${o}`}),d=Po(u);return d&&c.push(d),`${c.length>0?`${a}?${c.join("&")}`:a}${o}`})(e,n.query):e,s=t.instance.requestRouter.endpointFor(o,i),a={method:n.method,url:s,data:n.body,headers:n.headers,timeout:n.timeoutMs,fireCallbackOnDrop:!0,transport:n.transport,compression:n.compression,compressionFallback:"flags"===n.target&&"best-available"===n.compression?W.Base64:void 0,timestampMode:n.sentAt};return"api"===o&&"/i/v1/logs"===e&&(a.batchKey="logs"),"sendBeacon"===n.transport?(t.instance._send_request(a),{statusCode:202}):new Promise(e=>{var n;if(a.callback=e,"flags"===o&&(null===(n=t.instance.config.metrics)||void 0===n?void 0:n.flags)){let n,r;a.onDispatch=()=>{n=Eo()},a.onSend=e=>{r=(e=>{try{return(e=>{var t;const n=null==ko?void 0:ko.PerformanceObserver,r=null===(t=_o(e))||void 0===t?void 0:t.href;if(!n||!r)return;const o=Eo(),i={name:r,before:1/0,inFlight:!0};let s,a,l,u=1/0,c=!1;const d=()=>{c||(c=!0,clearTimeout(l),h.disconnect(),Io.splice(Io.indexOf(i),1))};let f=!1;const p=e=>{for(const t of e){const e=t.startTime;t.name!==r||(f?o>=e:o>e)||e>=i.before||s&&e>=s.startTime||(s=t)}if(s&&a&&u>=s.startTime){const e=a;d(),e(s)}},h=new n(e=>p(e.getEntriesByName(r,"resource")));h.observe({entryTypes:["resource"]});for(const e of Io)e.name===r&&(e.before=Math.min(e.before,o),f=f||e.inFlight);return Io.push(i),{take(e,t){c||(u=e,i.inFlight=!1,a=t,l=setTimeout(d,5e3),ne(h.takeRecords)&&p(h.takeRecords()))},stop:d}})(e)}catch(e){return}})(e)},a.callback=o=>{if(e(o),re(n))return;const i=n,a=Eo();try{const e=((e,t)=>{var n,r;const o=t.statusCode||void 0,i={"server.address":(null!==(n=null===(r=_o(e))||void 0===r?void 0:r.hostname)&&void 0!==n?n:e).replace(/^\[(.*)\]$/,"$1")};o&&(i["http.response.status_code"]=o);const s=((e,t)=>e?400>e?void 0:String(e):"AbortError"===(null==t?void 0:t.name)?"timeout":"_OTHER")(o,t.error);s&&(i["error.type"]=s);const a=function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}}();return a&&(i["client.timezone"]=a),i})(s,o);if(t.Er("posthog.flags.request.duration",a-i,Do,e),o.statusCode&&r)return void r.take(a,n=>t.Or(n,i,a,e))}catch(e){xt.error("Failed to record the /flags request timing",e)}null==r||r.stop()}}t.instance._send_request(a)})}).apply(this,arguments)}Or(e,t,n,r){if(e.responseEnd>=e.startTime)try{const o=Math.min(e.responseEnd,n);this.Er("posthog.flags.request.pre_send_duration",e.startTime-t,Oo,r),this.Er("posthog.flags.request.network_duration",o-e.startTime,Do,r),this.Er("posthog.flags.request.main_thread_duration",n-o,Oo,r)}catch(e){xt.error("Failed to record the /flags request timing split",e)}}Er(e,t,n,r){var o;null===(o=this.instance.metrics)||void 0===o||o.histogram(e,t,{unit:"ms",attributes:pe({},r),bounds:n})}},zo=class{constructor(e){this._instance=e}get(){var e,t,n,r;const o=null===(e=this._instance)||void 0===e?void 0:e.config;return{disableSurveys:!!(null==o?void 0:o.disable_surveys),cookielessMode:!!(null==o?void 0:o.cookieless_mode),advancedEnableSurveys:!!(null==o?void 0:o.advanced_enable_surveys),requestTimeoutMs:null!==(t=null==o?void 0:o.surveys_request_timeout_ms)&&void 0!==t?t:1e4,prefillFromUrl:!!(null==o||null===(n=o.surveys)||void 0===n?void 0:n.prefillFromUrl),automaticDisplay:!(null==o?void 0:o.disable_surveys_automatic_display),featureFlagEvaluation:!(null==o?void 0:o.advanced_disable_feature_flags),overrideLanguage:null==o?void 0:o.override_display_language,prepareStylesheet:null==o?void 0:o.prepare_external_dependency_stylesheet,get_current_url:null==o?void 0:o.get_current_url,uiHost:null===(r=this._instance)||void 0===r||null===(r=r.requestRouter)||void 0===r?void 0:r.endpointFor("ui","")}}getExtensions(){const e=null==qo?void 0:qo.__PosthogExtensions__;if(!e||!this._instance)return;const t=this._instance,{generateSurveys:n}=e,r=(null==(o=t)?void 0:o.config.require_subresource_integrity)?o.__loadExternalDependency:null===(i=qo.__PosthogExtensions__)||void 0===i?void 0:i.loadExternalDependency;var o,i;return{generateSurveys:n?e=>n(t,e):void 0,loadExternalDependency:r?e=>r(t,"surveys",e):void 0}}onMatchingConditionsChanged(e){var t,n;const r=null===(t=this._instance)||void 0===t?void 0:t._addCaptureHook(t=>{"$pageview"!==t&&t!==ct&&t!==dt&&t!==ft||e()}),o=()=>e();St(ko,"PHSurveyShown",o);let i=!1;const s=null===(n=this._instance)||void 0===n?void 0:n.onFeatureFlags(()=>{i&&e()});return i=!0,()=>{i=!1,null==r||r(),null==s||s(),null==ko||ko.removeEventListener("PHSurveyShown",o)}}};const Co=new WeakMap;function Lo(e){var t;const n=new zo(e);if(!e)return{get config(){return n.get()}};if(null===(t=e.surveys)||void 0===t?void 0:t.getRenderContext)return e.surveys.getRenderContext();let r=Co.get(e);return r||(r={client:new $o(e),get config(){return n.get()},surveys:e.surveys},Co.set(e,r)),r}const jo=e=>(({survey:e,root:t,forceDisableHtml:n,posthog:r})=>{const o=kr();o&&(t.appendChild(o),br(t,e.type,e.appearance)),V(Q(bo,{forceDisableHtml:n,survey:e,posthog:r,readOnly:!0}),t)})(pe(pe({},e),{},{posthog:Lo()})),Bo=e=>(({survey:e,parentElement:t,previewPageIndex:n,forceDisableHtml:r,onPreviewSubmit:o,onPreviewBack:i,posthog:s,positionStyles:a=ho})=>{const l=t.querySelector("style[data-ph-survey-style]");l&&l.remove();const u=kr();u&&(t.appendChild(u),br(t,e.type,e.appearance)),V(Q(yo,{survey:e,posthog:s,forceDisableHtml:r,style:a,onPreviewSubmit:o,onPreviewBack:i,previewPageIndex:n,removeSurveyFromFocus(){}}),t)})(pe(pe({},e),{},{posthog:Lo(e.posthog)}));export{fo as INTRO_SCREEN_PREVIEW_INDEX,co as getNextSurveyStep,jo as renderFeedbackWidgetPreview,Bo as renderSurveysPreview};
|
|
1
|
+
var e,t,n,r,o,i,s,a,l,u,c,d,f,p,h,v={},m=[],y=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,g=Array.isArray;function b(e,t){for(var n in t)e[n]=t[n];return e}function w(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function x(t,n,r){var o,i,s,a={};for(s in n)"key"==s?o=n[s]:"ref"==s?i=n[s]:a[s]=n[s];if(arguments.length>2&&(a.children=arguments.length>3?e.call(arguments,2):r),"function"==typeof t&&null!=t.defaultProps)for(s in t.defaultProps)void 0===a[s]&&(a[s]=t.defaultProps[s]);return k(t,a,o,i,null)}function k(e,r,o,i,s){var a={type:e,props:r,key:o,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==s?++n:s,__i:-1,__u:0};return null==s&&null!=t.vnode&&t.vnode(a),a}function S(e){return e.children}function T(e,t){this.props=e,this.context=t}function $(e,t){if(null==t)return e.__?$(e.__,e.__i+1):null;for(var n;e.__k.length>t;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?$(e):null}function q(e){if(e.__P&&e.__d){var n=e.__v,r=n.__e,o=[],i=[],s=b({},n);s.__v=n.__v+1,t.vnode&&t.vnode(s),C(e.__P,s,n,e.__n,e.__P.namespaceURI,32&n.__u?[r]:null,o,null==r?$(n):r,!!(32&n.__u),i),s.__v=n.__v,s.__.__k[s.__i]=s,j(o,s,i),n.__e=n.__=null,s.__e!=r&&_(s)}}function _(e){if(null!=(e=e.__)&&null!=e.__c)return e.__e=e.__c.base=null,e.__k.some(function(t){if(null!=t&&null!=t.__e)return e.__e=e.__c.base=t.__e}),_(e)}function M(e){(!e.__d&&(e.__d=!0)&&r.push(e)&&!P.__r++||o!=t.debounceRendering)&&((o=t.debounceRendering)||i)(P)}function P(){try{for(var e,t=1;r.length;)r.length>t&&r.sort(s),e=r.shift(),t=r.length,q(e)}finally{r.length=P.__r=0}}function A(e,t,n,r,o,i,s,a,l,u,c){var d,f,p,h,y,g,b,w=r&&r.__k||m,x=t.length;for(l=E(n,t,w,l,x),d=0;x>d;d++)null!=(p=n.__k[d])&&(f=-1!=p.__i&&w[p.__i]||v,p.__i=d,g=C(e,p,f,o,i,s,a,l,u,c),h=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&R(f.ref,null,p),c.push(p.ref,p.__c||h,p)),null==y&&null!=h&&(y=h),(b=!!(4&p.__u))||f.__k===p.__k?(l=I(p,l,e,b),b&&f.__e&&(f.__e=null)):"function"==typeof p.type&&void 0!==g?l=g:h&&(l=h.nextSibling),p.__u&=-7);return n.__e=y,l}function E(e,t,n,r,o){var i,s,a,l,u,c=n.length,d=c,f=0;for(e.__k=new Array(o),i=0;o>i;i++)null!=(s=t[i])&&"boolean"!=typeof s&&"function"!=typeof s?("string"==typeof s||"number"==typeof s||"bigint"==typeof s||s.constructor==String?s=e.__k[i]=k(null,s,null,null,null):g(s)?s=e.__k[i]=k(S,{children:s},null,null,null):void 0===s.constructor&&s.__b>0?s=e.__k[i]=k(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[i]=s,l=i+f,s.__=e,s.__b=e.__b+1,a=null,-1!=(u=s.__i=D(s,n,l,d))&&(d--,(a=n[u])&&(a.__u|=2)),null==a||null==a.__v?(-1==u&&(o>c?f--:c>o&&f++),"function"!=typeof s.type&&(s.__u|=4)):u!=l&&(u==l-1?f--:u==l+1?f++:(u>l?f--:f++,s.__u|=4))):e.__k[i]=null;if(d)for(i=0;c>i;i++)null!=(a=n[i])&&!(2&a.__u)&&(a.__e==r&&(r=$(a)),F(a,a));return r}function I(e,t,n,r){var o,i;if("function"==typeof e.type){for(o=e.__k,i=0;o&&o.length>i;i++)o[i]&&(o[i].__=e,t=I(o[i],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=$(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8==t.nodeType);return t}function D(e,t,n,r){var o,i,s,a=e.key,l=e.type,u=t[n],c=null!=u&&!(2&u.__u);if(null===u&&null==a||c&&a==u.key&&l==u.type)return n;if(r>(c?1:0))for(o=n-1,i=n+1;o>=0||t.length>i;)if(null!=(u=t[s=0>o?i++:o--])&&!(2&u.__u)&&a==u.key&&l==u.type)return s;return-1}function O(e,t,n){"-"==t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||y.test(t)?n:n+"px"}function N(e,t,n,r,o){var i,s;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||O(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||O(e.style,t,n[t])}else if("o"==t[0]&&"n"==t[1])i=t!=(t=t.replace(c,"$1")),s=t.toLowerCase(),t=s in e||"onFocusOut"==t||"onFocusIn"==t?s.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n[u]=r[u]:(n[u]=d,e.addEventListener(t,i?p:f,i)):e.removeEventListener(t,i?p:f,i);else{if("http://www.w3.org/2000/svg"==o)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&&"popover"!=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,"popover"==t&&1==n?"":n))}}function z(e){return function(n){if(this.l){var r=this.l[n.type+e];if(null==n[l])n[l]=d++;else if(r[u]>n[l])return;return r(t.event?t.event(n):n)}}}function C(e,n,r,o,i,s,a,l,u,c){var d,f,p,h,v,y,x,k,q,_,$,M,P,E,I,D,O=n.type;if(void 0!==n.constructor)return null;128&r.__u&&(u=!!(32&r.__u),s=[l=n.__e=r.__e]),(d=t.__b)&&d(n);e:if("function"==typeof O){f=a.length;try{if(q=n.props,_=O.prototype&&O.prototype.render,$=(d=O.contextType)&&o[d.__c],M=d?$?$.props.value:d.__:o,r.__c?k=(p=n.__c=r.__c).__=p.__E:(_?n.__c=p=new O(q,M):(n.__c=p=new T(q,M),p.constructor=O,p.render=U),$&&$.sub(p),p.state||(p.state={}),p.__n=o,h=p.__d=!0,p.__h=[],p._sb=[]),_&&null==p.__s&&(p.__s=p.state),_&&null!=O.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=b({},p.__s)),b(p.__s,O.getDerivedStateFromProps(q,p.__s))),v=p.props,y=p.state,p.__v=n,h)_&&null==O.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),_&&null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(_&&null==O.getDerivedStateFromProps&&q!==v&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(q,M),n.__v==r.__v||!p.__e&&null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(q,p.__s,M)){n.__v!=r.__v&&(p.props=q,p.state=p.__s,p.__d=!1),n.__e=r.__e,n.__k=r.__k,n.__k.some(function(e){e&&(e.__=n)}),m.push.apply(p.__h,p._sb),p._sb=[],p.__h.length&&a.push(p);break e}null!=p.componentWillUpdate&&p.componentWillUpdate(q,p.__s,M),_&&null!=p.componentDidUpdate&&p.__h.push(function(){p.componentDidUpdate(v,y,x)})}if(p.context=M,p.props=q,p.__P=e,p.__e=!1,P=t.__r,E=0,_)p.state=p.__s,p.__d=!1,P&&P(n),d=p.render(p.props,p.state,p.context),m.push.apply(p.__h,p._sb),p._sb=[];else do{p.__d=!1,P&&P(n),d=p.render(p.props,p.state,p.context),p.state=p.__s}while(p.__d&&25>++E);p.state=p.__s,null!=p.getChildContext&&(o=b(b({},o),p.getChildContext())),_&&!h&&null!=p.getSnapshotBeforeUpdate&&(x=p.getSnapshotBeforeUpdate(v,y)),I=null!=d&&d.type===S&&null==d.key?B(d.props.children):d,l=A(e,g(I)?I:[I],n,r,o,i,s,a,l,u,c),p.base=n.__e,n.__u&=-161,p.__h.length&&a.push(p),k&&(p.__E=p.__=null)}catch(e){if(a.length=f,n.__v=null,u||null!=s)if(e.then){for(n.__u|=u?160:128;l&&8==l.nodeType&&l.nextSibling;)l=l.nextSibling;null!=s&&(s[s.indexOf(l)]=null),n.__e=l}else{if(null!=s)for(D=s.length;D--;)w(s[D]);L(n)}else n.__e=r.__e,!n.__k&&r.__k&&(n.__k=r.__k),e.then||L(n);t.__e(e,n,r)}}else null==s&&n.__v==r.__v?(n.__k=r.__k,n.__e=r.__e):l=n.__e=H(r.__e,n,r,o,i,s,a,u,c);return(d=t.diffed)&&d(n),128&n.__u?void 0:l}function L(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(L))}function j(e,n,r){for(var o=0;r.length>o;o++)R(r[o],r[++o],r[++o]);t.__c&&t.__c(n,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(e){e.call(n)})}catch(e){t.__e(e,n.__v)}})}function B(e){return"object"!=typeof e||null==e||e.__b>0?e:g(e)?e.map(B):void 0!==e.constructor?null:b({},e)}function H(n,r,o,i,s,a,l,u,c){var d,f,p,h,m,y,b,x=o.props||v,k=r.props,S=r.type;if("svg"==S?s="http://www.w3.org/2000/svg":"math"==S?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),null!=a)for(d=0;a.length>d;d++)if((m=a[d])&&"setAttribute"in m==!!S&&(S?m.localName==S:3==m.nodeType)){n=m,a[d]=null;break}if(null==n){if(null==S)return document.createTextNode(k);n=document.createElementNS(s,S,k.is&&k),u&&(t.__m&&t.__m(r,a),u=!1),a=null}if(null==S)x===k||u&&n.data==k||(n.data=k);else{if(a="textarea"==S&&null!=k.defaultValue?null:a&&e.call(n.childNodes),!u&&null!=a)for(x={},d=0;n.attributes.length>d;d++)x[(m=n.attributes[d]).name]=m.value;for(d in x)m=x[d],"dangerouslySetInnerHTML"==d?p=m:"children"==d||d in k||"value"==d&&"defaultValue"in k||"checked"==d&&"defaultChecked"in k||N(n,d,null,m,s);for(d in k)m=k[d],"children"==d?h=m:"dangerouslySetInnerHTML"==d?f=m:"value"==d?y=m:"checked"==d?b=m:u&&"function"!=typeof m||x[d]===m||N(n,d,m,x[d],s);if(f)u||p&&(f.__html==p.__html||f.__html==n.innerHTML)||(n.innerHTML=f.__html),r.__k=[];else if(p&&(n.innerHTML=""),A("template"==r.type?n.content:n,g(h)?h:[h],r,o,i,"foreignObject"==S?"http://www.w3.org/1999/xhtml":s,a,l,a?a[0]:o.__k&&$(o,0),u,c),null!=a)for(d=a.length;d--;)w(a[d]);u&&"textarea"!=S||(d="value","progress"==S&&null==y?n.removeAttribute("value"):null!=y&&(y!==n[d]||"progress"==S&&!y||"option"==S&&y!=x[d])&&N(n,d,y,x[d],s),d="checked",null!=b&&b!=n[d]&&N(n,d,b,x[d],s))}return n}function R(e,n,r){try{if("function"==typeof e){var o="function"==typeof e.__u;o&&e.__u(),o&&null==n||(e.__u=e(n))}else e.current=n}catch(e){t.__e(e,r)}}function F(e,n,r){var o,i;if(t.unmount&&t.unmount(e),(o=e.ref)&&(o.current&&o.current!=e.__e||R(o,null,n)),null!=(o=e.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(e){t.__e(e,n)}o.base=o.__P=o.__n=null}if(o=e.__k)for(i=0;o.length>i;i++)o[i]&&F(o[i],n,r||"function"!=typeof e.type);r||w(e.__e),e.__c=e.__=e.__e=void 0}function U(e,t,n){return this.constructor(e,n)}function V(n,r,o){var i,s,a,l;r==document&&(r=document.documentElement),t.__&&t.__(n,r),s=(i="function"==typeof o)?null:o&&o.__k||r.__k,a=[],l=[],C(r,n=(!i&&o||r).__k=x(S,null,[n]),s||v,v,r.namespaceURI,!i&&o?[o]:s?null:r.firstChild?e.call(r.childNodes):null,a,!i&&o?o:s?s.__e:r.firstChild,i,l),j(a,n,l),n.props.children=null}e=m.slice,t={__e(e,t,n,r){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(t){e=t}throw e}},n=0,T.prototype.setState=function(e,t){var n=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=b({},this.state);"function"==typeof e&&(e=e(b({},n),this.props)),e&&b(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),M(this))},T.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),M(this))},T.prototype.render=S,r=[],i="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,s=function(e,t){return e.__v.__b-t.__v.__b},P.__r=0,a=Math.random().toString(8),l="__d"+a,u="__a"+a,c=/(PointerCapture)$|Capture$/i,d=0,f=z(!1),p=z(!0),h=0;var G=0;function Q(e,n,r,o,i,s){n||(n={});var a,l,u=n;if("ref"in u)for(l in u={},n)"ref"==l?a=n[l]:u[l]=n[l];var c={type:e,props:u,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--G,__i:-1,__u:0,__source:i,__self:s};if("function"==typeof e&&(a=e.defaultProps))for(l in a)void 0===u[l]&&(u[l]=a[l]);return t.vnode&&t.vnode(c),c}function Z({client:e,config:t}){var n;if(!e||!t.uiHost)return;const r=null===(n=e.session)||void 0===n?void 0:n.sessionId;return r?`${t.uiHost}/project/${e.projectToken}/replay/${r}`:void 0}var W=function(e){return e.GZipJS="gzip-js",e.Base64="base64",e}({});const Y="min_length",K="max_length",J=Object.prototype,X=J.hasOwnProperty,ee=J.toString,te=Array.isArray||function(e){return"[object Array]"===ee.call(e)},ne=e=>"function"==typeof e,re=e=>void 0===e,oe=e=>"[object String]"==ee.call(e),ie=e=>null===e,se=e=>re(e)||ie(e),ae=e=>"[object Number]"==ee.call(e)&&e==e;function le(e,t,n,r,o,i,s){try{var a=e[i](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,o)}function ue(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function s(e){le(i,r,o,s,a,"next",e)}function a(e){le(i,r,o,s,a,"throw",e)}s(void 0)})}}function ce(e){return ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ce(e)}function de(e,t,n){return(t=function(e){var t=function(e){if("object"!=ce(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ce(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ce(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function pe(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fe(Object(n),!0).forEach(function(t){de(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fe(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}let he;const ve=e=>{throw function(e,t){const n=new Error(t);try{Object.defineProperty(n,"name",{value:"NativeGzipValidationError",writable:!0,enumerable:!0,configurable:!0})}catch(e){}return n}(0,`Native gzip produced invalid output: ${e}`)};let me=0,ye=!1;const ge=function(){var e=ue(function*(e,t){18>e.size&&ve("too-short");const n=new Uint8Array(yield e.slice(0,10).arrayBuffer());var r;(2>(r=n).length||31!==r[0]||139!==r[1]||8!==n[2])&&ve("invalid-header");const o=new DataView(yield e.slice(e.size-8).arrayBuffer()),i=t.length>>>0;o.getUint32(4,!0)!==i&&ve("invalid-size"),(ye||3>me)&&(o.getUint32(0,!0)!==(e=>{const t=(()=>{if(he)return he;he=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)t=1&t?3988292384^t>>>1:t>>>1;he[e]=t>>>0}return he})();let n=4294967295;for(let r=0;e.length>r;r++)n=t[255&(n^e[r])]^n>>>8;return(4294967295^n)>>>0})(t)&&(ye=!0,ve("invalid-crc")),me++)});return function(t,n){return e.apply(this,arguments)}}();function be(){return be=ue(function*(e,t=!0,n){try{const t=(new TextEncoder).encode(e),n=new globalThis.CompressionStream("gzip"),o=n.writable.getWriter(),i=o.write(t).then(()=>o.close()).catch((r=ue(function*(e){try{yield o.abort(e)}catch(e){}throw e}),function(e){return r.apply(this,arguments)})),s=new Response(n.readable).blob(),[a]=yield Promise.all([s,i]);return yield ge(a,t),a}catch(e){if(null==n?void 0:n.rethrow)throw e;return t&&console.error("Failed to gzip compress data",e),null}var r}),be.apply(this,arguments)}function we(e,t){if(!e)return;const n=e.find(e=>e.type===t);return null==n?void 0:n.value}var xe=class e{constructor(e){if(this.bytes=e,16!==e.length)throw new TypeError("not 128-bit length")}static fromFieldsV7(t,n,r,o){if(!Number.isInteger(t)||!Number.isInteger(n)||!Number.isInteger(r)||!Number.isInteger(o)||0>t||0>n||0>r||0>o||t>0xffffffffffff||n>4095||r>1073741823||o>4294967295)throw new RangeError("invalid field value");const i=new Uint8Array(16);return i[0]=t/Math.pow(2,40),i[1]=t/Math.pow(2,32),i[2]=t/Math.pow(2,24),i[3]=t/Math.pow(2,16),i[4]=t/256,i[5]=t,i[6]=112|n>>>8,i[7]=n,i[8]=128|r>>>24,i[9]=r>>>16,i[10]=r>>>8,i[11]=r,i[12]=o>>>24,i[13]=o>>>16,i[14]=o>>>8,i[15]=o,new e(i)}toString(){let e="";for(let t=0;this.bytes.length>t;t++)e=e+(this.bytes[t]>>>4).toString(16)+(15&this.bytes[t]).toString(16),3!==t&&5!==t&&7!==t&&9!==t||(e+="-");if(36!==e.length)throw new Error("Invalid UUIDv7 was generated");return e}clone(){return new e(this.bytes.slice(0))}equals(e){return 0===this.compareTo(e)}compareTo(e){for(let t=0;16>t;t++){const n=this.bytes[t]-e.bytes[t];if(0!==n)return Math.sign(n)}return 0}},ke=class{generate(){const e=this.generateOrAbort();if(!re(e))return e;{this.Mt=0;const e=this.generateOrAbort();if(re(e))throw new Error("Could not generate UUID after timestamp reset");return e}}generateOrAbort(){const e=(()=>{const e=Date.now();return ae(e)&&isFinite(e)?Math.min(Math.max(Math.floor(e),0),0xffffffffffff):0})();if(e>this.Mt)this.Mt=e,this.Tt();else{if(this.Mt>=e+1e4)return;this.It++,this.It>4398046511103&&(this.Mt++,this.Tt())}return xe.fromFieldsV7(this.Mt,Math.trunc(this.It/Math.pow(2,30)),this.It&Math.pow(2,30)-1,this.At.nextUint32())}Tt(){this.It=1024*this.At.nextUint32()+(1023&this.At.nextUint32())}constructor(){this.Mt=0,this.It=0,this.At=new qe}};const Se=e=>{if("u">typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(let t=0;e.length>t;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};let Te;var qe=class{nextUint32(){var e;return this.Rt.length>this.Et||((null!==(e=Te)&&void 0!==e?e:Te="u">typeof window&&!re(window.crypto)&&crypto.getRandomValues?e=>{try{return crypto.getRandomValues(e)}catch(t){return Se(e)}}:Se)(this.Rt),this.Et=0),this.Rt[this.Et++]}constructor(){this.Rt=new Uint32Array(8),this.Et=1/0}};let _e;var Me,Pe,Ae,Ee,Ie=0,De=[],Oe=t,Ne=Oe.__b,$e=Oe.__r,ze=Oe.diffed,Ce=Oe.__c,Le=Oe.unmount,je=Oe.__;function Be(e,t){Oe.__h&&Oe.__h(Pe,e,Ie||t),Ie=0;var n=Pe.__H||(Pe.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function He(e){return Ie=1,function(e,t){var n=Be(Me++,2);if(n.t=e,!n.__c&&(n.__=[Je(void 0,t),function(e){var t=n.__N?n.__N[0]:n.__[0],r=n.t(t,e);t!==r&&(n.__N=[r,n.__[1]],n.__c.setState({}))}],n.__c=Pe,!Pe.__f)){var r=function(e,t,r){if(!n.__c.__H)return!0;var i=!1,s=n.__c.props!==e;if(n.__c.__H.__.some(function(e){if(e.__N){i=!0;var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(s=!0)}}),o){var a=o.call(this,e,t,r);return i?a||s:a}return!i||s};Pe.__f=!0;var o=Pe.shouldComponentUpdate,i=Pe.componentWillUpdate;Pe.componentWillUpdate=function(e,t,n){if(this.__e){var s=o;o=void 0,r(e,t,n),o=s}i&&i.call(this,e,t,n)},Pe.shouldComponentUpdate=r}return n.__N||n.__}(Je,e)}function Re(e,t){var n=Be(Me++,3);!Oe.__s&&Ke(n.__H,t)&&(n.__=e,n.u=t,Pe.__H.__h.push(n))}function Fe(e){return Ie=5,Ue(function(){return{current:e}},[])}function Ue(e,t){var n=Be(Me++,7);return Ke(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Ve(e){var t=Pe.context[e.__c],n=Be(Me++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(Pe)),t.props.value):e.__}function Ge(){for(var e;e=De.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(We),t.__h.some(Ye),t.__h=[]}catch(n){t.__h=[],Oe.__e(n,e.__v)}}}Oe.__b=function(e){Pe=null,Ne&&Ne(e)},Oe.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),je&&je(e,t)},Oe.__r=function(e){$e&&$e(e),Me=0;var t=(Pe=e.__c).__H;t&&(Ae===Pe?(t.__h=[],Pe.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.length&&Ge(),Me=0)),Ae=Pe},Oe.diffed=function(e){ze&&ze(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==De.push(t)&&Ee===Oe.requestAnimationFrame||((Ee=Oe.requestAnimationFrame)||Ze)(Ge)),t.__H.__.some(function(e){e.u&&(e.__H=e.u,e.u=void 0)})),Ae=Pe=null},Oe.__c=function(e,t){t.some(function(e){try{e.__h.some(We),e.__h=e.__h.filter(function(e){return!e.__||Ye(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],Oe.__e(n,e.__v)}}),Ce&&Ce(e,t)},Oe.unmount=function(e){Le&&Le(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{We(e)}catch(e){t=e}}),n.__H=void 0,t&&Oe.__e(t,n.__v))};var Qe="function"==typeof requestAnimationFrame;function Ze(e){var t,n=function(){clearTimeout(r),Qe&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Qe&&(t=requestAnimationFrame(n))}function We(e){var t=Pe,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),Pe=t}function Ye(e){var t=Pe;e.__c=e.__(),Pe=t}function Ke(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function Je(e,t){return"function"==typeof t?t(e):t}const Xe="tab",et="left",tt="center",nt="right",rt="widget",ot="external_survey",it="open",st="multiple_choice",at="single_choice",lt="rating",ut="end",ct="survey shown",dt="survey dismissed",ft="survey sent",pt="$survey_id",ht="$survey_name",vt="$survey_iteration",mt="$survey_iteration_start_date",yt="$survey_language",gt="0.14.1",bt={DEBUG:!1,LIB_VERSION:gt,LIB_NAME:"browser-common",JS_SDK_VERSION:gt},wt=(e,{debugEnabled:t}={})=>{const n={N(n,...r){let o;try{o=typeof window>"u"?void 0:window}catch(e){return}o&&(bt.DEBUG||o.POSTHOG_DEBUG||t)&&!re(o.console)&&o.console&&("__rrweb_original__"in o.console[n]?o.console[n].__rrweb_original__:o.console[n])(e,...r)},debug(...e){n.N("debug",...e)},info(...e){n.N("log",...e)},warn(...e){n.N("warn",...e)},error(...e){n.N("error",...e)},critical(...t){console.error(e,...t)},uninitializedWarning(e){n.error(`You must initialize PostHog before calling ${e}`)},createLogger:(t,n)=>wt(`${e} ${t}`,n)};return n},xt=wt("[PostHog.js]"),kt=(e,t)=>xt.createLogger(e,t);function St(e,t,n,r){const{capture:o=!1,passive:i=!0}=null!=r?r:{};null==e||e.addEventListener(t,n,{capture:o,passive:i})}function Tt(e){return`$survey_response_${e}`}function qt(e,t){if(!t)return null;const n=e[Tt(t)];return te(n)?[...n]:n}function _t({event:e,survey:t,responses:n={},submissionId:r,completed:o,surveyLanguage:i,questionSnapshots:s}){return pe(pe(pe(pe({},!re(r)&&{$survey_submission_id:r}),"sent"===e?!re(o)&&{$survey_completed:o}:{$survey_partially_completed:Mt(n)}),i&&{$survey_language:i}),function(e={},t,n){const r={};return t.questions.forEach(t=>{if(re(t.originalQuestionIndex))return;const n=0===(o=t.originalQuestionIndex)?"$survey_response":`$survey_response_${o}`;var o;const i=qt(e,t.id);re(i)||(r[n]=i)}),pe(pe({$survey_questions:t.questions.map(t=>{var r,o;return{id:t.id,question:null!==(r=null==n?void 0:n[null!==(o=t.id)&&void 0!==o?o:""])&&void 0!==r?r:t.question,response:qt(e,t.id)}})},e),r)}(n,t,s))}function Mt(e={}){return Object.values(e).some(e=>!se(e))}function Pt(e,t){let n=`$survey_${t}/${e.id}`;return e.current_iteration&&e.current_iteration>0&&(n=`$survey_${t}/${e.id}/${e.current_iteration}`),n}const At=(e,t)=>{if(!(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}},Et=e=>e.toLowerCase(),It={exact:(e,t)=>t.some(t=>e.some(e=>t===e)),is_not:(e,t)=>t.every(t=>e.every(e=>t!==e)),regex:(e,t)=>t.some(t=>e.some(e=>At(t,e))),not_regex:(e,t)=>t.every(t=>e.every(e=>!At(t,e))),icontains:(e,t)=>t.map(Et).some(t=>e.map(Et).some(e=>t.includes(e))),not_icontains:(e,t)=>t.map(Et).every(t=>e.map(Et).every(e=>!t.includes(e))),gt:(e,t)=>t.some(t=>{const n=parseFloat(t);return!isNaN(n)&&e.some(e=>n>parseFloat(e))}),lt:(e,t)=>t.some(t=>{const n=parseFloat(t);return!isNaN(n)&&e.some(e=>n<parseFloat(e))})},Dt=e=>{const t=[...e];for(let e=t.length-1;e>0;e--){const n=Math.floor(Math.random()*(e+1));[t[e],t[n]]=[t[n],t[e]]}return t},Ot=kt("[Surveys]"),Nt=(e,t)=>`${e}${function(e){return e.current_iteration&&e.current_iteration>0?`${e.id}_${e.current_iteration}`:e.id}(t)}`;function $t(e,t){this.v=e,this.k=t}function zt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);t>n;n++)r[n]=e[n];return r}function Ct(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,s,a=[],l=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return zt(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)?zt(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Lt(e){var t,n;function r(t,n){try{var i=e[t](n),s=i.value,a=s instanceof $t;Promise.resolve(a?s.v:s).then(function(n){if(a){var l="return"===t&&s.k?t:"next";if(!s.k||n.done)return r(l,n);n=e[l](n).value}o(!!i.done,n)},function(e){r("throw",e)})}catch(e){o(2,e)}}function o(e,o){2===e?t.reject(o):t.resolve({value:o,done:e}),(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,o){return new Promise(function(i,s){var a={key:e,arg:o,resolve:i,reject:s,next:null};n?n=n.next=a:(t=n=a,r(e,o))})},"function"!=typeof e.return&&(this.return=void 0)}Lt.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},Lt.prototype.next=function(e){return this._invoke("next",e)},Lt.prototype.throw=function(e){return this._invoke("throw",e)},Lt.prototype.return=function(e){return this._invoke("return",e)};const jt=Object.entries,Bt=Object.keys,Ht=Object.setPrototypeOf,Rt=Object.isFrozen,Ft=Object.getPrototypeOf,Ut=Object.getOwnPropertyDescriptor;let Vt=Object.freeze,Gt=Object.seal,Qt=Object.create,Zt="undefined"!=typeof Reflect&&Reflect,Wt=Zt.apply,Yt=Zt.construct;Vt||(Vt=function(e){return e}),Gt||(Gt=function(e){return e}),Wt||(Wt=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;n>o;o++)r[o-2]=arguments[o];return e.apply(t,r)}),Yt||(Yt=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;t>r;r++)n[r-1]=arguments[r];return new e(...n)});const Kt=Sn([].forEach),Jt=Sn([].lastIndexOf),Xt=Sn([].pop),en=Sn([].push),tn=Sn([].slice),nn=Sn([].splice),rn=Array.isArray,on=Tn(Set),sn=Sn(Set.prototype.add),an=Sn(Set.prototype.has),ln=Sn("".toLowerCase),un=Sn("".toString),cn=Sn("".match),dn=Sn("".replace),fn=Sn("".indexOf),pn=Sn("".trim),hn=Sn((0).toString),vn=Sn(Boolean.prototype.toString),mn="undefined"==typeof BigInt?null:Sn(BigInt.prototype.toString),yn="undefined"==typeof Symbol?null:Sn(Symbol.prototype.toString),gn=Sn({}.hasOwnProperty),bn=Sn({}.toString),wn=/t/.test,xn=function(e,t){return e instanceof RegExp&&(e.lastIndex=0),Wt(wn,e,[t])},kn=Tn(TypeError);function Sn(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;n>o;o++)r[o-1]=arguments[o];return Wt(e,t,r)}}function Tn(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;t>r;r++)n[r]=arguments[r];return Yt(e,n)}}function qn(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ln;if(Ht&&Ht(e,null),!rn(t))return e;let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(Rt(t)||(t[r]=e),o=e)}e[o]=!0}return e}function _n(e){for(let t=0;e.length>t;t++)gn(e,t)||(e[t]=null);return e}function Mn(e){const t=Qt(null);for(const r of jt(e)){var n=Ct(r,2);const o=n[0],i=n[1];gn(e,o)&&(t[o]=rn(i)?_n(i):i&&"object"==typeof i&&i.constructor===Object?Mn(i):i)}return t}function Pn(e){const t=Qt(null),n=Bt(e);let r=n.length;for(;r--;)t[n[r]]=e[n[r]];return t}function An(e,t){for(;null!==e;){const n=Ut(e,t);if(n){if(n.get)return Sn(n.get);if("function"==typeof n.value)return Sn(n.value)}e=Ft(e)}return function(){return null}}const En=Vt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),In=Vt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Dn=Vt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),On=Vt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Nn=Vt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),$n=Vt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),zn=Vt(["#text"]),Cn=Vt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Ln=Vt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),jn=Vt(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Bn=Vt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Hn=Gt(/{{[\w\W]*|^[\w\W]*}}/g),Rn=Gt(/<%[\w\W]*|^[\w\W]*%>/g),Fn=Gt(/\${[\w\W]*/g),Un=Gt(/{{|}}|\${|<%|%>|<%|%>/),Vn=Gt(/^data-[\-\w.\u00B7-\uFFFF]+$/),Gn=Gt(/^aria-[\-\w]+$/),Qn=Gt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Zn=Gt(/^(?:\w+script|data):/i),Wn=Gt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Yn=Gt(/^html$/i),Kn=Gt(/^[a-z][.\w]*(-[.\w]+)+$/i),Jn=Gt(/<[/\w!]/g),Xn=Gt(/<[/\w]/g),er=Gt(/<\/no(script|embed|frames)/i),tr=Gt(/\/>/i),nr=Gt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i),rr=Gt(/^[\r\n\t ]+/),or=Vt(qn({},["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"])),ir=function(){return"undefined"==typeof window?null:window},sr=function(e,t,n,r){return gn(e,t)&&rn(e[t])?qn(r.base?Pn(r.base):{},e[t],r.transform):n},ar=function(e,t,n){const r=gn(e,t)?e[t]:void 0;return r&&"object"==typeof r?Mn(r):n};var lr=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ir();const n=t=>e(t);if(n.version="3.4.18",n.removed=[],!t||!t.document||9!==t.document.nodeType||!t.Element)return n.isSupported=!1,n;let r=t.document;const o=r,i=o.currentScript,s=t.HTMLTemplateElement,a=t.Node,l=t.NodeFilter,u=t.DOMParser,c=t.trustedTypes,d=t.Element.prototype,f=An(d,"cloneNode"),p=An(d,"remove"),h=An(d,"removeAttributeNode"),v=An(d,"nextSibling"),m=An(d,"childNodes"),y=An(d,"parentNode"),g=An(d,"shadowRoot"),b=An(d,"attributes"),w=a&&a.prototype?An(a.prototype,"nodeType"):null,x=a&&a.prototype?An(a.prototype,"nodeName"):null,k=a&&a.prototype?An(a.prototype,"ownerDocument"):null,S=function(e){return w?w(e):e.nodeType},T=function(e){return x?x(e):e.nodeName},q=function(e){for(;null!==e;){const t=Ut(e,"namespaceURI");if(t)return t.get?Sn(t.get):null;e=Ft(e)}return null}(d),_=function(e){return q?q(e):e.namespaceURI};if("function"==typeof s){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let M,P,A="",E=!1,I=0;const D=function(){if(I>0)throw kn('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},O=function(e){D(),I++;try{return M.createHTML(e)}finally{I--}},N=function(e){return M&&ge?O(e):e},z=r.implementation,C=r.createNodeIterator,L=r.createDocumentFragment,j=r.getElementsByTagName,B=o.importNode;let H={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof jt&&"function"==typeof y&&z&&void 0!==z.createHTMLDocument;const R=Hn,F=Rn,U=Fn,V=Vn,G=Gn,Q=Zn,Z=Wn,W=Kn;let Y=Qn,K=null;const J=qn({},[...En,...In,...Dn,...Nn,...zn]);let X=null;const ee=qn({},[...Cn,...Ln,...jn,...Bn]);let te=null,ne=null,re=null;const oe=Object.seal(Qt(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ie=!0,se=!0,ae=!1,le=!0,ue=!1,ce=!0,de=!1,fe=!1,pe=null,he=null,ve=!1,me=!1,ye=!1,ge=!1,be=!0,we=!1;const xe="user-content-";let ke=!0,Se=!1,Te=null,qe=!1,_e=null;const Me=qn({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Pe=null;const Ae=qn({},["audio","video","img","source","image","track"]);let Ee=null;const Ie=qn({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),De="http://www.w3.org/1998/Math/MathML",Oe="http://www.w3.org/2000/svg",Ne="http://www.w3.org/1999/xhtml";let $e=Ne,ze=!1,Ce=null;const Le=qn({},[De,Oe,Ne],un),je=Vt(qn({},["mi","mo","mn","ms","mtext"]));let Be=null;const He=Vt(qn({},["annotation-xml"]));let Re=null;const Fe=Vt(Qt(null)),Ue=qn({},["title","style","font","a","script"]);let Ve=null;const Ge=["application/xhtml+xml","text/html"];let Qe=null,Ze=null;const We=r.createElement("form"),Ye=function(e){return e instanceof RegExp||e instanceof Function},Ke=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e&&"object"==typeof e||(e={}),e=Mn(e),Ve=-1===Ge.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Qe="application/xhtml+xml"===Ve?un:ln,K=sr(e,"ALLOWED_TAGS",J,{transform:Qe}),X=sr(e,"ALLOWED_ATTR",ee,{transform:Qe}),Ce=sr(e,"ALLOWED_NAMESPACES",Le,{transform:un}),Ee=sr(e,"ADD_URI_SAFE_ATTR",Ie,{transform:Qe,base:Ie}),Pe=sr(e,"ADD_DATA_URI_TAGS",Ae,{transform:Qe,base:Ae}),_e=sr(e,"FORBID_CONTENTS",Me,{transform:Qe}),ne=sr(e,"FORBID_TAGS",Qt(null),{transform:Qe}),re=sr(e,"FORBID_ATTR",Qt(null),{transform:Qe}),qe=!!gn(e,"USE_PROFILES")&&(e.USE_PROFILES&&"object"==typeof e.USE_PROFILES?Mn(e.USE_PROFILES):e.USE_PROFILES),ie=!1!==e.ALLOW_ARIA_ATTR,se=!1!==e.ALLOW_DATA_ATTR,ae=e.ALLOW_UNKNOWN_PROTOCOLS||!1,le=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,ue=e.SAFE_FOR_TEMPLATES||!1,ce=!1!==e.SAFE_FOR_XML,de=e.WHOLE_DOCUMENT||!1,me=e.RETURN_DOM||!1,ye=e.RETURN_DOM_FRAGMENT||!1,ge=e.RETURN_TRUSTED_TYPE||!1,ve=e.FORCE_BODY||!1,be=!1!==e.SANITIZE_DOM,we=e.SANITIZE_NAMED_PROPS||!1,ke=!1!==e.KEEP_CONTENT,Se=e.IN_PLACE||!1,Y=function(e){if(!e)return!1;try{return xn(e,""),!0}catch(e){return!1}}(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Qn,$e="string"==typeof e.NAMESPACE?e.NAMESPACE:Ne,Be=ar(e,"MATHML_TEXT_INTEGRATION_POINTS",je),Re=ar(e,"HTML_INTEGRATION_POINTS",He);const t=ar(e,"CUSTOM_ELEMENT_HANDLING",Fe);if(te=Qt(null),gn(t,"tagNameCheck")&&Ye(t.tagNameCheck)&&(te.tagNameCheck=t.tagNameCheck),gn(t,"attributeNameCheck")&&Ye(t.attributeNameCheck)&&(te.attributeNameCheck=t.attributeNameCheck),gn(t,"allowCustomizedBuiltInElements")&&"boolean"==typeof t.allowCustomizedBuiltInElements&&(te.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),Gt(te),ue&&(se=!1),ye&&(me=!0),qe&&((gn(e,"ALLOWED_TAGS")||gn(e,"ALLOWED_ATTR"))&&"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn("DOMPurify: USE_PROFILES overrides ALLOWED_TAGS and ALLOWED_ATTR. Do not use these options together."),K=qn({},zn),X=Qt(null),!0===qe.html&&(qn(K,En),qn(X,Cn)),!0===qe.svg&&(qn(K,In),qn(X,Ln),qn(X,Bn)),!0===qe.svgFilters&&(qn(K,Dn),qn(X,Ln),qn(X,Bn)),!0===qe.mathMl&&(qn(K,Nn),qn(X,jn),qn(X,Bn))),oe.tagCheck=null,oe.attributeCheck=null,gn(e,"ADD_TAGS")&&("function"==typeof e.ADD_TAGS?oe.tagCheck=e.ADD_TAGS:rn(e.ADD_TAGS)&&(K===J&&(K=Pn(K)),qn(K,e.ADD_TAGS,Qe))),gn(e,"ADD_ATTR")&&("function"==typeof e.ADD_ATTR?oe.attributeCheck=e.ADD_ATTR:rn(e.ADD_ATTR)&&(X===ee&&(X=Pn(X)),qn(X,e.ADD_ATTR,Qe))),gn(e,"ADD_FORBID_CONTENTS")&&rn(e.ADD_FORBID_CONTENTS)&&(_e===Me&&(_e=Pn(_e)),qn(_e,e.ADD_FORBID_CONTENTS,Qe)),ke&&(K["#text"]=!0),de&&qn(K,["html","head","body"]),K.table&&(K.tbody=!0,delete ne.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw kn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw kn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const t=M;M=e.TRUSTED_TYPES_POLICY;try{A=O("")}catch(e){throw M=t,e}}else null===e.TRUSTED_TYPES_POLICY?(M=void 0,A=""):(void 0===M&&(E||(P=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(c,i),E=!0),M=P),M&&"string"==typeof A&&(A=O("")));Ze=Vt(e)},Je=qn({},[...In,...Dn,...On]),Xe=qn({},[...Nn,...$n]),et=function(e){en(n.removed,{element:e});try{y(e).removeChild(e)}catch(t){if(p(e),!y(e))throw kn("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},tt=function(e,t,n){try{h(e,t)}catch(t){try{e.removeAttribute(n)}catch(e){}}},nt=function(e){st(e);const t=m(e);t&&Kt(tn(t),e=>{try{p(e)}catch(e){}}),1===S(e)&&ot(e,!1)},rt=function(e,t,r){if(!r)try{r=t.getAttributeNode(e)}catch(e){r=null}if(en(n.removed,{attribute:r||null,from:t}),r)tt(t,r,e);else try{t.removeAttribute(e)}catch(e){}if("is"===e)if(me||ye)try{et(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},ot=function(e,t){const n=b(e);if(n)for(let r=n.length-1;r>=0;--r){const o=n[r],i=o&&o.name;"string"!=typeof i||t&&X[Qe(i)]||tt(e,o,i)}},it=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=[e];for(;r.length>0;){const e=r.pop();if(!1===t(e))continue;if(n&&1===S(e)){const t=g(e);gt(t)&&r.push(t)}const o=m(e);if(o)for(let e=o.length-1;e>=0;--e)r.push(o[e])}},st=function(e){it(e,e=>{1===S(e)&&ot(e,!0)})},at=function(e){const t=[];return it(e,e=>{t.push(e)},!0),t},lt=function(e,t){let r=!1;return Kt(n.removed,t=>{t.element&&(r=r||t.element===e,st(t.element))}),function(e,t){const n=on();Kt(at(e),e=>{1===S(e)&&sn(n,e)}),Kt(t,e=>{1!==S(e)||an(n,e)||ot(e,!0)})}(e,t),r},ut=function(e,t,n,r){const o=ft(e);let i;for(;i=o.nextNode();)an(r,i)&&!an(Te,i)&&(t&&wt(H.uponSanitizeShadowNode,i,null),It(i,n))},ct=function(e,t){return!!ce&&("patchsrc"===e||"for"===e&&"label"!==t&&"output"!==t)},dt=function(e){let t=null,n=null;if(ve)e="<remove></remove>"+e;else{const t=cn(e,rr);n=t&&t[0]}"application/xhtml+xml"===Ve&&$e===Ne&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=M?O(e):e;if($e===Ne)try{t=(new u).parseFromString(o,Ve)}catch(e){}if(!t||!t.documentElement){t=z.createDocument($e,"template",null);try{t.documentElement.innerHTML=ze?A:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),$e===Ne?j.call(t,de?"html":"body")[0]:de?t.documentElement:i},ft=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=k?k(e):e.ownerDocument;return C.call(n||e,e,(t?0:l.SHOW_ELEMENT)|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},pt=function(e){return e=dn(e,R," "),e=dn(e,F," "),dn(e,U," ")},ht=function(e){var t;vt(e);const n=null===(t=e.querySelectorAll)||void 0===t?void 0:t.call(e,"template");n&&Kt(n,e=>{gt(e.content)&&ht(e.content)})},vt=function(e){e.normalize();const t=ft(e,!0);let n=t.nextNode();for(;n;)n.data=pt(n.data),n=t.nextNode()},mt=function(e){const t=x?x(e):null;return"string"==typeof t&&"form"===Qe(t)&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||e.attributes!==b(e)||"function"!=typeof e.removeAttribute||"function"!=typeof e.removeAttributeNode||"function"!=typeof e.getAttributeNode||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes||e.nodeType!==w(e)||e.childNodes!==m(e))},yt=function(e){if(!w||"object"!=typeof e||null===e)return null;try{const t=w(e);return"number"==typeof t?t:null}catch(e){return null}},gt=function(e){return 11===yt(e)},bt=function(e){return null!==yt(e)};function wt(e,t,r){0!==e.length&&Kt(e,e=>{e.call(n,t,r,Ze)})}const xt=function(e,t){if(e instanceof RegExp)return xn(e,t);if(e instanceof Function){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;n>o;o++)r[o-2]=arguments[o];return Boolean(e(t,...r))}return!1},kt=function(e,t,n,r){return 0===e.length?t:t===n||t===r?Pn(t):t},St=function(e,t){return e!==t&&null===y(e)&&(Se&&st(e),!0)},Tt=function(e,t){if(Te&&sn(Te,e),wt(H.beforeSanitizeElements,e,null),St(e,t))return!0;if(mt(e))return et(e),!0;const r=Qe(T(e)),o=S(e);if(K=kt(H.uponSanitizeElement,K,J,pe),wt(H.uponSanitizeElement,e,{tagName:r,allowedTags:K}),St(e,t))return!0;if(function(e,t,n){return!!(ce&&1===n&&e.hasChildNodes()&&!bt(e.firstElementChild)&&xn(Jn,e.textContent)&&xn(Jn,e.innerHTML))||!!(ce&&or[t]&&1===n&&_(e)===Ne&&(bt(e.firstElementChild)||"string"==typeof e.textContent&&xn(Jn,e.textContent)))||7===n||!(!ce||8!==n||!xn(Xn,e.data))}(e,r,o))return et(e),!0;if(ne[r]||!(oe.tagCheck instanceof Function&&oe.tagCheck(r))&&!K[r]){const n=function(e,t,n){if(!ne[t]&&Mt(t)&&xt(te.tagNameCheck,t))return!1;if(ke&&!_e[t]&&!_e[ln(t)]){const t=y(e),r=m(e);if(r&&t)for(let o=r.length-1;o>=0;--o){const i=e===n?f(r[o],!0):r[o];t.insertBefore(i,v(e))}}return et(e),!0}(e,r,t);return!(!1!==n||(wt(H.afterSanitizeElements,e,null),!St(e,t)))||n}if(1===o&&!function(e){const t=_(e),n=ln(T(e)),r=y(e);let o=$e,i="template";return r&&1===S(r)&&(o=_(r),i=ln(T(r))),!!Ce[t]&&(t===Oe?function(e,t,n){return t===Ne?"svg"===e:t===De?"svg"===e&&("annotation-xml"===n||Be[n]):Boolean(Je[e])}(n,o,i):t===De?function(e,t,n){return t===Ne?"math"===e:t===Oe?"math"===e&&Re[n]:Boolean(Xe[e])}(n,o,i):t===Ne?function(e,t,n){return!(t===Oe&&!Re[n])&&!(t===De&&!Be[n])&&!Xe[e]&&(Ue[e]||!Je[e])}(n,o,i):"application/xhtml+xml"===Ve)}(e))return et(e),!0;if(("noscript"===r||"noembed"===r||"noframes"===r)&&xn(er,e.innerHTML))return et(e),!0;if(ue&&3===o){const t=e.textContent,r=pt(t);t!==r&&(en(n.removed,{element:e.cloneNode()}),e.textContent=r)}return wt(H.afterSanitizeElements,e,null),St(e,t)},qt=function(e,t,n){if(re[t])return!1;if(ct(t,e))return!1;if(be&&("id"===t||"name"===t)&&(n in r||n in We))return!1;const o=X[t]||oe.attributeCheck instanceof Function&&oe.attributeCheck(t,e);if(se&&xn(V,t))return!0;if(ie&&xn(G,t))return!0;if(!o)return Mt(e)&&xt(te.tagNameCheck,e)&&xt(te.attributeNameCheck,t,e)||"is"===t&&te.allowCustomizedBuiltInElements&&xt(te.tagNameCheck,n);if(Ee[t])return!0;const i=dn(n,Z,"");return!(!xn(Y,i)&&("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==fn(n,"data:")||!Pe[e])&&(!ae||xn(Q,i))&&n)},_t=qn({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Mt=function(e){return!_t[ln(e)]&&xn(W,e)},Pt=function(e,t,n,r){if(M&&"object"==typeof c&&"function"==typeof c.getAttributeType&&!n)switch(c.getAttributeType(e,t)){case"TrustedHTML":return O(r);case"TrustedScriptURL":return function(e){D(),I++;try{return M.createScriptURL(e)}finally{I--}}(r)}return r},At=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),!mt(e)||(et(e),!1)}catch(n){return rt(t,e),!1}},Et=function(e,t){return!(!ce||!xn(nr,t))||"attributename"===ln(e)&&-1!==fn(t,"href")},It=function(e,t){Tt(e,t),function(e,t){if(wt(H.beforeSanitizeAttributes,e,null),St(e,t))return;const r=e.attributes;if(!r||mt(e))return;X=kt(H.uponSanitizeAttribute,X,ee,he);const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:X,forceKeepAttr:void 0};let i=r.length;const s=Qe(T(e));for(;i--;){const t=r[i],a=t.name,l=t.namespaceURI,u=t.value,c=Qe(a),d=u;let f="value"===a?d:pn(d),p=!1;o.attrName=c,o.attrValue=f,o.keepAttr=!0,o.forceKeepAttr=void 0,wt(H.uponSanitizeAttribute,e,o),f=o.attrValue,!we||"id"!==c&&"name"!==c||0===fn(f,xe)||(rt(a,e,t),f=xe+f,p=!0),Et(a,f)?rt(a,e,t):o.forceKeepAttr||(!o.keepAttr||!le&&xn(tr,f)?rt(a,e,t):(ue&&(f=pt(f)),qt(s,c,f)?(f=Pt(s,c,l,f),f!==d&&At(e,a,l,f)&&p&&Xt(n.removed)):rt(a,e,t)))}wt(H.afterSanitizeAttributes,e,null),St(e,t)}(e,t),gt(e.content)&&Dt(e.content)},Dt=function(e){let t=null;const n=ft(e);for(wt(H.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(wt(H.uponSanitizeShadowNode,t,null),It(t,e),1===S(t)){const e=g(t);gt(e)&&(Ot(e),Dt(e))}ue&&vt(e),wt(H.afterSanitizeShadowDOM,e,null)},Ot=function(e){const t=[{node:e,shadow:null}];for(;t.length>0;){const e=t.pop();if(e.shadow){Dt(e.shadow);continue}const n=e.node,r=1===S(n),o=m(n);if(o)for(let e=o.length-1;e>=0;--e)t.push({node:o[e],shadow:null});if(r){const e=x?x(n):null;if("string"==typeof e&&"template"===Qe(e)){const e=n.content;gt(e)&&t.push({node:e,shadow:null})}}if(r){const e=g(n);gt(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,s=null,a=null;if(ze=!e,ze&&(e="\x3c!--\x3e"),"string"!=typeof e&&!bt(e)&&"string"!=typeof(e=function(e){switch(typeof e){case"string":return e;case"number":return hn(e);case"boolean":return vn(e);case"bigint":return mn?mn(e):"0";case"symbol":return yn?yn(e):"Symbol()";case"undefined":default:return bn(e);case"function":case"object":{if(null===e)return bn(e);const t=e,n=An(t,"toString");if("function"==typeof n){const e=n(t);return"string"==typeof e?e:bn(e)}return bn(e)}}}(e)))throw kn("dirty is not a string, aborting");if(!n.isSupported)return e;fe?(K=pe,X=he):Ke(t),n.removed=[];const l=Se&&"string"!=typeof e&&bt(e);let u=[];const c=Te;if(l){ce&&it(e,e=>{const t=S(e);if(7===t||8===t&&xn(Xn,e.data)){try{p(e)}catch(e){}return!1}if(1===t){const t=e,n=Qe(T(e));try{t.hasAttribute&&t.hasAttribute("patchsrc")&&t.removeAttribute("patchsrc"),t.hasAttribute&&t.hasAttribute("for")&&ct("for",n)&&t.removeAttribute("for")}catch(e){}}return!0});const t=T(e);if("string"==typeof t){const n=Qe(t);if(!K[n]||ne[n])throw nt(e),kn("root node is forbidden and cannot be sanitized in-place")}if(mt(e))throw nt(e),kn("root node is clobbered and cannot be sanitized in-place");u=at(e),Te=on()}else if(bt(e))r=dt("\x3c!----\x3e"),i=r.ownerDocument.importNode(e,!0),1===i.nodeType&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i),Ot(r);else{if(!me&&!ue&&!de&&-1===e.indexOf("<"))return N(e);if(r=dt(e),!r)return me?null:ge?A:""}r&&ve&&et(r.firstChild);const d=l?e:r;try{l&&Ot(e);const t=ft(d);for(;s=t.nextNode();)It(s,d);l&&function(e,t){const n=Te;let r=null;const o=()=>(r||(r=on(),Kt(t,e=>{sn(r,e)})),r);for(let t=0;;t++){const r=at(e),i=[e];let s=!1;if(Kt(r,e=>{11===S(e)?en(i,e):s||an(n,e)||(s=an(o(),e))}),!s)return;if(t>=8)throw kn("the tree kept changing during in-place sanitization; refusing to return it");Kt(i,(t,n)=>{ut(t,n>0,e,o())})}}(e,u)}catch(t){throw l&&(nt(e),lt(e,u)),t}finally{Te=c}if(l){if(lt(e,u))throw kn("a node selected for removal could not be safely returned; refusing to sanitize in place");return ue&&ht(e),e}if(me){if(ue&&ht(r),ye)for(a=L.call(r.ownerDocument);r.firstChild;)a.appendChild(r.firstChild);else a=r;return(X.shadowroot||X.shadowrootmode)&&(a=B.call(o,a,!0)),a}const f=()=>de?r.outerHTML:r.innerHTML;let h=f();return ue&&xn(Un,h)&&(vt(r),h=f()),de&&K["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&xn(Yn,r.ownerDocument.doctype.name)&&(h="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+h),N(h)},n.setConfig=function(){Ke(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),fe=!0,pe=K,he=X},n.clearConfig=function(){Ze=null,fe=!1,pe=null,he=null,M=P,A=""},n.isValidAttribute=function(e,t,n){Ze||Ke({});const r=Qe(e),o=Qe(t);return("string"!=typeof n||!(Et(t,n)||!le&&xn(tr,n)))&&qt(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&gn(H,e)&&en(H[e],t)},n.removeHook=function(e,t){if(gn(H,e)){if(void 0!==t){const n=Jt(H[e],t);return-1===n?void 0:nn(H[e],n,1)[0]}return Xt(H[e])}},n.removeHooks=function(e){gn(H,e)&&(H[e]=[])},n.removeAllHooks=function(){H={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();const ur=["a","abbr","acronym","area","article","aside","b","bdi","bdo","blockquote","br","caption","center","cite","code","col","colgroup","data","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","footer","h1","h2","h3","h4","h5","h6","header","hgroup","hr","i","img","ins","kbd","li","map","mark","nav","ol","p","pre","q","rp","rt","rtc","ruby","s","samp","small","span","strike","strong","sub","summary","sup","table","tbody","td","th","thead","time","tr","tt","u","ul","var","wbr"],cr=["style","lang","title","width","height"],dr=["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"],fr={a:["href","hreflang","target","rel"],bdo:["dir"],blockquote:["cite"],col:["align","char","charoff","span"],colgroup:["align","char","charoff","span"],del:["cite","datetime"],hr:["align","size","width"],img:["align","alt","height","src","width"],ins:["cite","datetime"],ol:["start","type"],q:["cite"],table:["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"],tbody:["align","char","charoff","valign"],td:dr,tfoot:["align","char","charoff","valign"],th:dr,thead:["align","char","charoff","valign"],tr:["align","bgcolor","char","charoff","valign"]};let pr;function hr(e){var t;const n=(null!==(t=pr)&&void 0!==t?t:pr=lr()).sanitize(e,{ALLOWED_TAGS:ur,ALLOWED_ATTR:[],ALLOW_ARIA_ATTR:!1,ALLOW_DATA_ATTR:!1,ALLOWED_NAMESPACES:["http://www.w3.org/1999/xhtml"],ADD_ATTR:(e,t)=>-1!==cr.indexOf(e)||{}.hasOwnProperty.call(fr,t)&&-1!==(fr[t]||[]).indexOf(e),RETURN_DOM_FRAGMENT:!0}),r=n.querySelectorAll("a");for(let e=0;r.length>e;e++)r.item(e).relList.add("noopener");const o=document.createElement("div");return o.appendChild(n),o.innerHTML}const vr=kt("[Stylesheet Loader]"),mr="#020617",yr={fontFamily:"inherit",backgroundColor:"#eeeded",submitButtonColor:"black",submitButtonTextColor:"white",ratingButtonColor:"white",ratingButtonActiveColor:"black",borderColor:"#c9c6c6",whiteLabel:!1,displayThankYouMessage:!0,thankYouMessageHeader:"Thank you for your feedback!",position:nt,widgetType:Xe,widgetLabel:"Feedback",widgetColor:"black",zIndex:String(2147483645),disabledButtonOpacity:"0.6",maxWidth:"300px",textSubtleColor:"#939393",boxPadding:"20px 24px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",borderRadius:"10px",shuffleQuestions:!1,outlineColor:"rgba(59, 130, 246, 0.8)",inputBackground:"white",inputTextColor:mr,scrollbarThumbColor:"var(--ph-survey-border-color)",scrollbarTrackColor:"var(--ph-survey-background-color)"},gr=[tt,et,nt],br=(e,t,n)=>{const r=pe(pe({},yr),n),o=e.style,i=!gr.includes(r.position)||t===rt&&(null==n?void 0:n.widgetType)===Xe;var s;o.setProperty("--ph-survey-font-family",function(e){if("inherit"===e)return"inherit";const 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)),o.setProperty("--ph-survey-box-padding",r.boxPadding),o.setProperty("--ph-survey-max-width",r.maxWidth),o.setProperty("--ph-survey-z-index",r.zIndex),o.setProperty("--ph-survey-border-color",r.borderColor),i?(o.setProperty("--ph-survey-border-radius",r.borderRadius),o.setProperty("--ph-survey-border-bottom","1.5px solid var(--ph-survey-border-color)")):(o.setProperty("--ph-survey-border-bottom","none"),o.setProperty("--ph-survey-border-radius",`${r.borderRadius} ${r.borderRadius} 0 0`)),o.setProperty("--ph-survey-background-color",r.backgroundColor),o.setProperty("--ph-survey-box-shadow",r.boxShadow),o.setProperty("--ph-survey-disabled-button-opacity",r.disabledButtonOpacity),o.setProperty("--ph-survey-submit-button-color",r.submitButtonColor),o.setProperty("--ph-survey-submit-button-text-color",(null==n?void 0:n.submitButtonTextColor)||xr(r.submitButtonColor)),o.setProperty("--ph-survey-rating-bg-color",r.ratingButtonColor),o.setProperty("--ph-survey-rating-active-bg-color",r.ratingButtonActiveColor),o.setProperty("--ph-survey-rating-active-text-color",xr(r.ratingButtonActiveColor)),o.setProperty("--ph-survey-text-primary-color",(null==n?void 0:n.textColor)||xr(r.backgroundColor)),o.setProperty("--ph-survey-text-subtle-color",r.textSubtleColor),s=o,"white"===xr(r.backgroundColor)?s.setProperty("--ph-logo-mono","1"):s.removeProperty("--ph-logo-mono"),o.setProperty("--ph-widget-color",r.widgetColor),o.setProperty("--ph-widget-text-color",xr(r.widgetColor)),o.setProperty("--ph-widget-z-index",r.zIndex);const a=(null==n?void 0:n.inputBackground)||(null==n?void 0:n.inputBackgroundColor);let l=a||r.inputBackground;a||"white"!==r.backgroundColor||(l="#f8f8f8"),o.setProperty("--ph-survey-input-background",l);const u=(null==n?void 0:n.inputTextColor)||xr(l);o.setProperty("--ph-survey-input-text-color",u),o.setProperty("--ph-survey-rating-text-color",u),o.setProperty("--ph-survey-scrollbar-thumb-color",r.scrollbarThumbColor),o.setProperty("--ph-survey-scrollbar-track-color",r.scrollbarTrackColor),o.setProperty("--ph-survey-outline-color",r.outlineColor)};function wr(e){if(e.startsWith("#")){let t=e.replace(/^#/,"");return/^[0-9A-Fa-f]{3}$/.test(t)&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),/^[0-9A-Fa-f]{6}$/.test(t)?`rgb(${parseInt(t.slice(0,2),16)},${parseInt(t.slice(2,4),16)},${parseInt(t.slice(4,6),16)})`:"rgb(255, 255, 255)"}return"rgb(255, 255, 255)"}function xr(e=yr.backgroundColor){let t;"#"===e[0]&&(t=wr(e)),e.startsWith("rgb")&&(t=e);const 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=wr(n)),!t)return mr;const r=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(r){const e=parseInt(r[1]),t=parseInt(r[2]),n=parseInt(r[3]);return Math.sqrt(e*e*.299+t*t*.587+n*n*.114)>127.5?mr:"white"}return mr}function kr(e){const t=((e,t,n)=>{let r=e.createElement("style");r.innerText=t;const o=(e=>{var t;return ne(e)?e:null==e||null===(t=e.config)||void 0===t?void 0:t.prepare_external_dependency_stylesheet})(n);return o&&(r=o(r)),r||(vr.error("prepare_external_dependency_stylesheet returned null"),null)})(document,':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:calc(2147480000 + 3645);--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 #00000026;--ph-survey-submit-button-color:black;--ph-survey-submit-button-text-color:white;--ph-survey-rating-bg-color:white;--ph-survey-rating-text-color:#020617;--ph-survey-rating-active-bg-color:black;--ph-survey-rating-active-text-color:white;--ph-survey-text-primary-color:#020617;--ph-survey-text-subtle-color:#939393;--ph-widget-color:#e0a045;--ph-widget-text-color:white;--ph-survey-scrollbar-thumb-color:var(--ph-survey-border-color);--ph-survey-scrollbar-track-color:var(--ph-survey-background-color);--ph-survey-outline-color:#3b82f6cc;--ph-survey-input-background:white;--ph-survey-input-text-color:#020617;--ph-survey-disabled-button-opacity:.6}.ph-survey{min-width:300px;width:var(--ph-survey-max-width);max-width:85%;z-index:var(--ph-survey-z-index);height:fit-content;margin:0;position:fixed;bottom:0}.ph-survey h3,.ph-survey p{margin:0}.ph-survey *{box-sizing:border-box;font-family:var(--ph-survey-font-family);color:var(--ph-survey-text-primary-color)}.ph-survey textarea,.ph-survey input[type=text],.ph-survey .multiple-choice-options label{color:var(--ph-survey-input-text-color);background:var(--ph-survey-input-background);border:1.5px solid var(--ph-survey-border-color);border-radius:4px;padding:10px;transition:border-color .2s ease-out,box-shadow .2s ease-out,transform .15s ease-out}.ph-survey textarea,.ph-survey input[type=text]{transition:border-color .2s ease-out,box-shadow .2s ease-out,transform .15s ease-out}.ph-survey input{margin:0}.ph-survey textarea:focus,.ph-survey textarea:focus-visible,.ph-survey input[type=text]:focus,.ph-survey input[type=text]:focus-visible,.ph-survey .form-submit:focus,.ph-survey .form-submit:focus-visible,.ph-survey input[type=checkbox]:focus,.ph-survey input[type=radio]:focus,.ph-survey input[type=checkbox]:focus-visible,.ph-survey input[type=radio]:focus-visible{outline:1.5px solid var(--ph-survey-outline-color);border-color:var(--ph-survey-rating-active-bg-color);outline-offset:2px}.ph-survey textarea:focus:not(:focus-visible),.ph-survey input[type=text]:focus:not(:focus-visible),.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){outline:none}.ph-survey textarea:hover:not(:focus),.ph-survey input[type=text]:hover:not(:focus){border-color:var(--ph-survey-rating-active-bg-color)}@media (max-width:768px){.ph-survey textarea,.ph-survey input[type=text]{font-size:1rem}}.ph-survey .multiple-choice-options label,.ph-survey .rating-options-number,.ph-survey .form-cancel,.ph-survey input[type=checkbox],.ph-survey input[type=radio]{border:1.5px solid var(--ph-survey-border-color)}.ph-survey label,.ph-survey input[type=checkbox],.ph-survey input[type=radio],.ph-survey .ratings-emoji,.ph-survey .ratings-number,.ph-survey .footer-branding,.ph-survey .form-cancel,.ph-survey .form-submit{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);color:var(--ph-widget-text-color);text-align:center;cursor:pointer;z-index:var(--ph-survey-z-index);border:none;border-radius:3px 3px 0 0;padding:10px 12px;transition:padding .2s ease-out;position:fixed}.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{flex-direction:column;gap:16px;display:flex}.bottom-section{flex-direction:column;gap:8px;display:flex}.thank-you-message-header~.bottom-section,.intro-screen-header~.bottom-section{padding-top:16px}.question-container,.thank-you-message,.intro-screen{flex-direction:column;gap:8px;display:flex}.survey-question{font-size:14px;font-weight:500}.survey-question-description{opacity:.8;padding-top:4px;font-size:13px}.survey-question-description,.thank-you-message-body,.intro-screen-body{word-wrap:break-word;overflow-wrap:break-word}:is(.survey-question-description,.thank-you-message-body,.intro-screen-body) img,:is(.survey-question-description,.thank-you-message-body,.intro-screen-body) video,:is(.survey-question-description,.thank-you-message-body,.intro-screen-body) iframe,:is(.survey-question-description,.thank-you-message-body,.intro-screen-body) embed,:is(.survey-question-description,.thank-you-message-body,.intro-screen-body) object,:is(.survey-question-description,.thank-you-message-body,.intro-screen-body) svg{max-width:100%;height:auto}.question-textarea-wrapper{flex-direction:column;display:flex}.survey-form{animation:.3s ease-out forwards ph-survey-fade-in}.survey-form,.thank-you-message,.intro-screen{text-align:left;width:100%;z-index:var(--ph-survey-z-index);border:1.5px solid var(--ph-survey-border-color);border-bottom:var(--ph-survey-border-bottom);background:var(--ph-survey-background-color);border-radius:var(--ph-survey-border-radius);box-shadow:var(--ph-survey-box-shadow);padding:var(--ph-survey-box-padding);margin:0;position:relative}.survey-form textarea,.survey-form input[type=text]{min-width:100%}.survey-form textarea:focus,.survey-form textarea:focus-visible{box-shadow:0 4px 12px #00000014}.survey-form textarea:focus:not(:focus-visible){box-shadow:none}.survey-box .question-header--empty~.multiple-choice-options,.survey-box .question-header--empty~textarea{margin-top:0}.multiple-choice-options{border:none;flex-direction:column;gap:8px;margin:0;padding:1px 0;font-size:14px;display:flex}.multiple-choice-options label,.multiple-choice-options .response-choice{color:inherit;align-items:center;gap:8px;display:flex}.multiple-choice-options label{cursor:pointer;font-size:13px}.multiple-choice-options label:hover:not(:has(input:checked)){border-color:var(--ph-survey-text-subtle-color);box-shadow:0 2px 8px #00000014}.multiple-choice-options label:has(input:checked){border-color:var(--ph-survey-rating-active-bg-color);box-shadow:0 1px 4px #0000000d}.multiple-choice-options label.choice-option-open{flex-wrap:wrap}.multiple-choice-options label span{color:inherit}.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ph-survey-input-background);cursor:pointer;z-index:1;border-radius:3px;flex-shrink:0;width:1rem;height:1rem;transition:all .2s cubic-bezier(.4,0,.2,1),transform .15s ease-out;position:relative}: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{border:solid var(--ph-survey-rating-active-text-color);border-width:0 2px 2px 0;width:4px;height:8px;animation:.2s ease-out .1s forwards ph-survey-checkmark-reveal;left:4px;transform:rotate(45deg)scale(0)}.multiple-choice-options input[type=radio]:checked:after{background:var(--ph-survey-rating-active-text-color);border-radius:50%;width:6px;height:6px;animation:.15s ease-out 50ms forwards ph-survey-radio-reveal;top:5px;left:5px;transform:scale(0)}.multiple-choice-options input[type=checkbox]:checked:after,.multiple-choice-options input[type=radio]:checked:after{content:"";box-sizing:content-box;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}.multiple-choice-options .choice-option-open input[type=text]::placeholder{color:var(--ph-survey-text-subtle-color);font-weight:400}.rating-options-emoji{justify-content:space-between;display:flex}.rating-options-emoji-2{justify-content:space-around}.ratings-emoji{opacity:.5;background-color:#0000;border:none;padding:0;font-size:16px}.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;grid-auto-columns:1fr;grid-auto-flow:column;display:grid;overflow:hidden}.rating-options-number .ratings-number{border-right:1px solid var(--ph-survey-border-color);text-align:center;cursor:pointer;color:var(--ph-survey-rating-text-color);border-top:none;border-bottom:none;border-left:none;font-weight:700}.rating-options-number .ratings-number:last-of-type{border-right:0}.rating-options-number .ratings-number.rating-active{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{cursor:pointer}@media (hover:hover) and (pointer:fine){.ratings-number:hover:not(.rating-active){background-color:color-mix(in srgb, var(--ph-survey-rating-active-bg-color) 14%, var(--ph-survey-rating-bg-color))}}.rating-text{opacity:.7;flex-direction:row;justify-content:space-between;font-size:11px;display:flex}.form-buttons{flex-direction:row;gap:8px;width:100%;display:flex}.form-buttons-with-back>.form-submit{flex:auto;min-width:0}.form-submit{text-align:center;cursor:pointer;user-select:none;background:var(--ph-survey-submit-button-color);color:var(--ph-survey-submit-button-text-color);border:none;border-radius:6px;min-width:100%;padding:12px;font-weight:700;box-shadow:0 2px #0000000b}.form-submit:not([disabled]):hover{transform:scale(1.02);box-shadow:0 4px 8px #0000001a}.form-submit:not([disabled]):active{transform:scale(.98);box-shadow:0 1px 2px #0000000d}.form-submit[disabled]{opacity:var(--ph-survey-disabled-button-opacity);cursor:not-allowed}.form-back{text-align:center;cursor:pointer;user-select:none;color:var(--ph-survey-text-primary-color);border:1.5px solid var(--ph-survey-border-color);background:0 0;border-radius:6px;flex:none;padding:12px 16px;font-weight:600}.form-back:hover{transform:scale(1.02)}.form-back:active{transform:scale(.98)}.validation-hint{opacity:.7;margin-top:4px;font-size:12px}.form-cancel{cursor:pointer;background:#fff;border-radius:100%;padding:12px;line-height:0;position:absolute;top:0;right:0;transform:translate(50%,-50%)}.form-cancel:hover{opacity:.7;transform:translate(50%,-50%)scale(1.1)}.footer-branding{opacity:.6;justify-content:center;align-items:center;gap:4px;font-size:11px;font-weight:500;text-decoration:none;display:flex}.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{opacity:.8;font-size:14px}.intro-screen{text-align:center;animation:.3s ease-out forwards ph-survey-fade-in}.intro-screen-header{margin:10px 0 0}.intro-screen-body{opacity:.8;font-size:14px}.limit-height{scrollbar-width:thin;scrollbar-color:var(--ph-survey-scrollbar-thumb-color) var(--ph-survey-scrollbar-track-color);max-height:256px;overflow:hidden auto}.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}.limit-height::-webkit-scrollbar-thumb:hover{background-color:var(--ph-survey-text-subtle-color)}.sr-only{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}@media (prefers-reduced-motion:reduce){.ph-survey *{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!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)}}',null==e?void 0:e.config.prepareStylesheet);return null==t||t.setAttribute("data-ph-survey-style","true"),t}const Sr=e=>{try{const t=(e=>Nt("seenSurvey_",e))(e);localStorage.getItem(t)||localStorage.setItem(t,"true")}catch(e){Ot.error("Failed to persist survey seen state",e)}},Tr=(e,t,n,r)=>{var o;if(!t)return void Ot.error("[survey dismissed] event not captured, PostHog instance not found.");if(n)return;const i=Nr(e),s=i?i.surveyLanguage:r,a=pe(pe(pe({},((e,t,n,r)=>pe({[ht]:t.name,[pt]:t.id,[vt]:t.current_iteration,[mt]:t.current_iteration_start_date,sessionRecordingUrl:Z(r)},_t(pe(pe(pe(pe({event:"dismissed",survey:t},!re(null==n?void 0:n.responses)&&{responses:n.responses}),!re(null==n?void 0:n.surveySubmissionId)&&{submissionId:n.surveySubmissionId}),!re(null==n?void 0:n.surveyLanguage)&&{surveyLanguage:n.surveyLanguage}),!re(null==n?void 0:n.questionSnapshots)&&{questionSnapshots:n.questionSnapshots}))))(0,e,i,t)),s&&{[yt]:s}),{},{$set:{[Pt(e,"dismissed")]:!0}});$r(e),Sr(e),null===(o=t.client)||void 0===o||o.capture(dt,a),window.dispatchEvent(new CustomEvent("PHSurveyClosed",{detail:{surveyId:e.id}}))},qr=e=>{const t=e.map(e=>e.id);return t.every(e=>!!e)?t:void 0},_r=(e,t)=>{var n,r,o;return(e=>e.questions.some(e=>{var t;return!!(null===(t=e.branching)||void 0===t?void 0:t.type)}))(e)?e.questions:t?null!==(n=((e,t)=>{if(!t||t.length!==e.questions.length)return null;const n=new Map(e.questions.map(e=>[e.id,e])),r=[];for(const e of t){const t=n.get(e);if(!t)return null;r.push(t)}return r})(e,t.questionOrder))&&void 0!==n?n:e.questions:e.appearance&&e.appearance.shuffleQuestions&&!e.enable_partial_responses?(r=e.questions,o=Dt(e.questions),r.length===o.length&&r.every((e,t)=>e===o[t])?o.reverse():o):e.questions},Mr=function(e){function t(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&n.forEach(function(e){e.__e=!0,M(e)})},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}return t.__c="__cC"+h++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}({isPreviewMode:!1,previewPageIndex:0,onPopupSurveyDismissed(){},isPopup:!0,onPreviewSubmit(){},onPreviewBack(){},surveySubmissionId:"",properties:void 0,surveyLanguage:null}),Pr=()=>Ve(Mr),Ar=({component:t,children:n,renderAsHtml:r,style:o})=>function(t,n,r){var o,i,s,a,l=b({},t.props);for(s in t.type&&t.type.defaultProps&&(a=t.type.defaultProps),n)"key"==s?o=n[s]:"ref"==s?i=n[s]:l[s]=void 0===n[s]&&null!=a?a[s]:n[s];return arguments.length>2&&(l.children=arguments.length>3?e.call(arguments,2):r),k(t.type,l,o||t.key,i||t.ref,null)}(t,r?{dangerouslySetInnerHTML:{__html:hr(n)},style:o}:{children:n,style:o});function Er(e,t){var n,r,o;if(!(null===(n=e.conditions)||void 0===n?void 0:n.url))return!0;const i=null!==(r=function(e){var t;const n=typeof window>"u"?void 0:window,r=null==n||null===(t=n.location)||void 0===t?void 0:t.href;return re(r)?void 0:function(e,t){var n;const r=null==e||null===(n=e.config)||void 0===n?void 0:n.get_current_url;if(!ne(r))return t;try{const e=r(t);return oe(e)&&e?e:t}catch(e){return xt.error("Error in get_current_url, falling back to window.location.href",e),t}}(e,r)}(t))&&void 0!==r?r:"u">typeof window?window.location.href:void 0;if(!i)return!1;const s=[e.conditions.url],a=function(e){return null!=e?e:"icontains"}(null===(o=e.conditions)||void 0===o?void 0:o.urlMatchType);return It[a](s,[i])}const Ir=e=>Nt("inProgressSurvey_",e),Dr={},Or=(e,t)=>{const n=Ir(e);try{localStorage.setItem(n,JSON.stringify(t)),delete Dr[n]}catch(e){Ot.error("Error setting in-progress survey state in localStorage",e),Dr[n]=t}},Nr=e=>{const t=Ir(e),n=Dr[t];if(n)return n;try{const e=localStorage.getItem(t);if(e)return JSON.parse(e)}catch(e){Ot.error("Error getting in-progress survey state from localStorage",e)}return null},$r=e=>{const t=Ir(e);delete Dr[t];try{localStorage.removeItem(t)}catch(e){Ot.error("Error clearing in-progress survey state from localStorage",e)}};function zr(e,t=nt,n){if(e===ot)return{};switch(t){case"top_left":return{top:"0",left:"0",transform:"translate(30px, 30px)"};case"top_right":return{top:"0",right:"0",transform:"translate(-30px, 30px)"};case"top_center":return{top:"0",left:"50%",transform:"translate(-50%, 30px)"};case"middle_left":return{top:"50%",left:"0",transform:"translate(30px, -50%)"};case"middle_right":return{top:"50%",right:"0",transform:"translate(-30px, -50%)"};case"middle_center":return{top:"50%",left:"50%",transform:"translate(-50%, -50%)"};case et:return{left:"30px"};case tt:return{left:"50%",transform:"translateX(-50%)"};default:return{right:e===rt&&n===Xe?"60px":"30px"}}}const Cr=Q("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Q("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"})}),Lr=Q("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Q("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"})}),jr=Q("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Q("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"})}),Br=Q("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Q("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"})}),Hr=Q("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Q("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"})}),Rr=Q("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 0 24 24",width:"48",children:Q("path",{d:"M2 20h2c.55 0 1-.45 1-1v-9c0-.55-.45-1-1-1H2v11zm19.83-7.12c.11-.25.17-.52.17-.8V11c0-1.1-.9-2-2-2h-5.5l.92-4.65c.05-.22.02-.46-.08-.66-.23-.45-.52-.86-.88-1.22L14 2 7.59 8.41C7.21 8.79 7 9.3 7 9.83v7.84C7 18.95 8.05 20 9.34 20h8.11c.7 0 1.36-.37 1.72-.97l2.66-6.15z"})}),Fr=Q("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 0 24 24",width:"48",children:Q("path",{d:"M22 4h-2c-.55 0-1 .45-1 1v9c0 .55.45 1 1 1h2V4zM2.17 11.12c-.11.25-.17.52-.17.8V13c0 1.1.9 2 2 2h5.5l-.92 4.65c-.05.22-.02.46.08.66.23.45.52.86.88 1.22L10 22l6.41-6.41c.38-.38.59-.89.59-1.42V6.34C17 5.05 15.95 4 14.66 4H6.55c-.7 0-1.36.37-1.72.97l-2.66 6.15z"})}),Ur=({fill:e="currentColor"}={})=>Q("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:e,xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"close-survey-title-adam",children:[Q("title",{id:"close-survey-title",className:"adam-testing",children:"Close survey"}),Q("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:e})]}),Vr=Q("svg",{width:"80",height:"14",viewBox:"0 0 160 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Q("g",{"clip-path":"url(#ph-survey-logo-clip)",style:"opacity: calc(1 - var(--ph-logo-mono, 0))",children:[Q("path",{fill:"currentColor",d:"M51.66 25.22A1.9 1.9 0 0 0 50 23.33l-.34-.04c-1-.13-1.94-.6-2.65-1.33L33.28 7.75V28H49a2.66 2.66 0 0 0 2.67-2.67zM39.2 23.54h-.09a1.78 1.78 0 1 1 .1 0"}),Q("path",{fill:"url(#ph-survey-logo-paint0)",d:"M21.96 2.67v4.96l11.3 11.6h.02V7.75L26.63.85a2.8 2.8 0 0 0-2-.85 2.67 2.67 0 0 0-2.67 2.67"}),Q("path",{fill:"url(#ph-survey-logo-paint1)",d:"M21.96 7.63v11.05L31.03 28h2.25v-8.75z"}),Q("path",{fill:"url(#ph-survey-logo-paint2)",d:"M21.96 28h9.07l-9.07-9.32z"}),Q("path",{fill:"url(#ph-survey-logo-paint3)",d:"M10.74 2.66v4.5l11.22 11.52V7.63L15.3.8a2.66 2.66 0 0 0-4.56 1.86"}),Q("path",{fill:"url(#ph-survey-logo-paint4)",d:"M10.74 28h8.96l-8.96-9.32z"}),Q("path",{fill:"url(#ph-survey-logo-paint5)",d:"M10.74 7.16v11.52L19.7 28h2.26v-9.32z"}),Q("path",{fill:"url(#ph-survey-logo-paint6)",d:"M10.74 7.16 4.54.8A2.66 2.66 0 0 0 0 2.66V7.5l10.74 11.18z"}),Q("path",{fill:"url(#ph-survey-logo-paint7)",d:"M9.19 28h1.55v-9.32L0 7.5v10.73z"}),Q("path",{fill:"url(#ph-survey-logo-paint8)",d:"M0 25.41A2.6 2.6 0 0 0 2.58 28H9.2L0 18.23z"})]}),Q("path",{"clip-path":"url(#ph-survey-logo-clip)",fill:"currentColor",style:"opacity: var(--ph-logo-mono, 0)",d:"m50.02 23.34-.34-.04c-1-.13-1.95-.6-2.66-1.33L35.58 10.11a.5.5 0 0 0-.86.35V27.5c0 .28.22.5.5.5H49c1.48 0 2.67-1.2 2.67-2.67v-.1a1.9 1.9 0 0 0-1.66-1.9m-10.81.2a1.78 1.78 0 1 1 0-3.56 1.78 1.78 0 0 1 0 3.57M0 25.41A2.6 2.6 0 0 0 2.59 28h5.22a.5.5 0 0 0 .37-.84L.87 19.13a.5.5 0 0 0-.87.34zm18.81 1.74a.5.5 0 0 1-.36.85h-7.09a.5.5 0 0 1-.37-.17L8.94 25.5.13 15.82A.5.5 0 0 1 0 15.5V8.75a.5.5 0 0 1 .86-.34zM0 2.68C0 .28 2.92-.91 4.59.82l25.6 26.33a.5.5 0 0 1-.36.85h-7.76a.5.5 0 0 1-.37-.17l-2.1-2.33L.28 5.3A1 1 0 0 1 0 4.6zm10.74 0c0-2.4 2.92-3.59 4.59-1.87L32.5 18.48l.5.51v7.3a.5.5 0 0 1-.86.35l-1.12-1.14L11.3 5.23a2 2 0 0 1-.57-1.4zM33 7.46v7.8a.5.5 0 0 1-.85.36l-9.61-9.89a2 2 0 0 1-.57-1.4V2.69c0-2.4 2.92-3.59 4.59-1.86z"}),Q("path",{fill:"currentColor",d:"M64.9 22.88c-.67 0-1.23-.56-1.23-1.24V5.24c0-.69.56-1.24 1.24-1.24h6.55c3.89 0 6.39 2.32 6.39 5.9 0 3.6-2.5 5.91-6.4 5.91h-3.53v5.83c0 .68-.56 1.24-1.24 1.24zm3.02-11.94c0 .68.55 1.23 1.23 1.23h1.88c1.6 0 2.58-.86 2.58-2.26s-.97-2.27-2.58-2.27h-1.88c-.68 0-1.23.55-1.23 1.23zM84.71 23.1c-4.18 0-7.14-2.97-7.14-7.02s2.96-7.01 7.14-7.01c4.14 0 7.14 2.97 7.14 7.01 0 4.05-3 7.01-7.14 7.01m-3.22-7.02c0 2.16 1.3 3.64 3.22 3.64 1.9 0 3.2-1.48 3.2-3.64s-1.3-3.64-3.2-3.64c-1.93 0-3.22 1.48-3.22 3.64m16.34 7.03a6.2 6.2 0 0 1-5.54-3.01c-.34-.57-.01-1.26.6-1.5l.77-.3c.7-.27 1.45.15 1.92.73a2.8 2.8 0 0 0 2.25 1.08c1.05 0 1.75-.51 1.75-1.27 0-2.13-7.17-.7-7.17-5.85 0-2.13 1.85-3.91 4.83-3.91 2.27 0 4.2.9 5.17 2.31.36.53.05 1.2-.54 1.44l-.85.35c-.68.29-1.45-.14-2-.63a2.5 2.5 0 0 0-1.64-.64c-.89 0-1.5.38-1.5.97 0 2.16 7.27.38 7.27 5.88 0 2.35-2.15 4.34-5.32 4.34m14.64-1.31c.04.57-.3 1.1-.86 1.2q-.6.1-1.27.11c-2.92 0-5.15-1.56-5.15-4.85v-5.66h-.91c-.69 0-1.24-.56-1.24-1.24v-.82c0-.68.55-1.23 1.24-1.23h.91v-2.7c0-.69.55-1.24 1.23-1.24h1.48c.68 0 1.24.55 1.24 1.23v2.7h2.04c.68 0 1.23.56 1.23 1.24v.82c0 .68-.55 1.24-1.23 1.24h-2.04v5.15c0 1.2.64 1.91 1.6 1.91.75 0 1.6.5 1.66 1.25zM125.5 5.23c0-.68.55-1.23 1.23-1.23h1.8c.68 0 1.23.55 1.23 1.23v16.41c0 .68-.55 1.24-1.23 1.24h-1.8c-.68 0-1.23-.56-1.23-1.24v-5.43c0-.68-.56-1.23-1.24-1.23h-5c-.67 0-1.23.55-1.23 1.23v5.43c0 .68-.55 1.24-1.23 1.24h-1.77c-.69 0-1.24-.56-1.24-1.24V5.24c0-.69.55-1.24 1.24-1.24h1.77c.68 0 1.23.55 1.23 1.23v4.87c0 .68.56 1.23 1.24 1.23h5c.67 0 1.23-.55 1.23-1.23zm12.87 17.87c-4.19 0-7.14-2.97-7.14-7.02s2.95-7.01 7.14-7.01c4.13 0 7.14 2.97 7.14 7.01 0 4.05-3 7.01-7.14 7.01m-3.22-7.02c0 2.16 1.29 3.64 3.22 3.64 1.9 0 3.2-1.48 3.2-3.64s-1.3-3.64-3.2-3.64c-1.93 0-3.22 1.48-3.22 3.64m17.17 6.37c-3.84 0-6.2-2.58-6.2-6.68s2.36-6.69 6.12-6.69c1.58 0 2.82.54 3.54 1.37 0-.64.52-1.15 1.16-1.15h1.5c.68 0 1.24.55 1.24 1.23V21.9c0 3.64-2.77 6.09-6.93 6.09-2.64 0-4.9-1.2-5.85-3.09-.31-.62.16-1.29.85-1.4l1.14-.17c.67-.11 1.29.4 1.78.85.5.46 1.26.7 2.08.7 1.85 0 3.06-1.04 3.06-2.55v-1.3c-.7.9-2.01 1.4-3.49 1.4m-2.36-6.68c0 2.02 1.18 3.31 3 3.31 1.86 0 3.04-1.29 3.04-3.31s-1.18-3.32-3.03-3.32c-1.83 0-3.01 1.3-3.01 3.32"}),Q("defs",{children:[Q("linearGradient",{id:"ph-survey-logo-paint0",x1:"21.96",x2:"33.28",y1:"9.62",y2:"9.62",gradientUnits:"userSpaceOnUse",children:[Q("stop",{"stop-color":"#ffd849"}),Q("stop",{offset:".96","stop-color":"#fbae01"})]}),Q("linearGradient",{id:"ph-survey-logo-paint1",x1:"21.96",x2:"33.28",y1:"17.81",y2:"17.81",gradientUnits:"userSpaceOnUse",children:[Q("stop",{"stop-color":"#ffb700"}),Q("stop",{offset:"1","stop-color":"#f9aa01"})]}),Q("linearGradient",{id:"ph-survey-logo-paint2",x1:"21.96",x2:"31.03",y1:"23.34",y2:"23.34",gradientUnits:"userSpaceOnUse",children:[Q("stop",{"stop-color":"#ff9500"}),Q("stop",{offset:"1","stop-color":"#f8aa00"})]}),Q("linearGradient",{id:"ph-survey-logo-paint3",x1:"10.74",x2:"21.96",y1:"9.34",y2:"9.34",gradientUnits:"userSpaceOnUse",children:[Q("stop",{"stop-color":"#ff651e"}),Q("stop",{offset:"1","stop-color":"#e4400a"})]}),Q("linearGradient",{id:"ph-survey-logo-paint4",x1:"10.74",x2:"19.7",y1:"23.34",y2:"23.34",gradientUnits:"userSpaceOnUse",children:[Q("stop",{"stop-color":"#c42c00"}),Q("stop",{offset:"1","stop-color":"#d63600"})]}),Q("linearGradient",{id:"ph-survey-logo-paint5",x1:"10.74",x2:"21.96",y1:"17.58",y2:"17.58",gradientUnits:"userSpaceOnUse",children:[Q("stop",{"stop-color":"#ef3c00"}),Q("stop",{offset:"1","stop-color":"#d63601"})]}),Q("linearGradient",{id:"ph-survey-logo-paint6",x1:"0",x2:"10.74",y1:"9.34",y2:"9.34",gradientUnits:"userSpaceOnUse",children:[Q("stop",{"stop-color":"#3f80ff"}),Q("stop",{offset:"1","stop-color":"#084fe0"})]}),Q("linearGradient",{id:"ph-survey-logo-paint7",x1:"0",x2:"10.74",y1:"17.75",y2:"17.75",gradientUnits:"userSpaceOnUse",children:[Q("stop",{"stop-color":"#0255ff"}),Q("stop",{offset:"1","stop-color":"#0145d2"})]}),Q("linearGradient",{id:"ph-survey-logo-paint8",x1:"0",x2:"9.19",y1:"23.11",y2:"23.11",gradientUnits:"userSpaceOnUse",children:[Q("stop",{"stop-color":"#0041c6"}),Q("stop",{offset:"1","stop-color":"#0045d0"})]}),Q("clipPath",{id:"ph-survey-logo-clip",children:Q("path",{fill:"#fff",d:"M0 0h51.67v28H0z"})})]})]});function Gr({urlParams:e}){const t=e?Object.entries(e).map(([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`).join("&"):"";return Q("a",{href:"https://posthog.com/surveys"+(t?`?${t}`:""),target:"_blank",rel:"noopener",className:"footer-branding",children:["Survey by ",Vr]})}function Qr({text:e,submitDisabled:t,appearance:n,onSubmit:r,link:o,onPreviewSubmit:i,skipSubmitButton:s,canGoBack:a,onBack:l}){const{isPreviewMode:u}=Ve(Mr),c=!!a&&!!l,d=!s&&Q("button",{className:"form-submit",disabled:t,type:"button",onClick(){var e;o&&(null===(e=window)||void 0===e||e.open(o)),u?null==i||i():r()},children:e});return Q("div",{className:"bottom-section",children:[c?Q("div",{className:"form-buttons form-buttons-with-back",children:[Q("button",{className:"form-back",type:"button","aria-label":"Go to previous question",onClick:l,children:n.backButtonText||"Back"}),d]}):d,!n.whiteLabel&&Q(Gr,{urlParams:{utm_source:"survey-footer"}})]})}function Zr({question:e,forceDisableHtml:t,htmlFor:n}){return Q("div",{class:e.question||e.description?"question-header":"question-header question-header--empty",children:[Q(e.type===it?"label":"h3",{className:"survey-question",htmlFor:n,children:e.question}),e.description&&Ar({component:x("p",{className:"survey-question-description"}),children:e.description,renderAsHtml:!t&&"text"!==e.descriptionContentType})]})}function Wr({onClick:e}){const{isPreviewMode:t}=Ve(Mr);return Q("button",{className:"form-cancel",onClick:e,disabled:t,"aria-label":"Close survey",type:"button",children:Ur({fill:"black"})})}function Yr({header:e,description:t,contentType:n,forceDisableHtml:r,appearance:o,onClose:i}){const{isPopup:s}=Ve(Mr);return Re(()=>{const e=e=>{"Enter"!==e.key&&"Escape"!==e.key||(e.preventDefault(),i())};return St(window,"keydown",e),()=>{window.removeEventListener("keydown",e)}},[i]),Q("div",{className:"thank-you-message",role:"status",tabIndex:0,"aria-atomic":"true",children:[s&&!0!==o.hideCancelButton&&Q(Wr,{onClick:()=>i()}),Q("h3",{className:"thank-you-message-header",children:e}),t&&Ar({component:x("p",{className:"thank-you-message-body"}),children:t,renderAsHtml:!r&&"text"!==n}),s&&Q(Qr,{text:o.thankYouMessageCloseButtonText||"Close",submitDisabled:!1,appearance:o,onSubmit:()=>i()})]})}function Kr({header:e,description:t,contentType:n,forceDisableHtml:r,appearance:o,onStart:i}){const{isPopup:s,onPreviewSubmit:a,onPopupSurveyDismissed:l}=Ve(Mr);return Q("div",{className:"intro-screen",role:"status",tabIndex:0,"aria-atomic":"true",children:[s&&!0!==o.hideCancelButton&&Q(Wr,{onClick:()=>l()}),e&&Q("h3",{className:"intro-screen-header",children:e}),t&&Ar({component:x("p",{className:"intro-screen-body"}),children:t,renderAsHtml:!r&&"text"!==n}),Q(Qr,{text:o.introScreenButtonText||"Get started",submitDisabled:!1,appearance:o,onSubmit:i,onPreviewSubmit:()=>a(null)})]})}const Jr=e=>te(e)&&e.every(e=>oe(e));function Xr({question:e,forceDisableHtml:t,appearance:n,onSubmit:r,onPreviewSubmit:o,displayQuestionIndex:i,initialValue:s,canGoBack:a,onBack:l}){const{isPreviewMode:u}=Pr(),c=Fe(null),[d,f]=He(()=>oe(s)?s:""),p=null==n?void 0:n.disableAutofocus;Re(()=>{p||setTimeout(()=>{var e;u||null===(e=c.current)||void 0===e||e.focus()},100)},[u,p]);const h=`surveyQuestion${i}`,v=Ue(()=>function(e,t,n){const r=e.trim();if(!n&&""===r)return"This field is required";if(""===r)return!1;if(t&&t.length>0)for(const e of t)switch(e.type){case Y:var o;if(void 0!==e.value&&e.value>r.length)return null!==(o=e.errorMessage)&&void 0!==o?o:`Please enter at least ${e.value} characters`;break;case K:var i;if(void 0!==e.value&&r.length>e.value)return null!==(i=e.errorMessage)&&void 0!==i?i:`Please enter no more than ${e.value} characters`}return!1}(d,e.validation,e.optional),[d,e.validation,e.optional]),m=we(e.validation,Y),y=we(e.validation,K),g=Ue(()=>function(e,t){const n=1===e?void 0:e;return n&&t?`Enter ${n}-${t} characters`:n?`Enter at least ${n} ${1===n?"character":"characters"}`:t?`Maximum ${t} ${1===t?"character":"characters"}`:void 0}(m,y),[m,y]),b=()=>{v||r(d.trim())},w=()=>{v||o(d.trim())};return Q(S,{children:[Q("div",{className:"question-container",children:[Q(Zr,{question:e,forceDisableHtml:t,htmlFor:h}),Q("textarea",{ref:c,id:h,rows:4,placeholder:null==n?void 0:n.placeholder,minLength:m,maxLength:y,onInput(e){f(e.currentTarget.value),e.stopPropagation()},onKeyDown(e){e.stopPropagation(),"Enter"!==e.key||!e.metaKey&&!e.ctrlKey||v||(e.preventDefault(),u?w():b())},value:d}),g&&Q("div",{className:"validation-hint",children:g})]}),Q(Qr,{text:e.buttonText||"Submit",submitDisabled:!!v,appearance:n,onSubmit:b,onPreviewSubmit:w,canGoBack:a,onBack:l})]})}function eo({question:e,forceDisableHtml:t,appearance:n,onSubmit:r,onPreviewSubmit:o,canGoBack:i,onBack:s}){return Q(S,{children:[Q("div",{className:"question-container",children:Q(Zr,{question:e,forceDisableHtml:t})}),Q(Qr,{text:e.buttonText||"Submit",submitDisabled:!1,link:e.link,appearance:n,onSubmit:()=>r("link clicked"),onPreviewSubmit:()=>o("link clicked"),canGoBack:i,onBack:s})]})}function to({question:e,forceDisableHtml:t,displayQuestionIndex:n,appearance:r,onSubmit:o,onPreviewSubmit:i,initialValue:s,canGoBack:a,onBack:l}){var u;const c=e.scale,d=10===e.scale?0:1,[f,p]=He(()=>ae(s)?s:te(s)&&s.length>0&&ae(parseInt(s[0]))?parseInt(s[0]):oe(s)&&ae(parseInt(s))?parseInt(s):null),h="emoji"===e.display&&2===e.scale,{isPreviewMode:v}=Pr(),m=e=>v?i(e):o(e);return Q(S,{children:[Q("div",{className:"question-container",children:[Q(Zr,{question:e,forceDisableHtml:t}),Q("div",{className:"rating-section",children:[Q("div",{className:"rating-options",children:["emoji"===e.display&&Q("div",{className:"rating-options-emoji"+(h?" rating-options-emoji-2":""),children:null===(u=ao[e.scale])||void 0===u?void 0:u.map((t,r)=>Q("button",{"aria-label":`Rate ${r+1}`,className:`ratings-emoji question-${n}-rating-${r} ${r+1===f?"rating-active":""}`,value:r+1,type:"button",onClick(){const t=r+1;p(t),e.skipSubmitButton&&m(t)},children:t},r))}),"number"===e.display&&Q("div",{className:"rating-options-number",style:{gridTemplateColumns:`repeat(${c-d+1}, minmax(0, 1fr))`},children:lo(e.scale).map((t,o)=>Q(no,{displayQuestionIndex:n,active:f===t,appearance:r,num:t,setActiveNumber(t){p(t),e.skipSubmitButton&&m(t)}},o))})]}),!h&&Q("div",{className:"rating-text",children:[Q("div",{children:e.lowerBoundLabel}),Q("div",{children:e.upperBoundLabel})]})]})]}),Q(Qr,{text:e.buttonText||(null==r?void 0:r.submitButtonText)||"Submit",submitDisabled:ie(f)&&!e.optional,appearance:r,onSubmit:()=>o(f),onPreviewSubmit:()=>i(f),skipSubmitButton:e.skipSubmitButton,canGoBack:a,onBack:l})]})}function no({num:e,active:t,displayQuestionIndex:n,setActiveNumber:r}){return Q("button",{"aria-label":`Rate ${e}`,className:`ratings-number question-${n}-rating-${e} ${t?"rating-active":""}`,type:"button",onClick(){r(e)},children:e})}function ro({question:e,forceDisableHtml:t,displayQuestionIndex:n,appearance:r,onSubmit:o,onPreviewSubmit:i,initialValue:s,canGoBack:a,onBack:l}){const u=Fe(null),c=Ue(()=>(e=>{var t;if(!e.shuffleOptions)return e.choices;const n=[...e.choices],r=e.hasOpenChoice&&null!==(t=n.pop())&&void 0!==t?t:null,o=(i=n,(s=Dt(n)).length>1&&i.every((e,t)=>e===s[t])?s.reverse():s);var i,s;return ie(r)||o.push(r),o})(e),[e]),[d,f]=He(()=>((e,t)=>oe(e)||Jr(e)?e:t===at?null:[])(s,e.type)),[p,h]=He(()=>((e,t)=>{if(oe(e)&&!t.includes(e))return{isSelected:!0,inputValue:e};if(Jr(e)){const n=e.find(e=>!t.includes(e));if(n)return{isSelected:!0,inputValue:n}}return{isSelected:!1,inputValue:""}})(s,c)),{isPreviewMode:v}=Pr(),m=e.type===at,y=e.type===st,g=e.skipSubmitButton&&m&&!e.hasOpenChoice,b=(e,t)=>{if(t){const e=!p.isSelected;return h(t=>pe(pe({},t),{},{isSelected:e,inputValue:e?t.inputValue:""})),m&&f(""),void(e&&setTimeout(()=>{var e;return null===(e=u.current)||void 0===e?void 0:e.focus()},75))}if(m)return f(e),h(e=>pe(pe({},e),{},{isSelected:!1,inputValue:""})),void(g&&(o(e),v&&i(e)));y&&te(d)&&(d.includes(e)?f(d.filter(t=>t!==e)):f([...d,e]))},w=e=>{e.stopPropagation();const t=e.currentTarget.value;h(e=>pe(pe({},e),{},{inputValue:t})),m&&f(t)},x=e=>{e.stopPropagation(),"Enter"!==e.key||k()||(e.preventDefault(),T()),"Escape"===e.key&&(e.preventDefault(),h(e=>pe(pe({},e),{},{isSelected:!1,inputValue:""})),m&&f(null))},k=()=>!(e.optional||!ie(d)&&(!te(d)||p.isSelected||0!==d.length)&&(!p.isSelected||""!==p.inputValue.trim())),T=()=>{p.isSelected&&y?te(d)&&(v?i([...d,p.inputValue]):o([...d,p.inputValue])):v?i(d):o(d)};return Q(S,{children:[Q("div",{className:"question-container",children:[Q(Zr,{question:e,forceDisableHtml:t}),Q("fieldset",{className:"multiple-choice-options limit-height",children:[Q("legend",{className:"sr-only",children:y?" Select all that apply":" Select one"}),c.map((t,r)=>{const o=!!e.hasOpenChoice&&r===e.choices.length-1,i=`surveyQuestion${n}Choice${r}`,s=`${i}Open`,a=o?p.isSelected:m?d===t:te(d)&&d.includes(t);return Q("label",{className:o?"choice-option-open":"",children:[Q("div",{className:"response-choice",children:[Q("input",{type:m?"radio":"checkbox",name:i,checked:a,onChange:()=>b(t,o),id:i,"aria-controls":s}),Q("span",{children:o?`${t}:`:t})]}),o&&Q("input",{type:"text",ref:u,id:s,name:`question${n}Open`,value:p.inputValue,onKeyDown:x,onInput:w,onClick(e){p.isSelected||b(t,!0),e.stopPropagation()},"aria-label":`${t} - please specify`})]},r)})]})]}),Q(Qr,{text:e.buttonText||"Submit",submitDisabled:k(),appearance:r,onSubmit:T,onPreviewSubmit:T,skipSubmitButton:g,canGoBack:a,onBack:l})]})}const oo=[1,2,3,4,5],io=[1,2,3,4,5,6,7],so=[0,1,2,3,4,5,6,7,8,9,10],ao={2:[Rr,Fr],3:[jr,Lr,Cr],5:[Br,jr,Lr,Cr,Hr]};function lo(e){switch(e){case 5:default:return oo;case 7:return io;case 10:return so}}const uo=kt("[Surveys]");function co(e,t,n){var r;const o=e.questions[t],i=t+1;if(!(null===(r=o.branching)||void 0===r?void 0:r.type))return t===e.questions.length-1?ut:i;if(o.branching.type===ut)return ut;if("specific_question"===o.branching.type){if(Number.isInteger(o.branching.index))return o.branching.index}else if("response_based"===o.branching.type){if(o.type===at){var s;let e=o.choices.indexOf(`${n}`);if(-1===e&&o.hasOpenChoice&&(e=o.choices.length-1),null===(s=o.branching)||void 0===s||null===(s=s.responseValues)||void 0===s?void 0:s.hasOwnProperty(e)){const t=o.branching.responseValues[e];if(Number.isInteger(t))return t;if(t===ut)return ut}}else if(o.type===lt){var a;if(o.optional&&se(n))return i===e.questions.length?ut:i;if("number"!=typeof n||!Number.isInteger(n))throw new Error("The response type must be an integer");const t=function(e,t){if(2===t){if(1>e||e>2)throw new Error("The response must be in range 1-2");return 1===e?"positive":"negative"}if(3===t){if(1>e||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(1>e||e>5)throw new Error("The response must be in range 1-5");return e>2?3===e?"neutral":"positive":"negative"}if(7===t){if(1>e||e>7)throw new Error("The response must be in range 1-7");return e>3?4===e?"neutral":"positive":"negative"}if(10===t){if(0>e||e>10)throw new Error("The response must be in range 0-10");return e>6?e>8?"promoters":"passives":"detractors"}throw new Error("The scale must be one of: 2, 3, 5, 7, 10")}(n,o.scale);if(null===(a=o.branching)||void 0===a||null===(a=a.responseValues)||void 0===a?void 0:a.hasOwnProperty(t)){const e=o.branching.responseValues[t];if(Number.isInteger(e))return e;if(e===ut)return ut}}return i}return uo.warn("Falling back to next question index due to unexpected branching type"),i}const fo=-1,po="ph:show_survey_widget",ho={position:"relative",left:"unset",right:"unset",top:"unset",bottom:"unset",transform:"unset"};function vo({survey:e,removeSurveyFromFocus:t=()=>{},setSurveyVisible:n,isPreviewMode:r=!1,posthog:o}){Re(()=>{var i;if(r||!(null===(i=e.conditions)||void 0===i?void 0:i.url))return;const s=()=>{var r;const i=e.type===rt,s=Er(e,o),a=(null===(r=e.appearance)||void 0===r?void 0:r.widgetType)===Xe&&i;if(!s)return Ot.info(`Hiding survey ${e.id} because URL does not match`),n(!1),t(e);a&&(Ot.info(`Showing survey ${e.id} because it is a feedback button tab and URL matches`),n(!0))};St(window,"popstate",s),St(window,"hashchange",s);const a=window.history.pushState,l=window.history.replaceState;return window.history.pushState=function(...e){a.apply(this,e),s()},window.history.replaceState=function(...e){l.apply(this,e),s()},()=>{window.removeEventListener("popstate",s),window.removeEventListener("hashchange",s),window.history.pushState=a,window.history.replaceState=l}},[r,e,t,n,o])}function mo(e="right"){switch(e){case"top":return{top:"0",left:"50%",transform:"translateX(-50%)"};case"left":return{top:"50%",left:"0",transform:"rotate(90deg) translateY(-100%)",transformOrigin:"left top"};case"bottom":return{bottom:"0",left:"50%",transform:"translateX(-50%)"};default:return{top:"50%",right:"0",transform:"rotate(-90deg) translateY(-100%)",transformOrigin:"right top"}}}function yo({survey:e,forceDisableHtml:t,posthog:n,style:r={},previewPageIndex:o,removeSurveyFromFocus:i=()=>{},isPopup:s=!0,onPreviewSubmit:a=()=>{},onPreviewBack:l=()=>{},onPopupSurveyDismissed:u=()=>{},onCloseConfirmationMessage:c=()=>{},properties:d,isSurveyCompleted:f,skipShownEvent:p,surveyLanguage:h}){var v,m,y,g,b,w,x,k,S,T,q,_;const M=Fe(null),P=Number.isInteger(o),{isPopupVisible:A,isSurveySent:E,hidePopupWithAnimation:I}=function(e,t,n,r,o,i,s,a,l){const[u,c]=He(r||0===n||e.type===ot),[d,f]=He(!1),p=Fe(!1),h=()=>{const t=()=>{i&&o(e),c(!1)};if(p.current)return;const n=null==s?void 0:s.current;n?(p.current=!0,n.style.transition="opacity 200ms ease-out",n.style.opacity="0",setTimeout(()=>{p.current=!1,t()},250)):t()},v=t=>{t.detail.surveyId===e.id&&h()};return Re(()=>{if(!t)return void Ot.error("usePopupVisibility hook called without a PostHog instance.");if(r)return;let o;const i=t=>{var n,r;if(t.detail.surveyId===e.id){if(!(null===(n=e.appearance)||void 0===n?void 0:n.displayThankYouMessage))return h();f(!0),(null===(r=e.appearance)||void 0===r?void 0:r.autoDisappear)&&(o&&clearTimeout(o),o=setTimeout(h,5e3))}},s=()=>{var n;if(Er(e,t)){c(!0);try{localStorage.setItem("lastSeenSurveyDate",(new Date).toISOString())}catch(e){}window.dispatchEvent(new Event("PHSurveyShown")),a||null===(n=t.client)||void 0===n||n.capture(ct,pe(pe({[ht]:e.name,[pt]:e.id,[vt]:e.current_iteration,[mt]:e.current_iteration_start_date},l&&{[yt]:l}),{},{sessionRecordingUrl:Z(t)}))}};St(window,"PHSurveyClosed",v),St(window,"PHSurveySent",i);const u=n>0?setTimeout(s,n):void 0;return re(u)&&s(),()=>{re(u)||clearTimeout(u),re(o)||clearTimeout(o),window.removeEventListener("PHSurveyClosed",v),window.removeEventListener("PHSurveySent",i)}},[]),vo({survey:e,removeSurveyFromFocus:o,setSurveyVisible:c,isPreviewMode:r,posthog:t}),{isPopupVisible:u,isSurveySent:d,setIsPopupVisible:c,hidePopupWithAnimation:h}}(e,n,(null===(v=e.appearance)||void 0===v?void 0:v.surveyPopupDelaySeconds)?1e3*e.appearance.surveyPopupDelaySeconds:0,P,i,s,M,p,h),D=E||o===e.questions.length||!0===f,[O,N]=He(!1),z=Ue(()=>!!Nr(e),[e]),C=!(!(null===(m=e.appearance)||void 0===m?void 0:m.introScreenHeader)&&!(null===(y=e.appearance)||void 0===y?void 0:y.introScreenDescription)),L=P?-1===o:!!(null===(g=e.appearance)||void 0===g?void 0:g.displayIntroScreen)&&C&&!O&&!z,j=Ue(()=>{const t=Nr(e),r=(null==t?void 0:t.surveySubmissionId)||(_e||(_e=new ke)).generate().toString()||"";return{isPreviewMode:P,previewPageIndex:o,onPopupSurveyDismissed(){h?Tr(e,n,P,h):Tr(e,n,P),u()},isPopup:s||!1,surveySubmissionId:r,onPreviewSubmit:a,onPreviewBack:l,posthog:n,properties:d,surveyLanguage:h}},[P,o,s,n,e,u,a,l,d,h]);return A?Q(Mr.Provider,{value:j,children:Q("div",{className:"ph-survey",style:pe(pe({},zr(e.type,null===(b=e.appearance)||void 0===b?void 0:b.position,null===(w=e.appearance)||void 0===w?void 0:w.widgetType)),r),ref:M,children:D?Q(Yr,{header:(null===(x=e.appearance)||void 0===x?void 0:x.thankYouMessageHeader)||"Thank you!",description:(null===(k=e.appearance)||void 0===k?void 0:k.thankYouMessageDescription)||"",forceDisableHtml:!!t,contentType:null===(S=e.appearance)||void 0===S?void 0:S.thankYouMessageDescriptionContentType,appearance:e.appearance||yr,onClose(){I(),c()}}):L?Q(Kr,{header:(null===(T=e.appearance)||void 0===T?void 0:T.introScreenHeader)||"",description:(null===(q=e.appearance)||void 0===q?void 0:q.introScreenDescription)||"",forceDisableHtml:!!t,contentType:null===(_=e.appearance)||void 0===_?void 0:_.introScreenDescriptionContentType,appearance:e.appearance||yr,onStart:()=>N(!0)}):Q(go,{survey:e,forceDisableHtml:!!t,posthog:n})})}):null}function go({survey:e,forceDisableHtml:t,posthog:n}){var r,o;const i=Ue(()=>{const t=Nr(e);if(!t)return null;const n=ae(t.lastQuestionIndex);return!n||n&&t.lastQuestionIndex>=0&&e.questions.length>t.lastQuestionIndex?t:($r(e),null)},[e]),[s,a]=He(()=>((null==i?void 0:i.responses)&&Ot.info("Survey is already in progress, filling in initial responses"),(null==i?void 0:i.responses)||{})),[l,u]=He(!1),{previewPageIndex:c,onPopupSurveyDismissed:d,isPopup:f,onPreviewSubmit:p,onPreviewBack:h,surveySubmissionId:v,isPreviewMode:m,properties:y,surveyLanguage:g}=Ve(Mr),[b,w]=He(()=>{const t=null==i?void 0:i.lastQuestionIndex,n=ae(t)&&t>=0&&e.questions.length>t?t:0;return ae(c)&&c>=0?c:n}),[x,k]=He(()=>{var t;return(null!==(t=null==i?void 0:i.visitedIndices)&&void 0!==t?t:[]).filter(t=>t>=0&&e.questions.length>t)}),[S,T]=He(()=>{var t;const n=Nr(e);return null!==(t=null==n?void 0:n.questionSnapshots)&&void 0!==t?t:{}}),q=Ue(()=>qr(_r(e,i)),[e.id,i]),_=Ue(()=>{if(!q||new Set(q).size!==q.length)return _r(e,i);const t=new Map(e.questions.map(e=>[e.id,e])),n=q.map(e=>t.get(e)).filter(e=>!!e);return n.length===q.length?n:e.questions},[q,e.questions,e,i]);Re(()=>{!m||re(c)||0>c||w(c)},[c,m]);const M=!!(null===(r=e.appearance)||void 0===r?void 0:r.allowGoBack)&&(m?(null!=c?c:0)>0:x.length>0),P=_.at(b);return P?Q("form",{className:"survey-form",name:"surveyForm",children:[f&&!0!==(null===(o=e.appearance)||void 0===o?void 0:o.hideCancelButton)&&Q(Wr,{onClick(){d()}}),Q("div",{className:"survey-box","data-question-index":b,children:[l&&Q("p",{role:"alert",children:"Your response could not be sent. Please try again later."}),wo({question:P,forceDisableHtml:t,displayQuestionIndex:b,appearance:e.appearance||yr,onSubmit:t=>(({res:t,displayQuestionIndex:r,questionId:o})=>{var i;if(!n)return void Ot.error("onNextButtonClick called without a PostHog instance.");if(!(null===(i=n.client)||void 0===i?void 0:i.canCapture))return void u(!0);if(u(!1),!o)return void Ot.error("onNextButtonClick called without a questionId.");const{responses:l,questionSnapshots:c}=function({responses:e,questionSnapshots:t={}},n,r,o){return{responses:pe(pe({},e),{},{[Tt(n)]:r}),questionSnapshots:(null==o?void 0:o.id)?pe(pe({},t),{},{[o.id]:o.question}):t}}({responses:s,questionSnapshots:S},o,t,_[r]);a(l),T(c);const d=co(e,r,t),f=d===ut,p=[...x,r];if(f||(k(p),w(d),Or(e,{surveySubmissionId:v,responses:l,lastQuestionIndex:d,questionOrder:qr(_),visitedIndices:p,surveyLanguage:g,questionSnapshots:c})),e.enable_partial_responses||f){const t=new Set(p.map(e=>{var t;return null===(t=_[e])||void 0===t?void 0:t.id}).filter(e=>!!e).map(e=>Tt(e)));(({responses:e,survey:t,surveySubmissionId:n,posthog:r,isSurveyCompleted:o,properties:i,surveyLanguage:s,questionSnapshots:a})=>{var l,u,c;r?(null===(l=r.client)||void 0===l?void 0:l.canCapture)&&(Sr(t),o&&$r(t),null===(u=r.client)||void 0===u||u.capture(ft,pe(pe(pe({[ht]:t.name,[pt]:t.id,[vt]:t.current_iteration,[mt]:t.current_iteration_start_date,sessionRecordingUrl:Z(r)},_t(pe(pe({event:"sent",survey:t,responses:e,submissionId:n,completed:o},!re(s)&&{surveyLanguage:s}),!re(a)&&{questionSnapshots:a}))),i),{},{$set:{[Pt(t,"responded")]:!0}})),o&&(window.dispatchEvent(new CustomEvent("PHSurveySent",{detail:{surveyId:t.id}})),null===(c=r.client)||void 0===c||null===(c=c.getExtension("featureFlagsCommon"))||void 0===c||c.reloadFeatureFlags())):Ot.error("[survey sent] event not captured, PostHog instance not found.")})({responses:Object.fromEntries(Object.entries(l).filter(([e])=>t.has(e))),survey:e,surveySubmissionId:v,isSurveyCompleted:f,posthog:n,properties:y,surveyLanguage:g,questionSnapshots:c})}})({res:t,displayQuestionIndex:b,questionId:P.id}),onPreviewSubmit:p,initialValue:P.id?s[Tt(P.id)]:void 0,canGoBack:M,onBack(){if(m)return void h();if(0===x.length)return;const t=x[x.length-1],n=x.slice(0,-1);k(n),w(t),Or(e,{surveySubmissionId:v,responses:s,lastQuestionIndex:t,questionOrder:qr(_),visitedIndices:n,surveyLanguage:g,questionSnapshots:S})}})]})]}):null}function bo({survey:e,forceDisableHtml:t,posthog:n,readOnly:r,surveyLanguage:o}){var i,s,a,l,u,c,d,f;const[p,h]=He(!0),[v,m]=He(!1),[y,g]=He({}),b=Fe(void 0),w=()=>{var e;(v||!n||r||(null===(e=n.client)||void 0===e?void 0:e.canCapture))&&m(!v)};if(Re(()=>{var t,o,i;if(!n)return void Ot.error("FeedbackWidget called without a PostHog instance.");if(r)return;"tab"===(null===(t=e.appearance)||void 0===t?void 0:t.widgetType)&&g((i=null===(o=e.appearance)||void 0===o?void 0:o.position)&&i!==nt&&"next_to_trigger"!==i?{}:{top:"50%",bottom:"auto"});const s=t=>{var n;const r=t;(null===(n=r.detail)||void 0===n?void 0:n.surveyId)===e.id&&(Ot.info(`Received show event for feedback button survey ${e.id}`),g(r.detail.position||{}),w())};return St(window,po,s),()=>{re(b.current)||(clearTimeout(b.current),b.current=void 0),window.removeEventListener(po,s)}},[n,r,e.id,null===(i=e.appearance)||void 0===i?void 0:i.widgetType,null===(s=e.appearance)||void 0===s?void 0:s.position,null===(a=e.appearance)||void 0===a?void 0:a.widgetSelector,null===(l=e.appearance)||void 0===l?void 0:l.borderColor]),vo({survey:e,setSurveyVisible:h,posthog:n}),!p)return null;const x=()=>{"always"!==e.schedule&&h(!1),re(b.current)||clearTimeout(b.current),b.current=setTimeout(()=>{b.current=void 0,m(!1)},200)};return Q(S,{children:["tab"===(null===(u=e.appearance)||void 0===u?void 0:u.widgetType)&&Q("button",{className:"ph-survey-widget-tab "+("top"===(null===(c=e.appearance)||void 0===c?void 0:c.tabPosition)?"widget-tab-top":""),onClick:w,disabled:r,style:mo(null===(d=e.appearance)||void 0===d?void 0:d.tabPosition),children:(null===(f=e.appearance)||void 0===f?void 0:f.widgetLabel)||""}),v&&Q(yo,{posthog:n,survey:e,forceDisableHtml:t,style:y,onPopupSurveyDismissed:x,onCloseConfirmationMessage:x,surveyLanguage:o})]})}const wo=({question:e,forceDisableHtml:t,displayQuestionIndex:n,appearance:r,onSubmit:o,onPreviewSubmit:i,initialValue:s,canGoBack:a,onBack:l})=>{const u={forceDisableHtml:t,appearance:r,onPreviewSubmit(e){i(e)},onSubmit(e){o(e)},initialValue:s,displayQuestionIndex:n,canGoBack:a,onBack:l};switch(e.type){case it:return x(Xr,pe(pe({},u),{},{question:e,key:e.id}));case"link":return x(eo,pe(pe({},u),{},{question:e,key:e.id}));case lt:return x(to,pe(pe({},u),{},{question:e,key:e.id}));case at:case st:return x(ro,pe(pe({},u),{},{question:e,key:e.id}));default:return Ot.error(`Unsupported question type: ${e.type}`),null}};function xo(e){let t=!0;return{dispose(){if(t){t=!1;const n=e();n&&ne(n.then)&&n.then(void 0,()=>{})}}}}const ko="u">typeof window?window:void 0,So="u">typeof globalThis?globalThis:ko;null!=So&&So.XMLHttpRequest&&new So.XMLHttpRequest;const To="undefined"!=typeof globalThis?globalThis:ko;To&&"undefined"==typeof self&&(To.self=To),To&&"undefined"==typeof File&&(To.File=function(){});const qo=null!=ko?ko:{},_o=e=>{const t=typeof document>"u"?void 0:document,n=null==t?void 0:t.createElement("a");return re(n)?null:(n.href=e,n)},Mo=(e,t)=>{try{let n;return JSON.stringify(e,(e,t)=>{var r;return function(e){switch({}.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object DOMError]":case"[object WebAssembly.Exception]":return!0;default:return function(e,t){try{return e instanceof t}catch(e){return!1}}(e,Error)}}(t)?(null!==(r=n)&&void 0!==r||(n=new WeakMap),n.has(t)||n.set(t,function(e){const t=pe({},e);for(const n of["name","message","stack","cause","errors"])try{n in e&&(t[n]=e[n])}catch(e){}return t}(t)),n.get(t)):"bigint"==typeof t?t.toString():t},t)}catch(t){return function(e){var t;const n=[];return null!==(t=JSON.stringify(e,function(e,t){if("bigint"==typeof t)return t.toString();if("function"!=typeof t&&"symbol"!=typeof t){if(t instanceof Error)return{name:t.name,message:t.message,stack:t.stack};if(t&&"object"==typeof t){for(;n.length>0&&n[n.length-1]!==this;)n.pop();if(n.includes(t))return"[Circular]";n.push(t)}return t}}))&&void 0!==t?t:"null"}(e)}},Po=function(e,t="&"){let n,r;const o=[];return function(e,t){if(!se(e))if(te(e))e.forEach(t);else if((e=>e instanceof FormData)(e))e.forEach((e,n)=>t(e,n));else for(const n in e)X.call(e,n)&&t(e[n],n)}(e,function(e,t){re(e)||re(t)||"undefined"===t||(n=encodeURIComponent((e=>e instanceof File)(e)?e.name:e.toString()),r=encodeURIComponent(t),o[o.length]=r+"="+n)}),o.join(t)};bt.DEBUG=!1,bt.LIB_VERSION="1.455.1",bt.LIB_NAME="web";var Ao=bt;ue(function*(e){const t=yield function(e){return be.apply(this,arguments)}(Mo(e.data),Ao.DEBUG,{rethrow:!0});if(!t)return e;const n=yield t.arrayBuffer();return pe(pe({},e),{},{Mr:{contentType:"text/plain",body:n,estimatedSize:n.byteLength}})});const Eo=()=>{var e;return(null==ko||null===(e=ko.performance)||void 0===e?void 0:e.now)?ko.performance.now():Date.now()},Io=[],Do=[50,75,100,150,200,300,400,500,750,1e3,1500,2e3,3e3,5e3,1e4],Oo=[5,10,25,...Do];var No=class{constructor(e){this._instance=e}initialize(){}get(e){const t=this._instance.persistence;if("string"==typeof e)return null==t?void 0:t.get_property(e);const n={};for(const r of e){const e=null==t?void 0:t.get_property(r);re(e)||(n[r]=e)}return n}set(e,t){var n;null===(n=this._instance.persistence)||void 0===n||n.register("string"==typeof e?{[e]:t}:e)}remove(e){var t;null===(t=this._instance.persistence)||void 0===t||t.unregister(e)}},$o=class{constructor(e){this.instance=e,this.R=xt,this.kv=new No(e),this.onSession=e=>xo(this.instance.onSessionId(t=>{try{e(t)}catch(e){this.R.error("Browser extension session listener failed",e)}})),this.onEvent=e=>xo(this.instance._addCaptureHook((t,n)=>{if(n)try{e({event:t,properties:n.properties})}catch(e){this.R.error("Browser extension event listener failed",e)}})),this.onRemoteConfig=e=>{const t=t=>{try{e(t)}catch(e){this.R.error("Browser extension remote config listener failed",e)}},n=this.instance.Tr.on("extensionsRemoteConfig",t);return this.instance.Ir&&t(this.instance.Ir),xo(n)}}get logger(){return this.R}get distinctId(){return this.instance.get_distinct_id()}get anonymousId(){var e;return null!==(e=this.instance.get_property("$device_id"))&&void 0!==e?e:this.distinctId}get deviceId(){const e=this.instance.get_property("$device_id");return"string"==typeof e?e:void 0}get library(){return{name:Ao.LIB_NAME,version:Ao.LIB_VERSION}}get initialPersonProperties(){var e,t;return null!==(e=null===(t=this.instance.persistence)||void 0===t?void 0:t.get_initial_props())&&void 0!==e?e:{}}get groups(){return this.instance.getGroups()}get session(){try{var e,t,n,r,o;const i=null===(e=this.instance.sessionManager)||void 0===e?void 0:e.checkAndGetSessionAndWindowId(!0);return{sessionId:null!==(t=null==i?void 0:i.sessionId)&&void 0!==t?t:"",windowId:null!==(n=null==i?void 0:i.windowId)&&void 0!==n?n:"",sessionStartTimestamp:null!==(r=null==i?void 0:i.sessionStartTimestamp)&&void 0!==r?r:0,lastActivityTimestamp:null!==(o=null==i?void 0:i.lastActivityTimestamp)&&void 0!==o?o:0}}catch(e){return{sessionId:"",windowId:"",sessionStartTimestamp:0,lastActivityTimestamp:0}}}get isOptedOut(){return this.instance.has_opted_out_capturing()}get canCapture(){return ne(this.instance.is_capturing)?this.instance.is_capturing():!this.isOptedOut}get isRateLimited(){var e;return!!(null===(e=this.instance.rateLimiter)||void 0===e?void 0:e.isClientRateLimited)}get projectToken(){return this.instance.config.token}getExtension(e){let t;switch(e){case"featureFlags":case"featureFlagsCommon":t=this.instance.featureFlags;break;case"logs":t=this.instance.logs;break;case"surveys":t=this.instance.surveys;break;case"autocapture":t=this.instance.autocapture}return t}capture(e,t,n){if(!n)return this.Ar(this.instance.capture(e,t));const r=pe(pe({timestamp:n.timestamp,uuid:n.uuid,$set:n.set,$set_once:n.setOnce},"unload"===n.delivery?{transport:"sendBeacon",send_instantly:!0}:{}),"immediate"===n.delivery?{send_instantly:!0}:{});return this.Ar(this.instance.capture(e,t,r))}Ar(e){var t;return!re(e)||!(null===(t=this.instance.rateLimiter)||void 0===t?void 0:t.lastEventRateLimited)}registerDynamicEventProperties(e){return xo(this.instance.Rr(e))}sendRequest(e){var t=this;return ue(function*(e,n={}){var r;const o=null!==(r=n.target)&&void 0!==r?r:"api",i=n.query?((e,t,n=!0)=>{const r=e.indexOf("#"),o=-1===r?"":e.slice(r),i=-1===r?e:e.slice(0,r),s=i.indexOf("?"),a=-1===s?i:i.slice(0,s),l=-1===s?"":i.slice(s+1),u=pe({},t),c=l.split("&").filter(e=>""!==e).map(e=>{const t=e.indexOf("="),r=-1===t?e:e.slice(0,t),o=n?u[r]:void 0;return delete u[r],se(o)?e:`${r}=${o}`}),d=Po(u);return d&&c.push(d),`${c.length>0?`${a}?${c.join("&")}`:a}${o}`})(e,n.query):e,s=t.instance.requestRouter.endpointFor(o,i),a={method:n.method,url:s,data:n.body,headers:n.headers,timeout:n.timeoutMs,fireCallbackOnDrop:!0,transport:n.transport,compression:n.compression,compressionFallback:"flags"===n.target&&"best-available"===n.compression?W.Base64:void 0,timestampMode:n.sentAt};return"api"===o&&"/i/v1/logs"===e&&(a.batchKey="logs"),"sendBeacon"===n.transport?(t.instance._send_request(a),{statusCode:202}):new Promise(e=>{var n;if(a.callback=e,"flags"===o&&(null===(n=t.instance.config.metrics)||void 0===n?void 0:n.flags)){let n,r;a.onDispatch=()=>{n=Eo()},a.onSend=e=>{r=(e=>{try{return(e=>{var t;const n=null==ko?void 0:ko.PerformanceObserver,r=null===(t=_o(e))||void 0===t?void 0:t.href;if(!n||!r)return;const o=Eo(),i={name:r,before:1/0,inFlight:!0};let s,a,l,u=1/0,c=!1;const d=()=>{c||(c=!0,clearTimeout(l),h.disconnect(),Io.splice(Io.indexOf(i),1))};let f=!1;const p=e=>{for(const t of e){const e=t.startTime;t.name!==r||(f?o>=e:o>e)||e>=i.before||s&&e>=s.startTime||(s=t)}if(s&&a&&u>=s.startTime){const e=a;d(),e(s)}},h=new n(e=>p(e.getEntriesByName(r,"resource")));h.observe({entryTypes:["resource"]});for(const e of Io)e.name===r&&(e.before=Math.min(e.before,o),f=f||e.inFlight);return Io.push(i),{take(e,t){c||(u=e,i.inFlight=!1,a=t,l=setTimeout(d,5e3),ne(h.takeRecords)&&p(h.takeRecords()))},stop:d}})(e)}catch(e){return}})(e)},a.callback=o=>{if(e(o),re(n))return;const i=n,a=Eo();try{const e=((e,t)=>{var n,r;const o=t.statusCode||void 0,i={"server.address":(null!==(n=null===(r=_o(e))||void 0===r?void 0:r.hostname)&&void 0!==n?n:e).replace(/^\[(.*)\]$/,"$1")};o&&(i["http.response.status_code"]=o);const s=((e,t)=>e?400>e?void 0:String(e):"AbortError"===(null==t?void 0:t.name)?"timeout":"_OTHER")(o,t.error);s&&(i["error.type"]=s);const a=function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}}();return a&&(i["client.timezone"]=a),i})(s,o);if(t.Er("posthog.flags.request.duration",a-i,Do,e),o.statusCode&&r)return void r.take(a,n=>t.Or(n,i,a,e))}catch(e){xt.error("Failed to record the /flags request timing",e)}null==r||r.stop()}}t.instance._send_request(a)})}).apply(this,arguments)}Or(e,t,n,r){if(e.responseEnd>=e.startTime)try{const o=Math.min(e.responseEnd,n);this.Er("posthog.flags.request.pre_send_duration",e.startTime-t,Oo,r),this.Er("posthog.flags.request.network_duration",o-e.startTime,Do,r),this.Er("posthog.flags.request.main_thread_duration",n-o,Oo,r)}catch(e){xt.error("Failed to record the /flags request timing split",e)}}Er(e,t,n,r){var o;null===(o=this.instance.metrics)||void 0===o||o.histogram(e,t,{unit:"ms",attributes:pe({},r),bounds:n})}},zo=class{constructor(e){this._instance=e}get(){var e,t,n,r;const o=null===(e=this._instance)||void 0===e?void 0:e.config;return{disableSurveys:!!(null==o?void 0:o.disable_surveys),cookielessMode:!!(null==o?void 0:o.cookieless_mode),advancedEnableSurveys:!!(null==o?void 0:o.advanced_enable_surveys),requestTimeoutMs:null!==(t=null==o?void 0:o.surveys_request_timeout_ms)&&void 0!==t?t:1e4,prefillFromUrl:!!(null==o||null===(n=o.surveys)||void 0===n?void 0:n.prefillFromUrl),automaticDisplay:!(null==o?void 0:o.disable_surveys_automatic_display),featureFlagEvaluation:!(null==o?void 0:o.advanced_disable_feature_flags),overrideLanguage:null==o?void 0:o.override_display_language,prepareStylesheet:null==o?void 0:o.prepare_external_dependency_stylesheet,get_current_url:null==o?void 0:o.get_current_url,uiHost:null===(r=this._instance)||void 0===r||null===(r=r.requestRouter)||void 0===r?void 0:r.endpointFor("ui","")}}getExtensions(){const e=null==qo?void 0:qo.__PosthogExtensions__;if(!e||!this._instance)return;const t=this._instance,{generateSurveys:n}=e,r=(null==(o=t)?void 0:o.config.require_subresource_integrity)?o.__loadExternalDependency:null===(i=qo.__PosthogExtensions__)||void 0===i?void 0:i.loadExternalDependency;var o,i;return{generateSurveys:n?e=>n(t,e):void 0,loadExternalDependency:r?e=>r(t,"surveys",e):void 0}}onMatchingConditionsChanged(e){var t,n;const r=null===(t=this._instance)||void 0===t?void 0:t._addCaptureHook(t=>{"$pageview"!==t&&t!==ct&&t!==dt&&t!==ft||e()}),o=()=>e();St(ko,"PHSurveyShown",o);let i=!1;const s=null===(n=this._instance)||void 0===n?void 0:n.onFeatureFlags(()=>{i&&e()});return i=!0,()=>{i=!1,null==r||r(),null==s||s(),null==ko||ko.removeEventListener("PHSurveyShown",o)}}};const Co=new WeakMap;function Lo(e){var t;const n=new zo(e);if(!e)return{get config(){return n.get()}};if(null===(t=e.surveys)||void 0===t?void 0:t.getRenderContext)return e.surveys.getRenderContext();let r=Co.get(e);return r||(r={client:new $o(e),get config(){return n.get()},surveys:e.surveys},Co.set(e,r)),r}const jo=e=>(({survey:e,root:t,forceDisableHtml:n,posthog:r})=>{const o=kr();o&&(t.appendChild(o),br(t,e.type,e.appearance)),V(Q(bo,{forceDisableHtml:n,survey:e,posthog:r,readOnly:!0}),t)})(pe(pe({},e),{},{posthog:Lo()})),Bo=e=>(({survey:e,parentElement:t,previewPageIndex:n,forceDisableHtml:r,onPreviewSubmit:o,onPreviewBack:i,posthog:s,positionStyles:a=ho})=>{const l=t.querySelector("style[data-ph-survey-style]");l&&l.remove();const u=kr();u&&(t.appendChild(u),br(t,e.type,e.appearance)),V(Q(yo,{survey:e,posthog:s,forceDisableHtml:r,style:a,onPreviewSubmit:o,onPreviewBack:i,previewPageIndex:n,removeSurveyFromFocus(){}}),t)})(pe(pe({},e),{},{posthog:Lo(e.posthog)}));export{fo as INTRO_SCREEN_PREVIEW_INDEX,co as getNextSurveyStep,jo as renderFeedbackWidgetPreview,Bo as renderSurveysPreview};
|
|
2
2
|
//# sourceMappingURL=surveys-preview.js.map
|