posthog-js 1.316.0 → 1.317.0
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/element-inference.d.ts +21 -0
- package/dist/element-inference.js +2 -0
- package/dist/element-inference.js.map +1 -0
- package/dist/lazy-recorder.js +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/module.d.ts +12 -0
- package/dist/module.full.d.ts +12 -0
- package/dist/module.full.js +1 -1
- package/dist/module.full.js.map +1 -1
- package/dist/module.full.no-external.d.ts +12 -0
- 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.js.map +1 -1
- package/dist/module.no-external.d.ts +12 -0
- package/dist/module.no-external.js +1 -1
- package/dist/module.no-external.js.map +1 -1
- package/dist/posthog-recorder.js +1 -1
- package/dist/product-tours-preview.d.ts +12 -0
- package/dist/product-tours-preview.js +1 -1
- package/dist/product-tours-preview.js.map +1 -1
- package/dist/product-tours.js +1 -1
- package/dist/product-tours.js.map +1 -1
- package/dist/src/entrypoints/element-inference.es.d.ts +1 -0
- package/dist/src/entrypoints/product-tours.d.ts +2 -0
- package/dist/src/extensions/product-tours/element-inference.d.ts +30 -0
- package/dist/src/extensions/product-tours/index.d.ts +2 -0
- package/dist/src/extensions/product-tours/product-tours-utils.d.ts +2 -1
- package/dist/src/extensions/surveys.d.ts +2 -2
- package/dist/src/posthog-product-tours-types.d.ts +7 -0
- package/dist/src/utils/survey-branching.d.ts +11 -0
- package/dist/src/utils/survey-url-prefill.d.ts +7 -5
- package/dist/surveys-preview.d.ts +18 -1
- package/dist/surveys-preview.js +1 -1
- package/dist/surveys-preview.js.map +1 -1
- package/dist/surveys.js +1 -1
- package/dist/surveys.js.map +1 -1
- package/lib/package.json +5 -1
- package/lib/src/entrypoints/element-inference.es.d.ts +1 -0
- package/lib/src/entrypoints/element-inference.es.js +8 -0
- package/lib/src/entrypoints/element-inference.es.js.map +1 -0
- package/lib/src/entrypoints/product-tours.d.ts +2 -0
- package/lib/src/entrypoints/product-tours.js +5 -0
- package/lib/src/entrypoints/product-tours.js.map +1 -1
- package/lib/src/extensions/product-tours/components/ProductTourTooltip.js +5 -2
- package/lib/src/extensions/product-tours/components/ProductTourTooltip.js.map +1 -1
- package/lib/src/extensions/product-tours/components/ProductTourTooltipInner.js +1 -1
- package/lib/src/extensions/product-tours/components/ProductTourTooltipInner.js.map +1 -1
- package/lib/src/extensions/product-tours/element-inference.d.ts +30 -0
- package/lib/src/extensions/product-tours/element-inference.js +296 -0
- package/lib/src/extensions/product-tours/element-inference.js.map +1 -0
- package/lib/src/extensions/product-tours/index.d.ts +2 -0
- package/lib/src/extensions/product-tours/index.js +4 -1
- package/lib/src/extensions/product-tours/index.js.map +1 -1
- package/lib/src/extensions/product-tours/preview.js +1 -1
- package/lib/src/extensions/product-tours/preview.js.map +1 -1
- package/lib/src/extensions/product-tours/product-tours-utils.d.ts +2 -1
- package/lib/src/extensions/product-tours/product-tours-utils.js +12 -0
- package/lib/src/extensions/product-tours/product-tours-utils.js.map +1 -1
- package/lib/src/extensions/product-tours/product-tours.js +15 -31
- package/lib/src/extensions/product-tours/product-tours.js.map +1 -1
- package/lib/src/extensions/surveys.d.ts +2 -2
- package/lib/src/extensions/surveys.js +5 -94
- package/lib/src/extensions/surveys.js.map +1 -1
- package/lib/src/posthog-product-tours-types.d.ts +7 -0
- package/lib/src/posthog-product-tours-types.js.map +1 -1
- package/lib/src/utils/survey-branching.d.ts +11 -0
- package/lib/src/utils/survey-branching.js +106 -0
- package/lib/src/utils/survey-branching.js.map +1 -0
- package/lib/src/utils/survey-url-prefill.d.ts +7 -5
- package/lib/src/utils/survey-url-prefill.js +30 -18
- package/lib/src/utils/survey-url-prefill.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(){"use strict";function e(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function t(t){return function(){var r=this,n=arguments;return new Promise((function(i,o){var a=t.apply(r,n);function s(t){e(a,i,o,s,u,"next",t)}function u(t){e(a,i,o,s,u,"throw",t)}s(void 0)}))}}function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},r.apply(null,arguments)}var n,i=["type"],o=Object.defineProperty,a=(e,t,r)=>((e,t,r)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),s=Object.defineProperty,u=(e,t,r)=>((e,t,r)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),l=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(l||{}),c={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},d={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]};var h={};function f(e){if(h[e])return h[e];var t=function(e){var t,r=null==globalThis||null==(t=globalThis.Zone)||null==t.__symbol__?void 0:t.__symbol__(e);return r&&globalThis[r]?globalThis[r]:void 0}(e)||globalThis[e],r=t.prototype,n=e in c?c[e]:void 0,i=Boolean(n&&n.every((e=>{var t,n;return Boolean(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))}))),o=e in d?d[e]:void 0,a=Boolean(o&&o.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(i&&a)return h[e]=t.prototype,t.prototype;try{var s=document.createElement("iframe");document.body.appendChild(s);var u=s.contentWindow;if(!u)return t.prototype;var l=u[e].prototype;return document.body.removeChild(s),l?h[e]=l:t.prototype}catch(e){return t.prototype}}var v={};function p(e,t,r){var n,i=e+"."+String(r);if(v[i])return v[i].call(t);var o=f(e),a=null==(n=Object.getOwnPropertyDescriptor(o,r))?void 0:n.get;return a?(v[i]=a,a.call(t)):t[r]}var m={};function y(e,t,r){var n=e+"."+String(r);if(m[n])return m[n].bind(t);var i=f(e)[r];return"function"!=typeof i?t[r]:(m[n]=i,i.bind(t))}var g={childNodes:function(e){return p("Node",e,"childNodes")},parentNode:function(e){return p("Node",e,"parentNode")},parentElement:function(e){return p("Node",e,"parentElement")},textContent:function(e){return p("Node",e,"textContent")},contains:function(e,t){return y("Node",e,"contains")(t)},getRootNode:function(e){return y("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?p("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?p("Element",e,"shadowRoot"):null},querySelector:function(e,t){return p("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return p("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return f("MutationObserver").constructor}};function b(e){return e.nodeType===e.ELEMENT_NODE}function w(e){var t=e&&"host"in e&&"mode"in e&&g.host(e)||null;return Boolean(t&&"shadowRoot"in t&&g.shadowRoot(t)===e)}function C(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function I(e){try{var t=e.rules||e.cssRules;if(!t)return null;var r=Array.from(t,(t=>k(t,e.href))).join("");return(n=r).includes(" background-clip: text;")&&!n.includes(" -webkit-background-clip: text;")&&(n=n.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),n}catch(e){return null}var n}function k(e,t){if(function(e){return"styleSheet"in e}(e)){var r;try{r=I(e.styleSheet)||function(e){var{cssText:t}=e;if(t.split('"').length<3)return t;var r=["@import","url("+JSON.stringify(e.href)+")"];return""===e.layerName?r.push("layer"):e.layerName&&r.push("layer("+e.layerName+")"),e.supportsText&&r.push("supports("+e.supportsText+")"),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}(e)}catch(t){r=e.cssText}return e.styleSheet.href?O(r,e.styleSheet.href):r}var n,i=e.cssText;return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(n=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,i=i.replace(n,"$1\\$2")),t?O(i,t):i}function S(e,t){return Array.from(e.styleSheets).find((e=>e.href===t))}let x=class{constructor(){u(this,"idNodeMap",new Map),u(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;var r=null==(t=this.getMeta(e))?void 0:t.id;return null!=r?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){var t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach((e=>this.removeNodeFromMap(e)))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){var r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){var r=this.getNode(e);if(r){var n=this.nodeMetaMap.get(r);n&&this.nodeMetaMap.set(t,n)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function A(e){var{element:t,maskInputOptions:r,tagName:n,type:i,value:o,maskInputFn:a}=e,s=o||"",u=i&&T(i);return(r[n.toLowerCase()]||u&&r[u])&&(s=a?a(s,t):"*".repeat(s.length)),s}function T(e){return e.toLowerCase()}var N="__rrweb_original__";function M(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?T(t):null}function _(e,t){var r,n;try{n=new URL(e,null!=t?t:window.location.href)}catch(e){return null}var i=n.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(r=null==i?void 0:i[1])&&void 0!==r?r:null}var R=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,F=/^(?:[a-z+]+:)?\/\//i,E=/^www\..*/i,Z=/^(data:)([^,]*),(.*)/i;function O(e,t){return(e||"").replace(R,((e,r,n,i,o,a)=>{var s,u=n||o||a,l=r||i||"";if(!u)return e;if(F.test(u)||E.test(u))return"url("+l+u+l+")";if(Z.test(u))return"url("+l+u+l+")";if("/"===u[0])return"url("+l+(((s=t).indexOf("//")>-1?s.split("/").slice(0,3).join("/"):s.split("/")[0]).split("?")[0]+u)+l+")";var c=t.split("/"),d=u.split("/");for(var h of(c.pop(),d))"."!==h&&(".."===h?c.pop():c.push(h));return"url("+l+c.join("/")+l+")"}))}var B,L,D=1,q=new RegExp("[^a-z0-9-_:]"),V=-2;function P(){return D++}var Y=/^[^ \t\n\r\u000c]+/,H=/^[, \t\n\r\u000c]+/;var G=new WeakMap;function W(e,t){return t&&""!==t.trim()?X(e,t):t}function j(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function X(e,t){var r=G.get(e);if(r||(r=e.createElement("a"),G.set(e,r)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return r.setAttribute("href",t),r.href}function z(e,t,r,n){return n?"src"===r||"href"===r&&("use"!==t||"#"!==n[0])||"xlink:href"===r&&"#"!==n[0]?W(e,n):"background"!==r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===r?function(e,t){if(""===t.trim())return t;var r=0;function n(e){var n,i=e.exec(t.substring(r));return i?(n=i[0],r+=n.length,n):""}for(var i=[];n(H),!(r>=t.length);){var o=n(Y);if(","===o.slice(-1))o=W(e,o.substring(0,o.length-1)),i.push(o);else{var a="";o=W(e,o);for(var s=!1;;){var u=t.charAt(r);if(""===u){i.push((o+a).trim());break}if(s)")"===u&&(s=!1);else{if(","===u){r+=1,i.push((o+a).trim());break}"("===u&&(s=!0)}a+=u,r+=1}}}return i.join(", ")}(e,n):"style"===r?O(n,X(e)):"object"===t&&"data"===r?W(e,n):n:W(e,n):n}function K(e,t,r){return("video"===e||"audio"===e)&&"autoplay"===t}function U(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&U(g.parentNode(e),t,r);for(var n=e.classList.length;n--;){var i=e.classList[n];if(t.test(i))return!0}return!!r&&U(g.parentNode(e),t,r)}function J(e,t,r,n){var i;if(b(e)){if(i=e,!g.childNodes(i).length)return!1}else{if(null===g.parentElement(e))return!1;i=g.parentElement(e)}try{if("string"==typeof t){if(n){if(i.closest("."+t))return!0}else if(i.classList.contains(t))return!0}else if(U(i,t,n))return!0;if(r)if(n){if(i.closest(r))return!0}else if(i.matches(r))return!0}catch(e){}return!1}function Q(e,t){var{doc:r,mirror:n,blockClass:i,blockSelector:o,needsMask:a,inlineStylesheet:s,maskInputOptions:u={},maskTextFn:c,maskInputFn:d,dataURLOptions:h={},inlineImages:f,recordCanvas:v,keepIframeSrcFn:p,newlyAddedElement:m=!1}=t,y=function(e,t){if(!t.hasNode(e))return;var r=t.getId(e);return 1===r?void 0:r}(r,n);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:l.Document,childNodes:[],compatMode:e.compatMode}:{type:l.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:l.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:y};case e.ELEMENT_NODE:return function(e,t){for(var r,{doc:n,blockClass:i,blockSelector:o,inlineStylesheet:a,maskInputOptions:s={},maskInputFn:u,dataURLOptions:c={},inlineImages:d,recordCanvas:h,keepIframeSrcFn:f,newlyAddedElement:v=!1,rootId:p}=t,m=function(e,t,r){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var n=e.classList.length;n--;){var i=e.classList[n];if(t.test(i))return!0}if(r)return e.matches(r)}catch(e){}return!1}(e,i,o),y=function(e){if(e instanceof HTMLFormElement)return"form";var t=T(e.tagName);return q.test(t)?"div":t}(e),b={},w=e.attributes.length,C=0;C<w;C++){var k=e.attributes[C];K(y,k.name,k.value)||(b[k.name]=z(n,y,T(k.name),k.value))}if("link"===y&&a){var x=function(e){return null==e?void 0:e.href}(e);if(x){var _=S(n,x);if(!_&&x.includes(".css"))_=S(n,window.location.origin+"/"+x.replace(window.location.href,""));var R=null;_&&(R=I(_)),R&&(delete b.rel,delete b.href,b._cssText=R)}}if("style"===y&&e.sheet&&!(e.innerText||g.textContent(e)||"").trim().length){var F=I(e.sheet);F&&(b._cssText=F)}if("input"===y||"textarea"===y||"select"===y){var E=e.value,Z=e.checked;"radio"!==b.type&&"checkbox"!==b.type&&"submit"!==b.type&&"button"!==b.type&&E?b.value=A({element:e,type:M(e),tagName:y,value:E,maskInputOptions:s,maskInputFn:u}):Z&&(b.checked=Z)}"option"===y&&(e.selected&&!s.select?b.selected=!0:delete b.selected);if("dialog"===y&&e.open)try{b.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"}catch(e){b.rr_open_mode="modal",b.ph_rr_could_not_detect_modal=!0}if("canvas"===y&&h)if("2d"===e.__context)(function(e){var t=e.getContext("2d");if(!t)return!0;for(var r=0;r<e.width;r+=50)for(var n=0;n<e.height;n+=50){var i=t.getImageData,o=N in i?i[N]:i;if(new Uint32Array(o.call(t,r,n,Math.min(50,e.width-r),Math.min(50,e.height-n)).data.buffer).some((e=>0!==e)))return!1}return!0})(e)||(b.rr_dataURL=e.toDataURL(c.type,c.quality));else if(!("__context"in e)){var O=e.toDataURL(c.type,c.quality),D=n.createElement("canvas");D.width=e.width,D.height=e.height,O!==D.toDataURL(c.type,c.quality)&&(b.rr_dataURL=O)}if("img"===y&&d){B||(B=n.createElement("canvas"),L=B.getContext("2d"));var V=e,P=V.currentSrc||V.getAttribute("src")||"<unknown-src>",Y=V.crossOrigin,H=()=>{V.removeEventListener("load",H);try{B.width=V.naturalWidth,B.height=V.naturalHeight,L.drawImage(V,0,0),b.rr_dataURL=B.toDataURL(c.type,c.quality)}catch(e){if("anonymous"!==V.crossOrigin)return V.crossOrigin="anonymous",void(V.complete&&0!==V.naturalWidth?H():V.addEventListener("load",H));console.warn("Cannot inline img src="+P+"! Error: "+e)}"anonymous"===V.crossOrigin&&(Y?b.crossOrigin=Y:V.removeAttribute("crossorigin"))};V.complete&&0!==V.naturalWidth?H():V.addEventListener("load",H)}if("audio"===y||"video"===y){var G=b;G.rr_mediaState=e.paused?"paused":"played",G.rr_mediaCurrentTime=e.currentTime,G.rr_mediaPlaybackRate=e.playbackRate,G.rr_mediaMuted=e.muted,G.rr_mediaLoop=e.loop,G.rr_mediaVolume=e.volume}v||(e.scrollLeft&&(b.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(b.rr_scrollTop=e.scrollTop));if(m){var{width:W,height:X}=e.getBoundingClientRect();b={class:b.class,rr_width:W+"px",rr_height:X+"px"}}"iframe"!==y||f(b.src)||(e.contentDocument||(b.rr_src=b.src),delete b.src);try{customElements.get(y)&&(r=!0)}catch(e){}return{type:l.Element,tagName:y,attributes:b,childNodes:[],isSVG:j(e)||void 0,needBlock:m,rootId:p,isCustom:r}}(e,{doc:r,blockClass:i,blockSelector:o,inlineStylesheet:s,maskInputOptions:u,maskInputFn:d,dataURLOptions:h,inlineImages:f,recordCanvas:v,keepIframeSrcFn:p,newlyAddedElement:m,rootId:y});case e.TEXT_NODE:return function(e,t){var r,{needsMask:n,maskTextFn:i,rootId:o}=t,a=g.parentNode(e),s=a&&a.tagName,u=g.textContent(e),c="STYLE"===s||void 0,d="SCRIPT"===s||void 0;if(c&&u){try{e.nextSibling||e.previousSibling||(null==(r=a.sheet)?void 0:r.cssRules)&&(u=I(a.sheet))}catch(t){console.warn("Cannot get CSS styles from text's parentNode. Error: "+t,e)}u=O(u,X(t.doc))}d&&(u="SCRIPT_PLACEHOLDER");!c&&!d&&u&&n&&(u=i?i(u,g.parentElement(e)):u.replace(/[\S]/g,"*"));return{type:l.Text,textContent:u||"",isStyle:c,rootId:o}}(e,{doc:r,needsMask:a,maskTextFn:c,rootId:y});case e.CDATA_SECTION_NODE:return{type:l.CDATA,textContent:"",rootId:y};case e.COMMENT_NODE:return{type:l.Comment,textContent:g.textContent(e)||"",rootId:y};default:return!1}}function ee(e){return null==e?"":e.toLowerCase()}function te(e,t){var{doc:r,mirror:n,blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:s,skipChild:u=!1,inlineStylesheet:c=!0,maskInputOptions:d={},maskTextFn:h,maskInputFn:f,slimDOMOptions:v,dataURLOptions:p={},inlineImages:m=!1,recordCanvas:y=!1,onSerialize:I,onIframeLoad:k,iframeLoadTimeout:S=5e3,onStylesheetLoad:x,stylesheetLoadTimeout:A=5e3,keepIframeSrcFn:T=(()=>!1),newlyAddedElement:N=!1}=t,{needsMask:M}=t,{preserveWhiteSpace:R=!0}=t;M||(M=J(e,a,s,void 0===M));var F,E=Q(e,{doc:r,mirror:n,blockClass:i,blockSelector:o,needsMask:M,inlineStylesheet:c,maskInputOptions:d,maskTextFn:h,maskInputFn:f,dataURLOptions:p,inlineImages:m,recordCanvas:y,keepIframeSrcFn:T,newlyAddedElement:N});if(!E)return console.warn(e,"not serialized"),null;F=n.hasNode(e)?n.getId(e):!function(e,t){if(t.comment&&e.type===l.Comment)return!0;if(e.type===l.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===_(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(ee(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===ee(e.attributes.name)||"icon"===ee(e.attributes.rel)||"apple-touch-icon"===ee(e.attributes.rel)||"shortcut icon"===ee(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&ee(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(ee(e.attributes.property).match(/^(og|twitter|fb):/)||ee(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===ee(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===ee(e.attributes.name)||"googlebot"===ee(e.attributes.name)||"bingbot"===ee(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===ee(e.attributes.name)||"generator"===ee(e.attributes.name)||"framework"===ee(e.attributes.name)||"publisher"===ee(e.attributes.name)||"progid"===ee(e.attributes.name)||ee(e.attributes.property).match(/^article:/)||ee(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===ee(e.attributes.name)||"yandex-verification"===ee(e.attributes.name)||"csrf-token"===ee(e.attributes.name)||"p:domain_verify"===ee(e.attributes.name)||"verify-v1"===ee(e.attributes.name)||"verification"===ee(e.attributes.name)||"shopify-checkout-api-token"===ee(e.attributes.name)))return!0}}return!1}(E,v)&&(R||E.type!==l.Text||E.isStyle||E.textContent.replace(/^\s+|\s+$/gm,"").length)?P():V;var Z=Object.assign(E,{id:F});if(n.add(e,Z),F===V)return null;I&&I(e);var O=!u;if(Z.type===l.Element){O=O&&!Z.needBlock,delete Z.needBlock;var B=g.shadowRoot(e);B&&C(B)&&(Z.isShadowHost=!0)}if((Z.type===l.Document||Z.type===l.Element)&&O){v.headWhitespace&&Z.type===l.Element&&"head"===Z.tagName&&(R=!1);var L={doc:r,mirror:n,blockClass:i,blockSelector:o,needsMask:M,maskTextClass:a,maskTextSelector:s,skipChild:u,inlineStylesheet:c,maskInputOptions:d,maskTextFn:h,maskInputFn:f,slimDOMOptions:v,dataURLOptions:p,inlineImages:m,recordCanvas:y,preserveWhiteSpace:R,onSerialize:I,onIframeLoad:k,iframeLoadTimeout:S,onStylesheetLoad:x,stylesheetLoadTimeout:A,keepIframeSrcFn:T};if(Z.type===l.Element&&"textarea"===Z.tagName&&void 0!==Z.attributes.value);else for(var D of Array.from(g.childNodes(e))){var q=te(D,L);q&&Z.childNodes.push(q)}var Y=null;if(b(e)&&(Y=g.shadowRoot(e)))for(var H of Array.from(g.childNodes(Y))){var G=te(H,L);G&&(C(Y)&&(G.isShadow=!0),Z.childNodes.push(G))}}var W=g.parentNode(e);return W&&w(W)&&C(W)&&(Z.isShadow=!0),Z.type===l.Element&&"iframe"===Z.tagName&&function(e,t,r){var n=e.contentWindow;if(n){var i,o=!1;try{i=n.document.readyState}catch(e){return}if("complete"===i){var a="about:blank";if(n.location.href!==a||e.src===a||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}else{var s=setTimeout((()=>{o||(t(),o=!0)}),r);e.addEventListener("load",(()=>{clearTimeout(s),o=!0,t()}))}}}(e,(()=>{var t=e.contentDocument;if(t&&k){var r=te(t,{doc:t,mirror:n,blockClass:i,blockSelector:o,needsMask:M,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:c,maskInputOptions:d,maskTextFn:h,maskInputFn:f,slimDOMOptions:v,dataURLOptions:p,inlineImages:m,recordCanvas:y,preserveWhiteSpace:R,onSerialize:I,onIframeLoad:k,iframeLoadTimeout:S,onStylesheetLoad:x,stylesheetLoadTimeout:A,keepIframeSrcFn:T});r&&k(e,r)}}),S),Z.type===l.Element&&"link"===Z.tagName&&"string"==typeof Z.attributes.rel&&("stylesheet"===Z.attributes.rel||"preload"===Z.attributes.rel&&"string"==typeof Z.attributes.href&&"css"===_(Z.attributes.href))&&function(e,t,r){var n,i=!1;try{n=e.sheet}catch(e){return}if(!n){var o=setTimeout((()=>{i||(t(),i=!0)}),r);e.addEventListener("load",(()=>{clearTimeout(o),i=!0,t()}))}}(e,(()=>{if(x){var t=te(e,{doc:r,mirror:n,blockClass:i,blockSelector:o,needsMask:M,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:c,maskInputOptions:d,maskTextFn:h,maskInputFn:f,slimDOMOptions:v,dataURLOptions:p,inlineImages:m,recordCanvas:y,preserveWhiteSpace:R,onSerialize:I,onIframeLoad:k,iframeLoadTimeout:S,onStylesheetLoad:x,stylesheetLoadTimeout:A,keepIframeSrcFn:T});t&&x(e,t)}}),A),Z}let re=class e{constructor(){__publicField2(this,"parentElement",null),__publicField2(this,"parentNode",null),__publicField2(this,"ownerDocument"),__publicField2(this,"firstChild",null),__publicField2(this,"lastChild",null),__publicField2(this,"previousSibling",null),__publicField2(this,"nextSibling",null),__publicField2(this,"ELEMENT_NODE",1),__publicField2(this,"TEXT_NODE",3),__publicField2(this,"nodeType"),__publicField2(this,"nodeName"),__publicField2(this,"RRNodeType")}get childNodes(){for(var e=[],t=this.firstChild;t;)e.push(t),t=t.nextSibling;return e}contains(t){if(!(t instanceof e))return!1;if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}};var ne={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ie={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]};var oe={};function ae(e){if(oe[e])return oe[e];var t=function(e){var t,r=null==globalThis||null==(t=globalThis.Zone)||null==t.__symbol__?void 0:t.__symbol__(e);return r&&globalThis[r]?globalThis[r]:void 0}(e)||globalThis[e],r=t.prototype,n=e in ne?ne[e]:void 0,i=Boolean(n&&n.every((e=>{var t,n;return Boolean(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))}))),o=e in ie?ie[e]:void 0,a=Boolean(o&&o.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(i&&a)return oe[e]=t.prototype,t.prototype;try{var s=document.createElement("iframe");document.body.appendChild(s);var u=s.contentWindow;if(!u)return t.prototype;var l=u[e].prototype;return document.body.removeChild(s),l?oe[e]=l:r}catch(e){return r}}var se={};function ue(e,t,r){var n,i=e+"."+String(r);if(se[i])return se[i].call(t);var o=ae(e),a=null==(n=Object.getOwnPropertyDescriptor(o,r))?void 0:n.get;return a?(se[i]=a,a.call(t)):t[r]}var le={};function ce(e,t,r){var n=e+"."+String(r);if(le[n])return le[n].bind(t);var i=ae(e)[r];return"function"!=typeof i?t[r]:(le[n]=i,i.bind(t))}function de(){return ae("MutationObserver").constructor}var he={childNodes:function(e){return ue("Node",e,"childNodes")},parentNode:function(e){return ue("Node",e,"parentNode")},parentElement:function(e){return ue("Node",e,"parentElement")},textContent:function(e){return ue("Node",e,"textContent")},contains:function(e,t){return ce("Node",e,"contains")(t)},getRootNode:function(e){return ce("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?ue("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?ue("Element",e,"shadowRoot"):null},querySelector:function(e,t){return ue("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return ue("Element",e,"querySelectorAll")(t)},mutationObserver:de};function fe(e,t,r){void 0===r&&(r=document);var n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}var ve="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",pe={map:{},getId:()=>(console.error(ve),-1),getNode:()=>(console.error(ve),null),removeNodeFromMap(){console.error(ve)},has:()=>(console.error(ve),!1),reset(){console.error(ve)}};function me(e,t,r){void 0===r&&(r={});var n=null,i=0;return function(){for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];var u=Date.now();i||!1!==r.leading||(i=u);var l=t-(u-i),c=this;l<=0||l>t?(n&&(clearTimeout(n),n=null),i=u,e.apply(c,a)):n||!1===r.trailing||(n=setTimeout((()=>{i=!1===r.leading?0:Date.now(),n=null,e.apply(c,a)}),l))}}function ye(e,t,r,n,i){void 0===i&&(i=window);var o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,n?r:{set(e){setTimeout((()=>{r.set.call(this,e)}),0),o&&o.set&&o.set.call(this,e)}}),()=>ye(e,t,o||{},!0)}function ge(e,t,r){try{if(!(t in e))return()=>{};var n=e[t],i=r(n);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=i,()=>{e[t]=n}}catch(e){return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(pe=new Proxy(pe,{get:(e,t,r)=>("map"===t&&console.error(ve),Reflect.get(e,t,r))}));var be=Date.now;function we(e){var t,r,n,i,o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:o.documentElement.scrollLeft||(null==o?void 0:o.body)&&(null==(t=he.parentElement(o.body))?void 0:t.scrollLeft)||(null==(r=null==o?void 0:o.body)?void 0:r.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==o?void 0:o.documentElement.scrollTop)||(null==o?void 0:o.body)&&(null==(n=he.parentElement(o.body))?void 0:n.scrollTop)||(null==(i=null==o?void 0:o.body)?void 0:i.scrollTop)||0}}function Ce(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ie(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ke(e){return e?e.nodeType===e.ELEMENT_NODE?e:he.parentElement(e):null}function Se(e,t,r,n){if(!e)return!1;var i=ke(e);if(!i)return!1;try{if("string"==typeof t){if(i.classList.contains(t))return!0;if(n&&null!==i.closest("."+t))return!0}else if(U(i,t,n))return!0}catch(e){}if(r){if(i.matches(r))return!0;if(n&&null!==i.closest(r))return!0}return!1}function xe(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||t.getId(e)===V}function Ae(e,t){if(w(e))return!1;var r=t.getId(e);if(!t.has(r))return!0;var n=he.parentNode(e);return(!n||n.nodeType!==e.DOCUMENT_NODE)&&(!n||Ae(n,t))}function Te(e){return Boolean(e.changedTouches)}function Ne(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function Me(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function _e(e){return!!e&&(e instanceof re&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(he.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(be=()=>(new Date).getTime());let Re=class{constructor(){a(this,"id",1),a(this,"styleIDMap",new WeakMap),a(this,"idStyleMap",new Map)}getId(e){var t;return null!==(t=this.styleIDMap.get(e))&&void 0!==t?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){return this.has(e)?this.getId(e):(r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r);var r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function Fe(e){var t,r=null;return"getRootNode"in e&&(null==(t=he.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&he.host(he.getRootNode(e))&&(r=he.host(he.getRootNode(e))),r}function Ee(e){var t=e.ownerDocument;if(!t)return!1;var r=function(e){for(var t,r=e;t=Fe(r);)r=t;return r}(e);return he.contains(t,r)}function Ze(e){var t=e.ownerDocument;return!!t&&(he.contains(t,e)||Ee(e))}var Oe=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(Oe||{}),Be=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(Be||{}),Le=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(Le||{}),De=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(De||{}),qe=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(qe||{}),Ve=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Ve||{});function Pe(e){return"__ln"in e}class Ye{constructor(){a(this,"length",0),a(this,"head",null),a(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,r=0;r<e;r++)t=(null==t?void 0:t.next)||null;return t}addNode(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Pe(e.previousSibling)){var r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&Pe(e.nextSibling)&&e.nextSibling.__ln.previous){var n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}var He,Ge=(e,t)=>e+"@"+t;class We{constructor(){a(this,"frozen",!1),a(this,"locked",!1),a(this,"texts",[]),a(this,"attributes",[]),a(this,"attributeMap",new WeakMap),a(this,"removes",[]),a(this,"mapRemoves",[]),a(this,"movedMap",{}),a(this,"addedSet",new Set),a(this,"movedSet",new Set),a(this,"droppedSet",new Set),a(this,"mutationCb"),a(this,"blockClass"),a(this,"blockSelector"),a(this,"maskTextClass"),a(this,"maskTextSelector"),a(this,"inlineStylesheet"),a(this,"maskInputOptions"),a(this,"maskTextFn"),a(this,"maskInputFn"),a(this,"keepIframeSrcFn"),a(this,"recordCanvas"),a(this,"inlineImages"),a(this,"slimDOMOptions"),a(this,"dataURLOptions"),a(this,"doc"),a(this,"mirror"),a(this,"iframeManager"),a(this,"stylesheetManager"),a(this,"shadowDomManager"),a(this,"canvasManager"),a(this,"processedNodeManager"),a(this,"unattachedDoc"),a(this,"processMutations",(e=>{e.forEach(this.processMutation),this.emit()})),a(this,"emit",(()=>{if(!this.frozen&&!this.locked){for(var e=[],t=new Set,r=new Ye,n=e=>{for(var t=e,r=V;r===V;)r=(t=t&&t.nextSibling)&&this.mirror.getId(t);return r},i=i=>{var o=he.parentNode(i);if(o&&Ze(i)&&"TEXTAREA"!==o.tagName){var a=w(o)?this.mirror.getId(Fe(i)):this.mirror.getId(o),s=n(i);if(-1===a||-1===s)return r.addNode(i);var u=te(i,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{Ne(e,this.mirror)&&this.iframeManager.addIframe(e),Me(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),_e(i)&&this.shadowDomManager.addShadowRoot(he.shadowRoot(i),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}});u&&(e.push({parentId:a,nextId:s,node:u}),t.add(u.id))}};this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(var o of this.movedSet)Xe(this.removes,o,this.mirror)&&!this.movedSet.has(he.parentNode(o))||i(o);for(var a of this.addedSet)ze(this.droppedSet,a)||Xe(this.removes,a,this.mirror)?ze(this.movedSet,a)?i(a):this.droppedSet.add(a):i(a);for(var s=null;r.length;){var u=null;if(s){var l=this.mirror.getId(he.parentNode(s.value)),c=n(s.value);-1!==l&&-1!==c&&(u=s)}if(!u)for(var d=r.tail;d;){var h=d;if(d=d.previous,h){var f=this.mirror.getId(he.parentNode(h.value));if(-1===n(h.value))continue;if(-1!==f){u=h;break}var v=h.value,p=he.parentNode(v);if(p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var m=he.host(p);if(-1!==this.mirror.getId(m)){u=h;break}}}}if(!u){for(;r.head;)r.removeNode(r.head.value);break}s=u.previous,r.removeNode(u.value),i(u.value)}var y={texts:this.texts.map((e=>{var t=e.node,r=he.parentNode(t);return r&&"TEXTAREA"===r.tagName&&this.genTextAreaValueMutation(r),{id:this.mirror.getId(t),value:e.value}})).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),attributes:this.attributes.map((e=>{var{attributes:t}=e;if("string"==typeof t.style){var r=JSON.stringify(e.styleDiff),n=JSON.stringify(e._unchangedStyles);r.length<t.style.length&&(r+n).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}})).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),removes:this.removes,adds:e};(y.texts.length||y.attributes.length||y.removes.length||y.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(y))}})),a(this,"genTextAreaValueMutation",(e=>{var t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t)),t.attributes.value=Array.from(he.childNodes(e),(e=>he.textContent(e)||"")).join("")})),a(this,"processMutation",(e=>{if(!xe(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":var t=he.textContent(e.target);Se(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:J(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,ke(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break;case"attributes":var r=e.target,n=e.attributeName,i=e.target.getAttribute(n);if("value"===n){var o=M(r);i=A({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:o,value:i,maskInputFn:this.maskInputFn})}if(Se(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;var a=this.attributeMap.get(e.target);if("IFRAME"===r.tagName&&"src"===n&&!this.keepIframeSrcFn(i)){if(r.contentDocument)return;n="rr_src"}if(a||(a={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(a),this.attributeMap.set(e.target,a)),"type"===n&&"INPUT"===r.tagName&&"password"===(e.oldValue||"").toLowerCase()&&r.setAttribute("data-rr-is-password","true"),!K(r.tagName,n))if(a.attributes[n]=z(this.doc,T(r.tagName),T(n),i),"style"===n){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}var s=this.unattachedDoc.createElement("span");for(var u of(e.oldValue&&s.setAttribute("style",e.oldValue),Array.from(r.style))){var l=r.style.getPropertyValue(u),c=r.style.getPropertyPriority(u);l!==s.style.getPropertyValue(u)||c!==s.style.getPropertyPriority(u)?a.styleDiff[u]=""===c?l:[l,c]:a._unchangedStyles[u]=[l,c]}for(var d of Array.from(s.style))""===r.style.getPropertyValue(d)&&(a.styleDiff[d]=!1)}else"open"===n&&"DIALOG"===r.tagName&&(r.matches("dialog:modal")?a.attributes.rr_open_mode="modal":a.attributes.rr_open_mode="non-modal");break;case"childList":if(Se(e.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===e.target.tagName)return void this.genTextAreaValueMutation(e.target);e.addedNodes.forEach((t=>this.genAdds(t,e.target))),e.removedNodes.forEach((t=>{var r=this.mirror.getId(t),n=w(e.target)?this.mirror.getId(he.host(e.target)):this.mirror.getId(e.target);Se(e.target,this.blockClass,this.blockSelector,!1)||xe(t,this.mirror,this.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(je(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===r||Ae(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Ge(r,n)]?je(this.movedSet,t):this.removes.push({parentId:n,id:r,isShadow:!(!w(e.target)||!C(e.target))||void 0})),this.mapRemoves.push(t))}))}})),a(this,"genAdds",((e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(xe(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);var r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&-1!==r&&(this.movedMap[Ge(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Se(e,this.blockClass,this.blockSelector,!1)||(he.childNodes(e).forEach((e=>this.genAdds(e))),_e(e)&&he.childNodes(he.shadowRoot(e)).forEach((t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)})))}}))}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((t=>{this[t]=e[t]}))}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function je(e,t){e.delete(t),he.childNodes(t).forEach((t=>je(e,t)))}function Xe(e,t,r){return 0!==e.length&&function(e,t,r){var n,i=he.parentNode(t),o=function(){var t=r.getId(i);if(e.some((e=>e.id===t)))return{v:!0};i=he.parentNode(i)};for(;i;)if(n=o())return n.v;return!1}(e,t,r)}function ze(e,t){return 0!==e.size&&Ke(e,t)}function Ke(e,t){var r=he.parentNode(t);return!!r&&(!!e.has(r)||Ke(e,r))}var Ue=e=>{if(!He)return e;return function(){try{return e(...arguments)}catch(e){if(He&&!0===He(e))return;throw e}}},Je=[];function Qe(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(e){}return e&&e.target}function $e(e,t){var r=new We;Je.push(r),r.init(e);var n=new(de())(Ue(r.processMutations.bind(r)));return n.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),n}function et(e){var{mouseInteractionCb:t,doc:n,mirror:i,blockClass:o,blockSelector:a,sampling:s}=e;if(!1===s.mouseInteraction)return()=>{};var u=!0===s.mouseInteraction||void 0===s.mouseInteraction?{}:s.mouseInteraction,l=[],c=null;return Object.keys(Le).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==u[e])).forEach((e=>{var s=T(e),u=(e=>n=>{var s=Qe(n);if(!Se(s,o,a,!0)){var u=null,l=e;if("pointerType"in n){switch(n.pointerType){case"mouse":u=De.Mouse;break;case"touch":u=De.Touch;break;case"pen":u=De.Pen}u===De.Touch?Le[e]===Le.MouseDown?l="TouchStart":Le[e]===Le.MouseUp&&(l="TouchEnd"):De.Pen}else Te(n)&&(u=De.Touch);null!==u?(c=u,(l.startsWith("Touch")&&u===De.Touch||l.startsWith("Mouse")&&u===De.Mouse)&&(u=null)):Le[e]===Le.Click&&(u=c,c=null);var d=Te(n)?n.changedTouches[0]:n;if(d){var h=i.getId(s),{clientX:f,clientY:v}=d;Ue(t)(r({type:Le[l],id:h,x:f,y:v},null!==u&&{pointerType:u}))}}})(e);if(window.PointerEvent)switch(Le[e]){case Le.MouseDown:case Le.MouseUp:s=s.replace("mouse","pointer");break;case Le.TouchStart:case Le.TouchEnd:return}l.push(fe(s,u,n))})),Ue((()=>{l.forEach((e=>e()))}))}function tt(e){var{scrollCb:t,doc:r,mirror:n,blockClass:i,blockSelector:o,sampling:a}=e;return fe("scroll",Ue(me(Ue((e=>{var a=Qe(e);if(a&&!Se(a,i,o,!0)){var s=n.getId(a);if(a===r&&r.defaultView){var u=we(r.defaultView);t({id:s,x:u.left,y:u.top})}else t({id:s,x:a.scrollLeft,y:a.scrollTop})}})),a.scroll||100)),r)}var rt=["INPUT","TEXTAREA","SELECT"],nt=new WeakMap;function it(e){return function(e,t){if(ut("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||ut("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||ut("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||ut("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){var r=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(r)}else if(e.parentStyleSheet){var n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function ot(e,t,r){var n,i;return e?(e.ownerNode?n=t.getId(e.ownerNode):i=r.getId(e),{styleId:i,id:n}):{}}function at(e,t){var r,n,i,{mirror:o,stylesheetManager:a}=e,s=null;s="#document"===t.nodeName?o.getId(t):o.getId(he.host(t));var u="#document"===t.nodeName?null==(r=t.defaultView)?void 0:r.Document:null==(i=null==(n=t.ownerDocument)?void 0:n.defaultView)?void 0:i.ShadowRoot,l=(null==u?void 0:u.prototype)?Object.getOwnPropertyDescriptor(null==u?void 0:u.prototype,"adoptedStyleSheets"):void 0;return null!==s&&-1!==s&&u&&l?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var e;return null==(e=l.get)?void 0:e.call(this)},set(e){var t,r=null==(t=l.set)?void 0:t.call(this,e);if(null!==s&&-1!==s)try{a.adoptStyleSheets(e,s)}catch(e){}return r}}),Ue((()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))):()=>{}}function st(e,t){void 0===t&&(t={});var n,i=e.doc.defaultView;if(!i)return()=>{};!function(e,t){var{mutationCb:r,mousemoveCb:n,mouseInteractionCb:i,scrollCb:o,viewportResizeCb:a,inputCb:s,mediaInteractionCb:u,styleSheetRuleCb:l,styleDeclarationCb:c,canvasMutationCb:d,fontCb:h,selectionCb:f,customElementCb:v}=e;e.mutationCb=function(){t.mutation&&t.mutation(...arguments),r(...arguments)},e.mousemoveCb=function(){t.mousemove&&t.mousemove(...arguments),n(...arguments)},e.mouseInteractionCb=function(){t.mouseInteraction&&t.mouseInteraction(...arguments),i(...arguments)},e.scrollCb=function(){t.scroll&&t.scroll(...arguments),o(...arguments)},e.viewportResizeCb=function(){t.viewportResize&&t.viewportResize(...arguments),a(...arguments)},e.inputCb=function(){t.input&&t.input(...arguments),s(...arguments)},e.mediaInteractionCb=function(){t.mediaInteaction&&t.mediaInteaction(...arguments),u(...arguments)},e.styleSheetRuleCb=function(){t.styleSheetRule&&t.styleSheetRule(...arguments),l(...arguments)},e.styleDeclarationCb=function(){t.styleDeclaration&&t.styleDeclaration(...arguments),c(...arguments)},e.canvasMutationCb=function(){t.canvasMutation&&t.canvasMutation(...arguments),d(...arguments)},e.fontCb=function(){t.font&&t.font(...arguments),h(...arguments)},e.selectionCb=function(){t.selection&&t.selection(...arguments),f(...arguments)},e.customElementCb=function(){t.customElement&&t.customElement(...arguments),v(...arguments)}}(e,t),e.recordDOM&&(n=$e(e,e.doc));var o=function(e){var{mousemoveCb:t,sampling:r,doc:n,mirror:i}=e;if(!1===r.mousemove)return()=>{};var o,a="number"==typeof r.mousemove?r.mousemove:50,s="number"==typeof r.mousemoveCallback?r.mousemoveCallback:500,u=[],l=me(Ue((e=>{var r=Date.now()-o;t(u.map((e=>(e.timeOffset-=r,e))),e),u=[],o=null})),s),c=Ue(me(Ue((e=>{var t=Qe(e),{clientX:r,clientY:n}=Te(e)?e.changedTouches[0]:e;o||(o=be()),u.push({x:r,y:n,id:i.getId(t),timeOffset:be()-o}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?Be.Drag:e instanceof MouseEvent?Be.MouseMove:Be.TouchMove)})),a,{trailing:!1})),d=[fe("mousemove",c,n),fe("touchmove",c,n),fe("drag",c,n)];return Ue((()=>{d.forEach((e=>e()))}))}(e),a=et(e),s=tt(e),u=function(e,t){var{viewportResizeCb:r}=e,{win:n}=t,i=-1,o=-1;return fe("resize",Ue(me(Ue((()=>{var e=Ce(),t=Ie();i===e&&o===t||(r({width:Number(t),height:Number(e)}),i=e,o=t)})),200)),n)}(e,{win:i}),l=function(e){var{inputCb:t,doc:n,mirror:i,blockClass:o,blockSelector:a,ignoreClass:s,ignoreSelector:u,maskInputOptions:l,maskInputFn:c,sampling:d,userTriggeredOnInput:h}=e;function f(e){var t=Qe(e),r=e.isTrusted,i=t&&t.tagName;if(t&&"OPTION"===i&&(t=he.parentElement(t)),t&&i&&!(rt.indexOf(i)<0)&&!Se(t,o,a,!0)&&!(t.classList.contains(s)||u&&t.matches(u))){var d=t.value,f=!1,p=M(t)||"";"radio"===p||"checkbox"===p?f=t.checked:(l[i.toLowerCase()]||l[p])&&(d=A({element:t,maskInputOptions:l,tagName:i,type:p,value:d,maskInputFn:c})),v(t,h?{text:d,isChecked:f,userTriggered:r}:{text:d,isChecked:f});var m=t.name;"radio"===p&&m&&f&&n.querySelectorAll('input[type="radio"][name="'+m+'"]').forEach((e=>{if(e!==t){var r=e.value;v(e,h?{text:r,isChecked:!f,userTriggered:!1}:{text:r,isChecked:!f})}}))}}function v(e,n){var o=nt.get(e);if(!o||o.text!==n.text||o.isChecked!==n.isChecked){nt.set(e,n);var a=i.getId(e);Ue(t)(r({},n,{id:a}))}}var p=("last"===d.input?["change"]:["input","change"]).map((e=>fe(e,Ue(f),n))),m=n.defaultView;if(!m)return()=>{p.forEach((e=>e()))};var y=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),g=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];return y&&y.set&&p.push(...g.map((e=>ye(e[0],e[1],{set(){Ue(f)({target:this,isTrusted:!1})}},!1,m)))),Ue((()=>{p.forEach((e=>e()))}))}(e),c=function(e){var{mediaInteractionCb:t,blockClass:r,blockSelector:n,mirror:i,sampling:o,doc:a}=e,s=Ue((e=>me(Ue((o=>{var a=Qe(o);if(a&&!Se(a,r,n,!0)){var{currentTime:s,volume:u,muted:l,playbackRate:c,loop:d}=a;t({type:e,id:i.getId(a),currentTime:s,volume:u,muted:l,playbackRate:c,loop:d})}})),o.media||500))),u=[fe("play",s(Ve.Play),a),fe("pause",s(Ve.Pause),a),fe("seeked",s(Ve.Seeked),a),fe("volumechange",s(Ve.VolumeChange),a),fe("ratechange",s(Ve.RateChange),a)];return Ue((()=>{u.forEach((e=>e()))}))}(e),d=()=>{},h=()=>{},f=()=>{},v=()=>{};e.recordDOM&&(d=function(e,t){var{styleSheetRuleCb:r,mirror:n,stylesheetManager:i}=e,{win:o}=t;if(!o.CSSStyleSheet||!o.CSSStyleSheet.prototype)return()=>{};var a=o.CSSStyleSheet.prototype.insertRule;o.CSSStyleSheet.prototype.insertRule=new Proxy(a,{apply:Ue(((e,t,o)=>{var[a,s]=o,{id:u,styleId:l}=ot(t,n,i.styleMirror);return(u&&-1!==u||l&&-1!==l)&&r({id:u,styleId:l,adds:[{rule:a,index:s}]}),e.apply(t,o)}))}),o.CSSStyleSheet.prototype.addRule=function(e,t,r){void 0===r&&(r=this.cssRules.length);var n=e+" { "+t+" }";return o.CSSStyleSheet.prototype.insertRule.apply(this,[n,r])};var s,u,l=o.CSSStyleSheet.prototype.deleteRule;o.CSSStyleSheet.prototype.deleteRule=new Proxy(l,{apply:Ue(((e,t,o)=>{var[a]=o,{id:s,styleId:u}=ot(t,n,i.styleMirror);return(s&&-1!==s||u&&-1!==u)&&r({id:s,styleId:u,removes:[{index:a}]}),e.apply(t,o)}))}),o.CSSStyleSheet.prototype.removeRule=function(e){return o.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},o.CSSStyleSheet.prototype.replace&&(s=o.CSSStyleSheet.prototype.replace,o.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:Ue(((e,t,o)=>{var[a]=o,{id:s,styleId:u}=ot(t,n,i.styleMirror);return(s&&-1!==s||u&&-1!==u)&&r({id:s,styleId:u,replace:a}),e.apply(t,o)}))})),o.CSSStyleSheet.prototype.replaceSync&&(u=o.CSSStyleSheet.prototype.replaceSync,o.CSSStyleSheet.prototype.replaceSync=new Proxy(u,{apply:Ue(((e,t,o)=>{var[a]=o,{id:s,styleId:u}=ot(t,n,i.styleMirror);return(s&&-1!==s||u&&-1!==u)&&r({id:s,styleId:u,replaceSync:a}),e.apply(t,o)}))}));var c={};lt("CSSGroupingRule")?c.CSSGroupingRule=o.CSSGroupingRule:(lt("CSSMediaRule")&&(c.CSSMediaRule=o.CSSMediaRule),lt("CSSConditionRule")&&(c.CSSConditionRule=o.CSSConditionRule),lt("CSSSupportsRule")&&(c.CSSSupportsRule=o.CSSSupportsRule));var d={};return Object.entries(c).forEach((e=>{var[t,o]=e;d[t]={insertRule:o.prototype.insertRule,deleteRule:o.prototype.deleteRule},o.prototype.insertRule=new Proxy(d[t].insertRule,{apply:Ue(((e,t,o)=>{var[a,s]=o,{id:u,styleId:l}=ot(t.parentStyleSheet,n,i.styleMirror);return(u&&-1!==u||l&&-1!==l)&&r({id:u,styleId:l,adds:[{rule:a,index:[...it(t),s||0]}]}),e.apply(t,o)}))}),o.prototype.deleteRule=new Proxy(d[t].deleteRule,{apply:Ue(((e,t,o)=>{var[a]=o,{id:s,styleId:u}=ot(t.parentStyleSheet,n,i.styleMirror);return(s&&-1!==s||u&&-1!==u)&&r({id:s,styleId:u,removes:[{index:[...it(t),a]}]}),e.apply(t,o)}))})})),Ue((()=>{o.CSSStyleSheet.prototype.insertRule=a,o.CSSStyleSheet.prototype.deleteRule=l,s&&(o.CSSStyleSheet.prototype.replace=s),u&&(o.CSSStyleSheet.prototype.replaceSync=u),Object.entries(c).forEach((e=>{var[t,r]=e;r.prototype.insertRule=d[t].insertRule,r.prototype.deleteRule=d[t].deleteRule}))}))}(e,{win:i}),h=at(e,e.doc),f=function(e,t){var{styleDeclarationCb:r,mirror:n,ignoreCSSAttributes:i,stylesheetManager:o}=e,{win:a}=t,s=a.CSSStyleDeclaration.prototype.setProperty;a.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:Ue(((e,t,a)=>{var u,[l,c,d]=a;if(i.has(l))return s.apply(t,[l,c,d]);var{id:h,styleId:f}=ot(null==(u=t.parentRule)?void 0:u.parentStyleSheet,n,o.styleMirror);return(h&&-1!==h||f&&-1!==f)&&r({id:h,styleId:f,set:{property:l,value:c,priority:d},index:it(t.parentRule)}),e.apply(t,a)}))});var u=a.CSSStyleDeclaration.prototype.removeProperty;return a.CSSStyleDeclaration.prototype.removeProperty=new Proxy(u,{apply:Ue(((e,t,a)=>{var s,[l]=a;if(i.has(l))return u.apply(t,[l]);var{id:c,styleId:d}=ot(null==(s=t.parentRule)?void 0:s.parentStyleSheet,n,o.styleMirror);return(c&&-1!==c||d&&-1!==d)&&r({id:c,styleId:d,remove:{property:l},index:it(t.parentRule)}),e.apply(t,a)}))}),Ue((()=>{a.CSSStyleDeclaration.prototype.setProperty=s,a.CSSStyleDeclaration.prototype.removeProperty=u}))}(e,{win:i}),e.collectFonts&&(v=function(e){var{fontCb:t,doc:r}=e,n=r.defaultView;if(!n)return()=>{};var i=[],o=new WeakMap,a=n.FontFace;n.FontFace=function(e,t,r){var n=new a(e,t,r);return o.set(n,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),n};var s=ge(r.fonts,"add",(function(e){return function(r){return setTimeout(Ue((()=>{var e=o.get(r);e&&(t(e),o.delete(r))})),0),e.apply(this,[r])}}));return i.push((()=>{n.FontFace=a})),i.push(s),Ue((()=>{i.forEach((e=>e()))}))}(e)));var p=function(e){var{doc:t,mirror:r,blockClass:n,blockSelector:i,selectionCb:o}=e,a=!0,s=Ue((()=>{var e=t.getSelection();if(!(!e||a&&(null==e?void 0:e.isCollapsed))){a=e.isCollapsed||!1;for(var s=[],u=e.rangeCount||0,l=0;l<u;l++){var c=e.getRangeAt(l),{startContainer:d,startOffset:h,endContainer:f,endOffset:v}=c;Se(d,n,i,!0)||Se(f,n,i,!0)||s.push({start:r.getId(d),startOffset:h,end:r.getId(f),endOffset:v})}o({ranges:s})}}));return s(),fe("selectionchange",s)}(e),m=function(e){var{doc:t,customElementCb:r}=e,n=t.defaultView;return n&&n.customElements?ge(n.customElements,"define",(function(e){return function(t,n,i){try{r({define:{name:t}})}catch(e){console.warn("Custom element callback failed for "+t)}return e.apply(this,[t,n,i])}})):()=>{}}(e),y=[];for(var g of e.plugins)y.push(g.observer(g.callback,i,g.options));return Ue((()=>{Je.forEach((e=>e.reset())),null==n||n.disconnect(),o(),a(),s(),u(),l(),c(),d(),h(),f(),v(),p(),m(),y.forEach((e=>e()))}))}function ut(e){return void 0!==window[e]}function lt(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class ct{constructor(e){a(this,"iframeIdToRemoteIdMap",new WeakMap),a(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,n){var i=r||this.getIdToRemoteIdMap(e),o=n||this.getRemoteIdToIdMap(e),a=i.get(t);return a||(a=this.generateIdFn(),i.set(t,a),o.set(a,t)),a}getIds(e,t){var r=this.getIdToRemoteIdMap(e),n=this.getRemoteIdToIdMap(e);return t.map((t=>this.getId(e,t,r,n)))}getRemoteId(e,t,r){var n=r||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;var i=n.get(t);return i||-1}getRemoteIds(e,t){var r=this.getRemoteIdToIdMap(e);return t.map((t=>this.getRemoteId(e,t,r)))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){var t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){var t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class dt{constructor(e){a(this,"iframes",new WeakMap),a(this,"crossOriginIframeMap",new WeakMap),a(this,"crossOriginIframeMirror",new ct(P)),a(this,"crossOriginIframeStyleMirror"),a(this,"crossOriginIframeRootIdMap",new WeakMap),a(this,"mirror"),a(this,"mutationCb"),a(this,"wrappedEmit"),a(this,"loadListener"),a(this,"stylesheetManager"),a(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new ct(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,n;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(r=e.contentWindow)||r.addEventListener("message",this.handleMessage.bind(this))),null==(n=this.loadListener)||n.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){var t=e;if("rrweb"===t.data.type&&t.origin===t.data.origin&&e.source){var r=this.crossOriginIframeMap.get(e.source);if(r){var n=this.transformCrossOriginEvent(r,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}}}transformCrossOriginEvent(e,t){var r;switch(t.type){case Oe.FullSnapshot:this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);var n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:Oe.IncrementalSnapshot,data:{source:Be.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case Oe.Meta:case Oe.Load:case Oe.DomContentLoaded:return!1;case Oe.Plugin:return t;case Oe.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case Oe.IncrementalSnapshot:switch(t.data.source){case Be.Mutation:return t.data.adds.forEach((t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);var r=this.crossOriginIframeRootIdMap.get(e);r&&this.patchRootIdOnNode(t.node,r)})),t.data.removes.forEach((t=>{this.replaceIds(t,e,["parentId","id"])})),t.data.attributes.forEach((t=>{this.replaceIds(t,e,["id"])})),t.data.texts.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case Be.Drag:case Be.TouchMove:case Be.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case Be.ViewportResize:return!1;case Be.MediaInteraction:case Be.MouseInteraction:case Be.Scroll:case Be.CanvasMutation:case Be.Input:return this.replaceIds(t.data,e,["id"]),t;case Be.StyleSheetRule:case Be.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case Be.Font:return t;case Be.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case Be.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(r=t.data.styles)||r.forEach((t=>{this.replaceStyleIds(t,e,["styleId"])})),t}}return!1}replace(e,t,r,n){for(var i of n)(Array.isArray(t[i])||"number"==typeof t[i])&&(Array.isArray(t[i])?t[i]=e.getIds(r,t[i]):t[i]=e.getId(r,t[i]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach((e=>{this.replaceIdOnNode(e,t)}))}patchRootIdOnNode(e,t){e.type===l.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,t)}))}}class ht{constructor(e){a(this,"shadowDoms",new WeakSet),a(this,"mutationCb"),a(this,"scrollCb"),a(this,"bypassOptions"),a(this,"mirror"),a(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(C(e)&&!this.shadowDoms.has(e)){this.shadowDoms.add(e);var n=$e(r({},this.bypassOptions,{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push((()=>n.disconnect())),this.restoreHandlers.push(tt(r({},this.bypassOptions,{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout((()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(he.host(e))),this.restoreHandlers.push(at({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))}),0)}}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){var r=this;this.restoreHandlers.push(ge(e.prototype,"attachShadow",(function(e){return function(n){var i=e.call(this,n),o=he.shadowRoot(this);return o&&Ze(this)&&r.addShadowRoot(o,t),i}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch(e){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var ft="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",vt="undefined"==typeof Uint8Array?[]:new Uint8Array(256),pt=0;pt<64;pt++)vt[ft.charCodeAt(pt)]=pt;var mt=new Map;var yt=(e,t,r)=>{if(e&&(wt(e,t)||"object"==typeof e)){var n=function(e,t){var r=mt.get(e);return r||(r=new Map,mt.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}(r,e.constructor.name),i=n.indexOf(e);return-1===i&&(i=n.length,n.push(e)),i}};function gt(e,t,r){if(e instanceof Array)return e.map((e=>gt(e,t,r)));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer)return{rr_type:e.constructor.name,base64:function(e){var t,r=new Uint8Array(e),n=r.length,i="";for(t=0;t<n;t+=3)i+=ft[r[t]>>2],i+=ft[(3&r[t])<<4|r[t+1]>>4],i+=ft[(15&r[t+1])<<2|r[t+2]>>6],i+=ft[63&r[t+2]];return n%3==2?i=i.substring(0,i.length-1)+"=":n%3==1&&(i=i.substring(0,i.length-2)+"=="),i}(e)};if(e instanceof DataView)return{rr_type:e.constructor.name,args:[gt(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){var n=e.constructor.name,{src:i}=e;return{rr_type:n,src:i}}if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}return e instanceof ImageData?{rr_type:e.constructor.name,args:[gt(e.data,t,r),e.width,e.height]}:wt(e,t)||"object"==typeof e?{rr_type:e.constructor.name,index:yt(e,t,r)}:e}var bt=(e,t,r)=>e.map((e=>gt(e,t,r))),wt=(e,t)=>{var r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((e=>"function"==typeof t[e]));return Boolean(r.find((r=>e instanceof t[r])))};function Ct(e,t,r,n){var i=[];try{var o=ge(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(i){for(var o=arguments.length,a=new Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];if(!Se(this,t,r,!0)){var u=function(e){return"experimental-webgl"===e?"webgl":e}(i);if("__context"in this||(this.__context=u),n&&["webgl","webgl2"].includes(u))if(a[0]&&"object"==typeof a[0]){var l=a[0];l.preserveDrawingBuffer||(l.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[i,...a])}}));i.push(o)}catch(e){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach((e=>e()))}}function It(e,t,r,n,i,o){var a=[],s=Object.getOwnPropertyNames(e),u=function(s){if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(s))return 0;try{if("function"!=typeof e[s])return 0;var u=ge(e,s,(function(e){return function(){for(var a=arguments.length,u=new Array(a),l=0;l<a;l++)u[l]=arguments[l];var c=e.apply(this,u);if(yt(c,o,this),"tagName"in this.canvas&&!Se(this.canvas,n,i,!0)){var d=bt(u,o,this),h={type:t,property:s,args:d};r(this.canvas,h)}return c}}));a.push(u)}catch(n){var l=ye(e,s,{set(e){r(this.canvas,{type:t,property:s,args:[e],setter:!0})}});a.push(l)}};for(var l of s)u(l);return a}var kt,St,xt,At,Tt="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Nt="undefined"!=typeof window&&window.Blob&&new Blob([(kt=Tt,Uint8Array.from(atob(kt),(e=>e.charCodeAt(0))))],{type:"text/javascript;charset=utf-8"});function Mt(e){var t;try{if(!(t=Nt&&(window.URL||window.webkitURL).createObjectURL(Nt)))throw"";var r=new Worker(t,{name:null==e?void 0:e.name});return r.addEventListener("error",(()=>{(window.URL||window.webkitURL).revokeObjectURL(t)})),r}catch(t){return new Worker("data:text/javascript;base64,"+Tt,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class _t{constructor(e){a(this,"pendingCanvasMutations",new Map),a(this,"rafStamps",{latestId:0,invokeId:null}),a(this,"mirror"),a(this,"mutationCb"),a(this,"resetObservers"),a(this,"frozen",!1),a(this,"locked",!1),a(this,"processMutation",((e,t)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)}));var{sampling:t="all",win:r,blockClass:n,blockSelector:i,recordCanvas:o,dataURLOptions:s}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&"all"===t&&this.initCanvasMutationObserver(r,n,i),o&&"number"==typeof t&&this.initCanvasFPSObserver(t,r,n,i,{dataURLOptions:s})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,r,n,i,o){var a=this,s=Ct(r,n,i,!0),u=new Map,l=new Mt;l.onmessage=e=>{var{id:t}=e.data;if(u.set(t,!1),"base64"in e.data){var{base64:r,type:n,width:i,height:o}=e.data;this.mutationCb({id:t,type:qe["2D"],commands:[{property:"clearRect",args:[0,0,i,o]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:n}]},0,0]}]})}};var c,d=1e3/e,h=0,f=e=>{var s,v;h&&e-h<d?c=requestAnimationFrame(f):(h=e,(s=[],v=e=>{e.querySelectorAll("canvas").forEach((e=>{Se(e,n,i,!0)||s.push(e)})),e.querySelectorAll("*").forEach((e=>{e.shadowRoot&&v(e.shadowRoot)}))},v(r.document),s).forEach(function(){var e=t((function*(e){var t,r=a.mirror.getId(e);if(!u.get(r)&&0!==e.width&&0!==e.height){if(u.set(r,!0),["webgl","webgl2"].includes(e.__context)){var n=e.getContext(e.__context);!1===(null==(t=null==n?void 0:n.getContextAttributes())?void 0:t.preserveDrawingBuffer)&&n.clear(n.COLOR_BUFFER_BIT)}var i=e.clientWidth||e.width,s=e.clientHeight||e.height,c=yield createImageBitmap(e,{resizeWidth:i,resizeHeight:s});l.postMessage({id:r,bitmap:c,width:i,height:s,dataURLOptions:o.dataURLOptions},[c])}}));return function(t){return e.apply(this,arguments)}}()),c=requestAnimationFrame(f))};c=requestAnimationFrame(f),this.resetObservers=()=>{s(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var n=Ct(e,t,r,!1),i=function(e,t,r,n){var i=[],o=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype),a=function(o){try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[o])return 1;var a=ge(t.CanvasRenderingContext2D.prototype,o,(function(i){return function(){for(var a=arguments.length,s=new Array(a),u=0;u<a;u++)s[u]=arguments[u];return Se(this.canvas,r,n,!0)||setTimeout((()=>{var r=bt(s,t,this);e(this.canvas,{type:qe["2D"],property:o,args:r})}),0),i.apply(this,s)}}));i.push(a)}catch(r){var s=ye(t.CanvasRenderingContext2D.prototype,o,{set(t){e(this.canvas,{type:qe["2D"],property:o,args:[t],setter:!0})}});i.push(s)}};for(var s of o)a(s);return()=>{i.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,r),o=function(e,t,r,n){var i=[];return i.push(...It(t.WebGLRenderingContext.prototype,qe.WebGL,e,r,n,t)),void 0!==t.WebGL2RenderingContext&&i.push(...It(t.WebGL2RenderingContext.prototype,qe.WebGL2,e,r,n,t)),()=>{i.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{n(),i(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}startRAFTimestamping(){var e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach(((e,t)=>{var r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)})),requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(e,t){if(!this.frozen&&!this.locked){var r=this.pendingCanvasMutations.get(e);if(r&&-1!==t){var n=r.map((e=>{var t=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,i);return t})),{type:o}=r[0];this.mutationCb({id:t,type:o,commands:n}),this.pendingCanvasMutations.delete(e)}}}}class Rt{constructor(e){a(this,"trackedLinkElements",new WeakSet),a(this,"mutationCb"),a(this,"adoptedStyleSheetCb"),a(this,"styleMirror",new Re),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){var r=this;if(0!==e.length){var n={id:t,styleIds:[]},i=[],o=function(e){var t;r.styleMirror.has(e)?t=r.styleMirror.getId(e):(t=r.styleMirror.add(e),i.push({styleId:t,rules:Array.from(e.rules||CSSRule,((t,r)=>({rule:k(t,e.href),index:r})))})),n.styleIds.push(t)};for(var a of e)o(a);i.length>0&&(n.styles=i),this.adoptedStyleSheetCb(n)}}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Ft{constructor(){a(this,"nodeMap",new WeakMap),a(this,"active",!1)}inOtherBuffer(e,t){var r=this.nodeMap.get(e);return r&&Array.from(r).some((e=>e!==t))}add(e,t){this.active||(this.active=!0,requestAnimationFrame((()=>{this.nodeMap=new WeakMap,this.active=!1}))),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}var Et=!1;try{if(2!==Array.from([1],(e=>2*e))[0]){var Zt=document.createElement("iframe");document.body.appendChild(Zt),Array.from=(null==(n=Zt.contentWindow)?void 0:n.Array.from)||Array.from,document.body.removeChild(Zt)}}catch(e){console.debug("Unable to override Array.from",e)}var Ot,Bt,Lt=new x;function Dt(e){void 0===e&&(e={});var{emit:t,checkoutEveryNms:n,checkoutEveryNth:i,blockClass:o="rr-block",blockSelector:a=null,ignoreClass:s="rr-ignore",ignoreSelector:u=null,maskTextClass:l="rr-mask",maskTextSelector:c=null,inlineStylesheet:d=!0,maskAllInputs:h,maskInputOptions:f,slimDOMOptions:v,maskInputFn:p,maskTextFn:m,hooks:y,packFn:g,sampling:b={},dataURLOptions:w={},mousemoveWait:C,recordDOM:I=!0,recordCanvas:k=!1,recordCrossOriginIframes:S=!1,recordAfter:A=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:T=!1,collectFonts:N=!1,inlineImages:M=!1,plugins:_,keepIframeSrcFn:R=(()=>!1),ignoreCSSAttributes:F=new Set([]),errorHandler:E}=e;He=E;var Z=!S||window.parent===window,O=!1;if(!Z)try{window.parent.document&&(O=!1)}catch(e){O=!0}if(Z&&!t)throw new Error("emit function is required");if(!Z&&!O)return()=>{};void 0!==C&&void 0===b.mousemove&&(b.mousemove=C),Lt.reset();var B,L=!0===h?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==f?f:{password:!0},D=!0===v||"all"===v?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===v,headMetaDescKeywords:"all"===v,headTitleMutations:"all"===v}:v||{};!function(e){void 0===e&&(e=window),"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}();var q=0,V=e=>{for(var t of _||[])t.eventProcessor&&(e=t.eventProcessor(e));return g&&!O&&(e=g(e)),e};St=(e,r)=>{var o,a=e;if(a.timestamp=be(),!(null==(o=Je[0])?void 0:o.isFrozen())||a.type===Oe.FullSnapshot||a.type===Oe.IncrementalSnapshot&&a.data.source===Be.Mutation||Je.forEach((e=>e.unfreeze())),Z)null==t||t(V(a),r);else if(O){var s={type:"rrweb",event:V(a),origin:window.location.origin,isCheckout:r};window.parent.postMessage(s,"*")}if(a.type===Oe.FullSnapshot)B=a,q=0;else if(a.type===Oe.IncrementalSnapshot){if(a.data.source===Be.Mutation&&a.data.isAttachIframe)return;q++;var u=i&&q>=i,l=n&&a.timestamp-B.timestamp>n;(u||l)&&xt(!0)}};var P=e=>{St({type:Oe.IncrementalSnapshot,data:r({source:Be.Mutation},e)})},Y=e=>St({type:Oe.IncrementalSnapshot,data:r({source:Be.Scroll},e)}),H=e=>St({type:Oe.IncrementalSnapshot,data:r({source:Be.CanvasMutation},e)}),G=new Rt({mutationCb:P,adoptedStyleSheetCb:e=>St({type:Oe.IncrementalSnapshot,data:r({source:Be.AdoptedStyleSheet},e)})}),W=new dt({mirror:Lt,mutationCb:P,stylesheetManager:G,recordCrossOriginIframes:S,wrappedEmit:St});for(var j of _||[])j.getMirror&&j.getMirror({nodeMirror:Lt,crossOriginIframeMirror:W.crossOriginIframeMirror,crossOriginIframeStyleMirror:W.crossOriginIframeStyleMirror});var X=new Ft;At=new _t({recordCanvas:k,mutationCb:H,win:window,blockClass:o,blockSelector:a,mirror:Lt,sampling:b.canvas,dataURLOptions:w});var z=new ht({mutationCb:P,scrollCb:Y,bypassOptions:{blockClass:o,blockSelector:a,maskTextClass:l,maskTextSelector:c,inlineStylesheet:d,maskInputOptions:L,dataURLOptions:w,maskTextFn:m,maskInputFn:p,recordCanvas:k,inlineImages:M,sampling:b,slimDOMOptions:D,iframeManager:W,stylesheetManager:G,canvasManager:At,keepIframeSrcFn:R,processedNodeManager:X},mirror:Lt});xt=function(e){if(void 0===e&&(e=!1),I){St({type:Oe.Meta,data:{href:window.location.href,width:Ie(),height:Ce()}},e),G.reset(),z.init(),Je.forEach((e=>e.lock()));var t=function(e,t){var{mirror:r=new x,blockClass:n="rr-block",blockSelector:i=null,maskTextClass:o="rr-mask",maskTextSelector:a=null,inlineStylesheet:s=!0,inlineImages:u=!1,recordCanvas:l=!1,maskAllInputs:c=!1,maskTextFn:d,maskInputFn:h,slimDOM:f=!1,dataURLOptions:v,preserveWhiteSpace:p,onSerialize:m,onIframeLoad:y,iframeLoadTimeout:g,onStylesheetLoad:b,stylesheetLoadTimeout:w,keepIframeSrcFn:C=(()=>!1)}=t||{};return te(e,{doc:e,mirror:r,blockClass:n,blockSelector:i,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:s,maskInputOptions:!0===c?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===c?{password:!0}:c,maskTextFn:d,maskInputFn:h,slimDOMOptions:!0===f||"all"===f?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===f,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===f?{}:f,dataURLOptions:v,inlineImages:u,recordCanvas:l,preserveWhiteSpace:p,onSerialize:m,onIframeLoad:y,iframeLoadTimeout:g,onStylesheetLoad:b,stylesheetLoadTimeout:w,keepIframeSrcFn:C,newlyAddedElement:!1})}(document,{mirror:Lt,blockClass:o,blockSelector:a,maskTextClass:l,maskTextSelector:c,inlineStylesheet:d,maskAllInputs:L,maskTextFn:m,maskInputFn:p,slimDOM:D,dataURLOptions:w,recordCanvas:k,inlineImages:M,onSerialize:e=>{Ne(e,Lt)&&W.addIframe(e),Me(e,Lt)&&G.trackLinkElement(e),_e(e)&&z.addShadowRoot(he.shadowRoot(e),document)},onIframeLoad:(e,t)=>{W.attachIframe(e,t),z.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{G.attachLinkElement(e,t)},keepIframeSrcFn:R});if(!t)return console.warn("Failed to snapshot the document");St({type:Oe.FullSnapshot,data:{node:t,initialOffset:we(window)}},e),Je.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&G.adoptStyleSheets(document.adoptedStyleSheets,Lt.getId(document))}};try{var K=[],U=e=>{var t;return Ue(st)({mutationCb:P,mousemoveCb:(e,t)=>St({type:Oe.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>St({type:Oe.IncrementalSnapshot,data:r({source:Be.MouseInteraction},e)}),scrollCb:Y,viewportResizeCb:e=>St({type:Oe.IncrementalSnapshot,data:r({source:Be.ViewportResize},e)}),inputCb:e=>St({type:Oe.IncrementalSnapshot,data:r({source:Be.Input},e)}),mediaInteractionCb:e=>St({type:Oe.IncrementalSnapshot,data:r({source:Be.MediaInteraction},e)}),styleSheetRuleCb:e=>St({type:Oe.IncrementalSnapshot,data:r({source:Be.StyleSheetRule},e)}),styleDeclarationCb:e=>St({type:Oe.IncrementalSnapshot,data:r({source:Be.StyleDeclaration},e)}),canvasMutationCb:H,fontCb:e=>St({type:Oe.IncrementalSnapshot,data:r({source:Be.Font},e)}),selectionCb:e=>{St({type:Oe.IncrementalSnapshot,data:r({source:Be.Selection},e)})},customElementCb:e=>{St({type:Oe.IncrementalSnapshot,data:r({source:Be.CustomElement},e)})},blockClass:o,ignoreClass:s,ignoreSelector:u,maskTextClass:l,maskTextSelector:c,maskInputOptions:L,inlineStylesheet:d,sampling:b,recordDOM:I,recordCanvas:k,inlineImages:M,userTriggeredOnInput:T,collectFonts:N,doc:e,maskInputFn:p,maskTextFn:m,keepIframeSrcFn:R,blockSelector:a,slimDOMOptions:D,dataURLOptions:w,mirror:Lt,iframeManager:W,stylesheetManager:G,shadowDomManager:z,processedNodeManager:X,canvasManager:At,ignoreCSSAttributes:F,plugins:(null==(t=null==_?void 0:_.filter((e=>e.observer)))?void 0:t.map((e=>({observer:e.observer,options:e.options,callback:t=>St({type:Oe.Plugin,data:{plugin:e.name,payload:t}})}))))||[]},y)};W.addLoadListener((e=>{try{K.push(U(e.contentDocument))}catch(e){console.warn(e)}}));var J=()=>{xt(),K.push(U(document)),Et=!0};return"interactive"===document.readyState||"complete"===document.readyState?J():(K.push(fe("DOMContentLoaded",(()=>{St({type:Oe.DomContentLoaded,data:{}}),"DOMContentLoaded"===A&&J()}))),K.push(fe("load",(()=>{St({type:Oe.Load,data:{}}),"load"===A&&J()}),window))),()=>{K.forEach((e=>e())),X.destroy(),Et=!1,He=void 0}}catch(e){console.warn(e)}}Dt.addCustomEvent=(e,t)=>{if(!Et)throw new Error("please add custom event after start recording");St({type:Oe.Custom,data:{tag:e,payload:t}})},Dt.freezePage=()=>{Je.forEach((e=>e.freeze()))},Dt.takeFullSnapshot=e=>{if(!Et)throw new Error("please take full snapshot after start recording");xt(e)},Dt.mirror=Lt,(Bt=Ot||(Ot={}))[Bt.NotStarted=0]="NotStarted",Bt[Bt.Running=1]="Running",Bt[Bt.Stopped=2]="Stopped";var qt,Vt=Object.defineProperty,Pt=(e,t,r)=>((e,t,r)=>t in e?Vt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),Yt=Object.defineProperty,Ht=(e,t,r)=>((e,t,r)=>t in e?Yt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),Gt=Object.defineProperty,Wt=(e,t,r)=>((e,t,r)=>t in e?Gt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),jt={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Xt={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},zt={};function Kt(e){if(zt[e])return zt[e];var t=globalThis[e],r=t.prototype,n=e in jt?jt[e]:void 0,i=Boolean(n&&n.every((e=>{var t,n;return Boolean(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))}))),o=e in Xt?Xt[e]:void 0,a=Boolean(o&&o.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(i&&a)return zt[e]=t.prototype,t.prototype;try{var s=document.createElement("iframe");document.body.appendChild(s);var u=s.contentWindow;if(!u)return t.prototype;var l=u[e].prototype;return document.body.removeChild(s),l?zt[e]=l:r}catch(e){return r}}var Ut={};function Jt(e,t,r){var n,i=e+"."+String(r);if(Ut[i])return Ut[i].call(t);var o=Kt(e),a=null==(n=Object.getOwnPropertyDescriptor(o,r))?void 0:n.get;return a?(Ut[i]=a,a.call(t)):t[r]}var Qt={};function $t(e,t,r){var n=e+"."+String(r);if(Qt[n])return Qt[n].bind(t);var i=Kt(e)[r];return"function"!=typeof i?t[r]:(Qt[n]=i,i.bind(t))}var er={childNodes:function(e){return Jt("Node",e,"childNodes")},parentNode:function(e){return Jt("Node",e,"parentNode")},parentElement:function(e){return Jt("Node",e,"parentElement")},textContent:function(e){return Jt("Node",e,"textContent")},contains:function(e,t){return $t("Node",e,"contains")(t)},getRootNode:function(e){return $t("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?Jt("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?Jt("Element",e,"shadowRoot"):null},querySelector:function(e,t){return Jt("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return Jt("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return Kt("MutationObserver").constructor}};class tr{constructor(){Wt(this,"idNodeMap",new Map),Wt(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;var r=null==(t=this.getMeta(e))?void 0:t.id;return null!=r?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){var t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach((e=>this.removeNodeFromMap(e)))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){var r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){var r=this.getNode(e);if(r){var n=this.nodeMetaMap.get(r);n&&this.nodeMetaMap.set(t,n)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function rr(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&rr(er.parentNode(e),t,r);for(var n=e.classList.length;n--;){var i=e.classList[n];if(t.test(i))return!0}return!!r&&rr(er.parentNode(e),t,r)}class nr{constructor(){__publicField22(this,"parentElement",null),__publicField22(this,"parentNode",null),__publicField22(this,"ownerDocument"),__publicField22(this,"firstChild",null),__publicField22(this,"lastChild",null),__publicField22(this,"previousSibling",null),__publicField22(this,"nextSibling",null),__publicField22(this,"ELEMENT_NODE",1),__publicField22(this,"TEXT_NODE",3),__publicField22(this,"nodeType"),__publicField22(this,"nodeName"),__publicField22(this,"RRNodeType")}get childNodes(){for(var e=[],t=this.firstChild;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(!(e instanceof nr))return!1;if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}var ir={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},or={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ar={};function sr(e){if(ar[e])return ar[e];var t=globalThis[e],r=t.prototype,n=e in ir?ir[e]:void 0,i=Boolean(n&&n.every((e=>{var t,n;return Boolean(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))}))),o=e in or?or[e]:void 0,a=Boolean(o&&o.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(i&&a)return ar[e]=t.prototype,t.prototype;try{var s=document.createElement("iframe");document.body.appendChild(s);var u=s.contentWindow;if(!u)return t.prototype;var l=u[e].prototype;return document.body.removeChild(s),l?ar[e]=l:r}catch(e){return r}}var ur={};function lr(e,t,r){var n,i=e+"."+String(r);if(ur[i])return ur[i].call(t);var o=sr(e),a=null==(n=Object.getOwnPropertyDescriptor(o,r))?void 0:n.get;return a?(ur[i]=a,a.call(t)):t[r]}var cr={};function dr(e,t,r){var n=e+"."+String(r);if(cr[n])return cr[n].bind(t);var i=sr(e)[r];return"function"!=typeof i?t[r]:(cr[n]=i,i.bind(t))}var hr={childNodes:function(e){return lr("Node",e,"childNodes")},parentNode:function(e){return lr("Node",e,"parentNode")},parentElement:function(e){return lr("Node",e,"parentElement")},textContent:function(e){return lr("Node",e,"textContent")},contains:function(e,t){return dr("Node",e,"contains")(t)},getRootNode:function(e){return dr("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?lr("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?lr("Element",e,"shadowRoot"):null},querySelector:function(e,t){return lr("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return lr("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return sr("MutationObserver").constructor}};var fr="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",vr={map:{},getId:()=>(console.error(fr),-1),getNode:()=>(console.error(fr),null),removeNodeFromMap(){console.error(fr)},has:()=>(console.error(fr),!1),reset(){console.error(fr)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(vr=new Proxy(vr,{get:(e,t,r)=>("map"===t&&console.error(fr),Reflect.get(e,t,r))}));var pr=Date.now;function mr(e){return e?e.nodeType===e.ELEMENT_NODE?e:hr.parentElement(e):null}/[1-9][0-9]{12}/.test(Date.now().toString())||(pr=()=>(new Date).getTime());function yr(e){var t,r=null;return"getRootNode"in e&&(null==(t=hr.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&hr.host(hr.getRootNode(e))&&(r=hr.host(hr.getRootNode(e))),r}function gr(e){for(var t,r=e;t=yr(r);)r=t;return r}function br(e){var t=e.ownerDocument;if(!t)return!1;var r=gr(e);return hr.contains(t,r)}for(var wr=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:class{constructor(){Ht(this,"id",1),Ht(this,"styleIDMap",new WeakMap),Ht(this,"idStyleMap",new Map)}getId(e){var t;return null!==(t=this.styleIDMap.get(e))&&void 0!==t?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){return this.has(e)?this.getId(e):(r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r);var r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}},get _mirror(){return vr},closestElementOfNode:mr,getBaseDimension:function e(t,r){var n,i,o=null==(i=null==(n=t.ownerDocument)?void 0:n.defaultView)?void 0:i.frameElement;if(!o||o===r)return{x:0,y:0,relativeScale:1,absoluteScale:1};var a=o.getBoundingClientRect(),s=e(o,r),u=a.height/o.clientHeight;return{x:a.x*s.relativeScale+s.x,y:a.y*s.relativeScale+s.y,relativeScale:u,absoluteScale:s.absoluteScale*u}},getNestedRule:function e(t,r){var n=t[r[0]];return 1===r.length?n:e(n.cssRules[r[1]].cssRules,r.slice(2))},getPositionsAndIndex:function(e){var t=[...e],r=t.pop();return{positions:t,index:r}},getRootShadowHost:gr,getShadowHost:yr,getWindowHeight:function(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight},getWindowScroll:function(e){var t,r,n,i,o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:o.documentElement.scrollLeft||(null==o?void 0:o.body)&&(null==(t=hr.parentElement(o.body))?void 0:t.scrollLeft)||(null==(r=null==o?void 0:o.body)?void 0:r.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==o?void 0:o.documentElement.scrollTop)||(null==o?void 0:o.body)&&(null==(n=hr.parentElement(o.body))?void 0:n.scrollTop)||(null==(i=null==o?void 0:o.body)?void 0:i.scrollTop)||0}},getWindowWidth:function(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth},hasShadowRoot:function(e){return!!e&&(e instanceof nr&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(hr.shadowRoot(e)))},hookSetter:function e(t,r,n,i,o){void 0===o&&(o=window);var a=o.Object.getOwnPropertyDescriptor(t,r);return o.Object.defineProperty(t,r,i?n:{set(e){setTimeout((()=>{n.set.call(this,e)}),0),a&&a.set&&a.set.call(this,e)}}),()=>e(t,r,a||{},!0)},inDom:function(e){var t=e.ownerDocument;return!!t&&(hr.contains(t,e)||br(e))},isAncestorRemoved:function e(t,r){if(i=(n=t)&&"host"in n&&"mode"in n&&er.host(n)||null,Boolean(i&&"shadowRoot"in i&&er.shadowRoot(i)===n))return!1;var n,i,o=r.getId(t);if(!r.has(o))return!0;var a=hr.parentNode(t);return(!a||a.nodeType!==t.DOCUMENT_NODE)&&(!a||e(a,r))},isBlocked:function(e,t,r,n){if(!e)return!1;var i=mr(e);if(!i)return!1;try{if("string"==typeof t){if(i.classList.contains(t))return!0;if(n&&null!==i.closest("."+t))return!0}else if(rr(i,t,n))return!0}catch(e){}if(r){if(i.matches(r))return!0;if(n&&null!==i.closest(r))return!0}return!1},isIgnored:function(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||-2===t.getId(e)},isSerialized:function(e,t){return-1!==t.getId(e)},isSerializedIframe:function(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))},isSerializedStylesheet:function(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))},iterateResolveTree:function e(t,r){r(t.value);for(var n=t.children.length-1;n>=0;n--)e(t.children[n],r)},legacy_isTouchEvent:function(e){return Boolean(e.changedTouches)},get nowTimestamp(){return pr},on:function(e,t,r){void 0===r&&(r=document);var n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)},patch:function(e,t,r){try{if(!(t in e))return()=>{};var n=e[t],i=r(n);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=i,()=>{e[t]=n}}catch(e){return()=>{}}},polyfill:function(e){void 0===e&&(e=window),"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)},queueToResolveTrees:function(e){var t={},r=(e,r)=>{var n={value:e,parent:r,children:[]};return t[e.node.id]=n,n},n=[];for(var i of e){var{nextId:o,parentId:a}=i;if(o&&o in t){var s=t[o];if(s.parent){var u=s.parent.children.indexOf(s);s.parent.children.splice(u,0,r(i,s.parent))}else{var l=n.indexOf(s);n.splice(l,0,r(i,null))}}else if(a in t){var c=t[a];c.children.push(r(i,c))}else n.push(r(i,null))}return n},shadowHostInDom:br,throttle:function(e,t,r){void 0===r&&(r={});var n=null,i=0;return function(){for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];var u=Date.now();i||!1!==r.leading||(i=u);var l=t-(u-i),c=this;l<=0||l>t?(n&&(clearTimeout(n),n=null),i=u,e.apply(c,a)):n||!1===r.trailing||(n=setTimeout((()=>{i=!1===r.leading?0:Date.now(),n=null,e.apply(c,a)}),l))}},uniqueTextMutations:function(e){for(var t=new Set,r=[],n=e.length;n--;){var i=e[n];t.has(i.id)||(r.push(i),t.add(i.id))}return r}},Symbol.toStringTag,{value:"Module"})),Cr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ir="undefined"==typeof Uint8Array?[]:new Uint8Array(256),kr=0;kr<64;kr++)Ir[Cr.charCodeAt(kr)]=kr;var Sr;"undefined"!=typeof window&&window.Blob&&new Blob([(e=>Uint8Array.from(atob(e),(e=>e.charCodeAt(0))))("KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=")],{type:"text/javascript;charset=utf-8"});try{if(2!==Array.from([1],(e=>2*e))[0]){var xr=document.createElement("iframe");document.body.appendChild(xr),Array.from=(null==(qt=xr.contentWindow)?void 0:qt.Array.from)||Array.from,document.body.removeChild(xr)}}catch(e){console.debug("Unable to override Array.from",e)}new tr,function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(Sr||(Sr={}));class Ar{constructor(e){Pt(this,"fileName"),Pt(this,"functionName"),Pt(this,"lineNumber"),Pt(this,"columnNumber"),this.fileName=e.fileName||"",this.functionName=e.functionName||"",this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber}toString(){var e=this.lineNumber||"",t=this.columnNumber||"";return this.functionName?this.functionName+" ("+this.fileName+":"+e+":"+t+")":this.fileName+":"+e+":"+t}}var Tr=/(^|@)\S+:\d+/,Nr=/^\s*at .*(\S+:\d+|\(native\))/m,Mr=/^(eval@)?(\[native code])?$/,_r={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(Nr)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):(console.warn("[console-record-plugin]: Failed to parse error object:",e),[]):[]},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];var t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!t)throw new Error("Cannot parse given url: "+e);return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter((function(e){return!!e.match(Nr)}),this).map((function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var t=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),r=t.match(/ (\((.+):(\d+):(\d+)\)$)/),n=(t=r?t.replace(r[0],""):t).split(/\s+/).slice(1),i=this.extractLocation(r?r[1]:n.pop()),o=n.join(" ")||void 0,a=["eval","<anonymous>"].indexOf(i[0])>-1?void 0:i[0];return new Ar({functionName:o,fileName:a,lineNumber:i[1],columnNumber:i[2]})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(e){return!e.match(Mr)}),this).map((function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new Ar({functionName:e});var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=e.match(t),n=r&&r[1]?r[1]:void 0,i=this.extractLocation(e.replace(t,""));return new Ar({functionName:n,fileName:i[0],lineNumber:i[1],columnNumber:i[2]})}),this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){for(var t=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split("\n"),n=[],i=2,o=r.length;i<o;i+=2){var a=t.exec(r[i]);a&&n.push(new Ar({fileName:a[2],lineNumber:parseFloat(a[1])}))}return n},parseOpera10:function(e){for(var t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=e.stacktrace.split("\n"),n=[],i=0,o=r.length;i<o;i+=2){var a=t.exec(r[i]);a&&n.push(new Ar({functionName:a[3]||void 0,fileName:a[2],lineNumber:parseFloat(a[1])}))}return n},parseOpera11:function(e){return e.stack.split("\n").filter((function(e){return!!e.match(Tr)&&!e.match(/^Error created at/)}),this).map((function(e){var t=e.split("@"),r=this.extractLocation(t.pop()),n=(t.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new Ar({functionName:n,fileName:r[0],lineNumber:r[1],columnNumber:r[2]})}),this)}};function Rr(e){if(!e||!e.outerHTML)return"";for(var t="";e.parentElement;){var r=e.localName;if(!r)break;r=r.toLowerCase();var n=e.parentElement,i=[];if(n.children&&n.children.length>0)for(var o=0;o<n.children.length;o++){var a=n.children[o];a.localName&&a.localName.toLowerCase&&a.localName.toLowerCase()===r&&i.push(a)}i.length>1&&(r+=":eq("+i.indexOf(e)+")"),t=r+(t?">"+t:""),e=n}return t}function Fr(e){return"[object Object]"===Object.prototype.toString.call(e)}function Er(e,t){if(0===t)return!0;var r=Object.keys(e);for(var n of r)if(Fr(e[n])&&Er(e[n],t-1))return!0;return!1}function Zr(e,t){var r={numOfKeysLimit:50,depthOfLimit:4};Object.assign(r,t);var n=[],i=[];return JSON.stringify(e,(function(e,t){if(n.length>0){var o=n.indexOf(this);~o?n.splice(o+1):n.push(this),~o?i.splice(o,1/0,e):i.push(e),~n.indexOf(t)&&(t=n[0]===t?"[Circular ~]":"[Circular ~."+i.slice(0,n.indexOf(t)).join(".")+"]")}else n.push(t);if(null===t)return t;if(void 0===t)return"undefined";if(function(e){if(Fr(e)&&Object.keys(e).length>r.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if(Fr(e)&&Er(e,r.depthOfLimit))return!0;return!1}(t))return function(e){var t=e.toString();r.stringLengthLimit&&t.length>r.stringLengthLimit&&(t=t.slice(0,r.stringLengthLimit)+"...");return t}(t);if("bigint"==typeof t)return t.toString()+"n";if(t instanceof Event){var a={};for(var s in t){var u=t[s];Array.isArray(u)?a[s]=Rr(u.length?u[0]:null):a[s]=u}return a}return t instanceof Node?t instanceof HTMLElement?t?t.outerHTML:"":t.nodeName:t instanceof Error?t.stack?t.stack+"\nEnd of stack for Error object":t.name+": "+t.message:t}))}var Or={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function Br(e,t,r){var n,i=r?Object.assign({},Or,r):Or,o=i.logger;if(!o)return()=>{};n="string"==typeof o?t[o]:o;var a=0,s=!1,u=[];if(i.level.includes("error")){var l=t=>{var r=t.message,n=t.error,o=_r.parse(n).map((e=>e.toString())),a=[Zr(r,i.stringifyOptions)];e({level:"error",trace:o,payload:a})};t.addEventListener("error",l),u.push((()=>{t.removeEventListener("error",l)}));var c=t=>{var r,n;t.reason instanceof Error?n=[Zr("Uncaught (in promise) "+(r=t.reason).name+": "+r.message,i.stringifyOptions)]:(r=new Error,n=[Zr("Uncaught (in promise)",i.stringifyOptions),Zr(t.reason,i.stringifyOptions)]);var o=_r.parse(r).map((e=>e.toString()));e({level:"error",trace:o,payload:n})};t.addEventListener("unhandledrejection",c),u.push((()=>{t.removeEventListener("unhandledrejection",c)}))}for(var d of i.level)u.push(h(n,d));return()=>{u.forEach((e=>e()))};function h(t,r){var n=this;return t[r]?wr.patch(t,r,(t=>function(){for(var o=arguments.length,u=new Array(o),l=0;l<o;l++)u[l]=arguments[l];if(t.apply(n,u),!("assert"===r&&u[0]||s)){s=!0;try{var c=_r.parse(new Error).map((e=>e.toString())).splice(1),d=("assert"===r?u.slice(1):u).map((e=>Zr(e,i.stringifyOptions)));++a<i.lengthThreshold?e({level:r,trace:c,payload:d}):a===i.lengthThreshold&&e({level:"warn",trace:[],payload:[Zr("The number of log records reached the threshold.")]})}catch(e){t("rrweb logger error:",e,...u)}finally{s=!1}}})):()=>{}}}var Lr=e=>({name:"rrweb/console@1",observer:Br,options:e});function Dr(e,t){return-1!==e.indexOf(t)}var qr=function(e){return e.trim()},Vr=Array.isArray,Pr=Object.prototype,Yr=Pr.hasOwnProperty,Hr=Pr.toString,Gr=Vr||function(e){return"[object Array]"===Hr.call(e)},Wr=e=>"function"==typeof e,jr=e=>Wr(e)&&-1!==e.toString().indexOf("[native code]"),Xr=e=>e===Object(e)&&!Gr(e),zr=e=>void 0===e,Kr=e=>"[object String]"==Hr.call(e),Ur=e=>null===e,Jr=e=>zr(e)||Ur(e),Qr=e=>"[object Number]"==Hr.call(e),$r=e=>"[object Boolean]"===Hr.call(e),en=e=>e instanceof FormData;function tn(e){return null===e||"object"!=typeof e}function rn(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function nn(e){return!zr(Event)&&function(e,t){try{return e instanceof t}catch(e){return!1}}(e,Event)}var on,an,sn,un="Mobile",ln="Android",cn="Tablet",dn=ln+" "+cn,hn="iPad",fn="Apple Watch",vn="BlackBerry",pn="Nintendo",mn="PlayStation",yn="Xbox",gn="Windows Phone",bn="Nokia",wn="Ouya",Cn="Generic",In=Cn+" "+un.toLowerCase(),kn=Cn+" "+cn.toLowerCase(),Sn=new RegExp(yn,"i"),xn=new RegExp(mn+" \\w+","i"),An=new RegExp(pn+" \\w+","i"),Tn=new RegExp(vn+"|PlayBook|BB10","i"),Nn=function(e){var t=function(e){return An.test(e)?pn:xn.test(e)?mn:Sn.test(e)?yn:new RegExp(wn,"i").test(e)?wn:new RegExp("("+gn+"|WPDesktop)","i").test(e)?gn:/iPad/.test(e)?hn:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?fn:Tn.test(e)?vn:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(bn,"i").test(e)?bn:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?new RegExp(un).test(e)&&!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)||/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?ln:dn:new RegExp("(pda|"+un+")","i").test(e)?In:new RegExp(cn,"i").test(e)&&!new RegExp(cn+" pc","i").test(e)?kn:""}(e);return t===hn||t===dn||"Kobo"===t||"Kindle Fire"===t||t===kn?cn:t===pn||t===yn||t===mn||t===wn?"Console":t===fn?"Wearable":t?un:"Desktop"},Mn=e=>e instanceof Error;function _n(e){var t=globalThis._posthogChunkIds;if(t){var r=Object.keys(t);return sn&&r.length===an||(an=r.length,sn=r.reduce(((r,n)=>{on||(on={});var i=on[n];if(i)r[i[0]]=i[1];else for(var o=e(n),a=o.length-1;a>=0;a--){var s=o[a],u=null==s?void 0:s.filename,l=t[n];if(u&&l){r[u]=l,on[n]=[u,l];break}}return r}),{})),sn}}class Rn{constructor(e,t,r){void 0===r&&(r=[]),this.coercers=e,this.stackParser=t,this.modifiers=r}buildFromUnknown(e,t){void 0===t&&(t={});var r=t&&t.mechanism||{handled:!0,type:"generic"},n=this.buildCoercingContext(r,t,0).apply(e),i=this.buildParsingContext(),o=this.parseStacktrace(n,i);return{$exception_list:this.convertToExceptionList(o,r),$exception_level:"error"}}modifyFrames(e){var r=this;return t((function*(){for(var t of e)t.stacktrace&&t.stacktrace.frames&&Gr(t.stacktrace.frames)&&(t.stacktrace.frames=yield r.applyModifiers(t.stacktrace.frames));return e}))()}coerceFallback(e){var t;return{type:"Error",value:"Unknown error",stack:null==(t=e.syntheticException)?void 0:t.stack,synthetic:!0}}parseStacktrace(e,t){var n,i;return null!=e.cause&&(n=this.parseStacktrace(e.cause,t)),""!=e.stack&&null!=e.stack&&(i=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?1:0),t.chunkIdMap)),r({},e,{cause:n,stack:i})}applyChunkIds(e,t){return e.map((e=>(e.filename&&t&&(e.chunk_id=t[e.filename]),e)))}applyCoercers(e,t){for(var r of this.coercers)if(r.match(e))return r.coerce(e,t);return this.coerceFallback(t)}applyModifiers(e){var r=this;return t((function*(){var t=e;for(var n of r.modifiers)t=yield n(t);return t}))()}convertToExceptionList(e,t){var n,i,o,a={type:e.type,value:e.value,mechanism:{type:null!==(n=t.type)&&void 0!==n?n:"generic",handled:null===(i=t.handled)||void 0===i||i,synthetic:null!==(o=e.synthetic)&&void 0!==o&&o}};e.stack&&(a.stacktrace={type:"raw",frames:e.stack});var s=[a];return null!=e.cause&&s.push(...this.convertToExceptionList(e.cause,r({},t,{handled:!0}))),s}buildParsingContext(){return{chunkIdMap:_n(this.stackParser)}}buildCoercingContext(e,t,n){void 0===n&&(n=0);var i=(r,n)=>{if(n<=4){var i=this.buildCoercingContext(e,t,n);return this.applyCoercers(r,i)}};return r({},t,{syntheticException:0==n?t.syntheticException:void 0,mechanism:e,apply:e=>i(e,n),next:e=>i(e,n+1)})}}var Fn="?";function En(e,t,r,n,i){var o={platform:e,filename:t,function:"<anonymous>"===r?Fn:r,in_app:!0};return zr(n)||(o.lineno=n),zr(i)||(o.colno=i),o}var Zn=(e,t)=>{var r=-1!==e.indexOf("safari-extension"),n=-1!==e.indexOf("safari-web-extension");return r||n?[-1!==e.indexOf("@")?e.split("@")[0]:Fn,r?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},On=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Bn=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Ln=/\((\S*)(?::(\d+))(?::(\d+))\)/,Dn=(e,t)=>{var r=On.exec(e);if(r){var[,n,i,o]=r;return En(t,n,Fn,+i,+o)}var a=Bn.exec(e);if(a){if(a[2]&&0===a[2].indexOf("eval")){var s=Ln.exec(a[2]);s&&(a[2]=s[1],a[3]=s[2],a[4]=s[3])}var[u,l]=Zn(a[1]||Fn,a[2]);return En(t,l,u,a[3]?+a[3]:void 0,a[4]?+a[4]:void 0)}},qn=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Vn=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Pn=(e,t)=>{var r=qn.exec(e);if(r){if(r[3]&&r[3].indexOf(" > eval")>-1){var n=Vn.exec(r[3]);n&&(r[1]=r[1]||"eval",r[3]=n[1],r[4]=n[2],r[5]="")}var i=r[3],o=r[1]||Fn;return[o,i]=Zn(o,i),En(t,i,o,r[4]?+r[4]:void 0,r[5]?+r[5]:void 0)}},Yn=/\(error: (.*)\)/,Hn=50;function Gn(){return function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return function(t,i){void 0===i&&(i=0);for(var o=[],a=t.split("\n"),s=i;s<a.length;s++){var u=a[s];if(!(u.length>1024)){var l=Yn.test(u)?u.replace(Yn,"$1"):u;if(!l.match(/\S*Error: /)){for(var c of n){var d=c(l,e);if(d){o.push(d);break}}if(o.length>=Hn)break}}}return function(e){if(!e.length)return[];var t=Array.from(e);return t.reverse(),t.slice(0,Hn).map((e=>{return r({},e,{filename:e.filename||(n=t,n[n.length-1]||{}).filename,function:e.function||Fn});var n}))}(o)}}("web:javascript",Dn,Pn)}class Wn{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,t){var r=Kr(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:r?e.stack:void 0,cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return this.isDOMError(e)?"DOMError":"DOMException"}getValue(e){var t=e.name||(this.isDOMError(e)?"DOMError":"DOMException");return e.message?t+": "+e.message:t}isDOMException(e){return rn(e,"DOMException")}isDOMError(e){return rn(e,"DOMError")}}class jn{match(e){return(e=>e instanceof Error)(e)}coerce(e,t){return{type:this.getType(e),value:this.getMessage(e,t),stack:this.getStack(e),cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return e.name||e.constructor.name}getMessage(e,t){var r=e.message;return r.error&&"string"==typeof r.error.message?String(r.error.message):String(r)}getStack(e){return e.stacktrace||e.stack||void 0}}class Xn{constructor(){}match(e){return rn(e,"ErrorEvent")&&null!=e.error}coerce(e,t){var r,n=t.apply(e.error);return n||{type:"ErrorEvent",value:e.message,stack:null==(r=t.syntheticException)?void 0:r.stack,synthetic:!0}}}var zn=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class Kn{match(e){return"string"==typeof e}coerce(e,t){var r,[n,i]=this.getInfos(e);return{type:null!=n?n:"Error",value:null!=i?i:e,stack:null==(r=t.syntheticException)?void 0:r.stack,synthetic:!0}}getInfos(e){var t="Error",r=e,n=e.match(zn);return n&&(t=n[1],r=n[2]),[t,r]}}var Un=["fatal","error","warning","log","info","debug"];function Jn(e,t){void 0===t&&(t=40);var r=Object.keys(e);if(r.sort(),!r.length)return"[object has no keys]";for(var n=r.length;n>0;n--){var i=r.slice(0,n).join(", ");if(!(i.length>t))return n===r.length||i.length<=t?i:i.slice(0,t)+"..."}return""}class Qn{match(e){return"object"==typeof e&&null!==e}coerce(e,t){var r,n=this.getErrorPropertyFromObject(e);return n?t.apply(n):{type:this.getType(e),value:this.getValue(e),stack:null==(r=t.syntheticException)?void 0:r.stack,level:this.isSeverityLevel(e.level)?e.level:"error",synthetic:!0}}getType(e){return nn(e)?e.constructor.name:"Error"}getValue(e){if("name"in e&&"string"==typeof e.name){var t="'"+e.name+"' captured as exception";return"message"in e&&"string"==typeof e.message&&(t+=" with message: '"+e.message+"'"),t}if("message"in e&&"string"==typeof e.message)return e.message;var r=this.getObjectClassName(e);return(r&&"Object"!==r?"'"+r+"'":"Object")+" captured as exception with keys: "+Jn(e)}isSeverityLevel(e){return Kr(e)&&!(e=>Kr(e)&&0===e.trim().length)(e)&&Un.indexOf(e)>=0}getErrorPropertyFromObject(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var r=e[t];if(Mn(r))return r}}getObjectClassName(e){try{var t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){return}}}class $n{match(e){return nn(e)}coerce(e,t){var r,n=e.constructor.name;return{type:n,value:n+" captured as exception with keys: "+Jn(e),stack:null==(r=t.syntheticException)?void 0:r.stack,synthetic:!0}}}class ei{match(e){return tn(e)}coerce(e,t){var r;return{type:"Error",value:"Primitive value captured as exception: "+String(e),stack:null==(r=t.syntheticException)?void 0:r.stack,synthetic:!0}}}class ti{match(e){return rn(e,"PromiseRejectionEvent")}coerce(e,t){var r,n=this.getUnhandledRejectionReason(e);return tn(n)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(n),stack:null==(r=t.syntheticException)?void 0:r.stack,synthetic:!0}:t.apply(n)}getUnhandledRejectionReason(e){if(tn(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch(e){}return e}}var ri="undefined"!=typeof window?window:void 0,ni="undefined"!=typeof globalThis?globalThis:ri;"undefined"==typeof self&&(ni.self=ni),"undefined"==typeof File&&(ni.File=function(){});var ii=Array.prototype.forEach,oi=null==ni?void 0:ni.navigator,ai=null==ni?void 0:ni.document;null==ni||ni.location,null==ni||ni.fetch,null!=ni&&ni.XMLHttpRequest&&"withCredentials"in new ni.XMLHttpRequest&&ni.XMLHttpRequest,null==ni||ni.AbortController;var si=null==oi?void 0:oi.userAgent,ui=null!=ri?ri:{},li=()=>!!ri.Zone,ci=e=>e instanceof Document,di=function(e,t){var{debugEnabled:r}=void 0===t?{}:t,n={o:function(t){if(ri&&(ui.POSTHOG_DEBUG||r)&&!zr(ri.console)&&ri.console){for(var n=("__rrweb_original__"in ri.console[t]?ri.console[t].__rrweb_original__:ri.console[t]),i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];n(e,...o)}},info:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];n.o("log",...t)},warn:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];n.o("warn",...t)},error:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];n.o("error",...t)},critical:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];console.error(e,...r)},uninitializedWarning:e=>{n.error("You must initialize PostHog before calling "+e)},createLogger:(t,r)=>di(e+" "+t,r)};return n},hi=di("[PostHog.js]"),fi=hi.createLogger,vi={};function pi(e,t,r){if(Gr(e))if(ii&&e.forEach===ii)e.forEach(t,r);else if("length"in e&&e.length===+e.length)for(var n=0,i=e.length;n<i;n++)if(n in e&&t.call(r,e[n],n)===vi)return}function mi(e,t,r){if(!Jr(e)){if(Gr(e))return pi(e,t,r);if(en(e)){for(var n of e.entries())if(t.call(r,n[1],n[0])===vi)return}else for(var i in e)if(Yr.call(e,i)&&t.call(r,e[i],i)===vi)return}}var yi=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return pi(r,(function(t){for(var r in t)void 0!==t[r]&&(e[r]=t[r])})),e};function gi(e){for(var t=Object.keys(e),r=t.length,n=new Array(r);r--;)n[r]=[t[r],e[t[r]]];return n}function bi(e,t,r,n){var{capture:i=!1,passive:o=!0}=null!=n?n:{};null==e||e.addEventListener(t,r,{capture:i,passive:o})}var wi=function(e,t){var r,n;void 0===t&&(t="&");var i=[];return mi(e,(function(e,t){zr(e)||zr(t)||"undefined"===t||(r=encodeURIComponent((e=>e instanceof File)(e)?e.name:e.toString()),n=encodeURIComponent(t),i[i.length]=n+"="+r)})),i.join(t)};function Ci(e,t,r){try{if(!(t in e))return()=>{};var n=e[t],i=r(n);return Wr(i)&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=i,()=>{e[t]=n}}catch(e){return()=>{}}}function Ii(e,t){var r,n=function(e){try{return"string"==typeof e?new URL(e).hostname:"url"in e?new URL(e.url).hostname:e.hostname}catch(e){return null}}(e),i={hostname:n,isHostDenied:!1};if(null==(r=t.payloadHostDenyList)||!r.length||null==n||!n.trim().length)return i;for(var o of t.payloadHostDenyList)if(n.endsWith(o))return{hostname:n,isHostDenied:!0};return i}function ki(e){return!!e&&1===e.nodeType}function Si(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function xi(e){return e?qr(e).split(/\s+/):[]}function Ai(e){var t="";switch(typeof e.className){case"string":t=e.className;break;case"object":t=(e.className&&"baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:t=""}return xi(t)}function Ti(e){var t="";return Mi(e)&&!_i(e)&&e.childNodes&&e.childNodes.length&&mi(e.childNodes,(function(e){var r;(function(e){return!!e&&3===e.nodeType})(e)&&e.textContent&&(t+=null!==(r=function(e){return Jr(e)?null:qr(e).split(/(\s+)/).filter((e=>Li(e))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}(e.textContent))&&void 0!==r?r:"")})),qr(t)}var Ni=["a","button","form","input","select","textarea","label"];function Mi(e){for(var t=e;t.parentNode&&!Si(t,"body");t=t.parentNode){var r=Ai(t);if(Dr(r,"ph-sensitive")||Dr(r,"ph-no-capture"))return!1}if(Dr(Ai(e),"ph-include"))return!0;var n=e.type||"";if(Kr(n))switch(n.toLowerCase()){case"hidden":case"password":return!1}var i=e.name||e.id||"";if(Kr(i)){if(/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(i.replace(/[^a-zA-Z0-9]/g,"")))return!1}return!0}function _i(e){return!!(Si(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||Si(e,"select")||Si(e,"textarea")||"true"===e.getAttribute("contenteditable"))}var Ri="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",Fi=new RegExp("^(?:"+Ri+")$"),Ei=new RegExp(Ri),Zi="\\d{3}-?\\d{2}-?\\d{4}",Oi=new RegExp("^("+Zi+")$"),Bi=new RegExp("("+Zi+")");function Li(e,t){if(void 0===t&&(t=!0),Jr(e))return!1;if(Kr(e)){if(e=qr(e),(t?Fi:Ei).test((e||"").replace(/[- ]/g,"")))return!1;if((t?Oi:Bi).test(e))return!1}return!0}function Di(e){var t=Ti(e);return Li(t=(t+" "+qi(e)).trim())?t:""}function qi(e){var t="";return e&&e.childNodes&&e.childNodes.length&&mi(e.childNodes,(function(e){var r;if(e&&"span"===(null==(r=e.tagName)?void 0:r.toLowerCase()))try{var n=Ti(e);t=(t+" "+n).trim(),e.childNodes&&e.childNodes.length&&(t=(t+" "+qi(e)).trim())}catch(e){hi.error("[AutoCapture]",e)}})),t}function Vi(e){return function(e){var t=e.map((e=>{var t,n,i="";if(e.tag_name&&(i+=e.tag_name),e.attr_class)for(var o of(e.attr_class.sort(),e.attr_class))i+="."+o.replace(/"/g,"");var a=r({},e.text?{text:e.text}:{},{"nth-child":null!==(t=e.nth_child)&&void 0!==t?t:0,"nth-of-type":null!==(n=e.nth_of_type)&&void 0!==n?n:0},e.href?{href:e.href}:{},e.attr_id?{attr_id:e.attr_id}:{},e.attributes),s={};return gi(a).sort(((e,t)=>{var[r]=e,[n]=t;return r.localeCompare(n)})).forEach((e=>{var[t,r]=e;return s[Pi(t.toString())]=Pi(r.toString())})),i+=":",i+=gi(s).map((e=>{var[t,r]=e;return t+'="'+r+'"'})).join("")}));return t.join(";")}(function(e){return e.map((e=>{var t,r,n={text:null==(t=e.$el_text)?void 0:t.slice(0,400),tag_name:e.tag_name,href:null==(r=e.attr__href)?void 0:r.slice(0,2048),attr_class:Yi(e),attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return gi(e).filter((e=>{var[t]=e;return 0===t.indexOf("attr__")})).forEach((e=>{var[t,r]=e;return n.attributes[t]=r})),n}))}(e))}function Pi(e){return e.replace(/"|\\"/g,'\\"')}function Yi(e){var t=e.attr__class;return t?Gr(t)?t:xi(t):void 0}var Hi={initiatorTypes:["audio","beacon","body","css","early-hint","embed","fetch","frame","iframe","icon","image","img","input","link","navigation","object","ping","script","track","video","xmlhttprequest"],maskRequestFn:e=>e,recordHeaders:!1,recordBody:!1,recordInitialRequests:!1,recordPerformance:!1,performanceEntryTypeToObserve:["first-input","navigation","paint","resource"],payloadSizeLimitBytes:1e6,payloadHostDenyList:[".lr-ingest.io",".ingest.sentry.io",".clarity.ms","analytics.google.com","bam.nr-data.net"]},Gi=fi("[Recorder]"),Wi=e=>"navigation"===e.entryType,ji=e=>"resource"===e.entryType;function Xi(e,t,r){if(r.recordInitialRequests){var n=t.performance.getEntries().filter((e=>Wi(e)||ji(e)&&r.initiatorTypes.includes(e.initiatorType)));e({requests:n.flatMap((e=>eo({entry:e,method:void 0,status:void 0,networkRequest:{},isInitial:!0}))),isInitial:!0})}var i=new t.PerformanceObserver((t=>{var n=t.getEntries().filter((e=>Wi(e)||ji(e)&&r.initiatorTypes.includes(e.initiatorType)&&(e=>!r.recordBody&&!r.recordHeaders||"xmlhttprequest"!==e.initiatorType&&"fetch"!==e.initiatorType)(e)));e({requests:n.flatMap((e=>eo({entry:e,method:void 0,status:void 0,networkRequest:{}})))})})),o=PerformanceObserver.supportedEntryTypes.filter((e=>r.performanceEntryTypeToObserve.includes(e)));return i.observe({entryTypes:o}),()=>{i.disconnect()}}function zi(e,t){return!!t&&($r(t)||t[e])}function Ki(e){var{type:t,recordBody:r,headers:n,url:i}=e;function o(e){var t=Object.keys(n).find((e=>"content-type"===e.toLowerCase())),r=t&&n[t];return e.some((e=>null==r?void 0:r.includes(e)))}if(!r)return!1;if(function e(t){try{return"string"==typeof t?t.startsWith("blob:"):t instanceof URL?"blob:"===t.protocol:t instanceof Request&&e(t.url)}catch(e){return!1}}(i))return!1;if($r(r))return!0;if(Gr(r))return o(r);var a=r[t];return $r(a)?a:o(a)}function Ui(e,t,r,n,i,o){return Ji.apply(this,arguments)}function Ji(){return Ji=t((function*(e,t,r,n,i,o){if(void 0===o&&(o=0),o>10)return Gi.warn("Failed to get performance entry for request",{url:r,initiatorType:t}),null;var a=function(e,t){for(var r=e.length-1;r>=0;r-=1)if(t(e[r]))return e[r]}(e.performance.getEntriesByName(r),(e=>ji(e)&&e.initiatorType===t&&(zr(n)||e.startTime>=n)&&(zr(i)||e.startTime<=i)));return a||(yield new Promise((e=>setTimeout(e,50*o))),Ui(e,t,r,n,i,o+1))})),Ji.apply(this,arguments)}function Qi(e){var{body:t,options:r,url:n}=e;if(Jr(t))return null;var{hostname:i,isHostDenied:o}=Ii(n,r);if(o)return i+" is in deny list";if(Kr(t))return t;if(ci(t))return t.textContent;if(en(t))return wi(t);if(Xr(t))try{return JSON.stringify(t)}catch(e){return"[SessionReplay] Failed to stringify response object"}return"[SessionReplay] Cannot read body of type "+toString.call(t)}var $i=e=>!Ur(e)&&("navigation"===e.entryType||"resource"===e.entryType);function eo(e){var{entry:t,method:n,status:i,networkRequest:o,isInitial:a,start:s,end:u,url:l,initiatorType:c}=e;s=t?t.startTime:s,u=t?t.responseEnd:u;var d=Math.floor(Date.now()-performance.now()),h=Math.floor(d+(s||0)),f=[r({},t?t.toJSON():{name:l},{startTime:zr(s)?void 0:Math.round(s),endTime:zr(u)?void 0:Math.round(u),timeOrigin:d,timestamp:h,method:n,initiatorType:c||(t?t.initiatorType:void 0),status:i,requestHeaders:o.requestHeaders,requestBody:o.requestBody,responseHeaders:o.responseHeaders,responseBody:o.responseBody,isInitial:a})];if($i(t))for(var v of t.serverTiming||[])f.push({timeOrigin:d,timestamp:h,startTime:Math.round(t.startTime),name:v.name,duration:v.duration,entryType:"serverTiming"});return f}var to=["video/","audio/"];function ro(e){return new Promise(((t,r)=>{var n=setTimeout((()=>t("[SessionReplay] Timeout while trying to read body")),500);try{e.clone().text().then((e=>t(e)),(e=>r(e))).finally((()=>clearTimeout(n)))}catch(e){clearTimeout(n),t("[SessionReplay] Failed to read body")}}))}function no(){return no=t((function*(e){var{r:t,options:r,url:n}=e,{hostname:i,isHostDenied:o}=Ii(n,r);return o?Promise.resolve(i+" is in deny list"):ro(t)})),no.apply(this,arguments)}function io(){return io=t((function*(e){var{r:t,options:r,url:n}=e,i=function(e){var t,{r:r,options:n,url:i}=e;if("chunked"===r.headers.get("Transfer-Encoding"))return"Chunked Transfer-Encoding is not supported";var o=null==(t=r.headers.get("Content-Type"))?void 0:t.toLowerCase(),a=to.some((e=>null==o?void 0:o.startsWith(e)));if(o&&a)return"Content-Type "+o+" is not supported";var{hostname:s,isHostDenied:u}=Ii(i,n);return u?s+" is in deny list":null}({r:t,options:r,url:n});return Ur(i)?ro(t):Promise.resolve(i)})),io.apply(this,arguments)}function oo(e,r,n){if(!n.initiatorTypes.includes("fetch"))return()=>{};var i=zi("request",n.recordHeaders),o=zi("response",n.recordHeaders),a=Ci(r,"fetch",(a=>function(){var s=t((function*(t,s){var u,l,c,d=new Request(t,s),h={};try{var f={};d.headers.forEach(((e,t)=>{f[t]=e})),i&&(h.requestHeaders=f),Ki({type:"request",headers:f,url:t,recordBody:n.recordBody})&&(h.requestBody=yield function(e){return no.apply(this,arguments)}({r:d,options:n,url:t})),l=r.performance.now(),u=yield a(d),c=r.performance.now();var v={};return u.headers.forEach(((e,t)=>{v[t]=e})),o&&(h.responseHeaders=v),Ki({type:"response",headers:v,url:t,recordBody:n.recordBody})&&(h.responseBody=yield function(e){return io.apply(this,arguments)}({r:u,options:n,url:t})),u}finally{Ui(r,"fetch",d.url,l,c).then((t=>{var r,n=eo({entry:t,method:d.method,status:null==(r=u)?void 0:r.status,networkRequest:h,start:l,end:c,url:d.url,initiatorType:"fetch"});e({requests:n})})).catch((()=>{}))}}));return function(e,t){return s.apply(this,arguments)}}()));return()=>{a()}}var ao=null;function so(e,t,n){if(!("performance"in t))return()=>{};if(ao)return Gi.warn("Network observer already initialised, doing nothing"),()=>{};var i=n?Object.assign({},Hi,n):Hi,o=t=>{var n=[];t.requests.forEach((e=>{var t=i.maskRequestFn(e);t&&n.push(t)})),n.length>0&&e(r({},t,{requests:n}))},a=Xi(o,t,i),s=()=>{},u=()=>{};return(i.recordHeaders||i.recordBody)&&(s=function(e,t,r){if(!r.initiatorTypes.includes("xmlhttprequest"))return()=>{};var n=zi("request",r.recordHeaders),i=zi("response",r.recordHeaders),o=Ci(t.XMLHttpRequest.prototype,"open",(o=>function(a,s,u,l,c){void 0===u&&(u=!0);var d,h,f=this,v=new Request(s),p={},m={},y=f.setRequestHeader.bind(f);f.setRequestHeader=(e,t)=>(m[e]=t,y(e,t)),n&&(p.requestHeaders=m);var g=f.send.bind(f);f.send=e=>(Ki({type:"request",headers:m,url:s,recordBody:r.recordBody})&&(p.requestBody=Qi({body:e,options:r,url:s})),d=t.performance.now(),g(e));var b=()=>{f.removeEventListener("readystatechange",w),f.removeEventListener("error",b),f.removeEventListener("abort",b),f.removeEventListener("timeout",b)},w=()=>{if(f.readyState===f.DONE){b(),h=t.performance.now();var n={};f.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((e=>{var t=e.split(": "),r=t.shift(),i=t.join(": ");r&&(n[r]=i)})),i&&(p.responseHeaders=n),Ki({type:"response",headers:n,url:s,recordBody:r.recordBody})&&(p.responseBody=Qi({body:f.response,options:r,url:s})),Ui(t,"xmlhttprequest",v.url,d,h).then((t=>{var r=eo({entry:t,method:a,status:null==f?void 0:f.status,networkRequest:p,start:d,end:h,url:s.toString(),initiatorType:"xmlhttprequest"});e({requests:r})})).catch((()=>{}))}};f.addEventListener("readystatechange",w),f.addEventListener("error",b),f.addEventListener("abort",b),f.addEventListener("timeout",b),o.call(f,a,s.toString(),u,l,c)}));return()=>{o()}}(o,t,i),u=oo(o,t,i)),ao=()=>{a(),s(),u(),ao=null}}var uo=e=>({name:"rrweb/network@1",observer:so,options:e});ui.__PosthogExtensions__=ui.__PosthogExtensions__||{},ui.__PosthogExtensions__.rrwebPlugins={getRecordConsolePlugin:Lr,getRecordNetworkPlugin:uo},ui.__PosthogExtensions__.rrweb={record:Dt,version:"v2"},ui.rrweb={record:Dt,version:"v2"},ui.rrwebConsoleRecord={getRecordConsolePlugin:Lr},ui.getRecordNetworkPlugin=uo;var lo,co,ho,fo,vo,po,mo,yo,go={},bo=[],wo=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Co=Array.isArray;function Io(e,t){for(var r in t)e[r]=t[r];return e}function ko(e){var t=e.parentNode;t&&t.removeChild(e)}function So(e,t,r){var n,i,o,a={};for(o in t)"key"==o?n=t[o]:"ref"==o?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?lo.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===a[o]&&(a[o]=e.defaultProps[o]);return xo(e,a,n,i,null)}function xo(e,t,r,n,i){var o={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==i?++ho:i,__i:-1,__u:0};return null==i&&null!=co.vnode&&co.vnode(o),o}function Ao(e){return e.children}function To(e,t){this.props=e,this.context=t}function No(e,t){if(null==t)return e.__?No(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if(null!=(r=e.__k[t])&&null!=r.__e)return r.__e;return"function"==typeof e.type?No(e):null}function Mo(e){var t,r;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(r=e.__k[t])&&null!=r.__e){e.__e=e.__c.base=r.__e;break}return Mo(e)}}function _o(e){(!e.__d&&(e.__d=!0)&&fo.push(e)&&!Ro.__r++||vo!==co.debounceRendering)&&((vo=co.debounceRendering)||po)(Ro)}function Ro(){var e,t,r,n,i,o,a,s,u;for(fo.sort(mo);e=fo.shift();)e.__d&&(t=fo.length,n=void 0,o=(i=(r=e).__v).__e,s=[],u=[],(a=r.__P)&&((n=Io({},i)).__v=i.__v+1,co.vnode&&co.vnode(n),qo(a,n,i,r.__n,void 0!==a.ownerSVGElement,32&i.__u?[o]:null,s,null==o?No(i):o,!!(32&i.__u),u),n.__.__k[n.__i]=n,Vo(s,n,u),n.__e!=o&&Mo(n)),fo.length>t&&fo.sort(mo));Ro.__r=0}function Fo(e,t,r,n,i,o,a,s,u,l,c){var d,h,f,v,p,m=n&&n.__k||bo,y=t.length;for(r.__d=u,function(e,t,r){var n,i,o,a,s,u=t.length,l=r.length,c=l,d=0;for(e.__k=[],n=0;n<u;n++)null!=(i=e.__k[n]=null==(i=t[n])||"boolean"==typeof i||"function"==typeof i?null:"string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?xo(null,i,null,null,i):Co(i)?xo(Ao,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?xo(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=e,i.__b=e.__b+1,s=Zo(i,r,a=n+d,c),i.__i=s,o=null,-1!==s&&(c--,(o=r[s])&&(o.__u|=131072)),null==o||null===o.__v?(-1==s&&d--,"function"!=typeof i.type&&(i.__u|=65536)):s!==a&&(s===a+1?d++:s>a?c>u-a?d+=s-a:d--:d=s<a&&s==a-1?s-a:0,s!==n+d&&(i.__u|=65536))):(o=r[n])&&null==o.key&&o.__e&&(o.__e==e.__d&&(e.__d=No(o)),Yo(o,o,!1),r[n]=null,c--);if(c)for(n=0;n<l;n++)null!=(o=r[n])&&0==(131072&o.__u)&&(o.__e==e.__d&&(e.__d=No(o)),Yo(o,o))}(r,t,m),u=r.__d,d=0;d<y;d++)null!=(f=r.__k[d])&&"boolean"!=typeof f&&"function"!=typeof f&&(h=-1===f.__i?go:m[f.__i]||go,f.__i=d,qo(e,f,h,i,o,a,s,u,l,c),v=f.__e,f.ref&&h.ref!=f.ref&&(h.ref&&Po(h.ref,null,f),c.push(f.ref,f.__c||v,f)),null==p&&null!=v&&(p=v),65536&f.__u||h.__k===f.__k?u=Eo(f,u,e):"function"==typeof f.type&&void 0!==f.__d?u=f.__d:v&&(u=v.nextSibling),f.__d=void 0,f.__u&=-196609);r.__d=u,r.__e=p}function Eo(e,t,r){var n,i;if("function"==typeof e.type){for(n=e.__k,i=0;n&&i<n.length;i++)n[i]&&(n[i].__=e,t=Eo(n[i],t,r));return t}return e.__e!=t&&(r.insertBefore(e.__e,t||null),t=e.__e),t&&t.nextSibling}function Zo(e,t,r,n){var i=e.key,o=e.type,a=r-1,s=r+1,u=t[r];if(null===u||u&&i==u.key&&o===u.type)return r;if(n>(null!=u&&0==(131072&u.__u)?1:0))for(;a>=0||s<t.length;){if(a>=0){if((u=t[a])&&0==(131072&u.__u)&&i==u.key&&o===u.type)return a;a--}if(s<t.length){if((u=t[s])&&0==(131072&u.__u)&&i==u.key&&o===u.type)return s;s++}}return-1}function Oo(e,t,r){"-"===t[0]?e.setProperty(t,null==r?"":r):e[t]=null==r?"":"number"!=typeof r||wo.test(t)?r:r+"px"}function Bo(e,t,r,n,i){var o;e:if("style"===t)if("string"==typeof r)e.style.cssText=r;else{if("string"==typeof n&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||Oo(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||Oo(e.style,t,r[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/(PointerCapture)$|Capture$/,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=r,r?n?r.u=n.u:(r.u=Date.now(),e.addEventListener(t,o?Do:Lo,o)):e.removeEventListener(t,o?Do:Lo,o);else{if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&"rowSpan"!==t&&"colSpan"!==t&&"role"!==t&&t in e)try{e[t]=null==r?"":r;break e}catch(e){}"function"==typeof r||(null==r||!1===r&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,r))}}function Lo(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(co.event?co.event(e):e)}function Do(e){return this.l[e.type+!0](co.event?co.event(e):e)}function qo(e,t,r,n,i,o,a,s,u,l){var c,d,h,f,v,p,m,y,g,b,w,$,C,I,k,S=t.type;if(void 0!==t.constructor)return null;128&r.__u&&(u=!!(32&r.__u),o=[s=t.__e=r.__e]),(c=co.__b)&&c(t);e:if("function"==typeof S)try{if(y=t.props,g=(c=S.contextType)&&n[c.__c],b=c?g?g.props.value:c.__:n,r.__c?m=(d=t.__c=r.__c).__=d.__E:("prototype"in S&&S.prototype.render?t.__c=d=new S(y,b):(t.__c=d=new To(y,b),d.constructor=S,d.render=Ho),g&&g.sub(d),d.props=y,d.state||(d.state={}),d.context=b,d.__n=n,h=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=S.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=Io({},d.__s)),Io(d.__s,S.getDerivedStateFromProps(y,d.__s))),f=d.props,v=d.state,d.__v=t,h)null==S.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==S.getDerivedStateFromProps&&y!==f&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(y,b),!d.__e&&(null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(y,d.__s,b)||t.__v===r.__v)){for(t.__v!==r.__v&&(d.props=y,d.state=d.__s,d.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach((function(e){e&&(e.__=t)})),w=0;w<d._sb.length;w++)d.__h.push(d._sb[w]);d._sb=[],d.__h.length&&a.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(y,d.__s,b),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(f,v,p)}))}if(d.context=b,d.props=y,d.__P=e,d.__e=!1,$=co.__r,C=0,"prototype"in S&&S.prototype.render){for(d.state=d.__s,d.__d=!1,$&&$(t),c=d.render(d.props,d.state,d.context),I=0;I<d._sb.length;I++)d.__h.push(d._sb[I]);d._sb=[]}else do{d.__d=!1,$&&$(t),c=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++C<25);d.state=d.__s,null!=d.getChildContext&&(n=Io(Io({},n),d.getChildContext())),h||null==d.getSnapshotBeforeUpdate||(p=d.getSnapshotBeforeUpdate(f,v)),Fo(e,Co(k=null!=c&&c.type===Ao&&null==c.key?c.props.children:c)?k:[k],t,r,n,i,o,a,s,u,l),d.base=t.__e,t.__u&=-161,d.__h.length&&a.push(d),m&&(d.__E=d.__=null)}catch(e){t.__v=null,u||null!=o?(t.__e=s,t.__u|=u?160:32,o[o.indexOf(s)]=null):(t.__e=r.__e,t.__k=r.__k),co.__e(e,t,r)}else null==o&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=function(e,t,r,n,i,o,a,s,u){var l,c,d,h,f,v,p,m=r.props,y=t.props,g=t.type;if("svg"===g&&(i=!0),null!=o)for(l=0;l<o.length;l++)if((f=o[l])&&"setAttribute"in f==!!g&&(g?f.localName===g:3===f.nodeType)){e=f,o[l]=null;break}if(null==e){if(null===g)return document.createTextNode(y);e=i?document.createElementNS("http://www.w3.org/2000/svg",g):document.createElement(g,y.is&&y),o=null,s=!1}if(null===g)m===y||s&&e.data===y||(e.data=y);else{if(o=o&&lo.call(e.childNodes),m=r.props||go,!s&&null!=o)for(m={},l=0;l<e.attributes.length;l++)m[(f=e.attributes[l]).name]=f.value;for(l in m)f=m[l],"children"==l||("dangerouslySetInnerHTML"==l?d=f:"key"===l||l in y||Bo(e,l,null,f,i));for(l in y)f=y[l],"children"==l?h=f:"dangerouslySetInnerHTML"==l?c=f:"value"==l?v=f:"checked"==l?p=f:"key"===l||s&&"function"!=typeof f||m[l]===f||Bo(e,l,f,m[l],i);if(c)s||d&&(c.__html===d.__html||c.__html===e.innerHTML)||(e.innerHTML=c.__html),t.__k=[];else if(d&&(e.innerHTML=""),Fo(e,Co(h)?h:[h],t,r,n,i&&"foreignObject"!==g,o,a,o?o[0]:r.__k&&No(r,0),s,u),null!=o)for(l=o.length;l--;)null!=o[l]&&ko(o[l]);s||(l="value",void 0!==v&&(v!==e[l]||"progress"===g&&!v||"option"===g&&v!==m[l])&&Bo(e,l,v,m[l],!1),l="checked",void 0!==p&&p!==e[l]&&Bo(e,l,p,m[l],!1))}return e}(r.__e,t,r,n,i,o,a,u,l);(c=co.diffed)&&c(t)}function Vo(e,t,r){t.__d=void 0;for(var n=0;n<r.length;n++)Po(r[n],r[++n],r[++n]);co.__c&&co.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){co.__e(e,t.__v)}}))}function Po(e,t,r){try{"function"==typeof e?e(t):e.current=t}catch(e){co.__e(e,r)}}function Yo(e,t,r){var n,i;if(co.unmount&&co.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||Po(n,null,t)),null!=(n=e.__c)){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(e){co.__e(e,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(i=0;i<n.length;i++)n[i]&&Yo(n[i],t,r||"function"!=typeof e.type);r||null==e.__e||ko(e.__e),e.__=e.__e=e.__d=void 0}function Ho(e,t,r){return this.constructor(e,r)}function Go(e,t,r){var n,i,o;co.__&&co.__(e,t),n=!1?null:t.__k,i=[],o=[],qo(t,e=t.__k=So(Ao,null,[e]),n||go,go,void 0!==t.ownerSVGElement,n?null:t.firstChild?lo.call(t.childNodes):null,i,n?n.__e:t.firstChild,false,o),Vo(i,e,o)}function Wo(e,t,r){var n,i,o,a,s=Io({},e.props);for(o in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)"key"==o?n=t[o]:"ref"==o?i=t[o]:s[o]=void 0===t[o]&&void 0!==a?a[o]:t[o];return arguments.length>2&&(s.children=arguments.length>3?lo.call(arguments,2):r),xo(e.type,s,n||e.key,i||e.ref,null)}lo=bo.slice,co={__e:function(e,t,r,n){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,n||{}),a=i.__d),a)return i.__E=i}catch(t){e=t}throw e}},ho=0,To.prototype.setState=function(e,t){var r;r=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Io({},this.state),"function"==typeof e&&(e=e(Io({},r),this.props)),e&&Io(r,e),null!=e&&this.__v&&(t&&this._sb.push(t),_o(this))},To.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),_o(this))},To.prototype.render=Ao,fo=[],po="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,mo=function(e,t){return e.__v.__b-t.__v.__b},Ro.__r=0,yo=0;var jo,Xo,zo,Ko,Uo=0,Jo=[],Qo=[],$o=co.__b,ea=co.__r,ta=co.diffed,ra=co.__c,na=co.unmount;function ia(e,t){co.__h&&co.__h(Xo,e,Uo||t),Uo=0;var r=Xo.__H||(Xo.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:Qo}),r.__[e]}function oa(e){return Uo=1,function(e,t,r){var n=ia(jo++,2);if(n.t=e,!n.__c&&(n.__=[ma(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=Xo,!Xo.u)){var i=function(e,t,r){if(!n.__c.__H)return!0;var i=n.__c.__H.__.filter((function(e){return e.__c}));if(i.every((function(e){return!e.__N})))return!o||o.call(this,e,t,r);var a=!1;return i.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}})),!(!a&&n.__c.props===e)&&(!o||o.call(this,e,t,r))};Xo.u=!0;var o=Xo.shouldComponentUpdate,a=Xo.componentWillUpdate;Xo.componentWillUpdate=function(e,t,r){if(this.__e){var n=o;o=void 0,i(e,t,r),o=n}a&&a.call(this,e,t,r)},Xo.shouldComponentUpdate=i}return n.__N||n.__}(ma,e)}function aa(e,t){var r=ia(jo++,3);!co.__s&&pa(r.__H,t)&&(r.__=e,r.i=t,Xo.__H.__h.push(r))}function sa(e){return Uo=5,ua((function(){return{current:e}}),[])}function ua(e,t){var r=ia(jo++,7);return pa(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function la(e){var t=Xo.context[e.__c],r=ia(jo++,9);return r.c=e,t?(null==r.__&&(r.__=!0,t.sub(Xo)),t.props.value):e.__}function ca(){for(var e;e=Jo.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(fa),e.__H.__h.forEach(va),e.__H.__h=[]}catch(t){e.__H.__h=[],co.__e(t,e.__v)}}co.__b=function(e){Xo=null,$o&&$o(e)},co.__r=function(e){ea&&ea(e),jo=0;var t=(Xo=e.__c).__H;t&&(zo===Xo?(t.__h=[],Xo.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=Qo,e.__N=e.i=void 0}))):(t.__h.forEach(fa),t.__h.forEach(va),t.__h=[],jo=0)),zo=Xo},co.diffed=function(e){ta&&ta(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==Jo.push(t)&&Ko===co.requestAnimationFrame||((Ko=co.requestAnimationFrame)||ha)(ca)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==Qo&&(e.__=e.__V),e.i=void 0,e.__V=Qo}))),zo=Xo=null},co.__c=function(e,t){t.some((function(e){try{e.__h.forEach(fa),e.__h=e.__h.filter((function(e){return!e.__||va(e)}))}catch(r){t.some((function(e){e.__h&&(e.__h=[])})),t=[],co.__e(r,e.__v)}})),ra&&ra(e,t)},co.unmount=function(e){na&&na(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach((function(e){try{fa(e)}catch(e){t=e}})),r.__H=void 0,t&&co.__e(t,r.__v))};var da="function"==typeof requestAnimationFrame;function ha(e){var t,r=function(){clearTimeout(n),da&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);da&&(t=requestAnimationFrame(r))}function fa(e){var t=Xo,r=e.__c;"function"==typeof r&&(e.__c=void 0,r()),Xo=t}function va(e){var t=Xo;e.__c=e.__(),Xo=t}function pa(e,t){return!e||e.length!==t.length||t.some((function(t,r){return t!==e[r]}))}function ma(e,t){return"function"==typeof t?t(e):t}var ya=function(e){return e.Button="button",e.Tab="tab",e.Selector="selector",e}({}),ga=function(e){return e.TopLeft="top_left",e.TopRight="top_right",e.TopCenter="top_center",e.MiddleLeft="middle_left",e.MiddleRight="middle_right",e.MiddleCenter="middle_center",e.Left="left",e.Center="center",e.Right="right",e.NextToTrigger="next_to_trigger",e}({}),ba=function(e){return e.Top="top",e.Left="left",e.Right="right",e.Bottom="bottom",e}({}),wa=function(e){return e.Popover="popover",e.API="api",e.Widget="widget",e.ExternalSurvey="external_survey",e}({}),Ca=function(e){return e.Open="open",e.MultipleChoice="multiple_choice",e.SingleChoice="single_choice",e.Rating="rating",e.Link="link",e}({}),Ia=function(e){return e.NextQuestion="next_question",e.End="end",e.ResponseBased="response_based",e.SpecificQuestion="specific_question",e}({}),ka=function(e){return e.Once="once",e.Recurring="recurring",e.Always="always",e}({}),Sa=function(e){return e.SHOWN="survey shown",e.DISMISSED="survey dismissed",e.SENT="survey sent",e.ABANDONED="survey abandoned",e}({}),xa=function(e){return e.SURVEY_ID="$survey_id",e.SURVEY_NAME="$survey_name",e.SURVEY_RESPONSE="$survey_response",e.SURVEY_ITERATION="$survey_iteration",e.SURVEY_ITERATION_START_DATE="$survey_iteration_start_date",e.SURVEY_PARTIALLY_COMPLETED="$survey_partially_completed",e.SURVEY_SUBMISSION_ID="$survey_submission_id",e.SURVEY_QUESTIONS="$survey_questions",e.SURVEY_COMPLETED="$survey_completed",e.PRODUCT_TOUR_ID="$product_tour_id",e.SURVEY_LAST_SEEN_DATE="$survey_last_seen_date",e}({}),Aa=fi("[Surveys]");var Ta="inProgressSurvey_",Na=(e,t)=>{var r="$survey_"+t+"/"+e.id;return e.current_iteration&&e.current_iteration>0&&(r="$survey_"+t+"/"+e.id+"/"+e.current_iteration),r},Ma=(e,t)=>{var r=""+e+t.id;return t.current_iteration&&t.current_iteration>0&&(r=""+e+t.id+"_"+t.current_iteration),r},_a=e=>Ma("seenSurvey_",e),Ra=e=>{localStorage.getItem(_a(e))||localStorage.setItem(_a(e),"true")},Fa=[wa.Popover,wa.Widget,wa.API];Math.trunc||(Math.trunc=function(e){return e<0?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return Qr(e)&&isFinite(e)&&Math.floor(e)===e});var Ea="0123456789abcdef";class Za{constructor(e){if(this.bytes=e,16!==e.length)throw new TypeError("not 128-bit length")}static fromFieldsV7(e,t,r,n){if(!Number.isInteger(e)||!Number.isInteger(t)||!Number.isInteger(r)||!Number.isInteger(n)||e<0||t<0||r<0||n<0||e>0xffffffffffff||t>4095||r>1073741823||n>4294967295)throw new RangeError("invalid field value");var i=new Uint8Array(16);return i[0]=e/Math.pow(2,40),i[1]=e/Math.pow(2,32),i[2]=e/Math.pow(2,24),i[3]=e/Math.pow(2,16),i[4]=e/Math.pow(2,8),i[5]=e,i[6]=112|t>>>8,i[7]=t,i[8]=128|r>>>24,i[9]=r>>>16,i[10]=r>>>8,i[11]=r,i[12]=n>>>24,i[13]=n>>>16,i[14]=n>>>8,i[15]=n,new Za(i)}toString(){for(var e="",t=0;t<this.bytes.length;t++)e=e+Ea.charAt(this.bytes[t]>>>4)+Ea.charAt(15&this.bytes[t]),3!==t&&5!==t&&7!==t&&9!==t||(e+="-");if(36!==e.length)throw new Error("Invalid UUIDv7 was generated");return e}clone(){return new Za(this.bytes.slice(0))}equals(e){return 0===this.compareTo(e)}compareTo(e){for(var t=0;t<16;t++){var r=this.bytes[t]-e.bytes[t];if(0!==r)return Math.sign(r)}return 0}}class Oa{constructor(){this.h=0,this.p=0,this.m=new Da}generate(){var e=this.generateOrAbort();if(zr(e)){this.h=0;var t=this.generateOrAbort();if(zr(t))throw new Error("Could not generate UUID after timestamp reset");return t}return e}generateOrAbort(){var e=Date.now();if(e>this.h)this.h=e,this.C();else{if(!(e+1e4>this.h))return;this.p++,this.p>4398046511103&&(this.h++,this.C())}return Za.fromFieldsV7(this.h,Math.trunc(this.p/Math.pow(2,30)),this.p&Math.pow(2,30)-1,this.m.nextUint32())}C(){this.p=1024*this.m.nextUint32()+(1023&this.m.nextUint32())}}var Ba,La=e=>{if("undefined"!=typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var t=0;t<e.length;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};ri&&!zr(ri.crypto)&&crypto.getRandomValues&&(La=e=>crypto.getRandomValues(e));class Da{constructor(){this.I=new Uint32Array(8),this.k=1/0}nextUint32(){return this.k>=this.I.length&&(La(this.I),this.k=0),this.I[this.k++]}}var qa=()=>Va().toString(),Va=()=>(Ba||(Ba=new Oa)).generate();null!=oi&&oi.sendBeacon;var Pa=function(e,t){if(!function(e){try{new RegExp(e)}catch(e){return!1}return!0}(t))return!1;try{return new RegExp(t).test(e)}catch(e){return!1}},Ya={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=>Pa(t,e))))),not_regex:(e,t)=>t.every((t=>e.every((e=>!Pa(t,e))))),icontains:(e,t)=>t.map(Ha).some((t=>e.map(Ha).some((e=>t.includes(e))))),not_icontains:(e,t)=>t.map(Ha).every((t=>e.map(Ha).every((e=>!t.includes(e))))),gt:(e,t)=>t.some((t=>{var r=parseFloat(t);return!isNaN(r)&&e.some((e=>r>parseFloat(e)))})),lt:(e,t)=>t.some((t=>{var r=parseFloat(t);return!isNaN(r)&&e.some((e=>r<parseFloat(e)))}))},Ha=e=>e.toLowerCase(),Ga=fi("[Stylesheet Loader]"),Wa=ri,ja=ai;function Xa(e){return"$survey_response_"+e}var za="#020617",Ka={fontFamily:"inherit",backgroundColor:"#eeeded",submitButtonColor:"black",submitButtonTextColor:"white",ratingButtonColor:"white",ratingButtonActiveColor:"black",borderColor:"#c9c6c6",placeholder:"Start typing...",whiteLabel:!1,displayThankYouMessage:!0,thankYouMessageHeader:"Thank you for your feedback!",position:ga.Right,widgetType:ya.Tab,widgetLabel:"Feedback",widgetColor:"black",zIndex:"2147483647",disabledButtonOpacity:"0.6",maxWidth:"300px",textSubtleColor:"#939393",boxPadding:"20px 24px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",borderRadius:"10px",shuffleQuestions:!1,surveyPopupDelaySeconds:void 0,outlineColor:"rgba(59, 130, 246, 0.8)",inputBackground:"white",inputTextColor:za,scrollbarThumbColor:"var(--ph-survey-border-color)",scrollbarTrackColor:"var(--ph-survey-background-color)"};function Ua(e){if(e.startsWith("#")){var 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 Ja(e){var t;void 0===e&&(e=Ka.backgroundColor),"#"===e[0]&&(t=Ua(e)),e.startsWith("rgb")&&(t=e);var r={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(r&&(t=Ua(r)),!t)return za;var n=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(n){var i=parseInt(n[1]),o=parseInt(n[2]),a=parseInt(n[3]);return Math.sqrt(i*i*.299+o*o*.587+a*a*.114)>127.5?za:"white"}return za}function Qa(e){var t=((e,t,r)=>{var n,i=e.createElement("style");return i.innerText=t,null!=r&&null!=(n=r.config)&&n.prepare_external_dependency_stylesheet&&(i=r.config.prepare_external_dependency_stylesheet(i)),i||(Ga.error("prepare_external_dependency_stylesheet returned null"),null)})(ja,':host{--ph-survey-font-family:-apple-system,BlinkMacSystemFont,"Inter","Segoe UI","Roboto",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--ph-survey-box-padding:20px 24px;--ph-survey-max-width:300px;--ph-survey-z-index:2147483647;--ph-survey-border-color:#dcdcdc;--ph-survey-border-bottom:1.5px solid var(--ph-survey-border-color);--ph-survey-border-radius:10px;--ph-survey-background-color:#eeeded;--ph-survey-box-shadow:0 4px 12px rgba(0,0,0,.15);--ph-survey-submit-button-color:#000;--ph-survey-submit-button-text-color:#fff;--ph-survey-rating-bg-color:#fff;--ph-survey-rating-text-color:#020617;--ph-survey-rating-active-bg-color:#000;--ph-survey-rating-active-text-color:#fff;--ph-survey-text-primary-color:#020617;--ph-survey-text-subtle-color:#939393;--ph-widget-color:#e0a045;--ph-widget-text-color:#fff;--ph-survey-scrollbar-thumb-color:var(--ph-survey-border-color);--ph-survey-scrollbar-track-color:var(--ph-survey-background-color);--ph-survey-outline-color:rgba(59,130,246,.8);--ph-survey-input-background:#fff;--ph-survey-input-text-color:#020617;--ph-survey-disabled-button-opacity:0.6}.ph-survey{bottom:0;height:fit-content;margin:0;max-width:85%;min-width:300px;position:fixed;width:var(--ph-survey-max-width);z-index:var(--ph-survey-z-index)}.ph-survey h3,.ph-survey p{margin:0}.ph-survey *{box-sizing:border-box;color:var(--ph-survey-text-primary-color);font-family:var(--ph-survey-font-family)}.ph-survey .multiple-choice-options label,.ph-survey input[type=text],.ph-survey textarea{background:var(--ph-survey-input-background);border:1.5px solid var(--ph-survey-border-color);border-radius:4px;color:var(--ph-survey-input-text-color);padding:10px;transition:border-color .2s ease-out,box-shadow .2s ease-out,transform .15s ease-out}.ph-survey input[type=text],.ph-survey textarea{transition:border-color .2s ease-out,box-shadow .2s ease-out,transform .15s ease-out}.ph-survey input{margin:0}.ph-survey .form-submit:focus,.ph-survey .form-submit:focus-visible,.ph-survey input[type=checkbox]:focus,.ph-survey input[type=checkbox]:focus-visible,.ph-survey input[type=radio]:focus,.ph-survey input[type=radio]:focus-visible,.ph-survey input[type=text]:focus,.ph-survey input[type=text]:focus-visible,.ph-survey textarea:focus,.ph-survey textarea:focus-visible{border-color:var(--ph-survey-rating-active-bg-color);outline:1.5px solid var(--ph-survey-outline-color);outline-offset:2px}.ph-survey button:focus:not(:focus-visible),.ph-survey input[type=checkbox]:focus:not(:focus-visible),.ph-survey input[type=radio]:focus:not(:focus-visible),.ph-survey input[type=text]:focus:not(:focus-visible),.ph-survey textarea:focus:not(:focus-visible){outline:none}.ph-survey input[type=text]:hover:not(:focus),.ph-survey textarea:hover:not(:focus){border-color:var(--ph-survey-rating-active-bg-color)}@media (max-width:768px){.ph-survey input[type=text],.ph-survey textarea{font-size:1rem}}.ph-survey .form-cancel,.ph-survey .multiple-choice-options label,.ph-survey .rating-options-number,.ph-survey input[type=checkbox],.ph-survey input[type=radio]{border:1.5px solid var(--ph-survey-border-color)}.ph-survey .footer-branding,.ph-survey .form-cancel,.ph-survey .form-submit,.ph-survey .ratings-emoji,.ph-survey .ratings-number,.ph-survey input[type=checkbox],.ph-survey input[type=radio],.ph-survey label{transition:all .2s ease-out}@media (prefers-reduced-motion:no-preference){.ph-survey button:active,.ph-survey input[type=checkbox]:active,.ph-survey input[type=radio]:active,.ph-survey label:active{transition-duration:.1s}}.ph-survey-widget-tab{background:var(--ph-widget-color);border:none;border-radius:3px 3px 0 0;color:var(--ph-widget-text-color);cursor:pointer;padding:10px 12px;position:fixed;text-align:center;transition:padding .2s ease-out;z-index:var(--ph-survey-z-index)}.ph-survey-widget-tab:hover:not(.widget-tab-top){padding-bottom:16px}.ph-survey-widget-tab.widget-tab-top{border-radius:0 0 3px 3px}.ph-survey-widget-tab.widget-tab-top:hover{padding-top:16px}@keyframes ph-survey-fade-in{0%{opacity:0}to{opacity:1}}.survey-box{gap:16px}.bottom-section,.survey-box{display:flex;flex-direction:column}.bottom-section{gap:8px}.thank-you-message-header~.bottom-section{padding-top:16px}.question-container,.thank-you-message{display:flex;flex-direction:column;gap:8px}.survey-question{font-size:14px;font-weight:500}.survey-question-description{font-size:13px;opacity:.8;padding-top:4px}.survey-question-description,.thank-you-message-body{word-wrap:break-word;overflow-wrap:break-word}:is(.survey-question-description,.thank-you-message-body) embed,:is(.survey-question-description,.thank-you-message-body) iframe,:is(.survey-question-description,.thank-you-message-body) img,:is(.survey-question-description,.thank-you-message-body) object,:is(.survey-question-description,.thank-you-message-body) video{height:auto;max-width:100%}:is(.survey-question-description,.thank-you-message-body) svg{height:auto;max-width:100%}.question-textarea-wrapper{display:flex;flex-direction:column}.survey-form{animation:ph-survey-fade-in .3s ease-out forwards}.survey-form,.thank-you-message{background:var(--ph-survey-background-color);border:1.5px solid var(--ph-survey-border-color);border-bottom:var(--ph-survey-border-bottom);border-radius:var(--ph-survey-border-radius);box-shadow:var(--ph-survey-box-shadow);margin:0;padding:var(--ph-survey-box-padding);position:relative;text-align:left;width:100%;z-index:var(--ph-survey-z-index)}.survey-form input[type=text],.survey-form textarea{min-width:100%}:is(.survey-form textarea):focus,:is(.survey-form textarea):focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.08)}:is(.survey-form textarea):focus:not(:focus-visible){box-shadow:none}.survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) .multiple-choice-options,.survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) textarea{margin-top:0}.multiple-choice-options{border:none;display:flex;flex-direction:column;font-size:14px;gap:8px;margin:0;padding:1px 0}.multiple-choice-options .response-choice,.multiple-choice-options label{align-items:center;color:inherit;display:flex;gap:8px}.multiple-choice-options label{cursor:pointer;font-size:13px}:is(.multiple-choice-options label):hover:not(:has(input:checked)){border-color:var(--ph-survey-text-subtle-color);box-shadow:0 2px 8px rgba(0,0,0,.08)}:is(.multiple-choice-options label):has(input:checked){border-color:var(--ph-survey-rating-active-bg-color);box-shadow:0 1px 4px rgba(0,0,0,.05)}.choice-option-open:is(.multiple-choice-options label){flex-wrap:wrap}:is(.multiple-choice-options label) span{color:inherit}.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]{appearance:none;-webkit-appearance:none;-moz-appearance:none;background:var(--ph-survey-input-background);border-radius:3px;cursor:pointer;flex-shrink:0;height:1rem;position:relative;transition:all .2s cubic-bezier(.4,0,.2,1),transform .15s ease-out;width:1rem;z-index:1}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):focus{transform:scale(1.05)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):hover{border-color:var(--ph-survey-rating-active-bg-color);transform:scale(1.05)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):active{transform:scale(.95)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):checked{background:var(--ph-survey-rating-active-bg-color);border-color:var(--ph-survey-rating-active-bg-color);transform:scale(1)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):checked:hover{transform:scale(1.05)}.multiple-choice-options input[type=checkbox]:checked:after{animation:ph-survey-checkmark-reveal .2s ease-out .1s forwards;border:solid var(--ph-survey-rating-active-text-color);border-width:0 2px 2px 0;height:8px;left:4px;transform:rotate(45deg) scale(0);width:4px}.multiple-choice-options input[type=radio]:checked:after{animation:ph-survey-radio-reveal .15s ease-out .05s forwards;background:var(--ph-survey-rating-active-text-color);border-radius:50%;height:6px;left:5px;top:5px;transform:scale(0);width:6px}.multiple-choice-options input[type=checkbox]:checked:after,.multiple-choice-options input[type=radio]:checked:after{box-sizing:content-box;content:"";position:absolute}.multiple-choice-options input[type=radio]{border-radius:50%}.multiple-choice-options input[type=radio]:checked{border:none}:is(.multiple-choice-options input[type=checkbox]:checked,.multiple-choice-options input[type=radio]:checked)~*{font-weight:700}:is(:is(.multiple-choice-options .choice-option-open) input[type=text])::placeholder{color:var(--ph-survey-text-subtle-color);font-weight:400}.rating-options-emoji{display:flex;justify-content:space-between}.ratings-emoji{background-color:transparent;border:none;font-size:16px;opacity:.5;padding:0}.ratings-emoji:hover{cursor:pointer;opacity:1;transform:scale(1.15)}.ratings-emoji.rating-active{opacity:1}.ratings-emoji svg{fill:var(--ph-survey-text-primary-color);transition:fill .2s ease-out}.rating-options-number{border-radius:6px;display:grid;grid-auto-columns:1fr;grid-auto-flow:column;overflow:hidden}.rating-options-number .ratings-number{border:none;border-right:1px solid var(--ph-survey-border-color);color:var(--ph-survey-rating-text-color);cursor:pointer;font-weight:700;text-align:center}:is(.rating-options-number .ratings-number):last-of-type{border-right:0}.rating-active:is(.rating-options-number .ratings-number){background:var(--ph-survey-rating-active-bg-color);color:var(--ph-survey-rating-active-text-color)}.ratings-number{background-color:var(--ph-survey-rating-bg-color);border:none;padding:8px 0}.ratings-number .rating-active{background-color:var(--ph-survey-rating-active-bg-color)}.ratings-number:hover{cursor:pointer}.rating-text{display:flex;flex-direction:row;font-size:11px;justify-content:space-between;opacity:.7}.form-submit{background:var(--ph-survey-submit-button-color);border:none;border-radius:6px;box-shadow:0 2px 0 rgba(0,0,0,.045);color:var(--ph-survey-submit-button-text-color);cursor:pointer;font-weight:700;min-width:100%;padding:12px;text-align:center;user-select:none}.form-submit:not([disabled]):hover{box-shadow:0 4px 8px rgba(0,0,0,.1);transform:scale(1.02)}.form-submit:not([disabled]):active{box-shadow:0 1px 2px rgba(0,0,0,.05);transform:scale(.98)}.form-submit[disabled]{cursor:not-allowed;opacity:var(--ph-survey-disabled-button-opacity)}.form-cancel{background:#fff;border-radius:100%;cursor:pointer;line-height:0;padding:12px;position:absolute;right:0;top:0;transform:translate(50%,-50%)}.form-cancel:hover{opacity:.7;transform:translate(50%,-50%) scale(1.1)}.footer-branding{align-items:center;display:flex;font-size:11px;font-weight:500;gap:4px;justify-content:center;opacity:.6;text-decoration:none}.footer-branding:hover{opacity:1}.footer-branding a{text-decoration:none}.thank-you-message{text-align:center}.thank-you-message-header{margin:10px 0 0}.thank-you-message-body{font-size:14px;opacity:.8}.limit-height{max-height:256px;overflow-x:hidden;overflow-y:auto;scrollbar-color:var(--ph-survey-scrollbar-thumb-color) var(--ph-survey-scrollbar-track-color);scrollbar-width:thin}.limit-height::-webkit-scrollbar{width:8px}.limit-height::-webkit-scrollbar-track{background:var(--ph-survey-scrollbar-track-color);border-radius:4px}.limit-height::-webkit-scrollbar-thumb{background-color:var(--ph-survey-scrollbar-thumb-color);border:2px solid var(--ph-survey-scrollbar-track-color);border-radius:4px}:is(.limit-height::-webkit-scrollbar-thumb):hover{background-color:var(--ph-survey-text-subtle-color)}.sr-only{clip:rect(0,0,0,0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}@media (prefers-reduced-motion:reduce){.ph-survey *{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}@keyframes ph-survey-checkmark-reveal{0%{opacity:0;transform:rotate(45deg) scale(0)}50%{opacity:1;transform:rotate(45deg) scale(1.2)}to{opacity:1;transform:rotate(45deg) scale(1)}}@keyframes ph-survey-radio-reveal{0%{opacity:0;transform:scale(0)}50%{opacity:1;transform:scale(1.3)}to{opacity:1;transform:scale(1)}}',e);return null==t||t.setAttribute("data-ph-survey-style","true"),t}var $a=(e,t,n)=>{var i=ws(e),o=ja.querySelector("."+i);if(o&&o.shadowRoot)return{shadow:o.shadowRoot,isNewlyCreated:!1};var a=ja.createElement("div");((e,t,n)=>{var i=r({},Ka,n),o=e.style,a=![ga.Center,ga.Left,ga.Right].includes(i.position)||t===wa.Widget&&(null==n?void 0:n.widgetType)===ya.Tab;o.setProperty("--ph-survey-font-family",function(e){if("inherit"===e)return"inherit";var t='BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"';return e?e+", "+t:"-apple-system, "+t}(i.fontFamily)),o.setProperty("--ph-survey-box-padding",i.boxPadding),o.setProperty("--ph-survey-max-width",i.maxWidth),o.setProperty("--ph-survey-z-index",i.zIndex),o.setProperty("--ph-survey-border-color",i.borderColor),a?(o.setProperty("--ph-survey-border-radius",i.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",i.borderRadius+" "+i.borderRadius+" 0 0")),o.setProperty("--ph-survey-background-color",i.backgroundColor),o.setProperty("--ph-survey-box-shadow",i.boxShadow),o.setProperty("--ph-survey-disabled-button-opacity",i.disabledButtonOpacity),o.setProperty("--ph-survey-submit-button-color",i.submitButtonColor),o.setProperty("--ph-survey-submit-button-text-color",(null==n?void 0:n.submitButtonTextColor)||Ja(i.submitButtonColor)),o.setProperty("--ph-survey-rating-bg-color",i.ratingButtonColor),o.setProperty("--ph-survey-rating-active-bg-color",i.ratingButtonActiveColor),o.setProperty("--ph-survey-rating-active-text-color",Ja(i.ratingButtonActiveColor)),o.setProperty("--ph-survey-text-primary-color",(null==n?void 0:n.textColor)||Ja(i.backgroundColor)),o.setProperty("--ph-survey-text-subtle-color",i.textSubtleColor),o.setProperty("--ph-widget-color",i.widgetColor),o.setProperty("--ph-widget-text-color",Ja(i.widgetColor)),o.setProperty("--ph-widget-z-index",i.zIndex);var s=(null==n?void 0:n.inputBackground)||(null==n?void 0:n.inputBackgroundColor),u=s||i.inputBackground;s||"white"!==i.backgroundColor||(u="#f8f8f8"),o.setProperty("--ph-survey-input-background",u);var l=(null==n?void 0:n.inputTextColor)||Ja(u);o.setProperty("--ph-survey-input-text-color",l),o.setProperty("--ph-survey-rating-text-color",l),o.setProperty("--ph-survey-scrollbar-thumb-color",i.scrollbarThumbColor),o.setProperty("--ph-survey-scrollbar-track-color",i.scrollbarTrackColor),o.setProperty("--ph-survey-outline-color",i.outlineColor)})(a,e.type,e.appearance),a.className=i;var s=a.attachShadow({mode:"open"}),u=Qa(t);if(u){var l=s.querySelector("style");l&&s.removeChild(l),s.appendChild(u)}return ja.body.appendChild(a),{shadow:s,isNewlyCreated:!0}},es=(e,t)=>{if(!t)return null;var r=e[Xa(t)];return Gr(r)?[...r]:r},ts=e=>{var{responses:t,survey:n,surveySubmissionId:i,posthog:o,isSurveyCompleted:a}=e;o?(Ra(n),o.capture(Sa.SENT,r({[xa.SURVEY_NAME]:n.name,[xa.SURVEY_ID]:n.id,[xa.SURVEY_ITERATION]:n.current_iteration,[xa.SURVEY_ITERATION_START_DATE]:n.current_iteration_start_date,[xa.SURVEY_QUESTIONS]:n.questions.map((e=>({id:e.id,question:e.question,response:es(t,e.id)}))),[xa.SURVEY_SUBMISSION_ID]:i,[xa.SURVEY_COMPLETED]:a,sessionRecordingUrl:null==o.get_session_replay_url?void 0:o.get_session_replay_url()},t,{$set:{[Na(n,"responded")]:!0}})),a&&(Wa.dispatchEvent(new CustomEvent("PHSurveySent",{detail:{surveyId:n.id}})),bs(n))):Aa.error("[survey sent] event not captured, PostHog instance not found.")},rs=e=>Object.values((null==e?void 0:e.responses)||{}).filter((e=>!Jr(e))).length>0,ns=(e,t,n)=>r({[xa.SURVEY_NAME]:e.name,[xa.SURVEY_ID]:e.id,[xa.SURVEY_ITERATION]:e.current_iteration,[xa.SURVEY_ITERATION_START_DATE]:e.current_iteration_start_date,[xa.SURVEY_PARTIALLY_COMPLETED]:rs(t),sessionRecordingUrl:null==n.get_session_replay_url?void 0:n.get_session_replay_url()},null==t?void 0:t.responses,{[xa.SURVEY_SUBMISSION_ID]:null==t?void 0:t.surveySubmissionId,[xa.SURVEY_QUESTIONS]:e.questions.map((e=>({id:e.id,question:e.question,response:es((null==t?void 0:t.responses)||{},e.id)})))}),is=(e,t,n)=>{if(t){if(!n){var i=ys(e);t.capture(Sa.DISMISSED,r({},ns(e,i,t),{$set:{[Na(e,"dismissed")]:!0}})),bs(e),Ra(e),Wa.dispatchEvent(new CustomEvent("PHSurveyClosed",{detail:{surveyId:e.id}}))}}else Aa.error("[survey dismissed] event not captured, PostHog instance not found.")},os=(e,t)=>{if(t){var r=(e=>Ma("abandonedSurvey_",e))(e);try{if("true"===localStorage.getItem(r))return}catch(e){return}var n=ys(e);if(n){try{localStorage.setItem(r,"true")}catch(e){}t.capture(Sa.ABANDONED,ns(e,n,t),{transport:"sendBeacon"})}}else Aa.error("[survey abandoned] event not captured, PostHog instance not found.")},as=e=>e.map((e=>({sort:Math.floor(10*Math.random()),value:e}))).sort(((e,t)=>e.sort-t.sort)).map((e=>e.value)),ss=(e,t)=>e.length===t.length&&e.every(((e,r)=>e===t[r]))?t.reverse():t,us=e=>e.appearance&&e.appearance.shuffleQuestions&&!e.enable_partial_responses?ss(e.questions,as(e.questions)):e.questions,ls=e=>{var t;return!(null==(t=e.conditions)||null==(t=t.events)||!t.repeatedActivation||!(e=>{var t,r;return null!=(null==(t=e.conditions)||null==(t=t.events)||null==(t=t.values)?void 0:t.length)&&(null==(r=e.conditions)||null==(r=r.events)||null==(r=r.values)?void 0:r.length)>0})(e))||e.schedule===ka.Always||gs(e)},cs=function(e,t){var r={__c:t="__cC"+yo++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var r,n;return this.getChildContext||(r=[],(n={})[t]=this,this.getChildContext=function(){return n},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&r.some((function(e){e.__e=!0,_o(e)}))},this.sub=function(e){r.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r.splice(r.indexOf(e),1),t&&t.call(e)}}),e.children}};return r.Provider.__=r.Consumer.contextType=r}({isPreviewMode:!1,previewPageIndex:0,onPopupSurveyDismissed:()=>{},isPopup:!0,onPreviewSubmit:()=>{},surveySubmissionId:""}),ds=()=>la(cs),hs=e=>{var{component:t,children:r,renderAsHtml:n,style:i}=e;return Wo(t,n?{dangerouslySetInnerHTML:{__html:r},style:i}:{children:r,style:i})};function fs(e){return null!=e?e:"icontains"}function vs(e){var t,r,n;if(null==(t=e.conditions)||!t.url)return!0;var i=null==Wa||null==(r=Wa.location)?void 0:r.href;if(!i)return!1;var o=[e.conditions.url],a=fs(null==(n=e.conditions)?void 0:n.urlMatchType);return Ya[a](o,[i])}var ps=e=>{var t=""+Ta+e.id;return e.current_iteration&&e.current_iteration>0&&(t=""+Ta+e.id+"_"+e.current_iteration),t},ms=(e,t)=>{try{localStorage.setItem(ps(e),JSON.stringify(t))}catch(e){Aa.error("Error setting in-progress survey state in localStorage",e)}},ys=e=>{try{var t=localStorage.getItem(ps(e));if(t)return JSON.parse(t)}catch(e){Aa.error("Error getting in-progress survey state from localStorage",e)}return null},gs=e=>{var t=ys(e);return!Jr(null==t?void 0:t.surveySubmissionId)},bs=e=>{try{localStorage.removeItem(ps(e))}catch(e){Aa.error("Error clearing in-progress survey state from localStorage",e)}};function ws(e,t){void 0===t&&(t=!1);var r="PostHogSurvey-"+e.id;return t?"."+r:r}var Cs=0;function Is(e,t,r,n,i,o){var a,s,u={};for(s in t)"ref"==s?a=t[s]:u[s]=t[s];var l={type:e,props:u,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--Cs,__i:-1,__u:0,__source:i,__self:o};if("function"==typeof e&&(a=e.defaultProps))for(s in a)void 0===u[s]&&(u[s]=a[s]);return co.vnode&&co.vnode(l),l}var ks=Is("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Is("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"})}),Ss=Is("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Is("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"})}),xs=Is("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Is("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"})}),As=Is("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Is("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"})}),Ts=Is("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Is("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"})}),Ns=Is("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"close-survey-title",children:[Is("title",{id:"close-survey-title",children:"Close survey"}),Is("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.164752 0.164752C0.384422 -0.0549175 0.740578 -0.0549175 0.960248 0.164752L6 5.20451L11.0398 0.164752C11.2594 -0.0549175 11.6156 -0.0549175 11.8352 0.164752C12.0549 0.384422 12.0549 0.740578 11.8352 0.960248L6.79549 6L11.8352 11.0398C12.0549 11.2594 12.0549 11.6156 11.8352 11.8352C11.6156 12.0549 11.2594 12.0549 11.0398 11.8352L6 6.79549L0.960248 11.8352C0.740578 12.0549 0.384422 12.0549 0.164752 11.8352C-0.0549175 11.6156 -0.0549175 11.2594 0.164752 11.0398L5.20451 6L0.164752 0.960248C-0.0549175 0.740578 -0.0549175 0.384422 0.164752 0.164752Z",fill:"black"})]}),Ms=Is("svg",{width:"77",height:"14",viewBox:"0 0 77 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Is("g",{"clip-path":"url(#clip0_2415_6911)",children:[Is("mask",{id:"mask0_2415_6911",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"77",height:"14",children:Is("path",{d:"M0.5 0H76.5V14H0.5V0Z",fill:"white"})}),Is("g",{mask:"url(#mask0_2415_6911)",children:[Is("path",{d:"M5.77226 8.02931C5.59388 8.37329 5.08474 8.37329 4.90634 8.02931L4.4797 7.20672C4.41155 7.07535 4.41155 6.9207 4.4797 6.78933L4.90634 5.96669C5.08474 5.62276 5.59388 5.62276 5.77226 5.96669L6.19893 6.78933C6.26709 6.9207 6.26709 7.07535 6.19893 7.20672L5.77226 8.02931ZM5.77226 12.6946C5.59388 13.0386 5.08474 13.0386 4.90634 12.6946L4.4797 11.872C4.41155 11.7406 4.41155 11.586 4.4797 11.4546L4.90634 10.632C5.08474 10.288 5.59388 10.288 5.77226 10.632L6.19893 11.4546C6.26709 11.586 6.26709 11.7406 6.19893 11.872L5.77226 12.6946Z",fill:"#1D4AFF"}),Is("path",{d:"M0.5 10.9238C0.5 10.508 1.02142 10.2998 1.32637 10.5938L3.54508 12.7327C3.85003 13.0267 3.63405 13.5294 3.20279 13.5294H0.984076C0.716728 13.5294 0.5 13.3205 0.5 13.0627V10.9238ZM0.5 8.67083C0.5 8.79459 0.551001 8.91331 0.641783 9.00081L5.19753 13.3927C5.28831 13.4802 5.41144 13.5294 5.53982 13.5294H8.0421C8.47337 13.5294 8.68936 13.0267 8.3844 12.7327L1.32637 5.92856C1.02142 5.63456 0.5 5.84278 0.5 6.25854V8.67083ZM0.5 4.00556C0.5 4.12932 0.551001 4.24802 0.641783 4.33554L10.0368 13.3927C10.1276 13.4802 10.2508 13.5294 10.3791 13.5294H12.8814C13.3127 13.5294 13.5287 13.0267 13.2237 12.7327L1.32637 1.26329C1.02142 0.969312 0.5 1.17752 0.5 1.59327V4.00556ZM5.33931 4.00556C5.33931 4.12932 5.39033 4.24802 5.4811 4.33554L14.1916 12.7327C14.4965 13.0267 15.0179 12.8185 15.0179 12.4028V9.99047C15.0179 9.86671 14.9669 9.74799 14.8762 9.66049L6.16568 1.26329C5.86071 0.969307 5.33931 1.17752 5.33931 1.59327V4.00556ZM11.005 1.26329C10.7 0.969307 10.1786 1.17752 10.1786 1.59327V4.00556C10.1786 4.12932 10.2296 4.24802 10.3204 4.33554L14.1916 8.06748C14.4965 8.36148 15.0179 8.15325 15.0179 7.7375V5.3252C15.0179 5.20144 14.9669 5.08272 14.8762 4.99522L11.005 1.26329Z",fill:"#F9BD2B"}),Is("path",{d:"M21.0852 10.981L16.5288 6.58843C16.2238 6.29443 15.7024 6.50266 15.7024 6.91841V13.0627C15.7024 13.3205 15.9191 13.5294 16.1865 13.5294H23.2446C23.5119 13.5294 23.7287 13.3205 23.7287 13.0627V12.5032C23.7287 12.2455 23.511 12.0396 23.2459 12.0063C22.4323 11.9042 21.6713 11.546 21.0852 10.981ZM18.0252 12.0365C17.5978 12.0365 17.251 11.7021 17.251 11.2901C17.251 10.878 17.5978 10.5436 18.0252 10.5436C18.4527 10.5436 18.7996 10.878 18.7996 11.2901C18.7996 11.7021 18.4527 12.0365 18.0252 12.0365Z",fill:"currentColor"}),Is("path",{d:"M0.5 13.0627C0.5 13.3205 0.716728 13.5294 0.984076 13.5294H3.20279C3.63405 13.5294 3.85003 13.0267 3.54508 12.7327L1.32637 10.5938C1.02142 10.2998 0.5 10.508 0.5 10.9238V13.0627ZM5.33931 5.13191L1.32637 1.26329C1.02142 0.969306 0.5 1.17752 0.5 1.59327V4.00556C0.5 4.12932 0.551001 4.24802 0.641783 4.33554L5.33931 8.86412V5.13191ZM1.32637 5.92855C1.02142 5.63455 0.5 5.84278 0.5 6.25853V8.67083C0.5 8.79459 0.551001 8.91331 0.641783 9.00081L5.33931 13.5294V9.79717L1.32637 5.92855Z",fill:"#1D4AFF"}),Is("path",{d:"M10.1787 5.3252C10.1787 5.20144 10.1277 5.08272 10.0369 4.99522L6.16572 1.26329C5.8608 0.969306 5.33936 1.17752 5.33936 1.59327V4.00556C5.33936 4.12932 5.39037 4.24802 5.48114 4.33554L10.1787 8.86412V5.3252ZM5.33936 13.5294H8.04214C8.47341 13.5294 8.6894 13.0267 8.38443 12.7327L5.33936 9.79717V13.5294ZM5.33936 5.13191V8.67083C5.33936 8.79459 5.39037 8.91331 5.48114 9.00081L10.1787 13.5294V9.99047C10.1787 9.86671 10.1277 9.74803 10.0369 9.66049L5.33936 5.13191Z",fill:"#F54E00"}),Is("path",{d:"M29.375 11.6667H31.3636V8.48772H33.0249C34.8499 8.48772 36.0204 7.4443 36.0204 5.83052C36.0204 4.21681 34.8499 3.17334 33.0249 3.17334H29.375V11.6667ZM31.3636 6.84972V4.81136H32.8236C33.5787 4.81136 34.0318 5.19958 34.0318 5.83052C34.0318 6.4615 33.5787 6.84972 32.8236 6.84972H31.3636ZM39.618 11.7637C41.5563 11.7637 42.9659 10.429 42.9659 8.60905C42.9659 6.78905 41.5563 5.45438 39.618 5.45438C37.6546 5.45438 36.2701 6.78905 36.2701 8.60905C36.2701 10.429 37.6546 11.7637 39.618 11.7637ZM38.1077 8.60905C38.1077 7.63838 38.7118 6.97105 39.618 6.97105C40.5116 6.97105 41.1157 7.63838 41.1157 8.60905C41.1157 9.57972 40.5116 10.2471 39.618 10.2471C38.7118 10.2471 38.1077 9.57972 38.1077 8.60905ZM46.1482 11.7637C47.6333 11.7637 48.6402 10.8658 48.6402 9.81025C48.6402 7.33505 45.2294 8.13585 45.2294 7.16518C45.2294 6.8983 45.5189 6.72843 45.9342 6.72843C46.3622 6.72843 46.8782 6.98318 47.0418 7.54132L48.527 6.94678C48.2375 6.06105 47.1677 5.45438 45.8713 5.45438C44.4743 5.45438 43.6058 6.25518 43.6058 7.21372C43.6058 9.53118 46.9663 8.88812 46.9663 9.84665C46.9663 10.1864 46.6391 10.417 46.1482 10.417C45.4434 10.417 44.9525 9.94376 44.8015 9.3735L43.3164 9.93158C43.6436 10.8537 44.6001 11.7637 46.1482 11.7637ZM53.4241 11.606L53.2982 10.0651C53.0843 10.1743 52.8074 10.2106 52.5808 10.2106C52.1278 10.2106 51.8257 9.89523 51.8257 9.34918V7.03172H53.3612V5.55145H51.8257V3.78001H49.9755V5.55145H48.9687V7.03172H49.9755V9.57972C49.9755 11.06 51.0202 11.7637 52.3921 11.7637C52.7696 11.7637 53.122 11.7031 53.4241 11.606ZM59.8749 3.17334V6.47358H56.376V3.17334H54.3874V11.6667H56.376V8.11158H59.8749V11.6667H61.8761V3.17334H59.8749ZM66.2899 11.7637C68.2281 11.7637 69.6378 10.429 69.6378 8.60905C69.6378 6.78905 68.2281 5.45438 66.2899 5.45438C64.3265 5.45438 62.942 6.78905 62.942 8.60905C62.942 10.429 64.3265 11.7637 66.2899 11.7637ZM64.7796 8.60905C64.7796 7.63838 65.3837 6.97105 66.2899 6.97105C67.1835 6.97105 67.7876 7.63838 67.7876 8.60905C67.7876 9.57972 67.1835 10.2471 66.2899 10.2471C65.3837 10.2471 64.7796 9.57972 64.7796 8.60905ZM73.2088 11.4725C73.901 11.4725 74.5177 11.242 74.845 10.8416V11.424C74.845 12.1034 74.2786 12.5767 73.4102 12.5767C72.7935 12.5767 72.2523 12.2854 72.1642 11.788L70.4776 12.0428C70.7042 13.1955 71.925 13.972 73.4102 13.972C75.361 13.972 76.6574 12.8679 76.6574 11.2298V5.55145H74.8324V6.07318C74.4926 5.69705 73.9136 5.45438 73.171 5.45438C71.409 5.45438 70.3014 6.61918 70.3014 8.46345C70.3014 10.3077 71.409 11.4725 73.2088 11.4725ZM72.1012 8.46345C72.1012 7.55345 72.655 6.97105 73.5109 6.97105C74.3793 6.97105 74.9331 7.55345 74.9331 8.46345C74.9331 9.37345 74.3793 9.95585 73.5109 9.95585C72.655 9.95585 72.1012 9.37345 72.1012 8.46345Z",fill:"currentColor"})]})]}),Is("defs",{children:Is("clipPath",{id:"clip0_2415_6911",children:Is("rect",{width:"76",height:"14",fill:"white",transform:"translate(0.5)"})})})]});function _s(){return Is("a",{href:"https://posthog.com/surveys",target:"_blank",rel:"noopener",className:"footer-branding",children:["Survey by ",Ms]})}function Rs(e){var{text:t,submitDisabled:r,appearance:n,onSubmit:i,link:o,onPreviewSubmit:a,skipSubmitButton:s}=e,{isPreviewMode:u}=la(cs);return Is("div",{className:"bottom-section",children:[!s&&Is("button",{className:"form-submit",disabled:r,"aria-label":"Submit survey",type:"button",onClick:()=>{o&&(null==ri||ri.open(o)),u?null==a||a():i()},children:t}),!n.whiteLabel&&Is(_s,{})]})}function Fs(e){var{question:t,forceDisableHtml:r,htmlFor:n}=e;return Is("div",{class:"question-header",children:[Is(t.type===Ca.Open?"label":"h3",{className:"survey-question",htmlFor:n,children:t.question}),t.description&&hs({component:So("p",{className:"survey-question-description"}),children:t.description,renderAsHtml:!r&&"text"!==t.descriptionContentType})]})}function Es(e){var{onClick:t}=e,{isPreviewMode:r}=la(cs);return Is("button",{className:"form-cancel",onClick:t,disabled:r,"aria-label":"Close survey",type:"button",children:Ns})}Is("svg",{width:"16",height:"12",viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Is("path",{d:"M5.30769 10.6923L4.77736 11.2226C4.91801 11.3633 5.10878 11.4423 5.30769 11.4423C5.5066 11.4423 5.69737 11.3633 5.83802 11.2226L5.30769 10.6923ZM15.5303 1.53033C15.8232 1.23744 15.8232 0.762563 15.5303 0.46967C15.2374 0.176777 14.7626 0.176777 14.4697 0.46967L15.5303 1.53033ZM1.53033 5.85429C1.23744 5.56139 0.762563 5.56139 0.46967 5.85429C0.176777 6.14718 0.176777 6.62205 0.46967 6.91495L1.53033 5.85429ZM5.83802 11.2226L15.5303 1.53033L14.4697 0.46967L4.77736 10.162L5.83802 11.2226ZM0.46967 6.91495L4.77736 11.2226L5.83802 10.162L1.53033 5.85429L0.46967 6.91495Z",fill:"currentColor"})});var Zs=ri;function Os(e){var{header:t,description:r,contentType:n,forceDisableHtml:i,appearance:o,onClose:a}=e,{isPopup:s}=la(cs);return aa((()=>{var e=e=>{"Enter"!==e.key&&"Escape"!==e.key||(e.preventDefault(),a())};return bi(Zs,"keydown",e),()=>{Zs.removeEventListener("keydown",e)}}),[a]),Is("div",{className:"thank-you-message",role:"status",tabIndex:0,"aria-atomic":"true",children:[s&&!0!==o.hideCancelButton&&Is(Es,{onClick:()=>a()}),Is("h3",{className:"thank-you-message-header",children:t}),r&&hs({component:So("p",{className:"thank-you-message-body"}),children:r,renderAsHtml:!i&&"text"!==n}),s&&Is(Rs,{text:o.thankYouMessageCloseButtonText||"Close",submitDisabled:!1,appearance:o,onSubmit:()=>a()})]})}var Bs=e=>Gr(e)&&e.every((e=>Kr(e)));function Ls(e){var{question:t,forceDisableHtml:r,appearance:n,onSubmit:i,onPreviewSubmit:o,displayQuestionIndex:a,initialValue:s}=e,{isPreviewMode:u}=ds(),l=sa(null),[c,d]=oa((()=>Kr(s)?s:""));aa((()=>{setTimeout((()=>{var e;u||(null==(e=l.current)||e.focus())}),100)}),[u]);var h="surveyQuestion"+a;return Is(Ao,{children:[Is("div",{className:"question-container",children:[Is(Fs,{question:t,forceDisableHtml:r,htmlFor:h}),Is("textarea",{ref:l,id:h,rows:4,placeholder:null==n?void 0:n.placeholder,onInput:e=>{d(e.currentTarget.value),e.stopPropagation()},onKeyDown:e=>{e.stopPropagation()},value:c})]}),Is(Rs,{text:t.buttonText||"Submit",submitDisabled:!c&&!t.optional,appearance:n,onSubmit:()=>i(c),onPreviewSubmit:()=>o(c)})]})}function Ds(e){var{question:t,forceDisableHtml:r,appearance:n,onSubmit:i,onPreviewSubmit:o}=e;return Is(Ao,{children:[Is("div",{className:"question-container",children:Is(Fs,{question:t,forceDisableHtml:r})}),Is(Rs,{text:t.buttonText||"Submit",submitDisabled:!1,link:t.link,appearance:n,onSubmit:()=>i("link clicked"),onPreviewSubmit:()=>o("link clicked")})]})}function qs(e){var{question:t,forceDisableHtml:r,displayQuestionIndex:n,appearance:i,onSubmit:o,onPreviewSubmit:a,initialValue:s}=e,u=t.scale,l=10===t.scale?0:1,[c,d]=oa((()=>Qr(s)?s:Gr(s)&&s.length>0&&Qr(parseInt(s[0]))?parseInt(s[0]):Kr(s)&&Qr(parseInt(s))?parseInt(s):null)),{isPreviewMode:h}=ds(),f=e=>h?a(e):o(e);return Is(Ao,{children:[Is("div",{className:"question-container",children:[Is(Fs,{question:t,forceDisableHtml:r}),Is("div",{className:"rating-section",children:[Is("div",{className:"rating-options",children:["emoji"===t.display&&Is("div",{className:"rating-options-emoji",children:(3===t.scale?Ys:Hs).map(((e,r)=>Is("button",{"aria-label":"Rate "+(r+1),className:"ratings-emoji question-"+n+"-rating-"+r+" "+(r+1===c?"rating-active":""),value:r+1,type:"button",onClick:()=>{var e=r+1;d(e),t.skipSubmitButton&&f(e)},children:e},r)))}),"number"===t.display&&Is("div",{className:"rating-options-number",style:{gridTemplateColumns:"repeat("+(u-l+1)+", minmax(0, 1fr))"},children:Xs(t.scale).map(((e,r)=>Is(Vs,{displayQuestionIndex:n,active:c===e,appearance:i,num:e,setActiveNumber:e=>{d(e),t.skipSubmitButton&&f(e)}},r)))})]}),Is("div",{className:"rating-text",children:[Is("div",{children:t.lowerBoundLabel}),Is("div",{children:t.upperBoundLabel})]})]})]}),Is(Rs,{text:t.buttonText||(null==i?void 0:i.submitButtonText)||"Submit",submitDisabled:Ur(c)&&!t.optional,appearance:i,onSubmit:()=>o(c),onPreviewSubmit:()=>a(c),skipSubmitButton:t.skipSubmitButton})]})}function Vs(e){var{num:t,active:r,displayQuestionIndex:n,setActiveNumber:i}=e;return Is("button",{"aria-label":"Rate "+t,className:"ratings-number question-"+n+"-rating-"+t+" "+(r?"rating-active":""),type:"button",onClick:()=>{i(t)},children:t})}function Ps(e){var{question:t,forceDisableHtml:n,displayQuestionIndex:i,appearance:o,onSubmit:a,onPreviewSubmit:s,initialValue:u}=e,l=sa(null),c=ua((()=>(e=>{if(!e.shuffleOptions)return e.choices;var t=e.choices,r="";e.hasOpenChoice&&(r=t.pop());var n=ss(t,as(t));return e.hasOpenChoice&&(e.choices.push(r),n.push(r)),n})(t)),[t]),[d,h]=oa((()=>((e,t)=>Kr(e)||Bs(e)?e:t===Ca.SingleChoice?null:[])(u,t.type))),[f,v]=oa((()=>((e,t)=>{if(Kr(e)&&!t.includes(e))return{isSelected:!0,inputValue:e};if(Bs(e)){var r=e.find((e=>!t.includes(e)));if(r)return{isSelected:!0,inputValue:r}}return{isSelected:!1,inputValue:""}})(u,c))),{isPreviewMode:p}=ds(),m=t.type===Ca.SingleChoice,y=t.type===Ca.MultipleChoice,g=t.skipSubmitButton&&m&&!t.hasOpenChoice,b=(e,t)=>{if(t){var n=!f.isSelected;return v((e=>r({},e,{isSelected:n,inputValue:n?e.inputValue:""}))),m&&h(""),void(n&&setTimeout((()=>{var e;return null==(e=l.current)?void 0:e.focus()}),75))}if(m)return h(e),v((e=>r({},e,{isSelected:!1,inputValue:""}))),void(g&&(a(e),p&&s(e)));y&&Gr(d)&&(d.includes(e)?h(d.filter((t=>t!==e))):h([...d,e]))},w=e=>{e.stopPropagation();var t=e.currentTarget.value;v((e=>r({},e,{inputValue:t}))),m&&h(t)},C=e=>{e.stopPropagation(),"Enter"!==e.key||I()||(e.preventDefault(),k()),"Escape"===e.key&&(e.preventDefault(),v((e=>r({},e,{isSelected:!1,inputValue:""}))),m&&h(null))},I=()=>!t.optional&&(!!Ur(d)||(!(!Gr(d)||f.isSelected||0!==d.length)||!(!f.isSelected||""!==f.inputValue.trim()))),k=()=>{f.isSelected&&y?Gr(d)&&(p?s([...d,f.inputValue]):a([...d,f.inputValue])):p?s(d):a(d)};return Is(Ao,{children:[Is("div",{className:"question-container",children:[Is(Fs,{question:t,forceDisableHtml:n}),Is("fieldset",{className:"multiple-choice-options limit-height",children:[Is("legend",{className:"sr-only",children:y?" Select all that apply":" Select one"}),c.map(((e,r)=>{var n=!!t.hasOpenChoice&&r===t.choices.length-1,o="surveyQuestion"+i+"Choice"+r,a=o+"Open",s=n?f.isSelected:m?d===e:Gr(d)&&d.includes(e);return Is("label",{className:n?"choice-option-open":"",children:[Is("div",{className:"response-choice",children:[Is("input",{type:m?"radio":"checkbox",name:o,checked:s,onChange:()=>b(e,n),id:o,"aria-controls":a}),Is("span",{children:n?e+":":e})]}),n&&Is("input",{type:"text",ref:l,id:a,name:"question"+i+"Open",value:f.inputValue,onKeyDown:C,onInput:w,onClick:t=>{f.isSelected||b(e,!0),t.stopPropagation()},"aria-label":e+" - please specify"})]},r)}))]})]}),Is(Rs,{text:t.buttonText||"Submit",submitDisabled:I(),appearance:o,onSubmit:k,onPreviewSubmit:k,skipSubmitButton:g})]})}var Ys=[xs,Ss,ks],Hs=[As,xs,Ss,ks,Ts],Gs=[1,2,3,4,5],Ws=[1,2,3,4,5,6,7],js=[0,1,2,3,4,5,6,7,8,9,10];function Xs(e){switch(e){case 5:default:return Gs;case 7:return Ws;case 10:return js}}var zs=ri,Ks=ai,Us="ph:show_survey_widget",Js="PHWidgetSurveyClickListener";function Qs(e,t,r){var n,i=e.questions[t],o=t+1;if(null==(n=i.branching)||!n.type)return t===e.questions.length-1?Ia.End:o;if(i.branching.type===Ia.End)return Ia.End;if(i.branching.type===Ia.SpecificQuestion){if(Number.isInteger(i.branching.index))return i.branching.index}else if(i.branching.type===Ia.ResponseBased){if(i.type===Ca.SingleChoice){var a,s=i.choices.indexOf(""+r);if(-1===s&&i.hasOpenChoice&&(s=i.choices.length-1),null!=(a=i.branching)&&null!=(a=a.responseValues)&&a.hasOwnProperty(s)){var u=i.branching.responseValues[s];return Number.isInteger(u)?u:u===Ia.End?Ia.End:o}}else if(i.type===Ca.Rating){var l;if("number"!=typeof r||!Number.isInteger(r))throw new Error("The response type must be an integer");var c=function(e,t){if(3===t){if(e<1||e>3)throw new Error("The response must be in range 1-3");return 1===e?"negative":2===e?"neutral":"positive"}if(5===t){if(e<1||e>5)throw new Error("The response must be in range 1-5");return e<=2?"negative":3===e?"neutral":"positive"}if(7===t){if(e<1||e>7)throw new Error("The response must be in range 1-7");return e<=3?"negative":4===e?"neutral":"positive"}if(10===t){if(e<0||e>10)throw new Error("The response must be in range 0-10");return e<=6?"detractors":e<=8?"passives":"promoters"}throw new Error("The scale must be one of: 3, 5, 7, 10")}(r,i.scale);if(null!=(l=i.branching)&&null!=(l=l.responseValues)&&l.hasOwnProperty(c)){var d=i.branching.responseValues[c];return Number.isInteger(d)?d:d===Ia.End?Ia.End:o}}return o}return Aa.warn("Falling back to next question index due to unexpected branching type"),o}var $s=250,eu=20,tu=12;class ru{constructor(e){var t=this;this.S=new Map,this.A=new Map,this.T=new Set,this.handlePageUnload=()=>{var e=this._posthog.get_property("$surveys");if(e)for(var t of e)gs(t)&&os(t,this._posthog)},this.handlePopoverSurvey=e=>{var t;this.N(e.id),this.M(e);var n=(null==(t=e.appearance)?void 0:t.surveyPopupDelaySeconds)||0,{shadow:i}=$a(e,this._posthog);if(n<=0)return Go(Is(su,{posthog:this._posthog,survey:e,removeSurveyFromFocus:this.R}),i);var o=setTimeout((()=>{if(this.S.delete(e.id),!vs(e))return this.R(e);Go(Is(su,{posthog:this._posthog,survey:r({},e,{appearance:r({},e.appearance,{surveyPopupDelaySeconds:0})}),removeSurveyFromFocus:this.R}),i)}),1e3*n);this.S.set(e.id,o)},this.F=e=>{var{shadow:t,isNewlyCreated:r}=$a(e,this._posthog);r&&Go(Is(lu,{posthog:this._posthog,survey:e},e.id),t)},this.Z=e=>{this.O(e);var t=this.A.get(e.id);t&&(t.element.removeEventListener("click",t.listener),t.element.removeAttribute(Js),this.A.delete(e.id),Aa.info("Removed click listener for survey "+e.id))},this.B=(e,t)=>{var r=Ks.querySelector(t),n=this.A.get(e.id);if(r){if(this.F(e),n){if(r===n.element)return;Aa.info("Selector element changed for survey "+e.id+". Re-attaching listener."),this.Z(e)}if(!r.hasAttribute(Js)){var i=t=>{var r,n;t.stopPropagation();var i=(null==(r=e.appearance)?void 0:r.position)===ga.NextToTrigger?function(e,t){try{var r=e.getBoundingClientRect(),n=zs.innerHeight,i=zs.innerWidth,o=$s,a=r.left+r.width/2-t/2;a+t>i-eu&&(a=i-t-eu),a<eu&&(a=eu);var s=tu,u=n-r.bottom,l=r.top,c=u<o&&l>u;return{position:"fixed",top:c?"auto":r.bottom+s+"px",left:a+"px",right:"auto",bottom:c?n-r.top+s+"px":"auto",zIndex:Ka.zIndex}}catch(e){return Aa.warn("Failed to calculate trigger position:",e),null}}(t.currentTarget,parseInt((null==(n=e.appearance)?void 0:n.maxWidth)||Ka.maxWidth)):{};zs.dispatchEvent(new CustomEvent(Us,{detail:{surveyId:e.id,position:i}}))};bi(r,"click",i),r.setAttribute(Js,"true"),this.A.set(e.id,{element:r,listener:i,survey:e}),Aa.info("Attached click listener for feedback button survey "+e.id)}}else n&&this.Z(e)},this.renderPopover=e=>{var{shadow:t}=$a(e,this._posthog);Go(Is(su,{posthog:this._posthog,survey:e,removeSurveyFromFocus:this.R}),t)},this.renderSurvey=(e,t)=>{var r;null!=(r=this._posthog.config)&&null!=(r=r.surveys)&&r.prefillFromUrl&&this.L(e),Go(Is(su,{posthog:this._posthog,survey:e,removeSurveyFromFocus:this.R,isPopup:!1}),t)},this.getActiveMatchingSurveys=function(e,r){var n;void 0===r&&(r=!1),null==(n=t._posthog)||n.surveys.getSurveys((r=>{var n=r.filter((e=>t.checkSurveyEligibility(e).eligible&&t.D(e)&&t.q(e)&&t.V(e)));e(n)}),r)},this.callSurveysAndEvaluateDisplayLogic=function(e){void 0===e&&(e=!1),t.getActiveMatchingSurveys((e=>{var r=e.filter((e=>e.type===wa.Popover||e.type===wa.Widget)),n=t.P(r),i=new Set;n.forEach((e=>{if(e.type===wa.Widget){var r,n,o,a;if((null==(r=e.appearance)?void 0:r.widgetType)===ya.Tab)return void t.F(e);if((null==(n=e.appearance)?void 0:n.widgetType)===ya.Selector&&null!=(o=e.appearance)&&o.widgetSelector)i.add(e.id),t.B(e,null==(a=e.appearance)?void 0:a.widgetSelector)}Ur(t.Y)&&e.type===wa.Popover&&t.handlePopoverSurvey(e)})),t.A.forEach((e=>{var{survey:r}=e;i.has(r.id)||t.Z(r)}))}),e)},this.M=e=>{Ur(this.Y)||Aa.error("Survey "+this.Y+" already in focus. Cannot add survey "+e.id+"."),this.Y=e.id},this.R=e=>{this.Y!==e.id&&Aa.error("Survey "+e.id+" is not in focus. Cannot remove survey "+e.id+"."),this.N(e.id),this.Y=null,this.O(e)},this._posthog=e,this.Y=null}N(e){var t=this.S.get(e);t&&(clearTimeout(t),this.S.delete(e))}cancelSurvey(e){this.S.has(e)&&(Aa.info("Cancelled pending survey "+e),this.N(e),this.Y===e&&(this.Y=null))}P(e){return e.sort(((e,t)=>{var r,n,i=gs(e),o=gs(t);if(i&&!o)return-1;if(!i&&o)return 1;var a=e.schedule===ka.Always,s=t.schedule===ka.Always;return a&&!s?1:!a&&s?-1:((null==(r=e.appearance)?void 0:r.surveyPopupDelaySeconds)||0)-((null==(n=t.appearance)?void 0:n.surveyPopupDelaySeconds)||0)}))}L(e){if(!this.T.has(e.id))try{var{params:t}=function(e){var t={},r=!1,n=e.replace(/^\?/,"");if(!n)return{params:t,autoSubmit:r};var i=n.split("&");for(var o of i){var[a,s]=o.split("=");if(a&&!zr(s)){var u=decodeURIComponent(a),l=decodeURIComponent(s);if("auto_submit"!==u||"true"!==l){var c=u.match(/^q(\d+)$/);if(c){var d=parseInt(c[1],10);t[d]||(t[d]=[]),t[d].push(l)}}else r=!0}}return{params:t,autoSubmit:r}}(zs.location.search);if(0===Object.keys(t).length)return;Aa.info("[Survey Prefill] Detected URL prefill parameters");var r=function(e,t){var r={};return e.questions.forEach(((e,n)=>{if(t[n]&&e.id){var i=t[n],o=Xa(e.id);try{switch(e.type){case Ca.SingleChoice:if(!e.choices||0===e.choices.length)return void hi.warn("[Survey Prefill] Question "+n+" has no choices");var a=parseInt(i[0],10);if(isNaN(a)||a<0||a>=e.choices.length)return void hi.warn("[Survey Prefill] Invalid choice index for q"+n+": "+i[0]);r[o]=e.choices[a];break;case Ca.MultipleChoice:if(!e.choices||0===e.choices.length)return void hi.warn("[Survey Prefill] Question "+n+" has no choices");var s=i.map((e=>parseInt(e,10))).filter((t=>!isNaN(t)&&t>=0&&t<e.choices.length));if(0===s.length)return void hi.warn("[Survey Prefill] No valid choices for q"+n);var u=[...new Set(s.map((t=>e.choices[t])))];u.length<s.length&&hi.warn("[Survey Prefill] Removed duplicate choices for q"+n),r[o]=u;break;case Ca.Rating:var l=parseInt(i[0],10),c=e.scale||10;if(isNaN(l)||l<0||l>c)return void hi.warn("[Survey Prefill] Invalid rating for q"+n+": "+i[0]+" (scale: 0-"+c+")");r[o]=l;break;default:hi.info("[Survey Prefill] Question type "+e.type+" does not support prefill")}}catch(e){hi.error("[Survey Prefill] Error converting q"+n+":",e)}}})),r}(e,t);if(0===Object.keys(r).length)return void Aa.warn("[Survey Prefill] No valid responses after conversion");var n=qa(),i=Object.keys(t).map((e=>parseInt(e,10))),{startQuestionIndex:o,skippedResponses:a}=function(e,t,r){for(var n=0,i={},o=0;o<e.length&&t.includes(o);o++){var a=e[o];if(!(a&&"skipSubmitButton"in a&&a.skipSubmitButton))break;if(n=o+1,a.id){var s=Xa(a.id);zr(r[s])||(i[s]=r[s])}}return{startQuestionIndex:n,skippedResponses:i}}(e.questions,i,r),s=o>=e.questions.length;ms(e,{surveySubmissionId:n,responses:r,lastQuestionIndex:s?e.questions.length-1:o}),Aa.info("[Survey Prefill] Stored prefilled responses in localStorage"),(Object.keys(a).length>0&&e.enable_partial_responses||s)&&ts({responses:s?r:a,survey:e,surveySubmissionId:n,posthog:this._posthog,isSurveyCompleted:s}),this.T.add(e.id)}catch(e){Aa.error("[Survey Prefill] Error handling URL prefill:",e)}}H(e,t){if(void 0===t&&(t=void 0),!e)return!0;var r=!!this._posthog.featureFlags.isFeatureEnabled(e,{send_event:!e.startsWith("survey-targeting-")}),n=!0;t&&(n=this._posthog.featureFlags.getFeatureFlag(e,{send_event:!1})===t||"any"===t);return r&&n}D(e){return!e.conditions||vs(e)&&function(e){var t,r,n;if(null==(t=e.conditions)||!t.deviceTypes||0===(null==(r=e.conditions)?void 0:r.deviceTypes.length))return!0;if(!si)return!1;var i=Nn(si);return Ya[fs(null==(n=e.conditions)?void 0:n.deviceTypesMatchType)](e.conditions.deviceTypes,[i])}(e)&&function(e){var t;return null==(t=e.conditions)||!t.selector||!(null==ja||!ja.querySelector(e.conditions.selector))}(e)}G(e){return ls(e)||this.H(e.internal_targeting_flag_key)||gs(e)}checkSurveyEligibility(e){var t,r,n={eligible:!0,reason:void 0};if(!function(e){return!(!e.start_date||e.end_date)}(e))return n.eligible=!1,n.reason="Survey is not running. It was completed on "+e.end_date,n;if(!Fa.includes(e.type))return n.eligible=!1,n.reason="Surveys of type "+e.type+" are never eligible to be shown in the app",n;var i=null==(t=e.conditions)?void 0:t.linkedFlagVariant;return this.H(e.linked_flag_key,i)?this.H(e.targeting_flag_key)?this.G(e)?(e=>{var t=localStorage.getItem("lastSeenSurveyDate");if(!e||!t)return!0;var r=new Date,n=Math.abs(r.getTime()-new Date(t).getTime());return Math.ceil(n/864e5)>e})(null==(r=e.conditions)?void 0:r.seenSurveyWaitPeriodInDays)?(e=>!!localStorage.getItem(_a(e))&&!ls(e))(e)?(n.eligible=!1,n.reason="Survey has already been seen and it can't be activated again",n):n:(n.eligible=!1,n.reason="Survey wait period has not passed",n):(n.eligible=!1,n.reason="Survey internal targeting flag is not enabled and survey cannot activate repeatedly and survey is not in progress",n):(n.eligible=!1,n.reason="Survey targeting feature flag is not enabled",n):(n.eligible=!1,n.reason=i?"Survey linked feature flag is not enabled for variant "+i:"Survey linked feature flag is not enabled",n)}q(e){var t;if(!function(e){var t;return!(null==(t=e.conditions)||null==(t=t.events)||null==(t=t.values)||!t.length)}(e)&&!function(e){var t;return!(null==(t=e.conditions)||null==(t=t.actions)||null==(t=t.values)||!t.length)}(e))return!0;var r=null==(t=this._posthog.surveys._surveyEventReceiver)?void 0:t.getSurveys();return!(null==r||!r.includes(e.id))}V(e){var t;return null==(t=e.feature_flag_keys)||!t.length||e.feature_flag_keys.every((e=>{var{key:t,value:r}=e;return!t||!r||this.H(r)}))}O(e){try{var t=Ks.querySelector(ws(e,!0));null!=t&&t.shadowRoot&&Go(null,t.shadowRoot),null==t||t.remove()}catch(t){Aa.warn("Failed to remove survey "+e.id+" from DOM:",t)}}getTestAPI(){return{addSurveyToFocus:this.M,removeSurveyFromFocus:this.R,surveyInFocus:this.Y,surveyTimeouts:this.S,handleWidget:this.F,handlePopoverSurvey:this.handlePopoverSurvey,manageWidgetSelectorListener:this.B,sortSurveysByAppearanceDelay:this.P,checkFlags:this.V.bind(this),isSurveyFeatureFlagEnabled:this.H.bind(this)}}}function nu(e,t){if(Ks&&zs){var r,n=new ru(e);if(e.config.disable_surveys_automatic_display)return Aa.info("Surveys automatic display is disabled. Skipping call surveys and evaluate display logic."),n;if(!1===t)return Aa.info("There are no surveys to load or Surveys is disabled in the project settings."),n;n.callSurveysAndEvaluateDisplayLogic(!0);var i=()=>{zr(r)&&(r=setInterval((()=>{n.callSurveysAndEvaluateDisplayLogic(!1)}),1e3))};return i(),bi(Ks,"visibilitychange",(()=>{Ks.hidden?zr(r)||(clearInterval(r),r=void 0):(n.callSurveysAndEvaluateDisplayLogic(!1),i())})),n}}function iu(e){var{survey:t,removeSurveyFromFocus:r=(()=>{}),setSurveyVisible:n,isPreviewMode:i=!1}=e;aa((()=>{var e;if(!i&&null!=(e=t.conditions)&&e.url){var o=()=>{var e,i=t.type===wa.Widget,o=vs(t),a=(null==(e=t.appearance)?void 0:e.widgetType)===ya.Tab&&i;if(!o)return Aa.info("Hiding survey "+t.id+" because URL does not match"),n(!1),r(t);a&&(Aa.info("Showing survey "+t.id+" because it is a feedback button tab and URL matches"),n(!0))};bi(zs,"popstate",o),bi(zs,"hashchange",o);var a=zs.history.pushState,s=zs.history.replaceState;return zs.history.pushState=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];a.apply(this,t),o()},zs.history.replaceState=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];s.apply(this,t),o()},()=>{zs.removeEventListener("popstate",o),zs.removeEventListener("hashchange",o),zs.history.pushState=a,zs.history.replaceState=s}}}),[i,t,r,n])}function ou(e,t,r){if(void 0===t&&(t=ga.Right),e===wa.ExternalSurvey)return{};switch(t){case ga.TopLeft:return{top:"0",left:"0",transform:"translate(30px, 30px)"};case ga.TopRight:return{top:"0",right:"0",transform:"translate(-30px, 30px)"};case ga.TopCenter:return{top:"0",left:"50%",transform:"translate(-50%, 30px)"};case ga.MiddleLeft:return{top:"50%",left:"0",transform:"translate(30px, -50%)"};case ga.MiddleRight:return{top:"50%",right:"0",transform:"translate(-30px, -50%)"};case ga.MiddleCenter:return{top:"50%",left:"50%",transform:"translate(-50%, -50%)"};case ga.Left:return{left:"30px"};case ga.Center:return{left:"50%",transform:"translateX(-50%)"};default:case ga.Right:return{right:e===wa.Widget&&r===ya.Tab?"60px":"30px"}}}function au(e){switch(void 0===e&&(e=ba.Right),e){case ba.Top:return{top:"0",left:"50%",transform:"translateX(-50%)"};case ba.Left:return{top:"50%",left:"0",transform:"rotate(90deg) translateY(-100%)",transformOrigin:"left top"};case ba.Bottom:return{bottom:"0",left:"50%",transform:"translateX(-50%)"};default:case ba.Right:return{top:"50%",right:"0",transform:"rotate(-90deg) translateY(-100%)",transformOrigin:"right top"}}}function su(e){var t,n,i,o,a,s,{survey:u,forceDisableHtml:l,posthog:c,style:d={},previewPageIndex:h,removeSurveyFromFocus:f=(()=>{}),isPopup:v=!0,onPreviewSubmit:p=(()=>{}),onPopupSurveyDismissed:m=(()=>{}),onCloseConfirmationMessage:y=(()=>{})}=e,g=sa(null),b=Number.isInteger(h),w=null!=(t=u.appearance)&&t.surveyPopupDelaySeconds?1e3*u.appearance.surveyPopupDelaySeconds:0,{isPopupVisible:C,isSurveySent:I,hidePopupWithViewTransition:k}=function(e,t,r,n,i,o,a){var[s,u]=oa(n||0===r||e.type===wa.ExternalSurvey),[l,c]=oa(!1),d=()=>{var t=()=>{o&&i(e),u(!1)};Ks.startViewTransition?Ks.startViewTransition((()=>{var e;null==a||null==(e=a.current)||e.remove()})).finished.then((()=>{setTimeout((()=>{t()}),100)})):t()},h=t=>{t.detail.surveyId===e.id&&d()};return aa((()=>{if(t){if(!n){var i=t=>{var r,n;if(t.detail.surveyId===e.id){if(null==(r=e.appearance)||!r.displayThankYouMessage)return d();c(!0),null!=(n=e.appearance)&&n.autoDisappear&&setTimeout((()=>{d()}),5e3)}},o=()=>{vs(e)&&(u(!0),zs.dispatchEvent(new Event("PHSurveyShown")),t.capture(Sa.SHOWN,{[xa.SURVEY_NAME]:e.name,[xa.SURVEY_ID]:e.id,[xa.SURVEY_ITERATION]:e.current_iteration,[xa.SURVEY_ITERATION_START_DATE]:e.current_iteration_start_date,sessionRecordingUrl:null==t.get_session_replay_url?void 0:t.get_session_replay_url()}),localStorage.setItem("lastSeenSurveyDate",(new Date).toISOString()))};if(bi(zs,"PHSurveyClosed",h),bi(zs,"PHSurveySent",i),r>0){var a=setTimeout(o,r);return()=>{clearTimeout(a),zs.removeEventListener("PHSurveyClosed",h),zs.removeEventListener("PHSurveySent",i)}}return o(),()=>{zs.removeEventListener("PHSurveyClosed",h),zs.removeEventListener("PHSurveySent",i)}}}else Aa.error("usePopupVisibility hook called without a PostHog instance.")}),[]),iu({survey:e,removeSurveyFromFocus:i,setSurveyVisible:u,isPreviewMode:n}),{isPopupVisible:s,isSurveySent:l,setIsPopupVisible:u,hidePopupWithViewTransition:d}}(u,c,w,b,f,v,g),S=I||h===u.questions.length,x=ua((()=>{var e=ys(u);return{isPreviewMode:b,previewPageIndex:h,onPopupSurveyDismissed:()=>{is(u,c,b),m()},isPopup:v||!1,surveySubmissionId:(null==e?void 0:e.surveySubmissionId)||qa(),onPreviewSubmit:p,posthog:c}}),[b,h,v,c,u,m,p]);return C?Is(cs.Provider,{value:x,children:Is("div",{className:"ph-survey",style:r({},ou(u.type,null==(n=u.appearance)?void 0:n.position,null==(i=u.appearance)?void 0:i.widgetType),d),ref:g,children:S?Is(Os,{header:(null==(o=u.appearance)?void 0:o.thankYouMessageHeader)||"Thank you!",description:(null==(a=u.appearance)?void 0:a.thankYouMessageDescription)||"",forceDisableHtml:!!l,contentType:null==(s=u.appearance)?void 0:s.thankYouMessageDescriptionContentType,appearance:u.appearance||Ka,onClose:()=>{k(),y()}}):Is(uu,{survey:u,forceDisableHtml:!!l,posthog:c})})}):null}function uu(e){var t,{survey:n,forceDisableHtml:i,posthog:o}=e,[a,s]=oa((()=>{var e=ys(n);return null!=e&&e.responses&&Aa.info("Survey is already in progress, filling in initial responses"),(null==e?void 0:e.responses)||{}})),{previewPageIndex:u,onPopupSurveyDismissed:l,isPopup:c,onPreviewSubmit:d,surveySubmissionId:h,isPreviewMode:f}=la(cs),[v,p]=oa((()=>{var e=ys(n);return u||(null==e?void 0:e.lastQuestionIndex)||0})),m=ua((()=>us(n)),[n]);aa((()=>{f&&!zr(u)&&p(u)}),[u,f]);var y=m.at(v);return y?Is("form",{className:"survey-form",name:"surveyForm",children:[c&&!0!==(null==(t=n.appearance)?void 0:t.hideCancelButton)&&Is(Es,{onClick:()=>{l()}}),Is("div",{className:"survey-box",children:cu({question:y,forceDisableHtml:i,displayQuestionIndex:v,appearance:n.appearance||Ka,onSubmit:e=>(e=>{var{res:t,displayQuestionIndex:i,questionId:u}=e;if(o)if(u){var l=Xa(u),c=r({},a,{[l]:t});s(c);var d=Qs(n,i,t),f=d===Ia.End;f||(p(d),ms(n,{surveySubmissionId:h,responses:c,lastQuestionIndex:d})),(n.enable_partial_responses||f)&&ts({responses:c,survey:n,surveySubmissionId:h,isSurveyCompleted:f,posthog:o})}else Aa.error("onNextButtonClick called without a questionId.");else Aa.error("onNextButtonClick called without a PostHog instance.")})({res:e,displayQuestionIndex:v,questionId:y.id}),onPreviewSubmit:d,initialValue:y.id?a[Xa(y.id)]:void 0})})]}):null}function lu(e){var t,r,n,i,o,a,s,{survey:u,forceDisableHtml:l,posthog:c,readOnly:d}=e,[h,f]=oa(!0),[v,p]=oa(!1),[m,y]=oa({}),g=()=>{p(!v)};if(aa((()=>{var e;if(c){if(!d){"tab"===(null==(e=u.appearance)?void 0:e.widgetType)&&y({top:"50%",bottom:"auto"});var t=e=>{var t,r=e;(null==(t=r.detail)?void 0:t.surveyId)===u.id&&(Aa.info("Received show event for feedback button survey "+u.id),y(r.detail.position||{}),g())};return bi(zs,Us,t),()=>{zs.removeEventListener(Us,t)}}}else Aa.error("FeedbackWidget called without a PostHog instance.")}),[c,d,u.id,null==(t=u.appearance)?void 0:t.widgetType,null==(r=u.appearance)?void 0:r.widgetSelector,null==(n=u.appearance)?void 0:n.borderColor]),iu({survey:u,setSurveyVisible:f}),!h)return null;var b=()=>{u.schedule!==ka.Always&&f(!1),setTimeout((()=>{p(!1)}),200)};return Is(Ao,{children:["tab"===(null==(i=u.appearance)?void 0:i.widgetType)&&Is("button",{className:"ph-survey-widget-tab "+((null==(o=u.appearance)?void 0:o.tabPosition)===ba.Top?"widget-tab-top":""),onClick:g,disabled:d,style:au(null==(a=u.appearance)?void 0:a.tabPosition),children:(null==(s=u.appearance)?void 0:s.widgetLabel)||""}),v&&Is(su,{posthog:c,survey:u,forceDisableHtml:l,style:m,onPopupSurveyDismissed:b,onCloseConfirmationMessage:b})]})}var cu=e=>{var{question:t,forceDisableHtml:n,displayQuestionIndex:i,appearance:o,onSubmit:a,onPreviewSubmit:s,initialValue:u}=e,l={forceDisableHtml:n,appearance:o,onPreviewSubmit:e=>{s(e)},onSubmit:e=>{a(e)},initialValue:u,displayQuestionIndex:i};switch(t.type){case Ca.Open:return So(Ls,r({},l,{question:t,key:t.id}));case Ca.Link:return So(Ds,r({},l,{question:t,key:t.id}));case Ca.Rating:return So(qs,r({},l,{question:t,key:t.id}));case Ca.SingleChoice:case Ca.MultipleChoice:return So(Ps,r({},l,{question:t,key:t.id}));default:return Aa.error("Unsupported question type: "+t.type),null}};ui.__PosthogExtensions__=ui.__PosthogExtensions__||{},ui.__PosthogExtensions__.generateSurveys=nu,ui.extendPostHogWithSurveys=nu,fi("[Error tracking]");var du=fi("[ExceptionAutocapture]"),hu=new Rn([new Wn,new ti,new Xn,new jn,new $n,new Qn,new Kn,new ei],Gn()),fu={wrapOnError:e=>{var t=ri;t||du.info("window not available, cannot wrap onerror");var r=t.onerror;return t.onerror=function(){for(var t,n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];var a=i[4],s=i[0],u=hu.buildFromUnknown(a||s,{mechanism:{handled:!1}});return e(u),null!==(t=null==r?void 0:r(...i))&&void 0!==t&&t},t.onerror.__POSTHOG_INSTRUMENTED__=!0,()=>{var e;null==(e=t.onerror)||delete e.__POSTHOG_INSTRUMENTED__,t.onerror=r}},wrapUnhandledRejection:e=>{var t=ri;t||du.info("window not available, cannot wrap onUnhandledRejection");var r=t.onunhandledrejection;return t.onunhandledrejection=function(n){var i,o=hu.buildFromUnknown(n,{mechanism:{handled:!1}});return e(o),null!==(i=null==r?void 0:r.apply(t,[n]))&&void 0!==i&&i},t.onunhandledrejection.__POSTHOG_INSTRUMENTED__=!0,()=>{var e;null==(e=t.onunhandledrejection)||delete e.__POSTHOG_INSTRUMENTED__,t.onunhandledrejection=r}},wrapConsoleError:e=>{var t=console;t||du.info("console not available, cannot wrap console.error");var r=t.error;return t.error=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];var o=n.join(" "),a=n.find((e=>e instanceof Error)),s=hu.buildFromUnknown(a||o,{mechanism:{handled:!1},syntheticException:new Error("PostHog syntheticException")});return e(s),null==r?void 0:r(...n)},t.error.__POSTHOG_INSTRUMENTED__=!0,()=>{var e;null==(e=t.error)||delete e.__POSTHOG_INSTRUMENTED__,t.error=r}}};ui.__PosthogExtensions__=ui.__PosthogExtensions__||{},ui.__PosthogExtensions__.errorWrappingFunctions=fu,ui.posthogErrorWrappingFunctions=fu;var vu=(e,t,r,n)=>{var i;try{i=new URL(n.url).hostname}catch(e){return}if(!Gr(e)||e.includes(i)){if(r){var{sessionId:o,windowId:a}=r.checkAndGetSessionAndWindowId(!0);n.headers.set("X-POSTHOG-SESSION-ID",o),n.headers.set("X-POSTHOG-WINDOW-ID",a)}"$posthog_cookieless"!==t&&n.headers.set("X-POSTHOG-DISTINCT-ID",t)}};ui.__PosthogExtensions__=ui.__PosthogExtensions__||{};var pu={_patchFetch:(e,r,n)=>Ci(ri,"fetch",(i=>function(){var o=t((function*(t,o){var a=new Request(t,o);return vu(e,r,n,a),i(a)}));return function(e,t){return o.apply(this,arguments)}}())),_patchXHR:(e,t,r)=>Ci(ri.XMLHttpRequest.prototype,"open",(n=>function(i,o,a,s,u){void 0===a&&(a=!0);var l=new Request(o);return vu(e,t,r,l),n.call(this,i,l.url,a,s,u)}))};ui.__PosthogExtensions__.tracingHeadersPatchFns=pu,ui.postHogTracingHeadersPatchFns=pu;var mu,yu,gu=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},bu=function(e){if("loading"===document.readyState)return"loading";var t=gu();if(t){if(e<t.domInteractive)return"loading";if(0===t.domContentLoadedEventStart||e<t.domContentLoadedEventStart)return"dom-interactive";if(0===t.domComplete||e<t.domComplete)return"dom-content-loaded"}return"complete"},wu=function(e){var t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},Cu=function(e,t){var r="";try{for(;e&&9!==e.nodeType;){var n=e,i=n.id?"#"+n.id:wu(n)+(n.classList&&n.classList.value&&n.classList.value.trim()&&n.classList.value.trim().length?"."+n.classList.value.trim().replace(/\s+/g,"."):"");if(r.length+i.length>(t||100)-1)return r||i;if(r=r?i+">"+r:i,n.id)break;e=n.parentNode}}catch(e){}return r},Iu=-1,ku=function(){return Iu},Su=function(e){addEventListener("pageshow",(function(t){t.persisted&&(Iu=t.timeStamp,e(t))}),!0)},xu=function(){var e=gu();return e&&e.activationStart||0},Au=function(e,t){var r=gu(),n="navigate";return ku()>=0?n="back-forward-cache":r&&(document.prerendering||xu()>0?n="prerender":document.wasDiscarded?n="restore":r.type&&(n=r.type.replace(/_/g,"-"))),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:n}},Tu=function(e,t,r){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var n=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return n.observe(Object.assign({type:e,buffered:!0},r||{})),n}}catch(e){}},Nu=function(e,t,r,n){var i,o;return function(a){t.value>=0&&(a||n)&&((o=t.value-(i||0))||void 0===i)&&(i=t.value,t.delta=o,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,r),e(t))}},Mu=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},_u=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},Ru=function(e){var t=!1;return function(){t||(e(),t=!0)}},Fu=-1,Eu=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},Zu=function(e){"hidden"===document.visibilityState&&Fu>-1&&(Fu="visibilitychange"===e.type?e.timeStamp:0,Bu())},Ou=function(){addEventListener("visibilitychange",Zu,!0),addEventListener("prerenderingchange",Zu,!0)},Bu=function(){removeEventListener("visibilitychange",Zu,!0),removeEventListener("prerenderingchange",Zu,!0)},Lu=function(){return Fu<0&&(Fu=Eu(),Ou(),Su((function(){setTimeout((function(){Fu=Eu(),Ou()}),0)}))),{get firstHiddenTime(){return Fu}}},Du=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},qu=[1800,3e3],Vu=function(e,t){t=t||{},Du((function(){var r,n=Lu(),i=Au("FCP"),o=Tu("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime<n.firstHiddenTime&&(i.value=Math.max(e.startTime-xu(),0),i.entries.push(e),r(!0)))}))}));o&&(r=Nu(e,i,qu,t.reportAllChanges),Su((function(n){i=Au("FCP"),r=Nu(e,i,qu,t.reportAllChanges),Mu((function(){i.value=performance.now()-n.timeStamp,r(!0)}))})))}))},Pu=[.1,.25],Yu=0,Hu=1/0,Gu=0,Wu=function(e){e.forEach((function(e){e.interactionId&&(Hu=Math.min(Hu,e.interactionId),Gu=Math.max(Gu,e.interactionId),Yu=Gu?(Gu-Hu)/7+1:0)}))},ju=function(){return mu?Yu:performance.interactionCount||0},Xu=function(){"interactionCount"in performance||mu||(mu=Tu("event",Wu,{type:"event",buffered:!0,durationThreshold:0}))},zu=[],Ku=new Map,Uu=0,Ju=[],Qu=function(e){if(Ju.forEach((function(t){return t(e)})),e.interactionId||"first-input"===e.entryType){var t=zu[zu.length-1],r=Ku.get(e.interactionId);if(r||zu.length<10||e.duration>t.latency){if(r)e.duration>r.latency?(r.entries=[e],r.latency=e.duration):e.duration===r.latency&&e.startTime===r.entries[0].startTime&&r.entries.push(e);else{var n={id:e.interactionId,latency:e.duration,entries:[e]};Ku.set(n.id,n),zu.push(n)}zu.sort((function(e,t){return t.latency-e.latency})),zu.length>10&&zu.splice(10).forEach((function(e){return Ku.delete(e.id)}))}}},$u=function(e){var t=self.requestIdleCallback||self.setTimeout,r=-1;return e=Ru(e),"hidden"===document.visibilityState?e():(r=t(e),_u(e)),r},el=[200,500],tl=function(e,t){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(t=t||{},Du((function(){var r;Xu();var n,i=Au("INP"),o=function(e){$u((function(){e.forEach(Qu);var t=function(){var e=Math.min(zu.length-1,Math.floor((ju()-Uu)/50));return zu[e]}();t&&t.latency!==i.value&&(i.value=t.latency,i.entries=t.entries,n())}))},a=Tu("event",o,{durationThreshold:null!==(r=t.durationThreshold)&&void 0!==r?r:40});n=Nu(e,i,el,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),_u((function(){o(a.takeRecords()),n(!0)})),Su((function(){Uu=ju(),zu.length=0,Ku.clear(),i=Au("INP"),n=Nu(e,i,el,t.reportAllChanges)})))})))},rl=[],nl=[],il=0,ol=new WeakMap,al=new Map,sl=-1,ul=function(e){rl=rl.concat(e),ll()},ll=function(){sl<0&&(sl=$u(cl))},cl=function(){al.size>10&&al.forEach((function(e,t){Ku.has(t)||al.delete(t)}));var e=zu.map((function(e){return ol.get(e.entries[0])})),t=nl.length-50;nl=nl.filter((function(r,n){return n>=t||e.includes(r)}));for(var r=new Set,n=0;n<nl.length;n++){var i=nl[n];dl(i.startTime,i.processingEnd).forEach((function(e){r.add(e)}))}var o=rl.length-1-50;rl=rl.filter((function(e,t){return e.startTime>il&&t>o||r.has(e)})),sl=-1};Ju.push((function(e){e.interactionId&&e.target&&!al.has(e.interactionId)&&al.set(e.interactionId,e.target)}),(function(e){var t,r=e.startTime+e.duration;il=Math.max(il,e.processingEnd);for(var n=nl.length-1;n>=0;n--){var i=nl[n];if(Math.abs(r-i.renderTime)<=8){(t=i).startTime=Math.min(e.startTime,t.startTime),t.processingStart=Math.min(e.processingStart,t.processingStart),t.processingEnd=Math.max(e.processingEnd,t.processingEnd),t.entries.push(e);break}}t||(t={startTime:e.startTime,processingStart:e.processingStart,processingEnd:e.processingEnd,renderTime:r,entries:[e]},nl.push(t)),(e.interactionId||"first-input"===e.entryType)&&ol.set(e,t),ll()}));var dl=function(e,t){for(var r,n=[],i=0;r=rl[i];i++)if(!(r.startTime+r.duration<e)){if(r.startTime>t)break;n.push(r)}return n},hl=[2500,4e3],fl={},vl={onLCP:function(e,t){!function(e,t){t=t||{},Du((function(){var r,n=Lu(),i=Au("LCP"),o=function(e){t.reportAllChanges||(e=e.slice(-1)),e.forEach((function(e){e.startTime<n.firstHiddenTime&&(i.value=Math.max(e.startTime-xu(),0),i.entries=[e],r())}))},a=Tu("largest-contentful-paint",o);if(a){r=Nu(e,i,hl,t.reportAllChanges);var s=Ru((function(){fl[i.id]||(o(a.takeRecords()),a.disconnect(),fl[i.id]=!0,r(!0))}));["keydown","click"].forEach((function(e){addEventListener(e,(function(){return $u(s)}),{once:!0,capture:!0})})),_u(s),Su((function(n){i=Au("LCP"),r=Nu(e,i,hl,t.reportAllChanges),Mu((function(){i.value=performance.now()-n.timeStamp,fl[i.id]=!0,r(!0)}))}))}}))}((function(t){var r=function(e){var t={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:e.value};if(e.entries.length){var r=gu();if(r){var n=r.activationStart||0,i=e.entries[e.entries.length-1],o=i.url&&performance.getEntriesByType("resource").filter((function(e){return e.name===i.url}))[0],a=Math.max(0,r.responseStart-n),s=Math.max(a,o?(o.requestStart||o.startTime)-n:0),u=Math.max(s,o?o.responseEnd-n:0),l=Math.max(u,i.startTime-n);t={element:Cu(i.element),timeToFirstByte:a,resourceLoadDelay:s-a,resourceLoadDuration:u-s,elementRenderDelay:l-u,navigationEntry:r,lcpEntry:i},i.url&&(t.url=i.url),o&&(t.lcpResourceEntry=o)}}return Object.assign(e,{attribution:t})}(t);e(r)}),t)},onCLS:function(e,t){!function(e,t){t=t||{},Vu(Ru((function(){var r,n=Au("CLS",0),i=0,o=[],a=function(e){e.forEach((function(e){if(!e.hadRecentInput){var t=o[0],r=o[o.length-1];i&&e.startTime-r.startTime<1e3&&e.startTime-t.startTime<5e3?(i+=e.value,o.push(e)):(i=e.value,o=[e])}})),i>n.value&&(n.value=i,n.entries=o,r())},s=Tu("layout-shift",a);s&&(r=Nu(e,n,Pu,t.reportAllChanges),_u((function(){a(s.takeRecords()),r(!0)})),Su((function(){i=0,n=Au("CLS",0),r=Nu(e,n,Pu,t.reportAllChanges),Mu((function(){return r()}))})),setTimeout(r,0))})))}((function(t){var r=function(e){var t,r={};if(e.entries.length){var n=e.entries.reduce((function(e,t){return e&&e.value>t.value?e:t}));if(n&&n.sources&&n.sources.length){var i=(t=n.sources).find((function(e){return e.node&&1===e.node.nodeType}))||t[0];i&&(r={largestShiftTarget:Cu(i.node),largestShiftTime:n.startTime,largestShiftValue:n.value,largestShiftSource:i,largestShiftEntry:n,loadState:bu(n.startTime)})}}return Object.assign(e,{attribution:r})}(t);e(r)}),t)},onFCP:function(e,t){Vu((function(t){var r=function(e){var t={timeToFirstByte:0,firstByteToFCP:e.value,loadState:bu(ku())};if(e.entries.length){var r=gu(),n=e.entries[e.entries.length-1];if(r){var i=r.activationStart||0,o=Math.max(0,r.responseStart-i);t={timeToFirstByte:o,firstByteToFCP:e.value-o,loadState:bu(e.entries[0].startTime),navigationEntry:r,fcpEntry:n}}}return Object.assign(e,{attribution:t})}(t);e(r)}),t)},onINP:function(e,t){yu||(yu=Tu("long-animation-frame",ul)),tl((function(t){var r=function(e){var t=e.entries[0],r=ol.get(t),n=t.processingStart,i=r.processingEnd,o=r.entries.sort((function(e,t){return e.processingStart-t.processingStart})),a=dl(t.startTime,i),s=e.entries.find((function(e){return e.target})),u=s&&s.target||al.get(t.interactionId),l=[t.startTime+t.duration,i].concat(a.map((function(e){return e.startTime+e.duration}))),c=Math.max.apply(Math,l),d={interactionTarget:Cu(u),interactionTargetElement:u,interactionType:t.name.startsWith("key")?"keyboard":"pointer",interactionTime:t.startTime,nextPaintTime:c,processedEventEntries:o,longAnimationFrameEntries:a,inputDelay:n-t.startTime,processingDuration:i-n,presentationDelay:Math.max(c-i,0),loadState:bu(t.startTime)};return Object.assign(e,{attribution:d})}(t);e(r)}),t)}};function pl(e,t){return t.length>e?t.slice(0,e)+"...":t}function ml(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do{t=t.previousSibling}while(t&&!ki(t));return t}function yl(e,t,r,n){var i=e.tagName.toLowerCase(),o={tag_name:i};Ni.indexOf(i)>-1&&!r&&("a"===i.toLowerCase()||"button"===i.toLowerCase()?o.$el_text=pl(1024,Di(e)):o.$el_text=pl(1024,Ti(e)));var a=Ai(e);a.length>0&&(o.classes=a.filter((function(e){return""!==e}))),mi(e.attributes,(function(r){var i;if((!_i(e)||-1!==["name","id","class","aria-label"].indexOf(r.name))&&((null==n||!n.includes(r.name))&&!t&&Li(r.value)&&(i=r.name,!Kr(i)||"_ngcontent"!==i.substring(0,10)&&"_nghost"!==i.substring(0,7)))){var a=r.value;"class"===r.name&&(a=xi(a).join(" ")),o["attr__"+r.name]=pl(1024,a)}}));for(var s=1,u=1,l=e;l=ml(l);)s++,l.tagName===e.tagName&&u++;return o.nth_child=s,o.nth_of_type=u,o}function gl(e,t){for(var r,n,i,{e:o,maskAllElementAttributes:a,maskAllText:s,elementAttributeIgnoreList:u}=t,l=[e],c=e;c.parentNode&&!Si(c,"body");)(i=c.parentNode)&&11===i.nodeType?(l.push(c.parentNode.host),c=c.parentNode.host):(l.push(c.parentNode),c=c.parentNode);var d,h,f,v=[],p={},m=!1,y=!1;if(mi(l,(e=>{var t=Mi(e);"a"===e.tagName.toLowerCase()&&(m=e.getAttribute("href"),m=t&&m&&Li(m)&&m),Dr(Ai(e),"ph-no-capture")&&(y=!0),v.push(yl(e,a,s,u));var r=function(e){if(!Mi(e))return{};var t={};return mi(e.attributes,(function(e){if(e.name&&0===e.name.indexOf("data-ph-capture-attribute")){var r=e.name.replace("data-ph-capture-attribute-",""),n=e.value;r&&n&&Li(n)&&(t[r]=n)}})),t}(e);yi(p,r)})),y)return{props:{},explicitNoCapture:y};if(s||("a"===e.tagName.toLowerCase()||"button"===e.tagName.toLowerCase()?v[0].$el_text=Di(e):v[0].$el_text=Ti(e)),m){var g,b;v[0].attr__href=m;var w=null==(h=m,f=null==ai?void 0:ai.createElement("a"),g=zr(f)?null:(f.href=h,f))?void 0:g.host,C=null==ri||null==(b=ri.location)?void 0:b.host;w&&C&&w!==C&&(d=m)}return{props:yi({$event_type:o.type,$ce_version:1},{$elements:v},{$elements_chain:Vi(v)},null!=(r=v[0])&&r.$el_text?{$el_text:null==(n=v[0])?void 0:n.$el_text}:{},d&&"click"===o.type?{$external_click_url:d}:{},p)}}ui.__PosthogExtensions__=ui.__PosthogExtensions__||{},ui.__PosthogExtensions__.postHogWebVitalsCallbacks=vl,ui.postHogWebVitalsCallbacks=vl,fi("[AutoCapture]");var bl={};function wl(e){return function(e,t){var r=bl[e];if(r)return r;var n=t[e];if(jr(n)&&!li())return bl[e]=n.bind(t);var i=t.document;if(i&&Wr(i.createElement))try{var o=i.createElement("iframe");o.hidden=!0,i.head.appendChild(o);var a=o.contentWindow;a&&a[e]&&(n=a[e]),i.head.removeChild(o)}catch(t){hi.warn("Could not create sandbox iframe for "+e+" check, bailing to assignableWindow."+e+": ",t)}return n&&Wr(n)?bl[e]=n.bind(t):n}("MutationObserver",e)}function Cl(e){var t=function(e){return zr(e.target)?e.srcElement||null:null!=(t=e.target)&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t}(e);return t?{node:t,originalEvent:e,timestamp:Date.now()}:null}function Il(e,t){return Qr(e)&&e>=t}class kl{W(e){var t,r,n,i,o,a=this.j((null==e?void 0:e.__onCapture)||this.X.bind(this));return{element_attribute_ignorelist:null!==(t=null==e?void 0:e.element_attribute_ignorelist)&&void 0!==t?t:a.element_attribute_ignorelist,scroll_threshold_ms:null!==(r=null==e?void 0:e.scroll_threshold_ms)&&void 0!==r?r:a.scroll_threshold_ms,selection_change_threshold_ms:null!==(n=null==e?void 0:e.selection_change_threshold_ms)&&void 0!==n?n:a.selection_change_threshold_ms,mutation_threshold_ms:null!==(i=null==e?void 0:e.mutation_threshold_ms)&&void 0!==i?i:a.mutation_threshold_ms,capture_clicks_with_modifier_keys:null!==(o=null==e?void 0:e.capture_clicks_with_modifier_keys)&&void 0!==o?o:a.capture_clicks_with_modifier_keys,__onCapture:a.__onCapture}}constructor(e,t){this.K=[],this.j=e=>({element_attribute_ignorelist:[],scroll_threshold_ms:100,selection_change_threshold_ms:100,mutation_threshold_ms:2500,capture_clicks_with_modifier_keys:!1,__onCapture:e}),this.U=e=>{var t=Cl(e);Ur(t)||this.J(t)||this.K.push(t),this.K.length&&zr(this.$)&&(this.$=ui.setTimeout((()=>{this.ee()}),1e3))},this.te=()=>{var e=Date.now();e%50==0&&this.K.forEach((t=>{zr(t.scrollDelayMs)&&(t.scrollDelayMs=e-t.timestamp)}))},this.re=()=>{this.ne=Date.now()},this.instance=e,this.ie=this.W(t),this._onCapture=this.ie.__onCapture}start(e){this.oe(),this.ae(),this.se(),this.ue(e)}ue(e){if(!this.le){var t=wl(ui);this.le=new t((e=>{this.ce(e)})),this.le.observe(e,{attributes:!0,characterData:!0,childList:!0,subtree:!0})}}stop(){var e;null==(e=this.le)||e.disconnect(),this.le=void 0,ui.removeEventListener("click",this.U),ui.removeEventListener("scroll",this.te,{capture:!0}),ui.removeEventListener("selectionchange",this.re)}ce(e){this.de=Date.now()}oe(){bi(ui,"click",this.U)}ae(){bi(ui,"scroll",this.te,{capture:!0})}se(){bi(ui,"selectionchange",this.re)}J(e){if(!e)return!0;if(!this.ie.capture_clicks_with_modifier_keys&&((t=e.originalEvent).ctrlKey||t.metaKey||t.altKey||t.shiftKey))return!0;var t,r;if((r=e.node)instanceof Element&&("__POSTHOG_TOOLBAR__"===r.id||null!=r.closest&&r.closest(".toolbar-global-fade-container")))return!0;var n=this.K.some((t=>t.node===e.node&&Math.abs(t.timestamp-e.timestamp)<1e3));return!!n||!(!Si(e.node,"html")&&ki(e.node)&&!Ni.includes(e.node.tagName.toLowerCase()))}ee(){if(this.K.length){clearTimeout(this.$),this.$=void 0;var e=this.K;for(var t of(this.K=[],e)){var r;t.mutationDelayMs=null!==(r=t.mutationDelayMs)&&void 0!==r?r:this.de&&t.timestamp<=this.de?this.de-t.timestamp:void 0,t.absoluteDelayMs=Date.now()-t.timestamp,t.selectionChangedDelayMs=this.ne&&t.timestamp<=this.ne?this.ne-t.timestamp:void 0;var n=Il(t.scrollDelayMs,this.ie.scroll_threshold_ms),i=Il(t.selectionChangedDelayMs,this.ie.selection_change_threshold_ms),o=Il(t.mutationDelayMs,this.ie.mutation_threshold_ms),a=Il(t.absoluteDelayMs,1.1*this.ie.mutation_threshold_ms),s=Qr(t.scrollDelayMs)&&t.scrollDelayMs<this.ie.scroll_threshold_ms,u=Qr(t.mutationDelayMs)&&t.mutationDelayMs<this.ie.mutation_threshold_ms,l=Qr(t.selectionChangedDelayMs)&&t.selectionChangedDelayMs<this.ie.selection_change_threshold_ms;s||u||l||(n||o||a||i?this._onCapture(t,{$dead_click_last_mutation_timestamp:this.de,$dead_click_event_timestamp:t.timestamp,$dead_click_scroll_timeout:n,$dead_click_mutation_timeout:o,$dead_click_absolute_timeout:a,$dead_click_selection_changed_timeout:i}):t.absoluteDelayMs<this.ie.mutation_threshold_ms&&this.K.push(t))}this.K.length&&zr(this.$)&&(this.$=ui.setTimeout((()=>{this.ee()}),1e3))}}X(e,t){this.instance.capture("$dead_click",r({},t,gl(e.node,{e:e.originalEvent,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.ie.element_attribute_ignorelist}).props,{$dead_click_scroll_delay_ms:e.scrollDelayMs,$dead_click_mutation_delay_ms:e.mutationDelayMs,$dead_click_absolute_delay_ms:e.absoluteDelayMs,$dead_click_selection_changed_delay_ms:e.selectionChangedDelayMs}),{timestamp:new Date(e.timestamp)})}}ui.__PosthogExtensions__=ui.__PosthogExtensions__||{},ui.__PosthogExtensions__.initDeadClicksAutocapture=(e,t)=>new kl(e,t)}();
|
|
1
|
+
!function(){"use strict";function e(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function t(t){return function(){var r=this,n=arguments;return new Promise((function(i,o){var a=t.apply(r,n);function s(t){e(a,i,o,s,u,"next",t)}function u(t){e(a,i,o,s,u,"throw",t)}s(void 0)}))}}function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},r.apply(null,arguments)}var n,i=["type"],o=Object.defineProperty,a=(e,t,r)=>((e,t,r)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),s=Object.defineProperty,u=(e,t,r)=>((e,t,r)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),l=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(l||{}),c={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},d={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]};var h={};function f(e){if(h[e])return h[e];var t=function(e){var t,r=null==globalThis||null==(t=globalThis.Zone)||null==t.__symbol__?void 0:t.__symbol__(e);return r&&globalThis[r]?globalThis[r]:void 0}(e)||globalThis[e],r=t.prototype,n=e in c?c[e]:void 0,i=Boolean(n&&n.every((e=>{var t,n;return Boolean(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))}))),o=e in d?d[e]:void 0,a=Boolean(o&&o.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(i&&a)return h[e]=t.prototype,t.prototype;try{var s=document.createElement("iframe");document.body.appendChild(s);var u=s.contentWindow;if(!u)return t.prototype;var l=u[e].prototype;return document.body.removeChild(s),l?h[e]=l:t.prototype}catch(e){return t.prototype}}var v={};function p(e,t,r){var n,i=e+"."+String(r);if(v[i])return v[i].call(t);var o=f(e),a=null==(n=Object.getOwnPropertyDescriptor(o,r))?void 0:n.get;return a?(v[i]=a,a.call(t)):t[r]}var m={};function y(e,t,r){var n=e+"."+String(r);if(m[n])return m[n].bind(t);var i=f(e)[r];return"function"!=typeof i?t[r]:(m[n]=i,i.bind(t))}var g={childNodes:function(e){return p("Node",e,"childNodes")},parentNode:function(e){return p("Node",e,"parentNode")},parentElement:function(e){return p("Node",e,"parentElement")},textContent:function(e){return p("Node",e,"textContent")},contains:function(e,t){return y("Node",e,"contains")(t)},getRootNode:function(e){return y("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?p("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?p("Element",e,"shadowRoot"):null},querySelector:function(e,t){return p("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return p("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return f("MutationObserver").constructor}};function b(e){return e.nodeType===e.ELEMENT_NODE}function w(e){var t=e&&"host"in e&&"mode"in e&&g.host(e)||null;return Boolean(t&&"shadowRoot"in t&&g.shadowRoot(t)===e)}function C(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function I(e){try{var t=e.rules||e.cssRules;if(!t)return null;var r=Array.from(t,(t=>k(t,e.href))).join("");return(n=r).includes(" background-clip: text;")&&!n.includes(" -webkit-background-clip: text;")&&(n=n.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),n}catch(e){return null}var n}function k(e,t){if(function(e){return"styleSheet"in e}(e)){var r;try{r=I(e.styleSheet)||function(e){var{cssText:t}=e;if(t.split('"').length<3)return t;var r=["@import","url("+JSON.stringify(e.href)+")"];return""===e.layerName?r.push("layer"):e.layerName&&r.push("layer("+e.layerName+")"),e.supportsText&&r.push("supports("+e.supportsText+")"),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}(e)}catch(t){r=e.cssText}return e.styleSheet.href?O(r,e.styleSheet.href):r}var n,i=e.cssText;return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(n=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,i=i.replace(n,"$1\\$2")),t?O(i,t):i}function S(e,t){return Array.from(e.styleSheets).find((e=>e.href===t))}let x=class{constructor(){u(this,"idNodeMap",new Map),u(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;var r=null==(t=this.getMeta(e))?void 0:t.id;return null!=r?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){var t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach((e=>this.removeNodeFromMap(e)))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){var r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){var r=this.getNode(e);if(r){var n=this.nodeMetaMap.get(r);n&&this.nodeMetaMap.set(t,n)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function A(e){var{element:t,maskInputOptions:r,tagName:n,type:i,value:o,maskInputFn:a}=e,s=o||"",u=i&&T(i);return(r[n.toLowerCase()]||u&&r[u])&&(s=a?a(s,t):"*".repeat(s.length)),s}function T(e){return e.toLowerCase()}var N="__rrweb_original__";function M(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?T(t):null}function _(e,t){var r,n;try{n=new URL(e,null!=t?t:window.location.href)}catch(e){return null}var i=n.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(r=null==i?void 0:i[1])&&void 0!==r?r:null}var R=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,F=/^(?:[a-z+]+:)?\/\//i,E=/^www\..*/i,Z=/^(data:)([^,]*),(.*)/i;function O(e,t){return(e||"").replace(R,((e,r,n,i,o,a)=>{var s,u=n||o||a,l=r||i||"";if(!u)return e;if(F.test(u)||E.test(u))return"url("+l+u+l+")";if(Z.test(u))return"url("+l+u+l+")";if("/"===u[0])return"url("+l+(((s=t).indexOf("//")>-1?s.split("/").slice(0,3).join("/"):s.split("/")[0]).split("?")[0]+u)+l+")";var c=t.split("/"),d=u.split("/");for(var h of(c.pop(),d))"."!==h&&(".."===h?c.pop():c.push(h));return"url("+l+c.join("/")+l+")"}))}var B,L,D=1,q=new RegExp("[^a-z0-9-_:]"),V=-2;function P(){return D++}var Y=/^[^ \t\n\r\u000c]+/,H=/^[, \t\n\r\u000c]+/;var G=new WeakMap;function W(e,t){return t&&""!==t.trim()?X(e,t):t}function j(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function X(e,t){var r=G.get(e);if(r||(r=e.createElement("a"),G.set(e,r)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return r.setAttribute("href",t),r.href}function z(e,t,r,n){return n?"src"===r||"href"===r&&("use"!==t||"#"!==n[0])||"xlink:href"===r&&"#"!==n[0]?W(e,n):"background"!==r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===r?function(e,t){if(""===t.trim())return t;var r=0;function n(e){var n,i=e.exec(t.substring(r));return i?(n=i[0],r+=n.length,n):""}for(var i=[];n(H),!(r>=t.length);){var o=n(Y);if(","===o.slice(-1))o=W(e,o.substring(0,o.length-1)),i.push(o);else{var a="";o=W(e,o);for(var s=!1;;){var u=t.charAt(r);if(""===u){i.push((o+a).trim());break}if(s)")"===u&&(s=!1);else{if(","===u){r+=1,i.push((o+a).trim());break}"("===u&&(s=!0)}a+=u,r+=1}}}return i.join(", ")}(e,n):"style"===r?O(n,X(e)):"object"===t&&"data"===r?W(e,n):n:W(e,n):n}function K(e,t,r){return("video"===e||"audio"===e)&&"autoplay"===t}function U(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&U(g.parentNode(e),t,r);for(var n=e.classList.length;n--;){var i=e.classList[n];if(t.test(i))return!0}return!!r&&U(g.parentNode(e),t,r)}function J(e,t,r,n){var i;if(b(e)){if(i=e,!g.childNodes(i).length)return!1}else{if(null===g.parentElement(e))return!1;i=g.parentElement(e)}try{if("string"==typeof t){if(n){if(i.closest("."+t))return!0}else if(i.classList.contains(t))return!0}else if(U(i,t,n))return!0;if(r)if(n){if(i.closest(r))return!0}else if(i.matches(r))return!0}catch(e){}return!1}function Q(e,t){var{doc:r,mirror:n,blockClass:i,blockSelector:o,needsMask:a,inlineStylesheet:s,maskInputOptions:u={},maskTextFn:c,maskInputFn:d,dataURLOptions:h={},inlineImages:f,recordCanvas:v,keepIframeSrcFn:p,newlyAddedElement:m=!1}=t,y=function(e,t){if(!t.hasNode(e))return;var r=t.getId(e);return 1===r?void 0:r}(r,n);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:l.Document,childNodes:[],compatMode:e.compatMode}:{type:l.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:l.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:y};case e.ELEMENT_NODE:return function(e,t){for(var r,{doc:n,blockClass:i,blockSelector:o,inlineStylesheet:a,maskInputOptions:s={},maskInputFn:u,dataURLOptions:c={},inlineImages:d,recordCanvas:h,keepIframeSrcFn:f,newlyAddedElement:v=!1,rootId:p}=t,m=function(e,t,r){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var n=e.classList.length;n--;){var i=e.classList[n];if(t.test(i))return!0}if(r)return e.matches(r)}catch(e){}return!1}(e,i,o),y=function(e){if(e instanceof HTMLFormElement)return"form";var t=T(e.tagName);return q.test(t)?"div":t}(e),b={},w=e.attributes.length,C=0;C<w;C++){var k=e.attributes[C];K(y,k.name,k.value)||(b[k.name]=z(n,y,T(k.name),k.value))}if("link"===y&&a){var x=function(e){return null==e?void 0:e.href}(e);if(x){var _=S(n,x);if(!_&&x.includes(".css"))_=S(n,window.location.origin+"/"+x.replace(window.location.href,""));var R=null;_&&(R=I(_)),R&&(delete b.rel,delete b.href,b._cssText=R)}}if("style"===y&&e.sheet&&!(e.innerText||g.textContent(e)||"").trim().length){var F=I(e.sheet);F&&(b._cssText=F)}if("input"===y||"textarea"===y||"select"===y){var E=e.value,Z=e.checked;"radio"!==b.type&&"checkbox"!==b.type&&"submit"!==b.type&&"button"!==b.type&&E?b.value=A({element:e,type:M(e),tagName:y,value:E,maskInputOptions:s,maskInputFn:u}):Z&&(b.checked=Z)}"option"===y&&(e.selected&&!s.select?b.selected=!0:delete b.selected);if("dialog"===y&&e.open)try{b.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"}catch(e){b.rr_open_mode="modal",b.ph_rr_could_not_detect_modal=!0}if("canvas"===y&&h)if("2d"===e.__context)(function(e){var t=e.getContext("2d");if(!t)return!0;for(var r=0;r<e.width;r+=50)for(var n=0;n<e.height;n+=50){var i=t.getImageData,o=N in i?i[N]:i;if(new Uint32Array(o.call(t,r,n,Math.min(50,e.width-r),Math.min(50,e.height-n)).data.buffer).some((e=>0!==e)))return!1}return!0})(e)||(b.rr_dataURL=e.toDataURL(c.type,c.quality));else if(!("__context"in e)){var O=e.toDataURL(c.type,c.quality),D=n.createElement("canvas");D.width=e.width,D.height=e.height,O!==D.toDataURL(c.type,c.quality)&&(b.rr_dataURL=O)}if("img"===y&&d){B||(B=n.createElement("canvas"),L=B.getContext("2d"));var V=e,P=V.currentSrc||V.getAttribute("src")||"<unknown-src>",Y=V.crossOrigin,H=()=>{V.removeEventListener("load",H);try{B.width=V.naturalWidth,B.height=V.naturalHeight,L.drawImage(V,0,0),b.rr_dataURL=B.toDataURL(c.type,c.quality)}catch(e){if("anonymous"!==V.crossOrigin)return V.crossOrigin="anonymous",void(V.complete&&0!==V.naturalWidth?H():V.addEventListener("load",H));console.warn("Cannot inline img src="+P+"! Error: "+e)}"anonymous"===V.crossOrigin&&(Y?b.crossOrigin=Y:V.removeAttribute("crossorigin"))};V.complete&&0!==V.naturalWidth?H():V.addEventListener("load",H)}if("audio"===y||"video"===y){var G=b;G.rr_mediaState=e.paused?"paused":"played",G.rr_mediaCurrentTime=e.currentTime,G.rr_mediaPlaybackRate=e.playbackRate,G.rr_mediaMuted=e.muted,G.rr_mediaLoop=e.loop,G.rr_mediaVolume=e.volume}v||(e.scrollLeft&&(b.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(b.rr_scrollTop=e.scrollTop));if(m){var{width:W,height:X}=e.getBoundingClientRect();b={class:b.class,rr_width:W+"px",rr_height:X+"px"}}"iframe"!==y||f(b.src)||(e.contentDocument||(b.rr_src=b.src),delete b.src);try{customElements.get(y)&&(r=!0)}catch(e){}return{type:l.Element,tagName:y,attributes:b,childNodes:[],isSVG:j(e)||void 0,needBlock:m,rootId:p,isCustom:r}}(e,{doc:r,blockClass:i,blockSelector:o,inlineStylesheet:s,maskInputOptions:u,maskInputFn:d,dataURLOptions:h,inlineImages:f,recordCanvas:v,keepIframeSrcFn:p,newlyAddedElement:m,rootId:y});case e.TEXT_NODE:return function(e,t){var r,{needsMask:n,maskTextFn:i,rootId:o}=t,a=g.parentNode(e),s=a&&a.tagName,u=g.textContent(e),c="STYLE"===s||void 0,d="SCRIPT"===s||void 0;if(c&&u){try{e.nextSibling||e.previousSibling||(null==(r=a.sheet)?void 0:r.cssRules)&&(u=I(a.sheet))}catch(t){console.warn("Cannot get CSS styles from text's parentNode. Error: "+t,e)}u=O(u,X(t.doc))}d&&(u="SCRIPT_PLACEHOLDER");!c&&!d&&u&&n&&(u=i?i(u,g.parentElement(e)):u.replace(/[\S]/g,"*"));return{type:l.Text,textContent:u||"",isStyle:c,rootId:o}}(e,{doc:r,needsMask:a,maskTextFn:c,rootId:y});case e.CDATA_SECTION_NODE:return{type:l.CDATA,textContent:"",rootId:y};case e.COMMENT_NODE:return{type:l.Comment,textContent:g.textContent(e)||"",rootId:y};default:return!1}}function ee(e){return null==e?"":e.toLowerCase()}function te(e,t){var{doc:r,mirror:n,blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:s,skipChild:u=!1,inlineStylesheet:c=!0,maskInputOptions:d={},maskTextFn:h,maskInputFn:f,slimDOMOptions:v,dataURLOptions:p={},inlineImages:m=!1,recordCanvas:y=!1,onSerialize:I,onIframeLoad:k,iframeLoadTimeout:S=5e3,onStylesheetLoad:x,stylesheetLoadTimeout:A=5e3,keepIframeSrcFn:T=(()=>!1),newlyAddedElement:N=!1}=t,{needsMask:M}=t,{preserveWhiteSpace:R=!0}=t;M||(M=J(e,a,s,void 0===M));var F,E=Q(e,{doc:r,mirror:n,blockClass:i,blockSelector:o,needsMask:M,inlineStylesheet:c,maskInputOptions:d,maskTextFn:h,maskInputFn:f,dataURLOptions:p,inlineImages:m,recordCanvas:y,keepIframeSrcFn:T,newlyAddedElement:N});if(!E)return console.warn(e,"not serialized"),null;F=n.hasNode(e)?n.getId(e):!function(e,t){if(t.comment&&e.type===l.Comment)return!0;if(e.type===l.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===_(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(ee(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===ee(e.attributes.name)||"icon"===ee(e.attributes.rel)||"apple-touch-icon"===ee(e.attributes.rel)||"shortcut icon"===ee(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&ee(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(ee(e.attributes.property).match(/^(og|twitter|fb):/)||ee(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===ee(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===ee(e.attributes.name)||"googlebot"===ee(e.attributes.name)||"bingbot"===ee(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===ee(e.attributes.name)||"generator"===ee(e.attributes.name)||"framework"===ee(e.attributes.name)||"publisher"===ee(e.attributes.name)||"progid"===ee(e.attributes.name)||ee(e.attributes.property).match(/^article:/)||ee(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===ee(e.attributes.name)||"yandex-verification"===ee(e.attributes.name)||"csrf-token"===ee(e.attributes.name)||"p:domain_verify"===ee(e.attributes.name)||"verify-v1"===ee(e.attributes.name)||"verification"===ee(e.attributes.name)||"shopify-checkout-api-token"===ee(e.attributes.name)))return!0}}return!1}(E,v)&&(R||E.type!==l.Text||E.isStyle||E.textContent.replace(/^\s+|\s+$/gm,"").length)?P():V;var Z=Object.assign(E,{id:F});if(n.add(e,Z),F===V)return null;I&&I(e);var O=!u;if(Z.type===l.Element){O=O&&!Z.needBlock,delete Z.needBlock;var B=g.shadowRoot(e);B&&C(B)&&(Z.isShadowHost=!0)}if((Z.type===l.Document||Z.type===l.Element)&&O){v.headWhitespace&&Z.type===l.Element&&"head"===Z.tagName&&(R=!1);var L={doc:r,mirror:n,blockClass:i,blockSelector:o,needsMask:M,maskTextClass:a,maskTextSelector:s,skipChild:u,inlineStylesheet:c,maskInputOptions:d,maskTextFn:h,maskInputFn:f,slimDOMOptions:v,dataURLOptions:p,inlineImages:m,recordCanvas:y,preserveWhiteSpace:R,onSerialize:I,onIframeLoad:k,iframeLoadTimeout:S,onStylesheetLoad:x,stylesheetLoadTimeout:A,keepIframeSrcFn:T};if(Z.type===l.Element&&"textarea"===Z.tagName&&void 0!==Z.attributes.value);else for(var D of Array.from(g.childNodes(e))){var q=te(D,L);q&&Z.childNodes.push(q)}var Y=null;if(b(e)&&(Y=g.shadowRoot(e)))for(var H of Array.from(g.childNodes(Y))){var G=te(H,L);G&&(C(Y)&&(G.isShadow=!0),Z.childNodes.push(G))}}var W=g.parentNode(e);return W&&w(W)&&C(W)&&(Z.isShadow=!0),Z.type===l.Element&&"iframe"===Z.tagName&&function(e,t,r){var n=e.contentWindow;if(n){var i,o=!1;try{i=n.document.readyState}catch(e){return}if("complete"===i){var a="about:blank";if(n.location.href!==a||e.src===a||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}else{var s=setTimeout((()=>{o||(t(),o=!0)}),r);e.addEventListener("load",(()=>{clearTimeout(s),o=!0,t()}))}}}(e,(()=>{var t=e.contentDocument;if(t&&k){var r=te(t,{doc:t,mirror:n,blockClass:i,blockSelector:o,needsMask:M,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:c,maskInputOptions:d,maskTextFn:h,maskInputFn:f,slimDOMOptions:v,dataURLOptions:p,inlineImages:m,recordCanvas:y,preserveWhiteSpace:R,onSerialize:I,onIframeLoad:k,iframeLoadTimeout:S,onStylesheetLoad:x,stylesheetLoadTimeout:A,keepIframeSrcFn:T});r&&k(e,r)}}),S),Z.type===l.Element&&"link"===Z.tagName&&"string"==typeof Z.attributes.rel&&("stylesheet"===Z.attributes.rel||"preload"===Z.attributes.rel&&"string"==typeof Z.attributes.href&&"css"===_(Z.attributes.href))&&function(e,t,r){var n,i=!1;try{n=e.sheet}catch(e){return}if(!n){var o=setTimeout((()=>{i||(t(),i=!0)}),r);e.addEventListener("load",(()=>{clearTimeout(o),i=!0,t()}))}}(e,(()=>{if(x){var t=te(e,{doc:r,mirror:n,blockClass:i,blockSelector:o,needsMask:M,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:c,maskInputOptions:d,maskTextFn:h,maskInputFn:f,slimDOMOptions:v,dataURLOptions:p,inlineImages:m,recordCanvas:y,preserveWhiteSpace:R,onSerialize:I,onIframeLoad:k,iframeLoadTimeout:S,onStylesheetLoad:x,stylesheetLoadTimeout:A,keepIframeSrcFn:T});t&&x(e,t)}}),A),Z}let re=class e{constructor(){__publicField2(this,"parentElement",null),__publicField2(this,"parentNode",null),__publicField2(this,"ownerDocument"),__publicField2(this,"firstChild",null),__publicField2(this,"lastChild",null),__publicField2(this,"previousSibling",null),__publicField2(this,"nextSibling",null),__publicField2(this,"ELEMENT_NODE",1),__publicField2(this,"TEXT_NODE",3),__publicField2(this,"nodeType"),__publicField2(this,"nodeName"),__publicField2(this,"RRNodeType")}get childNodes(){for(var e=[],t=this.firstChild;t;)e.push(t),t=t.nextSibling;return e}contains(t){if(!(t instanceof e))return!1;if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}};var ne={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ie={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]};var oe={};function ae(e){if(oe[e])return oe[e];var t=function(e){var t,r=null==globalThis||null==(t=globalThis.Zone)||null==t.__symbol__?void 0:t.__symbol__(e);return r&&globalThis[r]?globalThis[r]:void 0}(e)||globalThis[e],r=t.prototype,n=e in ne?ne[e]:void 0,i=Boolean(n&&n.every((e=>{var t,n;return Boolean(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))}))),o=e in ie?ie[e]:void 0,a=Boolean(o&&o.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(i&&a)return oe[e]=t.prototype,t.prototype;try{var s=document.createElement("iframe");document.body.appendChild(s);var u=s.contentWindow;if(!u)return t.prototype;var l=u[e].prototype;return document.body.removeChild(s),l?oe[e]=l:r}catch(e){return r}}var se={};function ue(e,t,r){var n,i=e+"."+String(r);if(se[i])return se[i].call(t);var o=ae(e),a=null==(n=Object.getOwnPropertyDescriptor(o,r))?void 0:n.get;return a?(se[i]=a,a.call(t)):t[r]}var le={};function ce(e,t,r){var n=e+"."+String(r);if(le[n])return le[n].bind(t);var i=ae(e)[r];return"function"!=typeof i?t[r]:(le[n]=i,i.bind(t))}function de(){return ae("MutationObserver").constructor}var he={childNodes:function(e){return ue("Node",e,"childNodes")},parentNode:function(e){return ue("Node",e,"parentNode")},parentElement:function(e){return ue("Node",e,"parentElement")},textContent:function(e){return ue("Node",e,"textContent")},contains:function(e,t){return ce("Node",e,"contains")(t)},getRootNode:function(e){return ce("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?ue("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?ue("Element",e,"shadowRoot"):null},querySelector:function(e,t){return ue("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return ue("Element",e,"querySelectorAll")(t)},mutationObserver:de};function fe(e,t,r){void 0===r&&(r=document);var n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}var ve="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",pe={map:{},getId:()=>(console.error(ve),-1),getNode:()=>(console.error(ve),null),removeNodeFromMap(){console.error(ve)},has:()=>(console.error(ve),!1),reset(){console.error(ve)}};function me(e,t,r){void 0===r&&(r={});var n=null,i=0;return function(){for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];var u=Date.now();i||!1!==r.leading||(i=u);var l=t-(u-i),c=this;l<=0||l>t?(n&&(clearTimeout(n),n=null),i=u,e.apply(c,a)):n||!1===r.trailing||(n=setTimeout((()=>{i=!1===r.leading?0:Date.now(),n=null,e.apply(c,a)}),l))}}function ye(e,t,r,n,i){void 0===i&&(i=window);var o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,n?r:{set(e){setTimeout((()=>{r.set.call(this,e)}),0),o&&o.set&&o.set.call(this,e)}}),()=>ye(e,t,o||{},!0)}function ge(e,t,r){try{if(!(t in e))return()=>{};var n=e[t],i=r(n);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=i,()=>{e[t]=n}}catch(e){return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(pe=new Proxy(pe,{get:(e,t,r)=>("map"===t&&console.error(ve),Reflect.get(e,t,r))}));var be=Date.now;function we(e){var t,r,n,i,o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:o.documentElement.scrollLeft||(null==o?void 0:o.body)&&(null==(t=he.parentElement(o.body))?void 0:t.scrollLeft)||(null==(r=null==o?void 0:o.body)?void 0:r.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==o?void 0:o.documentElement.scrollTop)||(null==o?void 0:o.body)&&(null==(n=he.parentElement(o.body))?void 0:n.scrollTop)||(null==(i=null==o?void 0:o.body)?void 0:i.scrollTop)||0}}function Ce(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ie(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ke(e){return e?e.nodeType===e.ELEMENT_NODE?e:he.parentElement(e):null}function Se(e,t,r,n){if(!e)return!1;var i=ke(e);if(!i)return!1;try{if("string"==typeof t){if(i.classList.contains(t))return!0;if(n&&null!==i.closest("."+t))return!0}else if(U(i,t,n))return!0}catch(e){}if(r){if(i.matches(r))return!0;if(n&&null!==i.closest(r))return!0}return!1}function xe(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||t.getId(e)===V}function Ae(e,t){if(w(e))return!1;var r=t.getId(e);if(!t.has(r))return!0;var n=he.parentNode(e);return(!n||n.nodeType!==e.DOCUMENT_NODE)&&(!n||Ae(n,t))}function Te(e){return Boolean(e.changedTouches)}function Ne(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function Me(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function _e(e){return!!e&&(e instanceof re&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(he.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(be=()=>(new Date).getTime());let Re=class{constructor(){a(this,"id",1),a(this,"styleIDMap",new WeakMap),a(this,"idStyleMap",new Map)}getId(e){var t;return null!==(t=this.styleIDMap.get(e))&&void 0!==t?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){return this.has(e)?this.getId(e):(r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r);var r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function Fe(e){var t,r=null;return"getRootNode"in e&&(null==(t=he.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&he.host(he.getRootNode(e))&&(r=he.host(he.getRootNode(e))),r}function Ee(e){var t=e.ownerDocument;if(!t)return!1;var r=function(e){for(var t,r=e;t=Fe(r);)r=t;return r}(e);return he.contains(t,r)}function Ze(e){var t=e.ownerDocument;return!!t&&(he.contains(t,e)||Ee(e))}var Oe=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(Oe||{}),Be=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(Be||{}),Le=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(Le||{}),De=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(De||{}),qe=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(qe||{}),Ve=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Ve||{});function Pe(e){return"__ln"in e}class Ye{constructor(){a(this,"length",0),a(this,"head",null),a(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,r=0;r<e;r++)t=(null==t?void 0:t.next)||null;return t}addNode(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Pe(e.previousSibling)){var r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&Pe(e.nextSibling)&&e.nextSibling.__ln.previous){var n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}var He,Ge=(e,t)=>e+"@"+t;class We{constructor(){a(this,"frozen",!1),a(this,"locked",!1),a(this,"texts",[]),a(this,"attributes",[]),a(this,"attributeMap",new WeakMap),a(this,"removes",[]),a(this,"mapRemoves",[]),a(this,"movedMap",{}),a(this,"addedSet",new Set),a(this,"movedSet",new Set),a(this,"droppedSet",new Set),a(this,"mutationCb"),a(this,"blockClass"),a(this,"blockSelector"),a(this,"maskTextClass"),a(this,"maskTextSelector"),a(this,"inlineStylesheet"),a(this,"maskInputOptions"),a(this,"maskTextFn"),a(this,"maskInputFn"),a(this,"keepIframeSrcFn"),a(this,"recordCanvas"),a(this,"inlineImages"),a(this,"slimDOMOptions"),a(this,"dataURLOptions"),a(this,"doc"),a(this,"mirror"),a(this,"iframeManager"),a(this,"stylesheetManager"),a(this,"shadowDomManager"),a(this,"canvasManager"),a(this,"processedNodeManager"),a(this,"unattachedDoc"),a(this,"processMutations",(e=>{e.forEach(this.processMutation),this.emit()})),a(this,"emit",(()=>{if(!this.frozen&&!this.locked){for(var e=[],t=new Set,r=new Ye,n=e=>{for(var t=e,r=V;r===V;)r=(t=t&&t.nextSibling)&&this.mirror.getId(t);return r},i=i=>{var o=he.parentNode(i);if(o&&Ze(i)&&"TEXTAREA"!==o.tagName){var a=w(o)?this.mirror.getId(Fe(i)):this.mirror.getId(o),s=n(i);if(-1===a||-1===s)return r.addNode(i);var u=te(i,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{Ne(e,this.mirror)&&this.iframeManager.addIframe(e),Me(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),_e(i)&&this.shadowDomManager.addShadowRoot(he.shadowRoot(i),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}});u&&(e.push({parentId:a,nextId:s,node:u}),t.add(u.id))}};this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(var o of this.movedSet)Xe(this.removes,o,this.mirror)&&!this.movedSet.has(he.parentNode(o))||i(o);for(var a of this.addedSet)ze(this.droppedSet,a)||Xe(this.removes,a,this.mirror)?ze(this.movedSet,a)?i(a):this.droppedSet.add(a):i(a);for(var s=null;r.length;){var u=null;if(s){var l=this.mirror.getId(he.parentNode(s.value)),c=n(s.value);-1!==l&&-1!==c&&(u=s)}if(!u)for(var d=r.tail;d;){var h=d;if(d=d.previous,h){var f=this.mirror.getId(he.parentNode(h.value));if(-1===n(h.value))continue;if(-1!==f){u=h;break}var v=h.value,p=he.parentNode(v);if(p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var m=he.host(p);if(-1!==this.mirror.getId(m)){u=h;break}}}}if(!u){for(;r.head;)r.removeNode(r.head.value);break}s=u.previous,r.removeNode(u.value),i(u.value)}var y={texts:this.texts.map((e=>{var t=e.node,r=he.parentNode(t);return r&&"TEXTAREA"===r.tagName&&this.genTextAreaValueMutation(r),{id:this.mirror.getId(t),value:e.value}})).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),attributes:this.attributes.map((e=>{var{attributes:t}=e;if("string"==typeof t.style){var r=JSON.stringify(e.styleDiff),n=JSON.stringify(e._unchangedStyles);r.length<t.style.length&&(r+n).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}})).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),removes:this.removes,adds:e};(y.texts.length||y.attributes.length||y.removes.length||y.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(y))}})),a(this,"genTextAreaValueMutation",(e=>{var t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t)),t.attributes.value=Array.from(he.childNodes(e),(e=>he.textContent(e)||"")).join("")})),a(this,"processMutation",(e=>{if(!xe(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":var t=he.textContent(e.target);Se(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:J(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,ke(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break;case"attributes":var r=e.target,n=e.attributeName,i=e.target.getAttribute(n);if("value"===n){var o=M(r);i=A({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:o,value:i,maskInputFn:this.maskInputFn})}if(Se(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;var a=this.attributeMap.get(e.target);if("IFRAME"===r.tagName&&"src"===n&&!this.keepIframeSrcFn(i)){if(r.contentDocument)return;n="rr_src"}if(a||(a={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(a),this.attributeMap.set(e.target,a)),"type"===n&&"INPUT"===r.tagName&&"password"===(e.oldValue||"").toLowerCase()&&r.setAttribute("data-rr-is-password","true"),!K(r.tagName,n))if(a.attributes[n]=z(this.doc,T(r.tagName),T(n),i),"style"===n){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}var s=this.unattachedDoc.createElement("span");for(var u of(e.oldValue&&s.setAttribute("style",e.oldValue),Array.from(r.style))){var l=r.style.getPropertyValue(u),c=r.style.getPropertyPriority(u);l!==s.style.getPropertyValue(u)||c!==s.style.getPropertyPriority(u)?a.styleDiff[u]=""===c?l:[l,c]:a._unchangedStyles[u]=[l,c]}for(var d of Array.from(s.style))""===r.style.getPropertyValue(d)&&(a.styleDiff[d]=!1)}else"open"===n&&"DIALOG"===r.tagName&&(r.matches("dialog:modal")?a.attributes.rr_open_mode="modal":a.attributes.rr_open_mode="non-modal");break;case"childList":if(Se(e.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===e.target.tagName)return void this.genTextAreaValueMutation(e.target);e.addedNodes.forEach((t=>this.genAdds(t,e.target))),e.removedNodes.forEach((t=>{var r=this.mirror.getId(t),n=w(e.target)?this.mirror.getId(he.host(e.target)):this.mirror.getId(e.target);Se(e.target,this.blockClass,this.blockSelector,!1)||xe(t,this.mirror,this.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(je(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===r||Ae(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Ge(r,n)]?je(this.movedSet,t):this.removes.push({parentId:n,id:r,isShadow:!(!w(e.target)||!C(e.target))||void 0})),this.mapRemoves.push(t))}))}})),a(this,"genAdds",((e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(xe(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);var r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&-1!==r&&(this.movedMap[Ge(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Se(e,this.blockClass,this.blockSelector,!1)||(he.childNodes(e).forEach((e=>this.genAdds(e))),_e(e)&&he.childNodes(he.shadowRoot(e)).forEach((t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)})))}}))}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((t=>{this[t]=e[t]}))}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function je(e,t){e.delete(t),he.childNodes(t).forEach((t=>je(e,t)))}function Xe(e,t,r){return 0!==e.length&&function(e,t,r){var n,i=he.parentNode(t),o=function(){var t=r.getId(i);if(e.some((e=>e.id===t)))return{v:!0};i=he.parentNode(i)};for(;i;)if(n=o())return n.v;return!1}(e,t,r)}function ze(e,t){return 0!==e.size&&Ke(e,t)}function Ke(e,t){var r=he.parentNode(t);return!!r&&(!!e.has(r)||Ke(e,r))}var Ue=e=>{if(!He)return e;return function(){try{return e(...arguments)}catch(e){if(He&&!0===He(e))return;throw e}}},Je=[];function Qe(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(e){}return e&&e.target}function $e(e,t){var r=new We;Je.push(r),r.init(e);var n=new(de())(Ue(r.processMutations.bind(r)));return n.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),n}function et(e){var{mouseInteractionCb:t,doc:n,mirror:i,blockClass:o,blockSelector:a,sampling:s}=e;if(!1===s.mouseInteraction)return()=>{};var u=!0===s.mouseInteraction||void 0===s.mouseInteraction?{}:s.mouseInteraction,l=[],c=null;return Object.keys(Le).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==u[e])).forEach((e=>{var s=T(e),u=(e=>n=>{var s=Qe(n);if(!Se(s,o,a,!0)){var u=null,l=e;if("pointerType"in n){switch(n.pointerType){case"mouse":u=De.Mouse;break;case"touch":u=De.Touch;break;case"pen":u=De.Pen}u===De.Touch?Le[e]===Le.MouseDown?l="TouchStart":Le[e]===Le.MouseUp&&(l="TouchEnd"):De.Pen}else Te(n)&&(u=De.Touch);null!==u?(c=u,(l.startsWith("Touch")&&u===De.Touch||l.startsWith("Mouse")&&u===De.Mouse)&&(u=null)):Le[e]===Le.Click&&(u=c,c=null);var d=Te(n)?n.changedTouches[0]:n;if(d){var h=i.getId(s),{clientX:f,clientY:v}=d;Ue(t)(r({type:Le[l],id:h,x:f,y:v},null!==u&&{pointerType:u}))}}})(e);if(window.PointerEvent)switch(Le[e]){case Le.MouseDown:case Le.MouseUp:s=s.replace("mouse","pointer");break;case Le.TouchStart:case Le.TouchEnd:return}l.push(fe(s,u,n))})),Ue((()=>{l.forEach((e=>e()))}))}function tt(e){var{scrollCb:t,doc:r,mirror:n,blockClass:i,blockSelector:o,sampling:a}=e;return fe("scroll",Ue(me(Ue((e=>{var a=Qe(e);if(a&&!Se(a,i,o,!0)){var s=n.getId(a);if(a===r&&r.defaultView){var u=we(r.defaultView);t({id:s,x:u.left,y:u.top})}else t({id:s,x:a.scrollLeft,y:a.scrollTop})}})),a.scroll||100)),r)}var rt=["INPUT","TEXTAREA","SELECT"],nt=new WeakMap;function it(e){return function(e,t){if(ut("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||ut("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||ut("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||ut("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){var r=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(r)}else if(e.parentStyleSheet){var n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function ot(e,t,r){var n,i;return e?(e.ownerNode?n=t.getId(e.ownerNode):i=r.getId(e),{styleId:i,id:n}):{}}function at(e,t){var r,n,i,{mirror:o,stylesheetManager:a}=e,s=null;s="#document"===t.nodeName?o.getId(t):o.getId(he.host(t));var u="#document"===t.nodeName?null==(r=t.defaultView)?void 0:r.Document:null==(i=null==(n=t.ownerDocument)?void 0:n.defaultView)?void 0:i.ShadowRoot,l=(null==u?void 0:u.prototype)?Object.getOwnPropertyDescriptor(null==u?void 0:u.prototype,"adoptedStyleSheets"):void 0;return null!==s&&-1!==s&&u&&l?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var e;return null==(e=l.get)?void 0:e.call(this)},set(e){var t,r=null==(t=l.set)?void 0:t.call(this,e);if(null!==s&&-1!==s)try{a.adoptStyleSheets(e,s)}catch(e){}return r}}),Ue((()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))):()=>{}}function st(e,t){void 0===t&&(t={});var n,i=e.doc.defaultView;if(!i)return()=>{};!function(e,t){var{mutationCb:r,mousemoveCb:n,mouseInteractionCb:i,scrollCb:o,viewportResizeCb:a,inputCb:s,mediaInteractionCb:u,styleSheetRuleCb:l,styleDeclarationCb:c,canvasMutationCb:d,fontCb:h,selectionCb:f,customElementCb:v}=e;e.mutationCb=function(){t.mutation&&t.mutation(...arguments),r(...arguments)},e.mousemoveCb=function(){t.mousemove&&t.mousemove(...arguments),n(...arguments)},e.mouseInteractionCb=function(){t.mouseInteraction&&t.mouseInteraction(...arguments),i(...arguments)},e.scrollCb=function(){t.scroll&&t.scroll(...arguments),o(...arguments)},e.viewportResizeCb=function(){t.viewportResize&&t.viewportResize(...arguments),a(...arguments)},e.inputCb=function(){t.input&&t.input(...arguments),s(...arguments)},e.mediaInteractionCb=function(){t.mediaInteaction&&t.mediaInteaction(...arguments),u(...arguments)},e.styleSheetRuleCb=function(){t.styleSheetRule&&t.styleSheetRule(...arguments),l(...arguments)},e.styleDeclarationCb=function(){t.styleDeclaration&&t.styleDeclaration(...arguments),c(...arguments)},e.canvasMutationCb=function(){t.canvasMutation&&t.canvasMutation(...arguments),d(...arguments)},e.fontCb=function(){t.font&&t.font(...arguments),h(...arguments)},e.selectionCb=function(){t.selection&&t.selection(...arguments),f(...arguments)},e.customElementCb=function(){t.customElement&&t.customElement(...arguments),v(...arguments)}}(e,t),e.recordDOM&&(n=$e(e,e.doc));var o=function(e){var{mousemoveCb:t,sampling:r,doc:n,mirror:i}=e;if(!1===r.mousemove)return()=>{};var o,a="number"==typeof r.mousemove?r.mousemove:50,s="number"==typeof r.mousemoveCallback?r.mousemoveCallback:500,u=[],l=me(Ue((e=>{var r=Date.now()-o;t(u.map((e=>(e.timeOffset-=r,e))),e),u=[],o=null})),s),c=Ue(me(Ue((e=>{var t=Qe(e),{clientX:r,clientY:n}=Te(e)?e.changedTouches[0]:e;o||(o=be()),u.push({x:r,y:n,id:i.getId(t),timeOffset:be()-o}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?Be.Drag:e instanceof MouseEvent?Be.MouseMove:Be.TouchMove)})),a,{trailing:!1})),d=[fe("mousemove",c,n),fe("touchmove",c,n),fe("drag",c,n)];return Ue((()=>{d.forEach((e=>e()))}))}(e),a=et(e),s=tt(e),u=function(e,t){var{viewportResizeCb:r}=e,{win:n}=t,i=-1,o=-1;return fe("resize",Ue(me(Ue((()=>{var e=Ce(),t=Ie();i===e&&o===t||(r({width:Number(t),height:Number(e)}),i=e,o=t)})),200)),n)}(e,{win:i}),l=function(e){var{inputCb:t,doc:n,mirror:i,blockClass:o,blockSelector:a,ignoreClass:s,ignoreSelector:u,maskInputOptions:l,maskInputFn:c,sampling:d,userTriggeredOnInput:h}=e;function f(e){var t=Qe(e),r=e.isTrusted,i=t&&t.tagName;if(t&&"OPTION"===i&&(t=he.parentElement(t)),t&&i&&!(rt.indexOf(i)<0)&&!Se(t,o,a,!0)&&!(t.classList.contains(s)||u&&t.matches(u))){var d=t.value,f=!1,p=M(t)||"";"radio"===p||"checkbox"===p?f=t.checked:(l[i.toLowerCase()]||l[p])&&(d=A({element:t,maskInputOptions:l,tagName:i,type:p,value:d,maskInputFn:c})),v(t,h?{text:d,isChecked:f,userTriggered:r}:{text:d,isChecked:f});var m=t.name;"radio"===p&&m&&f&&n.querySelectorAll('input[type="radio"][name="'+m+'"]').forEach((e=>{if(e!==t){var r=e.value;v(e,h?{text:r,isChecked:!f,userTriggered:!1}:{text:r,isChecked:!f})}}))}}function v(e,n){var o=nt.get(e);if(!o||o.text!==n.text||o.isChecked!==n.isChecked){nt.set(e,n);var a=i.getId(e);Ue(t)(r({},n,{id:a}))}}var p=("last"===d.input?["change"]:["input","change"]).map((e=>fe(e,Ue(f),n))),m=n.defaultView;if(!m)return()=>{p.forEach((e=>e()))};var y=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),g=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];return y&&y.set&&p.push(...g.map((e=>ye(e[0],e[1],{set(){Ue(f)({target:this,isTrusted:!1})}},!1,m)))),Ue((()=>{p.forEach((e=>e()))}))}(e),c=function(e){var{mediaInteractionCb:t,blockClass:r,blockSelector:n,mirror:i,sampling:o,doc:a}=e,s=Ue((e=>me(Ue((o=>{var a=Qe(o);if(a&&!Se(a,r,n,!0)){var{currentTime:s,volume:u,muted:l,playbackRate:c,loop:d}=a;t({type:e,id:i.getId(a),currentTime:s,volume:u,muted:l,playbackRate:c,loop:d})}})),o.media||500))),u=[fe("play",s(Ve.Play),a),fe("pause",s(Ve.Pause),a),fe("seeked",s(Ve.Seeked),a),fe("volumechange",s(Ve.VolumeChange),a),fe("ratechange",s(Ve.RateChange),a)];return Ue((()=>{u.forEach((e=>e()))}))}(e),d=()=>{},h=()=>{},f=()=>{},v=()=>{};e.recordDOM&&(d=function(e,t){var{styleSheetRuleCb:r,mirror:n,stylesheetManager:i}=e,{win:o}=t;if(!o.CSSStyleSheet||!o.CSSStyleSheet.prototype)return()=>{};var a=o.CSSStyleSheet.prototype.insertRule;o.CSSStyleSheet.prototype.insertRule=new Proxy(a,{apply:Ue(((e,t,o)=>{var[a,s]=o,{id:u,styleId:l}=ot(t,n,i.styleMirror);return(u&&-1!==u||l&&-1!==l)&&r({id:u,styleId:l,adds:[{rule:a,index:s}]}),e.apply(t,o)}))}),o.CSSStyleSheet.prototype.addRule=function(e,t,r){void 0===r&&(r=this.cssRules.length);var n=e+" { "+t+" }";return o.CSSStyleSheet.prototype.insertRule.apply(this,[n,r])};var s,u,l=o.CSSStyleSheet.prototype.deleteRule;o.CSSStyleSheet.prototype.deleteRule=new Proxy(l,{apply:Ue(((e,t,o)=>{var[a]=o,{id:s,styleId:u}=ot(t,n,i.styleMirror);return(s&&-1!==s||u&&-1!==u)&&r({id:s,styleId:u,removes:[{index:a}]}),e.apply(t,o)}))}),o.CSSStyleSheet.prototype.removeRule=function(e){return o.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},o.CSSStyleSheet.prototype.replace&&(s=o.CSSStyleSheet.prototype.replace,o.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:Ue(((e,t,o)=>{var[a]=o,{id:s,styleId:u}=ot(t,n,i.styleMirror);return(s&&-1!==s||u&&-1!==u)&&r({id:s,styleId:u,replace:a}),e.apply(t,o)}))})),o.CSSStyleSheet.prototype.replaceSync&&(u=o.CSSStyleSheet.prototype.replaceSync,o.CSSStyleSheet.prototype.replaceSync=new Proxy(u,{apply:Ue(((e,t,o)=>{var[a]=o,{id:s,styleId:u}=ot(t,n,i.styleMirror);return(s&&-1!==s||u&&-1!==u)&&r({id:s,styleId:u,replaceSync:a}),e.apply(t,o)}))}));var c={};lt("CSSGroupingRule")?c.CSSGroupingRule=o.CSSGroupingRule:(lt("CSSMediaRule")&&(c.CSSMediaRule=o.CSSMediaRule),lt("CSSConditionRule")&&(c.CSSConditionRule=o.CSSConditionRule),lt("CSSSupportsRule")&&(c.CSSSupportsRule=o.CSSSupportsRule));var d={};return Object.entries(c).forEach((e=>{var[t,o]=e;d[t]={insertRule:o.prototype.insertRule,deleteRule:o.prototype.deleteRule},o.prototype.insertRule=new Proxy(d[t].insertRule,{apply:Ue(((e,t,o)=>{var[a,s]=o,{id:u,styleId:l}=ot(t.parentStyleSheet,n,i.styleMirror);return(u&&-1!==u||l&&-1!==l)&&r({id:u,styleId:l,adds:[{rule:a,index:[...it(t),s||0]}]}),e.apply(t,o)}))}),o.prototype.deleteRule=new Proxy(d[t].deleteRule,{apply:Ue(((e,t,o)=>{var[a]=o,{id:s,styleId:u}=ot(t.parentStyleSheet,n,i.styleMirror);return(s&&-1!==s||u&&-1!==u)&&r({id:s,styleId:u,removes:[{index:[...it(t),a]}]}),e.apply(t,o)}))})})),Ue((()=>{o.CSSStyleSheet.prototype.insertRule=a,o.CSSStyleSheet.prototype.deleteRule=l,s&&(o.CSSStyleSheet.prototype.replace=s),u&&(o.CSSStyleSheet.prototype.replaceSync=u),Object.entries(c).forEach((e=>{var[t,r]=e;r.prototype.insertRule=d[t].insertRule,r.prototype.deleteRule=d[t].deleteRule}))}))}(e,{win:i}),h=at(e,e.doc),f=function(e,t){var{styleDeclarationCb:r,mirror:n,ignoreCSSAttributes:i,stylesheetManager:o}=e,{win:a}=t,s=a.CSSStyleDeclaration.prototype.setProperty;a.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:Ue(((e,t,a)=>{var u,[l,c,d]=a;if(i.has(l))return s.apply(t,[l,c,d]);var{id:h,styleId:f}=ot(null==(u=t.parentRule)?void 0:u.parentStyleSheet,n,o.styleMirror);return(h&&-1!==h||f&&-1!==f)&&r({id:h,styleId:f,set:{property:l,value:c,priority:d},index:it(t.parentRule)}),e.apply(t,a)}))});var u=a.CSSStyleDeclaration.prototype.removeProperty;return a.CSSStyleDeclaration.prototype.removeProperty=new Proxy(u,{apply:Ue(((e,t,a)=>{var s,[l]=a;if(i.has(l))return u.apply(t,[l]);var{id:c,styleId:d}=ot(null==(s=t.parentRule)?void 0:s.parentStyleSheet,n,o.styleMirror);return(c&&-1!==c||d&&-1!==d)&&r({id:c,styleId:d,remove:{property:l},index:it(t.parentRule)}),e.apply(t,a)}))}),Ue((()=>{a.CSSStyleDeclaration.prototype.setProperty=s,a.CSSStyleDeclaration.prototype.removeProperty=u}))}(e,{win:i}),e.collectFonts&&(v=function(e){var{fontCb:t,doc:r}=e,n=r.defaultView;if(!n)return()=>{};var i=[],o=new WeakMap,a=n.FontFace;n.FontFace=function(e,t,r){var n=new a(e,t,r);return o.set(n,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),n};var s=ge(r.fonts,"add",(function(e){return function(r){return setTimeout(Ue((()=>{var e=o.get(r);e&&(t(e),o.delete(r))})),0),e.apply(this,[r])}}));return i.push((()=>{n.FontFace=a})),i.push(s),Ue((()=>{i.forEach((e=>e()))}))}(e)));var p=function(e){var{doc:t,mirror:r,blockClass:n,blockSelector:i,selectionCb:o}=e,a=!0,s=Ue((()=>{var e=t.getSelection();if(!(!e||a&&(null==e?void 0:e.isCollapsed))){a=e.isCollapsed||!1;for(var s=[],u=e.rangeCount||0,l=0;l<u;l++){var c=e.getRangeAt(l),{startContainer:d,startOffset:h,endContainer:f,endOffset:v}=c;Se(d,n,i,!0)||Se(f,n,i,!0)||s.push({start:r.getId(d),startOffset:h,end:r.getId(f),endOffset:v})}o({ranges:s})}}));return s(),fe("selectionchange",s)}(e),m=function(e){var{doc:t,customElementCb:r}=e,n=t.defaultView;return n&&n.customElements?ge(n.customElements,"define",(function(e){return function(t,n,i){try{r({define:{name:t}})}catch(e){console.warn("Custom element callback failed for "+t)}return e.apply(this,[t,n,i])}})):()=>{}}(e),y=[];for(var g of e.plugins)y.push(g.observer(g.callback,i,g.options));return Ue((()=>{Je.forEach((e=>e.reset())),null==n||n.disconnect(),o(),a(),s(),u(),l(),c(),d(),h(),f(),v(),p(),m(),y.forEach((e=>e()))}))}function ut(e){return void 0!==window[e]}function lt(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class ct{constructor(e){a(this,"iframeIdToRemoteIdMap",new WeakMap),a(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,n){var i=r||this.getIdToRemoteIdMap(e),o=n||this.getRemoteIdToIdMap(e),a=i.get(t);return a||(a=this.generateIdFn(),i.set(t,a),o.set(a,t)),a}getIds(e,t){var r=this.getIdToRemoteIdMap(e),n=this.getRemoteIdToIdMap(e);return t.map((t=>this.getId(e,t,r,n)))}getRemoteId(e,t,r){var n=r||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;var i=n.get(t);return i||-1}getRemoteIds(e,t){var r=this.getRemoteIdToIdMap(e);return t.map((t=>this.getRemoteId(e,t,r)))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){var t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){var t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class dt{constructor(e){a(this,"iframes",new WeakMap),a(this,"crossOriginIframeMap",new WeakMap),a(this,"crossOriginIframeMirror",new ct(P)),a(this,"crossOriginIframeStyleMirror"),a(this,"crossOriginIframeRootIdMap",new WeakMap),a(this,"mirror"),a(this,"mutationCb"),a(this,"wrappedEmit"),a(this,"loadListener"),a(this,"stylesheetManager"),a(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new ct(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,n;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(r=e.contentWindow)||r.addEventListener("message",this.handleMessage.bind(this))),null==(n=this.loadListener)||n.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){var t=e;if("rrweb"===t.data.type&&t.origin===t.data.origin&&e.source){var r=this.crossOriginIframeMap.get(e.source);if(r){var n=this.transformCrossOriginEvent(r,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}}}transformCrossOriginEvent(e,t){var r;switch(t.type){case Oe.FullSnapshot:this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);var n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:Oe.IncrementalSnapshot,data:{source:Be.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case Oe.Meta:case Oe.Load:case Oe.DomContentLoaded:return!1;case Oe.Plugin:return t;case Oe.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case Oe.IncrementalSnapshot:switch(t.data.source){case Be.Mutation:return t.data.adds.forEach((t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);var r=this.crossOriginIframeRootIdMap.get(e);r&&this.patchRootIdOnNode(t.node,r)})),t.data.removes.forEach((t=>{this.replaceIds(t,e,["parentId","id"])})),t.data.attributes.forEach((t=>{this.replaceIds(t,e,["id"])})),t.data.texts.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case Be.Drag:case Be.TouchMove:case Be.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case Be.ViewportResize:return!1;case Be.MediaInteraction:case Be.MouseInteraction:case Be.Scroll:case Be.CanvasMutation:case Be.Input:return this.replaceIds(t.data,e,["id"]),t;case Be.StyleSheetRule:case Be.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case Be.Font:return t;case Be.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case Be.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(r=t.data.styles)||r.forEach((t=>{this.replaceStyleIds(t,e,["styleId"])})),t}}return!1}replace(e,t,r,n){for(var i of n)(Array.isArray(t[i])||"number"==typeof t[i])&&(Array.isArray(t[i])?t[i]=e.getIds(r,t[i]):t[i]=e.getId(r,t[i]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach((e=>{this.replaceIdOnNode(e,t)}))}patchRootIdOnNode(e,t){e.type===l.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,t)}))}}class ht{constructor(e){a(this,"shadowDoms",new WeakSet),a(this,"mutationCb"),a(this,"scrollCb"),a(this,"bypassOptions"),a(this,"mirror"),a(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(C(e)&&!this.shadowDoms.has(e)){this.shadowDoms.add(e);var n=$e(r({},this.bypassOptions,{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push((()=>n.disconnect())),this.restoreHandlers.push(tt(r({},this.bypassOptions,{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout((()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(he.host(e))),this.restoreHandlers.push(at({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))}),0)}}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){var r=this;this.restoreHandlers.push(ge(e.prototype,"attachShadow",(function(e){return function(n){var i=e.call(this,n),o=he.shadowRoot(this);return o&&Ze(this)&&r.addShadowRoot(o,t),i}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch(e){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var ft="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",vt="undefined"==typeof Uint8Array?[]:new Uint8Array(256),pt=0;pt<64;pt++)vt[ft.charCodeAt(pt)]=pt;var mt=new Map;var yt=(e,t,r)=>{if(e&&(wt(e,t)||"object"==typeof e)){var n=function(e,t){var r=mt.get(e);return r||(r=new Map,mt.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}(r,e.constructor.name),i=n.indexOf(e);return-1===i&&(i=n.length,n.push(e)),i}};function gt(e,t,r){if(e instanceof Array)return e.map((e=>gt(e,t,r)));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer)return{rr_type:e.constructor.name,base64:function(e){var t,r=new Uint8Array(e),n=r.length,i="";for(t=0;t<n;t+=3)i+=ft[r[t]>>2],i+=ft[(3&r[t])<<4|r[t+1]>>4],i+=ft[(15&r[t+1])<<2|r[t+2]>>6],i+=ft[63&r[t+2]];return n%3==2?i=i.substring(0,i.length-1)+"=":n%3==1&&(i=i.substring(0,i.length-2)+"=="),i}(e)};if(e instanceof DataView)return{rr_type:e.constructor.name,args:[gt(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){var n=e.constructor.name,{src:i}=e;return{rr_type:n,src:i}}if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}return e instanceof ImageData?{rr_type:e.constructor.name,args:[gt(e.data,t,r),e.width,e.height]}:wt(e,t)||"object"==typeof e?{rr_type:e.constructor.name,index:yt(e,t,r)}:e}var bt=(e,t,r)=>e.map((e=>gt(e,t,r))),wt=(e,t)=>{var r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((e=>"function"==typeof t[e]));return Boolean(r.find((r=>e instanceof t[r])))};function Ct(e,t,r,n){var i=[];try{var o=ge(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(i){for(var o=arguments.length,a=new Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];if(!Se(this,t,r,!0)){var u=function(e){return"experimental-webgl"===e?"webgl":e}(i);if("__context"in this||(this.__context=u),n&&["webgl","webgl2"].includes(u))if(a[0]&&"object"==typeof a[0]){var l=a[0];l.preserveDrawingBuffer||(l.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[i,...a])}}));i.push(o)}catch(e){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach((e=>e()))}}function It(e,t,r,n,i,o){var a=[],s=Object.getOwnPropertyNames(e),u=function(s){if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(s))return 0;try{if("function"!=typeof e[s])return 0;var u=ge(e,s,(function(e){return function(){for(var a=arguments.length,u=new Array(a),l=0;l<a;l++)u[l]=arguments[l];var c=e.apply(this,u);if(yt(c,o,this),"tagName"in this.canvas&&!Se(this.canvas,n,i,!0)){var d=bt(u,o,this),h={type:t,property:s,args:d};r(this.canvas,h)}return c}}));a.push(u)}catch(n){var l=ye(e,s,{set(e){r(this.canvas,{type:t,property:s,args:[e],setter:!0})}});a.push(l)}};for(var l of s)u(l);return a}var kt,St,xt,At,Tt="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Nt="undefined"!=typeof window&&window.Blob&&new Blob([(kt=Tt,Uint8Array.from(atob(kt),(e=>e.charCodeAt(0))))],{type:"text/javascript;charset=utf-8"});function Mt(e){var t;try{if(!(t=Nt&&(window.URL||window.webkitURL).createObjectURL(Nt)))throw"";var r=new Worker(t,{name:null==e?void 0:e.name});return r.addEventListener("error",(()=>{(window.URL||window.webkitURL).revokeObjectURL(t)})),r}catch(t){return new Worker("data:text/javascript;base64,"+Tt,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class _t{constructor(e){a(this,"pendingCanvasMutations",new Map),a(this,"rafStamps",{latestId:0,invokeId:null}),a(this,"mirror"),a(this,"mutationCb"),a(this,"resetObservers"),a(this,"frozen",!1),a(this,"locked",!1),a(this,"processMutation",((e,t)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)}));var{sampling:t="all",win:r,blockClass:n,blockSelector:i,recordCanvas:o,dataURLOptions:s}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&"all"===t&&this.initCanvasMutationObserver(r,n,i),o&&"number"==typeof t&&this.initCanvasFPSObserver(t,r,n,i,{dataURLOptions:s})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,r,n,i,o){var a=this,s=Ct(r,n,i,!0),u=new Map,l=new Mt;l.onmessage=e=>{var{id:t}=e.data;if(u.set(t,!1),"base64"in e.data){var{base64:r,type:n,width:i,height:o}=e.data;this.mutationCb({id:t,type:qe["2D"],commands:[{property:"clearRect",args:[0,0,i,o]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:n}]},0,0]}]})}};var c,d=1e3/e,h=0,f=e=>{var s,v;h&&e-h<d?c=requestAnimationFrame(f):(h=e,(s=[],v=e=>{e.querySelectorAll("canvas").forEach((e=>{Se(e,n,i,!0)||s.push(e)})),e.querySelectorAll("*").forEach((e=>{e.shadowRoot&&v(e.shadowRoot)}))},v(r.document),s).forEach(function(){var e=t((function*(e){var t,r=a.mirror.getId(e);if(!u.get(r)&&0!==e.width&&0!==e.height){if(u.set(r,!0),["webgl","webgl2"].includes(e.__context)){var n=e.getContext(e.__context);!1===(null==(t=null==n?void 0:n.getContextAttributes())?void 0:t.preserveDrawingBuffer)&&n.clear(n.COLOR_BUFFER_BIT)}var i=e.clientWidth||e.width,s=e.clientHeight||e.height,c=yield createImageBitmap(e,{resizeWidth:i,resizeHeight:s});l.postMessage({id:r,bitmap:c,width:i,height:s,dataURLOptions:o.dataURLOptions},[c])}}));return function(t){return e.apply(this,arguments)}}()),c=requestAnimationFrame(f))};c=requestAnimationFrame(f),this.resetObservers=()=>{s(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var n=Ct(e,t,r,!1),i=function(e,t,r,n){var i=[],o=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype),a=function(o){try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[o])return 1;var a=ge(t.CanvasRenderingContext2D.prototype,o,(function(i){return function(){for(var a=arguments.length,s=new Array(a),u=0;u<a;u++)s[u]=arguments[u];return Se(this.canvas,r,n,!0)||setTimeout((()=>{var r=bt(s,t,this);e(this.canvas,{type:qe["2D"],property:o,args:r})}),0),i.apply(this,s)}}));i.push(a)}catch(r){var s=ye(t.CanvasRenderingContext2D.prototype,o,{set(t){e(this.canvas,{type:qe["2D"],property:o,args:[t],setter:!0})}});i.push(s)}};for(var s of o)a(s);return()=>{i.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,r),o=function(e,t,r,n){var i=[];return i.push(...It(t.WebGLRenderingContext.prototype,qe.WebGL,e,r,n,t)),void 0!==t.WebGL2RenderingContext&&i.push(...It(t.WebGL2RenderingContext.prototype,qe.WebGL2,e,r,n,t)),()=>{i.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{n(),i(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}startRAFTimestamping(){var e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach(((e,t)=>{var r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)})),requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(e,t){if(!this.frozen&&!this.locked){var r=this.pendingCanvasMutations.get(e);if(r&&-1!==t){var n=r.map((e=>{var t=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,i);return t})),{type:o}=r[0];this.mutationCb({id:t,type:o,commands:n}),this.pendingCanvasMutations.delete(e)}}}}class Rt{constructor(e){a(this,"trackedLinkElements",new WeakSet),a(this,"mutationCb"),a(this,"adoptedStyleSheetCb"),a(this,"styleMirror",new Re),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){var r=this;if(0!==e.length){var n={id:t,styleIds:[]},i=[],o=function(e){var t;r.styleMirror.has(e)?t=r.styleMirror.getId(e):(t=r.styleMirror.add(e),i.push({styleId:t,rules:Array.from(e.rules||CSSRule,((t,r)=>({rule:k(t,e.href),index:r})))})),n.styleIds.push(t)};for(var a of e)o(a);i.length>0&&(n.styles=i),this.adoptedStyleSheetCb(n)}}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Ft{constructor(){a(this,"nodeMap",new WeakMap),a(this,"active",!1)}inOtherBuffer(e,t){var r=this.nodeMap.get(e);return r&&Array.from(r).some((e=>e!==t))}add(e,t){this.active||(this.active=!0,requestAnimationFrame((()=>{this.nodeMap=new WeakMap,this.active=!1}))),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}var Et=!1;try{if(2!==Array.from([1],(e=>2*e))[0]){var Zt=document.createElement("iframe");document.body.appendChild(Zt),Array.from=(null==(n=Zt.contentWindow)?void 0:n.Array.from)||Array.from,document.body.removeChild(Zt)}}catch(e){console.debug("Unable to override Array.from",e)}var Ot,Bt,Lt=new x;function Dt(e){void 0===e&&(e={});var{emit:t,checkoutEveryNms:n,checkoutEveryNth:i,blockClass:o="rr-block",blockSelector:a=null,ignoreClass:s="rr-ignore",ignoreSelector:u=null,maskTextClass:l="rr-mask",maskTextSelector:c=null,inlineStylesheet:d=!0,maskAllInputs:h,maskInputOptions:f,slimDOMOptions:v,maskInputFn:p,maskTextFn:m,hooks:y,packFn:g,sampling:b={},dataURLOptions:w={},mousemoveWait:C,recordDOM:I=!0,recordCanvas:k=!1,recordCrossOriginIframes:S=!1,recordAfter:A=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:T=!1,collectFonts:N=!1,inlineImages:M=!1,plugins:_,keepIframeSrcFn:R=(()=>!1),ignoreCSSAttributes:F=new Set([]),errorHandler:E}=e;He=E;var Z=!S||window.parent===window,O=!1;if(!Z)try{window.parent.document&&(O=!1)}catch(e){O=!0}if(Z&&!t)throw new Error("emit function is required");if(!Z&&!O)return()=>{};void 0!==C&&void 0===b.mousemove&&(b.mousemove=C),Lt.reset();var B,L=!0===h?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==f?f:{password:!0},D=!0===v||"all"===v?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===v,headMetaDescKeywords:"all"===v,headTitleMutations:"all"===v}:v||{};!function(e){void 0===e&&(e=window),"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}();var q=0,V=e=>{for(var t of _||[])t.eventProcessor&&(e=t.eventProcessor(e));return g&&!O&&(e=g(e)),e};St=(e,r)=>{var o,a=e;if(a.timestamp=be(),!(null==(o=Je[0])?void 0:o.isFrozen())||a.type===Oe.FullSnapshot||a.type===Oe.IncrementalSnapshot&&a.data.source===Be.Mutation||Je.forEach((e=>e.unfreeze())),Z)null==t||t(V(a),r);else if(O){var s={type:"rrweb",event:V(a),origin:window.location.origin,isCheckout:r};window.parent.postMessage(s,"*")}if(a.type===Oe.FullSnapshot)B=a,q=0;else if(a.type===Oe.IncrementalSnapshot){if(a.data.source===Be.Mutation&&a.data.isAttachIframe)return;q++;var u=i&&q>=i,l=n&&a.timestamp-B.timestamp>n;(u||l)&&xt(!0)}};var P=e=>{St({type:Oe.IncrementalSnapshot,data:r({source:Be.Mutation},e)})},Y=e=>St({type:Oe.IncrementalSnapshot,data:r({source:Be.Scroll},e)}),H=e=>St({type:Oe.IncrementalSnapshot,data:r({source:Be.CanvasMutation},e)}),G=new Rt({mutationCb:P,adoptedStyleSheetCb:e=>St({type:Oe.IncrementalSnapshot,data:r({source:Be.AdoptedStyleSheet},e)})}),W=new dt({mirror:Lt,mutationCb:P,stylesheetManager:G,recordCrossOriginIframes:S,wrappedEmit:St});for(var j of _||[])j.getMirror&&j.getMirror({nodeMirror:Lt,crossOriginIframeMirror:W.crossOriginIframeMirror,crossOriginIframeStyleMirror:W.crossOriginIframeStyleMirror});var X=new Ft;At=new _t({recordCanvas:k,mutationCb:H,win:window,blockClass:o,blockSelector:a,mirror:Lt,sampling:b.canvas,dataURLOptions:w});var z=new ht({mutationCb:P,scrollCb:Y,bypassOptions:{blockClass:o,blockSelector:a,maskTextClass:l,maskTextSelector:c,inlineStylesheet:d,maskInputOptions:L,dataURLOptions:w,maskTextFn:m,maskInputFn:p,recordCanvas:k,inlineImages:M,sampling:b,slimDOMOptions:D,iframeManager:W,stylesheetManager:G,canvasManager:At,keepIframeSrcFn:R,processedNodeManager:X},mirror:Lt});xt=function(e){if(void 0===e&&(e=!1),I){St({type:Oe.Meta,data:{href:window.location.href,width:Ie(),height:Ce()}},e),G.reset(),z.init(),Je.forEach((e=>e.lock()));var t=function(e,t){var{mirror:r=new x,blockClass:n="rr-block",blockSelector:i=null,maskTextClass:o="rr-mask",maskTextSelector:a=null,inlineStylesheet:s=!0,inlineImages:u=!1,recordCanvas:l=!1,maskAllInputs:c=!1,maskTextFn:d,maskInputFn:h,slimDOM:f=!1,dataURLOptions:v,preserveWhiteSpace:p,onSerialize:m,onIframeLoad:y,iframeLoadTimeout:g,onStylesheetLoad:b,stylesheetLoadTimeout:w,keepIframeSrcFn:C=(()=>!1)}=t||{};return te(e,{doc:e,mirror:r,blockClass:n,blockSelector:i,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:s,maskInputOptions:!0===c?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===c?{password:!0}:c,maskTextFn:d,maskInputFn:h,slimDOMOptions:!0===f||"all"===f?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===f,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===f?{}:f,dataURLOptions:v,inlineImages:u,recordCanvas:l,preserveWhiteSpace:p,onSerialize:m,onIframeLoad:y,iframeLoadTimeout:g,onStylesheetLoad:b,stylesheetLoadTimeout:w,keepIframeSrcFn:C,newlyAddedElement:!1})}(document,{mirror:Lt,blockClass:o,blockSelector:a,maskTextClass:l,maskTextSelector:c,inlineStylesheet:d,maskAllInputs:L,maskTextFn:m,maskInputFn:p,slimDOM:D,dataURLOptions:w,recordCanvas:k,inlineImages:M,onSerialize:e=>{Ne(e,Lt)&&W.addIframe(e),Me(e,Lt)&&G.trackLinkElement(e),_e(e)&&z.addShadowRoot(he.shadowRoot(e),document)},onIframeLoad:(e,t)=>{W.attachIframe(e,t),z.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{G.attachLinkElement(e,t)},keepIframeSrcFn:R});if(!t)return console.warn("Failed to snapshot the document");St({type:Oe.FullSnapshot,data:{node:t,initialOffset:we(window)}},e),Je.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&G.adoptStyleSheets(document.adoptedStyleSheets,Lt.getId(document))}};try{var K=[],U=e=>{var t;return Ue(st)({mutationCb:P,mousemoveCb:(e,t)=>St({type:Oe.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>St({type:Oe.IncrementalSnapshot,data:r({source:Be.MouseInteraction},e)}),scrollCb:Y,viewportResizeCb:e=>St({type:Oe.IncrementalSnapshot,data:r({source:Be.ViewportResize},e)}),inputCb:e=>St({type:Oe.IncrementalSnapshot,data:r({source:Be.Input},e)}),mediaInteractionCb:e=>St({type:Oe.IncrementalSnapshot,data:r({source:Be.MediaInteraction},e)}),styleSheetRuleCb:e=>St({type:Oe.IncrementalSnapshot,data:r({source:Be.StyleSheetRule},e)}),styleDeclarationCb:e=>St({type:Oe.IncrementalSnapshot,data:r({source:Be.StyleDeclaration},e)}),canvasMutationCb:H,fontCb:e=>St({type:Oe.IncrementalSnapshot,data:r({source:Be.Font},e)}),selectionCb:e=>{St({type:Oe.IncrementalSnapshot,data:r({source:Be.Selection},e)})},customElementCb:e=>{St({type:Oe.IncrementalSnapshot,data:r({source:Be.CustomElement},e)})},blockClass:o,ignoreClass:s,ignoreSelector:u,maskTextClass:l,maskTextSelector:c,maskInputOptions:L,inlineStylesheet:d,sampling:b,recordDOM:I,recordCanvas:k,inlineImages:M,userTriggeredOnInput:T,collectFonts:N,doc:e,maskInputFn:p,maskTextFn:m,keepIframeSrcFn:R,blockSelector:a,slimDOMOptions:D,dataURLOptions:w,mirror:Lt,iframeManager:W,stylesheetManager:G,shadowDomManager:z,processedNodeManager:X,canvasManager:At,ignoreCSSAttributes:F,plugins:(null==(t=null==_?void 0:_.filter((e=>e.observer)))?void 0:t.map((e=>({observer:e.observer,options:e.options,callback:t=>St({type:Oe.Plugin,data:{plugin:e.name,payload:t}})}))))||[]},y)};W.addLoadListener((e=>{try{K.push(U(e.contentDocument))}catch(e){console.warn(e)}}));var J=()=>{xt(),K.push(U(document)),Et=!0};return"interactive"===document.readyState||"complete"===document.readyState?J():(K.push(fe("DOMContentLoaded",(()=>{St({type:Oe.DomContentLoaded,data:{}}),"DOMContentLoaded"===A&&J()}))),K.push(fe("load",(()=>{St({type:Oe.Load,data:{}}),"load"===A&&J()}),window))),()=>{K.forEach((e=>e())),X.destroy(),Et=!1,He=void 0}}catch(e){console.warn(e)}}Dt.addCustomEvent=(e,t)=>{if(!Et)throw new Error("please add custom event after start recording");St({type:Oe.Custom,data:{tag:e,payload:t}})},Dt.freezePage=()=>{Je.forEach((e=>e.freeze()))},Dt.takeFullSnapshot=e=>{if(!Et)throw new Error("please take full snapshot after start recording");xt(e)},Dt.mirror=Lt,(Bt=Ot||(Ot={}))[Bt.NotStarted=0]="NotStarted",Bt[Bt.Running=1]="Running",Bt[Bt.Stopped=2]="Stopped";var qt,Vt=Object.defineProperty,Pt=(e,t,r)=>((e,t,r)=>t in e?Vt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),Yt=Object.defineProperty,Ht=(e,t,r)=>((e,t,r)=>t in e?Yt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),Gt=Object.defineProperty,Wt=(e,t,r)=>((e,t,r)=>t in e?Gt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),jt={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Xt={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},zt={};function Kt(e){if(zt[e])return zt[e];var t=globalThis[e],r=t.prototype,n=e in jt?jt[e]:void 0,i=Boolean(n&&n.every((e=>{var t,n;return Boolean(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))}))),o=e in Xt?Xt[e]:void 0,a=Boolean(o&&o.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(i&&a)return zt[e]=t.prototype,t.prototype;try{var s=document.createElement("iframe");document.body.appendChild(s);var u=s.contentWindow;if(!u)return t.prototype;var l=u[e].prototype;return document.body.removeChild(s),l?zt[e]=l:r}catch(e){return r}}var Ut={};function Jt(e,t,r){var n,i=e+"."+String(r);if(Ut[i])return Ut[i].call(t);var o=Kt(e),a=null==(n=Object.getOwnPropertyDescriptor(o,r))?void 0:n.get;return a?(Ut[i]=a,a.call(t)):t[r]}var Qt={};function $t(e,t,r){var n=e+"."+String(r);if(Qt[n])return Qt[n].bind(t);var i=Kt(e)[r];return"function"!=typeof i?t[r]:(Qt[n]=i,i.bind(t))}var er={childNodes:function(e){return Jt("Node",e,"childNodes")},parentNode:function(e){return Jt("Node",e,"parentNode")},parentElement:function(e){return Jt("Node",e,"parentElement")},textContent:function(e){return Jt("Node",e,"textContent")},contains:function(e,t){return $t("Node",e,"contains")(t)},getRootNode:function(e){return $t("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?Jt("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?Jt("Element",e,"shadowRoot"):null},querySelector:function(e,t){return Jt("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return Jt("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return Kt("MutationObserver").constructor}};class tr{constructor(){Wt(this,"idNodeMap",new Map),Wt(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;var r=null==(t=this.getMeta(e))?void 0:t.id;return null!=r?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){var t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach((e=>this.removeNodeFromMap(e)))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){var r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){var r=this.getNode(e);if(r){var n=this.nodeMetaMap.get(r);n&&this.nodeMetaMap.set(t,n)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function rr(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&rr(er.parentNode(e),t,r);for(var n=e.classList.length;n--;){var i=e.classList[n];if(t.test(i))return!0}return!!r&&rr(er.parentNode(e),t,r)}class nr{constructor(){__publicField22(this,"parentElement",null),__publicField22(this,"parentNode",null),__publicField22(this,"ownerDocument"),__publicField22(this,"firstChild",null),__publicField22(this,"lastChild",null),__publicField22(this,"previousSibling",null),__publicField22(this,"nextSibling",null),__publicField22(this,"ELEMENT_NODE",1),__publicField22(this,"TEXT_NODE",3),__publicField22(this,"nodeType"),__publicField22(this,"nodeName"),__publicField22(this,"RRNodeType")}get childNodes(){for(var e=[],t=this.firstChild;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(!(e instanceof nr))return!1;if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}var ir={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},or={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ar={};function sr(e){if(ar[e])return ar[e];var t=globalThis[e],r=t.prototype,n=e in ir?ir[e]:void 0,i=Boolean(n&&n.every((e=>{var t,n;return Boolean(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))}))),o=e in or?or[e]:void 0,a=Boolean(o&&o.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(i&&a)return ar[e]=t.prototype,t.prototype;try{var s=document.createElement("iframe");document.body.appendChild(s);var u=s.contentWindow;if(!u)return t.prototype;var l=u[e].prototype;return document.body.removeChild(s),l?ar[e]=l:r}catch(e){return r}}var ur={};function lr(e,t,r){var n,i=e+"."+String(r);if(ur[i])return ur[i].call(t);var o=sr(e),a=null==(n=Object.getOwnPropertyDescriptor(o,r))?void 0:n.get;return a?(ur[i]=a,a.call(t)):t[r]}var cr={};function dr(e,t,r){var n=e+"."+String(r);if(cr[n])return cr[n].bind(t);var i=sr(e)[r];return"function"!=typeof i?t[r]:(cr[n]=i,i.bind(t))}var hr={childNodes:function(e){return lr("Node",e,"childNodes")},parentNode:function(e){return lr("Node",e,"parentNode")},parentElement:function(e){return lr("Node",e,"parentElement")},textContent:function(e){return lr("Node",e,"textContent")},contains:function(e,t){return dr("Node",e,"contains")(t)},getRootNode:function(e){return dr("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?lr("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?lr("Element",e,"shadowRoot"):null},querySelector:function(e,t){return lr("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return lr("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return sr("MutationObserver").constructor}};var fr="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",vr={map:{},getId:()=>(console.error(fr),-1),getNode:()=>(console.error(fr),null),removeNodeFromMap(){console.error(fr)},has:()=>(console.error(fr),!1),reset(){console.error(fr)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(vr=new Proxy(vr,{get:(e,t,r)=>("map"===t&&console.error(fr),Reflect.get(e,t,r))}));var pr=Date.now;function mr(e){return e?e.nodeType===e.ELEMENT_NODE?e:hr.parentElement(e):null}/[1-9][0-9]{12}/.test(Date.now().toString())||(pr=()=>(new Date).getTime());function yr(e){var t,r=null;return"getRootNode"in e&&(null==(t=hr.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&hr.host(hr.getRootNode(e))&&(r=hr.host(hr.getRootNode(e))),r}function gr(e){for(var t,r=e;t=yr(r);)r=t;return r}function br(e){var t=e.ownerDocument;if(!t)return!1;var r=gr(e);return hr.contains(t,r)}for(var wr=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:class{constructor(){Ht(this,"id",1),Ht(this,"styleIDMap",new WeakMap),Ht(this,"idStyleMap",new Map)}getId(e){var t;return null!==(t=this.styleIDMap.get(e))&&void 0!==t?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){return this.has(e)?this.getId(e):(r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r);var r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}},get _mirror(){return vr},closestElementOfNode:mr,getBaseDimension:function e(t,r){var n,i,o=null==(i=null==(n=t.ownerDocument)?void 0:n.defaultView)?void 0:i.frameElement;if(!o||o===r)return{x:0,y:0,relativeScale:1,absoluteScale:1};var a=o.getBoundingClientRect(),s=e(o,r),u=a.height/o.clientHeight;return{x:a.x*s.relativeScale+s.x,y:a.y*s.relativeScale+s.y,relativeScale:u,absoluteScale:s.absoluteScale*u}},getNestedRule:function e(t,r){var n=t[r[0]];return 1===r.length?n:e(n.cssRules[r[1]].cssRules,r.slice(2))},getPositionsAndIndex:function(e){var t=[...e],r=t.pop();return{positions:t,index:r}},getRootShadowHost:gr,getShadowHost:yr,getWindowHeight:function(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight},getWindowScroll:function(e){var t,r,n,i,o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:o.documentElement.scrollLeft||(null==o?void 0:o.body)&&(null==(t=hr.parentElement(o.body))?void 0:t.scrollLeft)||(null==(r=null==o?void 0:o.body)?void 0:r.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==o?void 0:o.documentElement.scrollTop)||(null==o?void 0:o.body)&&(null==(n=hr.parentElement(o.body))?void 0:n.scrollTop)||(null==(i=null==o?void 0:o.body)?void 0:i.scrollTop)||0}},getWindowWidth:function(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth},hasShadowRoot:function(e){return!!e&&(e instanceof nr&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(hr.shadowRoot(e)))},hookSetter:function e(t,r,n,i,o){void 0===o&&(o=window);var a=o.Object.getOwnPropertyDescriptor(t,r);return o.Object.defineProperty(t,r,i?n:{set(e){setTimeout((()=>{n.set.call(this,e)}),0),a&&a.set&&a.set.call(this,e)}}),()=>e(t,r,a||{},!0)},inDom:function(e){var t=e.ownerDocument;return!!t&&(hr.contains(t,e)||br(e))},isAncestorRemoved:function e(t,r){if(i=(n=t)&&"host"in n&&"mode"in n&&er.host(n)||null,Boolean(i&&"shadowRoot"in i&&er.shadowRoot(i)===n))return!1;var n,i,o=r.getId(t);if(!r.has(o))return!0;var a=hr.parentNode(t);return(!a||a.nodeType!==t.DOCUMENT_NODE)&&(!a||e(a,r))},isBlocked:function(e,t,r,n){if(!e)return!1;var i=mr(e);if(!i)return!1;try{if("string"==typeof t){if(i.classList.contains(t))return!0;if(n&&null!==i.closest("."+t))return!0}else if(rr(i,t,n))return!0}catch(e){}if(r){if(i.matches(r))return!0;if(n&&null!==i.closest(r))return!0}return!1},isIgnored:function(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||-2===t.getId(e)},isSerialized:function(e,t){return-1!==t.getId(e)},isSerializedIframe:function(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))},isSerializedStylesheet:function(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))},iterateResolveTree:function e(t,r){r(t.value);for(var n=t.children.length-1;n>=0;n--)e(t.children[n],r)},legacy_isTouchEvent:function(e){return Boolean(e.changedTouches)},get nowTimestamp(){return pr},on:function(e,t,r){void 0===r&&(r=document);var n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)},patch:function(e,t,r){try{if(!(t in e))return()=>{};var n=e[t],i=r(n);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=i,()=>{e[t]=n}}catch(e){return()=>{}}},polyfill:function(e){void 0===e&&(e=window),"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)},queueToResolveTrees:function(e){var t={},r=(e,r)=>{var n={value:e,parent:r,children:[]};return t[e.node.id]=n,n},n=[];for(var i of e){var{nextId:o,parentId:a}=i;if(o&&o in t){var s=t[o];if(s.parent){var u=s.parent.children.indexOf(s);s.parent.children.splice(u,0,r(i,s.parent))}else{var l=n.indexOf(s);n.splice(l,0,r(i,null))}}else if(a in t){var c=t[a];c.children.push(r(i,c))}else n.push(r(i,null))}return n},shadowHostInDom:br,throttle:function(e,t,r){void 0===r&&(r={});var n=null,i=0;return function(){for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];var u=Date.now();i||!1!==r.leading||(i=u);var l=t-(u-i),c=this;l<=0||l>t?(n&&(clearTimeout(n),n=null),i=u,e.apply(c,a)):n||!1===r.trailing||(n=setTimeout((()=>{i=!1===r.leading?0:Date.now(),n=null,e.apply(c,a)}),l))}},uniqueTextMutations:function(e){for(var t=new Set,r=[],n=e.length;n--;){var i=e[n];t.has(i.id)||(r.push(i),t.add(i.id))}return r}},Symbol.toStringTag,{value:"Module"})),Cr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ir="undefined"==typeof Uint8Array?[]:new Uint8Array(256),kr=0;kr<64;kr++)Ir[Cr.charCodeAt(kr)]=kr;var Sr;"undefined"!=typeof window&&window.Blob&&new Blob([(e=>Uint8Array.from(atob(e),(e=>e.charCodeAt(0))))("KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=")],{type:"text/javascript;charset=utf-8"});try{if(2!==Array.from([1],(e=>2*e))[0]){var xr=document.createElement("iframe");document.body.appendChild(xr),Array.from=(null==(qt=xr.contentWindow)?void 0:qt.Array.from)||Array.from,document.body.removeChild(xr)}}catch(e){console.debug("Unable to override Array.from",e)}new tr,function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(Sr||(Sr={}));class Ar{constructor(e){Pt(this,"fileName"),Pt(this,"functionName"),Pt(this,"lineNumber"),Pt(this,"columnNumber"),this.fileName=e.fileName||"",this.functionName=e.functionName||"",this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber}toString(){var e=this.lineNumber||"",t=this.columnNumber||"";return this.functionName?this.functionName+" ("+this.fileName+":"+e+":"+t+")":this.fileName+":"+e+":"+t}}var Tr=/(^|@)\S+:\d+/,Nr=/^\s*at .*(\S+:\d+|\(native\))/m,Mr=/^(eval@)?(\[native code])?$/,_r={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(Nr)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):(console.warn("[console-record-plugin]: Failed to parse error object:",e),[]):[]},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];var t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!t)throw new Error("Cannot parse given url: "+e);return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter((function(e){return!!e.match(Nr)}),this).map((function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var t=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),r=t.match(/ (\((.+):(\d+):(\d+)\)$)/),n=(t=r?t.replace(r[0],""):t).split(/\s+/).slice(1),i=this.extractLocation(r?r[1]:n.pop()),o=n.join(" ")||void 0,a=["eval","<anonymous>"].indexOf(i[0])>-1?void 0:i[0];return new Ar({functionName:o,fileName:a,lineNumber:i[1],columnNumber:i[2]})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(e){return!e.match(Mr)}),this).map((function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new Ar({functionName:e});var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=e.match(t),n=r&&r[1]?r[1]:void 0,i=this.extractLocation(e.replace(t,""));return new Ar({functionName:n,fileName:i[0],lineNumber:i[1],columnNumber:i[2]})}),this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){for(var t=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split("\n"),n=[],i=2,o=r.length;i<o;i+=2){var a=t.exec(r[i]);a&&n.push(new Ar({fileName:a[2],lineNumber:parseFloat(a[1])}))}return n},parseOpera10:function(e){for(var t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=e.stacktrace.split("\n"),n=[],i=0,o=r.length;i<o;i+=2){var a=t.exec(r[i]);a&&n.push(new Ar({functionName:a[3]||void 0,fileName:a[2],lineNumber:parseFloat(a[1])}))}return n},parseOpera11:function(e){return e.stack.split("\n").filter((function(e){return!!e.match(Tr)&&!e.match(/^Error created at/)}),this).map((function(e){var t=e.split("@"),r=this.extractLocation(t.pop()),n=(t.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new Ar({functionName:n,fileName:r[0],lineNumber:r[1],columnNumber:r[2]})}),this)}};function Rr(e){if(!e||!e.outerHTML)return"";for(var t="";e.parentElement;){var r=e.localName;if(!r)break;r=r.toLowerCase();var n=e.parentElement,i=[];if(n.children&&n.children.length>0)for(var o=0;o<n.children.length;o++){var a=n.children[o];a.localName&&a.localName.toLowerCase&&a.localName.toLowerCase()===r&&i.push(a)}i.length>1&&(r+=":eq("+i.indexOf(e)+")"),t=r+(t?">"+t:""),e=n}return t}function Fr(e){return"[object Object]"===Object.prototype.toString.call(e)}function Er(e,t){if(0===t)return!0;var r=Object.keys(e);for(var n of r)if(Fr(e[n])&&Er(e[n],t-1))return!0;return!1}function Zr(e,t){var r={numOfKeysLimit:50,depthOfLimit:4};Object.assign(r,t);var n=[],i=[];return JSON.stringify(e,(function(e,t){if(n.length>0){var o=n.indexOf(this);~o?n.splice(o+1):n.push(this),~o?i.splice(o,1/0,e):i.push(e),~n.indexOf(t)&&(t=n[0]===t?"[Circular ~]":"[Circular ~."+i.slice(0,n.indexOf(t)).join(".")+"]")}else n.push(t);if(null===t)return t;if(void 0===t)return"undefined";if(function(e){if(Fr(e)&&Object.keys(e).length>r.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if(Fr(e)&&Er(e,r.depthOfLimit))return!0;return!1}(t))return function(e){var t=e.toString();r.stringLengthLimit&&t.length>r.stringLengthLimit&&(t=t.slice(0,r.stringLengthLimit)+"...");return t}(t);if("bigint"==typeof t)return t.toString()+"n";if(t instanceof Event){var a={};for(var s in t){var u=t[s];Array.isArray(u)?a[s]=Rr(u.length?u[0]:null):a[s]=u}return a}return t instanceof Node?t instanceof HTMLElement?t?t.outerHTML:"":t.nodeName:t instanceof Error?t.stack?t.stack+"\nEnd of stack for Error object":t.name+": "+t.message:t}))}var Or={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function Br(e,t,r){var n,i=r?Object.assign({},Or,r):Or,o=i.logger;if(!o)return()=>{};n="string"==typeof o?t[o]:o;var a=0,s=!1,u=[];if(i.level.includes("error")){var l=t=>{var r=t.message,n=t.error,o=_r.parse(n).map((e=>e.toString())),a=[Zr(r,i.stringifyOptions)];e({level:"error",trace:o,payload:a})};t.addEventListener("error",l),u.push((()=>{t.removeEventListener("error",l)}));var c=t=>{var r,n;t.reason instanceof Error?n=[Zr("Uncaught (in promise) "+(r=t.reason).name+": "+r.message,i.stringifyOptions)]:(r=new Error,n=[Zr("Uncaught (in promise)",i.stringifyOptions),Zr(t.reason,i.stringifyOptions)]);var o=_r.parse(r).map((e=>e.toString()));e({level:"error",trace:o,payload:n})};t.addEventListener("unhandledrejection",c),u.push((()=>{t.removeEventListener("unhandledrejection",c)}))}for(var d of i.level)u.push(h(n,d));return()=>{u.forEach((e=>e()))};function h(t,r){var n=this;return t[r]?wr.patch(t,r,(t=>function(){for(var o=arguments.length,u=new Array(o),l=0;l<o;l++)u[l]=arguments[l];if(t.apply(n,u),!("assert"===r&&u[0]||s)){s=!0;try{var c=_r.parse(new Error).map((e=>e.toString())).splice(1),d=("assert"===r?u.slice(1):u).map((e=>Zr(e,i.stringifyOptions)));++a<i.lengthThreshold?e({level:r,trace:c,payload:d}):a===i.lengthThreshold&&e({level:"warn",trace:[],payload:[Zr("The number of log records reached the threshold.")]})}catch(e){t("rrweb logger error:",e,...u)}finally{s=!1}}})):()=>{}}}var Lr=e=>({name:"rrweb/console@1",observer:Br,options:e});function Dr(e,t){return-1!==e.indexOf(t)}var qr=function(e){return e.trim()},Vr=Array.isArray,Pr=Object.prototype,Yr=Pr.hasOwnProperty,Hr=Pr.toString,Gr=Vr||function(e){return"[object Array]"===Hr.call(e)},Wr=e=>"function"==typeof e,jr=e=>Wr(e)&&-1!==e.toString().indexOf("[native code]"),Xr=e=>e===Object(e)&&!Gr(e),zr=e=>void 0===e,Kr=e=>"[object String]"==Hr.call(e),Ur=e=>null===e,Jr=e=>zr(e)||Ur(e),Qr=e=>"[object Number]"==Hr.call(e),$r=e=>"[object Boolean]"===Hr.call(e),en=e=>e instanceof FormData;function tn(e){return null===e||"object"!=typeof e}function rn(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function nn(e){return!zr(Event)&&function(e,t){try{return e instanceof t}catch(e){return!1}}(e,Event)}var on,an,sn,un="Mobile",ln="Android",cn="Tablet",dn=ln+" "+cn,hn="iPad",fn="Apple Watch",vn="BlackBerry",pn="Nintendo",mn="PlayStation",yn="Xbox",gn="Windows Phone",bn="Nokia",wn="Ouya",Cn="Generic",In=Cn+" "+un.toLowerCase(),kn=Cn+" "+cn.toLowerCase(),Sn=new RegExp(yn,"i"),xn=new RegExp(mn+" \\w+","i"),An=new RegExp(pn+" \\w+","i"),Tn=new RegExp(vn+"|PlayBook|BB10","i"),Nn=function(e){var t=function(e){return An.test(e)?pn:xn.test(e)?mn:Sn.test(e)?yn:new RegExp(wn,"i").test(e)?wn:new RegExp("("+gn+"|WPDesktop)","i").test(e)?gn:/iPad/.test(e)?hn:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?fn:Tn.test(e)?vn:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(bn,"i").test(e)?bn:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?new RegExp(un).test(e)&&!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)||/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?ln:dn:new RegExp("(pda|"+un+")","i").test(e)?In:new RegExp(cn,"i").test(e)&&!new RegExp(cn+" pc","i").test(e)?kn:""}(e);return t===hn||t===dn||"Kobo"===t||"Kindle Fire"===t||t===kn?cn:t===pn||t===yn||t===mn||t===wn?"Console":t===fn?"Wearable":t?un:"Desktop"},Mn=e=>e instanceof Error;function _n(e){var t=globalThis._posthogChunkIds;if(t){var r=Object.keys(t);return sn&&r.length===an||(an=r.length,sn=r.reduce(((r,n)=>{on||(on={});var i=on[n];if(i)r[i[0]]=i[1];else for(var o=e(n),a=o.length-1;a>=0;a--){var s=o[a],u=null==s?void 0:s.filename,l=t[n];if(u&&l){r[u]=l,on[n]=[u,l];break}}return r}),{})),sn}}class Rn{constructor(e,t,r){void 0===r&&(r=[]),this.coercers=e,this.stackParser=t,this.modifiers=r}buildFromUnknown(e,t){void 0===t&&(t={});var r=t&&t.mechanism||{handled:!0,type:"generic"},n=this.buildCoercingContext(r,t,0).apply(e),i=this.buildParsingContext(),o=this.parseStacktrace(n,i);return{$exception_list:this.convertToExceptionList(o,r),$exception_level:"error"}}modifyFrames(e){var r=this;return t((function*(){for(var t of e)t.stacktrace&&t.stacktrace.frames&&Gr(t.stacktrace.frames)&&(t.stacktrace.frames=yield r.applyModifiers(t.stacktrace.frames));return e}))()}coerceFallback(e){var t;return{type:"Error",value:"Unknown error",stack:null==(t=e.syntheticException)?void 0:t.stack,synthetic:!0}}parseStacktrace(e,t){var n,i;return null!=e.cause&&(n=this.parseStacktrace(e.cause,t)),""!=e.stack&&null!=e.stack&&(i=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?1:0),t.chunkIdMap)),r({},e,{cause:n,stack:i})}applyChunkIds(e,t){return e.map((e=>(e.filename&&t&&(e.chunk_id=t[e.filename]),e)))}applyCoercers(e,t){for(var r of this.coercers)if(r.match(e))return r.coerce(e,t);return this.coerceFallback(t)}applyModifiers(e){var r=this;return t((function*(){var t=e;for(var n of r.modifiers)t=yield n(t);return t}))()}convertToExceptionList(e,t){var n,i,o,a={type:e.type,value:e.value,mechanism:{type:null!==(n=t.type)&&void 0!==n?n:"generic",handled:null===(i=t.handled)||void 0===i||i,synthetic:null!==(o=e.synthetic)&&void 0!==o&&o}};e.stack&&(a.stacktrace={type:"raw",frames:e.stack});var s=[a];return null!=e.cause&&s.push(...this.convertToExceptionList(e.cause,r({},t,{handled:!0}))),s}buildParsingContext(){return{chunkIdMap:_n(this.stackParser)}}buildCoercingContext(e,t,n){void 0===n&&(n=0);var i=(r,n)=>{if(n<=4){var i=this.buildCoercingContext(e,t,n);return this.applyCoercers(r,i)}};return r({},t,{syntheticException:0==n?t.syntheticException:void 0,mechanism:e,apply:e=>i(e,n),next:e=>i(e,n+1)})}}var Fn="?";function En(e,t,r,n,i){var o={platform:e,filename:t,function:"<anonymous>"===r?Fn:r,in_app:!0};return zr(n)||(o.lineno=n),zr(i)||(o.colno=i),o}var Zn=(e,t)=>{var r=-1!==e.indexOf("safari-extension"),n=-1!==e.indexOf("safari-web-extension");return r||n?[-1!==e.indexOf("@")?e.split("@")[0]:Fn,r?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},On=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Bn=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Ln=/\((\S*)(?::(\d+))(?::(\d+))\)/,Dn=(e,t)=>{var r=On.exec(e);if(r){var[,n,i,o]=r;return En(t,n,Fn,+i,+o)}var a=Bn.exec(e);if(a){if(a[2]&&0===a[2].indexOf("eval")){var s=Ln.exec(a[2]);s&&(a[2]=s[1],a[3]=s[2],a[4]=s[3])}var[u,l]=Zn(a[1]||Fn,a[2]);return En(t,l,u,a[3]?+a[3]:void 0,a[4]?+a[4]:void 0)}},qn=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Vn=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Pn=(e,t)=>{var r=qn.exec(e);if(r){if(r[3]&&r[3].indexOf(" > eval")>-1){var n=Vn.exec(r[3]);n&&(r[1]=r[1]||"eval",r[3]=n[1],r[4]=n[2],r[5]="")}var i=r[3],o=r[1]||Fn;return[o,i]=Zn(o,i),En(t,i,o,r[4]?+r[4]:void 0,r[5]?+r[5]:void 0)}},Yn=/\(error: (.*)\)/,Hn=50;function Gn(){return function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return function(t,i){void 0===i&&(i=0);for(var o=[],a=t.split("\n"),s=i;s<a.length;s++){var u=a[s];if(!(u.length>1024)){var l=Yn.test(u)?u.replace(Yn,"$1"):u;if(!l.match(/\S*Error: /)){for(var c of n){var d=c(l,e);if(d){o.push(d);break}}if(o.length>=Hn)break}}}return function(e){if(!e.length)return[];var t=Array.from(e);return t.reverse(),t.slice(0,Hn).map((e=>{return r({},e,{filename:e.filename||(n=t,n[n.length-1]||{}).filename,function:e.function||Fn});var n}))}(o)}}("web:javascript",Dn,Pn)}class Wn{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,t){var r=Kr(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:r?e.stack:void 0,cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return this.isDOMError(e)?"DOMError":"DOMException"}getValue(e){var t=e.name||(this.isDOMError(e)?"DOMError":"DOMException");return e.message?t+": "+e.message:t}isDOMException(e){return rn(e,"DOMException")}isDOMError(e){return rn(e,"DOMError")}}class jn{match(e){return(e=>e instanceof Error)(e)}coerce(e,t){return{type:this.getType(e),value:this.getMessage(e,t),stack:this.getStack(e),cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return e.name||e.constructor.name}getMessage(e,t){var r=e.message;return r.error&&"string"==typeof r.error.message?String(r.error.message):String(r)}getStack(e){return e.stacktrace||e.stack||void 0}}class Xn{constructor(){}match(e){return rn(e,"ErrorEvent")&&null!=e.error}coerce(e,t){var r,n=t.apply(e.error);return n||{type:"ErrorEvent",value:e.message,stack:null==(r=t.syntheticException)?void 0:r.stack,synthetic:!0}}}var zn=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class Kn{match(e){return"string"==typeof e}coerce(e,t){var r,[n,i]=this.getInfos(e);return{type:null!=n?n:"Error",value:null!=i?i:e,stack:null==(r=t.syntheticException)?void 0:r.stack,synthetic:!0}}getInfos(e){var t="Error",r=e,n=e.match(zn);return n&&(t=n[1],r=n[2]),[t,r]}}var Un=["fatal","error","warning","log","info","debug"];function Jn(e,t){void 0===t&&(t=40);var r=Object.keys(e);if(r.sort(),!r.length)return"[object has no keys]";for(var n=r.length;n>0;n--){var i=r.slice(0,n).join(", ");if(!(i.length>t))return n===r.length||i.length<=t?i:i.slice(0,t)+"..."}return""}class Qn{match(e){return"object"==typeof e&&null!==e}coerce(e,t){var r,n=this.getErrorPropertyFromObject(e);return n?t.apply(n):{type:this.getType(e),value:this.getValue(e),stack:null==(r=t.syntheticException)?void 0:r.stack,level:this.isSeverityLevel(e.level)?e.level:"error",synthetic:!0}}getType(e){return nn(e)?e.constructor.name:"Error"}getValue(e){if("name"in e&&"string"==typeof e.name){var t="'"+e.name+"' captured as exception";return"message"in e&&"string"==typeof e.message&&(t+=" with message: '"+e.message+"'"),t}if("message"in e&&"string"==typeof e.message)return e.message;var r=this.getObjectClassName(e);return(r&&"Object"!==r?"'"+r+"'":"Object")+" captured as exception with keys: "+Jn(e)}isSeverityLevel(e){return Kr(e)&&!(e=>Kr(e)&&0===e.trim().length)(e)&&Un.indexOf(e)>=0}getErrorPropertyFromObject(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var r=e[t];if(Mn(r))return r}}getObjectClassName(e){try{var t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){return}}}class $n{match(e){return nn(e)}coerce(e,t){var r,n=e.constructor.name;return{type:n,value:n+" captured as exception with keys: "+Jn(e),stack:null==(r=t.syntheticException)?void 0:r.stack,synthetic:!0}}}class ei{match(e){return tn(e)}coerce(e,t){var r;return{type:"Error",value:"Primitive value captured as exception: "+String(e),stack:null==(r=t.syntheticException)?void 0:r.stack,synthetic:!0}}}class ti{match(e){return rn(e,"PromiseRejectionEvent")}coerce(e,t){var r,n=this.getUnhandledRejectionReason(e);return tn(n)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(n),stack:null==(r=t.syntheticException)?void 0:r.stack,synthetic:!0}:t.apply(n)}getUnhandledRejectionReason(e){if(tn(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch(e){}return e}}var ri="undefined"!=typeof window?window:void 0,ni="undefined"!=typeof globalThis?globalThis:ri;"undefined"==typeof self&&(ni.self=ni),"undefined"==typeof File&&(ni.File=function(){});var ii=Array.prototype.forEach,oi=null==ni?void 0:ni.navigator,ai=null==ni?void 0:ni.document;null==ni||ni.location,null==ni||ni.fetch,null!=ni&&ni.XMLHttpRequest&&"withCredentials"in new ni.XMLHttpRequest&&ni.XMLHttpRequest,null==ni||ni.AbortController;var si=null==oi?void 0:oi.userAgent,ui=null!=ri?ri:{},li=()=>!!ri.Zone,ci=e=>e instanceof Document,di=function(e,t){var{debugEnabled:r}=void 0===t?{}:t,n={o:function(t){if(ri&&(ui.POSTHOG_DEBUG||r)&&!zr(ri.console)&&ri.console){for(var n=("__rrweb_original__"in ri.console[t]?ri.console[t].__rrweb_original__:ri.console[t]),i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];n(e,...o)}},info:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];n.o("log",...t)},warn:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];n.o("warn",...t)},error:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];n.o("error",...t)},critical:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];console.error(e,...r)},uninitializedWarning:e=>{n.error("You must initialize PostHog before calling "+e)},createLogger:(t,r)=>di(e+" "+t,r)};return n},hi=di("[PostHog.js]"),fi=hi.createLogger,vi={};function pi(e,t,r){if(Gr(e))if(ii&&e.forEach===ii)e.forEach(t,r);else if("length"in e&&e.length===+e.length)for(var n=0,i=e.length;n<i;n++)if(n in e&&t.call(r,e[n],n)===vi)return}function mi(e,t,r){if(!Jr(e)){if(Gr(e))return pi(e,t,r);if(en(e)){for(var n of e.entries())if(t.call(r,n[1],n[0])===vi)return}else for(var i in e)if(Yr.call(e,i)&&t.call(r,e[i],i)===vi)return}}var yi=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return pi(r,(function(t){for(var r in t)void 0!==t[r]&&(e[r]=t[r])})),e};function gi(e){for(var t=Object.keys(e),r=t.length,n=new Array(r);r--;)n[r]=[t[r],e[t[r]]];return n}function bi(e,t,r,n){var{capture:i=!1,passive:o=!0}=null!=n?n:{};null==e||e.addEventListener(t,r,{capture:i,passive:o})}var wi=function(e,t){var r,n;void 0===t&&(t="&");var i=[];return mi(e,(function(e,t){zr(e)||zr(t)||"undefined"===t||(r=encodeURIComponent((e=>e instanceof File)(e)?e.name:e.toString()),n=encodeURIComponent(t),i[i.length]=n+"="+r)})),i.join(t)};function Ci(e,t,r){try{if(!(t in e))return()=>{};var n=e[t],i=r(n);return Wr(i)&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=i,()=>{e[t]=n}}catch(e){return()=>{}}}function Ii(e,t){var r,n=function(e){try{return"string"==typeof e?new URL(e).hostname:"url"in e?new URL(e.url).hostname:e.hostname}catch(e){return null}}(e),i={hostname:n,isHostDenied:!1};if(null==(r=t.payloadHostDenyList)||!r.length||null==n||!n.trim().length)return i;for(var o of t.payloadHostDenyList)if(n.endsWith(o))return{hostname:n,isHostDenied:!0};return i}function ki(e){return!!e&&1===e.nodeType}function Si(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function xi(e){return e?qr(e).split(/\s+/):[]}function Ai(e){var t="";switch(typeof e.className){case"string":t=e.className;break;case"object":t=(e.className&&"baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:t=""}return xi(t)}function Ti(e){var t="";return Mi(e)&&!_i(e)&&e.childNodes&&e.childNodes.length&&mi(e.childNodes,(function(e){var r;(function(e){return!!e&&3===e.nodeType})(e)&&e.textContent&&(t+=null!==(r=function(e){return Jr(e)?null:qr(e).split(/(\s+)/).filter((e=>Li(e))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}(e.textContent))&&void 0!==r?r:"")})),qr(t)}var Ni=["a","button","form","input","select","textarea","label"];function Mi(e){for(var t=e;t.parentNode&&!Si(t,"body");t=t.parentNode){var r=Ai(t);if(Dr(r,"ph-sensitive")||Dr(r,"ph-no-capture"))return!1}if(Dr(Ai(e),"ph-include"))return!0;var n=e.type||"";if(Kr(n))switch(n.toLowerCase()){case"hidden":case"password":return!1}var i=e.name||e.id||"";if(Kr(i)){if(/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(i.replace(/[^a-zA-Z0-9]/g,"")))return!1}return!0}function _i(e){return!!(Si(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||Si(e,"select")||Si(e,"textarea")||"true"===e.getAttribute("contenteditable"))}var Ri="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",Fi=new RegExp("^(?:"+Ri+")$"),Ei=new RegExp(Ri),Zi="\\d{3}-?\\d{2}-?\\d{4}",Oi=new RegExp("^("+Zi+")$"),Bi=new RegExp("("+Zi+")");function Li(e,t){if(void 0===t&&(t=!0),Jr(e))return!1;if(Kr(e)){if(e=qr(e),(t?Fi:Ei).test((e||"").replace(/[- ]/g,"")))return!1;if((t?Oi:Bi).test(e))return!1}return!0}function Di(e){var t=Ti(e);return Li(t=(t+" "+qi(e)).trim())?t:""}function qi(e){var t="";return e&&e.childNodes&&e.childNodes.length&&mi(e.childNodes,(function(e){var r;if(e&&"span"===(null==(r=e.tagName)?void 0:r.toLowerCase()))try{var n=Ti(e);t=(t+" "+n).trim(),e.childNodes&&e.childNodes.length&&(t=(t+" "+qi(e)).trim())}catch(e){hi.error("[AutoCapture]",e)}})),t}function Vi(e){return function(e){var t=e.map((e=>{var t,n,i="";if(e.tag_name&&(i+=e.tag_name),e.attr_class)for(var o of(e.attr_class.sort(),e.attr_class))i+="."+o.replace(/"/g,"");var a=r({},e.text?{text:e.text}:{},{"nth-child":null!==(t=e.nth_child)&&void 0!==t?t:0,"nth-of-type":null!==(n=e.nth_of_type)&&void 0!==n?n:0},e.href?{href:e.href}:{},e.attr_id?{attr_id:e.attr_id}:{},e.attributes),s={};return gi(a).sort(((e,t)=>{var[r]=e,[n]=t;return r.localeCompare(n)})).forEach((e=>{var[t,r]=e;return s[Pi(t.toString())]=Pi(r.toString())})),i+=":",i+=gi(s).map((e=>{var[t,r]=e;return t+'="'+r+'"'})).join("")}));return t.join(";")}(function(e){return e.map((e=>{var t,r,n={text:null==(t=e.$el_text)?void 0:t.slice(0,400),tag_name:e.tag_name,href:null==(r=e.attr__href)?void 0:r.slice(0,2048),attr_class:Yi(e),attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return gi(e).filter((e=>{var[t]=e;return 0===t.indexOf("attr__")})).forEach((e=>{var[t,r]=e;return n.attributes[t]=r})),n}))}(e))}function Pi(e){return e.replace(/"|\\"/g,'\\"')}function Yi(e){var t=e.attr__class;return t?Gr(t)?t:xi(t):void 0}var Hi={initiatorTypes:["audio","beacon","body","css","early-hint","embed","fetch","frame","iframe","icon","image","img","input","link","navigation","object","ping","script","track","video","xmlhttprequest"],maskRequestFn:e=>e,recordHeaders:!1,recordBody:!1,recordInitialRequests:!1,recordPerformance:!1,performanceEntryTypeToObserve:["first-input","navigation","paint","resource"],payloadSizeLimitBytes:1e6,payloadHostDenyList:[".lr-ingest.io",".ingest.sentry.io",".clarity.ms","analytics.google.com","bam.nr-data.net"]},Gi=fi("[Recorder]"),Wi=e=>"navigation"===e.entryType,ji=e=>"resource"===e.entryType;function Xi(e,t,r){if(r.recordInitialRequests){var n=t.performance.getEntries().filter((e=>Wi(e)||ji(e)&&r.initiatorTypes.includes(e.initiatorType)));e({requests:n.flatMap((e=>eo({entry:e,method:void 0,status:void 0,networkRequest:{},isInitial:!0}))),isInitial:!0})}var i=new t.PerformanceObserver((t=>{var n=t.getEntries().filter((e=>Wi(e)||ji(e)&&r.initiatorTypes.includes(e.initiatorType)&&(e=>!r.recordBody&&!r.recordHeaders||"xmlhttprequest"!==e.initiatorType&&"fetch"!==e.initiatorType)(e)));e({requests:n.flatMap((e=>eo({entry:e,method:void 0,status:void 0,networkRequest:{}})))})})),o=PerformanceObserver.supportedEntryTypes.filter((e=>r.performanceEntryTypeToObserve.includes(e)));return i.observe({entryTypes:o}),()=>{i.disconnect()}}function zi(e,t){return!!t&&($r(t)||t[e])}function Ki(e){var{type:t,recordBody:r,headers:n,url:i}=e;function o(e){var t=Object.keys(n).find((e=>"content-type"===e.toLowerCase())),r=t&&n[t];return e.some((e=>null==r?void 0:r.includes(e)))}if(!r)return!1;if(function e(t){try{return"string"==typeof t?t.startsWith("blob:"):t instanceof URL?"blob:"===t.protocol:t instanceof Request&&e(t.url)}catch(e){return!1}}(i))return!1;if($r(r))return!0;if(Gr(r))return o(r);var a=r[t];return $r(a)?a:o(a)}function Ui(e,t,r,n,i,o){return Ji.apply(this,arguments)}function Ji(){return Ji=t((function*(e,t,r,n,i,o){if(void 0===o&&(o=0),o>10)return Gi.warn("Failed to get performance entry for request",{url:r,initiatorType:t}),null;var a=function(e,t){for(var r=e.length-1;r>=0;r-=1)if(t(e[r]))return e[r]}(e.performance.getEntriesByName(r),(e=>ji(e)&&e.initiatorType===t&&(zr(n)||e.startTime>=n)&&(zr(i)||e.startTime<=i)));return a||(yield new Promise((e=>setTimeout(e,50*o))),Ui(e,t,r,n,i,o+1))})),Ji.apply(this,arguments)}function Qi(e){var{body:t,options:r,url:n}=e;if(Jr(t))return null;var{hostname:i,isHostDenied:o}=Ii(n,r);if(o)return i+" is in deny list";if(Kr(t))return t;if(ci(t))return t.textContent;if(en(t))return wi(t);if(Xr(t))try{return JSON.stringify(t)}catch(e){return"[SessionReplay] Failed to stringify response object"}return"[SessionReplay] Cannot read body of type "+toString.call(t)}var $i=e=>!Ur(e)&&("navigation"===e.entryType||"resource"===e.entryType);function eo(e){var{entry:t,method:n,status:i,networkRequest:o,isInitial:a,start:s,end:u,url:l,initiatorType:c}=e;s=t?t.startTime:s,u=t?t.responseEnd:u;var d=Math.floor(Date.now()-performance.now()),h=Math.floor(d+(s||0)),f=[r({},t?t.toJSON():{name:l},{startTime:zr(s)?void 0:Math.round(s),endTime:zr(u)?void 0:Math.round(u),timeOrigin:d,timestamp:h,method:n,initiatorType:c||(t?t.initiatorType:void 0),status:i,requestHeaders:o.requestHeaders,requestBody:o.requestBody,responseHeaders:o.responseHeaders,responseBody:o.responseBody,isInitial:a})];if($i(t))for(var v of t.serverTiming||[])f.push({timeOrigin:d,timestamp:h,startTime:Math.round(t.startTime),name:v.name,duration:v.duration,entryType:"serverTiming"});return f}var to=["video/","audio/"];function ro(e){return new Promise(((t,r)=>{var n=setTimeout((()=>t("[SessionReplay] Timeout while trying to read body")),500);try{e.clone().text().then((e=>t(e)),(e=>r(e))).finally((()=>clearTimeout(n)))}catch(e){clearTimeout(n),t("[SessionReplay] Failed to read body")}}))}function no(){return no=t((function*(e){var{r:t,options:r,url:n}=e,{hostname:i,isHostDenied:o}=Ii(n,r);return o?Promise.resolve(i+" is in deny list"):ro(t)})),no.apply(this,arguments)}function io(){return io=t((function*(e){var{r:t,options:r,url:n}=e,i=function(e){var t,{r:r,options:n,url:i}=e;if("chunked"===r.headers.get("Transfer-Encoding"))return"Chunked Transfer-Encoding is not supported";var o=null==(t=r.headers.get("Content-Type"))?void 0:t.toLowerCase(),a=to.some((e=>null==o?void 0:o.startsWith(e)));if(o&&a)return"Content-Type "+o+" is not supported";var{hostname:s,isHostDenied:u}=Ii(i,n);return u?s+" is in deny list":null}({r:t,options:r,url:n});return Ur(i)?ro(t):Promise.resolve(i)})),io.apply(this,arguments)}function oo(e,r,n){if(!n.initiatorTypes.includes("fetch"))return()=>{};var i=zi("request",n.recordHeaders),o=zi("response",n.recordHeaders),a=Ci(r,"fetch",(a=>function(){var s=t((function*(t,s){var u,l,c,d=new Request(t,s),h={};try{var f={};d.headers.forEach(((e,t)=>{f[t]=e})),i&&(h.requestHeaders=f),Ki({type:"request",headers:f,url:t,recordBody:n.recordBody})&&(h.requestBody=yield function(e){return no.apply(this,arguments)}({r:d,options:n,url:t})),l=r.performance.now(),u=yield a(d),c=r.performance.now();var v={};return u.headers.forEach(((e,t)=>{v[t]=e})),o&&(h.responseHeaders=v),Ki({type:"response",headers:v,url:t,recordBody:n.recordBody})&&(h.responseBody=yield function(e){return io.apply(this,arguments)}({r:u,options:n,url:t})),u}finally{Ui(r,"fetch",d.url,l,c).then((t=>{var r,n=eo({entry:t,method:d.method,status:null==(r=u)?void 0:r.status,networkRequest:h,start:l,end:c,url:d.url,initiatorType:"fetch"});e({requests:n})})).catch((()=>{}))}}));return function(e,t){return s.apply(this,arguments)}}()));return()=>{a()}}var ao=null;function so(e,t,n){if(!("performance"in t))return()=>{};if(ao)return Gi.warn("Network observer already initialised, doing nothing"),()=>{};var i=n?Object.assign({},Hi,n):Hi,o=t=>{var n=[];t.requests.forEach((e=>{var t=i.maskRequestFn(e);t&&n.push(t)})),n.length>0&&e(r({},t,{requests:n}))},a=Xi(o,t,i),s=()=>{},u=()=>{};return(i.recordHeaders||i.recordBody)&&(s=function(e,t,r){if(!r.initiatorTypes.includes("xmlhttprequest"))return()=>{};var n=zi("request",r.recordHeaders),i=zi("response",r.recordHeaders),o=Ci(t.XMLHttpRequest.prototype,"open",(o=>function(a,s,u,l,c){void 0===u&&(u=!0);var d,h,f=this,v=new Request(s),p={},m={},y=f.setRequestHeader.bind(f);f.setRequestHeader=(e,t)=>(m[e]=t,y(e,t)),n&&(p.requestHeaders=m);var g=f.send.bind(f);f.send=e=>(Ki({type:"request",headers:m,url:s,recordBody:r.recordBody})&&(p.requestBody=Qi({body:e,options:r,url:s})),d=t.performance.now(),g(e));var b=()=>{f.removeEventListener("readystatechange",w),f.removeEventListener("error",b),f.removeEventListener("abort",b),f.removeEventListener("timeout",b)},w=()=>{if(f.readyState===f.DONE){b(),h=t.performance.now();var n={};f.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((e=>{var t=e.split(": "),r=t.shift(),i=t.join(": ");r&&(n[r]=i)})),i&&(p.responseHeaders=n),Ki({type:"response",headers:n,url:s,recordBody:r.recordBody})&&(p.responseBody=Qi({body:f.response,options:r,url:s})),Ui(t,"xmlhttprequest",v.url,d,h).then((t=>{var r=eo({entry:t,method:a,status:null==f?void 0:f.status,networkRequest:p,start:d,end:h,url:s.toString(),initiatorType:"xmlhttprequest"});e({requests:r})})).catch((()=>{}))}};f.addEventListener("readystatechange",w),f.addEventListener("error",b),f.addEventListener("abort",b),f.addEventListener("timeout",b),o.call(f,a,s.toString(),u,l,c)}));return()=>{o()}}(o,t,i),u=oo(o,t,i)),ao=()=>{a(),s(),u(),ao=null}}var uo=e=>({name:"rrweb/network@1",observer:so,options:e});ui.__PosthogExtensions__=ui.__PosthogExtensions__||{},ui.__PosthogExtensions__.rrwebPlugins={getRecordConsolePlugin:Lr,getRecordNetworkPlugin:uo},ui.__PosthogExtensions__.rrweb={record:Dt,version:"v2"},ui.rrweb={record:Dt,version:"v2"},ui.rrwebConsoleRecord={getRecordConsolePlugin:Lr},ui.getRecordNetworkPlugin=uo;var lo,co,ho,fo,vo,po,mo,yo,go={},bo=[],wo=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Co=Array.isArray;function Io(e,t){for(var r in t)e[r]=t[r];return e}function ko(e){var t=e.parentNode;t&&t.removeChild(e)}function So(e,t,r){var n,i,o,a={};for(o in t)"key"==o?n=t[o]:"ref"==o?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?lo.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===a[o]&&(a[o]=e.defaultProps[o]);return xo(e,a,n,i,null)}function xo(e,t,r,n,i){var o={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==i?++ho:i,__i:-1,__u:0};return null==i&&null!=co.vnode&&co.vnode(o),o}function Ao(e){return e.children}function To(e,t){this.props=e,this.context=t}function No(e,t){if(null==t)return e.__?No(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if(null!=(r=e.__k[t])&&null!=r.__e)return r.__e;return"function"==typeof e.type?No(e):null}function Mo(e){var t,r;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(r=e.__k[t])&&null!=r.__e){e.__e=e.__c.base=r.__e;break}return Mo(e)}}function _o(e){(!e.__d&&(e.__d=!0)&&fo.push(e)&&!Ro.__r++||vo!==co.debounceRendering)&&((vo=co.debounceRendering)||po)(Ro)}function Ro(){var e,t,r,n,i,o,a,s,u;for(fo.sort(mo);e=fo.shift();)e.__d&&(t=fo.length,n=void 0,o=(i=(r=e).__v).__e,s=[],u=[],(a=r.__P)&&((n=Io({},i)).__v=i.__v+1,co.vnode&&co.vnode(n),qo(a,n,i,r.__n,void 0!==a.ownerSVGElement,32&i.__u?[o]:null,s,null==o?No(i):o,!!(32&i.__u),u),n.__.__k[n.__i]=n,Vo(s,n,u),n.__e!=o&&Mo(n)),fo.length>t&&fo.sort(mo));Ro.__r=0}function Fo(e,t,r,n,i,o,a,s,u,l,c){var d,h,f,v,p,m=n&&n.__k||bo,y=t.length;for(r.__d=u,function(e,t,r){var n,i,o,a,s,u=t.length,l=r.length,c=l,d=0;for(e.__k=[],n=0;n<u;n++)null!=(i=e.__k[n]=null==(i=t[n])||"boolean"==typeof i||"function"==typeof i?null:"string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?xo(null,i,null,null,i):Co(i)?xo(Ao,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?xo(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=e,i.__b=e.__b+1,s=Zo(i,r,a=n+d,c),i.__i=s,o=null,-1!==s&&(c--,(o=r[s])&&(o.__u|=131072)),null==o||null===o.__v?(-1==s&&d--,"function"!=typeof i.type&&(i.__u|=65536)):s!==a&&(s===a+1?d++:s>a?c>u-a?d+=s-a:d--:d=s<a&&s==a-1?s-a:0,s!==n+d&&(i.__u|=65536))):(o=r[n])&&null==o.key&&o.__e&&(o.__e==e.__d&&(e.__d=No(o)),Yo(o,o,!1),r[n]=null,c--);if(c)for(n=0;n<l;n++)null!=(o=r[n])&&0==(131072&o.__u)&&(o.__e==e.__d&&(e.__d=No(o)),Yo(o,o))}(r,t,m),u=r.__d,d=0;d<y;d++)null!=(f=r.__k[d])&&"boolean"!=typeof f&&"function"!=typeof f&&(h=-1===f.__i?go:m[f.__i]||go,f.__i=d,qo(e,f,h,i,o,a,s,u,l,c),v=f.__e,f.ref&&h.ref!=f.ref&&(h.ref&&Po(h.ref,null,f),c.push(f.ref,f.__c||v,f)),null==p&&null!=v&&(p=v),65536&f.__u||h.__k===f.__k?u=Eo(f,u,e):"function"==typeof f.type&&void 0!==f.__d?u=f.__d:v&&(u=v.nextSibling),f.__d=void 0,f.__u&=-196609);r.__d=u,r.__e=p}function Eo(e,t,r){var n,i;if("function"==typeof e.type){for(n=e.__k,i=0;n&&i<n.length;i++)n[i]&&(n[i].__=e,t=Eo(n[i],t,r));return t}return e.__e!=t&&(r.insertBefore(e.__e,t||null),t=e.__e),t&&t.nextSibling}function Zo(e,t,r,n){var i=e.key,o=e.type,a=r-1,s=r+1,u=t[r];if(null===u||u&&i==u.key&&o===u.type)return r;if(n>(null!=u&&0==(131072&u.__u)?1:0))for(;a>=0||s<t.length;){if(a>=0){if((u=t[a])&&0==(131072&u.__u)&&i==u.key&&o===u.type)return a;a--}if(s<t.length){if((u=t[s])&&0==(131072&u.__u)&&i==u.key&&o===u.type)return s;s++}}return-1}function Oo(e,t,r){"-"===t[0]?e.setProperty(t,null==r?"":r):e[t]=null==r?"":"number"!=typeof r||wo.test(t)?r:r+"px"}function Bo(e,t,r,n,i){var o;e:if("style"===t)if("string"==typeof r)e.style.cssText=r;else{if("string"==typeof n&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||Oo(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||Oo(e.style,t,r[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/(PointerCapture)$|Capture$/,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=r,r?n?r.u=n.u:(r.u=Date.now(),e.addEventListener(t,o?Do:Lo,o)):e.removeEventListener(t,o?Do:Lo,o);else{if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&"rowSpan"!==t&&"colSpan"!==t&&"role"!==t&&t in e)try{e[t]=null==r?"":r;break e}catch(e){}"function"==typeof r||(null==r||!1===r&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,r))}}function Lo(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(co.event?co.event(e):e)}function Do(e){return this.l[e.type+!0](co.event?co.event(e):e)}function qo(e,t,r,n,i,o,a,s,u,l){var c,d,h,f,v,p,m,y,g,b,w,$,C,I,k,S=t.type;if(void 0!==t.constructor)return null;128&r.__u&&(u=!!(32&r.__u),o=[s=t.__e=r.__e]),(c=co.__b)&&c(t);e:if("function"==typeof S)try{if(y=t.props,g=(c=S.contextType)&&n[c.__c],b=c?g?g.props.value:c.__:n,r.__c?m=(d=t.__c=r.__c).__=d.__E:("prototype"in S&&S.prototype.render?t.__c=d=new S(y,b):(t.__c=d=new To(y,b),d.constructor=S,d.render=Ho),g&&g.sub(d),d.props=y,d.state||(d.state={}),d.context=b,d.__n=n,h=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=S.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=Io({},d.__s)),Io(d.__s,S.getDerivedStateFromProps(y,d.__s))),f=d.props,v=d.state,d.__v=t,h)null==S.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==S.getDerivedStateFromProps&&y!==f&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(y,b),!d.__e&&(null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(y,d.__s,b)||t.__v===r.__v)){for(t.__v!==r.__v&&(d.props=y,d.state=d.__s,d.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach((function(e){e&&(e.__=t)})),w=0;w<d._sb.length;w++)d.__h.push(d._sb[w]);d._sb=[],d.__h.length&&a.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(y,d.__s,b),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(f,v,p)}))}if(d.context=b,d.props=y,d.__P=e,d.__e=!1,$=co.__r,C=0,"prototype"in S&&S.prototype.render){for(d.state=d.__s,d.__d=!1,$&&$(t),c=d.render(d.props,d.state,d.context),I=0;I<d._sb.length;I++)d.__h.push(d._sb[I]);d._sb=[]}else do{d.__d=!1,$&&$(t),c=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++C<25);d.state=d.__s,null!=d.getChildContext&&(n=Io(Io({},n),d.getChildContext())),h||null==d.getSnapshotBeforeUpdate||(p=d.getSnapshotBeforeUpdate(f,v)),Fo(e,Co(k=null!=c&&c.type===Ao&&null==c.key?c.props.children:c)?k:[k],t,r,n,i,o,a,s,u,l),d.base=t.__e,t.__u&=-161,d.__h.length&&a.push(d),m&&(d.__E=d.__=null)}catch(e){t.__v=null,u||null!=o?(t.__e=s,t.__u|=u?160:32,o[o.indexOf(s)]=null):(t.__e=r.__e,t.__k=r.__k),co.__e(e,t,r)}else null==o&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=function(e,t,r,n,i,o,a,s,u){var l,c,d,h,f,v,p,m=r.props,y=t.props,g=t.type;if("svg"===g&&(i=!0),null!=o)for(l=0;l<o.length;l++)if((f=o[l])&&"setAttribute"in f==!!g&&(g?f.localName===g:3===f.nodeType)){e=f,o[l]=null;break}if(null==e){if(null===g)return document.createTextNode(y);e=i?document.createElementNS("http://www.w3.org/2000/svg",g):document.createElement(g,y.is&&y),o=null,s=!1}if(null===g)m===y||s&&e.data===y||(e.data=y);else{if(o=o&&lo.call(e.childNodes),m=r.props||go,!s&&null!=o)for(m={},l=0;l<e.attributes.length;l++)m[(f=e.attributes[l]).name]=f.value;for(l in m)f=m[l],"children"==l||("dangerouslySetInnerHTML"==l?d=f:"key"===l||l in y||Bo(e,l,null,f,i));for(l in y)f=y[l],"children"==l?h=f:"dangerouslySetInnerHTML"==l?c=f:"value"==l?v=f:"checked"==l?p=f:"key"===l||s&&"function"!=typeof f||m[l]===f||Bo(e,l,f,m[l],i);if(c)s||d&&(c.__html===d.__html||c.__html===e.innerHTML)||(e.innerHTML=c.__html),t.__k=[];else if(d&&(e.innerHTML=""),Fo(e,Co(h)?h:[h],t,r,n,i&&"foreignObject"!==g,o,a,o?o[0]:r.__k&&No(r,0),s,u),null!=o)for(l=o.length;l--;)null!=o[l]&&ko(o[l]);s||(l="value",void 0!==v&&(v!==e[l]||"progress"===g&&!v||"option"===g&&v!==m[l])&&Bo(e,l,v,m[l],!1),l="checked",void 0!==p&&p!==e[l]&&Bo(e,l,p,m[l],!1))}return e}(r.__e,t,r,n,i,o,a,u,l);(c=co.diffed)&&c(t)}function Vo(e,t,r){t.__d=void 0;for(var n=0;n<r.length;n++)Po(r[n],r[++n],r[++n]);co.__c&&co.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){co.__e(e,t.__v)}}))}function Po(e,t,r){try{"function"==typeof e?e(t):e.current=t}catch(e){co.__e(e,r)}}function Yo(e,t,r){var n,i;if(co.unmount&&co.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||Po(n,null,t)),null!=(n=e.__c)){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(e){co.__e(e,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(i=0;i<n.length;i++)n[i]&&Yo(n[i],t,r||"function"!=typeof e.type);r||null==e.__e||ko(e.__e),e.__=e.__e=e.__d=void 0}function Ho(e,t,r){return this.constructor(e,r)}function Go(e,t,r){var n,i,o;co.__&&co.__(e,t),n=!1?null:t.__k,i=[],o=[],qo(t,e=t.__k=So(Ao,null,[e]),n||go,go,void 0!==t.ownerSVGElement,n?null:t.firstChild?lo.call(t.childNodes):null,i,n?n.__e:t.firstChild,false,o),Vo(i,e,o)}function Wo(e,t,r){var n,i,o,a,s=Io({},e.props);for(o in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)"key"==o?n=t[o]:"ref"==o?i=t[o]:s[o]=void 0===t[o]&&void 0!==a?a[o]:t[o];return arguments.length>2&&(s.children=arguments.length>3?lo.call(arguments,2):r),xo(e.type,s,n||e.key,i||e.ref,null)}lo=bo.slice,co={__e:function(e,t,r,n){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,n||{}),a=i.__d),a)return i.__E=i}catch(t){e=t}throw e}},ho=0,To.prototype.setState=function(e,t){var r;r=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Io({},this.state),"function"==typeof e&&(e=e(Io({},r),this.props)),e&&Io(r,e),null!=e&&this.__v&&(t&&this._sb.push(t),_o(this))},To.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),_o(this))},To.prototype.render=Ao,fo=[],po="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,mo=function(e,t){return e.__v.__b-t.__v.__b},Ro.__r=0,yo=0;var jo,Xo,zo,Ko,Uo=0,Jo=[],Qo=[],$o=co.__b,ea=co.__r,ta=co.diffed,ra=co.__c,na=co.unmount;function ia(e,t){co.__h&&co.__h(Xo,e,Uo||t),Uo=0;var r=Xo.__H||(Xo.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:Qo}),r.__[e]}function oa(e){return Uo=1,function(e,t,r){var n=ia(jo++,2);if(n.t=e,!n.__c&&(n.__=[ma(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=Xo,!Xo.u)){var i=function(e,t,r){if(!n.__c.__H)return!0;var i=n.__c.__H.__.filter((function(e){return e.__c}));if(i.every((function(e){return!e.__N})))return!o||o.call(this,e,t,r);var a=!1;return i.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}})),!(!a&&n.__c.props===e)&&(!o||o.call(this,e,t,r))};Xo.u=!0;var o=Xo.shouldComponentUpdate,a=Xo.componentWillUpdate;Xo.componentWillUpdate=function(e,t,r){if(this.__e){var n=o;o=void 0,i(e,t,r),o=n}a&&a.call(this,e,t,r)},Xo.shouldComponentUpdate=i}return n.__N||n.__}(ma,e)}function aa(e,t){var r=ia(jo++,3);!co.__s&&pa(r.__H,t)&&(r.__=e,r.i=t,Xo.__H.__h.push(r))}function sa(e){return Uo=5,ua((function(){return{current:e}}),[])}function ua(e,t){var r=ia(jo++,7);return pa(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function la(e){var t=Xo.context[e.__c],r=ia(jo++,9);return r.c=e,t?(null==r.__&&(r.__=!0,t.sub(Xo)),t.props.value):e.__}function ca(){for(var e;e=Jo.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(fa),e.__H.__h.forEach(va),e.__H.__h=[]}catch(t){e.__H.__h=[],co.__e(t,e.__v)}}co.__b=function(e){Xo=null,$o&&$o(e)},co.__r=function(e){ea&&ea(e),jo=0;var t=(Xo=e.__c).__H;t&&(zo===Xo?(t.__h=[],Xo.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=Qo,e.__N=e.i=void 0}))):(t.__h.forEach(fa),t.__h.forEach(va),t.__h=[],jo=0)),zo=Xo},co.diffed=function(e){ta&&ta(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==Jo.push(t)&&Ko===co.requestAnimationFrame||((Ko=co.requestAnimationFrame)||ha)(ca)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==Qo&&(e.__=e.__V),e.i=void 0,e.__V=Qo}))),zo=Xo=null},co.__c=function(e,t){t.some((function(e){try{e.__h.forEach(fa),e.__h=e.__h.filter((function(e){return!e.__||va(e)}))}catch(r){t.some((function(e){e.__h&&(e.__h=[])})),t=[],co.__e(r,e.__v)}})),ra&&ra(e,t)},co.unmount=function(e){na&&na(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach((function(e){try{fa(e)}catch(e){t=e}})),r.__H=void 0,t&&co.__e(t,r.__v))};var da="function"==typeof requestAnimationFrame;function ha(e){var t,r=function(){clearTimeout(n),da&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);da&&(t=requestAnimationFrame(r))}function fa(e){var t=Xo,r=e.__c;"function"==typeof r&&(e.__c=void 0,r()),Xo=t}function va(e){var t=Xo;e.__c=e.__(),Xo=t}function pa(e,t){return!e||e.length!==t.length||t.some((function(t,r){return t!==e[r]}))}function ma(e,t){return"function"==typeof t?t(e):t}var ya=function(e){return e.Button="button",e.Tab="tab",e.Selector="selector",e}({}),ga=function(e){return e.TopLeft="top_left",e.TopRight="top_right",e.TopCenter="top_center",e.MiddleLeft="middle_left",e.MiddleRight="middle_right",e.MiddleCenter="middle_center",e.Left="left",e.Center="center",e.Right="right",e.NextToTrigger="next_to_trigger",e}({}),ba=function(e){return e.Top="top",e.Left="left",e.Right="right",e.Bottom="bottom",e}({}),wa=function(e){return e.Popover="popover",e.API="api",e.Widget="widget",e.ExternalSurvey="external_survey",e}({}),Ca=function(e){return e.Open="open",e.MultipleChoice="multiple_choice",e.SingleChoice="single_choice",e.Rating="rating",e.Link="link",e}({}),Ia=function(e){return e.NextQuestion="next_question",e.End="end",e.ResponseBased="response_based",e.SpecificQuestion="specific_question",e}({}),ka=function(e){return e.Once="once",e.Recurring="recurring",e.Always="always",e}({}),Sa=function(e){return e.SHOWN="survey shown",e.DISMISSED="survey dismissed",e.SENT="survey sent",e.ABANDONED="survey abandoned",e}({}),xa=function(e){return e.SURVEY_ID="$survey_id",e.SURVEY_NAME="$survey_name",e.SURVEY_RESPONSE="$survey_response",e.SURVEY_ITERATION="$survey_iteration",e.SURVEY_ITERATION_START_DATE="$survey_iteration_start_date",e.SURVEY_PARTIALLY_COMPLETED="$survey_partially_completed",e.SURVEY_SUBMISSION_ID="$survey_submission_id",e.SURVEY_QUESTIONS="$survey_questions",e.SURVEY_COMPLETED="$survey_completed",e.PRODUCT_TOUR_ID="$product_tour_id",e.SURVEY_LAST_SEEN_DATE="$survey_last_seen_date",e}({}),Aa=fi("[Surveys]");var Ta="inProgressSurvey_",Na=(e,t)=>{var r="$survey_"+t+"/"+e.id;return e.current_iteration&&e.current_iteration>0&&(r="$survey_"+t+"/"+e.id+"/"+e.current_iteration),r},Ma=(e,t)=>{var r=""+e+t.id;return t.current_iteration&&t.current_iteration>0&&(r=""+e+t.id+"_"+t.current_iteration),r},_a=e=>Ma("seenSurvey_",e),Ra=e=>{localStorage.getItem(_a(e))||localStorage.setItem(_a(e),"true")},Fa=[wa.Popover,wa.Widget,wa.API];Math.trunc||(Math.trunc=function(e){return e<0?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return Qr(e)&&isFinite(e)&&Math.floor(e)===e});var Ea="0123456789abcdef";class Za{constructor(e){if(this.bytes=e,16!==e.length)throw new TypeError("not 128-bit length")}static fromFieldsV7(e,t,r,n){if(!Number.isInteger(e)||!Number.isInteger(t)||!Number.isInteger(r)||!Number.isInteger(n)||e<0||t<0||r<0||n<0||e>0xffffffffffff||t>4095||r>1073741823||n>4294967295)throw new RangeError("invalid field value");var i=new Uint8Array(16);return i[0]=e/Math.pow(2,40),i[1]=e/Math.pow(2,32),i[2]=e/Math.pow(2,24),i[3]=e/Math.pow(2,16),i[4]=e/Math.pow(2,8),i[5]=e,i[6]=112|t>>>8,i[7]=t,i[8]=128|r>>>24,i[9]=r>>>16,i[10]=r>>>8,i[11]=r,i[12]=n>>>24,i[13]=n>>>16,i[14]=n>>>8,i[15]=n,new Za(i)}toString(){for(var e="",t=0;t<this.bytes.length;t++)e=e+Ea.charAt(this.bytes[t]>>>4)+Ea.charAt(15&this.bytes[t]),3!==t&&5!==t&&7!==t&&9!==t||(e+="-");if(36!==e.length)throw new Error("Invalid UUIDv7 was generated");return e}clone(){return new Za(this.bytes.slice(0))}equals(e){return 0===this.compareTo(e)}compareTo(e){for(var t=0;t<16;t++){var r=this.bytes[t]-e.bytes[t];if(0!==r)return Math.sign(r)}return 0}}class Oa{constructor(){this.h=0,this.p=0,this.m=new Da}generate(){var e=this.generateOrAbort();if(zr(e)){this.h=0;var t=this.generateOrAbort();if(zr(t))throw new Error("Could not generate UUID after timestamp reset");return t}return e}generateOrAbort(){var e=Date.now();if(e>this.h)this.h=e,this.C();else{if(!(e+1e4>this.h))return;this.p++,this.p>4398046511103&&(this.h++,this.C())}return Za.fromFieldsV7(this.h,Math.trunc(this.p/Math.pow(2,30)),this.p&Math.pow(2,30)-1,this.m.nextUint32())}C(){this.p=1024*this.m.nextUint32()+(1023&this.m.nextUint32())}}var Ba,La=e=>{if("undefined"!=typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var t=0;t<e.length;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};ri&&!zr(ri.crypto)&&crypto.getRandomValues&&(La=e=>crypto.getRandomValues(e));class Da{constructor(){this.I=new Uint32Array(8),this.k=1/0}nextUint32(){return this.k>=this.I.length&&(La(this.I),this.k=0),this.I[this.k++]}}var qa=()=>Va().toString(),Va=()=>(Ba||(Ba=new Oa)).generate();null!=oi&&oi.sendBeacon;var Pa=function(e,t){if(!function(e){try{new RegExp(e)}catch(e){return!1}return!0}(t))return!1;try{return new RegExp(t).test(e)}catch(e){return!1}},Ya={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=>Pa(t,e))))),not_regex:(e,t)=>t.every((t=>e.every((e=>!Pa(t,e))))),icontains:(e,t)=>t.map(Ha).some((t=>e.map(Ha).some((e=>t.includes(e))))),not_icontains:(e,t)=>t.map(Ha).every((t=>e.map(Ha).every((e=>!t.includes(e))))),gt:(e,t)=>t.some((t=>{var r=parseFloat(t);return!isNaN(r)&&e.some((e=>r>parseFloat(e)))})),lt:(e,t)=>t.some((t=>{var r=parseFloat(t);return!isNaN(r)&&e.some((e=>r<parseFloat(e)))}))},Ha=e=>e.toLowerCase(),Ga=fi("[Stylesheet Loader]"),Wa=ri,ja=ai;function Xa(e){return"$survey_response_"+e}var za="#020617",Ka={fontFamily:"inherit",backgroundColor:"#eeeded",submitButtonColor:"black",submitButtonTextColor:"white",ratingButtonColor:"white",ratingButtonActiveColor:"black",borderColor:"#c9c6c6",placeholder:"Start typing...",whiteLabel:!1,displayThankYouMessage:!0,thankYouMessageHeader:"Thank you for your feedback!",position:ga.Right,widgetType:ya.Tab,widgetLabel:"Feedback",widgetColor:"black",zIndex:"2147483647",disabledButtonOpacity:"0.6",maxWidth:"300px",textSubtleColor:"#939393",boxPadding:"20px 24px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",borderRadius:"10px",shuffleQuestions:!1,surveyPopupDelaySeconds:void 0,outlineColor:"rgba(59, 130, 246, 0.8)",inputBackground:"white",inputTextColor:za,scrollbarThumbColor:"var(--ph-survey-border-color)",scrollbarTrackColor:"var(--ph-survey-background-color)"};function Ua(e){if(e.startsWith("#")){var 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 Ja(e){var t;void 0===e&&(e=Ka.backgroundColor),"#"===e[0]&&(t=Ua(e)),e.startsWith("rgb")&&(t=e);var r={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(r&&(t=Ua(r)),!t)return za;var n=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(n){var i=parseInt(n[1]),o=parseInt(n[2]),a=parseInt(n[3]);return Math.sqrt(i*i*.299+o*o*.587+a*a*.114)>127.5?za:"white"}return za}function Qa(e){var t=((e,t,r)=>{var n,i=e.createElement("style");return i.innerText=t,null!=r&&null!=(n=r.config)&&n.prepare_external_dependency_stylesheet&&(i=r.config.prepare_external_dependency_stylesheet(i)),i||(Ga.error("prepare_external_dependency_stylesheet returned null"),null)})(ja,':host{--ph-survey-font-family:-apple-system,BlinkMacSystemFont,"Inter","Segoe UI","Roboto",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--ph-survey-box-padding:20px 24px;--ph-survey-max-width:300px;--ph-survey-z-index:2147483647;--ph-survey-border-color:#dcdcdc;--ph-survey-border-bottom:1.5px solid var(--ph-survey-border-color);--ph-survey-border-radius:10px;--ph-survey-background-color:#eeeded;--ph-survey-box-shadow:0 4px 12px rgba(0,0,0,.15);--ph-survey-submit-button-color:#000;--ph-survey-submit-button-text-color:#fff;--ph-survey-rating-bg-color:#fff;--ph-survey-rating-text-color:#020617;--ph-survey-rating-active-bg-color:#000;--ph-survey-rating-active-text-color:#fff;--ph-survey-text-primary-color:#020617;--ph-survey-text-subtle-color:#939393;--ph-widget-color:#e0a045;--ph-widget-text-color:#fff;--ph-survey-scrollbar-thumb-color:var(--ph-survey-border-color);--ph-survey-scrollbar-track-color:var(--ph-survey-background-color);--ph-survey-outline-color:rgba(59,130,246,.8);--ph-survey-input-background:#fff;--ph-survey-input-text-color:#020617;--ph-survey-disabled-button-opacity:0.6}.ph-survey{bottom:0;height:fit-content;margin:0;max-width:85%;min-width:300px;position:fixed;width:var(--ph-survey-max-width);z-index:var(--ph-survey-z-index)}.ph-survey h3,.ph-survey p{margin:0}.ph-survey *{box-sizing:border-box;color:var(--ph-survey-text-primary-color);font-family:var(--ph-survey-font-family)}.ph-survey .multiple-choice-options label,.ph-survey input[type=text],.ph-survey textarea{background:var(--ph-survey-input-background);border:1.5px solid var(--ph-survey-border-color);border-radius:4px;color:var(--ph-survey-input-text-color);padding:10px;transition:border-color .2s ease-out,box-shadow .2s ease-out,transform .15s ease-out}.ph-survey input[type=text],.ph-survey textarea{transition:border-color .2s ease-out,box-shadow .2s ease-out,transform .15s ease-out}.ph-survey input{margin:0}.ph-survey .form-submit:focus,.ph-survey .form-submit:focus-visible,.ph-survey input[type=checkbox]:focus,.ph-survey input[type=checkbox]:focus-visible,.ph-survey input[type=radio]:focus,.ph-survey input[type=radio]:focus-visible,.ph-survey input[type=text]:focus,.ph-survey input[type=text]:focus-visible,.ph-survey textarea:focus,.ph-survey textarea:focus-visible{border-color:var(--ph-survey-rating-active-bg-color);outline:1.5px solid var(--ph-survey-outline-color);outline-offset:2px}.ph-survey button:focus:not(:focus-visible),.ph-survey input[type=checkbox]:focus:not(:focus-visible),.ph-survey input[type=radio]:focus:not(:focus-visible),.ph-survey input[type=text]:focus:not(:focus-visible),.ph-survey textarea:focus:not(:focus-visible){outline:none}.ph-survey input[type=text]:hover:not(:focus),.ph-survey textarea:hover:not(:focus){border-color:var(--ph-survey-rating-active-bg-color)}@media (max-width:768px){.ph-survey input[type=text],.ph-survey textarea{font-size:1rem}}.ph-survey .form-cancel,.ph-survey .multiple-choice-options label,.ph-survey .rating-options-number,.ph-survey input[type=checkbox],.ph-survey input[type=radio]{border:1.5px solid var(--ph-survey-border-color)}.ph-survey .footer-branding,.ph-survey .form-cancel,.ph-survey .form-submit,.ph-survey .ratings-emoji,.ph-survey .ratings-number,.ph-survey input[type=checkbox],.ph-survey input[type=radio],.ph-survey label{transition:all .2s ease-out}@media (prefers-reduced-motion:no-preference){.ph-survey button:active,.ph-survey input[type=checkbox]:active,.ph-survey input[type=radio]:active,.ph-survey label:active{transition-duration:.1s}}.ph-survey-widget-tab{background:var(--ph-widget-color);border:none;border-radius:3px 3px 0 0;color:var(--ph-widget-text-color);cursor:pointer;padding:10px 12px;position:fixed;text-align:center;transition:padding .2s ease-out;z-index:var(--ph-survey-z-index)}.ph-survey-widget-tab:hover:not(.widget-tab-top){padding-bottom:16px}.ph-survey-widget-tab.widget-tab-top{border-radius:0 0 3px 3px}.ph-survey-widget-tab.widget-tab-top:hover{padding-top:16px}@keyframes ph-survey-fade-in{0%{opacity:0}to{opacity:1}}.survey-box{gap:16px}.bottom-section,.survey-box{display:flex;flex-direction:column}.bottom-section{gap:8px}.thank-you-message-header~.bottom-section{padding-top:16px}.question-container,.thank-you-message{display:flex;flex-direction:column;gap:8px}.survey-question{font-size:14px;font-weight:500}.survey-question-description{font-size:13px;opacity:.8;padding-top:4px}.survey-question-description,.thank-you-message-body{word-wrap:break-word;overflow-wrap:break-word}:is(.survey-question-description,.thank-you-message-body) embed,:is(.survey-question-description,.thank-you-message-body) iframe,:is(.survey-question-description,.thank-you-message-body) img,:is(.survey-question-description,.thank-you-message-body) object,:is(.survey-question-description,.thank-you-message-body) video{height:auto;max-width:100%}:is(.survey-question-description,.thank-you-message-body) svg{height:auto;max-width:100%}.question-textarea-wrapper{display:flex;flex-direction:column}.survey-form{animation:ph-survey-fade-in .3s ease-out forwards}.survey-form,.thank-you-message{background:var(--ph-survey-background-color);border:1.5px solid var(--ph-survey-border-color);border-bottom:var(--ph-survey-border-bottom);border-radius:var(--ph-survey-border-radius);box-shadow:var(--ph-survey-box-shadow);margin:0;padding:var(--ph-survey-box-padding);position:relative;text-align:left;width:100%;z-index:var(--ph-survey-z-index)}.survey-form input[type=text],.survey-form textarea{min-width:100%}:is(.survey-form textarea):focus,:is(.survey-form textarea):focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.08)}:is(.survey-form textarea):focus:not(:focus-visible){box-shadow:none}.survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) .multiple-choice-options,.survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) textarea{margin-top:0}.multiple-choice-options{border:none;display:flex;flex-direction:column;font-size:14px;gap:8px;margin:0;padding:1px 0}.multiple-choice-options .response-choice,.multiple-choice-options label{align-items:center;color:inherit;display:flex;gap:8px}.multiple-choice-options label{cursor:pointer;font-size:13px}:is(.multiple-choice-options label):hover:not(:has(input:checked)){border-color:var(--ph-survey-text-subtle-color);box-shadow:0 2px 8px rgba(0,0,0,.08)}:is(.multiple-choice-options label):has(input:checked){border-color:var(--ph-survey-rating-active-bg-color);box-shadow:0 1px 4px rgba(0,0,0,.05)}.choice-option-open:is(.multiple-choice-options label){flex-wrap:wrap}:is(.multiple-choice-options label) span{color:inherit}.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]{appearance:none;-webkit-appearance:none;-moz-appearance:none;background:var(--ph-survey-input-background);border-radius:3px;cursor:pointer;flex-shrink:0;height:1rem;position:relative;transition:all .2s cubic-bezier(.4,0,.2,1),transform .15s ease-out;width:1rem;z-index:1}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):focus{transform:scale(1.05)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):hover{border-color:var(--ph-survey-rating-active-bg-color);transform:scale(1.05)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):active{transform:scale(.95)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):checked{background:var(--ph-survey-rating-active-bg-color);border-color:var(--ph-survey-rating-active-bg-color);transform:scale(1)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):checked:hover{transform:scale(1.05)}.multiple-choice-options input[type=checkbox]:checked:after{animation:ph-survey-checkmark-reveal .2s ease-out .1s forwards;border:solid var(--ph-survey-rating-active-text-color);border-width:0 2px 2px 0;height:8px;left:4px;transform:rotate(45deg) scale(0);width:4px}.multiple-choice-options input[type=radio]:checked:after{animation:ph-survey-radio-reveal .15s ease-out .05s forwards;background:var(--ph-survey-rating-active-text-color);border-radius:50%;height:6px;left:5px;top:5px;transform:scale(0);width:6px}.multiple-choice-options input[type=checkbox]:checked:after,.multiple-choice-options input[type=radio]:checked:after{box-sizing:content-box;content:"";position:absolute}.multiple-choice-options input[type=radio]{border-radius:50%}.multiple-choice-options input[type=radio]:checked{border:none}:is(.multiple-choice-options input[type=checkbox]:checked,.multiple-choice-options input[type=radio]:checked)~*{font-weight:700}:is(:is(.multiple-choice-options .choice-option-open) input[type=text])::placeholder{color:var(--ph-survey-text-subtle-color);font-weight:400}.rating-options-emoji{display:flex;justify-content:space-between}.ratings-emoji{background-color:transparent;border:none;font-size:16px;opacity:.5;padding:0}.ratings-emoji:hover{cursor:pointer;opacity:1;transform:scale(1.15)}.ratings-emoji.rating-active{opacity:1}.ratings-emoji svg{fill:var(--ph-survey-text-primary-color);transition:fill .2s ease-out}.rating-options-number{border-radius:6px;display:grid;grid-auto-columns:1fr;grid-auto-flow:column;overflow:hidden}.rating-options-number .ratings-number{border:none;border-right:1px solid var(--ph-survey-border-color);color:var(--ph-survey-rating-text-color);cursor:pointer;font-weight:700;text-align:center}:is(.rating-options-number .ratings-number):last-of-type{border-right:0}.rating-active:is(.rating-options-number .ratings-number){background:var(--ph-survey-rating-active-bg-color);color:var(--ph-survey-rating-active-text-color)}.ratings-number{background-color:var(--ph-survey-rating-bg-color);border:none;padding:8px 0}.ratings-number .rating-active{background-color:var(--ph-survey-rating-active-bg-color)}.ratings-number:hover{cursor:pointer}.rating-text{display:flex;flex-direction:row;font-size:11px;justify-content:space-between;opacity:.7}.form-submit{background:var(--ph-survey-submit-button-color);border:none;border-radius:6px;box-shadow:0 2px 0 rgba(0,0,0,.045);color:var(--ph-survey-submit-button-text-color);cursor:pointer;font-weight:700;min-width:100%;padding:12px;text-align:center;user-select:none}.form-submit:not([disabled]):hover{box-shadow:0 4px 8px rgba(0,0,0,.1);transform:scale(1.02)}.form-submit:not([disabled]):active{box-shadow:0 1px 2px rgba(0,0,0,.05);transform:scale(.98)}.form-submit[disabled]{cursor:not-allowed;opacity:var(--ph-survey-disabled-button-opacity)}.form-cancel{background:#fff;border-radius:100%;cursor:pointer;line-height:0;padding:12px;position:absolute;right:0;top:0;transform:translate(50%,-50%)}.form-cancel:hover{opacity:.7;transform:translate(50%,-50%) scale(1.1)}.footer-branding{align-items:center;display:flex;font-size:11px;font-weight:500;gap:4px;justify-content:center;opacity:.6;text-decoration:none}.footer-branding:hover{opacity:1}.footer-branding a{text-decoration:none}.thank-you-message{text-align:center}.thank-you-message-header{margin:10px 0 0}.thank-you-message-body{font-size:14px;opacity:.8}.limit-height{max-height:256px;overflow-x:hidden;overflow-y:auto;scrollbar-color:var(--ph-survey-scrollbar-thumb-color) var(--ph-survey-scrollbar-track-color);scrollbar-width:thin}.limit-height::-webkit-scrollbar{width:8px}.limit-height::-webkit-scrollbar-track{background:var(--ph-survey-scrollbar-track-color);border-radius:4px}.limit-height::-webkit-scrollbar-thumb{background-color:var(--ph-survey-scrollbar-thumb-color);border:2px solid var(--ph-survey-scrollbar-track-color);border-radius:4px}:is(.limit-height::-webkit-scrollbar-thumb):hover{background-color:var(--ph-survey-text-subtle-color)}.sr-only{clip:rect(0,0,0,0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}@media (prefers-reduced-motion:reduce){.ph-survey *{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}@keyframes ph-survey-checkmark-reveal{0%{opacity:0;transform:rotate(45deg) scale(0)}50%{opacity:1;transform:rotate(45deg) scale(1.2)}to{opacity:1;transform:rotate(45deg) scale(1)}}@keyframes ph-survey-radio-reveal{0%{opacity:0;transform:scale(0)}50%{opacity:1;transform:scale(1.3)}to{opacity:1;transform:scale(1)}}',e);return null==t||t.setAttribute("data-ph-survey-style","true"),t}var $a=(e,t,n)=>{var i=ws(e),o=ja.querySelector("."+i);if(o&&o.shadowRoot)return{shadow:o.shadowRoot,isNewlyCreated:!1};var a=ja.createElement("div");((e,t,n)=>{var i=r({},Ka,n),o=e.style,a=![ga.Center,ga.Left,ga.Right].includes(i.position)||t===wa.Widget&&(null==n?void 0:n.widgetType)===ya.Tab;o.setProperty("--ph-survey-font-family",function(e){if("inherit"===e)return"inherit";var t='BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"';return e?e+", "+t:"-apple-system, "+t}(i.fontFamily)),o.setProperty("--ph-survey-box-padding",i.boxPadding),o.setProperty("--ph-survey-max-width",i.maxWidth),o.setProperty("--ph-survey-z-index",i.zIndex),o.setProperty("--ph-survey-border-color",i.borderColor),a?(o.setProperty("--ph-survey-border-radius",i.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",i.borderRadius+" "+i.borderRadius+" 0 0")),o.setProperty("--ph-survey-background-color",i.backgroundColor),o.setProperty("--ph-survey-box-shadow",i.boxShadow),o.setProperty("--ph-survey-disabled-button-opacity",i.disabledButtonOpacity),o.setProperty("--ph-survey-submit-button-color",i.submitButtonColor),o.setProperty("--ph-survey-submit-button-text-color",(null==n?void 0:n.submitButtonTextColor)||Ja(i.submitButtonColor)),o.setProperty("--ph-survey-rating-bg-color",i.ratingButtonColor),o.setProperty("--ph-survey-rating-active-bg-color",i.ratingButtonActiveColor),o.setProperty("--ph-survey-rating-active-text-color",Ja(i.ratingButtonActiveColor)),o.setProperty("--ph-survey-text-primary-color",(null==n?void 0:n.textColor)||Ja(i.backgroundColor)),o.setProperty("--ph-survey-text-subtle-color",i.textSubtleColor),o.setProperty("--ph-widget-color",i.widgetColor),o.setProperty("--ph-widget-text-color",Ja(i.widgetColor)),o.setProperty("--ph-widget-z-index",i.zIndex);var s=(null==n?void 0:n.inputBackground)||(null==n?void 0:n.inputBackgroundColor),u=s||i.inputBackground;s||"white"!==i.backgroundColor||(u="#f8f8f8"),o.setProperty("--ph-survey-input-background",u);var l=(null==n?void 0:n.inputTextColor)||Ja(u);o.setProperty("--ph-survey-input-text-color",l),o.setProperty("--ph-survey-rating-text-color",l),o.setProperty("--ph-survey-scrollbar-thumb-color",i.scrollbarThumbColor),o.setProperty("--ph-survey-scrollbar-track-color",i.scrollbarTrackColor),o.setProperty("--ph-survey-outline-color",i.outlineColor)})(a,e.type,e.appearance),a.className=i;var s=a.attachShadow({mode:"open"}),u=Qa(t);if(u){var l=s.querySelector("style");l&&s.removeChild(l),s.appendChild(u)}return ja.body.appendChild(a),{shadow:s,isNewlyCreated:!0}},es=(e,t)=>{if(!t)return null;var r=e[Xa(t)];return Gr(r)?[...r]:r},ts=e=>{var{responses:t,survey:n,surveySubmissionId:i,posthog:o,isSurveyCompleted:a}=e;o?(Ra(n),o.capture(Sa.SENT,r({[xa.SURVEY_NAME]:n.name,[xa.SURVEY_ID]:n.id,[xa.SURVEY_ITERATION]:n.current_iteration,[xa.SURVEY_ITERATION_START_DATE]:n.current_iteration_start_date,[xa.SURVEY_QUESTIONS]:n.questions.map((e=>({id:e.id,question:e.question,response:es(t,e.id)}))),[xa.SURVEY_SUBMISSION_ID]:i,[xa.SURVEY_COMPLETED]:a,sessionRecordingUrl:null==o.get_session_replay_url?void 0:o.get_session_replay_url()},t,{$set:{[Na(n,"responded")]:!0}})),a&&(Wa.dispatchEvent(new CustomEvent("PHSurveySent",{detail:{surveyId:n.id}})),bs(n))):Aa.error("[survey sent] event not captured, PostHog instance not found.")},rs=e=>Object.values((null==e?void 0:e.responses)||{}).filter((e=>!Jr(e))).length>0,ns=(e,t,n)=>r({[xa.SURVEY_NAME]:e.name,[xa.SURVEY_ID]:e.id,[xa.SURVEY_ITERATION]:e.current_iteration,[xa.SURVEY_ITERATION_START_DATE]:e.current_iteration_start_date,[xa.SURVEY_PARTIALLY_COMPLETED]:rs(t),sessionRecordingUrl:null==n.get_session_replay_url?void 0:n.get_session_replay_url()},null==t?void 0:t.responses,{[xa.SURVEY_SUBMISSION_ID]:null==t?void 0:t.surveySubmissionId,[xa.SURVEY_QUESTIONS]:e.questions.map((e=>({id:e.id,question:e.question,response:es((null==t?void 0:t.responses)||{},e.id)})))}),is=(e,t,n)=>{if(t){if(!n){var i=ys(e);t.capture(Sa.DISMISSED,r({},ns(e,i,t),{$set:{[Na(e,"dismissed")]:!0}})),bs(e),Ra(e),Wa.dispatchEvent(new CustomEvent("PHSurveyClosed",{detail:{surveyId:e.id}}))}}else Aa.error("[survey dismissed] event not captured, PostHog instance not found.")},os=(e,t)=>{if(t){var r=(e=>Ma("abandonedSurvey_",e))(e);try{if("true"===localStorage.getItem(r))return}catch(e){return}var n=ys(e);if(n){try{localStorage.setItem(r,"true")}catch(e){}t.capture(Sa.ABANDONED,ns(e,n,t),{transport:"sendBeacon"})}}else Aa.error("[survey abandoned] event not captured, PostHog instance not found.")},as=e=>e.map((e=>({sort:Math.floor(10*Math.random()),value:e}))).sort(((e,t)=>e.sort-t.sort)).map((e=>e.value)),ss=(e,t)=>e.length===t.length&&e.every(((e,r)=>e===t[r]))?t.reverse():t,us=e=>e.appearance&&e.appearance.shuffleQuestions&&!e.enable_partial_responses?ss(e.questions,as(e.questions)):e.questions,ls=e=>{var t;return!(null==(t=e.conditions)||null==(t=t.events)||!t.repeatedActivation||!(e=>{var t,r;return null!=(null==(t=e.conditions)||null==(t=t.events)||null==(t=t.values)?void 0:t.length)&&(null==(r=e.conditions)||null==(r=r.events)||null==(r=r.values)?void 0:r.length)>0})(e))||e.schedule===ka.Always||gs(e)},cs=function(e,t){var r={__c:t="__cC"+yo++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var r,n;return this.getChildContext||(r=[],(n={})[t]=this,this.getChildContext=function(){return n},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&r.some((function(e){e.__e=!0,_o(e)}))},this.sub=function(e){r.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r.splice(r.indexOf(e),1),t&&t.call(e)}}),e.children}};return r.Provider.__=r.Consumer.contextType=r}({isPreviewMode:!1,previewPageIndex:0,onPopupSurveyDismissed:()=>{},isPopup:!0,onPreviewSubmit:()=>{},surveySubmissionId:""}),ds=()=>la(cs),hs=e=>{var{component:t,children:r,renderAsHtml:n,style:i}=e;return Wo(t,n?{dangerouslySetInnerHTML:{__html:r},style:i}:{children:r,style:i})};function fs(e){return null!=e?e:"icontains"}function vs(e){var t,r,n;if(null==(t=e.conditions)||!t.url)return!0;var i=null==Wa||null==(r=Wa.location)?void 0:r.href;if(!i)return!1;var o=[e.conditions.url],a=fs(null==(n=e.conditions)?void 0:n.urlMatchType);return Ya[a](o,[i])}var ps=e=>{var t=""+Ta+e.id;return e.current_iteration&&e.current_iteration>0&&(t=""+Ta+e.id+"_"+e.current_iteration),t},ms=(e,t)=>{try{localStorage.setItem(ps(e),JSON.stringify(t))}catch(e){Aa.error("Error setting in-progress survey state in localStorage",e)}},ys=e=>{try{var t=localStorage.getItem(ps(e));if(t)return JSON.parse(t)}catch(e){Aa.error("Error getting in-progress survey state from localStorage",e)}return null},gs=e=>{var t=ys(e);return!Jr(null==t?void 0:t.surveySubmissionId)},bs=e=>{try{localStorage.removeItem(ps(e))}catch(e){Aa.error("Error clearing in-progress survey state from localStorage",e)}};function ws(e,t){void 0===t&&(t=!1);var r="PostHogSurvey-"+e.id;return t?"."+r:r}var Cs=0;function Is(e,t,r,n,i,o){var a,s,u={};for(s in t)"ref"==s?a=t[s]:u[s]=t[s];var l={type:e,props:u,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--Cs,__i:-1,__u:0,__source:i,__self:o};if("function"==typeof e&&(a=e.defaultProps))for(s in a)void 0===u[s]&&(u[s]=a[s]);return co.vnode&&co.vnode(l),l}var ks=Is("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Is("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"})}),Ss=Is("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Is("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"})}),xs=Is("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Is("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"})}),As=Is("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Is("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"})}),Ts=Is("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Is("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"})}),Ns=Is("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"close-survey-title",children:[Is("title",{id:"close-survey-title",children:"Close survey"}),Is("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.164752 0.164752C0.384422 -0.0549175 0.740578 -0.0549175 0.960248 0.164752L6 5.20451L11.0398 0.164752C11.2594 -0.0549175 11.6156 -0.0549175 11.8352 0.164752C12.0549 0.384422 12.0549 0.740578 11.8352 0.960248L6.79549 6L11.8352 11.0398C12.0549 11.2594 12.0549 11.6156 11.8352 11.8352C11.6156 12.0549 11.2594 12.0549 11.0398 11.8352L6 6.79549L0.960248 11.8352C0.740578 12.0549 0.384422 12.0549 0.164752 11.8352C-0.0549175 11.6156 -0.0549175 11.2594 0.164752 11.0398L5.20451 6L0.164752 0.960248C-0.0549175 0.740578 -0.0549175 0.384422 0.164752 0.164752Z",fill:"black"})]}),Ms=Is("svg",{width:"77",height:"14",viewBox:"0 0 77 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Is("g",{"clip-path":"url(#clip0_2415_6911)",children:[Is("mask",{id:"mask0_2415_6911",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"77",height:"14",children:Is("path",{d:"M0.5 0H76.5V14H0.5V0Z",fill:"white"})}),Is("g",{mask:"url(#mask0_2415_6911)",children:[Is("path",{d:"M5.77226 8.02931C5.59388 8.37329 5.08474 8.37329 4.90634 8.02931L4.4797 7.20672C4.41155 7.07535 4.41155 6.9207 4.4797 6.78933L4.90634 5.96669C5.08474 5.62276 5.59388 5.62276 5.77226 5.96669L6.19893 6.78933C6.26709 6.9207 6.26709 7.07535 6.19893 7.20672L5.77226 8.02931ZM5.77226 12.6946C5.59388 13.0386 5.08474 13.0386 4.90634 12.6946L4.4797 11.872C4.41155 11.7406 4.41155 11.586 4.4797 11.4546L4.90634 10.632C5.08474 10.288 5.59388 10.288 5.77226 10.632L6.19893 11.4546C6.26709 11.586 6.26709 11.7406 6.19893 11.872L5.77226 12.6946Z",fill:"#1D4AFF"}),Is("path",{d:"M0.5 10.9238C0.5 10.508 1.02142 10.2998 1.32637 10.5938L3.54508 12.7327C3.85003 13.0267 3.63405 13.5294 3.20279 13.5294H0.984076C0.716728 13.5294 0.5 13.3205 0.5 13.0627V10.9238ZM0.5 8.67083C0.5 8.79459 0.551001 8.91331 0.641783 9.00081L5.19753 13.3927C5.28831 13.4802 5.41144 13.5294 5.53982 13.5294H8.0421C8.47337 13.5294 8.68936 13.0267 8.3844 12.7327L1.32637 5.92856C1.02142 5.63456 0.5 5.84278 0.5 6.25854V8.67083ZM0.5 4.00556C0.5 4.12932 0.551001 4.24802 0.641783 4.33554L10.0368 13.3927C10.1276 13.4802 10.2508 13.5294 10.3791 13.5294H12.8814C13.3127 13.5294 13.5287 13.0267 13.2237 12.7327L1.32637 1.26329C1.02142 0.969312 0.5 1.17752 0.5 1.59327V4.00556ZM5.33931 4.00556C5.33931 4.12932 5.39033 4.24802 5.4811 4.33554L14.1916 12.7327C14.4965 13.0267 15.0179 12.8185 15.0179 12.4028V9.99047C15.0179 9.86671 14.9669 9.74799 14.8762 9.66049L6.16568 1.26329C5.86071 0.969307 5.33931 1.17752 5.33931 1.59327V4.00556ZM11.005 1.26329C10.7 0.969307 10.1786 1.17752 10.1786 1.59327V4.00556C10.1786 4.12932 10.2296 4.24802 10.3204 4.33554L14.1916 8.06748C14.4965 8.36148 15.0179 8.15325 15.0179 7.7375V5.3252C15.0179 5.20144 14.9669 5.08272 14.8762 4.99522L11.005 1.26329Z",fill:"#F9BD2B"}),Is("path",{d:"M21.0852 10.981L16.5288 6.58843C16.2238 6.29443 15.7024 6.50266 15.7024 6.91841V13.0627C15.7024 13.3205 15.9191 13.5294 16.1865 13.5294H23.2446C23.5119 13.5294 23.7287 13.3205 23.7287 13.0627V12.5032C23.7287 12.2455 23.511 12.0396 23.2459 12.0063C22.4323 11.9042 21.6713 11.546 21.0852 10.981ZM18.0252 12.0365C17.5978 12.0365 17.251 11.7021 17.251 11.2901C17.251 10.878 17.5978 10.5436 18.0252 10.5436C18.4527 10.5436 18.7996 10.878 18.7996 11.2901C18.7996 11.7021 18.4527 12.0365 18.0252 12.0365Z",fill:"currentColor"}),Is("path",{d:"M0.5 13.0627C0.5 13.3205 0.716728 13.5294 0.984076 13.5294H3.20279C3.63405 13.5294 3.85003 13.0267 3.54508 12.7327L1.32637 10.5938C1.02142 10.2998 0.5 10.508 0.5 10.9238V13.0627ZM5.33931 5.13191L1.32637 1.26329C1.02142 0.969306 0.5 1.17752 0.5 1.59327V4.00556C0.5 4.12932 0.551001 4.24802 0.641783 4.33554L5.33931 8.86412V5.13191ZM1.32637 5.92855C1.02142 5.63455 0.5 5.84278 0.5 6.25853V8.67083C0.5 8.79459 0.551001 8.91331 0.641783 9.00081L5.33931 13.5294V9.79717L1.32637 5.92855Z",fill:"#1D4AFF"}),Is("path",{d:"M10.1787 5.3252C10.1787 5.20144 10.1277 5.08272 10.0369 4.99522L6.16572 1.26329C5.8608 0.969306 5.33936 1.17752 5.33936 1.59327V4.00556C5.33936 4.12932 5.39037 4.24802 5.48114 4.33554L10.1787 8.86412V5.3252ZM5.33936 13.5294H8.04214C8.47341 13.5294 8.6894 13.0267 8.38443 12.7327L5.33936 9.79717V13.5294ZM5.33936 5.13191V8.67083C5.33936 8.79459 5.39037 8.91331 5.48114 9.00081L10.1787 13.5294V9.99047C10.1787 9.86671 10.1277 9.74803 10.0369 9.66049L5.33936 5.13191Z",fill:"#F54E00"}),Is("path",{d:"M29.375 11.6667H31.3636V8.48772H33.0249C34.8499 8.48772 36.0204 7.4443 36.0204 5.83052C36.0204 4.21681 34.8499 3.17334 33.0249 3.17334H29.375V11.6667ZM31.3636 6.84972V4.81136H32.8236C33.5787 4.81136 34.0318 5.19958 34.0318 5.83052C34.0318 6.4615 33.5787 6.84972 32.8236 6.84972H31.3636ZM39.618 11.7637C41.5563 11.7637 42.9659 10.429 42.9659 8.60905C42.9659 6.78905 41.5563 5.45438 39.618 5.45438C37.6546 5.45438 36.2701 6.78905 36.2701 8.60905C36.2701 10.429 37.6546 11.7637 39.618 11.7637ZM38.1077 8.60905C38.1077 7.63838 38.7118 6.97105 39.618 6.97105C40.5116 6.97105 41.1157 7.63838 41.1157 8.60905C41.1157 9.57972 40.5116 10.2471 39.618 10.2471C38.7118 10.2471 38.1077 9.57972 38.1077 8.60905ZM46.1482 11.7637C47.6333 11.7637 48.6402 10.8658 48.6402 9.81025C48.6402 7.33505 45.2294 8.13585 45.2294 7.16518C45.2294 6.8983 45.5189 6.72843 45.9342 6.72843C46.3622 6.72843 46.8782 6.98318 47.0418 7.54132L48.527 6.94678C48.2375 6.06105 47.1677 5.45438 45.8713 5.45438C44.4743 5.45438 43.6058 6.25518 43.6058 7.21372C43.6058 9.53118 46.9663 8.88812 46.9663 9.84665C46.9663 10.1864 46.6391 10.417 46.1482 10.417C45.4434 10.417 44.9525 9.94376 44.8015 9.3735L43.3164 9.93158C43.6436 10.8537 44.6001 11.7637 46.1482 11.7637ZM53.4241 11.606L53.2982 10.0651C53.0843 10.1743 52.8074 10.2106 52.5808 10.2106C52.1278 10.2106 51.8257 9.89523 51.8257 9.34918V7.03172H53.3612V5.55145H51.8257V3.78001H49.9755V5.55145H48.9687V7.03172H49.9755V9.57972C49.9755 11.06 51.0202 11.7637 52.3921 11.7637C52.7696 11.7637 53.122 11.7031 53.4241 11.606ZM59.8749 3.17334V6.47358H56.376V3.17334H54.3874V11.6667H56.376V8.11158H59.8749V11.6667H61.8761V3.17334H59.8749ZM66.2899 11.7637C68.2281 11.7637 69.6378 10.429 69.6378 8.60905C69.6378 6.78905 68.2281 5.45438 66.2899 5.45438C64.3265 5.45438 62.942 6.78905 62.942 8.60905C62.942 10.429 64.3265 11.7637 66.2899 11.7637ZM64.7796 8.60905C64.7796 7.63838 65.3837 6.97105 66.2899 6.97105C67.1835 6.97105 67.7876 7.63838 67.7876 8.60905C67.7876 9.57972 67.1835 10.2471 66.2899 10.2471C65.3837 10.2471 64.7796 9.57972 64.7796 8.60905ZM73.2088 11.4725C73.901 11.4725 74.5177 11.242 74.845 10.8416V11.424C74.845 12.1034 74.2786 12.5767 73.4102 12.5767C72.7935 12.5767 72.2523 12.2854 72.1642 11.788L70.4776 12.0428C70.7042 13.1955 71.925 13.972 73.4102 13.972C75.361 13.972 76.6574 12.8679 76.6574 11.2298V5.55145H74.8324V6.07318C74.4926 5.69705 73.9136 5.45438 73.171 5.45438C71.409 5.45438 70.3014 6.61918 70.3014 8.46345C70.3014 10.3077 71.409 11.4725 73.2088 11.4725ZM72.1012 8.46345C72.1012 7.55345 72.655 6.97105 73.5109 6.97105C74.3793 6.97105 74.9331 7.55345 74.9331 8.46345C74.9331 9.37345 74.3793 9.95585 73.5109 9.95585C72.655 9.95585 72.1012 9.37345 72.1012 8.46345Z",fill:"currentColor"})]})]}),Is("defs",{children:Is("clipPath",{id:"clip0_2415_6911",children:Is("rect",{width:"76",height:"14",fill:"white",transform:"translate(0.5)"})})})]});function _s(){return Is("a",{href:"https://posthog.com/surveys",target:"_blank",rel:"noopener",className:"footer-branding",children:["Survey by ",Ms]})}function Rs(e){var{text:t,submitDisabled:r,appearance:n,onSubmit:i,link:o,onPreviewSubmit:a,skipSubmitButton:s}=e,{isPreviewMode:u}=la(cs);return Is("div",{className:"bottom-section",children:[!s&&Is("button",{className:"form-submit",disabled:r,"aria-label":"Submit survey",type:"button",onClick:()=>{o&&(null==ri||ri.open(o)),u?null==a||a():i()},children:t}),!n.whiteLabel&&Is(_s,{})]})}function Fs(e){var{question:t,forceDisableHtml:r,htmlFor:n}=e;return Is("div",{class:"question-header",children:[Is(t.type===Ca.Open?"label":"h3",{className:"survey-question",htmlFor:n,children:t.question}),t.description&&hs({component:So("p",{className:"survey-question-description"}),children:t.description,renderAsHtml:!r&&"text"!==t.descriptionContentType})]})}function Es(e){var{onClick:t}=e,{isPreviewMode:r}=la(cs);return Is("button",{className:"form-cancel",onClick:t,disabled:r,"aria-label":"Close survey",type:"button",children:Ns})}Is("svg",{width:"16",height:"12",viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Is("path",{d:"M5.30769 10.6923L4.77736 11.2226C4.91801 11.3633 5.10878 11.4423 5.30769 11.4423C5.5066 11.4423 5.69737 11.3633 5.83802 11.2226L5.30769 10.6923ZM15.5303 1.53033C15.8232 1.23744 15.8232 0.762563 15.5303 0.46967C15.2374 0.176777 14.7626 0.176777 14.4697 0.46967L15.5303 1.53033ZM1.53033 5.85429C1.23744 5.56139 0.762563 5.56139 0.46967 5.85429C0.176777 6.14718 0.176777 6.62205 0.46967 6.91495L1.53033 5.85429ZM5.83802 11.2226L15.5303 1.53033L14.4697 0.46967L4.77736 10.162L5.83802 11.2226ZM0.46967 6.91495L4.77736 11.2226L5.83802 10.162L1.53033 5.85429L0.46967 6.91495Z",fill:"currentColor"})});var Zs=ri;function Os(e){var{header:t,description:r,contentType:n,forceDisableHtml:i,appearance:o,onClose:a}=e,{isPopup:s}=la(cs);return aa((()=>{var e=e=>{"Enter"!==e.key&&"Escape"!==e.key||(e.preventDefault(),a())};return bi(Zs,"keydown",e),()=>{Zs.removeEventListener("keydown",e)}}),[a]),Is("div",{className:"thank-you-message",role:"status",tabIndex:0,"aria-atomic":"true",children:[s&&!0!==o.hideCancelButton&&Is(Es,{onClick:()=>a()}),Is("h3",{className:"thank-you-message-header",children:t}),r&&hs({component:So("p",{className:"thank-you-message-body"}),children:r,renderAsHtml:!i&&"text"!==n}),s&&Is(Rs,{text:o.thankYouMessageCloseButtonText||"Close",submitDisabled:!1,appearance:o,onSubmit:()=>a()})]})}var Bs=e=>Gr(e)&&e.every((e=>Kr(e)));function Ls(e){var{question:t,forceDisableHtml:r,appearance:n,onSubmit:i,onPreviewSubmit:o,displayQuestionIndex:a,initialValue:s}=e,{isPreviewMode:u}=ds(),l=sa(null),[c,d]=oa((()=>Kr(s)?s:""));aa((()=>{setTimeout((()=>{var e;u||(null==(e=l.current)||e.focus())}),100)}),[u]);var h="surveyQuestion"+a;return Is(Ao,{children:[Is("div",{className:"question-container",children:[Is(Fs,{question:t,forceDisableHtml:r,htmlFor:h}),Is("textarea",{ref:l,id:h,rows:4,placeholder:null==n?void 0:n.placeholder,onInput:e=>{d(e.currentTarget.value),e.stopPropagation()},onKeyDown:e=>{e.stopPropagation()},value:c})]}),Is(Rs,{text:t.buttonText||"Submit",submitDisabled:!c&&!t.optional,appearance:n,onSubmit:()=>i(c),onPreviewSubmit:()=>o(c)})]})}function Ds(e){var{question:t,forceDisableHtml:r,appearance:n,onSubmit:i,onPreviewSubmit:o}=e;return Is(Ao,{children:[Is("div",{className:"question-container",children:Is(Fs,{question:t,forceDisableHtml:r})}),Is(Rs,{text:t.buttonText||"Submit",submitDisabled:!1,link:t.link,appearance:n,onSubmit:()=>i("link clicked"),onPreviewSubmit:()=>o("link clicked")})]})}function qs(e){var{question:t,forceDisableHtml:r,displayQuestionIndex:n,appearance:i,onSubmit:o,onPreviewSubmit:a,initialValue:s}=e,u=t.scale,l=10===t.scale?0:1,[c,d]=oa((()=>Qr(s)?s:Gr(s)&&s.length>0&&Qr(parseInt(s[0]))?parseInt(s[0]):Kr(s)&&Qr(parseInt(s))?parseInt(s):null)),{isPreviewMode:h}=ds(),f=e=>h?a(e):o(e);return Is(Ao,{children:[Is("div",{className:"question-container",children:[Is(Fs,{question:t,forceDisableHtml:r}),Is("div",{className:"rating-section",children:[Is("div",{className:"rating-options",children:["emoji"===t.display&&Is("div",{className:"rating-options-emoji",children:(3===t.scale?Ys:Hs).map(((e,r)=>Is("button",{"aria-label":"Rate "+(r+1),className:"ratings-emoji question-"+n+"-rating-"+r+" "+(r+1===c?"rating-active":""),value:r+1,type:"button",onClick:()=>{var e=r+1;d(e),t.skipSubmitButton&&f(e)},children:e},r)))}),"number"===t.display&&Is("div",{className:"rating-options-number",style:{gridTemplateColumns:"repeat("+(u-l+1)+", minmax(0, 1fr))"},children:Xs(t.scale).map(((e,r)=>Is(Vs,{displayQuestionIndex:n,active:c===e,appearance:i,num:e,setActiveNumber:e=>{d(e),t.skipSubmitButton&&f(e)}},r)))})]}),Is("div",{className:"rating-text",children:[Is("div",{children:t.lowerBoundLabel}),Is("div",{children:t.upperBoundLabel})]})]})]}),Is(Rs,{text:t.buttonText||(null==i?void 0:i.submitButtonText)||"Submit",submitDisabled:Ur(c)&&!t.optional,appearance:i,onSubmit:()=>o(c),onPreviewSubmit:()=>a(c),skipSubmitButton:t.skipSubmitButton})]})}function Vs(e){var{num:t,active:r,displayQuestionIndex:n,setActiveNumber:i}=e;return Is("button",{"aria-label":"Rate "+t,className:"ratings-number question-"+n+"-rating-"+t+" "+(r?"rating-active":""),type:"button",onClick:()=>{i(t)},children:t})}function Ps(e){var{question:t,forceDisableHtml:n,displayQuestionIndex:i,appearance:o,onSubmit:a,onPreviewSubmit:s,initialValue:u}=e,l=sa(null),c=ua((()=>(e=>{if(!e.shuffleOptions)return e.choices;var t=e.choices,r="";e.hasOpenChoice&&(r=t.pop());var n=ss(t,as(t));return e.hasOpenChoice&&(e.choices.push(r),n.push(r)),n})(t)),[t]),[d,h]=oa((()=>((e,t)=>Kr(e)||Bs(e)?e:t===Ca.SingleChoice?null:[])(u,t.type))),[f,v]=oa((()=>((e,t)=>{if(Kr(e)&&!t.includes(e))return{isSelected:!0,inputValue:e};if(Bs(e)){var r=e.find((e=>!t.includes(e)));if(r)return{isSelected:!0,inputValue:r}}return{isSelected:!1,inputValue:""}})(u,c))),{isPreviewMode:p}=ds(),m=t.type===Ca.SingleChoice,y=t.type===Ca.MultipleChoice,g=t.skipSubmitButton&&m&&!t.hasOpenChoice,b=(e,t)=>{if(t){var n=!f.isSelected;return v((e=>r({},e,{isSelected:n,inputValue:n?e.inputValue:""}))),m&&h(""),void(n&&setTimeout((()=>{var e;return null==(e=l.current)?void 0:e.focus()}),75))}if(m)return h(e),v((e=>r({},e,{isSelected:!1,inputValue:""}))),void(g&&(a(e),p&&s(e)));y&&Gr(d)&&(d.includes(e)?h(d.filter((t=>t!==e))):h([...d,e]))},w=e=>{e.stopPropagation();var t=e.currentTarget.value;v((e=>r({},e,{inputValue:t}))),m&&h(t)},C=e=>{e.stopPropagation(),"Enter"!==e.key||I()||(e.preventDefault(),k()),"Escape"===e.key&&(e.preventDefault(),v((e=>r({},e,{isSelected:!1,inputValue:""}))),m&&h(null))},I=()=>!t.optional&&(!!Ur(d)||(!(!Gr(d)||f.isSelected||0!==d.length)||!(!f.isSelected||""!==f.inputValue.trim()))),k=()=>{f.isSelected&&y?Gr(d)&&(p?s([...d,f.inputValue]):a([...d,f.inputValue])):p?s(d):a(d)};return Is(Ao,{children:[Is("div",{className:"question-container",children:[Is(Fs,{question:t,forceDisableHtml:n}),Is("fieldset",{className:"multiple-choice-options limit-height",children:[Is("legend",{className:"sr-only",children:y?" Select all that apply":" Select one"}),c.map(((e,r)=>{var n=!!t.hasOpenChoice&&r===t.choices.length-1,o="surveyQuestion"+i+"Choice"+r,a=o+"Open",s=n?f.isSelected:m?d===e:Gr(d)&&d.includes(e);return Is("label",{className:n?"choice-option-open":"",children:[Is("div",{className:"response-choice",children:[Is("input",{type:m?"radio":"checkbox",name:o,checked:s,onChange:()=>b(e,n),id:o,"aria-controls":a}),Is("span",{children:n?e+":":e})]}),n&&Is("input",{type:"text",ref:l,id:a,name:"question"+i+"Open",value:f.inputValue,onKeyDown:C,onInput:w,onClick:t=>{f.isSelected||b(e,!0),t.stopPropagation()},"aria-label":e+" - please specify"})]},r)}))]})]}),Is(Rs,{text:t.buttonText||"Submit",submitDisabled:I(),appearance:o,onSubmit:k,onPreviewSubmit:k,skipSubmitButton:g})]})}var Ys=[xs,Ss,ks],Hs=[As,xs,Ss,ks,Ts],Gs=[1,2,3,4,5],Ws=[1,2,3,4,5,6,7],js=[0,1,2,3,4,5,6,7,8,9,10];function Xs(e){switch(e){case 5:default:return Gs;case 7:return Ws;case 10:return js}}var zs=fi("[Surveys]");function Ks(e,t,r){var n,i=e.questions[t],o=t+1;if(null==(n=i.branching)||!n.type)return t===e.questions.length-1?Ia.End:o;if(i.branching.type===Ia.End)return Ia.End;if(i.branching.type===Ia.SpecificQuestion){if(Number.isInteger(i.branching.index))return i.branching.index}else if(i.branching.type===Ia.ResponseBased){if(i.type===Ca.SingleChoice){var a,s=i.choices.indexOf(""+r);if(-1===s&&i.hasOpenChoice&&(s=i.choices.length-1),null!=(a=i.branching)&&null!=(a=a.responseValues)&&a.hasOwnProperty(s)){var u=i.branching.responseValues[s];return Number.isInteger(u)?u:u===Ia.End?Ia.End:o}}else if(i.type===Ca.Rating){var l;if("number"!=typeof r||!Number.isInteger(r))throw new Error("The response type must be an integer");var c=function(e,t){if(3===t){if(e<1||e>3)throw new Error("The response must be in range 1-3");return 1===e?"negative":2===e?"neutral":"positive"}if(5===t){if(e<1||e>5)throw new Error("The response must be in range 1-5");return e<=2?"negative":3===e?"neutral":"positive"}if(7===t){if(e<1||e>7)throw new Error("The response must be in range 1-7");return e<=3?"negative":4===e?"neutral":"positive"}if(10===t){if(e<0||e>10)throw new Error("The response must be in range 0-10");return e<=6?"detractors":e<=8?"passives":"promoters"}throw new Error("The scale must be one of: 3, 5, 7, 10")}(r,i.scale);if(null!=(l=i.branching)&&null!=(l=l.responseValues)&&l.hasOwnProperty(c)){var d=i.branching.responseValues[c];return Number.isInteger(d)?d:d===Ia.End?Ia.End:o}}return o}return zs.warn("Falling back to next question index due to unexpected branching type"),o}var Us=ri,Js=ai,Qs="ph:show_survey_widget",$s="PHWidgetSurveyClickListener",eu=250,tu=20,ru=12;class nu{constructor(e){var t=this;this.S=new Map,this.A=new Map,this.T=new Set,this.handlePageUnload=()=>{var e=this._posthog.get_property("$surveys");if(e)for(var t of e)gs(t)&&os(t,this._posthog)},this.handlePopoverSurvey=e=>{var t;this.N(e.id),this.M(e);var n=(null==(t=e.appearance)?void 0:t.surveyPopupDelaySeconds)||0,{shadow:i}=$a(e,this._posthog);if(n<=0)return Go(Is(uu,{posthog:this._posthog,survey:e,removeSurveyFromFocus:this.R}),i);var o=setTimeout((()=>{if(this.S.delete(e.id),!vs(e))return this.R(e);Go(Is(uu,{posthog:this._posthog,survey:r({},e,{appearance:r({},e.appearance,{surveyPopupDelaySeconds:0})}),removeSurveyFromFocus:this.R}),i)}),1e3*n);this.S.set(e.id,o)},this.F=e=>{var{shadow:t,isNewlyCreated:r}=$a(e,this._posthog);r&&Go(Is(cu,{posthog:this._posthog,survey:e},e.id),t)},this.Z=e=>{this.O(e);var t=this.A.get(e.id);t&&(t.element.removeEventListener("click",t.listener),t.element.removeAttribute($s),this.A.delete(e.id),Aa.info("Removed click listener for survey "+e.id))},this.B=(e,t)=>{var r=Js.querySelector(t),n=this.A.get(e.id);if(r){if(this.F(e),n){if(r===n.element)return;Aa.info("Selector element changed for survey "+e.id+". Re-attaching listener."),this.Z(e)}if(!r.hasAttribute($s)){var i=t=>{var r,n;t.stopPropagation();var i=(null==(r=e.appearance)?void 0:r.position)===ga.NextToTrigger?function(e,t){try{var r=e.getBoundingClientRect(),n=Us.innerHeight,i=Us.innerWidth,o=eu,a=r.left+r.width/2-t/2;a+t>i-tu&&(a=i-t-tu),a<tu&&(a=tu);var s=ru,u=n-r.bottom,l=r.top,c=u<o&&l>u;return{position:"fixed",top:c?"auto":r.bottom+s+"px",left:a+"px",right:"auto",bottom:c?n-r.top+s+"px":"auto",zIndex:Ka.zIndex}}catch(e){return Aa.warn("Failed to calculate trigger position:",e),null}}(t.currentTarget,parseInt((null==(n=e.appearance)?void 0:n.maxWidth)||Ka.maxWidth)):{};Us.dispatchEvent(new CustomEvent(Qs,{detail:{surveyId:e.id,position:i}}))};bi(r,"click",i),r.setAttribute($s,"true"),this.A.set(e.id,{element:r,listener:i,survey:e}),Aa.info("Attached click listener for feedback button survey "+e.id)}}else n&&this.Z(e)},this.renderPopover=e=>{var{shadow:t}=$a(e,this._posthog);Go(Is(uu,{posthog:this._posthog,survey:e,removeSurveyFromFocus:this.R}),t)},this.renderSurvey=(e,t)=>{var r;null!=(r=this._posthog.config)&&null!=(r=r.surveys)&&r.prefillFromUrl&&this.L(e),Go(Is(uu,{posthog:this._posthog,survey:e,removeSurveyFromFocus:this.R,isPopup:!1}),t)},this.getActiveMatchingSurveys=function(e,r){var n;void 0===r&&(r=!1),null==(n=t._posthog)||n.surveys.getSurveys((r=>{var n=r.filter((e=>t.checkSurveyEligibility(e).eligible&&t.D(e)&&t.q(e)&&t.V(e)));e(n)}),r)},this.callSurveysAndEvaluateDisplayLogic=function(e){void 0===e&&(e=!1),t.getActiveMatchingSurveys((e=>{var r=e.filter((e=>e.type===wa.Popover||e.type===wa.Widget)),n=t.P(r),i=new Set;n.forEach((e=>{if(e.type===wa.Widget){var r,n,o,a;if((null==(r=e.appearance)?void 0:r.widgetType)===ya.Tab)return void t.F(e);if((null==(n=e.appearance)?void 0:n.widgetType)===ya.Selector&&null!=(o=e.appearance)&&o.widgetSelector)i.add(e.id),t.B(e,null==(a=e.appearance)?void 0:a.widgetSelector)}Ur(t.Y)&&e.type===wa.Popover&&t.handlePopoverSurvey(e)})),t.A.forEach((e=>{var{survey:r}=e;i.has(r.id)||t.Z(r)}))}),e)},this.M=e=>{Ur(this.Y)||Aa.error("Survey "+this.Y+" already in focus. Cannot add survey "+e.id+"."),this.Y=e.id},this.R=e=>{this.Y!==e.id&&Aa.error("Survey "+e.id+" is not in focus. Cannot remove survey "+e.id+"."),this.N(e.id),this.Y=null,this.O(e)},this._posthog=e,this.Y=null}N(e){var t=this.S.get(e);t&&(clearTimeout(t),this.S.delete(e))}cancelSurvey(e){this.S.has(e)&&(Aa.info("Cancelled pending survey "+e),this.N(e),this.Y===e&&(this.Y=null))}P(e){return e.sort(((e,t)=>{var r,n,i=gs(e),o=gs(t);if(i&&!o)return-1;if(!i&&o)return 1;var a=e.schedule===ka.Always,s=t.schedule===ka.Always;return a&&!s?1:!a&&s?-1:((null==(r=e.appearance)?void 0:r.surveyPopupDelaySeconds)||0)-((null==(n=t.appearance)?void 0:n.surveyPopupDelaySeconds)||0)}))}L(e){if(!this.T.has(e.id))try{var{params:t}=function(e){var t={},r=!1,n=e.replace(/^\?/,"");if(!n)return{params:t,autoSubmit:r};var i=n.split("&");for(var o of i){var[a,s]=o.split("=");if(a&&!zr(s)){var u=decodeURIComponent(a),l=decodeURIComponent(s);if("auto_submit"!==u||"true"!==l){var c=u.match(/^q(\d+)$/);if(c){var d=parseInt(c[1],10);t[d]||(t[d]=[]),t[d].push(l)}}else r=!0}}return{params:t,autoSubmit:r}}(Us.location.search);if(0===Object.keys(t).length)return;Aa.info("[Survey Prefill] Detected URL prefill parameters");var r=function(e,t){var r={};return e.questions.forEach(((e,n)=>{if(t[n]&&e.id){var i=t[n],o=Xa(e.id);try{switch(e.type){case Ca.SingleChoice:if(!e.choices||0===e.choices.length)return void hi.warn("[Survey Prefill] Question "+n+" has no choices");var a=parseInt(i[0],10);if(isNaN(a)||a<0||a>=e.choices.length)return void hi.warn("[Survey Prefill] Invalid choice index for q"+n+": "+i[0]);r[o]=e.choices[a];break;case Ca.MultipleChoice:if(!e.choices||0===e.choices.length)return void hi.warn("[Survey Prefill] Question "+n+" has no choices");var s=i.map((e=>parseInt(e,10))).filter((t=>!isNaN(t)&&t>=0&&t<e.choices.length));if(0===s.length)return void hi.warn("[Survey Prefill] No valid choices for q"+n);var u=[...new Set(s.map((t=>e.choices[t])))];u.length<s.length&&hi.warn("[Survey Prefill] Removed duplicate choices for q"+n),r[o]=u;break;case Ca.Rating:var l=parseInt(i[0],10),c=e.scale||10;if(isNaN(l)||l<0||l>c)return void hi.warn("[Survey Prefill] Invalid rating for q"+n+": "+i[0]+" (scale: 0-"+c+")");r[o]=l;break;default:hi.info("[Survey Prefill] Question type "+e.type+" does not support prefill")}}catch(e){hi.error("[Survey Prefill] Error converting q"+n+":",e)}}})),r}(e,t);if(0===Object.keys(r).length)return void Aa.warn("[Survey Prefill] No valid responses after conversion");var n=qa(),i=Object.keys(t).map((e=>parseInt(e,10))),{startQuestionIndex:o,skippedResponses:a}=function(e,t,r){for(var n=0,i={},o=e.questions.length+1;n<e.questions.length&&0<o&&t.includes(n);){var a=e.questions[n];if(!a||!("skipSubmitButton"in a)||!a.skipSubmitButton)break;if(a.id){var s=Xa(a.id);zr(r[s])||(i[s]=r[s])}var u=Ks(e,n,a.id?r[Xa(a.id)]:null);if(u===Ia.End)return{startQuestionIndex:e.questions.length,skippedResponses:i};n=u}return{startQuestionIndex:n,skippedResponses:i}}(e,i,r),s=o>=e.questions.length;ms(e,{surveySubmissionId:n,responses:r,lastQuestionIndex:s?e.questions.length-1:o}),Aa.info("[Survey Prefill] Stored prefilled responses in localStorage"),(Object.keys(a).length>0&&e.enable_partial_responses||s)&&ts({responses:s?r:a,survey:e,surveySubmissionId:n,posthog:this._posthog,isSurveyCompleted:s}),this.T.add(e.id)}catch(e){Aa.error("[Survey Prefill] Error handling URL prefill:",e)}}H(e,t){if(void 0===t&&(t=void 0),!e)return!0;var r=!!this._posthog.featureFlags.isFeatureEnabled(e,{send_event:!e.startsWith("survey-targeting-")}),n=!0;t&&(n=this._posthog.featureFlags.getFeatureFlag(e,{send_event:!1})===t||"any"===t);return r&&n}D(e){return!e.conditions||vs(e)&&function(e){var t,r,n;if(null==(t=e.conditions)||!t.deviceTypes||0===(null==(r=e.conditions)?void 0:r.deviceTypes.length))return!0;if(!si)return!1;var i=Nn(si);return Ya[fs(null==(n=e.conditions)?void 0:n.deviceTypesMatchType)](e.conditions.deviceTypes,[i])}(e)&&function(e){var t;return null==(t=e.conditions)||!t.selector||!(null==ja||!ja.querySelector(e.conditions.selector))}(e)}G(e){return ls(e)||this.H(e.internal_targeting_flag_key)||gs(e)}checkSurveyEligibility(e){var t,r,n={eligible:!0,reason:void 0};if(!function(e){return!(!e.start_date||e.end_date)}(e))return n.eligible=!1,n.reason="Survey is not running. It was completed on "+e.end_date,n;if(!Fa.includes(e.type))return n.eligible=!1,n.reason="Surveys of type "+e.type+" are never eligible to be shown in the app",n;var i=null==(t=e.conditions)?void 0:t.linkedFlagVariant;return this.H(e.linked_flag_key,i)?this.H(e.targeting_flag_key)?this.G(e)?(e=>{var t=localStorage.getItem("lastSeenSurveyDate");if(!e||!t)return!0;var r=new Date,n=Math.abs(r.getTime()-new Date(t).getTime());return Math.ceil(n/864e5)>e})(null==(r=e.conditions)?void 0:r.seenSurveyWaitPeriodInDays)?(e=>!!localStorage.getItem(_a(e))&&!ls(e))(e)?(n.eligible=!1,n.reason="Survey has already been seen and it can't be activated again",n):n:(n.eligible=!1,n.reason="Survey wait period has not passed",n):(n.eligible=!1,n.reason="Survey internal targeting flag is not enabled and survey cannot activate repeatedly and survey is not in progress",n):(n.eligible=!1,n.reason="Survey targeting feature flag is not enabled",n):(n.eligible=!1,n.reason=i?"Survey linked feature flag is not enabled for variant "+i:"Survey linked feature flag is not enabled",n)}q(e){var t;if(!function(e){var t;return!(null==(t=e.conditions)||null==(t=t.events)||null==(t=t.values)||!t.length)}(e)&&!function(e){var t;return!(null==(t=e.conditions)||null==(t=t.actions)||null==(t=t.values)||!t.length)}(e))return!0;var r=null==(t=this._posthog.surveys._surveyEventReceiver)?void 0:t.getSurveys();return!(null==r||!r.includes(e.id))}V(e){var t;return null==(t=e.feature_flag_keys)||!t.length||e.feature_flag_keys.every((e=>{var{key:t,value:r}=e;return!t||!r||this.H(r)}))}O(e){try{var t=Js.querySelector(ws(e,!0));null!=t&&t.shadowRoot&&Go(null,t.shadowRoot),null==t||t.remove()}catch(t){Aa.warn("Failed to remove survey "+e.id+" from DOM:",t)}}getTestAPI(){return{addSurveyToFocus:this.M,removeSurveyFromFocus:this.R,surveyInFocus:this.Y,surveyTimeouts:this.S,handleWidget:this.F,handlePopoverSurvey:this.handlePopoverSurvey,manageWidgetSelectorListener:this.B,sortSurveysByAppearanceDelay:this.P,checkFlags:this.V.bind(this),isSurveyFeatureFlagEnabled:this.H.bind(this)}}}function iu(e,t){if(Js&&Us){var r,n=new nu(e);if(e.config.disable_surveys_automatic_display)return Aa.info("Surveys automatic display is disabled. Skipping call surveys and evaluate display logic."),n;if(!1===t)return Aa.info("There are no surveys to load or Surveys is disabled in the project settings."),n;n.callSurveysAndEvaluateDisplayLogic(!0);var i=()=>{zr(r)&&(r=setInterval((()=>{n.callSurveysAndEvaluateDisplayLogic(!1)}),1e3))};return i(),bi(Js,"visibilitychange",(()=>{Js.hidden?zr(r)||(clearInterval(r),r=void 0):(n.callSurveysAndEvaluateDisplayLogic(!1),i())})),n}}function ou(e){var{survey:t,removeSurveyFromFocus:r=(()=>{}),setSurveyVisible:n,isPreviewMode:i=!1}=e;aa((()=>{var e;if(!i&&null!=(e=t.conditions)&&e.url){var o=()=>{var e,i=t.type===wa.Widget,o=vs(t),a=(null==(e=t.appearance)?void 0:e.widgetType)===ya.Tab&&i;if(!o)return Aa.info("Hiding survey "+t.id+" because URL does not match"),n(!1),r(t);a&&(Aa.info("Showing survey "+t.id+" because it is a feedback button tab and URL matches"),n(!0))};bi(Us,"popstate",o),bi(Us,"hashchange",o);var a=Us.history.pushState,s=Us.history.replaceState;return Us.history.pushState=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];a.apply(this,t),o()},Us.history.replaceState=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];s.apply(this,t),o()},()=>{Us.removeEventListener("popstate",o),Us.removeEventListener("hashchange",o),Us.history.pushState=a,Us.history.replaceState=s}}}),[i,t,r,n])}function au(e,t,r){if(void 0===t&&(t=ga.Right),e===wa.ExternalSurvey)return{};switch(t){case ga.TopLeft:return{top:"0",left:"0",transform:"translate(30px, 30px)"};case ga.TopRight:return{top:"0",right:"0",transform:"translate(-30px, 30px)"};case ga.TopCenter:return{top:"0",left:"50%",transform:"translate(-50%, 30px)"};case ga.MiddleLeft:return{top:"50%",left:"0",transform:"translate(30px, -50%)"};case ga.MiddleRight:return{top:"50%",right:"0",transform:"translate(-30px, -50%)"};case ga.MiddleCenter:return{top:"50%",left:"50%",transform:"translate(-50%, -50%)"};case ga.Left:return{left:"30px"};case ga.Center:return{left:"50%",transform:"translateX(-50%)"};default:case ga.Right:return{right:e===wa.Widget&&r===ya.Tab?"60px":"30px"}}}function su(e){switch(void 0===e&&(e=ba.Right),e){case ba.Top:return{top:"0",left:"50%",transform:"translateX(-50%)"};case ba.Left:return{top:"50%",left:"0",transform:"rotate(90deg) translateY(-100%)",transformOrigin:"left top"};case ba.Bottom:return{bottom:"0",left:"50%",transform:"translateX(-50%)"};default:case ba.Right:return{top:"50%",right:"0",transform:"rotate(-90deg) translateY(-100%)",transformOrigin:"right top"}}}function uu(e){var t,n,i,o,a,s,{survey:u,forceDisableHtml:l,posthog:c,style:d={},previewPageIndex:h,removeSurveyFromFocus:f=(()=>{}),isPopup:v=!0,onPreviewSubmit:p=(()=>{}),onPopupSurveyDismissed:m=(()=>{}),onCloseConfirmationMessage:y=(()=>{})}=e,g=sa(null),b=Number.isInteger(h),w=null!=(t=u.appearance)&&t.surveyPopupDelaySeconds?1e3*u.appearance.surveyPopupDelaySeconds:0,{isPopupVisible:C,isSurveySent:I,hidePopupWithViewTransition:k}=function(e,t,r,n,i,o,a){var[s,u]=oa(n||0===r||e.type===wa.ExternalSurvey),[l,c]=oa(!1),d=()=>{var t=()=>{o&&i(e),u(!1)};Js.startViewTransition?Js.startViewTransition((()=>{var e;null==a||null==(e=a.current)||e.remove()})).finished.then((()=>{setTimeout((()=>{t()}),100)})):t()},h=t=>{t.detail.surveyId===e.id&&d()};return aa((()=>{if(t){if(!n){var i=t=>{var r,n;if(t.detail.surveyId===e.id){if(null==(r=e.appearance)||!r.displayThankYouMessage)return d();c(!0),null!=(n=e.appearance)&&n.autoDisappear&&setTimeout((()=>{d()}),5e3)}},o=()=>{vs(e)&&(u(!0),Us.dispatchEvent(new Event("PHSurveyShown")),t.capture(Sa.SHOWN,{[xa.SURVEY_NAME]:e.name,[xa.SURVEY_ID]:e.id,[xa.SURVEY_ITERATION]:e.current_iteration,[xa.SURVEY_ITERATION_START_DATE]:e.current_iteration_start_date,sessionRecordingUrl:null==t.get_session_replay_url?void 0:t.get_session_replay_url()}),localStorage.setItem("lastSeenSurveyDate",(new Date).toISOString()))};if(bi(Us,"PHSurveyClosed",h),bi(Us,"PHSurveySent",i),r>0){var a=setTimeout(o,r);return()=>{clearTimeout(a),Us.removeEventListener("PHSurveyClosed",h),Us.removeEventListener("PHSurveySent",i)}}return o(),()=>{Us.removeEventListener("PHSurveyClosed",h),Us.removeEventListener("PHSurveySent",i)}}}else Aa.error("usePopupVisibility hook called without a PostHog instance.")}),[]),ou({survey:e,removeSurveyFromFocus:i,setSurveyVisible:u,isPreviewMode:n}),{isPopupVisible:s,isSurveySent:l,setIsPopupVisible:u,hidePopupWithViewTransition:d}}(u,c,w,b,f,v,g),S=I||h===u.questions.length,x=ua((()=>{var e=ys(u);return{isPreviewMode:b,previewPageIndex:h,onPopupSurveyDismissed:()=>{is(u,c,b),m()},isPopup:v||!1,surveySubmissionId:(null==e?void 0:e.surveySubmissionId)||qa(),onPreviewSubmit:p,posthog:c}}),[b,h,v,c,u,m,p]);return C?Is(cs.Provider,{value:x,children:Is("div",{className:"ph-survey",style:r({},au(u.type,null==(n=u.appearance)?void 0:n.position,null==(i=u.appearance)?void 0:i.widgetType),d),ref:g,children:S?Is(Os,{header:(null==(o=u.appearance)?void 0:o.thankYouMessageHeader)||"Thank you!",description:(null==(a=u.appearance)?void 0:a.thankYouMessageDescription)||"",forceDisableHtml:!!l,contentType:null==(s=u.appearance)?void 0:s.thankYouMessageDescriptionContentType,appearance:u.appearance||Ka,onClose:()=>{k(),y()}}):Is(lu,{survey:u,forceDisableHtml:!!l,posthog:c})})}):null}function lu(e){var t,{survey:n,forceDisableHtml:i,posthog:o}=e,[a,s]=oa((()=>{var e=ys(n);return null!=e&&e.responses&&Aa.info("Survey is already in progress, filling in initial responses"),(null==e?void 0:e.responses)||{}})),{previewPageIndex:u,onPopupSurveyDismissed:l,isPopup:c,onPreviewSubmit:d,surveySubmissionId:h,isPreviewMode:f}=la(cs),[v,p]=oa((()=>{var e=ys(n);return u||(null==e?void 0:e.lastQuestionIndex)||0})),m=ua((()=>us(n)),[n]);aa((()=>{f&&!zr(u)&&p(u)}),[u,f]);var y=m.at(v);return y?Is("form",{className:"survey-form",name:"surveyForm",children:[c&&!0!==(null==(t=n.appearance)?void 0:t.hideCancelButton)&&Is(Es,{onClick:()=>{l()}}),Is("div",{className:"survey-box",children:du({question:y,forceDisableHtml:i,displayQuestionIndex:v,appearance:n.appearance||Ka,onSubmit:e=>(e=>{var{res:t,displayQuestionIndex:i,questionId:u}=e;if(o)if(u){var l=Xa(u),c=r({},a,{[l]:t});s(c);var d=Ks(n,i,t),f=d===Ia.End;f||(p(d),ms(n,{surveySubmissionId:h,responses:c,lastQuestionIndex:d})),(n.enable_partial_responses||f)&&ts({responses:c,survey:n,surveySubmissionId:h,isSurveyCompleted:f,posthog:o})}else Aa.error("onNextButtonClick called without a questionId.");else Aa.error("onNextButtonClick called without a PostHog instance.")})({res:e,displayQuestionIndex:v,questionId:y.id}),onPreviewSubmit:d,initialValue:y.id?a[Xa(y.id)]:void 0})})]}):null}function cu(e){var t,r,n,i,o,a,s,{survey:u,forceDisableHtml:l,posthog:c,readOnly:d}=e,[h,f]=oa(!0),[v,p]=oa(!1),[m,y]=oa({}),g=()=>{p(!v)};if(aa((()=>{var e;if(c){if(!d){"tab"===(null==(e=u.appearance)?void 0:e.widgetType)&&y({top:"50%",bottom:"auto"});var t=e=>{var t,r=e;(null==(t=r.detail)?void 0:t.surveyId)===u.id&&(Aa.info("Received show event for feedback button survey "+u.id),y(r.detail.position||{}),g())};return bi(Us,Qs,t),()=>{Us.removeEventListener(Qs,t)}}}else Aa.error("FeedbackWidget called without a PostHog instance.")}),[c,d,u.id,null==(t=u.appearance)?void 0:t.widgetType,null==(r=u.appearance)?void 0:r.widgetSelector,null==(n=u.appearance)?void 0:n.borderColor]),ou({survey:u,setSurveyVisible:f}),!h)return null;var b=()=>{u.schedule!==ka.Always&&f(!1),setTimeout((()=>{p(!1)}),200)};return Is(Ao,{children:["tab"===(null==(i=u.appearance)?void 0:i.widgetType)&&Is("button",{className:"ph-survey-widget-tab "+((null==(o=u.appearance)?void 0:o.tabPosition)===ba.Top?"widget-tab-top":""),onClick:g,disabled:d,style:su(null==(a=u.appearance)?void 0:a.tabPosition),children:(null==(s=u.appearance)?void 0:s.widgetLabel)||""}),v&&Is(uu,{posthog:c,survey:u,forceDisableHtml:l,style:m,onPopupSurveyDismissed:b,onCloseConfirmationMessage:b})]})}var du=e=>{var{question:t,forceDisableHtml:n,displayQuestionIndex:i,appearance:o,onSubmit:a,onPreviewSubmit:s,initialValue:u}=e,l={forceDisableHtml:n,appearance:o,onPreviewSubmit:e=>{s(e)},onSubmit:e=>{a(e)},initialValue:u,displayQuestionIndex:i};switch(t.type){case Ca.Open:return So(Ls,r({},l,{question:t,key:t.id}));case Ca.Link:return So(Ds,r({},l,{question:t,key:t.id}));case Ca.Rating:return So(qs,r({},l,{question:t,key:t.id}));case Ca.SingleChoice:case Ca.MultipleChoice:return So(Ps,r({},l,{question:t,key:t.id}));default:return Aa.error("Unsupported question type: "+t.type),null}};ui.__PosthogExtensions__=ui.__PosthogExtensions__||{},ui.__PosthogExtensions__.generateSurveys=iu,ui.extendPostHogWithSurveys=iu,fi("[Error tracking]");var hu=fi("[ExceptionAutocapture]"),fu=new Rn([new Wn,new ti,new Xn,new jn,new $n,new Qn,new Kn,new ei],Gn()),vu={wrapOnError:e=>{var t=ri;t||hu.info("window not available, cannot wrap onerror");var r=t.onerror;return t.onerror=function(){for(var t,n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];var a=i[4],s=i[0],u=fu.buildFromUnknown(a||s,{mechanism:{handled:!1}});return e(u),null!==(t=null==r?void 0:r(...i))&&void 0!==t&&t},t.onerror.__POSTHOG_INSTRUMENTED__=!0,()=>{var e;null==(e=t.onerror)||delete e.__POSTHOG_INSTRUMENTED__,t.onerror=r}},wrapUnhandledRejection:e=>{var t=ri;t||hu.info("window not available, cannot wrap onUnhandledRejection");var r=t.onunhandledrejection;return t.onunhandledrejection=function(n){var i,o=fu.buildFromUnknown(n,{mechanism:{handled:!1}});return e(o),null!==(i=null==r?void 0:r.apply(t,[n]))&&void 0!==i&&i},t.onunhandledrejection.__POSTHOG_INSTRUMENTED__=!0,()=>{var e;null==(e=t.onunhandledrejection)||delete e.__POSTHOG_INSTRUMENTED__,t.onunhandledrejection=r}},wrapConsoleError:e=>{var t=console;t||hu.info("console not available, cannot wrap console.error");var r=t.error;return t.error=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];var o=n.join(" "),a=n.find((e=>e instanceof Error)),s=fu.buildFromUnknown(a||o,{mechanism:{handled:!1},syntheticException:new Error("PostHog syntheticException")});return e(s),null==r?void 0:r(...n)},t.error.__POSTHOG_INSTRUMENTED__=!0,()=>{var e;null==(e=t.error)||delete e.__POSTHOG_INSTRUMENTED__,t.error=r}}};ui.__PosthogExtensions__=ui.__PosthogExtensions__||{},ui.__PosthogExtensions__.errorWrappingFunctions=vu,ui.posthogErrorWrappingFunctions=vu;var pu=(e,t,r,n)=>{var i;try{i=new URL(n.url).hostname}catch(e){return}if(!Gr(e)||e.includes(i)){if(r){var{sessionId:o,windowId:a}=r.checkAndGetSessionAndWindowId(!0);n.headers.set("X-POSTHOG-SESSION-ID",o),n.headers.set("X-POSTHOG-WINDOW-ID",a)}"$posthog_cookieless"!==t&&n.headers.set("X-POSTHOG-DISTINCT-ID",t)}};ui.__PosthogExtensions__=ui.__PosthogExtensions__||{};var mu={_patchFetch:(e,r,n)=>Ci(ri,"fetch",(i=>function(){var o=t((function*(t,o){var a=new Request(t,o);return pu(e,r,n,a),i(a)}));return function(e,t){return o.apply(this,arguments)}}())),_patchXHR:(e,t,r)=>Ci(ri.XMLHttpRequest.prototype,"open",(n=>function(i,o,a,s,u){void 0===a&&(a=!0);var l=new Request(o);return pu(e,t,r,l),n.call(this,i,l.url,a,s,u)}))};ui.__PosthogExtensions__.tracingHeadersPatchFns=mu,ui.postHogTracingHeadersPatchFns=mu;var yu,gu,bu=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},wu=function(e){if("loading"===document.readyState)return"loading";var t=bu();if(t){if(e<t.domInteractive)return"loading";if(0===t.domContentLoadedEventStart||e<t.domContentLoadedEventStart)return"dom-interactive";if(0===t.domComplete||e<t.domComplete)return"dom-content-loaded"}return"complete"},Cu=function(e){var t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},Iu=function(e,t){var r="";try{for(;e&&9!==e.nodeType;){var n=e,i=n.id?"#"+n.id:Cu(n)+(n.classList&&n.classList.value&&n.classList.value.trim()&&n.classList.value.trim().length?"."+n.classList.value.trim().replace(/\s+/g,"."):"");if(r.length+i.length>(t||100)-1)return r||i;if(r=r?i+">"+r:i,n.id)break;e=n.parentNode}}catch(e){}return r},ku=-1,Su=function(){return ku},xu=function(e){addEventListener("pageshow",(function(t){t.persisted&&(ku=t.timeStamp,e(t))}),!0)},Au=function(){var e=bu();return e&&e.activationStart||0},Tu=function(e,t){var r=bu(),n="navigate";return Su()>=0?n="back-forward-cache":r&&(document.prerendering||Au()>0?n="prerender":document.wasDiscarded?n="restore":r.type&&(n=r.type.replace(/_/g,"-"))),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:n}},Nu=function(e,t,r){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var n=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return n.observe(Object.assign({type:e,buffered:!0},r||{})),n}}catch(e){}},Mu=function(e,t,r,n){var i,o;return function(a){t.value>=0&&(a||n)&&((o=t.value-(i||0))||void 0===i)&&(i=t.value,t.delta=o,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,r),e(t))}},_u=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},Ru=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},Fu=function(e){var t=!1;return function(){t||(e(),t=!0)}},Eu=-1,Zu=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},Ou=function(e){"hidden"===document.visibilityState&&Eu>-1&&(Eu="visibilitychange"===e.type?e.timeStamp:0,Lu())},Bu=function(){addEventListener("visibilitychange",Ou,!0),addEventListener("prerenderingchange",Ou,!0)},Lu=function(){removeEventListener("visibilitychange",Ou,!0),removeEventListener("prerenderingchange",Ou,!0)},Du=function(){return Eu<0&&(Eu=Zu(),Bu(),xu((function(){setTimeout((function(){Eu=Zu(),Bu()}),0)}))),{get firstHiddenTime(){return Eu}}},qu=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},Vu=[1800,3e3],Pu=function(e,t){t=t||{},qu((function(){var r,n=Du(),i=Tu("FCP"),o=Nu("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime<n.firstHiddenTime&&(i.value=Math.max(e.startTime-Au(),0),i.entries.push(e),r(!0)))}))}));o&&(r=Mu(e,i,Vu,t.reportAllChanges),xu((function(n){i=Tu("FCP"),r=Mu(e,i,Vu,t.reportAllChanges),_u((function(){i.value=performance.now()-n.timeStamp,r(!0)}))})))}))},Yu=[.1,.25],Hu=0,Gu=1/0,Wu=0,ju=function(e){e.forEach((function(e){e.interactionId&&(Gu=Math.min(Gu,e.interactionId),Wu=Math.max(Wu,e.interactionId),Hu=Wu?(Wu-Gu)/7+1:0)}))},Xu=function(){return yu?Hu:performance.interactionCount||0},zu=function(){"interactionCount"in performance||yu||(yu=Nu("event",ju,{type:"event",buffered:!0,durationThreshold:0}))},Ku=[],Uu=new Map,Ju=0,Qu=[],$u=function(e){if(Qu.forEach((function(t){return t(e)})),e.interactionId||"first-input"===e.entryType){var t=Ku[Ku.length-1],r=Uu.get(e.interactionId);if(r||Ku.length<10||e.duration>t.latency){if(r)e.duration>r.latency?(r.entries=[e],r.latency=e.duration):e.duration===r.latency&&e.startTime===r.entries[0].startTime&&r.entries.push(e);else{var n={id:e.interactionId,latency:e.duration,entries:[e]};Uu.set(n.id,n),Ku.push(n)}Ku.sort((function(e,t){return t.latency-e.latency})),Ku.length>10&&Ku.splice(10).forEach((function(e){return Uu.delete(e.id)}))}}},el=function(e){var t=self.requestIdleCallback||self.setTimeout,r=-1;return e=Fu(e),"hidden"===document.visibilityState?e():(r=t(e),Ru(e)),r},tl=[200,500],rl=function(e,t){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(t=t||{},qu((function(){var r;zu();var n,i=Tu("INP"),o=function(e){el((function(){e.forEach($u);var t=function(){var e=Math.min(Ku.length-1,Math.floor((Xu()-Ju)/50));return Ku[e]}();t&&t.latency!==i.value&&(i.value=t.latency,i.entries=t.entries,n())}))},a=Nu("event",o,{durationThreshold:null!==(r=t.durationThreshold)&&void 0!==r?r:40});n=Mu(e,i,tl,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),Ru((function(){o(a.takeRecords()),n(!0)})),xu((function(){Ju=Xu(),Ku.length=0,Uu.clear(),i=Tu("INP"),n=Mu(e,i,tl,t.reportAllChanges)})))})))},nl=[],il=[],ol=0,al=new WeakMap,sl=new Map,ul=-1,ll=function(e){nl=nl.concat(e),cl()},cl=function(){ul<0&&(ul=el(dl))},dl=function(){sl.size>10&&sl.forEach((function(e,t){Uu.has(t)||sl.delete(t)}));var e=Ku.map((function(e){return al.get(e.entries[0])})),t=il.length-50;il=il.filter((function(r,n){return n>=t||e.includes(r)}));for(var r=new Set,n=0;n<il.length;n++){var i=il[n];hl(i.startTime,i.processingEnd).forEach((function(e){r.add(e)}))}var o=nl.length-1-50;nl=nl.filter((function(e,t){return e.startTime>ol&&t>o||r.has(e)})),ul=-1};Qu.push((function(e){e.interactionId&&e.target&&!sl.has(e.interactionId)&&sl.set(e.interactionId,e.target)}),(function(e){var t,r=e.startTime+e.duration;ol=Math.max(ol,e.processingEnd);for(var n=il.length-1;n>=0;n--){var i=il[n];if(Math.abs(r-i.renderTime)<=8){(t=i).startTime=Math.min(e.startTime,t.startTime),t.processingStart=Math.min(e.processingStart,t.processingStart),t.processingEnd=Math.max(e.processingEnd,t.processingEnd),t.entries.push(e);break}}t||(t={startTime:e.startTime,processingStart:e.processingStart,processingEnd:e.processingEnd,renderTime:r,entries:[e]},il.push(t)),(e.interactionId||"first-input"===e.entryType)&&al.set(e,t),cl()}));var hl=function(e,t){for(var r,n=[],i=0;r=nl[i];i++)if(!(r.startTime+r.duration<e)){if(r.startTime>t)break;n.push(r)}return n},fl=[2500,4e3],vl={},pl={onLCP:function(e,t){!function(e,t){t=t||{},qu((function(){var r,n=Du(),i=Tu("LCP"),o=function(e){t.reportAllChanges||(e=e.slice(-1)),e.forEach((function(e){e.startTime<n.firstHiddenTime&&(i.value=Math.max(e.startTime-Au(),0),i.entries=[e],r())}))},a=Nu("largest-contentful-paint",o);if(a){r=Mu(e,i,fl,t.reportAllChanges);var s=Fu((function(){vl[i.id]||(o(a.takeRecords()),a.disconnect(),vl[i.id]=!0,r(!0))}));["keydown","click"].forEach((function(e){addEventListener(e,(function(){return el(s)}),{once:!0,capture:!0})})),Ru(s),xu((function(n){i=Tu("LCP"),r=Mu(e,i,fl,t.reportAllChanges),_u((function(){i.value=performance.now()-n.timeStamp,vl[i.id]=!0,r(!0)}))}))}}))}((function(t){var r=function(e){var t={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:e.value};if(e.entries.length){var r=bu();if(r){var n=r.activationStart||0,i=e.entries[e.entries.length-1],o=i.url&&performance.getEntriesByType("resource").filter((function(e){return e.name===i.url}))[0],a=Math.max(0,r.responseStart-n),s=Math.max(a,o?(o.requestStart||o.startTime)-n:0),u=Math.max(s,o?o.responseEnd-n:0),l=Math.max(u,i.startTime-n);t={element:Iu(i.element),timeToFirstByte:a,resourceLoadDelay:s-a,resourceLoadDuration:u-s,elementRenderDelay:l-u,navigationEntry:r,lcpEntry:i},i.url&&(t.url=i.url),o&&(t.lcpResourceEntry=o)}}return Object.assign(e,{attribution:t})}(t);e(r)}),t)},onCLS:function(e,t){!function(e,t){t=t||{},Pu(Fu((function(){var r,n=Tu("CLS",0),i=0,o=[],a=function(e){e.forEach((function(e){if(!e.hadRecentInput){var t=o[0],r=o[o.length-1];i&&e.startTime-r.startTime<1e3&&e.startTime-t.startTime<5e3?(i+=e.value,o.push(e)):(i=e.value,o=[e])}})),i>n.value&&(n.value=i,n.entries=o,r())},s=Nu("layout-shift",a);s&&(r=Mu(e,n,Yu,t.reportAllChanges),Ru((function(){a(s.takeRecords()),r(!0)})),xu((function(){i=0,n=Tu("CLS",0),r=Mu(e,n,Yu,t.reportAllChanges),_u((function(){return r()}))})),setTimeout(r,0))})))}((function(t){var r=function(e){var t,r={};if(e.entries.length){var n=e.entries.reduce((function(e,t){return e&&e.value>t.value?e:t}));if(n&&n.sources&&n.sources.length){var i=(t=n.sources).find((function(e){return e.node&&1===e.node.nodeType}))||t[0];i&&(r={largestShiftTarget:Iu(i.node),largestShiftTime:n.startTime,largestShiftValue:n.value,largestShiftSource:i,largestShiftEntry:n,loadState:wu(n.startTime)})}}return Object.assign(e,{attribution:r})}(t);e(r)}),t)},onFCP:function(e,t){Pu((function(t){var r=function(e){var t={timeToFirstByte:0,firstByteToFCP:e.value,loadState:wu(Su())};if(e.entries.length){var r=bu(),n=e.entries[e.entries.length-1];if(r){var i=r.activationStart||0,o=Math.max(0,r.responseStart-i);t={timeToFirstByte:o,firstByteToFCP:e.value-o,loadState:wu(e.entries[0].startTime),navigationEntry:r,fcpEntry:n}}}return Object.assign(e,{attribution:t})}(t);e(r)}),t)},onINP:function(e,t){gu||(gu=Nu("long-animation-frame",ll)),rl((function(t){var r=function(e){var t=e.entries[0],r=al.get(t),n=t.processingStart,i=r.processingEnd,o=r.entries.sort((function(e,t){return e.processingStart-t.processingStart})),a=hl(t.startTime,i),s=e.entries.find((function(e){return e.target})),u=s&&s.target||sl.get(t.interactionId),l=[t.startTime+t.duration,i].concat(a.map((function(e){return e.startTime+e.duration}))),c=Math.max.apply(Math,l),d={interactionTarget:Iu(u),interactionTargetElement:u,interactionType:t.name.startsWith("key")?"keyboard":"pointer",interactionTime:t.startTime,nextPaintTime:c,processedEventEntries:o,longAnimationFrameEntries:a,inputDelay:n-t.startTime,processingDuration:i-n,presentationDelay:Math.max(c-i,0),loadState:wu(t.startTime)};return Object.assign(e,{attribution:d})}(t);e(r)}),t)}};function ml(e,t){return t.length>e?t.slice(0,e)+"...":t}function yl(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do{t=t.previousSibling}while(t&&!ki(t));return t}function gl(e,t,r,n){var i=e.tagName.toLowerCase(),o={tag_name:i};Ni.indexOf(i)>-1&&!r&&("a"===i.toLowerCase()||"button"===i.toLowerCase()?o.$el_text=ml(1024,Di(e)):o.$el_text=ml(1024,Ti(e)));var a=Ai(e);a.length>0&&(o.classes=a.filter((function(e){return""!==e}))),mi(e.attributes,(function(r){var i;if((!_i(e)||-1!==["name","id","class","aria-label"].indexOf(r.name))&&((null==n||!n.includes(r.name))&&!t&&Li(r.value)&&(i=r.name,!Kr(i)||"_ngcontent"!==i.substring(0,10)&&"_nghost"!==i.substring(0,7)))){var a=r.value;"class"===r.name&&(a=xi(a).join(" ")),o["attr__"+r.name]=ml(1024,a)}}));for(var s=1,u=1,l=e;l=yl(l);)s++,l.tagName===e.tagName&&u++;return o.nth_child=s,o.nth_of_type=u,o}function bl(e,t){for(var r,n,i,{e:o,maskAllElementAttributes:a,maskAllText:s,elementAttributeIgnoreList:u}=t,l=[e],c=e;c.parentNode&&!Si(c,"body");)(i=c.parentNode)&&11===i.nodeType?(l.push(c.parentNode.host),c=c.parentNode.host):(l.push(c.parentNode),c=c.parentNode);var d,h,f,v=[],p={},m=!1,y=!1;if(mi(l,(e=>{var t=Mi(e);"a"===e.tagName.toLowerCase()&&(m=e.getAttribute("href"),m=t&&m&&Li(m)&&m),Dr(Ai(e),"ph-no-capture")&&(y=!0),v.push(gl(e,a,s,u));var r=function(e){if(!Mi(e))return{};var t={};return mi(e.attributes,(function(e){if(e.name&&0===e.name.indexOf("data-ph-capture-attribute")){var r=e.name.replace("data-ph-capture-attribute-",""),n=e.value;r&&n&&Li(n)&&(t[r]=n)}})),t}(e);yi(p,r)})),y)return{props:{},explicitNoCapture:y};if(s||("a"===e.tagName.toLowerCase()||"button"===e.tagName.toLowerCase()?v[0].$el_text=Di(e):v[0].$el_text=Ti(e)),m){var g,b;v[0].attr__href=m;var w=null==(h=m,f=null==ai?void 0:ai.createElement("a"),g=zr(f)?null:(f.href=h,f))?void 0:g.host,C=null==ri||null==(b=ri.location)?void 0:b.host;w&&C&&w!==C&&(d=m)}return{props:yi({$event_type:o.type,$ce_version:1},{$elements:v},{$elements_chain:Vi(v)},null!=(r=v[0])&&r.$el_text?{$el_text:null==(n=v[0])?void 0:n.$el_text}:{},d&&"click"===o.type?{$external_click_url:d}:{},p)}}ui.__PosthogExtensions__=ui.__PosthogExtensions__||{},ui.__PosthogExtensions__.postHogWebVitalsCallbacks=pl,ui.postHogWebVitalsCallbacks=pl,fi("[AutoCapture]");var wl={};function Cl(e){return function(e,t){var r=wl[e];if(r)return r;var n=t[e];if(jr(n)&&!li())return wl[e]=n.bind(t);var i=t.document;if(i&&Wr(i.createElement))try{var o=i.createElement("iframe");o.hidden=!0,i.head.appendChild(o);var a=o.contentWindow;a&&a[e]&&(n=a[e]),i.head.removeChild(o)}catch(t){hi.warn("Could not create sandbox iframe for "+e+" check, bailing to assignableWindow."+e+": ",t)}return n&&Wr(n)?wl[e]=n.bind(t):n}("MutationObserver",e)}function Il(e){var t=function(e){return zr(e.target)?e.srcElement||null:null!=(t=e.target)&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t}(e);return t?{node:t,originalEvent:e,timestamp:Date.now()}:null}function kl(e,t){return Qr(e)&&e>=t}class Sl{W(e){var t,r,n,i,o,a=this.j((null==e?void 0:e.__onCapture)||this.X.bind(this));return{element_attribute_ignorelist:null!==(t=null==e?void 0:e.element_attribute_ignorelist)&&void 0!==t?t:a.element_attribute_ignorelist,scroll_threshold_ms:null!==(r=null==e?void 0:e.scroll_threshold_ms)&&void 0!==r?r:a.scroll_threshold_ms,selection_change_threshold_ms:null!==(n=null==e?void 0:e.selection_change_threshold_ms)&&void 0!==n?n:a.selection_change_threshold_ms,mutation_threshold_ms:null!==(i=null==e?void 0:e.mutation_threshold_ms)&&void 0!==i?i:a.mutation_threshold_ms,capture_clicks_with_modifier_keys:null!==(o=null==e?void 0:e.capture_clicks_with_modifier_keys)&&void 0!==o?o:a.capture_clicks_with_modifier_keys,__onCapture:a.__onCapture}}constructor(e,t){this.K=[],this.j=e=>({element_attribute_ignorelist:[],scroll_threshold_ms:100,selection_change_threshold_ms:100,mutation_threshold_ms:2500,capture_clicks_with_modifier_keys:!1,__onCapture:e}),this.U=e=>{var t=Il(e);Ur(t)||this.J(t)||this.K.push(t),this.K.length&&zr(this.$)&&(this.$=ui.setTimeout((()=>{this.ee()}),1e3))},this.te=()=>{var e=Date.now();e%50==0&&this.K.forEach((t=>{zr(t.scrollDelayMs)&&(t.scrollDelayMs=e-t.timestamp)}))},this.re=()=>{this.ne=Date.now()},this.instance=e,this.ie=this.W(t),this._onCapture=this.ie.__onCapture}start(e){this.oe(),this.ae(),this.se(),this.ue(e)}ue(e){if(!this.le){var t=Cl(ui);this.le=new t((e=>{this.ce(e)})),this.le.observe(e,{attributes:!0,characterData:!0,childList:!0,subtree:!0})}}stop(){var e;null==(e=this.le)||e.disconnect(),this.le=void 0,ui.removeEventListener("click",this.U),ui.removeEventListener("scroll",this.te,{capture:!0}),ui.removeEventListener("selectionchange",this.re)}ce(e){this.de=Date.now()}oe(){bi(ui,"click",this.U)}ae(){bi(ui,"scroll",this.te,{capture:!0})}se(){bi(ui,"selectionchange",this.re)}J(e){if(!e)return!0;if(!this.ie.capture_clicks_with_modifier_keys&&((t=e.originalEvent).ctrlKey||t.metaKey||t.altKey||t.shiftKey))return!0;var t,r;if((r=e.node)instanceof Element&&("__POSTHOG_TOOLBAR__"===r.id||null!=r.closest&&r.closest(".toolbar-global-fade-container")))return!0;var n=this.K.some((t=>t.node===e.node&&Math.abs(t.timestamp-e.timestamp)<1e3));return!!n||!(!Si(e.node,"html")&&ki(e.node)&&!Ni.includes(e.node.tagName.toLowerCase()))}ee(){if(this.K.length){clearTimeout(this.$),this.$=void 0;var e=this.K;for(var t of(this.K=[],e)){var r;t.mutationDelayMs=null!==(r=t.mutationDelayMs)&&void 0!==r?r:this.de&&t.timestamp<=this.de?this.de-t.timestamp:void 0,t.absoluteDelayMs=Date.now()-t.timestamp,t.selectionChangedDelayMs=this.ne&&t.timestamp<=this.ne?this.ne-t.timestamp:void 0;var n=kl(t.scrollDelayMs,this.ie.scroll_threshold_ms),i=kl(t.selectionChangedDelayMs,this.ie.selection_change_threshold_ms),o=kl(t.mutationDelayMs,this.ie.mutation_threshold_ms),a=kl(t.absoluteDelayMs,1.1*this.ie.mutation_threshold_ms),s=Qr(t.scrollDelayMs)&&t.scrollDelayMs<this.ie.scroll_threshold_ms,u=Qr(t.mutationDelayMs)&&t.mutationDelayMs<this.ie.mutation_threshold_ms,l=Qr(t.selectionChangedDelayMs)&&t.selectionChangedDelayMs<this.ie.selection_change_threshold_ms;s||u||l||(n||o||a||i?this._onCapture(t,{$dead_click_last_mutation_timestamp:this.de,$dead_click_event_timestamp:t.timestamp,$dead_click_scroll_timeout:n,$dead_click_mutation_timeout:o,$dead_click_absolute_timeout:a,$dead_click_selection_changed_timeout:i}):t.absoluteDelayMs<this.ie.mutation_threshold_ms&&this.K.push(t))}this.K.length&&zr(this.$)&&(this.$=ui.setTimeout((()=>{this.ee()}),1e3))}}X(e,t){this.instance.capture("$dead_click",r({},t,bl(e.node,{e:e.originalEvent,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.ie.element_attribute_ignorelist}).props,{$dead_click_scroll_delay_ms:e.scrollDelayMs,$dead_click_mutation_delay_ms:e.mutationDelayMs,$dead_click_absolute_delay_ms:e.absoluteDelayMs,$dead_click_selection_changed_delay_ms:e.selectionChangedDelayMs}),{timestamp:new Date(e.timestamp)})}}ui.__PosthogExtensions__=ui.__PosthogExtensions__||{},ui.__PosthogExtensions__.initDeadClicksAutocapture=(e,t)=>new Sl(e,t)}();
|
|
2
2
|
//# sourceMappingURL=all-external-dependencies.js.map
|