posthog-js 1.239.0 → 1.239.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- !function(){"use strict";function e(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function t(t){return function(){var n=this,r=arguments;return new Promise((function(i,o){var a=t.apply(n,r);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 n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}var r,i=["type"],o=Object.defineProperty,a=(e,t,n)=>((e,t,n)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),s=Object.defineProperty,u=(e,t,n)=>((e,t,n)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),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 f={};function h(e){if(f[e])return f[e];var t=function(e){var t,n=null==globalThis||null==(t=globalThis.Zone)||null==t.__symbol__?void 0:t.__symbol__(e);return n&&globalThis[n]?globalThis[n]:void 0}(e)||globalThis[e],n=t.prototype,r=e in c?c[e]:void 0,i=Boolean(r&&r.every((e=>{var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(n,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))}))),o=e in d?d[e]:void 0,a=Boolean(o&&o.every((e=>{var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))})));if(i&&a)return f[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?f[e]=l:t.prototype}catch(e){return t.prototype}}var v={};function p(e,t,n){var r,i=e+"."+String(n);if(v[i])return v[i].call(t);var o=h(e),a=null==(r=Object.getOwnPropertyDescriptor(o,n))?void 0:r.get;return a?(v[i]=a,a.call(t)):t[n]}var m={};function g(e,t,n){var r=e+"."+String(n);if(m[r])return m[r].bind(t);var i=h(e)[n];return"function"!=typeof i?t[n]:(m[r]=i,i.bind(t))}var y={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 g("Node",e,"contains")(t)},getRootNode:function(e){return g("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 h("MutationObserver").constructor}};function b(e){return e.nodeType===e.ELEMENT_NODE}function C(e){var t=e&&"host"in e&&"mode"in e&&y.host(e)||null;return Boolean(t&&"shadowRoot"in t&&y.shadowRoot(t)===e)}function I(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function w(e){try{var t=e.rules||e.cssRules;if(!t)return null;var n=Array.from(t,(t=>k(t,e.href))).join("");return(r=n).includes(" background-clip: text;")&&!r.includes(" -webkit-background-clip: text;")&&(r=r.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),r}catch(e){return null}var r}function k(e,t){if(function(e){return"styleSheet"in e}(e)){var n;try{n=w(e.styleSheet)||function(e){var{cssText:t}=e;if(t.split('"').length<3)return t;var n=["@import","url("+JSON.stringify(e.href)+")"];return""===e.layerName?n.push("layer"):e.layerName&&n.push("layer("+e.layerName+")"),e.supportsText&&n.push("supports("+e.supportsText+")"),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}(e)}catch(t){n=e.cssText}return e.styleSheet.href?E(n,e.styleSheet.href):n}var r,i=e.cssText;return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(r=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,i=i.replace(r,"$1\\$2")),t?E(i,t):i}function S(e,t){return Array.from(e.styleSheets).find((e=>e.href===t))}let A=class{constructor(){u(this,"idNodeMap",new Map),u(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;var n=null==(t=this.getMeta(e))?void 0:t.id;return null!=n?n:-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 n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){var n=this.getNode(e);if(n){var r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function x(e){var{element:t,maskInputOptions:n,tagName:r,type:i,value:o,maskInputFn:a}=e,s=o||"",u=i&&T(i);return(n[r.toLowerCase()]||u&&n[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 R(e,t){var n,r;try{r=new URL(e,null!=t?t:window.location.href)}catch(e){return null}var i=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(n=null==i?void 0:i[1])&&void 0!==n?n:null}var _=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,F=/^(?:[a-z+]+:)?\/\//i,Z=/^www\..*/i,O=/^(data:)([^,]*),(.*)/i;function E(e,t){return(e||"").replace(_,((e,n,r,i,o,a)=>{var s,u=r||o||a,l=n||i||"";if(!u)return e;if(F.test(u)||Z.test(u))return"url("+l+u+l+")";if(O.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 f of(c.pop(),d))"."!==f&&(".."===f?c.pop():c.push(f));return"url("+l+c.join("/")+l+")"}))}var B,L,D=1,q=new RegExp("[^a-z0-9-_:]"),H=-2;function Y(){return D++}var V=/^[^ \t\n\r\u000c]+/,P=/^[, \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 n=G.get(e);if(n||(n=e.createElement("a"),G.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function z(e,t,n,r){return r?"src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?W(e,r):"background"!==n||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n?function(e,t){if(""===t.trim())return t;var n=0;function r(e){var r,i=e.exec(t.substring(n));return i?(r=i[0],n+=r.length,r):""}for(var i=[];r(P),!(n>=t.length);){var o=r(V);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(n);if(""===u){i.push((o+a).trim());break}if(s)")"===u&&(s=!1);else{if(","===u){n+=1,i.push((o+a).trim());break}"("===u&&(s=!0)}a+=u,n+=1}}}return i.join(", ")}(e,r):"style"===n?E(r,X(e)):"object"===t&&"data"===n?W(e,r):r:W(e,r):r}function K(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function J(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&J(y.parentNode(e),t,n);for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}return!!n&&J(y.parentNode(e),t,n)}function U(e,t,n,r){var i;if(b(e)){if(i=e,!y.childNodes(i).length)return!1}else{if(null===y.parentElement(e))return!1;i=y.parentElement(e)}try{if("string"==typeof t){if(r){if(i.closest("."+t))return!0}else if(i.classList.contains(t))return!0}else if(J(i,t,r))return!0;if(n)if(r){if(i.closest(n))return!0}else if(i.matches(n))return!0}catch(e){}return!1}function Q(e,t){var{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:a,inlineStylesheet:s,maskInputOptions:u={},maskTextFn:c,maskInputFn:d,dataURLOptions:f={},inlineImages:h,recordCanvas:v,keepIframeSrcFn:p,newlyAddedElement:m=!1}=t,g=function(e,t){if(!t.hasNode(e))return;var n=t.getId(e);return 1===n?void 0:n}(n,r);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:g};case e.ELEMENT_NODE:return function(e,t){for(var n,{doc:r,blockClass:i,blockSelector:o,inlineStylesheet:a,maskInputOptions:s={},maskInputFn:u,dataURLOptions:c={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:h,newlyAddedElement:v=!1,rootId:p}=t,m=function(e,t,n){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}if(n)return e.matches(n)}catch(e){}return!1}(e,i,o),g=function(e){if(e instanceof HTMLFormElement)return"form";var t=T(e.tagName);return q.test(t)?"div":t}(e),b={},C=e.attributes.length,I=0;I<C;I++){var k=e.attributes[I];K(g,k.name,k.value)||(b[k.name]=z(r,g,T(k.name),k.value))}if("link"===g&&a){var A=function(e){return null==e?void 0:e.href}(e);if(A){var R=S(r,A);if(!R&&A.includes(".css"))R=S(r,window.location.origin+"/"+A.replace(window.location.href,""));var _=null;R&&(_=w(R)),_&&(delete b.rel,delete b.href,b._cssText=_)}}if("style"===g&&e.sheet&&!(e.innerText||y.textContent(e)||"").trim().length){var F=w(e.sheet);F&&(b._cssText=F)}if("input"===g||"textarea"===g||"select"===g){var Z=e.value,O=e.checked;"radio"!==b.type&&"checkbox"!==b.type&&"submit"!==b.type&&"button"!==b.type&&Z?b.value=x({element:e,type:M(e),tagName:g,value:Z,maskInputOptions:s,maskInputFn:u}):O&&(b.checked=O)}"option"===g&&(e.selected&&!s.select?b.selected=!0:delete b.selected);if("dialog"===g&&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"===g&&f)if("2d"===e.__context)(function(e){var t=e.getContext("2d");if(!t)return!0;for(var n=0;n<e.width;n+=50)for(var r=0;r<e.height;r+=50){var i=t.getImageData,o=N in i?i[N]:i;if(new Uint32Array(o.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).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 E=e.toDataURL(c.type,c.quality),D=r.createElement("canvas");D.width=e.width,D.height=e.height,E!==D.toDataURL(c.type,c.quality)&&(b.rr_dataURL=E)}if("img"===g&&d){B||(B=r.createElement("canvas"),L=B.getContext("2d"));var H=e,Y=H.currentSrc||H.getAttribute("src")||"<unknown-src>",V=H.crossOrigin,P=()=>{H.removeEventListener("load",P);try{B.width=H.naturalWidth,B.height=H.naturalHeight,L.drawImage(H,0,0),b.rr_dataURL=B.toDataURL(c.type,c.quality)}catch(e){if("anonymous"!==H.crossOrigin)return H.crossOrigin="anonymous",void(H.complete&&0!==H.naturalWidth?P():H.addEventListener("load",P));console.warn("Cannot inline img src="+Y+"! Error: "+e)}"anonymous"===H.crossOrigin&&(V?b.crossOrigin=V:H.removeAttribute("crossorigin"))};H.complete&&0!==H.naturalWidth?P():H.addEventListener("load",P)}if("audio"===g||"video"===g){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"!==g||h(b.src)||(e.contentDocument||(b.rr_src=b.src),delete b.src);try{customElements.get(g)&&(n=!0)}catch(e){}return{type:l.Element,tagName:g,attributes:b,childNodes:[],isSVG:j(e)||void 0,needBlock:m,rootId:p,isCustom:n}}(e,{doc:n,blockClass:i,blockSelector:o,inlineStylesheet:s,maskInputOptions:u,maskInputFn:d,dataURLOptions:f,inlineImages:h,recordCanvas:v,keepIframeSrcFn:p,newlyAddedElement:m,rootId:g});case e.TEXT_NODE:return function(e,t){var n,{needsMask:r,maskTextFn:i,rootId:o}=t,a=y.parentNode(e),s=a&&a.tagName,u=y.textContent(e),c="STYLE"===s||void 0,d="SCRIPT"===s||void 0;if(c&&u){try{e.nextSibling||e.previousSibling||(null==(n=a.sheet)?void 0:n.cssRules)&&(u=w(a.sheet))}catch(t){console.warn("Cannot get CSS styles from text's parentNode. Error: "+t,e)}u=E(u,X(t.doc))}d&&(u="SCRIPT_PLACEHOLDER");!c&&!d&&u&&r&&(u=i?i(u,y.parentElement(e)):u.replace(/[\S]/g,"*"));return{type:l.Text,textContent:u||"",isStyle:c,rootId:o}}(e,{doc:n,needsMask:a,maskTextFn:c,rootId:g});case e.CDATA_SECTION_NODE:return{type:l.CDATA,textContent:"",rootId:g};case e.COMMENT_NODE:return{type:l.Comment,textContent:y.textContent(e)||"",rootId:g};default:return!1}}function $(e){return null==e?"":e.toLowerCase()}function ee(e,t){var{doc:n,mirror:r,blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:s,skipChild:u=!1,inlineStylesheet:c=!0,maskInputOptions:d={},maskTextFn:f,maskInputFn:h,slimDOMOptions:v,dataURLOptions:p={},inlineImages:m=!1,recordCanvas:g=!1,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:S=5e3,onStylesheetLoad:A,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:T=(()=>!1),newlyAddedElement:N=!1}=t,{needsMask:M}=t,{preserveWhiteSpace:_=!0}=t;M||(M=U(e,a,s,void 0===M));var F,Z=Q(e,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:M,inlineStylesheet:c,maskInputOptions:d,maskTextFn:f,maskInputFn:h,dataURLOptions:p,inlineImages:m,recordCanvas:g,keepIframeSrcFn:T,newlyAddedElement:N});if(!Z)return console.warn(e,"not serialized"),null;F=r.hasNode(e)?r.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"===R(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&($(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===$(e.attributes.name)||"icon"===$(e.attributes.rel)||"apple-touch-icon"===$(e.attributes.rel)||"shortcut icon"===$(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&$(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&($(e.attributes.property).match(/^(og|twitter|fb):/)||$(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===$(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===$(e.attributes.name)||"googlebot"===$(e.attributes.name)||"bingbot"===$(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===$(e.attributes.name)||"generator"===$(e.attributes.name)||"framework"===$(e.attributes.name)||"publisher"===$(e.attributes.name)||"progid"===$(e.attributes.name)||$(e.attributes.property).match(/^article:/)||$(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===$(e.attributes.name)||"yandex-verification"===$(e.attributes.name)||"csrf-token"===$(e.attributes.name)||"p:domain_verify"===$(e.attributes.name)||"verify-v1"===$(e.attributes.name)||"verification"===$(e.attributes.name)||"shopify-checkout-api-token"===$(e.attributes.name)))return!0}}return!1}(Z,v)&&(_||Z.type!==l.Text||Z.isStyle||Z.textContent.replace(/^\s+|\s+$/gm,"").length)?Y():H;var O=Object.assign(Z,{id:F});if(r.add(e,O),F===H)return null;w&&w(e);var E=!u;if(O.type===l.Element){E=E&&!O.needBlock,delete O.needBlock;var B=y.shadowRoot(e);B&&I(B)&&(O.isShadowHost=!0)}if((O.type===l.Document||O.type===l.Element)&&E){v.headWhitespace&&O.type===l.Element&&"head"===O.tagName&&(_=!1);var L={doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:M,maskTextClass:a,maskTextSelector:s,skipChild:u,inlineStylesheet:c,maskInputOptions:d,maskTextFn:f,maskInputFn:h,slimDOMOptions:v,dataURLOptions:p,inlineImages:m,recordCanvas:g,preserveWhiteSpace:_,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:S,onStylesheetLoad:A,stylesheetLoadTimeout:x,keepIframeSrcFn:T};if(O.type===l.Element&&"textarea"===O.tagName&&void 0!==O.attributes.value);else for(var D of Array.from(y.childNodes(e))){var q=ee(D,L);q&&O.childNodes.push(q)}var V=null;if(b(e)&&(V=y.shadowRoot(e)))for(var P of Array.from(y.childNodes(V))){var G=ee(P,L);G&&(I(V)&&(G.isShadow=!0),O.childNodes.push(G))}}var W=y.parentNode(e);return W&&C(W)&&I(W)&&(O.isShadow=!0),O.type===l.Element&&"iframe"===O.tagName&&function(e,t,n){var r=e.contentWindow;if(r){var i,o=!1;try{i=r.document.readyState}catch(e){return}if("complete"===i){var a="about:blank";if(r.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)}),n);e.addEventListener("load",(()=>{clearTimeout(s),o=!0,t()}))}}}(e,(()=>{var t=e.contentDocument;if(t&&k){var n=ee(t,{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:M,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:c,maskInputOptions:d,maskTextFn:f,maskInputFn:h,slimDOMOptions:v,dataURLOptions:p,inlineImages:m,recordCanvas:g,preserveWhiteSpace:_,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:S,onStylesheetLoad:A,stylesheetLoadTimeout:x,keepIframeSrcFn:T});n&&k(e,n)}}),S),O.type===l.Element&&"link"===O.tagName&&"string"==typeof O.attributes.rel&&("stylesheet"===O.attributes.rel||"preload"===O.attributes.rel&&"string"==typeof O.attributes.href&&"css"===R(O.attributes.href))&&function(e,t,n){var r,i=!1;try{r=e.sheet}catch(e){return}if(!r){var o=setTimeout((()=>{i||(t(),i=!0)}),n);e.addEventListener("load",(()=>{clearTimeout(o),i=!0,t()}))}}(e,(()=>{if(A){var t=ee(e,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:M,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:c,maskInputOptions:d,maskTextFn:f,maskInputFn:h,slimDOMOptions:v,dataURLOptions:p,inlineImages:m,recordCanvas:g,preserveWhiteSpace:_,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:S,onStylesheetLoad:A,stylesheetLoadTimeout:x,keepIframeSrcFn:T});t&&A(e,t)}}),x),O}let te=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:[]},re={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]};var ie={};function oe(e){if(ie[e])return ie[e];var t=function(e){var t,n=null==globalThis||null==(t=globalThis.Zone)||null==t.__symbol__?void 0:t.__symbol__(e);return n&&globalThis[n]?globalThis[n]:void 0}(e)||globalThis[e],n=t.prototype,r=e in ne?ne[e]:void 0,i=Boolean(r&&r.every((e=>{var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(n,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))}))),o=e in re?re[e]:void 0,a=Boolean(o&&o.every((e=>{var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))})));if(i&&a)return ie[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?ie[e]=l:n}catch(e){return n}}var ae={};function se(e,t,n){var r,i=e+"."+String(n);if(ae[i])return ae[i].call(t);var o=oe(e),a=null==(r=Object.getOwnPropertyDescriptor(o,n))?void 0:r.get;return a?(ae[i]=a,a.call(t)):t[n]}var ue={};function le(e,t,n){var r=e+"."+String(n);if(ue[r])return ue[r].bind(t);var i=oe(e)[n];return"function"!=typeof i?t[n]:(ue[r]=i,i.bind(t))}function ce(){return oe("MutationObserver").constructor}var de={childNodes:function(e){return se("Node",e,"childNodes")},parentNode:function(e){return se("Node",e,"parentNode")},parentElement:function(e){return se("Node",e,"parentElement")},textContent:function(e){return se("Node",e,"textContent")},contains:function(e,t){return le("Node",e,"contains")(t)},getRootNode:function(e){return le("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?se("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?se("Element",e,"shadowRoot"):null},querySelector:function(e,t){return se("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return se("Element",e,"querySelectorAll")(t)},mutationObserver:ce};function fe(e,t,n){void 0===n&&(n=document);var r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}var he="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.",ve={map:{},getId:()=>(console.error(he),-1),getNode:()=>(console.error(he),null),removeNodeFromMap(){console.error(he)},has:()=>(console.error(he),!1),reset(){console.error(he)}};function pe(e,t,n){void 0===n&&(n={});var r=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!==n.leading||(i=u);var l=t-(u-i),c=this;l<=0||l>t?(r&&(clearTimeout(r),r=null),i=u,e.apply(c,a)):r||!1===n.trailing||(r=setTimeout((()=>{i=!1===n.leading?0:Date.now(),r=null,e.apply(c,a)}),l))}}function me(e,t,n,r,i){void 0===i&&(i=window);var o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(e){setTimeout((()=>{n.set.call(this,e)}),0),o&&o.set&&o.set.call(this,e)}}),()=>me(e,t,o||{},!0)}function ge(e,t,n){try{if(!(t in e))return()=>{};var r=e[t],i=n(r);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch(e){return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(ve=new Proxy(ve,{get:(e,t,n)=>("map"===t&&console.error(he),Reflect.get(e,t,n))}));var ye=Date.now;function be(e){var t,n,r,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=de.parentElement(o.body))?void 0:t.scrollLeft)||(null==(n=null==o?void 0:o.body)?void 0:n.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==(r=de.parentElement(o.body))?void 0:r.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 we(e){return e?e.nodeType===e.ELEMENT_NODE?e:de.parentElement(e):null}function ke(e,t,n,r){if(!e)return!1;var i=we(e);if(!i)return!1;try{if("string"==typeof t){if(i.classList.contains(t))return!0;if(r&&null!==i.closest("."+t))return!0}else if(J(i,t,r))return!0}catch(e){}if(n){if(i.matches(n))return!0;if(r&&null!==i.closest(n))return!0}return!1}function Se(e,t,n){return!("TITLE"!==e.tagName||!n.headTitleMutations)||t.getId(e)===H}function Ae(e,t){if(C(e))return!1;var n=t.getId(e);if(!t.has(n))return!0;var r=de.parentNode(e);return(!r||r.nodeType!==e.DOCUMENT_NODE)&&(!r||Ae(r,t))}function xe(e){return Boolean(e.changedTouches)}function Te(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function Ne(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function Me(e){return!!e&&(e instanceof te&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(de.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(ye=()=>(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):(n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n);var n}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 _e(e){var t,n=null;return"getRootNode"in e&&(null==(t=de.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&de.host(de.getRootNode(e))&&(n=de.host(de.getRootNode(e))),n}function Fe(e){var t=e.ownerDocument;if(!t)return!1;var n=function(e){for(var t,n=e;t=_e(n);)n=t;return n}(e);return de.contains(t,n)}function Ze(e){var t=e.ownerDocument;return!!t&&(de.contains(t,e)||Fe(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||{}),Ee=(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))(Ee||{}),Be=(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))(Be||{}),Le=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Le||{}),De=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(De||{}),qe=(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))(qe||{});function He(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,n=0;n<e;n++)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&&He(e.previousSibling)){var n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&He(e.nextSibling)&&e.nextSibling.__ln.previous){var r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.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 Ve,Pe=(e,t)=>e+"@"+t;class Ge{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,n=new Ye,r=e=>{for(var t=e,n=H;n===H;)n=(t=t&&t.nextSibling)&&this.mirror.getId(t);return n},i=i=>{var o=de.parentNode(i);if(o&&Ze(i)&&"TEXTAREA"!==o.tagName){var a=C(o)?this.mirror.getId(_e(i)):this.mirror.getId(o),s=r(i);if(-1===a||-1===s)return n.addNode(i);var u=ee(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=>{Te(e,this.mirror)&&this.iframeManager.addIframe(e),Ne(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),Me(i)&&this.shadowDomManager.addShadowRoot(de.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)je(this.removes,o,this.mirror)&&!this.movedSet.has(de.parentNode(o))||i(o);for(var a of this.addedSet)Xe(this.droppedSet,a)||je(this.removes,a,this.mirror)?Xe(this.movedSet,a)?i(a):this.droppedSet.add(a):i(a);for(var s=null;n.length;){var u=null;if(s){var l=this.mirror.getId(de.parentNode(s.value)),c=r(s.value);-1!==l&&-1!==c&&(u=s)}if(!u)for(var d=n.tail;d;){var f=d;if(d=d.previous,f){var h=this.mirror.getId(de.parentNode(f.value));if(-1===r(f.value))continue;if(-1!==h){u=f;break}var v=f.value,p=de.parentNode(v);if(p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var m=de.host(p);if(-1!==this.mirror.getId(m)){u=f;break}}}}if(!u){for(;n.head;)n.removeNode(n.head.value);break}s=u.previous,n.removeNode(u.value),i(u.value)}var g={texts:this.texts.map((e=>{var t=e.node,n=de.parentNode(t);return n&&"TEXTAREA"===n.tagName&&this.genTextAreaValueMutation(n),{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 n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length<t.style.length&&(n+r).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};(g.texts.length||g.attributes.length||g.removes.length||g.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(g))}})),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(de.childNodes(e),(e=>de.textContent(e)||"")).join("")})),a(this,"processMutation",(e=>{if(!Se(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":var t=de.textContent(e.target);ke(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:U(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,we(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break;case"attributes":var n=e.target,r=e.attributeName,i=e.target.getAttribute(r);if("value"===r){var o=M(n);i=x({element:n,maskInputOptions:this.maskInputOptions,tagName:n.tagName,type:o,value:i,maskInputFn:this.maskInputFn})}if(ke(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;var a=this.attributeMap.get(e.target);if("IFRAME"===n.tagName&&"src"===r&&!this.keepIframeSrcFn(i)){if(n.contentDocument)return;r="rr_src"}if(a||(a={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(a),this.attributeMap.set(e.target,a)),"type"===r&&"INPUT"===n.tagName&&"password"===(e.oldValue||"").toLowerCase()&&n.setAttribute("data-rr-is-password","true"),!K(n.tagName,r))if(a.attributes[r]=z(this.doc,T(n.tagName),T(r),i),"style"===r){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(n.style))){var l=n.style.getPropertyValue(u),c=n.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))""===n.style.getPropertyValue(d)&&(a.styleDiff[d]=!1)}else"open"===r&&"DIALOG"===n.tagName&&(n.matches("dialog:modal")?a.attributes.rr_open_mode="modal":a.attributes.rr_open_mode="non-modal");break;case"childList":if(ke(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 n=this.mirror.getId(t),r=C(e.target)?this.mirror.getId(de.host(e.target)):this.mirror.getId(e.target);ke(e.target,this.blockClass,this.blockSelector,!1)||Se(t,this.mirror,this.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(We(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||Ae(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Pe(n,r)]?We(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:!(!C(e.target)||!I(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(Se(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);var n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&-1!==n&&(this.movedMap[Pe(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);ke(e,this.blockClass,this.blockSelector,!1)||(de.childNodes(e).forEach((e=>this.genAdds(e))),Me(e)&&de.childNodes(de.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 We(e,t){e.delete(t),de.childNodes(t).forEach((t=>We(e,t)))}function je(e,t,n){return 0!==e.length&&function(e,t,n){var r=de.parentNode(t),i=function(){var t=n.getId(r);if(e.some((e=>e.id===t)))return{v:!0};r=de.parentNode(r)};for(;r;){var o=i();if("object"==typeof o)return o.v}return!1}(e,t,n)}function Xe(e,t){return 0!==e.size&&ze(e,t)}function ze(e,t){var n=de.parentNode(t);return!!n&&(!!e.has(n)||ze(e,n))}var Ke=e=>{if(!Ve)return e;return function(){try{return e(...arguments)}catch(e){if(Ve&&!0===Ve(e))return;throw e}}},Je=[];function Ue(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 Qe(e,t){var n=new Ge;Je.push(n),n.init(e);var r=new(ce())(Ke(n.processMutations.bind(n)));return r.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function $e(e){var{mouseInteractionCb:t,doc:r,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(Be).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==u[e])).forEach((e=>{var s=T(e),u=(e=>r=>{var s=Ue(r);if(!ke(s,o,a,!0)){var u=null,l=e;if("pointerType"in r){switch(r.pointerType){case"mouse":u=Le.Mouse;break;case"touch":u=Le.Touch;break;case"pen":u=Le.Pen}u===Le.Touch?Be[e]===Be.MouseDown?l="TouchStart":Be[e]===Be.MouseUp&&(l="TouchEnd"):Le.Pen}else xe(r)&&(u=Le.Touch);null!==u?(c=u,(l.startsWith("Touch")&&u===Le.Touch||l.startsWith("Mouse")&&u===Le.Mouse)&&(u=null)):Be[e]===Be.Click&&(u=c,c=null);var d=xe(r)?r.changedTouches[0]:r;if(d){var f=i.getId(s),{clientX:h,clientY:v}=d;Ke(t)(n({type:Be[l],id:f,x:h,y:v},null!==u&&{pointerType:u}))}}})(e);if(window.PointerEvent)switch(Be[e]){case Be.MouseDown:case Be.MouseUp:s=s.replace("mouse","pointer");break;case Be.TouchStart:case Be.TouchEnd:return}l.push(fe(s,u,r))})),Ke((()=>{l.forEach((e=>e()))}))}function et(e){var{scrollCb:t,doc:n,mirror:r,blockClass:i,blockSelector:o,sampling:a}=e;return fe("scroll",Ke(pe(Ke((e=>{var a=Ue(e);if(a&&!ke(a,i,o,!0)){var s=r.getId(a);if(a===n&&n.defaultView){var u=be(n.defaultView);t({id:s,x:u.left,y:u.top})}else t({id:s,x:a.scrollLeft,y:a.scrollTop})}})),a.scroll||100)),n)}var tt=["INPUT","TEXTAREA","SELECT"],nt=new WeakMap;function rt(e){return function(e,t){if(st("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||st("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||st("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||st("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){var n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){var r=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(r)}return t}(e,[])}function it(e,t,n){var r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function ot(e,t){var n,r,i,{mirror:o,stylesheetManager:a}=e,s=null;s="#document"===t.nodeName?o.getId(t):o.getId(de.host(t));var u="#document"===t.nodeName?null==(n=t.defaultView)?void 0:n.Document:null==(i=null==(r=t.ownerDocument)?void 0:r.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,n=null==(t=l.set)?void 0:t.call(this,e);if(null!==s&&-1!==s)try{a.adoptStyleSheets(e,s)}catch(e){}return n}}),Ke((()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))):()=>{}}function at(e,t){void 0===t&&(t={});var r,i=e.doc.defaultView;if(!i)return()=>{};!function(e,t){var{mutationCb:n,mousemoveCb:r,mouseInteractionCb:i,scrollCb:o,viewportResizeCb:a,inputCb:s,mediaInteractionCb:u,styleSheetRuleCb:l,styleDeclarationCb:c,canvasMutationCb:d,fontCb:f,selectionCb:h,customElementCb:v}=e;e.mutationCb=function(){t.mutation&&t.mutation(...arguments),n(...arguments)},e.mousemoveCb=function(){t.mousemove&&t.mousemove(...arguments),r(...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),f(...arguments)},e.selectionCb=function(){t.selection&&t.selection(...arguments),h(...arguments)},e.customElementCb=function(){t.customElement&&t.customElement(...arguments),v(...arguments)}}(e,t),e.recordDOM&&(r=Qe(e,e.doc));var o=function(e){var{mousemoveCb:t,sampling:n,doc:r,mirror:i}=e;if(!1===n.mousemove)return()=>{};var o,a="number"==typeof n.mousemove?n.mousemove:50,s="number"==typeof n.mousemoveCallback?n.mousemoveCallback:500,u=[],l=pe(Ke((e=>{var n=Date.now()-o;t(u.map((e=>(e.timeOffset-=n,e))),e),u=[],o=null})),s),c=Ke(pe(Ke((e=>{var t=Ue(e),{clientX:n,clientY:r}=xe(e)?e.changedTouches[0]:e;o||(o=ye()),u.push({x:n,y:r,id:i.getId(t),timeOffset:ye()-o}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?Ee.Drag:e instanceof MouseEvent?Ee.MouseMove:Ee.TouchMove)})),a,{trailing:!1})),d=[fe("mousemove",c,r),fe("touchmove",c,r),fe("drag",c,r)];return Ke((()=>{d.forEach((e=>e()))}))}(e),a=$e(e),s=et(e),u=function(e,t){var{viewportResizeCb:n}=e,{win:r}=t,i=-1,o=-1;return fe("resize",Ke(pe(Ke((()=>{var e=Ce(),t=Ie();i===e&&o===t||(n({width:Number(t),height:Number(e)}),i=e,o=t)})),200)),r)}(e,{win:i}),l=function(e){var{inputCb:t,doc:r,mirror:i,blockClass:o,blockSelector:a,ignoreClass:s,ignoreSelector:u,maskInputOptions:l,maskInputFn:c,sampling:d,userTriggeredOnInput:f}=e;function h(e){var t=Ue(e),n=e.isTrusted,i=t&&t.tagName;if(t&&"OPTION"===i&&(t=de.parentElement(t)),t&&i&&!(tt.indexOf(i)<0)&&!ke(t,o,a,!0)&&!(t.classList.contains(s)||u&&t.matches(u))){var d=t.value,h=!1,p=M(t)||"";"radio"===p||"checkbox"===p?h=t.checked:(l[i.toLowerCase()]||l[p])&&(d=x({element:t,maskInputOptions:l,tagName:i,type:p,value:d,maskInputFn:c})),v(t,f?{text:d,isChecked:h,userTriggered:n}:{text:d,isChecked:h});var m=t.name;"radio"===p&&m&&h&&r.querySelectorAll('input[type="radio"][name="'+m+'"]').forEach((e=>{if(e!==t){var n=e.value;v(e,f?{text:n,isChecked:!h,userTriggered:!1}:{text:n,isChecked:!h})}}))}}function v(e,r){var o=nt.get(e);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){nt.set(e,r);var a=i.getId(e);Ke(t)(n({},r,{id:a}))}}var p=("last"===d.input?["change"]:["input","change"]).map((e=>fe(e,Ke(h),r))),m=r.defaultView;if(!m)return()=>{p.forEach((e=>e()))};var g=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),y=[[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 g&&g.set&&p.push(...y.map((e=>me(e[0],e[1],{set(){Ke(h)({target:this,isTrusted:!1})}},!1,m)))),Ke((()=>{p.forEach((e=>e()))}))}(e),c=function(e){var{mediaInteractionCb:t,blockClass:n,blockSelector:r,mirror:i,sampling:o,doc:a}=e,s=Ke((e=>pe(Ke((o=>{var a=Ue(o);if(a&&!ke(a,n,r,!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(qe.Play),a),fe("pause",s(qe.Pause),a),fe("seeked",s(qe.Seeked),a),fe("volumechange",s(qe.VolumeChange),a),fe("ratechange",s(qe.RateChange),a)];return Ke((()=>{u.forEach((e=>e()))}))}(e),d=()=>{},f=()=>{},h=()=>{},v=()=>{};e.recordDOM&&(d=function(e,t){var{styleSheetRuleCb:n,mirror:r,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:Ke(((e,t,o)=>{var[a,s]=o,{id:u,styleId:l}=it(t,r,i.styleMirror);return(u&&-1!==u||l&&-1!==l)&&n({id:u,styleId:l,adds:[{rule:a,index:s}]}),e.apply(t,o)}))}),o.CSSStyleSheet.prototype.addRule=function(e,t,n){void 0===n&&(n=this.cssRules.length);var r=e+" { "+t+" }";return o.CSSStyleSheet.prototype.insertRule.apply(this,[r,n])};var s,u,l=o.CSSStyleSheet.prototype.deleteRule;o.CSSStyleSheet.prototype.deleteRule=new Proxy(l,{apply:Ke(((e,t,o)=>{var[a]=o,{id:s,styleId:u}=it(t,r,i.styleMirror);return(s&&-1!==s||u&&-1!==u)&&n({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:Ke(((e,t,o)=>{var[a]=o,{id:s,styleId:u}=it(t,r,i.styleMirror);return(s&&-1!==s||u&&-1!==u)&&n({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:Ke(((e,t,o)=>{var[a]=o,{id:s,styleId:u}=it(t,r,i.styleMirror);return(s&&-1!==s||u&&-1!==u)&&n({id:s,styleId:u,replaceSync:a}),e.apply(t,o)}))}));var c={};ut("CSSGroupingRule")?c.CSSGroupingRule=o.CSSGroupingRule:(ut("CSSMediaRule")&&(c.CSSMediaRule=o.CSSMediaRule),ut("CSSConditionRule")&&(c.CSSConditionRule=o.CSSConditionRule),ut("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:Ke(((e,t,o)=>{var[a,s]=o,{id:u,styleId:l}=it(t.parentStyleSheet,r,i.styleMirror);return(u&&-1!==u||l&&-1!==l)&&n({id:u,styleId:l,adds:[{rule:a,index:[...rt(t),s||0]}]}),e.apply(t,o)}))}),o.prototype.deleteRule=new Proxy(d[t].deleteRule,{apply:Ke(((e,t,o)=>{var[a]=o,{id:s,styleId:u}=it(t.parentStyleSheet,r,i.styleMirror);return(s&&-1!==s||u&&-1!==u)&&n({id:s,styleId:u,removes:[{index:[...rt(t),a]}]}),e.apply(t,o)}))})})),Ke((()=>{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,n]=e;n.prototype.insertRule=d[t].insertRule,n.prototype.deleteRule=d[t].deleteRule}))}))}(e,{win:i}),f=ot(e,e.doc),h=function(e,t){var{styleDeclarationCb:n,mirror:r,ignoreCSSAttributes:i,stylesheetManager:o}=e,{win:a}=t,s=a.CSSStyleDeclaration.prototype.setProperty;a.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:Ke(((e,t,a)=>{var u,[l,c,d]=a;if(i.has(l))return s.apply(t,[l,c,d]);var{id:f,styleId:h}=it(null==(u=t.parentRule)?void 0:u.parentStyleSheet,r,o.styleMirror);return(f&&-1!==f||h&&-1!==h)&&n({id:f,styleId:h,set:{property:l,value:c,priority:d},index:rt(t.parentRule)}),e.apply(t,a)}))});var u=a.CSSStyleDeclaration.prototype.removeProperty;return a.CSSStyleDeclaration.prototype.removeProperty=new Proxy(u,{apply:Ke(((e,t,a)=>{var s,[l]=a;if(i.has(l))return u.apply(t,[l]);var{id:c,styleId:d}=it(null==(s=t.parentRule)?void 0:s.parentStyleSheet,r,o.styleMirror);return(c&&-1!==c||d&&-1!==d)&&n({id:c,styleId:d,remove:{property:l},index:rt(t.parentRule)}),e.apply(t,a)}))}),Ke((()=>{a.CSSStyleDeclaration.prototype.setProperty=s,a.CSSStyleDeclaration.prototype.removeProperty=u}))}(e,{win:i}),e.collectFonts&&(v=function(e){var{fontCb:t,doc:n}=e,r=n.defaultView;if(!r)return()=>{};var i=[],o=new WeakMap,a=r.FontFace;r.FontFace=function(e,t,n){var r=new a(e,t,n);return o.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};var s=ge(n.fonts,"add",(function(e){return function(n){return setTimeout(Ke((()=>{var e=o.get(n);e&&(t(e),o.delete(n))})),0),e.apply(this,[n])}}));return i.push((()=>{r.FontFace=a})),i.push(s),Ke((()=>{i.forEach((e=>e()))}))}(e)));var p=function(e){var{doc:t,mirror:n,blockClass:r,blockSelector:i,selectionCb:o}=e,a=!0,s=Ke((()=>{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:f,endContainer:h,endOffset:v}=c;ke(d,r,i,!0)||ke(h,r,i,!0)||s.push({start:n.getId(d),startOffset:f,end:n.getId(h),endOffset:v})}o({ranges:s})}}));return s(),fe("selectionchange",s)}(e),m=function(e){var{doc:t,customElementCb:n}=e,r=t.defaultView;return r&&r.customElements?ge(r.customElements,"define",(function(e){return function(t,r,i){try{n({define:{name:t}})}catch(e){console.warn("Custom element callback failed for "+t)}return e.apply(this,[t,r,i])}})):()=>{}}(e),g=[];for(var y of e.plugins)g.push(y.observer(y.callback,i,y.options));return Ke((()=>{Je.forEach((e=>e.reset())),null==r||r.disconnect(),o(),a(),s(),u(),l(),c(),d(),f(),h(),v(),p(),m(),g.forEach((e=>e()))}))}function st(e){return void 0!==window[e]}function ut(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class lt{constructor(e){a(this,"iframeIdToRemoteIdMap",new WeakMap),a(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,n,r){var i=n||this.getIdToRemoteIdMap(e),o=r||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 n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map((t=>this.getId(e,t,n,r)))}getRemoteId(e,t,n){var r=n||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;var i=r.get(t);return i||-1}getRemoteIds(e,t){var n=this.getRemoteIdToIdMap(e);return t.map((t=>this.getRemoteId(e,t,n)))}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 ct{constructor(e){a(this,"iframes",new WeakMap),a(this,"crossOriginIframeMap",new WeakMap),a(this,"crossOriginIframeMirror",new lt(Y)),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 lt(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 n,r;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(n=e.contentWindow)||n.addEventListener("message",this.handleMessage.bind(this))),null==(r=this.loadListener)||r.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 n=this.crossOriginIframeMap.get(e.source);if(n){var r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}}}transformCrossOriginEvent(e,t){var n;switch(t.type){case Oe.FullSnapshot:this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);var r=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,r),this.patchRootIdOnNode(t.data.node,r),{timestamp:t.timestamp,type:Oe.IncrementalSnapshot,data:{source:Ee.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 Ee.Mutation:return t.data.adds.forEach((t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);var n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(t.node,n)})),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 Ee.Drag:case Ee.TouchMove:case Ee.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case Ee.ViewportResize:return!1;case Ee.MediaInteraction:case Ee.MouseInteraction:case Ee.Scroll:case Ee.CanvasMutation:case Ee.Input:return this.replaceIds(t.data,e,["id"]),t;case Ee.StyleSheetRule:case Ee.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case Ee.Font:return t;case Ee.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case Ee.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(n=t.data.styles)||n.forEach((t=>{this.replaceStyleIds(t,e,["styleId"])})),t}}return!1}replace(e,t,n,r){for(var i of r)(Array.isArray(t[i])||"number"==typeof t[i])&&(Array.isArray(t[i])?t[i]=e.getIds(n,t[i]):t[i]=e.getId(n,t[i]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}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 dt{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(I(e)&&!this.shadowDoms.has(e)){this.shadowDoms.add(e);var r=Qe(n({},this.bypassOptions,{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push((()=>r.disconnect())),this.restoreHandlers.push(et(n({},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(de.host(e))),this.restoreHandlers.push(ot({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 n=this;this.restoreHandlers.push(ge(e.prototype,"attachShadow",(function(e){return function(r){var i=e.call(this,r),o=de.shadowRoot(this);return o&&Ze(this)&&n.addShadowRoot(o,t),i}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch(e){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var ft="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ht="undefined"==typeof Uint8Array?[]:new Uint8Array(256),vt=0;vt<64;vt++)ht[ft.charCodeAt(vt)]=vt;var pt=new Map;var mt=(e,t,n)=>{if(e&&(bt(e,t)||"object"==typeof e)){var r=function(e,t){var n=pt.get(e);return n||(n=new Map,pt.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name),i=r.indexOf(e);return-1===i&&(i=r.length,r.push(e)),i}};function gt(e,t,n){if(e instanceof Array)return e.map((e=>gt(e,t,n)));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,n=new Uint8Array(e),r=n.length,i="";for(t=0;t<r;t+=3)i+=ft[n[t]>>2],i+=ft[(3&n[t])<<4|n[t+1]>>4],i+=ft[(15&n[t+1])<<2|n[t+2]>>6],i+=ft[63&n[t+2]];return r%3==2?i=i.substring(0,i.length-1)+"=":r%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,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){var r=e.constructor.name,{src:i}=e;return{rr_type:r,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,n),e.width,e.height]}:bt(e,t)||"object"==typeof e?{rr_type:e.constructor.name,index:mt(e,t,n)}:e}var yt=(e,t,n)=>e.map((e=>gt(e,t,n))),bt=(e,t)=>{var n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((e=>"function"==typeof t[e]));return Boolean(n.find((n=>e instanceof t[n])))};function Ct(e,t,n,r){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(!ke(this,t,n,!0)){var u=function(e){return"experimental-webgl"===e?"webgl":e}(i);if("__context"in this||(this.__context=u),r&&["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,n,r,i,o){var a=[],s=Object.getOwnPropertyNames(e),u=function(s){if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(s))return"continue";try{if("function"!=typeof e[s])return"continue";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(mt(c,o,this),"tagName"in this.canvas&&!ke(this.canvas,r,i,!0)){var d=yt(u,o,this),f={type:t,property:s,args:d};n(this.canvas,f)}return c}}));a.push(u)}catch(r){var l=me(e,s,{set(e){n(this.canvas,{type:t,property:s,args:[e],setter:!0})}});a.push(l)}};for(var l of s)u(l);return a}var wt,kt,St,At,xt="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Tt="undefined"!=typeof window&&window.Blob&&new Blob([(wt=xt,Uint8Array.from(atob(wt),(e=>e.charCodeAt(0))))],{type:"text/javascript;charset=utf-8"});function Nt(e){var t;try{if(!(t=Tt&&(window.URL||window.webkitURL).createObjectURL(Tt)))throw"";var n=new Worker(t,{name:null==e?void 0:e.name});return n.addEventListener("error",(()=>{(window.URL||window.webkitURL).revokeObjectURL(t)})),n}catch(t){return new Worker("data:text/javascript;base64,"+xt,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class Mt{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:n,blockClass:r,blockSelector:i,recordCanvas:o,dataURLOptions:s}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&"all"===t&&this.initCanvasMutationObserver(n,r,i),o&&"number"==typeof t&&this.initCanvasFPSObserver(t,n,r,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,n,r,i,o){var a=this,s=Ct(n,r,i,!0),u=new Map,l=new Nt;l.onmessage=e=>{var{id:t}=e.data;if(u.set(t,!1),"base64"in e.data){var{base64:n,type:r,width:i,height:o}=e.data;this.mutationCb({id:t,type:De["2D"],commands:[{property:"clearRect",args:[0,0,i,o]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:n}],type:r}]},0,0]}]})}};var c,d=1e3/e,f=0,h=e=>{var s,v;f&&e-f<d?c=requestAnimationFrame(h):(f=e,(s=[],v=e=>{e.querySelectorAll("canvas").forEach((e=>{ke(e,r,i,!0)||s.push(e)})),e.querySelectorAll("*").forEach((e=>{e.shadowRoot&&v(e.shadowRoot)}))},v(n.document),s).forEach(function(){var e=t((function*(e){var t,n=a.mirror.getId(e);if(!u.get(n)&&0!==e.width&&0!==e.height){if(u.set(n,!0),["webgl","webgl2"].includes(e.__context)){var r=e.getContext(e.__context);!1===(null==(t=null==r?void 0:r.getContextAttributes())?void 0:t.preserveDrawingBuffer)&&r.clear(r.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:n,bitmap:c,width:i,height:s,dataURLOptions:o.dataURLOptions},[c])}}));return function(t){return e.apply(this,arguments)}}()),c=requestAnimationFrame(h))};c=requestAnimationFrame(h),this.resetObservers=()=>{s(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var r=Ct(e,t,n,!1),i=function(e,t,n,r){var i=[],o=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype),a=function(o){try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[o])return"continue";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 ke(this.canvas,n,r,!0)||setTimeout((()=>{var n=yt(s,t,this);e(this.canvas,{type:De["2D"],property:o,args:n})}),0),i.apply(this,s)}}));i.push(a)}catch(n){var s=me(t.CanvasRenderingContext2D.prototype,o,{set(t){e(this.canvas,{type:De["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,n),o=function(e,t,n,r){var i=[];return i.push(...It(t.WebGLRenderingContext.prototype,De.WebGL,e,n,r,t)),void 0!==t.WebGL2RenderingContext&&i.push(...It(t.WebGL2RenderingContext.prototype,De.WebGL2,e,n,r,t)),()=>{i.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,n);this.resetObservers=()=>{r(),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 n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n)})),requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(e,t){if(!this.frozen&&!this.locked){var n=this.pendingCanvasMutations.get(e);if(n&&-1!==t){var r=n.map((e=>{var t=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,i);return t})),{type:o}=n[0];this.mutationCb({id:t,type:o,commands:r}),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 n=this;if(0!==e.length){var r={id:t,styleIds:[]},i=[],o=function(e){var t=void 0;n.styleMirror.has(e)?t=n.styleMirror.getId(e):(t=n.styleMirror.add(e),i.push({styleId:t,rules:Array.from(e.rules||CSSRule,((t,n)=>({rule:k(t,e.href),index:n})))})),r.styleIds.push(t)};for(var a of e)o(a);i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class _t{constructor(){a(this,"nodeMap",new WeakMap),a(this,"active",!1)}inOtherBuffer(e,t){var n=this.nodeMap.get(e);return n&&Array.from(n).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 Ft=!1;try{if(2!==Array.from([1],(e=>2*e))[0]){var Zt=document.createElement("iframe");document.body.appendChild(Zt),Array.from=(null==(r=Zt.contentWindow)?void 0:r.Array.from)||Array.from,document.body.removeChild(Zt)}}catch(e){console.debug("Unable to override Array.from",e)}var Ot,Et,Bt=new A;function Lt(e){void 0===e&&(e={});var{emit:t,checkoutEveryNms:r,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:f,maskInputOptions:h,slimDOMOptions:v,maskInputFn:p,maskTextFn:m,hooks:g,packFn:y,sampling:b={},dataURLOptions:C={},mousemoveWait:I,recordDOM:w=!0,recordCanvas:k=!1,recordCrossOriginIframes:S=!1,recordAfter:x=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:T=!1,collectFonts:N=!1,inlineImages:M=!1,plugins:R,keepIframeSrcFn:_=(()=>!1),ignoreCSSAttributes:F=new Set([]),errorHandler:Z}=e;Ve=Z;var O=!S||window.parent===window,E=!1;if(!O)try{window.parent.document&&(E=!1)}catch(e){E=!0}if(O&&!t)throw new Error("emit function is required");if(!O&&!E)return()=>{};void 0!==I&&void 0===b.mousemove&&(b.mousemove=I),Bt.reset();var B,L=!0===f?{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!==h?h:{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,H=e=>{for(var t of R||[])t.eventProcessor&&(e=t.eventProcessor(e));return y&&!E&&(e=y(e)),e};kt=(e,n)=>{var o,a=e;if(a.timestamp=ye(),!(null==(o=Je[0])?void 0:o.isFrozen())||a.type===Oe.FullSnapshot||a.type===Oe.IncrementalSnapshot&&a.data.source===Ee.Mutation||Je.forEach((e=>e.unfreeze())),O)null==t||t(H(a),n);else if(E){var s={type:"rrweb",event:H(a),origin:window.location.origin,isCheckout:n};window.parent.postMessage(s,"*")}if(a.type===Oe.FullSnapshot)B=a,q=0;else if(a.type===Oe.IncrementalSnapshot){if(a.data.source===Ee.Mutation&&a.data.isAttachIframe)return;q++;var u=i&&q>=i,l=r&&a.timestamp-B.timestamp>r;(u||l)&&St(!0)}};var Y=e=>{kt({type:Oe.IncrementalSnapshot,data:n({source:Ee.Mutation},e)})},V=e=>kt({type:Oe.IncrementalSnapshot,data:n({source:Ee.Scroll},e)}),P=e=>kt({type:Oe.IncrementalSnapshot,data:n({source:Ee.CanvasMutation},e)}),G=new Rt({mutationCb:Y,adoptedStyleSheetCb:e=>kt({type:Oe.IncrementalSnapshot,data:n({source:Ee.AdoptedStyleSheet},e)})}),W=new ct({mirror:Bt,mutationCb:Y,stylesheetManager:G,recordCrossOriginIframes:S,wrappedEmit:kt});for(var j of R||[])j.getMirror&&j.getMirror({nodeMirror:Bt,crossOriginIframeMirror:W.crossOriginIframeMirror,crossOriginIframeStyleMirror:W.crossOriginIframeStyleMirror});var X=new _t;At=new Mt({recordCanvas:k,mutationCb:P,win:window,blockClass:o,blockSelector:a,mirror:Bt,sampling:b.canvas,dataURLOptions:C});var z=new dt({mutationCb:Y,scrollCb:V,bypassOptions:{blockClass:o,blockSelector:a,maskTextClass:l,maskTextSelector:c,inlineStylesheet:d,maskInputOptions:L,dataURLOptions:C,maskTextFn:m,maskInputFn:p,recordCanvas:k,inlineImages:M,sampling:b,slimDOMOptions:D,iframeManager:W,stylesheetManager:G,canvasManager:At,keepIframeSrcFn:_,processedNodeManager:X},mirror:Bt});St=function(e){if(void 0===e&&(e=!1),w){kt({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:n=new A,blockClass:r="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:f,slimDOM:h=!1,dataURLOptions:v,preserveWhiteSpace:p,onSerialize:m,onIframeLoad:g,iframeLoadTimeout:y,onStylesheetLoad:b,stylesheetLoadTimeout:C,keepIframeSrcFn:I=(()=>!1)}=t||{};return ee(e,{doc:e,mirror:n,blockClass:r,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:f,slimDOMOptions:!0===h||"all"===h?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===h,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===h?{}:h,dataURLOptions:v,inlineImages:u,recordCanvas:l,preserveWhiteSpace:p,onSerialize:m,onIframeLoad:g,iframeLoadTimeout:y,onStylesheetLoad:b,stylesheetLoadTimeout:C,keepIframeSrcFn:I,newlyAddedElement:!1})}(document,{mirror:Bt,blockClass:o,blockSelector:a,maskTextClass:l,maskTextSelector:c,inlineStylesheet:d,maskAllInputs:L,maskTextFn:m,maskInputFn:p,slimDOM:D,dataURLOptions:C,recordCanvas:k,inlineImages:M,onSerialize:e=>{Te(e,Bt)&&W.addIframe(e),Ne(e,Bt)&&G.trackLinkElement(e),Me(e)&&z.addShadowRoot(de.shadowRoot(e),document)},onIframeLoad:(e,t)=>{W.attachIframe(e,t),z.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{G.attachLinkElement(e,t)},keepIframeSrcFn:_});if(!t)return console.warn("Failed to snapshot the document");kt({type:Oe.FullSnapshot,data:{node:t,initialOffset:be(window)}},e),Je.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&G.adoptStyleSheets(document.adoptedStyleSheets,Bt.getId(document))}};try{var K=[],J=e=>{var t;return Ke(at)({mutationCb:Y,mousemoveCb:(e,t)=>kt({type:Oe.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>kt({type:Oe.IncrementalSnapshot,data:n({source:Ee.MouseInteraction},e)}),scrollCb:V,viewportResizeCb:e=>kt({type:Oe.IncrementalSnapshot,data:n({source:Ee.ViewportResize},e)}),inputCb:e=>kt({type:Oe.IncrementalSnapshot,data:n({source:Ee.Input},e)}),mediaInteractionCb:e=>kt({type:Oe.IncrementalSnapshot,data:n({source:Ee.MediaInteraction},e)}),styleSheetRuleCb:e=>kt({type:Oe.IncrementalSnapshot,data:n({source:Ee.StyleSheetRule},e)}),styleDeclarationCb:e=>kt({type:Oe.IncrementalSnapshot,data:n({source:Ee.StyleDeclaration},e)}),canvasMutationCb:P,fontCb:e=>kt({type:Oe.IncrementalSnapshot,data:n({source:Ee.Font},e)}),selectionCb:e=>{kt({type:Oe.IncrementalSnapshot,data:n({source:Ee.Selection},e)})},customElementCb:e=>{kt({type:Oe.IncrementalSnapshot,data:n({source:Ee.CustomElement},e)})},blockClass:o,ignoreClass:s,ignoreSelector:u,maskTextClass:l,maskTextSelector:c,maskInputOptions:L,inlineStylesheet:d,sampling:b,recordDOM:w,recordCanvas:k,inlineImages:M,userTriggeredOnInput:T,collectFonts:N,doc:e,maskInputFn:p,maskTextFn:m,keepIframeSrcFn:_,blockSelector:a,slimDOMOptions:D,dataURLOptions:C,mirror:Bt,iframeManager:W,stylesheetManager:G,shadowDomManager:z,processedNodeManager:X,canvasManager:At,ignoreCSSAttributes:F,plugins:(null==(t=null==R?void 0:R.filter((e=>e.observer)))?void 0:t.map((e=>({observer:e.observer,options:e.options,callback:t=>kt({type:Oe.Plugin,data:{plugin:e.name,payload:t}})}))))||[]},g)};W.addLoadListener((e=>{try{K.push(J(e.contentDocument))}catch(e){console.warn(e)}}));var U=()=>{St(),K.push(J(document)),Ft=!0};return"interactive"===document.readyState||"complete"===document.readyState?U():(K.push(fe("DOMContentLoaded",(()=>{kt({type:Oe.DomContentLoaded,data:{}}),"DOMContentLoaded"===x&&U()}))),K.push(fe("load",(()=>{kt({type:Oe.Load,data:{}}),"load"===x&&U()}),window))),()=>{K.forEach((e=>e())),X.destroy(),Ft=!1,Ve=void 0}}catch(e){console.warn(e)}}Lt.addCustomEvent=(e,t)=>{if(!Ft)throw new Error("please add custom event after start recording");kt({type:Oe.Custom,data:{tag:e,payload:t}})},Lt.freezePage=()=>{Je.forEach((e=>e.freeze()))},Lt.takeFullSnapshot=e=>{if(!Ft)throw new Error("please take full snapshot after start recording");St(e)},Lt.mirror=Bt,(Et=Ot||(Ot={}))[Et.NotStarted=0]="NotStarted",Et[Et.Running=1]="Running",Et[Et.Stopped=2]="Stopped";var Dt,qt=Object.defineProperty,Ht=(e,t,n)=>((e,t,n)=>t in e?qt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),Yt=Object.defineProperty,Vt=(e,t,n)=>((e,t,n)=>t in e?Yt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),Pt=Object.defineProperty,Gt=(e,t,n)=>((e,t,n)=>t in e?Pt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),Wt={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},jt={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Xt={};function zt(e){if(Xt[e])return Xt[e];var t=globalThis[e],n=t.prototype,r=e in Wt?Wt[e]:void 0,i=Boolean(r&&r.every((e=>{var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(n,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))}))),o=e in jt?jt[e]:void 0,a=Boolean(o&&o.every((e=>{var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))})));if(i&&a)return Xt[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?Xt[e]=l:n}catch(e){return n}}var Kt={};function Jt(e,t,n){var r,i=e+"."+String(n);if(Kt[i])return Kt[i].call(t);var o=zt(e),a=null==(r=Object.getOwnPropertyDescriptor(o,n))?void 0:r.get;return a?(Kt[i]=a,a.call(t)):t[n]}var Ut={};function Qt(e,t,n){var r=e+"."+String(n);if(Ut[r])return Ut[r].bind(t);var i=zt(e)[n];return"function"!=typeof i?t[n]:(Ut[r]=i,i.bind(t))}var $t={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 Qt("Node",e,"contains")(t)},getRootNode:function(e){return Qt("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 zt("MutationObserver").constructor}};class en{constructor(){Gt(this,"idNodeMap",new Map),Gt(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;var n=null==(t=this.getMeta(e))?void 0:t.id;return null!=n?n:-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 n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){var n=this.getNode(e);if(n){var r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function tn(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&tn($t.parentNode(e),t,n);for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}return!!n&&tn($t.parentNode(e),t,n)}class nn{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 nn))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 rn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},on={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},an={};function sn(e){if(an[e])return an[e];var t=globalThis[e],n=t.prototype,r=e in rn?rn[e]:void 0,i=Boolean(r&&r.every((e=>{var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(n,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))}))),o=e in on?on[e]:void 0,a=Boolean(o&&o.every((e=>{var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))})));if(i&&a)return an[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?an[e]=l:n}catch(e){return n}}var un={};function ln(e,t,n){var r,i=e+"."+String(n);if(un[i])return un[i].call(t);var o=sn(e),a=null==(r=Object.getOwnPropertyDescriptor(o,n))?void 0:r.get;return a?(un[i]=a,a.call(t)):t[n]}var cn={};function dn(e,t,n){var r=e+"."+String(n);if(cn[r])return cn[r].bind(t);var i=sn(e)[n];return"function"!=typeof i?t[n]:(cn[r]=i,i.bind(t))}var fn={childNodes:function(e){return ln("Node",e,"childNodes")},parentNode:function(e){return ln("Node",e,"parentNode")},parentElement:function(e){return ln("Node",e,"parentElement")},textContent:function(e){return ln("Node",e,"textContent")},contains:function(e,t){return dn("Node",e,"contains")(t)},getRootNode:function(e){return dn("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?ln("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?ln("Element",e,"shadowRoot"):null},querySelector:function(e,t){return ln("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return ln("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return sn("MutationObserver").constructor}};var hn="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.",vn={map:{},getId:()=>(console.error(hn),-1),getNode:()=>(console.error(hn),null),removeNodeFromMap(){console.error(hn)},has:()=>(console.error(hn),!1),reset(){console.error(hn)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(vn=new Proxy(vn,{get:(e,t,n)=>("map"===t&&console.error(hn),Reflect.get(e,t,n))}));var pn=Date.now;function mn(e){return e?e.nodeType===e.ELEMENT_NODE?e:fn.parentElement(e):null}/[1-9][0-9]{12}/.test(Date.now().toString())||(pn=()=>(new Date).getTime());function gn(e){var t,n=null;return"getRootNode"in e&&(null==(t=fn.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&fn.host(fn.getRootNode(e))&&(n=fn.host(fn.getRootNode(e))),n}function yn(e){for(var t,n=e;t=gn(n);)n=t;return n}function bn(e){var t=e.ownerDocument;if(!t)return!1;var n=yn(e);return fn.contains(t,n)}for(var Cn=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:class{constructor(){Vt(this,"id",1),Vt(this,"styleIDMap",new WeakMap),Vt(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):(n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n);var n}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 vn},closestElementOfNode:mn,getBaseDimension:function e(t,n){var r,i,o=null==(i=null==(r=t.ownerDocument)?void 0:r.defaultView)?void 0:i.frameElement;if(!o||o===n)return{x:0,y:0,relativeScale:1,absoluteScale:1};var a=o.getBoundingClientRect(),s=e(o,n),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,n){var r=t[n[0]];return 1===n.length?r:e(r.cssRules[n[1]].cssRules,n.slice(2))},getPositionsAndIndex:function(e){var t=[...e],n=t.pop();return{positions:t,index:n}},getRootShadowHost:yn,getShadowHost:gn,getWindowHeight:function(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight},getWindowScroll:function(e){var t,n,r,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=fn.parentElement(o.body))?void 0:t.scrollLeft)||(null==(n=null==o?void 0:o.body)?void 0:n.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==(r=fn.parentElement(o.body))?void 0:r.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 nn&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(fn.shadowRoot(e)))},hookSetter:function e(t,n,r,i,o){void 0===o&&(o=window);var a=o.Object.getOwnPropertyDescriptor(t,n);return o.Object.defineProperty(t,n,i?r:{set(e){setTimeout((()=>{r.set.call(this,e)}),0),a&&a.set&&a.set.call(this,e)}}),()=>e(t,n,a||{},!0)},inDom:function(e){var t=e.ownerDocument;return!!t&&(fn.contains(t,e)||bn(e))},isAncestorRemoved:function e(t,n){if(i=(r=t)&&"host"in r&&"mode"in r&&$t.host(r)||null,Boolean(i&&"shadowRoot"in i&&$t.shadowRoot(i)===r))return!1;var r,i,o=n.getId(t);if(!n.has(o))return!0;var a=fn.parentNode(t);return(!a||a.nodeType!==t.DOCUMENT_NODE)&&(!a||e(a,n))},isBlocked:function(e,t,n,r){if(!e)return!1;var i=mn(e);if(!i)return!1;try{if("string"==typeof t){if(i.classList.contains(t))return!0;if(r&&null!==i.closest("."+t))return!0}else if(tn(i,t,r))return!0}catch(e){}if(n){if(i.matches(n))return!0;if(r&&null!==i.closest(n))return!0}return!1},isIgnored:function(e,t,n){return!("TITLE"!==e.tagName||!n.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,n){n(t.value);for(var r=t.children.length-1;r>=0;r--)e(t.children[r],n)},legacy_isTouchEvent:function(e){return Boolean(e.changedTouches)},get nowTimestamp(){return pn},on:function(e,t,n){void 0===n&&(n=document);var r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)},patch:function(e,t,n){try{if(!(t in e))return()=>{};var r=e[t],i=n(r);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}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={},n=(e,n)=>{var r={value:e,parent:n,children:[]};return t[e.node.id]=r,r},r=[];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,n(i,s.parent))}else{var l=r.indexOf(s);r.splice(l,0,n(i,null))}}else if(a in t){var c=t[a];c.children.push(n(i,c))}else r.push(n(i,null))}return r},shadowHostInDom:bn,throttle:function(e,t,n){void 0===n&&(n={});var r=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!==n.leading||(i=u);var l=t-(u-i),c=this;l<=0||l>t?(r&&(clearTimeout(r),r=null),i=u,e.apply(c,a)):r||!1===n.trailing||(r=setTimeout((()=>{i=!1===n.leading?0:Date.now(),r=null,e.apply(c,a)}),l))}},uniqueTextMutations:function(e){for(var t=new Set,n=[],r=e.length;r--;){var i=e[r];t.has(i.id)||(n.push(i),t.add(i.id))}return n}},Symbol.toStringTag,{value:"Module"})),In="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",wn="undefined"==typeof Uint8Array?[]:new Uint8Array(256),kn=0;kn<64;kn++)wn[In.charCodeAt(kn)]=kn;var Sn;"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 An=document.createElement("iframe");document.body.appendChild(An),Array.from=(null==(Dt=An.contentWindow)?void 0:Dt.Array.from)||Array.from,document.body.removeChild(An)}}catch(e){console.debug("Unable to override Array.from",e)}new en,function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(Sn||(Sn={}));class xn{constructor(e){Ht(this,"fileName"),Ht(this,"functionName"),Ht(this,"lineNumber"),Ht(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 Tn=/(^|@)\S+:\d+/,Nn=/^\s*at .*(\S+:\d+|\(native\))/m,Mn=/^(eval@)?(\[native code])?$/,Rn={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(Nn)?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(Nn)}),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,"("),n=t.match(/ (\((.+):(\d+):(\d+)\)$)/),r=(t=n?t.replace(n[0],""):t).split(/\s+/).slice(1),i=this.extractLocation(n?n[1]:r.pop()),o=r.join(" ")||void 0,a=["eval","<anonymous>"].indexOf(i[0])>-1?void 0:i[0];return new xn({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(Mn)}),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 xn({functionName:e});var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(t),r=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(t,""));return new xn({functionName:r,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,n=e.message.split("\n"),r=[],i=2,o=n.length;i<o;i+=2){var a=t.exec(n[i]);a&&r.push(new xn({fileName:a[2],lineNumber:parseFloat(a[1])}))}return r},parseOpera10:function(e){for(var t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,n=e.stacktrace.split("\n"),r=[],i=0,o=n.length;i<o;i+=2){var a=t.exec(n[i]);a&&r.push(new xn({functionName:a[3]||void 0,fileName:a[2],lineNumber:parseFloat(a[1])}))}return r},parseOpera11:function(e){return e.stack.split("\n").filter((function(e){return!!e.match(Tn)&&!e.match(/^Error created at/)}),this).map((function(e){var t=e.split("@"),n=this.extractLocation(t.pop()),r=(t.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new xn({functionName:r,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})}),this)}};function _n(e){if(!e||!e.outerHTML)return"";for(var t="";e.parentElement;){var n=e.localName;if(!n)break;n=n.toLowerCase();var r=e.parentElement,i=[];if(r.children&&r.children.length>0)for(var o=0;o<r.children.length;o++){var a=r.children[o];a.localName&&a.localName.toLowerCase&&a.localName.toLowerCase()===n&&i.push(a)}i.length>1&&(n+=":eq("+i.indexOf(e)+")"),t=n+(t?">"+t:""),e=r}return t}function Fn(e){return"[object Object]"===Object.prototype.toString.call(e)}function Zn(e,t){if(0===t)return!0;var n=Object.keys(e);for(var r of n)if(Fn(e[r])&&Zn(e[r],t-1))return!0;return!1}function On(e,t){var n={numOfKeysLimit:50,depthOfLimit:4};Object.assign(n,t);var r=[],i=[];return JSON.stringify(e,(function(e,t){if(r.length>0){var o=r.indexOf(this);~o?r.splice(o+1):r.push(this),~o?i.splice(o,1/0,e):i.push(e),~r.indexOf(t)&&(t=r[0]===t?"[Circular ~]":"[Circular ~."+i.slice(0,r.indexOf(t)).join(".")+"]")}else r.push(t);if(null===t)return t;if(void 0===t)return"undefined";if(function(e){if(Fn(e)&&Object.keys(e).length>n.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if(Fn(e)&&Zn(e,n.depthOfLimit))return!0;return!1}(t))return function(e){var t=e.toString();n.stringLengthLimit&&t.length>n.stringLengthLimit&&(t=t.slice(0,n.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]=_n(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 En={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 Bn(e,t,n){var r,i=n?Object.assign({},En,n):En,o=i.logger;if(!o)return()=>{};r="string"==typeof o?t[o]:o;var a=0,s=!1,u=[];if(i.level.includes("error")){var l=t=>{var n=t.message,r=t.error,o=Rn.parse(r).map((e=>e.toString())),a=[On(n,i.stringifyOptions)];e({level:"error",trace:o,payload:a})};t.addEventListener("error",l),u.push((()=>{t.removeEventListener("error",l)}));var c=t=>{var n,r;t.reason instanceof Error?r=[On("Uncaught (in promise) "+(n=t.reason).name+": "+n.message,i.stringifyOptions)]:(n=new Error,r=[On("Uncaught (in promise)",i.stringifyOptions),On(t.reason,i.stringifyOptions)]);var o=Rn.parse(n).map((e=>e.toString()));e({level:"error",trace:o,payload:r})};t.addEventListener("unhandledrejection",c),u.push((()=>{t.removeEventListener("unhandledrejection",c)}))}for(var d of i.level)u.push(f(r,d));return()=>{u.forEach((e=>e()))};function f(t,n){var r=this;return t[n]?Cn.patch(t,n,(t=>function(){for(var o=arguments.length,u=new Array(o),l=0;l<o;l++)u[l]=arguments[l];if(t.apply(r,u),!("assert"===n&&u[0]||s)){s=!0;try{var c=Rn.parse(new Error).map((e=>e.toString())).splice(1),d=("assert"===n?u.slice(1):u).map((e=>On(e,i.stringifyOptions)));++a<i.lengthThreshold?e({level:n,trace:c,payload:d}):a===i.lengthThreshold&&e({level:"warn",trace:[],payload:[On("The number of log records reached the threshold.")]})}catch(e){t("rrweb logger error:",e,...u)}finally{s=!1}}})):()=>{}}}var Ln=e=>({name:"rrweb/console@1",observer:Bn,options:e}),Dn="undefined"!=typeof window?window:void 0,qn="undefined"!=typeof globalThis?globalThis:Dn,Hn=Array.prototype.forEach,Yn=null==qn?void 0:qn.navigator,Vn=null==qn?void 0:qn.document;null==qn||qn.location,null==qn||qn.fetch,null!=qn&&qn.XMLHttpRequest&&"withCredentials"in new qn.XMLHttpRequest&&qn.XMLHttpRequest,null==qn||qn.AbortController;var Pn,Gn=null==Yn?void 0:Yn.userAgent,Wn=null!=Dn?Dn:{};!function(e){e.GZipJS="gzip-js",e.Base64="base64"}(Pn||(Pn={}));var jn=["fatal","error","warning","log","info","debug"];function Xn(e,t){return-1!==e.indexOf(t)}var zn=function(e){return e.trim()},Kn=Array.isArray,Jn=Object.prototype,Un=Jn.hasOwnProperty,Qn=Jn.toString,$n=Kn||function(e){return"[object Array]"===Qn.call(e)},er=e=>"function"==typeof e,tr=e=>er(e)&&-1!==e.toString().indexOf("[native code]"),nr=()=>!!Dn.Zone,rr=e=>e===Object(e)&&!$n(e),ir=e=>void 0===e,or=e=>"[object String]"==Qn.call(e),ar=e=>or(e)&&0===e.trim().length,sr=e=>null===e,ur=e=>ir(e)||sr(e),lr=e=>"[object Number]"==Qn.call(e),cr=e=>"[object Boolean]"===Qn.call(e),dr=e=>e instanceof Document,fr=e=>e instanceof FormData,hr=e=>{var t={o:function(t){if(Dn&&Wn.POSTHOG_DEBUG&&!ir(Dn.console)&&Dn.console){for(var n=("__rrweb_original__"in Dn.console[t]?Dn.console[t].__rrweb_original__:Dn.console[t]),r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];n(e,...i)}},info:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.o("log",...n)},warn:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.o("warn",...n)},error:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.o("error",...n)},critical:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];console.error(e,...n)},uninitializedWarning:e=>{t.error("You must initialize PostHog before calling "+e)},createLogger:t=>hr(e+" "+t)};return t},vr=hr("[PostHog.js]"),pr=vr.createLogger,mr={};function gr(e,t,n){if($n(e))if(Hn&&e.forEach===Hn)e.forEach(t,n);else if("length"in e&&e.length===+e.length)for(var r=0,i=e.length;r<i;r++)if(r in e&&t.call(n,e[r],r)===mr)return}function yr(e,t,n){if(!ur(e)){if($n(e))return gr(e,t,n);if(fr(e)){for(var r of e.entries())if(t.call(n,r[1],r[0])===mr)return}else for(var i in e)if(Un.call(e,i)&&t.call(n,e[i],i)===mr)return}}var br=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return gr(n,(function(t){for(var n in t)void 0!==t[n]&&(e[n]=t[n])})),e};function Cr(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r}function Ir(e,t,n,r){var{capture:i=!1,passive:o=!0}=null!=r?r:{};null==e||e.addEventListener(t,n,{capture:i,passive:o})}var wr=function(e,t){var n,r;void 0===t&&(t="&");var i=[];return yr(e,(function(e,t){ir(e)||ir(t)||"undefined"===t||(n=encodeURIComponent((e=>e instanceof File)(e)?e.name:e.toString()),r=encodeURIComponent(t),i[i.length]=r+"="+n)})),i.join(t)};function kr(e,t,n){try{if(!(t in e))return()=>{};var r=e[t],i=n(r);return er(i)&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=i,()=>{e[t]=r}}catch(e){return()=>{}}}function Sr(e,t){var n,r=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:r,isHostDenied:!1};if(null==(n=t.payloadHostDenyList)||!n.length||null==r||!r.trim().length)return i;for(var o of t.payloadHostDenyList)if(r.endsWith(o))return{hostname:r,isHostDenied:!0};return i}function Ar(e){return!!e&&1===e.nodeType}function xr(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function Tr(e){return e?zn(e).split(/\s+/):[]}function Nr(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 Tr(t)}function Mr(e){var t="";return _r(e)&&!Fr(e)&&e.childNodes&&e.childNodes.length&&yr(e.childNodes,(function(e){var n;(function(e){return!!e&&3===e.nodeType})(e)&&e.textContent&&(t+=null!==(n=function(e){return ur(e)?null:zn(e).split(/(\s+)/).filter((e=>qr(e))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}(e.textContent))&&void 0!==n?n:"")})),zn(t)}var Rr=["a","button","form","input","select","textarea","label"];function _r(e){for(var t=e;t.parentNode&&!xr(t,"body");t=t.parentNode){var n=Nr(t);if(Xn(n,"ph-sensitive")||Xn(n,"ph-no-capture"))return!1}if(Xn(Nr(e),"ph-include"))return!0;var r=e.type||"";if(or(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var i=e.name||e.id||"";if(or(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 Fr(e){return!!(xr(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||xr(e,"select")||xr(e,"textarea")||"true"===e.getAttribute("contenteditable"))}var Zr="(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})",Or=new RegExp("^(?:"+Zr+")$"),Er=new RegExp(Zr),Br="\\d{3}-?\\d{2}-?\\d{4}",Lr=new RegExp("^("+Br+")$"),Dr=new RegExp("("+Br+")");function qr(e,t){if(void 0===t&&(t=!0),ur(e))return!1;if(or(e)){if(e=zn(e),(t?Or:Er).test((e||"").replace(/[- ]/g,"")))return!1;if((t?Lr:Dr).test(e))return!1}return!0}function Hr(e){var t=Mr(e);return qr(t=(t+" "+Yr(e)).trim())?t:""}function Yr(e){var t="";return e&&e.childNodes&&e.childNodes.length&&yr(e.childNodes,(function(e){var n;if(e&&"span"===(null==(n=e.tagName)?void 0:n.toLowerCase()))try{var r=Mr(e);t=(t+" "+r).trim(),e.childNodes&&e.childNodes.length&&(t=(t+" "+Yr(e)).trim())}catch(e){vr.error("[AutoCapture]",e)}})),t}function Vr(e){return function(e){var t=e.map((e=>{var t,r,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=n({},e.text?{text:e.text}:{},{"nth-child":null!==(t=e.nth_child)&&void 0!==t?t:0,"nth-of-type":null!==(r=e.nth_of_type)&&void 0!==r?r:0},e.href?{href:e.href}:{},e.attr_id?{attr_id:e.attr_id}:{},e.attributes),s={};return Cr(a).sort(((e,t)=>{var[n]=e,[r]=t;return n.localeCompare(r)})).forEach((e=>{var[t,n]=e;return s[Pr(t.toString())]=Pr(n.toString())})),i+=":",i+=Cr(a).map((e=>{var[t,n]=e;return t+'="'+n+'"'})).join("")}));return t.join(";")}(function(e){return e.map((e=>{var t,n,r={text:null==(t=e.$el_text)?void 0:t.slice(0,400),tag_name:e.tag_name,href:null==(n=e.attr__href)?void 0:n.slice(0,2048),attr_class:Gr(e),attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return Cr(e).filter((e=>{var[t]=e;return 0===t.indexOf("attr__")})).forEach((e=>{var[t,n]=e;return r.attributes[t]=n})),r}))}(e))}function Pr(e){return e.replace(/"|\\"/g,'\\"')}function Gr(e){var t=e.attr__class;return t?$n(t)?t:Tr(t):void 0}var Wr={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"]},jr=pr("[Recorder]"),Xr=e=>"navigation"===e.entryType,zr=e=>"resource"===e.entryType;function Kr(e,t,n){if(n.recordInitialRequests){var r=t.performance.getEntries().filter((e=>Xr(e)||zr(e)&&n.initiatorTypes.includes(e.initiatorType)));e({requests:r.flatMap((e=>ni({entry:e,method:void 0,status:void 0,networkRequest:{},isInitial:!0}))),isInitial:!0})}var i=new t.PerformanceObserver((t=>{var r=t.getEntries().filter((e=>Xr(e)||zr(e)&&n.initiatorTypes.includes(e.initiatorType)&&(e=>!n.recordBody&&!n.recordHeaders||"xmlhttprequest"!==e.initiatorType&&"fetch"!==e.initiatorType)(e)));e({requests:r.flatMap((e=>ni({entry:e,method:void 0,status:void 0,networkRequest:{}})))})})),o=PerformanceObserver.supportedEntryTypes.filter((e=>n.performanceEntryTypeToObserve.includes(e)));return i.observe({entryTypes:o}),()=>{i.disconnect()}}function Jr(e,t){return!!t&&(cr(t)||t[e])}function Ur(e){var{type:t,recordBody:n,headers:r,url:i}=e;function o(e){var t=Object.keys(r).find((e=>"content-type"===e.toLowerCase())),n=t&&r[t];return e.some((e=>null==n?void 0:n.includes(e)))}if(!n)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(cr(n))return!0;if($n(n))return o(n);var a=n[t];return cr(a)?a:o(a)}function Qr(e,t,n,r,i,o){return $r.apply(this,arguments)}function $r(){return $r=t((function*(e,t,n,r,i,o){if(void 0===o&&(o=0),o>10)return jr.warn("Failed to get performance entry for request",{url:n,initiatorType:t}),null;var a=function(e,t){for(var n=e.length-1;n>=0;n-=1)if(t(e[n]))return e[n]}(e.performance.getEntriesByName(n),(e=>zr(e)&&e.initiatorType===t&&(ir(r)||e.startTime>=r)&&(ir(i)||e.startTime<=i)));return a||(yield new Promise((e=>setTimeout(e,50*o))),Qr(e,t,n,r,i,o+1))})),$r.apply(this,arguments)}function ei(e){var{body:t,options:n,url:r}=e;if(ur(t))return null;var{hostname:i,isHostDenied:o}=Sr(r,n);if(o)return i+" is in deny list";if(or(t))return t;if(dr(t))return t.textContent;if(fr(t))return wr(t);if(rr(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 ti=e=>!sr(e)&&("navigation"===e.entryType||"resource"===e.entryType);function ni(e){var{entry:t,method:r,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()),f=Math.floor(d+(s||0)),h=[n({},t?t.toJSON():{name:l},{startTime:ir(s)?void 0:Math.round(s),endTime:ir(u)?void 0:Math.round(u),timeOrigin:d,timestamp:f,method:r,initiatorType:c||(t?t.initiatorType:void 0),status:i,requestHeaders:o.requestHeaders,requestBody:o.requestBody,responseHeaders:o.responseHeaders,responseBody:o.responseBody,isInitial:a})];if(ti(t))for(var v of t.serverTiming||[])h.push({timeOrigin:d,timestamp:f,startTime:Math.round(t.startTime),name:v.name,duration:v.duration,entryType:"serverTiming"});return h}var ri=["video/","audio/"];function ii(e){return new Promise(((t,n)=>{var r=setTimeout((()=>t("[SessionReplay] Timeout while trying to read body")),500);try{e.clone().text().then((e=>t(e)),(e=>n(e))).finally((()=>clearTimeout(r)))}catch(e){clearTimeout(r),t("[SessionReplay] Failed to read body")}}))}function oi(){return oi=t((function*(e){var{r:t,options:n,url:r}=e,{hostname:i,isHostDenied:o}=Sr(r,n);return o?Promise.resolve(i+" is in deny list"):ii(t)})),oi.apply(this,arguments)}function ai(){return ai=t((function*(e){var{r:t,options:n,url:r}=e,i=function(e){var t,{r:n,options:r,url:i}=e;if("chunked"===n.headers.get("Transfer-Encoding"))return"Chunked Transfer-Encoding is not supported";var o=null==(t=n.headers.get("Content-Type"))?void 0:t.toLowerCase(),a=ri.some((e=>null==o?void 0:o.startsWith(e)));if(o&&a)return"Content-Type "+o+" is not supported";var{hostname:s,isHostDenied:u}=Sr(i,r);return u?s+" is in deny list":null}({r:t,options:n,url:r});return sr(i)?ii(t):Promise.resolve(i)})),ai.apply(this,arguments)}function si(e,n,r){if(!r.initiatorTypes.includes("fetch"))return()=>{};var i=Jr("request",r.recordHeaders),o=Jr("response",r.recordHeaders),a=kr(n,"fetch",(a=>function(){var s=t((function*(t,s){var u,l,c,d=new Request(t,s),f={};try{var h={};d.headers.forEach(((e,t)=>{h[t]=e})),i&&(f.requestHeaders=h),Ur({type:"request",headers:h,url:t,recordBody:r.recordBody})&&(f.requestBody=yield function(e){return oi.apply(this,arguments)}({r:d,options:r,url:t})),l=n.performance.now(),u=yield a(d),c=n.performance.now();var v={};return u.headers.forEach(((e,t)=>{v[t]=e})),o&&(f.responseHeaders=v),Ur({type:"response",headers:v,url:t,recordBody:r.recordBody})&&(f.responseBody=yield function(e){return ai.apply(this,arguments)}({r:u,options:r,url:t})),u}finally{Qr(n,"fetch",d.url,l,c).then((t=>{var n,r=ni({entry:t,method:d.method,status:null==(n=u)?void 0:n.status,networkRequest:f,start:l,end:c,url:d.url,initiatorType:"fetch"});e({requests:r})})).catch((()=>{}))}}));return function(e,t){return s.apply(this,arguments)}}()));return()=>{a()}}var ui=null;function li(e,t,r){if(!("performance"in t))return()=>{};if(ui)return jr.warn("Network observer already initialised, doing nothing"),()=>{};var i=r?Object.assign({},Wr,r):Wr,o=t=>{var r=[];t.requests.forEach((e=>{var t=i.maskRequestFn(e);t&&r.push(t)})),r.length>0&&e(n({},t,{requests:r}))},a=Kr(o,t,i),s=()=>{},u=()=>{};return(i.recordHeaders||i.recordBody)&&(s=function(e,t,n){if(!n.initiatorTypes.includes("xmlhttprequest"))return()=>{};var r=Jr("request",n.recordHeaders),i=Jr("response",n.recordHeaders),o=kr(t.XMLHttpRequest.prototype,"open",(o=>function(a,s,u,l,c){void 0===u&&(u=!0);var d,f,h=this,v=new Request(s),p={},m={},g=h.setRequestHeader.bind(h);h.setRequestHeader=(e,t)=>(m[e]=t,g(e,t)),r&&(p.requestHeaders=m);var y=h.send.bind(h);h.send=e=>(Ur({type:"request",headers:m,url:s,recordBody:n.recordBody})&&(p.requestBody=ei({body:e,options:n,url:s})),d=t.performance.now(),y(e)),h.addEventListener("readystatechange",(()=>{if(h.readyState===h.DONE){f=t.performance.now();var r={};h.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((e=>{var t=e.split(": "),n=t.shift(),i=t.join(": ");n&&(r[n]=i)})),i&&(p.responseHeaders=r),Ur({type:"response",headers:r,url:s,recordBody:n.recordBody})&&(p.responseBody=ei({body:h.response,options:n,url:s})),Qr(t,"xmlhttprequest",v.url,d,f).then((t=>{var n=ni({entry:t,method:a,status:null==h?void 0:h.status,networkRequest:p,start:d,end:f,url:s.toString(),initiatorType:"xmlhttprequest"});e({requests:n})})).catch((()=>{}))}})),o.call(h,a,s,u,l,c)}));return()=>{o()}}(o,t,i),u=si(o,t,i)),ui=()=>{a(),s(),u()}}var ci,di,fi,hi,vi,pi,mi=e=>({name:"rrweb/network@1",observer:li,options:e});Wn.__PosthogExtensions__=Wn.__PosthogExtensions__||{},Wn.__PosthogExtensions__.rrwebPlugins={getRecordConsolePlugin:Ln,getRecordNetworkPlugin:mi},Wn.__PosthogExtensions__.rrweb={record:Lt,version:"v2"},Wn.rrweb={record:Lt,version:"v2"},Wn.rrwebConsoleRecord={getRecordConsolePlugin:Ln},Wn.getRecordNetworkPlugin=mi,function(e){e.Button="button",e.Tab="tab",e.Selector="selector"}(ci||(ci={})),function(e){e.Left="left",e.Center="center",e.Right="right",e.NextToTrigger="next_to_trigger"}(di||(di={})),function(e){e.Popover="popover",e.API="api",e.Widget="widget"}(fi||(fi={})),function(e){e.Open="open",e.MultipleChoice="multiple_choice",e.SingleChoice="single_choice",e.Rating="rating",e.Link="link"}(hi||(hi={})),function(e){e.NextQuestion="next_question",e.End="end",e.ResponseBased="response_based",e.SpecificQuestion="specific_question"}(vi||(vi={})),function(e){e.Once="once",e.Recurring="recurring",e.Always="always"}(pi||(pi={}));var gi,yi,bi,Ci,Ii,wi,ki,Si,Ai={},xi=[],Ti=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ni=Array.isArray;function Mi(e,t){for(var n in t)e[n]=t[n];return e}function Ri(e){var t=e.parentNode;t&&t.removeChild(e)}function _i(e,t,n){var r,i,o,a={};for(o in t)"key"==o?r=t[o]:"ref"==o?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?gi.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===a[o]&&(a[o]=e.defaultProps[o]);return Fi(e,a,r,i,null)}function Fi(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==i?++bi:i,__i:-1,__u:0};return null==i&&null!=yi.vnode&&yi.vnode(o),o}function Zi(e){return e.children}function Oi(e,t){this.props=e,this.context=t}function Ei(e,t){if(null==t)return e.__?Ei(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?Ei(e):null}function Bi(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return Bi(e)}}function Li(e){(!e.__d&&(e.__d=!0)&&Ci.push(e)&&!Di.__r++||Ii!==yi.debounceRendering)&&((Ii=yi.debounceRendering)||wi)(Di)}function Di(){var e,t,n,r,i,o,a,s,u;for(Ci.sort(ki);e=Ci.shift();)e.__d&&(t=Ci.length,r=void 0,o=(i=(n=e).__v).__e,s=[],u=[],(a=n.__P)&&((r=Mi({},i)).__v=i.__v+1,yi.vnode&&yi.vnode(r),ji(a,r,i,n.__n,void 0!==a.ownerSVGElement,32&i.__u?[o]:null,s,null==o?Ei(i):o,!!(32&i.__u),u),r.__.__k[r.__i]=r,Xi(s,r,u),r.__e!=o&&Bi(r)),Ci.length>t&&Ci.sort(ki));Di.__r=0}function qi(e,t,n,r,i,o,a,s,u,l,c){var d,f,h,v,p,m=r&&r.__k||xi,g=t.length;for(n.__d=u,function(e,t,n){var r,i,o,a,s,u=t.length,l=n.length,c=l,d=0;for(e.__k=[],r=0;r<u;r++)null!=(i=e.__k[r]=null==(i=t[r])||"boolean"==typeof i||"function"==typeof i?null:"string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?Fi(null,i,null,null,i):Ni(i)?Fi(Zi,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?Fi(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=e,i.__b=e.__b+1,s=Yi(i,n,a=r+d,c),i.__i=s,o=null,-1!==s&&(c--,(o=n[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!==r+d&&(i.__u|=65536))):(o=n[r])&&null==o.key&&o.__e&&(o.__e==e.__d&&(e.__d=Ei(o)),Ki(o,o,!1),n[r]=null,c--);if(c)for(r=0;r<l;r++)null!=(o=n[r])&&0==(131072&o.__u)&&(o.__e==e.__d&&(e.__d=Ei(o)),Ki(o,o))}(n,t,m),u=n.__d,d=0;d<g;d++)null!=(h=n.__k[d])&&"boolean"!=typeof h&&"function"!=typeof h&&(f=-1===h.__i?Ai:m[h.__i]||Ai,h.__i=d,ji(e,h,f,i,o,a,s,u,l,c),v=h.__e,h.ref&&f.ref!=h.ref&&(f.ref&&zi(f.ref,null,h),c.push(h.ref,h.__c||v,h)),null==p&&null!=v&&(p=v),65536&h.__u||f.__k===h.__k?u=Hi(h,u,e):"function"==typeof h.type&&void 0!==h.__d?u=h.__d:v&&(u=v.nextSibling),h.__d=void 0,h.__u&=-196609);n.__d=u,n.__e=p}function Hi(e,t,n){var r,i;if("function"==typeof e.type){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,t=Hi(r[i],t,n));return t}return e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e),t&&t.nextSibling}function Yi(e,t,n,r){var i=e.key,o=e.type,a=n-1,s=n+1,u=t[n];if(null===u||u&&i==u.key&&o===u.type)return n;if(r>(null!=u&&0==(131072&u.__u)?1:0))for(;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 Vi(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||Ti.test(t)?n:n+"px"}function Pi(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Vi(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Vi(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/(PointerCapture)$|Capture$/,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,o?Wi:Gi,o)):e.removeEventListener(t,o?Wi:Gi,o);else{if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&"rowSpan"!==t&&"colSpan"!==t&&"role"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function Gi(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(yi.event?yi.event(e):e)}function Wi(e){return this.l[e.type+!0](yi.event?yi.event(e):e)}function ji(e,t,n,r,i,o,a,s,u,l){var c,d,f,h,v,p,m,g,y,b,C,I,w,k,S,A=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(u=!!(32&n.__u),o=[s=t.__e=n.__e]),(c=yi.__b)&&c(t);e:if("function"==typeof A)try{if(g=t.props,y=(c=A.contextType)&&r[c.__c],b=c?y?y.props.value:c.__:r,n.__c?m=(d=t.__c=n.__c).__=d.__E:("prototype"in A&&A.prototype.render?t.__c=d=new A(g,b):(t.__c=d=new Oi(g,b),d.constructor=A,d.render=Ji),y&&y.sub(d),d.props=g,d.state||(d.state={}),d.context=b,d.__n=r,f=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=A.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=Mi({},d.__s)),Mi(d.__s,A.getDerivedStateFromProps(g,d.__s))),h=d.props,v=d.state,d.__v=t,f)null==A.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==A.getDerivedStateFromProps&&g!==h&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(g,b),!d.__e&&(null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(g,d.__s,b)||t.__v===n.__v)){for(t.__v!==n.__v&&(d.props=g,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),C=0;C<d._sb.length;C++)d.__h.push(d._sb[C]);d._sb=[],d.__h.length&&a.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(g,d.__s,b),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(h,v,p)}))}if(d.context=b,d.props=g,d.__P=e,d.__e=!1,I=yi.__r,w=0,"prototype"in A&&A.prototype.render){for(d.state=d.__s,d.__d=!1,I&&I(t),c=d.render(d.props,d.state,d.context),k=0;k<d._sb.length;k++)d.__h.push(d._sb[k]);d._sb=[]}else do{d.__d=!1,I&&I(t),c=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++w<25);d.state=d.__s,null!=d.getChildContext&&(r=Mi(Mi({},r),d.getChildContext())),f||null==d.getSnapshotBeforeUpdate||(p=d.getSnapshotBeforeUpdate(h,v)),qi(e,Ni(S=null!=c&&c.type===Zi&&null==c.key?c.props.children:c)?S:[S],t,n,r,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=n.__e,t.__k=n.__k),yi.__e(e,t,n)}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=function(e,t,n,r,i,o,a,s,u){var l,c,d,f,h,v,p,m=n.props,g=t.props,y=t.type;if("svg"===y&&(i=!0),null!=o)for(l=0;l<o.length;l++)if((h=o[l])&&"setAttribute"in h==!!y&&(y?h.localName===y:3===h.nodeType)){e=h,o[l]=null;break}if(null==e){if(null===y)return document.createTextNode(g);e=i?document.createElementNS("http://www.w3.org/2000/svg",y):document.createElement(y,g.is&&g),o=null,s=!1}if(null===y)m===g||s&&e.data===g||(e.data=g);else{if(o=o&&gi.call(e.childNodes),m=n.props||Ai,!s&&null!=o)for(m={},l=0;l<e.attributes.length;l++)m[(h=e.attributes[l]).name]=h.value;for(l in m)h=m[l],"children"==l||("dangerouslySetInnerHTML"==l?d=h:"key"===l||l in g||Pi(e,l,null,h,i));for(l in g)h=g[l],"children"==l?f=h:"dangerouslySetInnerHTML"==l?c=h:"value"==l?v=h:"checked"==l?p=h:"key"===l||s&&"function"!=typeof h||m[l]===h||Pi(e,l,h,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=""),qi(e,Ni(f)?f:[f],t,n,r,i&&"foreignObject"!==y,o,a,o?o[0]:n.__k&&Ei(n,0),s,u),null!=o)for(l=o.length;l--;)null!=o[l]&&Ri(o[l]);s||(l="value",void 0!==v&&(v!==e[l]||"progress"===y&&!v||"option"===y&&v!==m[l])&&Pi(e,l,v,m[l],!1),l="checked",void 0!==p&&p!==e[l]&&Pi(e,l,p,m[l],!1))}return e}(n.__e,t,n,r,i,o,a,u,l);(c=yi.diffed)&&c(t)}function Xi(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)zi(n[r],n[++r],n[++r]);yi.__c&&yi.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){yi.__e(e,t.__v)}}))}function zi(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){yi.__e(e,n)}}function Ki(e,t,n){var r,i;if(yi.unmount&&yi.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||zi(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){yi.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Ki(r[i],t,n||"function"!=typeof e.type);n||null==e.__e||Ri(e.__e),e.__=e.__e=e.__d=void 0}function Ji(e,t,n){return this.constructor(e,n)}function Ui(e,t,n){var r,i,o,a;yi.__&&yi.__(e,t),i=(r="function"==typeof n)?null:t.__k,o=[],a=[],ji(t,e=(!r&&n||t).__k=_i(Zi,null,[e]),i||Ai,Ai,void 0!==t.ownerSVGElement,!r&&n?[n]:i?null:t.firstChild?gi.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r,a),Xi(o,e,a)}function Qi(e,t,n){var r,i,o,a,s=Mi({},e.props);for(o in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)"key"==o?r=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?gi.call(arguments,2):n),Fi(e.type,s,r||e.key,i||e.ref,null)}gi=xi.slice,yi={__e:function(e,t,n,r){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,r||{}),a=i.__d),a)return i.__E=i}catch(t){e=t}throw e}},bi=0,Oi.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Mi({},this.state),"function"==typeof e&&(e=e(Mi({},n),this.props)),e&&Mi(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),Li(this))},Oi.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Li(this))},Oi.prototype.render=Zi,Ci=[],wi="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ki=function(e,t){return e.__v.__b-t.__v.__b},Di.__r=0,Si=0;var $i,eo,to,no,ro=0,io=[],oo=[],ao=yi.__b,so=yi.__r,uo=yi.diffed,lo=yi.__c,co=yi.unmount;function fo(e,t){yi.__h&&yi.__h(eo,e,ro||t),ro=0;var n=eo.__H||(eo.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:oo}),n.__[e]}function ho(e){return ro=1,function(e,t,n){var r=fo($i++,2);if(r.t=e,!r.__c&&(r.__=[ko(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=eo,!eo.u)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter((function(e){return e.__c}));if(i.every((function(e){return!e.__N})))return!o||o.call(this,e,t,n);var 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&&r.__c.props===e)&&(!o||o.call(this,e,t,n))};eo.u=!0;var o=eo.shouldComponentUpdate,a=eo.componentWillUpdate;eo.componentWillUpdate=function(e,t,n){if(this.__e){var r=o;o=void 0,i(e,t,n),o=r}a&&a.call(this,e,t,n)},eo.shouldComponentUpdate=i}return r.__N||r.__}(ko,e)}function vo(e,t){var n=fo($i++,3);!yi.__s&&wo(n.__H,t)&&(n.__=e,n.i=t,eo.__H.__h.push(n))}function po(e,t){var n=fo($i++,7);return wo(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function mo(e){var t=eo.context[e.__c],n=fo($i++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(eo)),t.props.value):e.__}function go(){for(var e;e=io.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Co),e.__H.__h.forEach(Io),e.__H.__h=[]}catch(t){e.__H.__h=[],yi.__e(t,e.__v)}}yi.__b=function(e){eo=null,ao&&ao(e)},yi.__r=function(e){so&&so(e),$i=0;var t=(eo=e.__c).__H;t&&(to===eo?(t.__h=[],eo.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=oo,e.__N=e.i=void 0}))):(t.__h.forEach(Co),t.__h.forEach(Io),t.__h=[],$i=0)),to=eo},yi.diffed=function(e){uo&&uo(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==io.push(t)&&no===yi.requestAnimationFrame||((no=yi.requestAnimationFrame)||bo)(go)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==oo&&(e.__=e.__V),e.i=void 0,e.__V=oo}))),to=eo=null},yi.__c=function(e,t){t.some((function(e){try{e.__h.forEach(Co),e.__h=e.__h.filter((function(e){return!e.__||Io(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],yi.__e(n,e.__v)}})),lo&&lo(e,t)},yi.unmount=function(e){co&&co(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{Co(e)}catch(e){t=e}})),n.__H=void 0,t&&yi.__e(t,n.__v))};var yo="function"==typeof requestAnimationFrame;function bo(e){var t,n=function(){clearTimeout(r),yo&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);yo&&(t=requestAnimationFrame(n))}function Co(e){var t=eo,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),eo=t}function Io(e){var t=eo;e.__c=e.__(),eo=t}function wo(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function ko(e,t){return"function"==typeof t?t(e):t}var So=pr("[Surveys]");var Ao="seenSurvey_",xo=pr("[Stylesheet Loader]"),To=(e,t,n)=>{var r,i=e.createElement("style");return i.innerText=t,null!=n&&null!=(r=n.config)&&r.prepare_external_dependency_stylesheet&&(i=n.config.prepare_external_dependency_stylesheet(i)),i||(xo.error("prepare_external_dependency_stylesheet returned null"),null)},No=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}},Mo="Mobile",Ro="Android",_o="Tablet",Fo=Ro+" "+_o,Zo="iPad",Oo="Apple Watch",Eo="BlackBerry",Bo="Nintendo",Lo="PlayStation",Do="Xbox",qo="Windows Phone",Ho="Nokia",Yo="Ouya",Vo="Generic",Po=Vo+" "+Mo.toLowerCase(),Go=Vo+" "+_o.toLowerCase(),Wo=new RegExp(Do,"i"),jo=new RegExp(Lo+" \\w+","i"),Xo=new RegExp(Bo+" \\w+","i"),zo=new RegExp(Eo+"|PlayBook|BB10","i"),Ko=function(e){var t=function(e){return Xo.test(e)?Bo:jo.test(e)?Lo:Wo.test(e)?Do:new RegExp(Yo,"i").test(e)?Yo:new RegExp("("+qo+"|WPDesktop)","i").test(e)?qo:/iPad/.test(e)?Zo:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?Oo:zo.test(e)?Eo:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(Ho,"i").test(e)?Ho:/(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(Mo).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)?Ro:Fo:Ro:new RegExp("(pda|"+Mo+")","i").test(e)?Po:new RegExp(_o,"i").test(e)&&!new RegExp(_o+" pc","i").test(e)?Go:""}(e);return t===Zo||t===Fo||"Kobo"===t||"Kindle Fire"===t||t===Go?_o:t===Bo||t===Do||t===Lo||t===Yo?"Console":t===Oo?"Wearable":t?Mo:"Desktop"},Jo=Dn,Uo=Vn,Qo=2147483647;function $o(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}var ea=e=>{var t={[di.Left]:"left: 30px;",[di.Right]:"right: 60px;",[di.Center]:"\n left: 50%;\n transform: translateX(-50%);\n ",[di.NextToTrigger]:"right: 30px;"};return("\n .survey-form, .thank-you-message {\n position: fixed;\n margin: 0px;\n bottom: 0px;\n color: black;\n font-weight: normal;\n font-family: "+$o(null==e?void 0:e.fontFamily)+";\n text-align: left;\n max-width: "+parseInt((null==e?void 0:e.maxWidth)||"300")+"px;\n width: 100%;\n z-index: "+parseInt((null==e?void 0:e.zIndex)||Qo.toString())+";\n border: 1.5px solid "+((null==e?void 0:e.borderColor)||"#c9c6c6")+";\n border-bottom: 0px;\n "+(null!=e&&e.position?t[e.position]:t[di.Right])+"\n flex-direction: column;\n background: "+((null==e?void 0:e.backgroundColor)||"#eeeded")+";\n border-top-left-radius: 10px;\n border-top-right-radius: 10px;\n box-shadow: -6px 0 16px -8px rgb(0 0 0 / 8%), -9px 0 28px 0 rgb(0 0 0 / 5%), -12px 0 48px 16px rgb(0 0 0 / 3%);\n }\n\n .survey-box, .thank-you-message-container {\n padding: 20px 25px 10px;\n display: flex;\n flex-direction: column;\n border-radius: 10px;\n }\n\n .thank-you-message {\n text-align: center;\n }\n\n .form-submit[disabled] {\n opacity: "+((null==e?void 0:e.disabledButtonOpacity)||"0.6")+";\n filter: grayscale(50%);\n cursor: not-allowed;\n }\n .survey-form textarea {\n color: #2d2d2d;\n font-size: 14px;\n font-family: "+$o(null==e?void 0:e.fontFamily)+";\n background: white;\n color: black;\n outline: none;\n padding-left: 10px;\n padding-right: 10px;\n padding-top: 10px;\n border-radius: 6px;\n border-color: "+((null==e?void 0:e.borderColor)||"#c9c6c6")+";\n margin-top: 14px;\n width: 100%;\n box-sizing: border-box;\n }\n .survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) textarea {\n margin-top: 0;\n }\n .form-submit {\n box-sizing: border-box;\n margin: 0;\n font-family: inherit;\n overflow: visible;\n text-transform: none;\n position: relative;\n display: inline-block;\n font-weight: 700;\n white-space: nowrap;\n text-align: center;\n border: 1.5px solid transparent;\n cursor: pointer;\n user-select: none;\n touch-action: manipulation;\n padding: 12px;\n font-size: 14px;\n border-radius: 6px;\n outline: 0;\n background: "+((null==e?void 0:e.submitButtonColor)||"black")+" !important;\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.12);\n box-shadow: 0 2px 0 rgba(0, 0, 0, 0.045);\n width: 100%;\n }\n .form-cancel {\n display: flex;\n float: right;\n border: none;\n background: none;\n cursor: pointer;\n }\n .cancel-btn-wrapper {\n position: absolute;\n width: 35px;\n height: 35px;\n border-radius: 100%;\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n background: white;\n border: 1.5px solid "+((null==e?void 0:e.borderColor)||"#c9c6c6")+";\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .bolded { font-weight: 600; }\n .buttons {\n display: flex;\n justify-content: center;\n }\n .footer-branding {\n font-size: 11px;\n margin-top: 10px;\n text-align: center;\n display: flex;\n justify-content: center;\n gap: 4px;\n align-items: center;\n font-weight: 500;\n background: "+((null==e?void 0:e.backgroundColor)||"#eeeded")+";\n text-decoration: none;\n backgroundColor: "+((null==e?void 0:e.backgroundColor)||"#eeeded")+";\n color: "+na((null==e?void 0:e.backgroundColor)||"#eeeded")+";\n }\n .survey-question {\n font-weight: 500;\n font-size: 14px;\n background: "+((null==e?void 0:e.backgroundColor)||"#eeeded")+";\n }\n .question-textarea-wrapper {\n display: flex;\n flex-direction: column;\n }\n .survey-question-description {\n font-size: 13px;\n padding-top: 5px;\n background: "+((null==e?void 0:e.backgroundColor)||"#eeeded")+";\n }\n .ratings-number {\n font-size: 16px;\n font-weight: 600;\n padding: 8px 0px;\n border: none;\n }\n .ratings-number:hover {\n cursor: pointer;\n }\n .rating-options {\n margin-top: 14px;\n }\n .rating-options-number {\n display: grid;\n border-radius: 6px;\n overflow: hidden;\n border: 1.5px solid "+((null==e?void 0:e.borderColor)||"#c9c6c6")+";\n }\n .rating-options-number > .ratings-number {\n border-right: 1px solid "+((null==e?void 0:e.borderColor)||"#c9c6c6")+";\n }\n .rating-options-number > .ratings-number:last-of-type {\n border-right: 0px;\n }\n .rating-options-number .rating-active {\n background: "+((null==e?void 0:e.ratingButtonActiveColor)||"black")+";\n }\n .rating-options-emoji {\n display: flex;\n justify-content: space-between;\n }\n .ratings-emoji {\n font-size: 16px;\n background-color: transparent;\n border: none;\n padding: 0px;\n }\n .ratings-emoji:hover {\n cursor: pointer;\n }\n .ratings-emoji.rating-active svg {\n fill: "+((null==e?void 0:e.ratingButtonActiveColor)||"black")+";\n }\n .emoji-svg {\n fill: '#939393';\n }\n .rating-text {\n display: flex;\n flex-direction: row;\n font-size: 11px;\n justify-content: space-between;\n margin-top: 6px;\n background: "+((null==e?void 0:e.backgroundColor)||"#eeeded")+";\n opacity: .60;\n }\n .limit-height {\n max-height: 300px;\n overflow: auto;\n scrollbar-width: thin;\n scrollbar-color: "+((null==e?void 0:e.borderColor)||"#c9c6c6")+" "+((null==e?void 0:e.backgroundColor)||"#eeeded")+";\n }\n .multiple-choice-options {\n margin-top: 13px;\n font-size: 14px;\n }\n .survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) .multiple-choice-options {\n margin-top: 0;\n }\n .multiple-choice-options .choice-option {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 13px;\n cursor: pointer;\n margin-bottom: 5px;\n position: relative;\n }\n .multiple-choice-options > .choice-option:last-of-type {\n margin-bottom: 0px;\n }\n .multiple-choice-options input {\n cursor: pointer;\n position: absolute;\n opacity: 0;\n }\n .choice-check {\n position: absolute;\n right: 10px;\n background: white;\n }\n .choice-check svg {\n display: none;\n }\n .multiple-choice-options .choice-option:hover .choice-check svg {\n display: inline-block;\n opacity: .25;\n }\n .multiple-choice-options input:checked + label + .choice-check svg {\n display: inline-block;\n opacity: 100% !important;\n }\n .multiple-choice-options input:checked + label {\n font-weight: bold;\n border: 1.5px solid rgba(0,0,0);\n }\n .multiple-choice-options input:checked + label input {\n font-weight: bold;\n }\n .multiple-choice-options label {\n width: 100%;\n cursor: pointer;\n padding: 10px;\n border: 1.5px solid rgba(0,0,0,.25);\n border-radius: 4px;\n background: white;\n }\n .multiple-choice-options .choice-option-open label {\n padding-right: 30px;\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n max-width: 100%;\n }\n .multiple-choice-options .choice-option-open label span {\n width: 100%;\n }\n .multiple-choice-options .choice-option-open input:disabled + label {\n opacity: 0.6;\n }\n .multiple-choice-options .choice-option-open label input {\n position: relative;\n opacity: 1;\n flex-grow: 1;\n border: 0;\n outline: 0;\n }\n .thank-you-message-body {\n margin-top: 6px;\n font-size: 14px;\n background: "+((null==e?void 0:e.backgroundColor)||"#eeeded")+";\n }\n .thank-you-message-header {\n margin: 10px 0px 0px;\n background: "+((null==e?void 0:e.backgroundColor)||"#eeeded")+";\n }\n .thank-you-message-container .form-submit {\n margin-top: 20px;\n margin-bottom: 10px;\n }\n .thank-you-message-countdown {\n margin-left: 6px;\n }\n .bottom-section {\n margin-top: 14px;\n }\n ").replace(/[\n\r\t]+/g," ").replace(/\s{2,}/g," ").trim()};function ta(e){if("#"===e[0]){var t=e.replace(/^#/,"");return"rgb("+parseInt(t.slice(0,2),16)+","+parseInt(t.slice(2,4),16)+","+parseInt(t.slice(4,6),16)+")"}return"rgb(255, 255, 255)"}function na(e){var t;void 0===e&&(e=ia),"#"===e[0]&&(t=ta(e)),e.startsWith("rgb")&&(t=e);var n={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}[e.toLowerCase()];if(n&&(t=ta(n)),!t)return"black";var r=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(r){var i=parseInt(r[1]),o=parseInt(r[2]),a=parseInt(r[3]);return Math.sqrt(i*i*.299+o*o*.587+a*a*.114)>127.5?"black":"white"}return"black"}var ra={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:di.Right},ia="#eeeded",oa=function(e,t,r){void 0===e&&(e={}),r?(localStorage.setItem(da(t),"true"),r.capture("survey sent",n({$survey_name:t.name,$survey_id:t.id,$survey_iteration:t.current_iteration,$survey_iteration_start_date:t.current_iteration_start_date,$survey_questions:t.questions.map(((e,t)=>({id:e.id,question:e.question,index:t}))),sessionRecordingUrl:null==r.get_session_replay_url?void 0:r.get_session_replay_url()},e,{$set:{[fa(t,"responded")]:!0}})),Jo.dispatchEvent(new CustomEvent("PHSurveySent",{detail:{surveyId:t.id}}))):So.error("[survey sent] event not captured, PostHog instance not found.")},aa=(e,t,n)=>{t?n||(t.capture("survey dismissed",{$survey_name:e.name,$survey_id:e.id,$survey_iteration:e.current_iteration,$survey_iteration_start_date:e.current_iteration_start_date,sessionRecordingUrl:null==t.get_session_replay_url?void 0:t.get_session_replay_url(),$set:{[fa(e,"dismissed")]:!0}}),localStorage.setItem(da(e),"true"),Jo.dispatchEvent(new CustomEvent("PHSurveyClosed",{detail:{surveyId:e.id}}))):So.error("[survey dismissed] event not captured, PostHog instance not found.")},sa=e=>e.map((e=>({sort:Math.floor(10*Math.random()),value:e}))).sort(((e,t)=>e.sort-t.sort)).map((e=>e.value)),ua=(e,t)=>e.length===t.length&&e.every(((e,n)=>e===t[n]))?t.reverse():t,la=e=>e.appearance&&e.appearance.shuffleQuestions?ua(e.questions,sa(e.questions)):e.questions,ca=e=>{var t,n;return!(null==(t=e.conditions)||null==(n=t.events)||!n.repeatedActivation||!(e=>{var t,n,r,i,o,a;return null!=(null==(t=e.conditions)||null==(n=t.events)||null==(r=n.values)?void 0:r.length)&&(null==(i=e.conditions)||null==(o=i.events)||null==(a=o.values)?void 0:a.length)>0})(e))||e.schedule===pi.Always},da=e=>{var t=""+Ao+e.id;return e.current_iteration&&e.current_iteration>0&&(t=""+Ao+e.id+"_"+e.current_iteration),t},fa=(e,t)=>{var n="$survey_"+t+"/"+e.id;return e.current_iteration&&e.current_iteration>0&&(n="$survey_"+t+"/"+e.id+"/"+e.current_iteration),n},ha=function(e,t){var n={__c:t="__cC"+Si++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,Li(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}({isPreviewMode:!1,previewPageIndex:0,onPopupSurveyDismissed:()=>{},isPopup:!0,onPreviewSubmit:()=>{}}),va=e=>{var{component:t,children:n,renderAsHtml:r,style:i}=e;return Qi(t,r?{dangerouslySetInnerHTML:{__html:n},style:i}:{children:n,style:i})},pa={icontains:(e,t)=>e.some((e=>t.toLowerCase().includes(e.toLowerCase()))),not_icontains:(e,t)=>e.every((e=>!t.toLowerCase().includes(e.toLowerCase()))),regex:(e,t)=>e.some((e=>No(t,e))),not_regex:(e,t)=>e.every((e=>!No(t,e))),exact:(e,t)=>e.some((e=>t===e)),is_not:(e,t)=>e.every((e=>t!==e))};function ma(e){return null!=e?e:"icontains"}function ga(e){var t,n,r;if(null==(t=e.conditions)||!t.url)return!0;var i=null==Jo||null==(n=Jo.location)?void 0:n.href;if(!i)return!1;var o=[e.conditions.url];return pa[ma(null==(r=e.conditions)?void 0:r.urlMatchType)](o,i)}function ya(e,t){void 0===t&&(t=!1);var n="PostHogSurvey-"+e.id;return t?"."+n:n}var ba=Vn;function Ca(e,t){var n,r=ya(e),i=ba.querySelector("."+r);if(i&&i.shadowRoot)return i.shadowRoot;var o=ba.createElement("div");o.className=r;var a=o.attachShadow({mode:"open"}),s="\n .ph-survey-widget-tab {\n position: fixed;\n top: 50%;\n right: 0;\n background: "+((null==(n=e.appearance)?void 0:n.widgetColor)||"#e0a045")+";\n color: white;\n transform: rotate(-90deg) translate(0, -100%);\n transform-origin: right top;\n min-width: 40px;\n padding: 8px 12px;\n font-weight: 500;\n border-radius: 3px 3px 0 0;\n text-align: center;\n cursor: pointer;\n z-index: "+Qo+";\n }\n .ph-survey-widget-tab:hover {\n padding-bottom: 13px;\n }\n .ph-survey-widget-button {\n position: fixed;\n }\n ",u=To(ba,s,t);return u&&a.append(u),ba.body.appendChild(o),a}var Ia=0;function wa(e,t,n,r,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:n,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--Ia,__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 yi.vnode&&yi.vnode(l),l}var ka=wa("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:wa("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"})}),Sa=wa("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:wa("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"})}),Aa=wa("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:wa("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"})}),xa=wa("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:wa("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"})}),Ta=wa("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:wa("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"})}),Na=wa("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:wa("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"})}),Ma=wa("svg",{width:"77",height:"14",viewBox:"0 0 77 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[wa("g",{"clip-path":"url(#clip0_2415_6911)",children:[wa("mask",{id:"mask0_2415_6911",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"77",height:"14",children:wa("path",{d:"M0.5 0H76.5V14H0.5V0Z",fill:"white"})}),wa("g",{mask:"url(#mask0_2415_6911)",children:[wa("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"}),wa("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"}),wa("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"}),wa("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"}),wa("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"}),wa("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"})]})]}),wa("defs",{children:wa("clipPath",{id:"clip0_2415_6911",children:wa("rect",{width:"76",height:"14",fill:"white",transform:"translate(0.5)"})})})]}),Ra=wa("svg",{width:"16",height:"12",viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:wa("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"})});function _a(){return wa("a",{href:"https://posthog.com",target:"_blank",rel:"noopener",className:"footer-branding",children:["Survey by ",Ma]})}function Fa(e){var{text:t,submitDisabled:n,appearance:r,onSubmit:i,link:o,onPreviewSubmit:a}=e,{isPreviewMode:s,isPopup:u}=mo(ha),l=r.submitButtonTextColor||na(r.submitButtonColor||ra.submitButtonColor);return wa("div",{className:"bottom-section",children:[wa("div",{className:"buttons",children:wa("button",{className:"form-submit",disabled:n,"aria-label":"Submit survey",type:"button",style:u?{color:l}:{},onClick:()=>{o&&(null==Dn||Dn.open(o)),s?null==a||a():i()},children:t})}),!r.whiteLabel&&wa(_a,{})]})}function Za(e){var{question:t,description:n,descriptionContentType:r,backgroundColor:i,forceDisableHtml:o}=e,{isPopup:a}=mo(ha);return wa("div",{style:a?{backgroundColor:i||ra.backgroundColor}:{},children:[wa("div",{className:"survey-question",children:t}),n&&va({component:_i("div",{className:"survey-question-description"}),children:n,renderAsHtml:!o&&"text"!==r})]})}function Oa(e){var{onClick:t}=e,{isPreviewMode:n}=mo(ha);return wa("div",{className:"cancel-btn-wrapper",children:wa("button",{className:"form-cancel",onClick:t,disabled:n,"aria-label":"Close survey",type:"button",role:"button",children:Na})})}function Ea(e){var{header:t,description:r,contentType:i,forceDisableHtml:o,appearance:a,onClose:s,styleOverrides:u}=e,l=na(a.backgroundColor||ra.backgroundColor),{isPopup:c}=mo(ha);return wa("div",{className:"thank-you-message",style:n({},u),children:wa("div",{className:"thank-you-message-container",children:[c&&wa(Oa,{onClick:()=>s()}),wa("h3",{className:"thank-you-message-header",style:{color:l},children:t}),r&&va({component:_i("div",{className:"thank-you-message-body"}),children:r,renderAsHtml:!o&&"text"!==i,style:{color:l}}),c&&wa(Fa,{text:a.thankYouMessageCloseButtonText||"Close",submitDisabled:!1,appearance:a,onSubmit:()=>s()})]})})}function Ba(e){var{question:t,forceDisableHtml:n,appearance:r,onSubmit:i,onPreviewSubmit:o}=e,[a,s]=ho("");return wa(Zi,{children:[wa("div",{className:"question-container",children:[wa(Za,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,backgroundColor:r.backgroundColor,forceDisableHtml:n}),wa("textarea",{rows:4,placeholder:null==r?void 0:r.placeholder,onInput:e=>{s(e.currentTarget.value),e.stopPropagation()},onKeyDown:e=>{e.stopPropagation()}})]}),wa(Fa,{text:t.buttonText||"Submit",submitDisabled:!a&&!t.optional,appearance:r,onSubmit:()=>i(a),onPreviewSubmit:()=>o(a)})]})}function La(e){var{question:t,forceDisableHtml:n,appearance:r,onSubmit:i,onPreviewSubmit:o}=e;return wa(Zi,{children:[wa("div",{className:"question-container",children:wa(Za,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,forceDisableHtml:n})}),wa(Fa,{text:t.buttonText||"Submit",submitDisabled:!1,link:t.link,appearance:r,onSubmit:()=>i("link clicked"),onPreviewSubmit:()=>o("link clicked")})]})}function Da(e){var{question:t,forceDisableHtml:n,displayQuestionIndex:r,appearance:i,onSubmit:o,onPreviewSubmit:a}=e,s=t.scale,u=10===t.scale?0:1,[l,c]=ho(null);return wa(Zi,{children:[wa("div",{className:"question-container",children:[wa(Za,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,forceDisableHtml:n,backgroundColor:i.backgroundColor}),wa("div",{className:"rating-section",children:[wa("div",{className:"rating-options",children:["emoji"===t.display&&wa("div",{className:"rating-options-emoji",children:(3===t.scale?Va:Pa).map(((e,t)=>{var n=t+1===l;return wa("button",{className:"ratings-emoji question-"+r+"-rating-"+t+" "+(n?"rating-active":""),value:t+1,type:"button",onClick:()=>{c(t+1)},style:{fill:n?i.ratingButtonActiveColor:i.ratingButtonColor,borderColor:i.borderColor},children:e},t)}))}),"number"===t.display&&wa("div",{className:"rating-options-number",style:{gridTemplateColumns:"repeat("+(s-u+1)+", minmax(0, 1fr))"},children:Xa(t.scale).map(((e,t)=>wa(qa,{displayQuestionIndex:r,active:l===e,appearance:i,num:e,setActiveNumber:e=>{c(e)}},t)))})]}),wa("div",{className:"rating-text",children:[wa("div",{children:t.lowerBoundLabel}),wa("div",{children:t.upperBoundLabel})]})]})]}),wa(Fa,{text:t.buttonText||(null==i?void 0:i.submitButtonText)||"Submit",submitDisabled:sr(l)&&!t.optional,appearance:i,onSubmit:()=>o(l),onPreviewSubmit:()=>a(l)})]})}function qa(e){var{num:t,active:n,displayQuestionIndex:r,appearance:i,setActiveNumber:o}=e;return wa("button",{className:"ratings-number question-"+r+"-rating-"+t+" "+(n?"rating-active":""),type:"button",onClick:()=>{o(t)},style:{color:na(n?i.ratingButtonActiveColor:i.ratingButtonColor),backgroundColor:n?i.ratingButtonActiveColor:i.ratingButtonColor,borderColor:i.borderColor},children:t})}function Ha(e,t,n,r){if(r)return!1;if(sr(e))return!0;if($n(e)){if(!t&&0===e.length)return!0;if(t&&!n&&0===e.length)return!0}return!1}function Ya(e){var{question:t,forceDisableHtml:n,displayQuestionIndex:r,appearance:i,onSubmit:o,onPreviewSubmit:a}=e,s=function(e){return ro=5,po((function(){return{current:e}}),[])}(null),u=po((()=>(e=>{if(!e.shuffleOptions)return e.choices;var t=e.choices,n="";e.hasOpenChoice&&(n=t.pop());var r=ua(t,sa(t));return e.hasOpenChoice&&(e.choices.push(n),r.push(n)),r})(t)),[t]),[l,c]=ho(t.type===hi.MultipleChoice?[]:null),[d,f]=ho(!1),[h,v]=ho(""),p=t.type===hi.SingleChoice?"radio":"checkbox",m=(e,n)=>n?(f(!d),void(d||setTimeout((()=>{var e;return null==(e=s.current)?void 0:e.focus()}),0))):t.type===hi.SingleChoice?(c(e),void f(!1)):void(t.type===hi.MultipleChoice&&$n(l)&&(l.includes(e)?c(l.filter((t=>t!==e))):c([...l,e])));return wa(Zi,{children:[wa("div",{className:"question-container",children:[wa(Za,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,forceDisableHtml:n,backgroundColor:i.backgroundColor}),wa("div",{className:"multiple-choice-options limit-height",children:u.map(((e,n)=>{var i=!!t.hasOpenChoice&&n===t.choices.length-1,o="choice-option"+(i?" choice-option-open":""),a=i?d:t.type===hi.SingleChoice?l===e:$n(l)&&l.includes(e);return wa("div",{className:o,children:[wa("input",{type:p,id:"surveyQuestion"+r+"Choice"+n,name:"question"+r,checked:a,onClick:()=>m(e,i)}),wa("label",{htmlFor:"surveyQuestion"+r+"Choice"+n,style:{color:"black"},children:i?wa(Zi,{children:[wa("span",{children:[e,":"]}),wa("input",{type:"text",ref:s,id:"surveyQuestion"+r+"Choice"+n+"Open",name:"question"+r,value:h,onKeyDown:e=>{e.stopPropagation()},onInput:e=>(e=>{e.stopPropagation(),v(e.currentTarget.value),t.type===hi.SingleChoice&&c(e.currentTarget.value)})(e),onClick:t=>{d||m(e,!0),t.stopPropagation()}})]}):e}),wa("span",{className:"choice-check",style:{color:"black"},children:Ra})]},n)}))})]}),wa(Fa,{text:t.buttonText||"Submit",submitDisabled:Ha(l,d,h,!!t.optional),appearance:i,onSubmit:()=>{d&&t.type===hi.MultipleChoice?$n(l)&&o([...l,h]):o(l)},onPreviewSubmit:()=>{d&&t.type===hi.MultipleChoice?$n(l)&&a([...l,h]):a(l)}})]})}var Va=[Aa,Sa,ka],Pa=[xa,Aa,Sa,ka,Ta],Ga=[1,2,3,4,5],Wa=[1,2,3,4,5,6,7],ja=[0,1,2,3,4,5,6,7,8,9,10];function Xa(e){switch(e){case 5:default:return Ga;case 7:return Wa;case 10:return ja}}var za=Dn,Ka=Vn,Ja="ph:show_survey_widget";function Ua(e,t,n){var r,i=e.questions[t],o=t+1;if(null==(r=i.branching)||!r.type)return t===e.questions.length-1?vi.End:o;if(i.branching.type===vi.End)return vi.End;if(i.branching.type===vi.SpecificQuestion){if(Number.isInteger(i.branching.index))return i.branching.index}else if(i.branching.type===vi.ResponseBased){if(i.type===hi.SingleChoice){var a,s,u=i.choices.indexOf(""+n);if(-1===u&&i.hasOpenChoice&&(u=i.choices.length-1),null!=(a=i.branching)&&null!=(s=a.responseValues)&&s.hasOwnProperty(u)){var l=i.branching.responseValues[u];return Number.isInteger(l)?l:l===vi.End?vi.End:o}}else if(i.type===hi.Rating){var c,d;if("number"!=typeof n||!Number.isInteger(n))throw new Error("The response type must be an integer");var f=function(e,t){if(3===t){if(e<1||e>3)throw new Error("The response must be in range 1-3");return 1===e?"negative":2===e?"neutral":"positive"}if(5===t){if(e<1||e>5)throw new Error("The response must be in range 1-5");return e<=2?"negative":3===e?"neutral":"positive"}if(7===t){if(e<1||e>7)throw new Error("The response must be in range 1-7");return e<=3?"negative":4===e?"neutral":"positive"}if(10===t){if(e<0||e>10)throw new Error("The response must be in range 0-10");return e<=6?"detractors":e<=8?"passives":"promoters"}throw new Error("The scale must be one of: 3, 5, 7, 10")}(n,i.scale);if(null!=(c=i.branching)&&null!=(d=c.responseValues)&&d.hasOwnProperty(f)){var h=i.branching.responseValues[f];return Number.isInteger(h)?h:h===vi.End?vi.End:o}}return o}return So.warn("Falling back to next question index due to unexpected branching type"),o}class Qa{constructor(e){var t=this;this.h=new Map,this.p=new Map,this.m=()=>{var e,t=Ka.querySelectorAll("div[class^=PostHogSurvey]");return!(t.length>0)||1===(null==(e=t[t.length-1].shadowRoot)?void 0:e.childElementCount)},this.C=e=>{var t,r=null==(t=e.conditions)?void 0:t.seenSurveyWaitPeriodInDays;if(((e,t)=>{if(!t||!e)return!0;var n=new Date,r=Math.abs(n.getTime()-new Date(e).getTime());return Math.ceil(r/864e5)>t})(localStorage.getItem("lastSeenSurveyDate"),r)){var i=(e=>!!localStorage.getItem(da(e))&&!ca(e))(e);if(!i){var o;this.I(e.id),this.k(e.id);var a=(null==(o=e.appearance)?void 0:o.surveyPopupDelaySeconds)||0,s=((e,t,n,r)=>{var i=Uo.createElement("div");i.className=ya({id:t});var o=i.attachShadow({mode:"open"});if(e){var a=To(Uo,e,r);a&&o.appendChild(a)}return Uo.body.appendChild(i),o})(ea(null==e?void 0:e.appearance),e.id,0,this.S);if(a<=0)return Ui(wa(ts,{posthog:this.S,survey:e,removeSurveyFromFocus:this.A,isPopup:!0},"popover-survey"),s);var u=setTimeout((()=>{if(!ga(e))return this.A(e.id);Ui(wa(ts,{posthog:this.S,survey:n({},e,{appearance:n({},e.appearance,{surveyPopupDelaySeconds:0})}),removeSurveyFromFocus:this.A,isPopup:!0},"popover-survey"),s)}),1e3*a);this.h.set(e.id,u)}}},this.T=e=>{var t=Ca(e,this.S),n=ea(e.appearance),r="ph-data-style-id";if(!t.querySelector("style["+r+'="'+r+'"]')){var i=To(Ka,n,this.S);i&&(i.setAttribute(r,r),t.appendChild(i))}Ui(wa(rs,{posthog:this.S,survey:e,removeSurveyFromFocus:this.A},"feedback-survey-"+e.id),t)},this.N=e=>{var t=this.p.get(e);t&&(t.element.removeEventListener("click",t.listener),t.element.removeAttribute("PHWidgetSurveyClickListener"),this.p.delete(e),So.info("Removed click listener for survey "+e))},this.M=e=>{var t,n=null==(t=e.appearance)?void 0:t.widgetSelector;if(n){var r=Ka.querySelector(n),i=this.p.get(e.id);if(r){if(this.T(e),i){if(r===i.element)return;So.info("Selector element changed for survey "+e.id+". Re-attaching listener."),this.N(e.id)}if(!r.hasAttribute("PHWidgetSurveyClickListener")){var o=t=>{var n,r,i;if(t.stopPropagation(),(null==(n=e.appearance)?void 0:n.position)===di.NextToTrigger){var o=t.currentTarget.getBoundingClientRect(),a=za.innerHeight,s=za.innerWidth,u=parseInt((null==(r=e.appearance)?void 0:r.maxWidth)||"300"),l=o.left+o.width/2-u/2;l+u>s-20&&(l=s-u-20),l<20&&(l=20);var c=a-o.bottom,d=o.top,f=c<250&&d>c,h={position:"fixed",top:f?"auto":o.bottom+12+"px",left:l+"px",right:"auto",bottom:f?a-o.top+12+"px":"auto",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",borderBottom:"1.5px solid "+((null==(i=e.appearance)?void 0:i.borderColor)||"#c9c6c6"),borderRadius:"10px",zIndex:Qo};za.dispatchEvent(new CustomEvent(Ja,{detail:{surveyId:e.id,position:h}}))}else za.dispatchEvent(new CustomEvent(Ja,{detail:{surveyId:e.id,position:{}}}))};Ir(r,"click",o),r.setAttribute("PHWidgetSurveyClickListener","true"),this.p.set(e.id,{element:r,listener:o}),So.info("Attached click listener for survey "+e.id)}}else i&&this.N(e.id)}},this.renderSurvey=(e,t)=>{Ui(wa(ts,{posthog:this.S,survey:e,removeSurveyFromFocus:this.A,isPopup:!1},"popover-survey"),t)},this.getActiveMatchingSurveys=function(e,n){var r;void 0===n&&(n=!1),null==(r=t.S)||r.surveys.getSurveys((n=>{var r=n.filter((e=>t.checkSurveyEligibility(e).eligible&&t.R(e)&&t.F(e)&&t.Z(e)));e(r)}),n)},this.callSurveysAndEvaluateDisplayLogic=function(e){void 0===e&&(e=!1),t.getActiveMatchingSurveys((e=>{var n=e.filter((e=>e.type!==fi.API)),r=t.O(n),i=new Set;r.forEach((e=>{var n,r,o;e.type===fi.Widget&&((null==(n=e.appearance)?void 0:n.widgetType)===ci.Tab?t.T(e):(null==(r=e.appearance)?void 0:r.widgetType)===ci.Selector&&null!=(o=e.appearance)&&o.widgetSelector&&(i.add(e.id),t.M(e)));sr(t.B)&&e.type===fi.Popover&&t.m()&&t.C(e)})),t.p.forEach(((e,n)=>{i.has(n)||t.N(n)}))}),e)},this.k=e=>{sr(this.B)||So.error("Survey "+[...this.B]+" already in focus. Cannot add survey "+e+"."),this.B=e},this.A=e=>{this.B!==e&&So.error("Survey "+e+" is not in focus. Cannot remove survey "+e+"."),this.I(e),this.B=null},this.S=e,this.B=null}I(e){var t=this.h.get(e);t&&(clearTimeout(t),this.h.delete(e))}O(e){return e.sort(((e,t)=>{var n,r,i=e.schedule===pi.Always,o=t.schedule===pi.Always;return i&&!o?1:!i&&o?-1:((null==(n=e.appearance)?void 0:n.surveyPopupDelaySeconds)||0)-((null==(r=t.appearance)?void 0:r.surveyPopupDelaySeconds)||0)}))}L(e){return!e||!!this.S.featureFlags.isFeatureEnabled(e)}R(e){return!e.conditions||ga(e)&&function(e){var t,n,r;if(null==(t=e.conditions)||!t.deviceTypes||0===(null==(n=e.conditions)?void 0:n.deviceTypes.length))return!0;if(!Gn)return!1;var i=Ko(Gn);return pa[ma(null==(r=e.conditions)?void 0:r.deviceTypesMatchType)](e.conditions.deviceTypes,i)}(e)&&function(e){var t;return null==(t=e.conditions)||!t.selector||!(null==Uo||!Uo.querySelector(e.conditions.selector))}(e)}D(e){return ca(e)||this.L(e.internal_targeting_flag_key)}checkSurveyEligibility(e){var t={eligible:!0,reason:void 0};return function(e){return!(!e.start_date||e.end_date)}(e)?this.L(e.linked_flag_key)?this.L(e.targeting_flag_key)?(this.D(e)||(t.eligible=!1,t.reason="Survey internal targeting flag is not enabled and survey cannot activate repeatedly"),t):(t.eligible=!1,t.reason="Survey targeting feature flag is not enabled",t):(t.eligible=!1,t.reason="Survey linked feature flag is not enabled",t):(t.eligible=!1,t.reason="Survey is not running. It was completed on "+e.end_date,t)}F(e){var t;if(!function(e){var t,n,r;return!(null==(t=e.conditions)||null==(n=t.events)||null==(r=n.values)||!r.length)}(e)&&!function(e){var t,n,r;return!(null==(t=e.conditions)||null==(n=t.actions)||null==(r=n.values)||!r.length)}(e))return!0;var n=null==(t=this.S.surveys.q)?void 0:t.getSurveys();return!(null==n||!n.includes(e.id))}Z(e){var t;return null==(t=e.feature_flag_keys)||!t.length||e.feature_flag_keys.every((e=>{var{key:t,value:n}=e;return!t||!n||this.S.featureFlags.isFeatureEnabled(n)}))}getTestAPI(){return{addSurveyToFocus:this.k,removeSurveyFromFocus:this.A,surveyInFocus:this.B,surveyTimeouts:this.h,canShowNextEventBasedSurvey:this.m,handleWidget:this.T,handlePopoverSurvey:this.C,manageWidgetSelectorListener:this.M,sortSurveysByAppearanceDelay:this.O,checkFlags:this.Z.bind(this)}}}function $a(e){if(Ka&&za){var t=new Qa(e);return t.callSurveysAndEvaluateDisplayLogic(!0),setInterval((()=>{t.callSurveysAndEvaluateDisplayLogic(!1)}),1e3),t}}function es(e){var{survey:t,removeSurveyFromFocus:n,setSurveyVisible:r,isPreviewMode:i=!1}=e;vo((()=>{var e;if(!i&&null!=(e=t.conditions)&&e.url){var o=()=>{var e,i=t.type===fi.Widget,o=ga(t),a=(null==(e=t.appearance)?void 0:e.widgetType)===ci.Tab&&i;if(!o)return So.info("Hiding survey "+t.id+" because URL does not match"),r(!1),n(t.id);a&&(So.info("Showing survey "+t.id+" because it is a feedback button tab and URL matches"),r(!0))};Ir(za,"popstate",o),Ir(za,"hashchange",o);var a=za.history.pushState,s=za.history.replaceState;return za.history.pushState=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];a.apply(this,t),o()},za.history.replaceState=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];s.apply(this,t),o()},()=>{za.removeEventListener("popstate",o),za.removeEventListener("hashchange",o),za.history.pushState=a,za.history.replaceState=s}}}),[i,t,n,r])}function ts(e){var t,r,i,o,a,s,{survey:u,forceDisableHtml:l,posthog:c,style:d,previewPageIndex:f,removeSurveyFromFocus:h,isPopup:v,onPreviewSubmit:p=(()=>{}),onPopupSurveyDismissed:m=(()=>{}),onCloseConfirmationMessage:g=(()=>{})}=e,y=Number.isInteger(f),b=null!=(t=u.appearance)&&t.surveyPopupDelaySeconds?1e3*u.appearance.surveyPopupDelaySeconds:0,{isPopupVisible:C,isSurveySent:I,setIsPopupVisible:w}=function(e,t,n,r,i){var[o,a]=ho(r||0===n),[s,u]=ho(!1);return vo((()=>{if(t){if(!r){var o=t=>{t.detail.surveyId===e.id&&(i(e.id),a(!1))},s=t=>{var n,r;t.detail.surveyId===e.id&&(null!=(n=e.appearance)&&n.displayThankYouMessage?(u(!0),i(e.id),null!=(r=e.appearance)&&r.autoDisappear&&setTimeout((()=>{a(!1)}),5e3)):(i(e.id),a(!1)))},l=()=>{ga(e)&&(a(!0),za.dispatchEvent(new Event("PHSurveyShown")),t.capture("survey shown",{$survey_name:e.name,$survey_id:e.id,$survey_iteration:e.current_iteration,$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()),setTimeout((()=>{var t,n,r=null==(t=Ka.querySelector(ya(e,!0)))||null==(n=t.shadowRoot)?void 0:n.querySelector('textarea, input[type="text"]');r&&r.focus()}),100))};if(Ir(za,"PHSurveyClosed",o),Ir(za,"PHSurveySent",s),n>0){var c=setTimeout(l,n);return()=>{clearTimeout(c),za.removeEventListener("PHSurveyClosed",o),za.removeEventListener("PHSurveySent",s)}}return l(),()=>{za.removeEventListener("PHSurveyClosed",o),za.removeEventListener("PHSurveySent",s)}}}else So.error("usePopupVisibility hook called without a PostHog instance.")}),[]),es({survey:e,removeSurveyFromFocus:i,setSurveyVisible:a,isPreviewMode:r}),{isPopupVisible:o,isSurveySent:s,setIsPopupVisible:a}}(u,c,b,y,h),k=I||f===u.questions.length,S=null!=(r=d)&&r.left&&lr(null==(i=d)?void 0:i.left)?{left:d.left-40}:{};return y&&((d=d||{}).left="unset",d.right="unset",d.transform="unset"),C?wa(ha.Provider,{value:{isPreviewMode:y,previewPageIndex:f,onPopupSurveyDismissed:()=>{aa(u,c,y),m()},isPopup:v||!1,onPreviewSubmit:p},children:k?wa(Ea,{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||ra,styleOverrides:n({},d,S),onClose:()=>{w(!1),g()}}):wa(ns,{survey:u,forceDisableHtml:!!l,posthog:c,styleOverrides:d})}):null}function ns(e){var t,r,{survey:i,forceDisableHtml:o,posthog:a,styleOverrides:s}=e,u=na((null==(t=i.appearance)?void 0:t.backgroundColor)||ra.backgroundColor),[l,c]=ho({}),{previewPageIndex:d,onPopupSurveyDismissed:f,isPopup:h,onPreviewSubmit:v}=mo(ha),[p,m]=ho(d||0),g=po((()=>la(i)),[i]);vo((()=>{m(null!=d?d:0)}),[d]);return wa("form",{className:"survey-form",name:"surveyForm",style:h?n({color:u,borderColor:null==(r=i.appearance)?void 0:r.borderColor},s):{},children:g.map(((e,t)=>{var r;return p===t&&wa("div",{className:"survey-box",style:h?{backgroundColor:(null==(r=i.appearance)?void 0:r.backgroundColor)||ra.backgroundColor}:{},children:[h&&wa(Oa,{onClick:()=>{f()}}),is({question:e,forceDisableHtml:o,displayQuestionIndex:t,appearance:i.appearance||ra,onSubmit:r=>(e=>{var{res:t,displayQuestionIndex:r,questionId:o}=e;if(a)if(o){var s=function(e){return"$survey_response_"+e}(o);c(n({},l,{[s]:t}));var u=Ua(i,r,t);u===vi.End?oa(n({},l,{[s]:t}),i,a):m(u)}else So.error("onNextButtonClick called without a questionId.");else So.error("onNextButtonClick called without a PostHog instance.")})({res:r,displayQuestionIndex:t,questionId:e.id}),onPreviewSubmit:v})]})}))})}function rs(e){var t,n,r,i,o,{survey:a,forceDisableHtml:s,posthog:u,readOnly:l,removeSurveyFromFocus:c}=e,[d,f]=ho(!0),[h,v]=ho(!1),[p,m]=ho({});if(vo((()=>{var e;if(u){if(!l){var t;if("tab"===(null==(e=a.appearance)?void 0:e.widgetType))m({top:"50%",bottom:"auto",borderRadius:10,borderBottom:"1.5px solid "+((null==(t=a.appearance)?void 0:t.borderColor)||"#c9c6c6")});var n=e=>{var t,n=e;(null==(t=n.detail)?void 0:t.surveyId)===a.id&&(So.info("Received show event for survey "+a.id),m(n.detail.position||{}),v(!0))};return Ir(za,Ja,n),()=>{za.removeEventListener(Ja,n)}}}else So.error("FeedbackWidget called without a PostHog instance.")}),[u,l,a.id,null==(t=a.appearance)?void 0:t.widgetType,null==(n=a.appearance)?void 0:n.widgetSelector,null==(r=a.appearance)?void 0:r.borderColor]),es({survey:a,removeSurveyFromFocus:c,setSurveyVisible:f}),!d)return null;var g=()=>{v(!1)};return wa(Zi,{children:["tab"===(null==(i=a.appearance)?void 0:i.widgetType)&&wa("div",{className:"ph-survey-widget-tab",onClick:()=>!l&&v(!h),style:{color:na(a.appearance.widgetColor)},children:[wa("div",{className:"ph-survey-widget-tab-icon"}),(null==(o=a.appearance)?void 0:o.widgetLabel)||""]}),h&&wa(ts,{posthog:u,survey:a,forceDisableHtml:s,style:p,removeSurveyFromFocus:c,isPopup:!0,onPopupSurveyDismissed:g,onCloseConfirmationMessage:g},"feedback-widget-survey")]})}var is=e=>{var{question:t,forceDisableHtml:r,displayQuestionIndex:i,appearance:o,onSubmit:a,onPreviewSubmit:s}=e,u={[hi.Open]:Ba,[hi.Link]:La,[hi.Rating]:Da,[hi.SingleChoice]:Ya,[hi.MultipleChoice]:Ya},l={question:t,forceDisableHtml:r,appearance:o,onPreviewSubmit:e=>{s(e)},onSubmit:e=>{a(e)}},c={[hi.Open]:{},[hi.Link]:{},[hi.Rating]:{displayQuestionIndex:i},[hi.SingleChoice]:{displayQuestionIndex:i},[hi.MultipleChoice]:{displayQuestionIndex:i}},d=u[t.type],f=n({},l,c[t.type]);return wa(d,n({},f))};function os(e){return!ir(Event)&&as(e,Event)}function as(e,t){try{return e instanceof t}catch(e){return!1}}function ss(e){return sr(e)||!rr(e)&&!er(e)}function us(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object DOMError]":return!0;default:return as(e,Error)}}function ls(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function cs(e){return ls(e,"DOMError")}Wn.__PosthogExtensions__=Wn.__PosthogExtensions__||{},Wn.__PosthogExtensions__.canActivateRepeatedly=ca,Wn.__PosthogExtensions__.generateSurveys=$a,Wn.extendPostHogWithSurveys=$a;var ds=/\(error: (.*)\)/,fs=50,hs="?";function vs(e,t,n,r){var i={platform:"web:javascript",filename:e,function:"<anonymous>"===t?hs:t,in_app:!0};return ir(n)||(i.lineno=n),ir(r)||(i.colno=r),i}var ps=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,ms=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,gs=/\((\S*)(?::(\d+))(?::(\d+))\)/,ys=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,bs=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Cs=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i=t.sort(((e,t)=>e[0]-t[0])).map((e=>e[1]));return function(e,t){void 0===t&&(t=0);for(var r=[],o=e.split("\n"),a=t;a<o.length;a++){var s=o[a];if(!(s.length>1024)){var u=ds.test(s)?s.replace(ds,"$1"):s;if(!u.match(/\S*Error: /)){for(var l of i){var c=l(u);if(c){r.push(c);break}}if(r.length>=fs)break}}}return function(e){if(!e.length)return[];var t=Array.from(e);return t.reverse(),t.slice(0,fs).map((e=>n({},e,{filename:e.filename||Is(t).filename,function:e.function||hs})))}(r)}}(...[[30,e=>{var t=ps.exec(e);if(t){var[,n,r,i]=t;return vs(n,hs,+r,+i)}var o=ms.exec(e);if(o){if(o[2]&&0===o[2].indexOf("eval")){var a=gs.exec(o[2]);a&&(o[2]=a[1],o[3]=a[2],o[4]=a[3])}var[s,u]=As(o[1]||hs,o[2]);return vs(u,s,o[3]?+o[3]:void 0,o[4]?+o[4]:void 0)}}],[50,e=>{var t=ys.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){var n=bs.exec(t[3]);n&&(t[1]=t[1]||"eval",t[3]=n[1],t[4]=n[2],t[5]="")}var r=t[3],i=t[1]||hs;return[i,r]=As(i,r),vs(r,i,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]);function Is(e){return e[e.length-1]||{}}var ws,ks,Ss,As=(e,t)=>{var n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:hs,n?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]};var xs=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;function Ts(e,t){void 0===t&&(t=0);var n=e.stacktrace||e.stack||"",r=function(e){if(e&&Ns.test(e.message))return 1;return 0}(e);try{var i=Cs,o=function(e,t){var n=function(e){var t=globalThis._posthogChunkIds;if(!t)return{};var n=Object.keys(t);return Ss&&n.length===ks||(ks=n.length,Ss=n.reduce(((n,r)=>{ws||(ws={});var i=ws[r];if(i)n[i[0]]=i[1];else for(var o=e(r),a=o.length-1;a>=0;a--){var s=o[a],u=null==s?void 0:s.filename,l=t[r];if(u&&l){n[u]=l,ws[r]=[u,l];break}}return n}),{})),Ss}(t);return e.forEach((e=>{e.filename&&(e.chunk_id=n[e.filename])})),e}(i(n,r),i);return o.slice(0,o.length-t)}catch(e){}return[]}var Ns=/Minified React error #\d+;/i;function Ms(e,t){var n,r,i=Ts(e),o=null===(n=null==t?void 0:t.handled)||void 0===n||n,a=null!==(r=null==t?void 0:t.synthetic)&&void 0!==r&&r;return{type:null!=t&&t.overrideExceptionType?t.overrideExceptionType:e.name,value:function(e){var t=e.message;if(t.error&&"string"==typeof t.error.message)return String(t.error.message);return String(t)}(e),stacktrace:{frames:i,type:"raw"},mechanism:{handled:o,synthetic:a}}}function Rs(e,t){var n=Ms(e,t);return e.cause&&us(e.cause)&&e.cause!==e?[n,...Rs(e.cause,{handled:null==t?void 0:t.handled,synthetic:null==t?void 0:t.synthetic})]:[n]}function _s(e,t){return{$exception_list:Rs(e,t),$exception_level:"error"}}function Fs(e,t){var n,r,i,o=null===(n=null==t?void 0:t.handled)||void 0===n||n,a=null===(r=null==t?void 0:t.synthetic)||void 0===r||r,s={type:null!=t&&t.overrideExceptionType?t.overrideExceptionType:null!==(i=null==t?void 0:t.defaultExceptionType)&&void 0!==i?i:"Error",value:e||(null==t?void 0:t.defaultExceptionMessage),mechanism:{handled:o,synthetic:a}};if(null!=t&&t.syntheticException){var u=Ts(t.syntheticException,1);u.length&&(s.stacktrace={frames:u,type:"raw"})}return{$exception_list:[s],$exception_level:"error"}}function Zs(e){return or(e)&&!ar(e)&&jn.indexOf(e)>=0}function Os(e,t){var n,r,i=null===(n=null==t?void 0:t.handled)||void 0===n||n,o=null===(r=null==t?void 0:t.synthetic)||void 0===r||r,a=null!=t&&t.overrideExceptionType?t.overrideExceptionType:os(e)?e.constructor.name:"Error",s="Non-Error 'exception' captured with keys: "+function(e,t){void 0===t&&(t=40);var n=Object.keys(e);if(n.sort(),!n.length)return"[object has no keys]";for(var r=n.length;r>0;r--){var i=n.slice(0,r).join(", ");if(!(i.length>t))return r===n.length||i.length<=t?i:i.slice(0,t)+"..."}return""}(e),u={type:a,value:s,mechanism:{handled:i,synthetic:o}};if(null!=t&&t.syntheticException){var l=Ts(null==t?void 0:t.syntheticException,1);l.length&&(u.stacktrace={frames:l,type:"raw"})}return{$exception_list:[u],$exception_level:Zs(e.level)?e.level:"error"}}function Es(e,t){var{error:r,event:i}=e,o={$exception_list:[]},a=r||i;if(cs(a)||function(e){return ls(e,"DOMException")}(a)){var s=a;if(function(e){return"stack"in e}(a))o=_s(a,t);else{var u=s.name||(cs(s)?"DOMError":"DOMException"),l=s.message?u+": "+s.message:u;o=Fs(l,n({},t,{overrideExceptionType:cs(s)?"DOMError":"DOMException",defaultExceptionMessage:l}))}return"code"in s&&(o.$exception_DOMException_code=""+s.code),o}if(function(e){return ls(e,"ErrorEvent")}(a)&&a.error)return _s(a.error,t);if(us(a))return _s(a,t);if(function(e){return ls(e,"Object")}(a)||os(a))return Os(a,t);if(ir(r)&&or(i)){var c="Error",d=i,f=i.match(xs);return f&&(c=f[1],d=f[2]),Fs(d,n({},t,{overrideExceptionType:c,defaultExceptionMessage:d}))}return Fs(a,t)}function Bs(e){var[t]=e,n=function(e){if(ss(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}(t);return ss(n)?Fs("Non-Error promise rejection captured with value: "+String(n),{handled:!1,synthetic:!1,overrideExceptionType:"UnhandledRejection"}):Es({event:n},{handled:!1,overrideExceptionType:"UnhandledRejection",defaultExceptionMessage:String(n)})}var Ls=pr("[ExceptionAutocapture]"),Ds={wrapOnError:e=>{var t=Dn;t||Ls.info("window not available, cannot wrap onerror");var n=t.onerror;return t.onerror=function(){for(var t,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=Es({event:i[0],error:i[4]});return e(a),null!==(t=null==n?void 0:n(...i))&&void 0!==t&&t},t.onerror.__POSTHOG_INSTRUMENTED__=!0,()=>{var e;null==(e=t.onerror)||delete e.__POSTHOG_INSTRUMENTED__,t.onerror=n}},wrapUnhandledRejection:e=>{var t=Dn;t||Ls.info("window not available, cannot wrap onUnhandledRejection");var n=t.onunhandledrejection;return t.onunhandledrejection=function(){for(var r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var s=Bs(o);return e(s),null!==(r=null==n?void 0:n.apply(t,o))&&void 0!==r&&r},t.onunhandledrejection.__POSTHOG_INSTRUMENTED__=!0,()=>{var e;null==(e=t.onunhandledrejection)||delete e.__POSTHOG_INSTRUMENTED__,t.onunhandledrejection=n}},wrapConsoleError:e=>{var t=console;t||Ls.info("console not available, cannot wrap console.error");var n=t.error;return t.error=function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];var o=r.join(" "),a=r.find((e=>e instanceof Error)),s=a?Es({event:o,error:a}):Es({event:o},{syntheticException:new Error("PostHog syntheticException")});return e(s),null==n?void 0:n(...r)},t.error.__POSTHOG_INSTRUMENTED__=!0,()=>{var e;null==(e=t.error)||delete e.__POSTHOG_INSTRUMENTED__,t.error=n}}};Wn.__PosthogExtensions__=Wn.__PosthogExtensions__||{},Wn.__PosthogExtensions__.errorWrappingFunctions=Ds,Wn.posthogErrorWrappingFunctions=Ds;var qs=(e,t)=>{if(e){var{sessionId:n,windowId:r}=e.checkAndGetSessionAndWindowId(!0);t.headers.set("X-POSTHOG-SESSION-ID",n),t.headers.set("X-POSTHOG-WINDOW-ID",r)}};Wn.__PosthogExtensions__=Wn.__PosthogExtensions__||{};var Hs={_patchFetch:e=>kr(Dn,"fetch",(n=>function(){var r=t((function*(t,r){var i=new Request(t,r);return qs(e,i),n(i)}));return function(e,t){return r.apply(this,arguments)}}())),_patchXHR:e=>kr(Dn.XMLHttpRequest.prototype,"open",(t=>function(n,r,i,o,a){void 0===i&&(i=!0);var s=new Request(r);return qs(e,s),t.call(this,n,s.url,i,o,a)}))};Wn.__PosthogExtensions__.tracingHeadersPatchFns=Hs,Wn.postHogTracingHeadersPatchFns=Hs;var Ys,Vs,Ps=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},Gs=function(e){if("loading"===document.readyState)return"loading";var t=Ps();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"},Ws=function(e){var t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},js=function(e,t){var n="";try{for(;e&&9!==e.nodeType;){var r=e,i=r.id?"#"+r.id:Ws(r)+(r.classList&&r.classList.value&&r.classList.value.trim()&&r.classList.value.trim().length?"."+r.classList.value.trim().replace(/\s+/g,"."):"");if(n.length+i.length>(t||100)-1)return n||i;if(n=n?i+">"+n:i,r.id)break;e=r.parentNode}}catch(e){}return n},Xs=-1,zs=function(){return Xs},Ks=function(e){addEventListener("pageshow",(function(t){t.persisted&&(Xs=t.timeStamp,e(t))}),!0)},Js=function(){var e=Ps();return e&&e.activationStart||0},Us=function(e,t){var n=Ps(),r="navigate";return zs()>=0?r="back-forward-cache":n&&(document.prerendering||Js()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.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:r}},Qs=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},$s=function(e,t,n,r){var i,o;return function(a){t.value>=0&&(a||r)&&((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,n),e(t))}},eu=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},tu=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},nu=function(e){var t=!1;return function(){t||(e(),t=!0)}},ru=-1,iu=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},ou=function(e){"hidden"===document.visibilityState&&ru>-1&&(ru="visibilitychange"===e.type?e.timeStamp:0,su())},au=function(){addEventListener("visibilitychange",ou,!0),addEventListener("prerenderingchange",ou,!0)},su=function(){removeEventListener("visibilitychange",ou,!0),removeEventListener("prerenderingchange",ou,!0)},uu=function(){return ru<0&&(ru=iu(),au(),Ks((function(){setTimeout((function(){ru=iu(),au()}),0)}))),{get firstHiddenTime(){return ru}}},lu=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},cu=[1800,3e3],du=function(e,t){t=t||{},lu((function(){var n,r=uu(),i=Us("FCP"),o=Qs("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime<r.firstHiddenTime&&(i.value=Math.max(e.startTime-Js(),0),i.entries.push(e),n(!0)))}))}));o&&(n=$s(e,i,cu,t.reportAllChanges),Ks((function(r){i=Us("FCP"),n=$s(e,i,cu,t.reportAllChanges),eu((function(){i.value=performance.now()-r.timeStamp,n(!0)}))})))}))},fu=[.1,.25],hu=0,vu=1/0,pu=0,mu=function(e){e.forEach((function(e){e.interactionId&&(vu=Math.min(vu,e.interactionId),pu=Math.max(pu,e.interactionId),hu=pu?(pu-vu)/7+1:0)}))},gu=function(){return Ys?hu:performance.interactionCount||0},yu=function(){"interactionCount"in performance||Ys||(Ys=Qs("event",mu,{type:"event",buffered:!0,durationThreshold:0}))},bu=[],Cu=new Map,Iu=0,wu=[],ku=function(e){if(wu.forEach((function(t){return t(e)})),e.interactionId||"first-input"===e.entryType){var t=bu[bu.length-1],n=Cu.get(e.interactionId);if(n||bu.length<10||e.duration>t.latency){if(n)e.duration>n.latency?(n.entries=[e],n.latency=e.duration):e.duration===n.latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};Cu.set(r.id,r),bu.push(r)}bu.sort((function(e,t){return t.latency-e.latency})),bu.length>10&&bu.splice(10).forEach((function(e){return Cu.delete(e.id)}))}}},Su=function(e){var t=self.requestIdleCallback||self.setTimeout,n=-1;return e=nu(e),"hidden"===document.visibilityState?e():(n=t(e),tu(e)),n},Au=[200,500],xu=function(e,t){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(t=t||{},lu((function(){var n;yu();var r,i=Us("INP"),o=function(e){Su((function(){e.forEach(ku);var t=function(){var e=Math.min(bu.length-1,Math.floor((gu()-Iu)/50));return bu[e]}();t&&t.latency!==i.value&&(i.value=t.latency,i.entries=t.entries,r())}))},a=Qs("event",o,{durationThreshold:null!==(n=t.durationThreshold)&&void 0!==n?n:40});r=$s(e,i,Au,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),tu((function(){o(a.takeRecords()),r(!0)})),Ks((function(){Iu=gu(),bu.length=0,Cu.clear(),i=Us("INP"),r=$s(e,i,Au,t.reportAllChanges)})))})))},Tu=[],Nu=[],Mu=0,Ru=new WeakMap,_u=new Map,Fu=-1,Zu=function(e){Tu=Tu.concat(e),Ou()},Ou=function(){Fu<0&&(Fu=Su(Eu))},Eu=function(){_u.size>10&&_u.forEach((function(e,t){Cu.has(t)||_u.delete(t)}));var e=bu.map((function(e){return Ru.get(e.entries[0])})),t=Nu.length-50;Nu=Nu.filter((function(n,r){return r>=t||e.includes(n)}));for(var n=new Set,r=0;r<Nu.length;r++){var i=Nu[r];Bu(i.startTime,i.processingEnd).forEach((function(e){n.add(e)}))}var o=Tu.length-1-50;Tu=Tu.filter((function(e,t){return e.startTime>Mu&&t>o||n.has(e)})),Fu=-1};wu.push((function(e){e.interactionId&&e.target&&!_u.has(e.interactionId)&&_u.set(e.interactionId,e.target)}),(function(e){var t,n=e.startTime+e.duration;Mu=Math.max(Mu,e.processingEnd);for(var r=Nu.length-1;r>=0;r--){var i=Nu[r];if(Math.abs(n-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:n,entries:[e]},Nu.push(t)),(e.interactionId||"first-input"===e.entryType)&&Ru.set(e,t),Ou()}));var Bu=function(e,t){for(var n,r=[],i=0;n=Tu[i];i++)if(!(n.startTime+n.duration<e)){if(n.startTime>t)break;r.push(n)}return r},Lu=[2500,4e3],Du={},qu={onLCP:function(e,t){!function(e,t){t=t||{},lu((function(){var n,r=uu(),i=Us("LCP"),o=function(e){t.reportAllChanges||(e=e.slice(-1)),e.forEach((function(e){e.startTime<r.firstHiddenTime&&(i.value=Math.max(e.startTime-Js(),0),i.entries=[e],n())}))},a=Qs("largest-contentful-paint",o);if(a){n=$s(e,i,Lu,t.reportAllChanges);var s=nu((function(){Du[i.id]||(o(a.takeRecords()),a.disconnect(),Du[i.id]=!0,n(!0))}));["keydown","click"].forEach((function(e){addEventListener(e,(function(){return Su(s)}),{once:!0,capture:!0})})),tu(s),Ks((function(r){i=Us("LCP"),n=$s(e,i,Lu,t.reportAllChanges),eu((function(){i.value=performance.now()-r.timeStamp,Du[i.id]=!0,n(!0)}))}))}}))}((function(t){var n=function(e){var t={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:e.value};if(e.entries.length){var n=Ps();if(n){var r=n.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,n.responseStart-r),s=Math.max(a,o?(o.requestStart||o.startTime)-r:0),u=Math.max(s,o?o.responseEnd-r:0),l=Math.max(u,i.startTime-r);t={element:js(i.element),timeToFirstByte:a,resourceLoadDelay:s-a,resourceLoadDuration:u-s,elementRenderDelay:l-u,navigationEntry:n,lcpEntry:i},i.url&&(t.url=i.url),o&&(t.lcpResourceEntry=o)}}return Object.assign(e,{attribution:t})}(t);e(n)}),t)},onCLS:function(e,t){!function(e,t){t=t||{},du(nu((function(){var n,r=Us("CLS",0),i=0,o=[],a=function(e){e.forEach((function(e){if(!e.hadRecentInput){var t=o[0],n=o[o.length-1];i&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(i+=e.value,o.push(e)):(i=e.value,o=[e])}})),i>r.value&&(r.value=i,r.entries=o,n())},s=Qs("layout-shift",a);s&&(n=$s(e,r,fu,t.reportAllChanges),tu((function(){a(s.takeRecords()),n(!0)})),Ks((function(){i=0,r=Us("CLS",0),n=$s(e,r,fu,t.reportAllChanges),eu((function(){return n()}))})),setTimeout(n,0))})))}((function(t){var n=function(e){var t,n={};if(e.entries.length){var r=e.entries.reduce((function(e,t){return e&&e.value>t.value?e:t}));if(r&&r.sources&&r.sources.length){var i=(t=r.sources).find((function(e){return e.node&&1===e.node.nodeType}))||t[0];i&&(n={largestShiftTarget:js(i.node),largestShiftTime:r.startTime,largestShiftValue:r.value,largestShiftSource:i,largestShiftEntry:r,loadState:Gs(r.startTime)})}}return Object.assign(e,{attribution:n})}(t);e(n)}),t)},onFCP:function(e,t){du((function(t){var n=function(e){var t={timeToFirstByte:0,firstByteToFCP:e.value,loadState:Gs(zs())};if(e.entries.length){var n=Ps(),r=e.entries[e.entries.length-1];if(n){var i=n.activationStart||0,o=Math.max(0,n.responseStart-i);t={timeToFirstByte:o,firstByteToFCP:e.value-o,loadState:Gs(e.entries[0].startTime),navigationEntry:n,fcpEntry:r}}}return Object.assign(e,{attribution:t})}(t);e(n)}),t)},onINP:function(e,t){Vs||(Vs=Qs("long-animation-frame",Zu)),xu((function(t){var n=function(e){var t=e.entries[0],n=Ru.get(t),r=t.processingStart,i=n.processingEnd,o=n.entries.sort((function(e,t){return e.processingStart-t.processingStart})),a=Bu(t.startTime,i),s=e.entries.find((function(e){return e.target})),u=s&&s.target||_u.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:js(u),interactionTargetElement:u,interactionType:t.name.startsWith("key")?"keyboard":"pointer",interactionTime:t.startTime,nextPaintTime:c,processedEventEntries:o,longAnimationFrameEntries:a,inputDelay:r-t.startTime,processingDuration:i-r,presentationDelay:Math.max(c-i,0),loadState:Gs(t.startTime)};return Object.assign(e,{attribution:d})}(t);e(n)}),t)}};function Hu(e,t){return t.length>e?t.slice(0,e)+"...":t}function Yu(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do{t=t.previousSibling}while(t&&!Ar(t));return t}function Vu(e,t,n,r){var i=e.tagName.toLowerCase(),o={tag_name:i};Rr.indexOf(i)>-1&&!n&&("a"===i.toLowerCase()||"button"===i.toLowerCase()?o.$el_text=Hu(1024,Hr(e)):o.$el_text=Hu(1024,Mr(e)));var a=Nr(e);a.length>0&&(o.classes=a.filter((function(e){return""!==e}))),yr(e.attributes,(function(n){var i;if((!Fr(e)||-1!==["name","id","class","aria-label"].indexOf(n.name))&&((null==r||!r.includes(n.name))&&!t&&qr(n.value)&&(i=n.name,!or(i)||"_ngcontent"!==i.substring(0,10)&&"_nghost"!==i.substring(0,7)))){var a=n.value;"class"===n.name&&(a=Tr(a).join(" ")),o["attr__"+n.name]=Hu(1024,a)}}));for(var s=1,u=1,l=e;l=Yu(l);)s++,l.tagName===e.tagName&&u++;return o.nth_child=s,o.nth_of_type=u,o}function Pu(e,t){for(var n,r,i,{e:o,maskAllElementAttributes:a,maskAllText:s,elementAttributeIgnoreList:u,elementsChainAsString:l}=t,c=[e],d=e;d.parentNode&&!xr(d,"body");)(i=d.parentNode)&&11===i.nodeType?(c.push(d.parentNode.host),d=d.parentNode.host):(c.push(d.parentNode),d=d.parentNode);var f,h,v,p=[],m={},g=!1,y=!1;if(yr(c,(e=>{var t=_r(e);"a"===e.tagName.toLowerCase()&&(g=e.getAttribute("href"),g=t&&g&&qr(g)&&g),Xn(Nr(e),"ph-no-capture")&&(y=!0),p.push(Vu(e,a,s,u));var n=function(e){if(!_r(e))return{};var t={};return yr(e.attributes,(function(e){if(e.name&&0===e.name.indexOf("data-ph-capture-attribute")){var n=e.name.replace("data-ph-capture-attribute-",""),r=e.value;n&&r&&qr(r)&&(t[n]=r)}})),t}(e);br(m,n)})),y)return{props:{},explicitNoCapture:y};if(s||("a"===e.tagName.toLowerCase()||"button"===e.tagName.toLowerCase()?p[0].$el_text=Hr(e):p[0].$el_text=Mr(e)),g){var b,C;p[0].attr__href=g;var I=null==(h=g,v=null==Vn?void 0:Vn.createElement("a"),b=ir(v)?null:(v.href=h,v))?void 0:b.host,w=null==Dn||null==(C=Dn.location)?void 0:C.host;I&&w&&I!==w&&(f=g)}return{props:br({$event_type:o.type,$ce_version:1},l?{}:{$elements:p},{$elements_chain:Vr(p)},null!=(n=p[0])&&n.$el_text?{$el_text:null==(r=p[0])?void 0:r.$el_text}:{},f&&"click"===o.type?{$external_click_url:f}:{},m)}}Wn.__PosthogExtensions__=Wn.__PosthogExtensions__||{},Wn.__PosthogExtensions__.postHogWebVitalsCallbacks=qu,Wn.postHogWebVitalsCallbacks=qu;var Gu={};function Wu(e){return function(e,t){var n=Gu[e];if(n)return n;var r=t[e];if(tr(r)&&!nr())return Gu[e]=r.bind(t);var i=t.document;if(i&&er(i.createElement))try{var o=i.createElement("iframe");o.hidden=!0,i.head.appendChild(o);var a=o.contentWindow;a&&a[e]&&(r=a[e]),i.head.removeChild(o)}catch(t){vr.warn("Could not create sandbox iframe for "+e+" check, bailing to assignableWindow."+e+": ",t)}return r&&er(r)?Gu[e]=r.bind(t):r}("MutationObserver",e)}function ju(e){var t=function(e){return ir(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 Xu(e,t){return lr(e)&&e>=t}class zu{H(e){var t,n,r,i,o=this.Y((null==e?void 0:e.__onCapture)||this.V.bind(this));return{element_attribute_ignorelist:null!==(t=null==e?void 0:e.element_attribute_ignorelist)&&void 0!==t?t:o.element_attribute_ignorelist,scroll_threshold_ms:null!==(n=null==e?void 0:e.scroll_threshold_ms)&&void 0!==n?n:o.scroll_threshold_ms,selection_change_threshold_ms:null!==(r=null==e?void 0:e.selection_change_threshold_ms)&&void 0!==r?r:o.selection_change_threshold_ms,mutation_threshold_ms:null!==(i=null==e?void 0:e.mutation_threshold_ms)&&void 0!==i?i:o.mutation_threshold_ms,__onCapture:o.__onCapture}}constructor(e,t){this.P=[],this.Y=e=>({element_attribute_ignorelist:[],scroll_threshold_ms:100,selection_change_threshold_ms:100,mutation_threshold_ms:2500,__onCapture:e}),this.G=e=>{var t=ju(e);sr(t)||this.W(t)||this.P.push(t),this.P.length&&ir(this.j)&&(this.j=Wn.setTimeout((()=>{this.X()}),1e3))},this.K=()=>{var e=Date.now();e%50==0&&this.P.forEach((t=>{ir(t.scrollDelayMs)&&(t.scrollDelayMs=e-t.timestamp)}))},this.J=()=>{this.U=Date.now()},this.instance=e,this.$=this.H(t),this._onCapture=this.$.__onCapture}start(e){this.ee(),this.te(),this.ne(),this.re(e)}re(e){if(!this.ie){var t=Wu(Wn);this.ie=new t((e=>{this.oe(e)})),this.ie.observe(e,{attributes:!0,characterData:!0,childList:!0,subtree:!0})}}stop(){var e;null==(e=this.ie)||e.disconnect(),this.ie=void 0,Wn.removeEventListener("click",this.G),Wn.removeEventListener("scroll",this.K,{capture:!0}),Wn.removeEventListener("selectionchange",this.J)}oe(e){this.ae=Date.now()}ee(){Ir(Wn,"click",this.G)}te(){Ir(Wn,"scroll",this.K,{capture:!0})}ne(){Ir(Wn,"selectionchange",this.J)}W(e){if(!e)return!0;if((t=e.node)instanceof Element&&("__POSTHOG_TOOLBAR__"===t.id||null!=t.closest&&t.closest(".toolbar-global-fade-container")))return!0;var t,n=this.P.some((t=>t.node===e.node&&Math.abs(t.timestamp-e.timestamp)<1e3));return!!n||!(!xr(e.node,"html")&&Ar(e.node)&&!Rr.includes(e.node.tagName.toLowerCase()))}X(){if(this.P.length){clearTimeout(this.j),this.j=void 0;var e=this.P;for(var t of(this.P=[],e)){var n;t.mutationDelayMs=null!==(n=t.mutationDelayMs)&&void 0!==n?n:this.ae&&t.timestamp<=this.ae?this.ae-t.timestamp:void 0,t.absoluteDelayMs=Date.now()-t.timestamp,t.selectionChangedDelayMs=this.U&&t.timestamp<=this.U?this.U-t.timestamp:void 0;var r=Xu(t.scrollDelayMs,this.$.scroll_threshold_ms),i=Xu(t.selectionChangedDelayMs,this.$.selection_change_threshold_ms),o=Xu(t.mutationDelayMs,this.$.mutation_threshold_ms),a=Xu(t.absoluteDelayMs,1.1*this.$.mutation_threshold_ms),s=lr(t.scrollDelayMs)&&t.scrollDelayMs<this.$.scroll_threshold_ms,u=lr(t.mutationDelayMs)&&t.mutationDelayMs<this.$.mutation_threshold_ms,l=lr(t.selectionChangedDelayMs)&&t.selectionChangedDelayMs<this.$.selection_change_threshold_ms;s||u||l||(r||o||a||i?this._onCapture(t,{$dead_click_last_mutation_timestamp:this.ae,$dead_click_event_timestamp:t.timestamp,$dead_click_scroll_timeout:r,$dead_click_mutation_timeout:o,$dead_click_absolute_timeout:a,$dead_click_selection_changed_timeout:i}):t.absoluteDelayMs<this.$.mutation_threshold_ms&&this.P.push(t))}this.P.length&&ir(this.j)&&(this.j=Wn.setTimeout((()=>{this.X()}),1e3))}}V(e,t){this.instance.capture("$dead_click",n({},t,Pu(e.node,{e:e.originalEvent,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.$.element_attribute_ignorelist,elementsChainAsString:!1}).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)})}}Wn.__PosthogExtensions__=Wn.__PosthogExtensions__||{},Wn.__PosthogExtensions__.initDeadClicksAutocapture=(e,t)=>new zu(e,t)}();
1
+ !function(){"use strict";function e(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function t(t){return function(){var n=this,r=arguments;return new Promise((function(i,o){var a=t.apply(n,r);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 n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}var r,i=["type"],o=Object.defineProperty,a=(e,t,n)=>((e,t,n)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),s=Object.defineProperty,u=(e,t,n)=>((e,t,n)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),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 f={};function h(e){if(f[e])return f[e];var t=function(e){var t,n=null==globalThis||null==(t=globalThis.Zone)||null==t.__symbol__?void 0:t.__symbol__(e);return n&&globalThis[n]?globalThis[n]:void 0}(e)||globalThis[e],n=t.prototype,r=e in c?c[e]:void 0,i=Boolean(r&&r.every((e=>{var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(n,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))}))),o=e in d?d[e]:void 0,a=Boolean(o&&o.every((e=>{var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))})));if(i&&a)return f[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?f[e]=l:t.prototype}catch(e){return t.prototype}}var v={};function p(e,t,n){var r,i=e+"."+String(n);if(v[i])return v[i].call(t);var o=h(e),a=null==(r=Object.getOwnPropertyDescriptor(o,n))?void 0:r.get;return a?(v[i]=a,a.call(t)):t[n]}var m={};function g(e,t,n){var r=e+"."+String(n);if(m[r])return m[r].bind(t);var i=h(e)[n];return"function"!=typeof i?t[n]:(m[r]=i,i.bind(t))}var y={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 g("Node",e,"contains")(t)},getRootNode:function(e){return g("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 h("MutationObserver").constructor}};function b(e){return e.nodeType===e.ELEMENT_NODE}function C(e){var t=e&&"host"in e&&"mode"in e&&y.host(e)||null;return Boolean(t&&"shadowRoot"in t&&y.shadowRoot(t)===e)}function I(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function w(e){try{var t=e.rules||e.cssRules;if(!t)return null;var n=Array.from(t,(t=>k(t,e.href))).join("");return(r=n).includes(" background-clip: text;")&&!r.includes(" -webkit-background-clip: text;")&&(r=r.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),r}catch(e){return null}var r}function k(e,t){if(function(e){return"styleSheet"in e}(e)){var n;try{n=w(e.styleSheet)||function(e){var{cssText:t}=e;if(t.split('"').length<3)return t;var n=["@import","url("+JSON.stringify(e.href)+")"];return""===e.layerName?n.push("layer"):e.layerName&&n.push("layer("+e.layerName+")"),e.supportsText&&n.push("supports("+e.supportsText+")"),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}(e)}catch(t){n=e.cssText}return e.styleSheet.href?E(n,e.styleSheet.href):n}var r,i=e.cssText;return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(r=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,i=i.replace(r,"$1\\$2")),t?E(i,t):i}function S(e,t){return Array.from(e.styleSheets).find((e=>e.href===t))}let A=class{constructor(){u(this,"idNodeMap",new Map),u(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;var n=null==(t=this.getMeta(e))?void 0:t.id;return null!=n?n:-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 n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){var n=this.getNode(e);if(n){var r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function x(e){var{element:t,maskInputOptions:n,tagName:r,type:i,value:o,maskInputFn:a}=e,s=o||"",u=i&&T(i);return(n[r.toLowerCase()]||u&&n[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 R(e,t){var n,r;try{r=new URL(e,null!=t?t:window.location.href)}catch(e){return null}var i=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(n=null==i?void 0:i[1])&&void 0!==n?n:null}var _=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,F=/^(?:[a-z+]+:)?\/\//i,Z=/^www\..*/i,O=/^(data:)([^,]*),(.*)/i;function E(e,t){return(e||"").replace(_,((e,n,r,i,o,a)=>{var s,u=r||o||a,l=n||i||"";if(!u)return e;if(F.test(u)||Z.test(u))return"url("+l+u+l+")";if(O.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 f of(c.pop(),d))"."!==f&&(".."===f?c.pop():c.push(f));return"url("+l+c.join("/")+l+")"}))}var B,L,D=1,q=new RegExp("[^a-z0-9-_:]"),H=-2;function Y(){return D++}var V=/^[^ \t\n\r\u000c]+/,P=/^[, \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 n=G.get(e);if(n||(n=e.createElement("a"),G.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function z(e,t,n,r){return r?"src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?W(e,r):"background"!==n||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n?function(e,t){if(""===t.trim())return t;var n=0;function r(e){var r,i=e.exec(t.substring(n));return i?(r=i[0],n+=r.length,r):""}for(var i=[];r(P),!(n>=t.length);){var o=r(V);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(n);if(""===u){i.push((o+a).trim());break}if(s)")"===u&&(s=!1);else{if(","===u){n+=1,i.push((o+a).trim());break}"("===u&&(s=!0)}a+=u,n+=1}}}return i.join(", ")}(e,r):"style"===n?E(r,X(e)):"object"===t&&"data"===n?W(e,r):r:W(e,r):r}function K(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function J(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&J(y.parentNode(e),t,n);for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}return!!n&&J(y.parentNode(e),t,n)}function U(e,t,n,r){var i;if(b(e)){if(i=e,!y.childNodes(i).length)return!1}else{if(null===y.parentElement(e))return!1;i=y.parentElement(e)}try{if("string"==typeof t){if(r){if(i.closest("."+t))return!0}else if(i.classList.contains(t))return!0}else if(J(i,t,r))return!0;if(n)if(r){if(i.closest(n))return!0}else if(i.matches(n))return!0}catch(e){}return!1}function Q(e,t){var{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:a,inlineStylesheet:s,maskInputOptions:u={},maskTextFn:c,maskInputFn:d,dataURLOptions:f={},inlineImages:h,recordCanvas:v,keepIframeSrcFn:p,newlyAddedElement:m=!1}=t,g=function(e,t){if(!t.hasNode(e))return;var n=t.getId(e);return 1===n?void 0:n}(n,r);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:g};case e.ELEMENT_NODE:return function(e,t){for(var n,{doc:r,blockClass:i,blockSelector:o,inlineStylesheet:a,maskInputOptions:s={},maskInputFn:u,dataURLOptions:c={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:h,newlyAddedElement:v=!1,rootId:p}=t,m=function(e,t,n){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}if(n)return e.matches(n)}catch(e){}return!1}(e,i,o),g=function(e){if(e instanceof HTMLFormElement)return"form";var t=T(e.tagName);return q.test(t)?"div":t}(e),b={},C=e.attributes.length,I=0;I<C;I++){var k=e.attributes[I];K(g,k.name,k.value)||(b[k.name]=z(r,g,T(k.name),k.value))}if("link"===g&&a){var A=function(e){return null==e?void 0:e.href}(e);if(A){var R=S(r,A);if(!R&&A.includes(".css"))R=S(r,window.location.origin+"/"+A.replace(window.location.href,""));var _=null;R&&(_=w(R)),_&&(delete b.rel,delete b.href,b._cssText=_)}}if("style"===g&&e.sheet&&!(e.innerText||y.textContent(e)||"").trim().length){var F=w(e.sheet);F&&(b._cssText=F)}if("input"===g||"textarea"===g||"select"===g){var Z=e.value,O=e.checked;"radio"!==b.type&&"checkbox"!==b.type&&"submit"!==b.type&&"button"!==b.type&&Z?b.value=x({element:e,type:M(e),tagName:g,value:Z,maskInputOptions:s,maskInputFn:u}):O&&(b.checked=O)}"option"===g&&(e.selected&&!s.select?b.selected=!0:delete b.selected);if("dialog"===g&&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"===g&&f)if("2d"===e.__context)(function(e){var t=e.getContext("2d");if(!t)return!0;for(var n=0;n<e.width;n+=50)for(var r=0;r<e.height;r+=50){var i=t.getImageData,o=N in i?i[N]:i;if(new Uint32Array(o.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).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 E=e.toDataURL(c.type,c.quality),D=r.createElement("canvas");D.width=e.width,D.height=e.height,E!==D.toDataURL(c.type,c.quality)&&(b.rr_dataURL=E)}if("img"===g&&d){B||(B=r.createElement("canvas"),L=B.getContext("2d"));var H=e,Y=H.currentSrc||H.getAttribute("src")||"<unknown-src>",V=H.crossOrigin,P=()=>{H.removeEventListener("load",P);try{B.width=H.naturalWidth,B.height=H.naturalHeight,L.drawImage(H,0,0),b.rr_dataURL=B.toDataURL(c.type,c.quality)}catch(e){if("anonymous"!==H.crossOrigin)return H.crossOrigin="anonymous",void(H.complete&&0!==H.naturalWidth?P():H.addEventListener("load",P));console.warn("Cannot inline img src="+Y+"! Error: "+e)}"anonymous"===H.crossOrigin&&(V?b.crossOrigin=V:H.removeAttribute("crossorigin"))};H.complete&&0!==H.naturalWidth?P():H.addEventListener("load",P)}if("audio"===g||"video"===g){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"!==g||h(b.src)||(e.contentDocument||(b.rr_src=b.src),delete b.src);try{customElements.get(g)&&(n=!0)}catch(e){}return{type:l.Element,tagName:g,attributes:b,childNodes:[],isSVG:j(e)||void 0,needBlock:m,rootId:p,isCustom:n}}(e,{doc:n,blockClass:i,blockSelector:o,inlineStylesheet:s,maskInputOptions:u,maskInputFn:d,dataURLOptions:f,inlineImages:h,recordCanvas:v,keepIframeSrcFn:p,newlyAddedElement:m,rootId:g});case e.TEXT_NODE:return function(e,t){var n,{needsMask:r,maskTextFn:i,rootId:o}=t,a=y.parentNode(e),s=a&&a.tagName,u=y.textContent(e),c="STYLE"===s||void 0,d="SCRIPT"===s||void 0;if(c&&u){try{e.nextSibling||e.previousSibling||(null==(n=a.sheet)?void 0:n.cssRules)&&(u=w(a.sheet))}catch(t){console.warn("Cannot get CSS styles from text's parentNode. Error: "+t,e)}u=E(u,X(t.doc))}d&&(u="SCRIPT_PLACEHOLDER");!c&&!d&&u&&r&&(u=i?i(u,y.parentElement(e)):u.replace(/[\S]/g,"*"));return{type:l.Text,textContent:u||"",isStyle:c,rootId:o}}(e,{doc:n,needsMask:a,maskTextFn:c,rootId:g});case e.CDATA_SECTION_NODE:return{type:l.CDATA,textContent:"",rootId:g};case e.COMMENT_NODE:return{type:l.Comment,textContent:y.textContent(e)||"",rootId:g};default:return!1}}function $(e){return null==e?"":e.toLowerCase()}function ee(e,t){var{doc:n,mirror:r,blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:s,skipChild:u=!1,inlineStylesheet:c=!0,maskInputOptions:d={},maskTextFn:f,maskInputFn:h,slimDOMOptions:v,dataURLOptions:p={},inlineImages:m=!1,recordCanvas:g=!1,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:S=5e3,onStylesheetLoad:A,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:T=(()=>!1),newlyAddedElement:N=!1}=t,{needsMask:M}=t,{preserveWhiteSpace:_=!0}=t;M||(M=U(e,a,s,void 0===M));var F,Z=Q(e,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:M,inlineStylesheet:c,maskInputOptions:d,maskTextFn:f,maskInputFn:h,dataURLOptions:p,inlineImages:m,recordCanvas:g,keepIframeSrcFn:T,newlyAddedElement:N});if(!Z)return console.warn(e,"not serialized"),null;F=r.hasNode(e)?r.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"===R(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&($(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===$(e.attributes.name)||"icon"===$(e.attributes.rel)||"apple-touch-icon"===$(e.attributes.rel)||"shortcut icon"===$(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&$(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&($(e.attributes.property).match(/^(og|twitter|fb):/)||$(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===$(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===$(e.attributes.name)||"googlebot"===$(e.attributes.name)||"bingbot"===$(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===$(e.attributes.name)||"generator"===$(e.attributes.name)||"framework"===$(e.attributes.name)||"publisher"===$(e.attributes.name)||"progid"===$(e.attributes.name)||$(e.attributes.property).match(/^article:/)||$(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===$(e.attributes.name)||"yandex-verification"===$(e.attributes.name)||"csrf-token"===$(e.attributes.name)||"p:domain_verify"===$(e.attributes.name)||"verify-v1"===$(e.attributes.name)||"verification"===$(e.attributes.name)||"shopify-checkout-api-token"===$(e.attributes.name)))return!0}}return!1}(Z,v)&&(_||Z.type!==l.Text||Z.isStyle||Z.textContent.replace(/^\s+|\s+$/gm,"").length)?Y():H;var O=Object.assign(Z,{id:F});if(r.add(e,O),F===H)return null;w&&w(e);var E=!u;if(O.type===l.Element){E=E&&!O.needBlock,delete O.needBlock;var B=y.shadowRoot(e);B&&I(B)&&(O.isShadowHost=!0)}if((O.type===l.Document||O.type===l.Element)&&E){v.headWhitespace&&O.type===l.Element&&"head"===O.tagName&&(_=!1);var L={doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:M,maskTextClass:a,maskTextSelector:s,skipChild:u,inlineStylesheet:c,maskInputOptions:d,maskTextFn:f,maskInputFn:h,slimDOMOptions:v,dataURLOptions:p,inlineImages:m,recordCanvas:g,preserveWhiteSpace:_,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:S,onStylesheetLoad:A,stylesheetLoadTimeout:x,keepIframeSrcFn:T};if(O.type===l.Element&&"textarea"===O.tagName&&void 0!==O.attributes.value);else for(var D of Array.from(y.childNodes(e))){var q=ee(D,L);q&&O.childNodes.push(q)}var V=null;if(b(e)&&(V=y.shadowRoot(e)))for(var P of Array.from(y.childNodes(V))){var G=ee(P,L);G&&(I(V)&&(G.isShadow=!0),O.childNodes.push(G))}}var W=y.parentNode(e);return W&&C(W)&&I(W)&&(O.isShadow=!0),O.type===l.Element&&"iframe"===O.tagName&&function(e,t,n){var r=e.contentWindow;if(r){var i,o=!1;try{i=r.document.readyState}catch(e){return}if("complete"===i){var a="about:blank";if(r.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)}),n);e.addEventListener("load",(()=>{clearTimeout(s),o=!0,t()}))}}}(e,(()=>{var t=e.contentDocument;if(t&&k){var n=ee(t,{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:M,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:c,maskInputOptions:d,maskTextFn:f,maskInputFn:h,slimDOMOptions:v,dataURLOptions:p,inlineImages:m,recordCanvas:g,preserveWhiteSpace:_,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:S,onStylesheetLoad:A,stylesheetLoadTimeout:x,keepIframeSrcFn:T});n&&k(e,n)}}),S),O.type===l.Element&&"link"===O.tagName&&"string"==typeof O.attributes.rel&&("stylesheet"===O.attributes.rel||"preload"===O.attributes.rel&&"string"==typeof O.attributes.href&&"css"===R(O.attributes.href))&&function(e,t,n){var r,i=!1;try{r=e.sheet}catch(e){return}if(!r){var o=setTimeout((()=>{i||(t(),i=!0)}),n);e.addEventListener("load",(()=>{clearTimeout(o),i=!0,t()}))}}(e,(()=>{if(A){var t=ee(e,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:M,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:c,maskInputOptions:d,maskTextFn:f,maskInputFn:h,slimDOMOptions:v,dataURLOptions:p,inlineImages:m,recordCanvas:g,preserveWhiteSpace:_,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:S,onStylesheetLoad:A,stylesheetLoadTimeout:x,keepIframeSrcFn:T});t&&A(e,t)}}),x),O}let te=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:[]},re={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]};var ie={};function oe(e){if(ie[e])return ie[e];var t=function(e){var t,n=null==globalThis||null==(t=globalThis.Zone)||null==t.__symbol__?void 0:t.__symbol__(e);return n&&globalThis[n]?globalThis[n]:void 0}(e)||globalThis[e],n=t.prototype,r=e in ne?ne[e]:void 0,i=Boolean(r&&r.every((e=>{var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(n,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))}))),o=e in re?re[e]:void 0,a=Boolean(o&&o.every((e=>{var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))})));if(i&&a)return ie[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?ie[e]=l:n}catch(e){return n}}var ae={};function se(e,t,n){var r,i=e+"."+String(n);if(ae[i])return ae[i].call(t);var o=oe(e),a=null==(r=Object.getOwnPropertyDescriptor(o,n))?void 0:r.get;return a?(ae[i]=a,a.call(t)):t[n]}var ue={};function le(e,t,n){var r=e+"."+String(n);if(ue[r])return ue[r].bind(t);var i=oe(e)[n];return"function"!=typeof i?t[n]:(ue[r]=i,i.bind(t))}function ce(){return oe("MutationObserver").constructor}var de={childNodes:function(e){return se("Node",e,"childNodes")},parentNode:function(e){return se("Node",e,"parentNode")},parentElement:function(e){return se("Node",e,"parentElement")},textContent:function(e){return se("Node",e,"textContent")},contains:function(e,t){return le("Node",e,"contains")(t)},getRootNode:function(e){return le("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?se("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?se("Element",e,"shadowRoot"):null},querySelector:function(e,t){return se("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return se("Element",e,"querySelectorAll")(t)},mutationObserver:ce};function fe(e,t,n){void 0===n&&(n=document);var r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}var he="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.",ve={map:{},getId:()=>(console.error(he),-1),getNode:()=>(console.error(he),null),removeNodeFromMap(){console.error(he)},has:()=>(console.error(he),!1),reset(){console.error(he)}};function pe(e,t,n){void 0===n&&(n={});var r=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!==n.leading||(i=u);var l=t-(u-i),c=this;l<=0||l>t?(r&&(clearTimeout(r),r=null),i=u,e.apply(c,a)):r||!1===n.trailing||(r=setTimeout((()=>{i=!1===n.leading?0:Date.now(),r=null,e.apply(c,a)}),l))}}function me(e,t,n,r,i){void 0===i&&(i=window);var o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(e){setTimeout((()=>{n.set.call(this,e)}),0),o&&o.set&&o.set.call(this,e)}}),()=>me(e,t,o||{},!0)}function ge(e,t,n){try{if(!(t in e))return()=>{};var r=e[t],i=n(r);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch(e){return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(ve=new Proxy(ve,{get:(e,t,n)=>("map"===t&&console.error(he),Reflect.get(e,t,n))}));var ye=Date.now;function be(e){var t,n,r,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=de.parentElement(o.body))?void 0:t.scrollLeft)||(null==(n=null==o?void 0:o.body)?void 0:n.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==(r=de.parentElement(o.body))?void 0:r.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 we(e){return e?e.nodeType===e.ELEMENT_NODE?e:de.parentElement(e):null}function ke(e,t,n,r){if(!e)return!1;var i=we(e);if(!i)return!1;try{if("string"==typeof t){if(i.classList.contains(t))return!0;if(r&&null!==i.closest("."+t))return!0}else if(J(i,t,r))return!0}catch(e){}if(n){if(i.matches(n))return!0;if(r&&null!==i.closest(n))return!0}return!1}function Se(e,t,n){return!("TITLE"!==e.tagName||!n.headTitleMutations)||t.getId(e)===H}function Ae(e,t){if(C(e))return!1;var n=t.getId(e);if(!t.has(n))return!0;var r=de.parentNode(e);return(!r||r.nodeType!==e.DOCUMENT_NODE)&&(!r||Ae(r,t))}function xe(e){return Boolean(e.changedTouches)}function Te(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function Ne(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function Me(e){return!!e&&(e instanceof te&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(de.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(ye=()=>(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):(n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n);var n}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 _e(e){var t,n=null;return"getRootNode"in e&&(null==(t=de.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&de.host(de.getRootNode(e))&&(n=de.host(de.getRootNode(e))),n}function Fe(e){var t=e.ownerDocument;if(!t)return!1;var n=function(e){for(var t,n=e;t=_e(n);)n=t;return n}(e);return de.contains(t,n)}function Ze(e){var t=e.ownerDocument;return!!t&&(de.contains(t,e)||Fe(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||{}),Ee=(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))(Ee||{}),Be=(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))(Be||{}),Le=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Le||{}),De=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(De||{}),qe=(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))(qe||{});function He(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,n=0;n<e;n++)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&&He(e.previousSibling)){var n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&He(e.nextSibling)&&e.nextSibling.__ln.previous){var r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.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 Ve,Pe=(e,t)=>e+"@"+t;class Ge{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,n=new Ye,r=e=>{for(var t=e,n=H;n===H;)n=(t=t&&t.nextSibling)&&this.mirror.getId(t);return n},i=i=>{var o=de.parentNode(i);if(o&&Ze(i)&&"TEXTAREA"!==o.tagName){var a=C(o)?this.mirror.getId(_e(i)):this.mirror.getId(o),s=r(i);if(-1===a||-1===s)return n.addNode(i);var u=ee(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=>{Te(e,this.mirror)&&this.iframeManager.addIframe(e),Ne(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),Me(i)&&this.shadowDomManager.addShadowRoot(de.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)je(this.removes,o,this.mirror)&&!this.movedSet.has(de.parentNode(o))||i(o);for(var a of this.addedSet)Xe(this.droppedSet,a)||je(this.removes,a,this.mirror)?Xe(this.movedSet,a)?i(a):this.droppedSet.add(a):i(a);for(var s=null;n.length;){var u=null;if(s){var l=this.mirror.getId(de.parentNode(s.value)),c=r(s.value);-1!==l&&-1!==c&&(u=s)}if(!u)for(var d=n.tail;d;){var f=d;if(d=d.previous,f){var h=this.mirror.getId(de.parentNode(f.value));if(-1===r(f.value))continue;if(-1!==h){u=f;break}var v=f.value,p=de.parentNode(v);if(p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var m=de.host(p);if(-1!==this.mirror.getId(m)){u=f;break}}}}if(!u){for(;n.head;)n.removeNode(n.head.value);break}s=u.previous,n.removeNode(u.value),i(u.value)}var g={texts:this.texts.map((e=>{var t=e.node,n=de.parentNode(t);return n&&"TEXTAREA"===n.tagName&&this.genTextAreaValueMutation(n),{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 n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length<t.style.length&&(n+r).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};(g.texts.length||g.attributes.length||g.removes.length||g.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(g))}})),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(de.childNodes(e),(e=>de.textContent(e)||"")).join("")})),a(this,"processMutation",(e=>{if(!Se(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":var t=de.textContent(e.target);ke(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:U(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,we(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break;case"attributes":var n=e.target,r=e.attributeName,i=e.target.getAttribute(r);if("value"===r){var o=M(n);i=x({element:n,maskInputOptions:this.maskInputOptions,tagName:n.tagName,type:o,value:i,maskInputFn:this.maskInputFn})}if(ke(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;var a=this.attributeMap.get(e.target);if("IFRAME"===n.tagName&&"src"===r&&!this.keepIframeSrcFn(i)){if(n.contentDocument)return;r="rr_src"}if(a||(a={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(a),this.attributeMap.set(e.target,a)),"type"===r&&"INPUT"===n.tagName&&"password"===(e.oldValue||"").toLowerCase()&&n.setAttribute("data-rr-is-password","true"),!K(n.tagName,r))if(a.attributes[r]=z(this.doc,T(n.tagName),T(r),i),"style"===r){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(n.style))){var l=n.style.getPropertyValue(u),c=n.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))""===n.style.getPropertyValue(d)&&(a.styleDiff[d]=!1)}else"open"===r&&"DIALOG"===n.tagName&&(n.matches("dialog:modal")?a.attributes.rr_open_mode="modal":a.attributes.rr_open_mode="non-modal");break;case"childList":if(ke(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 n=this.mirror.getId(t),r=C(e.target)?this.mirror.getId(de.host(e.target)):this.mirror.getId(e.target);ke(e.target,this.blockClass,this.blockSelector,!1)||Se(t,this.mirror,this.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(We(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||Ae(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Pe(n,r)]?We(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:!(!C(e.target)||!I(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(Se(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);var n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&-1!==n&&(this.movedMap[Pe(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);ke(e,this.blockClass,this.blockSelector,!1)||(de.childNodes(e).forEach((e=>this.genAdds(e))),Me(e)&&de.childNodes(de.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 We(e,t){e.delete(t),de.childNodes(t).forEach((t=>We(e,t)))}function je(e,t,n){return 0!==e.length&&function(e,t,n){var r=de.parentNode(t),i=function(){var t=n.getId(r);if(e.some((e=>e.id===t)))return{v:!0};r=de.parentNode(r)};for(;r;){var o=i();if("object"==typeof o)return o.v}return!1}(e,t,n)}function Xe(e,t){return 0!==e.size&&ze(e,t)}function ze(e,t){var n=de.parentNode(t);return!!n&&(!!e.has(n)||ze(e,n))}var Ke=e=>{if(!Ve)return e;return function(){try{return e(...arguments)}catch(e){if(Ve&&!0===Ve(e))return;throw e}}},Je=[];function Ue(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 Qe(e,t){var n=new Ge;Je.push(n),n.init(e);var r=new(ce())(Ke(n.processMutations.bind(n)));return r.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function $e(e){var{mouseInteractionCb:t,doc:r,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(Be).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==u[e])).forEach((e=>{var s=T(e),u=(e=>r=>{var s=Ue(r);if(!ke(s,o,a,!0)){var u=null,l=e;if("pointerType"in r){switch(r.pointerType){case"mouse":u=Le.Mouse;break;case"touch":u=Le.Touch;break;case"pen":u=Le.Pen}u===Le.Touch?Be[e]===Be.MouseDown?l="TouchStart":Be[e]===Be.MouseUp&&(l="TouchEnd"):Le.Pen}else xe(r)&&(u=Le.Touch);null!==u?(c=u,(l.startsWith("Touch")&&u===Le.Touch||l.startsWith("Mouse")&&u===Le.Mouse)&&(u=null)):Be[e]===Be.Click&&(u=c,c=null);var d=xe(r)?r.changedTouches[0]:r;if(d){var f=i.getId(s),{clientX:h,clientY:v}=d;Ke(t)(n({type:Be[l],id:f,x:h,y:v},null!==u&&{pointerType:u}))}}})(e);if(window.PointerEvent)switch(Be[e]){case Be.MouseDown:case Be.MouseUp:s=s.replace("mouse","pointer");break;case Be.TouchStart:case Be.TouchEnd:return}l.push(fe(s,u,r))})),Ke((()=>{l.forEach((e=>e()))}))}function et(e){var{scrollCb:t,doc:n,mirror:r,blockClass:i,blockSelector:o,sampling:a}=e;return fe("scroll",Ke(pe(Ke((e=>{var a=Ue(e);if(a&&!ke(a,i,o,!0)){var s=r.getId(a);if(a===n&&n.defaultView){var u=be(n.defaultView);t({id:s,x:u.left,y:u.top})}else t({id:s,x:a.scrollLeft,y:a.scrollTop})}})),a.scroll||100)),n)}var tt=["INPUT","TEXTAREA","SELECT"],nt=new WeakMap;function rt(e){return function(e,t){if(st("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||st("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||st("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||st("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){var n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){var r=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(r)}return t}(e,[])}function it(e,t,n){var r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function ot(e,t){var n,r,i,{mirror:o,stylesheetManager:a}=e,s=null;s="#document"===t.nodeName?o.getId(t):o.getId(de.host(t));var u="#document"===t.nodeName?null==(n=t.defaultView)?void 0:n.Document:null==(i=null==(r=t.ownerDocument)?void 0:r.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,n=null==(t=l.set)?void 0:t.call(this,e);if(null!==s&&-1!==s)try{a.adoptStyleSheets(e,s)}catch(e){}return n}}),Ke((()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))):()=>{}}function at(e,t){void 0===t&&(t={});var r,i=e.doc.defaultView;if(!i)return()=>{};!function(e,t){var{mutationCb:n,mousemoveCb:r,mouseInteractionCb:i,scrollCb:o,viewportResizeCb:a,inputCb:s,mediaInteractionCb:u,styleSheetRuleCb:l,styleDeclarationCb:c,canvasMutationCb:d,fontCb:f,selectionCb:h,customElementCb:v}=e;e.mutationCb=function(){t.mutation&&t.mutation(...arguments),n(...arguments)},e.mousemoveCb=function(){t.mousemove&&t.mousemove(...arguments),r(...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),f(...arguments)},e.selectionCb=function(){t.selection&&t.selection(...arguments),h(...arguments)},e.customElementCb=function(){t.customElement&&t.customElement(...arguments),v(...arguments)}}(e,t),e.recordDOM&&(r=Qe(e,e.doc));var o=function(e){var{mousemoveCb:t,sampling:n,doc:r,mirror:i}=e;if(!1===n.mousemove)return()=>{};var o,a="number"==typeof n.mousemove?n.mousemove:50,s="number"==typeof n.mousemoveCallback?n.mousemoveCallback:500,u=[],l=pe(Ke((e=>{var n=Date.now()-o;t(u.map((e=>(e.timeOffset-=n,e))),e),u=[],o=null})),s),c=Ke(pe(Ke((e=>{var t=Ue(e),{clientX:n,clientY:r}=xe(e)?e.changedTouches[0]:e;o||(o=ye()),u.push({x:n,y:r,id:i.getId(t),timeOffset:ye()-o}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?Ee.Drag:e instanceof MouseEvent?Ee.MouseMove:Ee.TouchMove)})),a,{trailing:!1})),d=[fe("mousemove",c,r),fe("touchmove",c,r),fe("drag",c,r)];return Ke((()=>{d.forEach((e=>e()))}))}(e),a=$e(e),s=et(e),u=function(e,t){var{viewportResizeCb:n}=e,{win:r}=t,i=-1,o=-1;return fe("resize",Ke(pe(Ke((()=>{var e=Ce(),t=Ie();i===e&&o===t||(n({width:Number(t),height:Number(e)}),i=e,o=t)})),200)),r)}(e,{win:i}),l=function(e){var{inputCb:t,doc:r,mirror:i,blockClass:o,blockSelector:a,ignoreClass:s,ignoreSelector:u,maskInputOptions:l,maskInputFn:c,sampling:d,userTriggeredOnInput:f}=e;function h(e){var t=Ue(e),n=e.isTrusted,i=t&&t.tagName;if(t&&"OPTION"===i&&(t=de.parentElement(t)),t&&i&&!(tt.indexOf(i)<0)&&!ke(t,o,a,!0)&&!(t.classList.contains(s)||u&&t.matches(u))){var d=t.value,h=!1,p=M(t)||"";"radio"===p||"checkbox"===p?h=t.checked:(l[i.toLowerCase()]||l[p])&&(d=x({element:t,maskInputOptions:l,tagName:i,type:p,value:d,maskInputFn:c})),v(t,f?{text:d,isChecked:h,userTriggered:n}:{text:d,isChecked:h});var m=t.name;"radio"===p&&m&&h&&r.querySelectorAll('input[type="radio"][name="'+m+'"]').forEach((e=>{if(e!==t){var n=e.value;v(e,f?{text:n,isChecked:!h,userTriggered:!1}:{text:n,isChecked:!h})}}))}}function v(e,r){var o=nt.get(e);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){nt.set(e,r);var a=i.getId(e);Ke(t)(n({},r,{id:a}))}}var p=("last"===d.input?["change"]:["input","change"]).map((e=>fe(e,Ke(h),r))),m=r.defaultView;if(!m)return()=>{p.forEach((e=>e()))};var g=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),y=[[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 g&&g.set&&p.push(...y.map((e=>me(e[0],e[1],{set(){Ke(h)({target:this,isTrusted:!1})}},!1,m)))),Ke((()=>{p.forEach((e=>e()))}))}(e),c=function(e){var{mediaInteractionCb:t,blockClass:n,blockSelector:r,mirror:i,sampling:o,doc:a}=e,s=Ke((e=>pe(Ke((o=>{var a=Ue(o);if(a&&!ke(a,n,r,!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(qe.Play),a),fe("pause",s(qe.Pause),a),fe("seeked",s(qe.Seeked),a),fe("volumechange",s(qe.VolumeChange),a),fe("ratechange",s(qe.RateChange),a)];return Ke((()=>{u.forEach((e=>e()))}))}(e),d=()=>{},f=()=>{},h=()=>{},v=()=>{};e.recordDOM&&(d=function(e,t){var{styleSheetRuleCb:n,mirror:r,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:Ke(((e,t,o)=>{var[a,s]=o,{id:u,styleId:l}=it(t,r,i.styleMirror);return(u&&-1!==u||l&&-1!==l)&&n({id:u,styleId:l,adds:[{rule:a,index:s}]}),e.apply(t,o)}))}),o.CSSStyleSheet.prototype.addRule=function(e,t,n){void 0===n&&(n=this.cssRules.length);var r=e+" { "+t+" }";return o.CSSStyleSheet.prototype.insertRule.apply(this,[r,n])};var s,u,l=o.CSSStyleSheet.prototype.deleteRule;o.CSSStyleSheet.prototype.deleteRule=new Proxy(l,{apply:Ke(((e,t,o)=>{var[a]=o,{id:s,styleId:u}=it(t,r,i.styleMirror);return(s&&-1!==s||u&&-1!==u)&&n({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:Ke(((e,t,o)=>{var[a]=o,{id:s,styleId:u}=it(t,r,i.styleMirror);return(s&&-1!==s||u&&-1!==u)&&n({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:Ke(((e,t,o)=>{var[a]=o,{id:s,styleId:u}=it(t,r,i.styleMirror);return(s&&-1!==s||u&&-1!==u)&&n({id:s,styleId:u,replaceSync:a}),e.apply(t,o)}))}));var c={};ut("CSSGroupingRule")?c.CSSGroupingRule=o.CSSGroupingRule:(ut("CSSMediaRule")&&(c.CSSMediaRule=o.CSSMediaRule),ut("CSSConditionRule")&&(c.CSSConditionRule=o.CSSConditionRule),ut("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:Ke(((e,t,o)=>{var[a,s]=o,{id:u,styleId:l}=it(t.parentStyleSheet,r,i.styleMirror);return(u&&-1!==u||l&&-1!==l)&&n({id:u,styleId:l,adds:[{rule:a,index:[...rt(t),s||0]}]}),e.apply(t,o)}))}),o.prototype.deleteRule=new Proxy(d[t].deleteRule,{apply:Ke(((e,t,o)=>{var[a]=o,{id:s,styleId:u}=it(t.parentStyleSheet,r,i.styleMirror);return(s&&-1!==s||u&&-1!==u)&&n({id:s,styleId:u,removes:[{index:[...rt(t),a]}]}),e.apply(t,o)}))})})),Ke((()=>{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,n]=e;n.prototype.insertRule=d[t].insertRule,n.prototype.deleteRule=d[t].deleteRule}))}))}(e,{win:i}),f=ot(e,e.doc),h=function(e,t){var{styleDeclarationCb:n,mirror:r,ignoreCSSAttributes:i,stylesheetManager:o}=e,{win:a}=t,s=a.CSSStyleDeclaration.prototype.setProperty;a.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:Ke(((e,t,a)=>{var u,[l,c,d]=a;if(i.has(l))return s.apply(t,[l,c,d]);var{id:f,styleId:h}=it(null==(u=t.parentRule)?void 0:u.parentStyleSheet,r,o.styleMirror);return(f&&-1!==f||h&&-1!==h)&&n({id:f,styleId:h,set:{property:l,value:c,priority:d},index:rt(t.parentRule)}),e.apply(t,a)}))});var u=a.CSSStyleDeclaration.prototype.removeProperty;return a.CSSStyleDeclaration.prototype.removeProperty=new Proxy(u,{apply:Ke(((e,t,a)=>{var s,[l]=a;if(i.has(l))return u.apply(t,[l]);var{id:c,styleId:d}=it(null==(s=t.parentRule)?void 0:s.parentStyleSheet,r,o.styleMirror);return(c&&-1!==c||d&&-1!==d)&&n({id:c,styleId:d,remove:{property:l},index:rt(t.parentRule)}),e.apply(t,a)}))}),Ke((()=>{a.CSSStyleDeclaration.prototype.setProperty=s,a.CSSStyleDeclaration.prototype.removeProperty=u}))}(e,{win:i}),e.collectFonts&&(v=function(e){var{fontCb:t,doc:n}=e,r=n.defaultView;if(!r)return()=>{};var i=[],o=new WeakMap,a=r.FontFace;r.FontFace=function(e,t,n){var r=new a(e,t,n);return o.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};var s=ge(n.fonts,"add",(function(e){return function(n){return setTimeout(Ke((()=>{var e=o.get(n);e&&(t(e),o.delete(n))})),0),e.apply(this,[n])}}));return i.push((()=>{r.FontFace=a})),i.push(s),Ke((()=>{i.forEach((e=>e()))}))}(e)));var p=function(e){var{doc:t,mirror:n,blockClass:r,blockSelector:i,selectionCb:o}=e,a=!0,s=Ke((()=>{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:f,endContainer:h,endOffset:v}=c;ke(d,r,i,!0)||ke(h,r,i,!0)||s.push({start:n.getId(d),startOffset:f,end:n.getId(h),endOffset:v})}o({ranges:s})}}));return s(),fe("selectionchange",s)}(e),m=function(e){var{doc:t,customElementCb:n}=e,r=t.defaultView;return r&&r.customElements?ge(r.customElements,"define",(function(e){return function(t,r,i){try{n({define:{name:t}})}catch(e){console.warn("Custom element callback failed for "+t)}return e.apply(this,[t,r,i])}})):()=>{}}(e),g=[];for(var y of e.plugins)g.push(y.observer(y.callback,i,y.options));return Ke((()=>{Je.forEach((e=>e.reset())),null==r||r.disconnect(),o(),a(),s(),u(),l(),c(),d(),f(),h(),v(),p(),m(),g.forEach((e=>e()))}))}function st(e){return void 0!==window[e]}function ut(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class lt{constructor(e){a(this,"iframeIdToRemoteIdMap",new WeakMap),a(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,n,r){var i=n||this.getIdToRemoteIdMap(e),o=r||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 n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map((t=>this.getId(e,t,n,r)))}getRemoteId(e,t,n){var r=n||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;var i=r.get(t);return i||-1}getRemoteIds(e,t){var n=this.getRemoteIdToIdMap(e);return t.map((t=>this.getRemoteId(e,t,n)))}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 ct{constructor(e){a(this,"iframes",new WeakMap),a(this,"crossOriginIframeMap",new WeakMap),a(this,"crossOriginIframeMirror",new lt(Y)),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 lt(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 n,r;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(n=e.contentWindow)||n.addEventListener("message",this.handleMessage.bind(this))),null==(r=this.loadListener)||r.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 n=this.crossOriginIframeMap.get(e.source);if(n){var r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}}}transformCrossOriginEvent(e,t){var n;switch(t.type){case Oe.FullSnapshot:this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);var r=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,r),this.patchRootIdOnNode(t.data.node,r),{timestamp:t.timestamp,type:Oe.IncrementalSnapshot,data:{source:Ee.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 Ee.Mutation:return t.data.adds.forEach((t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);var n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(t.node,n)})),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 Ee.Drag:case Ee.TouchMove:case Ee.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case Ee.ViewportResize:return!1;case Ee.MediaInteraction:case Ee.MouseInteraction:case Ee.Scroll:case Ee.CanvasMutation:case Ee.Input:return this.replaceIds(t.data,e,["id"]),t;case Ee.StyleSheetRule:case Ee.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case Ee.Font:return t;case Ee.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case Ee.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(n=t.data.styles)||n.forEach((t=>{this.replaceStyleIds(t,e,["styleId"])})),t}}return!1}replace(e,t,n,r){for(var i of r)(Array.isArray(t[i])||"number"==typeof t[i])&&(Array.isArray(t[i])?t[i]=e.getIds(n,t[i]):t[i]=e.getId(n,t[i]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}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 dt{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(I(e)&&!this.shadowDoms.has(e)){this.shadowDoms.add(e);var r=Qe(n({},this.bypassOptions,{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push((()=>r.disconnect())),this.restoreHandlers.push(et(n({},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(de.host(e))),this.restoreHandlers.push(ot({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 n=this;this.restoreHandlers.push(ge(e.prototype,"attachShadow",(function(e){return function(r){var i=e.call(this,r),o=de.shadowRoot(this);return o&&Ze(this)&&n.addShadowRoot(o,t),i}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch(e){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var ft="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ht="undefined"==typeof Uint8Array?[]:new Uint8Array(256),vt=0;vt<64;vt++)ht[ft.charCodeAt(vt)]=vt;var pt=new Map;var mt=(e,t,n)=>{if(e&&(bt(e,t)||"object"==typeof e)){var r=function(e,t){var n=pt.get(e);return n||(n=new Map,pt.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name),i=r.indexOf(e);return-1===i&&(i=r.length,r.push(e)),i}};function gt(e,t,n){if(e instanceof Array)return e.map((e=>gt(e,t,n)));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,n=new Uint8Array(e),r=n.length,i="";for(t=0;t<r;t+=3)i+=ft[n[t]>>2],i+=ft[(3&n[t])<<4|n[t+1]>>4],i+=ft[(15&n[t+1])<<2|n[t+2]>>6],i+=ft[63&n[t+2]];return r%3==2?i=i.substring(0,i.length-1)+"=":r%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,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){var r=e.constructor.name,{src:i}=e;return{rr_type:r,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,n),e.width,e.height]}:bt(e,t)||"object"==typeof e?{rr_type:e.constructor.name,index:mt(e,t,n)}:e}var yt=(e,t,n)=>e.map((e=>gt(e,t,n))),bt=(e,t)=>{var n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((e=>"function"==typeof t[e]));return Boolean(n.find((n=>e instanceof t[n])))};function Ct(e,t,n,r){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(!ke(this,t,n,!0)){var u=function(e){return"experimental-webgl"===e?"webgl":e}(i);if("__context"in this||(this.__context=u),r&&["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,n,r,i,o){var a=[],s=Object.getOwnPropertyNames(e),u=function(s){if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(s))return"continue";try{if("function"!=typeof e[s])return"continue";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(mt(c,o,this),"tagName"in this.canvas&&!ke(this.canvas,r,i,!0)){var d=yt(u,o,this),f={type:t,property:s,args:d};n(this.canvas,f)}return c}}));a.push(u)}catch(r){var l=me(e,s,{set(e){n(this.canvas,{type:t,property:s,args:[e],setter:!0})}});a.push(l)}};for(var l of s)u(l);return a}var wt,kt,St,At,xt="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Tt="undefined"!=typeof window&&window.Blob&&new Blob([(wt=xt,Uint8Array.from(atob(wt),(e=>e.charCodeAt(0))))],{type:"text/javascript;charset=utf-8"});function Nt(e){var t;try{if(!(t=Tt&&(window.URL||window.webkitURL).createObjectURL(Tt)))throw"";var n=new Worker(t,{name:null==e?void 0:e.name});return n.addEventListener("error",(()=>{(window.URL||window.webkitURL).revokeObjectURL(t)})),n}catch(t){return new Worker("data:text/javascript;base64,"+xt,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class Mt{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:n,blockClass:r,blockSelector:i,recordCanvas:o,dataURLOptions:s}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&"all"===t&&this.initCanvasMutationObserver(n,r,i),o&&"number"==typeof t&&this.initCanvasFPSObserver(t,n,r,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,n,r,i,o){var a=this,s=Ct(n,r,i,!0),u=new Map,l=new Nt;l.onmessage=e=>{var{id:t}=e.data;if(u.set(t,!1),"base64"in e.data){var{base64:n,type:r,width:i,height:o}=e.data;this.mutationCb({id:t,type:De["2D"],commands:[{property:"clearRect",args:[0,0,i,o]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:n}],type:r}]},0,0]}]})}};var c,d=1e3/e,f=0,h=e=>{var s,v;f&&e-f<d?c=requestAnimationFrame(h):(f=e,(s=[],v=e=>{e.querySelectorAll("canvas").forEach((e=>{ke(e,r,i,!0)||s.push(e)})),e.querySelectorAll("*").forEach((e=>{e.shadowRoot&&v(e.shadowRoot)}))},v(n.document),s).forEach(function(){var e=t((function*(e){var t,n=a.mirror.getId(e);if(!u.get(n)&&0!==e.width&&0!==e.height){if(u.set(n,!0),["webgl","webgl2"].includes(e.__context)){var r=e.getContext(e.__context);!1===(null==(t=null==r?void 0:r.getContextAttributes())?void 0:t.preserveDrawingBuffer)&&r.clear(r.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:n,bitmap:c,width:i,height:s,dataURLOptions:o.dataURLOptions},[c])}}));return function(t){return e.apply(this,arguments)}}()),c=requestAnimationFrame(h))};c=requestAnimationFrame(h),this.resetObservers=()=>{s(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var r=Ct(e,t,n,!1),i=function(e,t,n,r){var i=[],o=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype),a=function(o){try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[o])return"continue";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 ke(this.canvas,n,r,!0)||setTimeout((()=>{var n=yt(s,t,this);e(this.canvas,{type:De["2D"],property:o,args:n})}),0),i.apply(this,s)}}));i.push(a)}catch(n){var s=me(t.CanvasRenderingContext2D.prototype,o,{set(t){e(this.canvas,{type:De["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,n),o=function(e,t,n,r){var i=[];return i.push(...It(t.WebGLRenderingContext.prototype,De.WebGL,e,n,r,t)),void 0!==t.WebGL2RenderingContext&&i.push(...It(t.WebGL2RenderingContext.prototype,De.WebGL2,e,n,r,t)),()=>{i.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,n);this.resetObservers=()=>{r(),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 n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n)})),requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(e,t){if(!this.frozen&&!this.locked){var n=this.pendingCanvasMutations.get(e);if(n&&-1!==t){var r=n.map((e=>{var t=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,i);return t})),{type:o}=n[0];this.mutationCb({id:t,type:o,commands:r}),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 n=this;if(0!==e.length){var r={id:t,styleIds:[]},i=[],o=function(e){var t=void 0;n.styleMirror.has(e)?t=n.styleMirror.getId(e):(t=n.styleMirror.add(e),i.push({styleId:t,rules:Array.from(e.rules||CSSRule,((t,n)=>({rule:k(t,e.href),index:n})))})),r.styleIds.push(t)};for(var a of e)o(a);i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class _t{constructor(){a(this,"nodeMap",new WeakMap),a(this,"active",!1)}inOtherBuffer(e,t){var n=this.nodeMap.get(e);return n&&Array.from(n).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 Ft=!1;try{if(2!==Array.from([1],(e=>2*e))[0]){var Zt=document.createElement("iframe");document.body.appendChild(Zt),Array.from=(null==(r=Zt.contentWindow)?void 0:r.Array.from)||Array.from,document.body.removeChild(Zt)}}catch(e){console.debug("Unable to override Array.from",e)}var Ot,Et,Bt=new A;function Lt(e){void 0===e&&(e={});var{emit:t,checkoutEveryNms:r,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:f,maskInputOptions:h,slimDOMOptions:v,maskInputFn:p,maskTextFn:m,hooks:g,packFn:y,sampling:b={},dataURLOptions:C={},mousemoveWait:I,recordDOM:w=!0,recordCanvas:k=!1,recordCrossOriginIframes:S=!1,recordAfter:x=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:T=!1,collectFonts:N=!1,inlineImages:M=!1,plugins:R,keepIframeSrcFn:_=(()=>!1),ignoreCSSAttributes:F=new Set([]),errorHandler:Z}=e;Ve=Z;var O=!S||window.parent===window,E=!1;if(!O)try{window.parent.document&&(E=!1)}catch(e){E=!0}if(O&&!t)throw new Error("emit function is required");if(!O&&!E)return()=>{};void 0!==I&&void 0===b.mousemove&&(b.mousemove=I),Bt.reset();var B,L=!0===f?{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!==h?h:{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,H=e=>{for(var t of R||[])t.eventProcessor&&(e=t.eventProcessor(e));return y&&!E&&(e=y(e)),e};kt=(e,n)=>{var o,a=e;if(a.timestamp=ye(),!(null==(o=Je[0])?void 0:o.isFrozen())||a.type===Oe.FullSnapshot||a.type===Oe.IncrementalSnapshot&&a.data.source===Ee.Mutation||Je.forEach((e=>e.unfreeze())),O)null==t||t(H(a),n);else if(E){var s={type:"rrweb",event:H(a),origin:window.location.origin,isCheckout:n};window.parent.postMessage(s,"*")}if(a.type===Oe.FullSnapshot)B=a,q=0;else if(a.type===Oe.IncrementalSnapshot){if(a.data.source===Ee.Mutation&&a.data.isAttachIframe)return;q++;var u=i&&q>=i,l=r&&a.timestamp-B.timestamp>r;(u||l)&&St(!0)}};var Y=e=>{kt({type:Oe.IncrementalSnapshot,data:n({source:Ee.Mutation},e)})},V=e=>kt({type:Oe.IncrementalSnapshot,data:n({source:Ee.Scroll},e)}),P=e=>kt({type:Oe.IncrementalSnapshot,data:n({source:Ee.CanvasMutation},e)}),G=new Rt({mutationCb:Y,adoptedStyleSheetCb:e=>kt({type:Oe.IncrementalSnapshot,data:n({source:Ee.AdoptedStyleSheet},e)})}),W=new ct({mirror:Bt,mutationCb:Y,stylesheetManager:G,recordCrossOriginIframes:S,wrappedEmit:kt});for(var j of R||[])j.getMirror&&j.getMirror({nodeMirror:Bt,crossOriginIframeMirror:W.crossOriginIframeMirror,crossOriginIframeStyleMirror:W.crossOriginIframeStyleMirror});var X=new _t;At=new Mt({recordCanvas:k,mutationCb:P,win:window,blockClass:o,blockSelector:a,mirror:Bt,sampling:b.canvas,dataURLOptions:C});var z=new dt({mutationCb:Y,scrollCb:V,bypassOptions:{blockClass:o,blockSelector:a,maskTextClass:l,maskTextSelector:c,inlineStylesheet:d,maskInputOptions:L,dataURLOptions:C,maskTextFn:m,maskInputFn:p,recordCanvas:k,inlineImages:M,sampling:b,slimDOMOptions:D,iframeManager:W,stylesheetManager:G,canvasManager:At,keepIframeSrcFn:_,processedNodeManager:X},mirror:Bt});St=function(e){if(void 0===e&&(e=!1),w){kt({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:n=new A,blockClass:r="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:f,slimDOM:h=!1,dataURLOptions:v,preserveWhiteSpace:p,onSerialize:m,onIframeLoad:g,iframeLoadTimeout:y,onStylesheetLoad:b,stylesheetLoadTimeout:C,keepIframeSrcFn:I=(()=>!1)}=t||{};return ee(e,{doc:e,mirror:n,blockClass:r,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:f,slimDOMOptions:!0===h||"all"===h?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===h,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===h?{}:h,dataURLOptions:v,inlineImages:u,recordCanvas:l,preserveWhiteSpace:p,onSerialize:m,onIframeLoad:g,iframeLoadTimeout:y,onStylesheetLoad:b,stylesheetLoadTimeout:C,keepIframeSrcFn:I,newlyAddedElement:!1})}(document,{mirror:Bt,blockClass:o,blockSelector:a,maskTextClass:l,maskTextSelector:c,inlineStylesheet:d,maskAllInputs:L,maskTextFn:m,maskInputFn:p,slimDOM:D,dataURLOptions:C,recordCanvas:k,inlineImages:M,onSerialize:e=>{Te(e,Bt)&&W.addIframe(e),Ne(e,Bt)&&G.trackLinkElement(e),Me(e)&&z.addShadowRoot(de.shadowRoot(e),document)},onIframeLoad:(e,t)=>{W.attachIframe(e,t),z.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{G.attachLinkElement(e,t)},keepIframeSrcFn:_});if(!t)return console.warn("Failed to snapshot the document");kt({type:Oe.FullSnapshot,data:{node:t,initialOffset:be(window)}},e),Je.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&G.adoptStyleSheets(document.adoptedStyleSheets,Bt.getId(document))}};try{var K=[],J=e=>{var t;return Ke(at)({mutationCb:Y,mousemoveCb:(e,t)=>kt({type:Oe.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>kt({type:Oe.IncrementalSnapshot,data:n({source:Ee.MouseInteraction},e)}),scrollCb:V,viewportResizeCb:e=>kt({type:Oe.IncrementalSnapshot,data:n({source:Ee.ViewportResize},e)}),inputCb:e=>kt({type:Oe.IncrementalSnapshot,data:n({source:Ee.Input},e)}),mediaInteractionCb:e=>kt({type:Oe.IncrementalSnapshot,data:n({source:Ee.MediaInteraction},e)}),styleSheetRuleCb:e=>kt({type:Oe.IncrementalSnapshot,data:n({source:Ee.StyleSheetRule},e)}),styleDeclarationCb:e=>kt({type:Oe.IncrementalSnapshot,data:n({source:Ee.StyleDeclaration},e)}),canvasMutationCb:P,fontCb:e=>kt({type:Oe.IncrementalSnapshot,data:n({source:Ee.Font},e)}),selectionCb:e=>{kt({type:Oe.IncrementalSnapshot,data:n({source:Ee.Selection},e)})},customElementCb:e=>{kt({type:Oe.IncrementalSnapshot,data:n({source:Ee.CustomElement},e)})},blockClass:o,ignoreClass:s,ignoreSelector:u,maskTextClass:l,maskTextSelector:c,maskInputOptions:L,inlineStylesheet:d,sampling:b,recordDOM:w,recordCanvas:k,inlineImages:M,userTriggeredOnInput:T,collectFonts:N,doc:e,maskInputFn:p,maskTextFn:m,keepIframeSrcFn:_,blockSelector:a,slimDOMOptions:D,dataURLOptions:C,mirror:Bt,iframeManager:W,stylesheetManager:G,shadowDomManager:z,processedNodeManager:X,canvasManager:At,ignoreCSSAttributes:F,plugins:(null==(t=null==R?void 0:R.filter((e=>e.observer)))?void 0:t.map((e=>({observer:e.observer,options:e.options,callback:t=>kt({type:Oe.Plugin,data:{plugin:e.name,payload:t}})}))))||[]},g)};W.addLoadListener((e=>{try{K.push(J(e.contentDocument))}catch(e){console.warn(e)}}));var U=()=>{St(),K.push(J(document)),Ft=!0};return"interactive"===document.readyState||"complete"===document.readyState?U():(K.push(fe("DOMContentLoaded",(()=>{kt({type:Oe.DomContentLoaded,data:{}}),"DOMContentLoaded"===x&&U()}))),K.push(fe("load",(()=>{kt({type:Oe.Load,data:{}}),"load"===x&&U()}),window))),()=>{K.forEach((e=>e())),X.destroy(),Ft=!1,Ve=void 0}}catch(e){console.warn(e)}}Lt.addCustomEvent=(e,t)=>{if(!Ft)throw new Error("please add custom event after start recording");kt({type:Oe.Custom,data:{tag:e,payload:t}})},Lt.freezePage=()=>{Je.forEach((e=>e.freeze()))},Lt.takeFullSnapshot=e=>{if(!Ft)throw new Error("please take full snapshot after start recording");St(e)},Lt.mirror=Bt,(Et=Ot||(Ot={}))[Et.NotStarted=0]="NotStarted",Et[Et.Running=1]="Running",Et[Et.Stopped=2]="Stopped";var Dt,qt=Object.defineProperty,Ht=(e,t,n)=>((e,t,n)=>t in e?qt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),Yt=Object.defineProperty,Vt=(e,t,n)=>((e,t,n)=>t in e?Yt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),Pt=Object.defineProperty,Gt=(e,t,n)=>((e,t,n)=>t in e?Pt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),Wt={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},jt={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Xt={};function zt(e){if(Xt[e])return Xt[e];var t=globalThis[e],n=t.prototype,r=e in Wt?Wt[e]:void 0,i=Boolean(r&&r.every((e=>{var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(n,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))}))),o=e in jt?jt[e]:void 0,a=Boolean(o&&o.every((e=>{var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))})));if(i&&a)return Xt[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?Xt[e]=l:n}catch(e){return n}}var Kt={};function Jt(e,t,n){var r,i=e+"."+String(n);if(Kt[i])return Kt[i].call(t);var o=zt(e),a=null==(r=Object.getOwnPropertyDescriptor(o,n))?void 0:r.get;return a?(Kt[i]=a,a.call(t)):t[n]}var Ut={};function Qt(e,t,n){var r=e+"."+String(n);if(Ut[r])return Ut[r].bind(t);var i=zt(e)[n];return"function"!=typeof i?t[n]:(Ut[r]=i,i.bind(t))}var $t={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 Qt("Node",e,"contains")(t)},getRootNode:function(e){return Qt("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 zt("MutationObserver").constructor}};class en{constructor(){Gt(this,"idNodeMap",new Map),Gt(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;var n=null==(t=this.getMeta(e))?void 0:t.id;return null!=n?n:-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 n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){var n=this.getNode(e);if(n){var r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function tn(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&tn($t.parentNode(e),t,n);for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}return!!n&&tn($t.parentNode(e),t,n)}class nn{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 nn))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 rn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},on={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},an={};function sn(e){if(an[e])return an[e];var t=globalThis[e],n=t.prototype,r=e in rn?rn[e]:void 0,i=Boolean(r&&r.every((e=>{var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(n,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))}))),o=e in on?on[e]:void 0,a=Boolean(o&&o.every((e=>{var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))})));if(i&&a)return an[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?an[e]=l:n}catch(e){return n}}var un={};function ln(e,t,n){var r,i=e+"."+String(n);if(un[i])return un[i].call(t);var o=sn(e),a=null==(r=Object.getOwnPropertyDescriptor(o,n))?void 0:r.get;return a?(un[i]=a,a.call(t)):t[n]}var cn={};function dn(e,t,n){var r=e+"."+String(n);if(cn[r])return cn[r].bind(t);var i=sn(e)[n];return"function"!=typeof i?t[n]:(cn[r]=i,i.bind(t))}var fn={childNodes:function(e){return ln("Node",e,"childNodes")},parentNode:function(e){return ln("Node",e,"parentNode")},parentElement:function(e){return ln("Node",e,"parentElement")},textContent:function(e){return ln("Node",e,"textContent")},contains:function(e,t){return dn("Node",e,"contains")(t)},getRootNode:function(e){return dn("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?ln("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?ln("Element",e,"shadowRoot"):null},querySelector:function(e,t){return ln("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return ln("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return sn("MutationObserver").constructor}};var hn="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.",vn={map:{},getId:()=>(console.error(hn),-1),getNode:()=>(console.error(hn),null),removeNodeFromMap(){console.error(hn)},has:()=>(console.error(hn),!1),reset(){console.error(hn)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(vn=new Proxy(vn,{get:(e,t,n)=>("map"===t&&console.error(hn),Reflect.get(e,t,n))}));var pn=Date.now;function mn(e){return e?e.nodeType===e.ELEMENT_NODE?e:fn.parentElement(e):null}/[1-9][0-9]{12}/.test(Date.now().toString())||(pn=()=>(new Date).getTime());function gn(e){var t,n=null;return"getRootNode"in e&&(null==(t=fn.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&fn.host(fn.getRootNode(e))&&(n=fn.host(fn.getRootNode(e))),n}function yn(e){for(var t,n=e;t=gn(n);)n=t;return n}function bn(e){var t=e.ownerDocument;if(!t)return!1;var n=yn(e);return fn.contains(t,n)}for(var Cn=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:class{constructor(){Vt(this,"id",1),Vt(this,"styleIDMap",new WeakMap),Vt(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):(n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n);var n}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 vn},closestElementOfNode:mn,getBaseDimension:function e(t,n){var r,i,o=null==(i=null==(r=t.ownerDocument)?void 0:r.defaultView)?void 0:i.frameElement;if(!o||o===n)return{x:0,y:0,relativeScale:1,absoluteScale:1};var a=o.getBoundingClientRect(),s=e(o,n),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,n){var r=t[n[0]];return 1===n.length?r:e(r.cssRules[n[1]].cssRules,n.slice(2))},getPositionsAndIndex:function(e){var t=[...e],n=t.pop();return{positions:t,index:n}},getRootShadowHost:yn,getShadowHost:gn,getWindowHeight:function(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight},getWindowScroll:function(e){var t,n,r,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=fn.parentElement(o.body))?void 0:t.scrollLeft)||(null==(n=null==o?void 0:o.body)?void 0:n.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==(r=fn.parentElement(o.body))?void 0:r.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 nn&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(fn.shadowRoot(e)))},hookSetter:function e(t,n,r,i,o){void 0===o&&(o=window);var a=o.Object.getOwnPropertyDescriptor(t,n);return o.Object.defineProperty(t,n,i?r:{set(e){setTimeout((()=>{r.set.call(this,e)}),0),a&&a.set&&a.set.call(this,e)}}),()=>e(t,n,a||{},!0)},inDom:function(e){var t=e.ownerDocument;return!!t&&(fn.contains(t,e)||bn(e))},isAncestorRemoved:function e(t,n){if(i=(r=t)&&"host"in r&&"mode"in r&&$t.host(r)||null,Boolean(i&&"shadowRoot"in i&&$t.shadowRoot(i)===r))return!1;var r,i,o=n.getId(t);if(!n.has(o))return!0;var a=fn.parentNode(t);return(!a||a.nodeType!==t.DOCUMENT_NODE)&&(!a||e(a,n))},isBlocked:function(e,t,n,r){if(!e)return!1;var i=mn(e);if(!i)return!1;try{if("string"==typeof t){if(i.classList.contains(t))return!0;if(r&&null!==i.closest("."+t))return!0}else if(tn(i,t,r))return!0}catch(e){}if(n){if(i.matches(n))return!0;if(r&&null!==i.closest(n))return!0}return!1},isIgnored:function(e,t,n){return!("TITLE"!==e.tagName||!n.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,n){n(t.value);for(var r=t.children.length-1;r>=0;r--)e(t.children[r],n)},legacy_isTouchEvent:function(e){return Boolean(e.changedTouches)},get nowTimestamp(){return pn},on:function(e,t,n){void 0===n&&(n=document);var r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)},patch:function(e,t,n){try{if(!(t in e))return()=>{};var r=e[t],i=n(r);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}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={},n=(e,n)=>{var r={value:e,parent:n,children:[]};return t[e.node.id]=r,r},r=[];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,n(i,s.parent))}else{var l=r.indexOf(s);r.splice(l,0,n(i,null))}}else if(a in t){var c=t[a];c.children.push(n(i,c))}else r.push(n(i,null))}return r},shadowHostInDom:bn,throttle:function(e,t,n){void 0===n&&(n={});var r=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!==n.leading||(i=u);var l=t-(u-i),c=this;l<=0||l>t?(r&&(clearTimeout(r),r=null),i=u,e.apply(c,a)):r||!1===n.trailing||(r=setTimeout((()=>{i=!1===n.leading?0:Date.now(),r=null,e.apply(c,a)}),l))}},uniqueTextMutations:function(e){for(var t=new Set,n=[],r=e.length;r--;){var i=e[r];t.has(i.id)||(n.push(i),t.add(i.id))}return n}},Symbol.toStringTag,{value:"Module"})),In="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",wn="undefined"==typeof Uint8Array?[]:new Uint8Array(256),kn=0;kn<64;kn++)wn[In.charCodeAt(kn)]=kn;var Sn;"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 An=document.createElement("iframe");document.body.appendChild(An),Array.from=(null==(Dt=An.contentWindow)?void 0:Dt.Array.from)||Array.from,document.body.removeChild(An)}}catch(e){console.debug("Unable to override Array.from",e)}new en,function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(Sn||(Sn={}));class xn{constructor(e){Ht(this,"fileName"),Ht(this,"functionName"),Ht(this,"lineNumber"),Ht(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 Tn=/(^|@)\S+:\d+/,Nn=/^\s*at .*(\S+:\d+|\(native\))/m,Mn=/^(eval@)?(\[native code])?$/,Rn={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(Nn)?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(Nn)}),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,"("),n=t.match(/ (\((.+):(\d+):(\d+)\)$)/),r=(t=n?t.replace(n[0],""):t).split(/\s+/).slice(1),i=this.extractLocation(n?n[1]:r.pop()),o=r.join(" ")||void 0,a=["eval","<anonymous>"].indexOf(i[0])>-1?void 0:i[0];return new xn({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(Mn)}),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 xn({functionName:e});var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(t),r=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(t,""));return new xn({functionName:r,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,n=e.message.split("\n"),r=[],i=2,o=n.length;i<o;i+=2){var a=t.exec(n[i]);a&&r.push(new xn({fileName:a[2],lineNumber:parseFloat(a[1])}))}return r},parseOpera10:function(e){for(var t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,n=e.stacktrace.split("\n"),r=[],i=0,o=n.length;i<o;i+=2){var a=t.exec(n[i]);a&&r.push(new xn({functionName:a[3]||void 0,fileName:a[2],lineNumber:parseFloat(a[1])}))}return r},parseOpera11:function(e){return e.stack.split("\n").filter((function(e){return!!e.match(Tn)&&!e.match(/^Error created at/)}),this).map((function(e){var t=e.split("@"),n=this.extractLocation(t.pop()),r=(t.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new xn({functionName:r,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})}),this)}};function _n(e){if(!e||!e.outerHTML)return"";for(var t="";e.parentElement;){var n=e.localName;if(!n)break;n=n.toLowerCase();var r=e.parentElement,i=[];if(r.children&&r.children.length>0)for(var o=0;o<r.children.length;o++){var a=r.children[o];a.localName&&a.localName.toLowerCase&&a.localName.toLowerCase()===n&&i.push(a)}i.length>1&&(n+=":eq("+i.indexOf(e)+")"),t=n+(t?">"+t:""),e=r}return t}function Fn(e){return"[object Object]"===Object.prototype.toString.call(e)}function Zn(e,t){if(0===t)return!0;var n=Object.keys(e);for(var r of n)if(Fn(e[r])&&Zn(e[r],t-1))return!0;return!1}function On(e,t){var n={numOfKeysLimit:50,depthOfLimit:4};Object.assign(n,t);var r=[],i=[];return JSON.stringify(e,(function(e,t){if(r.length>0){var o=r.indexOf(this);~o?r.splice(o+1):r.push(this),~o?i.splice(o,1/0,e):i.push(e),~r.indexOf(t)&&(t=r[0]===t?"[Circular ~]":"[Circular ~."+i.slice(0,r.indexOf(t)).join(".")+"]")}else r.push(t);if(null===t)return t;if(void 0===t)return"undefined";if(function(e){if(Fn(e)&&Object.keys(e).length>n.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if(Fn(e)&&Zn(e,n.depthOfLimit))return!0;return!1}(t))return function(e){var t=e.toString();n.stringLengthLimit&&t.length>n.stringLengthLimit&&(t=t.slice(0,n.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]=_n(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 En={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 Bn(e,t,n){var r,i=n?Object.assign({},En,n):En,o=i.logger;if(!o)return()=>{};r="string"==typeof o?t[o]:o;var a=0,s=!1,u=[];if(i.level.includes("error")){var l=t=>{var n=t.message,r=t.error,o=Rn.parse(r).map((e=>e.toString())),a=[On(n,i.stringifyOptions)];e({level:"error",trace:o,payload:a})};t.addEventListener("error",l),u.push((()=>{t.removeEventListener("error",l)}));var c=t=>{var n,r;t.reason instanceof Error?r=[On("Uncaught (in promise) "+(n=t.reason).name+": "+n.message,i.stringifyOptions)]:(n=new Error,r=[On("Uncaught (in promise)",i.stringifyOptions),On(t.reason,i.stringifyOptions)]);var o=Rn.parse(n).map((e=>e.toString()));e({level:"error",trace:o,payload:r})};t.addEventListener("unhandledrejection",c),u.push((()=>{t.removeEventListener("unhandledrejection",c)}))}for(var d of i.level)u.push(f(r,d));return()=>{u.forEach((e=>e()))};function f(t,n){var r=this;return t[n]?Cn.patch(t,n,(t=>function(){for(var o=arguments.length,u=new Array(o),l=0;l<o;l++)u[l]=arguments[l];if(t.apply(r,u),!("assert"===n&&u[0]||s)){s=!0;try{var c=Rn.parse(new Error).map((e=>e.toString())).splice(1),d=("assert"===n?u.slice(1):u).map((e=>On(e,i.stringifyOptions)));++a<i.lengthThreshold?e({level:n,trace:c,payload:d}):a===i.lengthThreshold&&e({level:"warn",trace:[],payload:[On("The number of log records reached the threshold.")]})}catch(e){t("rrweb logger error:",e,...u)}finally{s=!1}}})):()=>{}}}var Ln=e=>({name:"rrweb/console@1",observer:Bn,options:e}),Dn="undefined"!=typeof window?window:void 0,qn="undefined"!=typeof globalThis?globalThis:Dn,Hn=Array.prototype.forEach,Yn=null==qn?void 0:qn.navigator,Vn=null==qn?void 0:qn.document;null==qn||qn.location,null==qn||qn.fetch,null!=qn&&qn.XMLHttpRequest&&"withCredentials"in new qn.XMLHttpRequest&&qn.XMLHttpRequest,null==qn||qn.AbortController;var Pn,Gn=null==Yn?void 0:Yn.userAgent,Wn=null!=Dn?Dn:{};!function(e){e.GZipJS="gzip-js",e.Base64="base64"}(Pn||(Pn={}));var jn=["fatal","error","warning","log","info","debug"];function Xn(e,t){return-1!==e.indexOf(t)}var zn=function(e){return e.trim()},Kn=Array.isArray,Jn=Object.prototype,Un=Jn.hasOwnProperty,Qn=Jn.toString,$n=Kn||function(e){return"[object Array]"===Qn.call(e)},er=e=>"function"==typeof e,tr=e=>er(e)&&-1!==e.toString().indexOf("[native code]"),nr=()=>!!Dn.Zone,rr=e=>e===Object(e)&&!$n(e),ir=e=>void 0===e,or=e=>"[object String]"==Qn.call(e),ar=e=>or(e)&&0===e.trim().length,sr=e=>null===e,ur=e=>ir(e)||sr(e),lr=e=>"[object Number]"==Qn.call(e),cr=e=>"[object Boolean]"===Qn.call(e),dr=e=>e instanceof Document,fr=e=>e instanceof FormData,hr=e=>{var t={o:function(t){if(Dn&&Wn.POSTHOG_DEBUG&&!ir(Dn.console)&&Dn.console){for(var n=("__rrweb_original__"in Dn.console[t]?Dn.console[t].__rrweb_original__:Dn.console[t]),r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];n(e,...i)}},info:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.o("log",...n)},warn:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.o("warn",...n)},error:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.o("error",...n)},critical:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];console.error(e,...n)},uninitializedWarning:e=>{t.error("You must initialize PostHog before calling "+e)},createLogger:t=>hr(e+" "+t)};return t},vr=hr("[PostHog.js]"),pr=vr.createLogger,mr={};function gr(e,t,n){if($n(e))if(Hn&&e.forEach===Hn)e.forEach(t,n);else if("length"in e&&e.length===+e.length)for(var r=0,i=e.length;r<i;r++)if(r in e&&t.call(n,e[r],r)===mr)return}function yr(e,t,n){if(!ur(e)){if($n(e))return gr(e,t,n);if(fr(e)){for(var r of e.entries())if(t.call(n,r[1],r[0])===mr)return}else for(var i in e)if(Un.call(e,i)&&t.call(n,e[i],i)===mr)return}}var br=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return gr(n,(function(t){for(var n in t)void 0!==t[n]&&(e[n]=t[n])})),e};function Cr(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r}function Ir(e,t,n,r){var{capture:i=!1,passive:o=!0}=null!=r?r:{};null==e||e.addEventListener(t,n,{capture:i,passive:o})}var wr=function(e,t){var n,r;void 0===t&&(t="&");var i=[];return yr(e,(function(e,t){ir(e)||ir(t)||"undefined"===t||(n=encodeURIComponent((e=>e instanceof File)(e)?e.name:e.toString()),r=encodeURIComponent(t),i[i.length]=r+"="+n)})),i.join(t)};function kr(e,t,n){try{if(!(t in e))return()=>{};var r=e[t],i=n(r);return er(i)&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=i,()=>{e[t]=r}}catch(e){return()=>{}}}function Sr(e,t){var n,r=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:r,isHostDenied:!1};if(null==(n=t.payloadHostDenyList)||!n.length||null==r||!r.trim().length)return i;for(var o of t.payloadHostDenyList)if(r.endsWith(o))return{hostname:r,isHostDenied:!0};return i}function Ar(e){return!!e&&1===e.nodeType}function xr(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function Tr(e){return e?zn(e).split(/\s+/):[]}function Nr(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 Tr(t)}function Mr(e){var t="";return _r(e)&&!Fr(e)&&e.childNodes&&e.childNodes.length&&yr(e.childNodes,(function(e){var n;(function(e){return!!e&&3===e.nodeType})(e)&&e.textContent&&(t+=null!==(n=function(e){return ur(e)?null:zn(e).split(/(\s+)/).filter((e=>qr(e))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}(e.textContent))&&void 0!==n?n:"")})),zn(t)}var Rr=["a","button","form","input","select","textarea","label"];function _r(e){for(var t=e;t.parentNode&&!xr(t,"body");t=t.parentNode){var n=Nr(t);if(Xn(n,"ph-sensitive")||Xn(n,"ph-no-capture"))return!1}if(Xn(Nr(e),"ph-include"))return!0;var r=e.type||"";if(or(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var i=e.name||e.id||"";if(or(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 Fr(e){return!!(xr(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||xr(e,"select")||xr(e,"textarea")||"true"===e.getAttribute("contenteditable"))}var Zr="(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})",Or=new RegExp("^(?:"+Zr+")$"),Er=new RegExp(Zr),Br="\\d{3}-?\\d{2}-?\\d{4}",Lr=new RegExp("^("+Br+")$"),Dr=new RegExp("("+Br+")");function qr(e,t){if(void 0===t&&(t=!0),ur(e))return!1;if(or(e)){if(e=zn(e),(t?Or:Er).test((e||"").replace(/[- ]/g,"")))return!1;if((t?Lr:Dr).test(e))return!1}return!0}function Hr(e){var t=Mr(e);return qr(t=(t+" "+Yr(e)).trim())?t:""}function Yr(e){var t="";return e&&e.childNodes&&e.childNodes.length&&yr(e.childNodes,(function(e){var n;if(e&&"span"===(null==(n=e.tagName)?void 0:n.toLowerCase()))try{var r=Mr(e);t=(t+" "+r).trim(),e.childNodes&&e.childNodes.length&&(t=(t+" "+Yr(e)).trim())}catch(e){vr.error("[AutoCapture]",e)}})),t}function Vr(e){return function(e){var t=e.map((e=>{var t,r,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=n({},e.text?{text:e.text}:{},{"nth-child":null!==(t=e.nth_child)&&void 0!==t?t:0,"nth-of-type":null!==(r=e.nth_of_type)&&void 0!==r?r:0},e.href?{href:e.href}:{},e.attr_id?{attr_id:e.attr_id}:{},e.attributes),s={};return Cr(a).sort(((e,t)=>{var[n]=e,[r]=t;return n.localeCompare(r)})).forEach((e=>{var[t,n]=e;return s[Pr(t.toString())]=Pr(n.toString())})),i+=":",i+=Cr(a).map((e=>{var[t,n]=e;return t+'="'+n+'"'})).join("")}));return t.join(";")}(function(e){return e.map((e=>{var t,n,r={text:null==(t=e.$el_text)?void 0:t.slice(0,400),tag_name:e.tag_name,href:null==(n=e.attr__href)?void 0:n.slice(0,2048),attr_class:Gr(e),attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return Cr(e).filter((e=>{var[t]=e;return 0===t.indexOf("attr__")})).forEach((e=>{var[t,n]=e;return r.attributes[t]=n})),r}))}(e))}function Pr(e){return e.replace(/"|\\"/g,'\\"')}function Gr(e){var t=e.attr__class;return t?$n(t)?t:Tr(t):void 0}var Wr={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"]},jr=pr("[Recorder]"),Xr=e=>"navigation"===e.entryType,zr=e=>"resource"===e.entryType;function Kr(e,t,n){if(n.recordInitialRequests){var r=t.performance.getEntries().filter((e=>Xr(e)||zr(e)&&n.initiatorTypes.includes(e.initiatorType)));e({requests:r.flatMap((e=>ni({entry:e,method:void 0,status:void 0,networkRequest:{},isInitial:!0}))),isInitial:!0})}var i=new t.PerformanceObserver((t=>{var r=t.getEntries().filter((e=>Xr(e)||zr(e)&&n.initiatorTypes.includes(e.initiatorType)&&(e=>!n.recordBody&&!n.recordHeaders||"xmlhttprequest"!==e.initiatorType&&"fetch"!==e.initiatorType)(e)));e({requests:r.flatMap((e=>ni({entry:e,method:void 0,status:void 0,networkRequest:{}})))})})),o=PerformanceObserver.supportedEntryTypes.filter((e=>n.performanceEntryTypeToObserve.includes(e)));return i.observe({entryTypes:o}),()=>{i.disconnect()}}function Jr(e,t){return!!t&&(cr(t)||t[e])}function Ur(e){var{type:t,recordBody:n,headers:r,url:i}=e;function o(e){var t=Object.keys(r).find((e=>"content-type"===e.toLowerCase())),n=t&&r[t];return e.some((e=>null==n?void 0:n.includes(e)))}if(!n)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(cr(n))return!0;if($n(n))return o(n);var a=n[t];return cr(a)?a:o(a)}function Qr(e,t,n,r,i,o){return $r.apply(this,arguments)}function $r(){return $r=t((function*(e,t,n,r,i,o){if(void 0===o&&(o=0),o>10)return jr.warn("Failed to get performance entry for request",{url:n,initiatorType:t}),null;var a=function(e,t){for(var n=e.length-1;n>=0;n-=1)if(t(e[n]))return e[n]}(e.performance.getEntriesByName(n),(e=>zr(e)&&e.initiatorType===t&&(ir(r)||e.startTime>=r)&&(ir(i)||e.startTime<=i)));return a||(yield new Promise((e=>setTimeout(e,50*o))),Qr(e,t,n,r,i,o+1))})),$r.apply(this,arguments)}function ei(e){var{body:t,options:n,url:r}=e;if(ur(t))return null;var{hostname:i,isHostDenied:o}=Sr(r,n);if(o)return i+" is in deny list";if(or(t))return t;if(dr(t))return t.textContent;if(fr(t))return wr(t);if(rr(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 ti=e=>!sr(e)&&("navigation"===e.entryType||"resource"===e.entryType);function ni(e){var{entry:t,method:r,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()),f=Math.floor(d+(s||0)),h=[n({},t?t.toJSON():{name:l},{startTime:ir(s)?void 0:Math.round(s),endTime:ir(u)?void 0:Math.round(u),timeOrigin:d,timestamp:f,method:r,initiatorType:c||(t?t.initiatorType:void 0),status:i,requestHeaders:o.requestHeaders,requestBody:o.requestBody,responseHeaders:o.responseHeaders,responseBody:o.responseBody,isInitial:a})];if(ti(t))for(var v of t.serverTiming||[])h.push({timeOrigin:d,timestamp:f,startTime:Math.round(t.startTime),name:v.name,duration:v.duration,entryType:"serverTiming"});return h}var ri=["video/","audio/"];function ii(e){return new Promise(((t,n)=>{var r=setTimeout((()=>t("[SessionReplay] Timeout while trying to read body")),500);try{e.clone().text().then((e=>t(e)),(e=>n(e))).finally((()=>clearTimeout(r)))}catch(e){clearTimeout(r),t("[SessionReplay] Failed to read body")}}))}function oi(){return oi=t((function*(e){var{r:t,options:n,url:r}=e,{hostname:i,isHostDenied:o}=Sr(r,n);return o?Promise.resolve(i+" is in deny list"):ii(t)})),oi.apply(this,arguments)}function ai(){return ai=t((function*(e){var{r:t,options:n,url:r}=e,i=function(e){var t,{r:n,options:r,url:i}=e;if("chunked"===n.headers.get("Transfer-Encoding"))return"Chunked Transfer-Encoding is not supported";var o=null==(t=n.headers.get("Content-Type"))?void 0:t.toLowerCase(),a=ri.some((e=>null==o?void 0:o.startsWith(e)));if(o&&a)return"Content-Type "+o+" is not supported";var{hostname:s,isHostDenied:u}=Sr(i,r);return u?s+" is in deny list":null}({r:t,options:n,url:r});return sr(i)?ii(t):Promise.resolve(i)})),ai.apply(this,arguments)}function si(e,n,r){if(!r.initiatorTypes.includes("fetch"))return()=>{};var i=Jr("request",r.recordHeaders),o=Jr("response",r.recordHeaders),a=kr(n,"fetch",(a=>function(){var s=t((function*(t,s){var u,l,c,d=new Request(t,s),f={};try{var h={};d.headers.forEach(((e,t)=>{h[t]=e})),i&&(f.requestHeaders=h),Ur({type:"request",headers:h,url:t,recordBody:r.recordBody})&&(f.requestBody=yield function(e){return oi.apply(this,arguments)}({r:d,options:r,url:t})),l=n.performance.now(),u=yield a(d),c=n.performance.now();var v={};return u.headers.forEach(((e,t)=>{v[t]=e})),o&&(f.responseHeaders=v),Ur({type:"response",headers:v,url:t,recordBody:r.recordBody})&&(f.responseBody=yield function(e){return ai.apply(this,arguments)}({r:u,options:r,url:t})),u}finally{Qr(n,"fetch",d.url,l,c).then((t=>{var n,r=ni({entry:t,method:d.method,status:null==(n=u)?void 0:n.status,networkRequest:f,start:l,end:c,url:d.url,initiatorType:"fetch"});e({requests:r})})).catch((()=>{}))}}));return function(e,t){return s.apply(this,arguments)}}()));return()=>{a()}}var ui=null;function li(e,t,r){if(!("performance"in t))return()=>{};if(ui)return jr.warn("Network observer already initialised, doing nothing"),()=>{};var i=r?Object.assign({},Wr,r):Wr,o=t=>{var r=[];t.requests.forEach((e=>{var t=i.maskRequestFn(e);t&&r.push(t)})),r.length>0&&e(n({},t,{requests:r}))},a=Kr(o,t,i),s=()=>{},u=()=>{};return(i.recordHeaders||i.recordBody)&&(s=function(e,t,n){if(!n.initiatorTypes.includes("xmlhttprequest"))return()=>{};var r=Jr("request",n.recordHeaders),i=Jr("response",n.recordHeaders),o=kr(t.XMLHttpRequest.prototype,"open",(o=>function(a,s,u,l,c){void 0===u&&(u=!0);var d,f,h=this,v=new Request(s),p={},m={},g=h.setRequestHeader.bind(h);h.setRequestHeader=(e,t)=>(m[e]=t,g(e,t)),r&&(p.requestHeaders=m);var y=h.send.bind(h);h.send=e=>(Ur({type:"request",headers:m,url:s,recordBody:n.recordBody})&&(p.requestBody=ei({body:e,options:n,url:s})),d=t.performance.now(),y(e)),h.addEventListener("readystatechange",(()=>{if(h.readyState===h.DONE){f=t.performance.now();var r={};h.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((e=>{var t=e.split(": "),n=t.shift(),i=t.join(": ");n&&(r[n]=i)})),i&&(p.responseHeaders=r),Ur({type:"response",headers:r,url:s,recordBody:n.recordBody})&&(p.responseBody=ei({body:h.response,options:n,url:s})),Qr(t,"xmlhttprequest",v.url,d,f).then((t=>{var n=ni({entry:t,method:a,status:null==h?void 0:h.status,networkRequest:p,start:d,end:f,url:s.toString(),initiatorType:"xmlhttprequest"});e({requests:n})})).catch((()=>{}))}})),o.call(h,a,s,u,l,c)}));return()=>{o()}}(o,t,i),u=si(o,t,i)),ui=()=>{a(),s(),u()}}var ci,di,fi,hi,vi,pi,mi=e=>({name:"rrweb/network@1",observer:li,options:e});Wn.__PosthogExtensions__=Wn.__PosthogExtensions__||{},Wn.__PosthogExtensions__.rrwebPlugins={getRecordConsolePlugin:Ln,getRecordNetworkPlugin:mi},Wn.__PosthogExtensions__.rrweb={record:Lt,version:"v2"},Wn.rrweb={record:Lt,version:"v2"},Wn.rrwebConsoleRecord={getRecordConsolePlugin:Ln},Wn.getRecordNetworkPlugin=mi,function(e){e.Button="button",e.Tab="tab",e.Selector="selector"}(ci||(ci={})),function(e){e.Left="left",e.Center="center",e.Right="right",e.NextToTrigger="next_to_trigger"}(di||(di={})),function(e){e.Popover="popover",e.API="api",e.Widget="widget"}(fi||(fi={})),function(e){e.Open="open",e.MultipleChoice="multiple_choice",e.SingleChoice="single_choice",e.Rating="rating",e.Link="link"}(hi||(hi={})),function(e){e.NextQuestion="next_question",e.End="end",e.ResponseBased="response_based",e.SpecificQuestion="specific_question"}(vi||(vi={})),function(e){e.Once="once",e.Recurring="recurring",e.Always="always"}(pi||(pi={}));var gi,yi,bi,Ci,Ii,wi,ki,Si,Ai={},xi=[],Ti=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ni=Array.isArray;function Mi(e,t){for(var n in t)e[n]=t[n];return e}function Ri(e){var t=e.parentNode;t&&t.removeChild(e)}function _i(e,t,n){var r,i,o,a={};for(o in t)"key"==o?r=t[o]:"ref"==o?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?gi.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===a[o]&&(a[o]=e.defaultProps[o]);return Fi(e,a,r,i,null)}function Fi(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==i?++bi:i,__i:-1,__u:0};return null==i&&null!=yi.vnode&&yi.vnode(o),o}function Zi(e){return e.children}function Oi(e,t){this.props=e,this.context=t}function Ei(e,t){if(null==t)return e.__?Ei(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?Ei(e):null}function Bi(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return Bi(e)}}function Li(e){(!e.__d&&(e.__d=!0)&&Ci.push(e)&&!Di.__r++||Ii!==yi.debounceRendering)&&((Ii=yi.debounceRendering)||wi)(Di)}function Di(){var e,t,n,r,i,o,a,s,u;for(Ci.sort(ki);e=Ci.shift();)e.__d&&(t=Ci.length,r=void 0,o=(i=(n=e).__v).__e,s=[],u=[],(a=n.__P)&&((r=Mi({},i)).__v=i.__v+1,yi.vnode&&yi.vnode(r),ji(a,r,i,n.__n,void 0!==a.ownerSVGElement,32&i.__u?[o]:null,s,null==o?Ei(i):o,!!(32&i.__u),u),r.__.__k[r.__i]=r,Xi(s,r,u),r.__e!=o&&Bi(r)),Ci.length>t&&Ci.sort(ki));Di.__r=0}function qi(e,t,n,r,i,o,a,s,u,l,c){var d,f,h,v,p,m=r&&r.__k||xi,g=t.length;for(n.__d=u,function(e,t,n){var r,i,o,a,s,u=t.length,l=n.length,c=l,d=0;for(e.__k=[],r=0;r<u;r++)null!=(i=e.__k[r]=null==(i=t[r])||"boolean"==typeof i||"function"==typeof i?null:"string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?Fi(null,i,null,null,i):Ni(i)?Fi(Zi,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?Fi(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=e,i.__b=e.__b+1,s=Yi(i,n,a=r+d,c),i.__i=s,o=null,-1!==s&&(c--,(o=n[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!==r+d&&(i.__u|=65536))):(o=n[r])&&null==o.key&&o.__e&&(o.__e==e.__d&&(e.__d=Ei(o)),Ki(o,o,!1),n[r]=null,c--);if(c)for(r=0;r<l;r++)null!=(o=n[r])&&0==(131072&o.__u)&&(o.__e==e.__d&&(e.__d=Ei(o)),Ki(o,o))}(n,t,m),u=n.__d,d=0;d<g;d++)null!=(h=n.__k[d])&&"boolean"!=typeof h&&"function"!=typeof h&&(f=-1===h.__i?Ai:m[h.__i]||Ai,h.__i=d,ji(e,h,f,i,o,a,s,u,l,c),v=h.__e,h.ref&&f.ref!=h.ref&&(f.ref&&zi(f.ref,null,h),c.push(h.ref,h.__c||v,h)),null==p&&null!=v&&(p=v),65536&h.__u||f.__k===h.__k?u=Hi(h,u,e):"function"==typeof h.type&&void 0!==h.__d?u=h.__d:v&&(u=v.nextSibling),h.__d=void 0,h.__u&=-196609);n.__d=u,n.__e=p}function Hi(e,t,n){var r,i;if("function"==typeof e.type){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,t=Hi(r[i],t,n));return t}return e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e),t&&t.nextSibling}function Yi(e,t,n,r){var i=e.key,o=e.type,a=n-1,s=n+1,u=t[n];if(null===u||u&&i==u.key&&o===u.type)return n;if(r>(null!=u&&0==(131072&u.__u)?1:0))for(;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 Vi(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||Ti.test(t)?n:n+"px"}function Pi(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Vi(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Vi(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/(PointerCapture)$|Capture$/,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,o?Wi:Gi,o)):e.removeEventListener(t,o?Wi:Gi,o);else{if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&"rowSpan"!==t&&"colSpan"!==t&&"role"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function Gi(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(yi.event?yi.event(e):e)}function Wi(e){return this.l[e.type+!0](yi.event?yi.event(e):e)}function ji(e,t,n,r,i,o,a,s,u,l){var c,d,f,h,v,p,m,g,y,b,C,I,w,k,S,A=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(u=!!(32&n.__u),o=[s=t.__e=n.__e]),(c=yi.__b)&&c(t);e:if("function"==typeof A)try{if(g=t.props,y=(c=A.contextType)&&r[c.__c],b=c?y?y.props.value:c.__:r,n.__c?m=(d=t.__c=n.__c).__=d.__E:("prototype"in A&&A.prototype.render?t.__c=d=new A(g,b):(t.__c=d=new Oi(g,b),d.constructor=A,d.render=Ji),y&&y.sub(d),d.props=g,d.state||(d.state={}),d.context=b,d.__n=r,f=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=A.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=Mi({},d.__s)),Mi(d.__s,A.getDerivedStateFromProps(g,d.__s))),h=d.props,v=d.state,d.__v=t,f)null==A.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==A.getDerivedStateFromProps&&g!==h&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(g,b),!d.__e&&(null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(g,d.__s,b)||t.__v===n.__v)){for(t.__v!==n.__v&&(d.props=g,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),C=0;C<d._sb.length;C++)d.__h.push(d._sb[C]);d._sb=[],d.__h.length&&a.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(g,d.__s,b),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(h,v,p)}))}if(d.context=b,d.props=g,d.__P=e,d.__e=!1,I=yi.__r,w=0,"prototype"in A&&A.prototype.render){for(d.state=d.__s,d.__d=!1,I&&I(t),c=d.render(d.props,d.state,d.context),k=0;k<d._sb.length;k++)d.__h.push(d._sb[k]);d._sb=[]}else do{d.__d=!1,I&&I(t),c=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++w<25);d.state=d.__s,null!=d.getChildContext&&(r=Mi(Mi({},r),d.getChildContext())),f||null==d.getSnapshotBeforeUpdate||(p=d.getSnapshotBeforeUpdate(h,v)),qi(e,Ni(S=null!=c&&c.type===Zi&&null==c.key?c.props.children:c)?S:[S],t,n,r,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=n.__e,t.__k=n.__k),yi.__e(e,t,n)}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=function(e,t,n,r,i,o,a,s,u){var l,c,d,f,h,v,p,m=n.props,g=t.props,y=t.type;if("svg"===y&&(i=!0),null!=o)for(l=0;l<o.length;l++)if((h=o[l])&&"setAttribute"in h==!!y&&(y?h.localName===y:3===h.nodeType)){e=h,o[l]=null;break}if(null==e){if(null===y)return document.createTextNode(g);e=i?document.createElementNS("http://www.w3.org/2000/svg",y):document.createElement(y,g.is&&g),o=null,s=!1}if(null===y)m===g||s&&e.data===g||(e.data=g);else{if(o=o&&gi.call(e.childNodes),m=n.props||Ai,!s&&null!=o)for(m={},l=0;l<e.attributes.length;l++)m[(h=e.attributes[l]).name]=h.value;for(l in m)h=m[l],"children"==l||("dangerouslySetInnerHTML"==l?d=h:"key"===l||l in g||Pi(e,l,null,h,i));for(l in g)h=g[l],"children"==l?f=h:"dangerouslySetInnerHTML"==l?c=h:"value"==l?v=h:"checked"==l?p=h:"key"===l||s&&"function"!=typeof h||m[l]===h||Pi(e,l,h,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=""),qi(e,Ni(f)?f:[f],t,n,r,i&&"foreignObject"!==y,o,a,o?o[0]:n.__k&&Ei(n,0),s,u),null!=o)for(l=o.length;l--;)null!=o[l]&&Ri(o[l]);s||(l="value",void 0!==v&&(v!==e[l]||"progress"===y&&!v||"option"===y&&v!==m[l])&&Pi(e,l,v,m[l],!1),l="checked",void 0!==p&&p!==e[l]&&Pi(e,l,p,m[l],!1))}return e}(n.__e,t,n,r,i,o,a,u,l);(c=yi.diffed)&&c(t)}function Xi(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)zi(n[r],n[++r],n[++r]);yi.__c&&yi.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){yi.__e(e,t.__v)}}))}function zi(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){yi.__e(e,n)}}function Ki(e,t,n){var r,i;if(yi.unmount&&yi.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||zi(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){yi.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Ki(r[i],t,n||"function"!=typeof e.type);n||null==e.__e||Ri(e.__e),e.__=e.__e=e.__d=void 0}function Ji(e,t,n){return this.constructor(e,n)}function Ui(e,t,n){var r,i,o,a;yi.__&&yi.__(e,t),i=(r="function"==typeof n)?null:t.__k,o=[],a=[],ji(t,e=(!r&&n||t).__k=_i(Zi,null,[e]),i||Ai,Ai,void 0!==t.ownerSVGElement,!r&&n?[n]:i?null:t.firstChild?gi.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r,a),Xi(o,e,a)}function Qi(e,t,n){var r,i,o,a,s=Mi({},e.props);for(o in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)"key"==o?r=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?gi.call(arguments,2):n),Fi(e.type,s,r||e.key,i||e.ref,null)}gi=xi.slice,yi={__e:function(e,t,n,r){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,r||{}),a=i.__d),a)return i.__E=i}catch(t){e=t}throw e}},bi=0,Oi.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Mi({},this.state),"function"==typeof e&&(e=e(Mi({},n),this.props)),e&&Mi(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),Li(this))},Oi.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Li(this))},Oi.prototype.render=Zi,Ci=[],wi="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ki=function(e,t){return e.__v.__b-t.__v.__b},Di.__r=0,Si=0;var $i,eo,to,no,ro=0,io=[],oo=[],ao=yi.__b,so=yi.__r,uo=yi.diffed,lo=yi.__c,co=yi.unmount;function fo(e,t){yi.__h&&yi.__h(eo,e,ro||t),ro=0;var n=eo.__H||(eo.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:oo}),n.__[e]}function ho(e){return ro=1,function(e,t,n){var r=fo($i++,2);if(r.t=e,!r.__c&&(r.__=[ko(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=eo,!eo.u)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter((function(e){return e.__c}));if(i.every((function(e){return!e.__N})))return!o||o.call(this,e,t,n);var 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&&r.__c.props===e)&&(!o||o.call(this,e,t,n))};eo.u=!0;var o=eo.shouldComponentUpdate,a=eo.componentWillUpdate;eo.componentWillUpdate=function(e,t,n){if(this.__e){var r=o;o=void 0,i(e,t,n),o=r}a&&a.call(this,e,t,n)},eo.shouldComponentUpdate=i}return r.__N||r.__}(ko,e)}function vo(e,t){var n=fo($i++,3);!yi.__s&&wo(n.__H,t)&&(n.__=e,n.i=t,eo.__H.__h.push(n))}function po(e,t){var n=fo($i++,7);return wo(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function mo(e){var t=eo.context[e.__c],n=fo($i++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(eo)),t.props.value):e.__}function go(){for(var e;e=io.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Co),e.__H.__h.forEach(Io),e.__H.__h=[]}catch(t){e.__H.__h=[],yi.__e(t,e.__v)}}yi.__b=function(e){eo=null,ao&&ao(e)},yi.__r=function(e){so&&so(e),$i=0;var t=(eo=e.__c).__H;t&&(to===eo?(t.__h=[],eo.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=oo,e.__N=e.i=void 0}))):(t.__h.forEach(Co),t.__h.forEach(Io),t.__h=[],$i=0)),to=eo},yi.diffed=function(e){uo&&uo(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==io.push(t)&&no===yi.requestAnimationFrame||((no=yi.requestAnimationFrame)||bo)(go)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==oo&&(e.__=e.__V),e.i=void 0,e.__V=oo}))),to=eo=null},yi.__c=function(e,t){t.some((function(e){try{e.__h.forEach(Co),e.__h=e.__h.filter((function(e){return!e.__||Io(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],yi.__e(n,e.__v)}})),lo&&lo(e,t)},yi.unmount=function(e){co&&co(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{Co(e)}catch(e){t=e}})),n.__H=void 0,t&&yi.__e(t,n.__v))};var yo="function"==typeof requestAnimationFrame;function bo(e){var t,n=function(){clearTimeout(r),yo&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);yo&&(t=requestAnimationFrame(n))}function Co(e){var t=eo,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),eo=t}function Io(e){var t=eo;e.__c=e.__(),eo=t}function wo(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function ko(e,t){return"function"==typeof t?t(e):t}var So=pr("[Surveys]");var Ao="seenSurvey_",xo=pr("[Stylesheet Loader]"),To=(e,t,n)=>{var r,i=e.createElement("style");return i.innerText=t,null!=n&&null!=(r=n.config)&&r.prepare_external_dependency_stylesheet&&(i=n.config.prepare_external_dependency_stylesheet(i)),i||(xo.error("prepare_external_dependency_stylesheet returned null"),null)},No=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}},Mo="Mobile",Ro="Android",_o="Tablet",Fo=Ro+" "+_o,Zo="iPad",Oo="Apple Watch",Eo="BlackBerry",Bo="Nintendo",Lo="PlayStation",Do="Xbox",qo="Windows Phone",Ho="Nokia",Yo="Ouya",Vo="Generic",Po=Vo+" "+Mo.toLowerCase(),Go=Vo+" "+_o.toLowerCase(),Wo=new RegExp(Do,"i"),jo=new RegExp(Lo+" \\w+","i"),Xo=new RegExp(Bo+" \\w+","i"),zo=new RegExp(Eo+"|PlayBook|BB10","i"),Ko=function(e){var t=function(e){return Xo.test(e)?Bo:jo.test(e)?Lo:Wo.test(e)?Do:new RegExp(Yo,"i").test(e)?Yo:new RegExp("("+qo+"|WPDesktop)","i").test(e)?qo:/iPad/.test(e)?Zo:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?Oo:zo.test(e)?Eo:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(Ho,"i").test(e)?Ho:/(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(Mo).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)?Ro:Fo:Ro:new RegExp("(pda|"+Mo+")","i").test(e)?Po:new RegExp(_o,"i").test(e)&&!new RegExp(_o+" pc","i").test(e)?Go:""}(e);return t===Zo||t===Fo||"Kobo"===t||"Kindle Fire"===t||t===Go?_o:t===Bo||t===Do||t===Lo||t===Yo?"Console":t===Oo?"Wearable":t?Mo:"Desktop"},Jo=Dn,Uo=Vn,Qo=2147483647;function $o(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}var ea=e=>{var t={[di.Left]:"left: 30px;",[di.Right]:"right: 60px;",[di.Center]:"\n left: 50%;\n transform: translateX(-50%);\n ",[di.NextToTrigger]:"right: 30px;"};return("\n .survey-form, .thank-you-message {\n position: fixed;\n margin: 0px;\n bottom: 0px;\n color: black;\n font-weight: normal;\n font-family: "+$o(null==e?void 0:e.fontFamily)+";\n text-align: left;\n max-width: "+parseInt((null==e?void 0:e.maxWidth)||"300")+"px;\n width: 100%;\n z-index: "+parseInt((null==e?void 0:e.zIndex)||Qo.toString())+";\n border: 1.5px solid "+((null==e?void 0:e.borderColor)||"#c9c6c6")+";\n border-bottom: 0px;\n "+(null!=e&&e.position?t[e.position]:t[di.Right])+"\n flex-direction: column;\n background: "+((null==e?void 0:e.backgroundColor)||"#eeeded")+";\n border-top-left-radius: 10px;\n border-top-right-radius: 10px;\n box-shadow: -6px 0 16px -8px rgb(0 0 0 / 8%), -9px 0 28px 0 rgb(0 0 0 / 5%), -12px 0 48px 16px rgb(0 0 0 / 3%);\n }\n\n .survey-box, .thank-you-message-container {\n padding: 20px 25px 10px;\n display: flex;\n flex-direction: column;\n border-radius: 10px;\n }\n\n .thank-you-message {\n text-align: center;\n }\n\n .form-submit[disabled] {\n opacity: "+((null==e?void 0:e.disabledButtonOpacity)||"0.6")+";\n filter: grayscale(50%);\n cursor: not-allowed;\n }\n .survey-form textarea {\n color: #2d2d2d;\n font-size: 14px;\n font-family: "+$o(null==e?void 0:e.fontFamily)+";\n background: white;\n color: black;\n outline: none;\n padding-left: 10px;\n padding-right: 10px;\n padding-top: 10px;\n border-radius: 6px;\n border-color: "+((null==e?void 0:e.borderColor)||"#c9c6c6")+";\n margin-top: 14px;\n width: 100%;\n box-sizing: border-box;\n }\n .survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) textarea {\n margin-top: 0;\n }\n .form-submit {\n box-sizing: border-box;\n margin: 0;\n font-family: inherit;\n overflow: visible;\n text-transform: none;\n position: relative;\n display: inline-block;\n font-weight: 700;\n white-space: nowrap;\n text-align: center;\n border: 1.5px solid transparent;\n cursor: pointer;\n user-select: none;\n touch-action: manipulation;\n padding: 12px;\n font-size: 14px;\n border-radius: 6px;\n outline: 0;\n background: "+((null==e?void 0:e.submitButtonColor)||"black")+" !important;\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.12);\n box-shadow: 0 2px 0 rgba(0, 0, 0, 0.045);\n width: 100%;\n }\n .form-cancel {\n display: flex;\n float: right;\n border: none;\n background: none;\n cursor: pointer;\n }\n .cancel-btn-wrapper {\n position: absolute;\n width: 35px;\n height: 35px;\n border-radius: 100%;\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n background: white;\n border: 1.5px solid "+((null==e?void 0:e.borderColor)||"#c9c6c6")+";\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .bolded { font-weight: 600; }\n .buttons {\n display: flex;\n justify-content: center;\n }\n .footer-branding {\n font-size: 11px;\n margin-top: 10px;\n text-align: center;\n display: flex;\n justify-content: center;\n gap: 4px;\n align-items: center;\n font-weight: 500;\n background: "+((null==e?void 0:e.backgroundColor)||"#eeeded")+";\n text-decoration: none;\n backgroundColor: "+((null==e?void 0:e.backgroundColor)||"#eeeded")+";\n color: "+na((null==e?void 0:e.backgroundColor)||"#eeeded")+";\n }\n .survey-question {\n font-weight: 500;\n font-size: 14px;\n background: "+((null==e?void 0:e.backgroundColor)||"#eeeded")+";\n }\n .question-textarea-wrapper {\n display: flex;\n flex-direction: column;\n }\n .survey-question-description {\n font-size: 13px;\n padding-top: 5px;\n background: "+((null==e?void 0:e.backgroundColor)||"#eeeded")+";\n }\n .ratings-number {\n font-size: 16px;\n font-weight: 600;\n padding: 8px 0px;\n border: none;\n }\n .ratings-number:hover {\n cursor: pointer;\n }\n .rating-options {\n margin-top: 14px;\n }\n .rating-options-number {\n display: grid;\n border-radius: 6px;\n overflow: hidden;\n border: 1.5px solid "+((null==e?void 0:e.borderColor)||"#c9c6c6")+";\n }\n .rating-options-number > .ratings-number {\n border-right: 1px solid "+((null==e?void 0:e.borderColor)||"#c9c6c6")+";\n }\n .rating-options-number > .ratings-number:last-of-type {\n border-right: 0px;\n }\n .rating-options-number .rating-active {\n background: "+((null==e?void 0:e.ratingButtonActiveColor)||"black")+";\n }\n .rating-options-emoji {\n display: flex;\n justify-content: space-between;\n }\n .ratings-emoji {\n font-size: 16px;\n background-color: transparent;\n border: none;\n padding: 0px;\n }\n .ratings-emoji:hover {\n cursor: pointer;\n }\n .ratings-emoji.rating-active svg {\n fill: "+((null==e?void 0:e.ratingButtonActiveColor)||"black")+";\n }\n .emoji-svg {\n fill: '#939393';\n }\n .rating-text {\n display: flex;\n flex-direction: row;\n font-size: 11px;\n justify-content: space-between;\n margin-top: 6px;\n background: "+((null==e?void 0:e.backgroundColor)||"#eeeded")+";\n opacity: .60;\n }\n .limit-height {\n max-height: 300px;\n overflow: auto;\n scrollbar-width: thin;\n scrollbar-color: "+((null==e?void 0:e.borderColor)||"#c9c6c6")+" "+((null==e?void 0:e.backgroundColor)||"#eeeded")+";\n }\n .multiple-choice-options {\n margin-top: 13px;\n font-size: 14px;\n }\n .survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) .multiple-choice-options {\n margin-top: 0;\n }\n .multiple-choice-options .choice-option {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 13px;\n cursor: pointer;\n margin-bottom: 5px;\n position: relative;\n }\n .multiple-choice-options > .choice-option:last-of-type {\n margin-bottom: 0px;\n }\n .multiple-choice-options input {\n cursor: pointer;\n position: absolute;\n opacity: 0;\n }\n .choice-check {\n position: absolute;\n right: 10px;\n background: white;\n }\n .choice-check svg {\n display: none;\n }\n .multiple-choice-options .choice-option:hover .choice-check svg {\n display: inline-block;\n opacity: .25;\n }\n .multiple-choice-options input:checked + label + .choice-check svg {\n display: inline-block;\n opacity: 100% !important;\n }\n .multiple-choice-options input:checked + label {\n font-weight: bold;\n border: 1.5px solid rgba(0,0,0);\n }\n .multiple-choice-options input:checked + label input {\n font-weight: bold;\n }\n .multiple-choice-options label {\n width: 100%;\n cursor: pointer;\n padding: 10px;\n border: 1.5px solid rgba(0,0,0,.25);\n border-radius: 4px;\n background: white;\n }\n .multiple-choice-options .choice-option-open label {\n padding-right: 30px;\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n max-width: 100%;\n }\n .multiple-choice-options .choice-option-open label span {\n width: 100%;\n }\n .multiple-choice-options .choice-option-open input:disabled + label {\n opacity: 0.6;\n }\n .multiple-choice-options .choice-option-open label input {\n position: relative;\n opacity: 1;\n flex-grow: 1;\n border: 0;\n outline: 0;\n }\n .thank-you-message-body {\n margin-top: 6px;\n font-size: 14px;\n background: "+((null==e?void 0:e.backgroundColor)||"#eeeded")+";\n }\n .thank-you-message-header {\n margin: 10px 0px 0px;\n background: "+((null==e?void 0:e.backgroundColor)||"#eeeded")+";\n }\n .thank-you-message-container .form-submit {\n margin-top: 20px;\n margin-bottom: 10px;\n }\n .thank-you-message-countdown {\n margin-left: 6px;\n }\n .bottom-section {\n margin-top: 14px;\n }\n ").replace(/[\n\r\t]+/g," ").replace(/\s{2,}/g," ").trim()};function ta(e){if("#"===e[0]){var t=e.replace(/^#/,"");return"rgb("+parseInt(t.slice(0,2),16)+","+parseInt(t.slice(2,4),16)+","+parseInt(t.slice(4,6),16)+")"}return"rgb(255, 255, 255)"}function na(e){var t;void 0===e&&(e=ia),"#"===e[0]&&(t=ta(e)),e.startsWith("rgb")&&(t=e);var n={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}[e.toLowerCase()];if(n&&(t=ta(n)),!t)return"black";var r=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(r){var i=parseInt(r[1]),o=parseInt(r[2]),a=parseInt(r[3]);return Math.sqrt(i*i*.299+o*o*.587+a*a*.114)>127.5?"black":"white"}return"black"}var ra={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:di.Right},ia="#eeeded",oa=function(e,t,r){void 0===e&&(e={}),r?(localStorage.setItem(da(t),"true"),r.capture("survey sent",n({$survey_name:t.name,$survey_id:t.id,$survey_iteration:t.current_iteration,$survey_iteration_start_date:t.current_iteration_start_date,$survey_questions:t.questions.map(((e,t)=>({id:e.id,question:e.question,index:t}))),sessionRecordingUrl:null==r.get_session_replay_url?void 0:r.get_session_replay_url()},e,{$set:{[fa(t,"responded")]:!0}})),Jo.dispatchEvent(new CustomEvent("PHSurveySent",{detail:{surveyId:t.id}}))):So.error("[survey sent] event not captured, PostHog instance not found.")},aa=(e,t,n)=>{t?n||(t.capture("survey dismissed",{$survey_name:e.name,$survey_id:e.id,$survey_iteration:e.current_iteration,$survey_iteration_start_date:e.current_iteration_start_date,sessionRecordingUrl:null==t.get_session_replay_url?void 0:t.get_session_replay_url(),$set:{[fa(e,"dismissed")]:!0}}),localStorage.setItem(da(e),"true"),Jo.dispatchEvent(new CustomEvent("PHSurveyClosed",{detail:{surveyId:e.id}}))):So.error("[survey dismissed] event not captured, PostHog instance not found.")},sa=e=>e.map((e=>({sort:Math.floor(10*Math.random()),value:e}))).sort(((e,t)=>e.sort-t.sort)).map((e=>e.value)),ua=(e,t)=>e.length===t.length&&e.every(((e,n)=>e===t[n]))?t.reverse():t,la=e=>e.appearance&&e.appearance.shuffleQuestions?ua(e.questions,sa(e.questions)):e.questions,ca=e=>{var t,n;return!(null==(t=e.conditions)||null==(n=t.events)||!n.repeatedActivation||!(e=>{var t,n,r,i,o,a;return null!=(null==(t=e.conditions)||null==(n=t.events)||null==(r=n.values)?void 0:r.length)&&(null==(i=e.conditions)||null==(o=i.events)||null==(a=o.values)?void 0:a.length)>0})(e))||e.schedule===pi.Always},da=e=>{var t=""+Ao+e.id;return e.current_iteration&&e.current_iteration>0&&(t=""+Ao+e.id+"_"+e.current_iteration),t},fa=(e,t)=>{var n="$survey_"+t+"/"+e.id;return e.current_iteration&&e.current_iteration>0&&(n="$survey_"+t+"/"+e.id+"/"+e.current_iteration),n},ha=function(e,t){var n={__c:t="__cC"+Si++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,Li(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}({isPreviewMode:!1,previewPageIndex:0,onPopupSurveyDismissed:()=>{},isPopup:!0,onPreviewSubmit:()=>{}}),va=e=>{var{component:t,children:n,renderAsHtml:r,style:i}=e;return Qi(t,r?{dangerouslySetInnerHTML:{__html:n},style:i}:{children:n,style:i})},pa={icontains:(e,t)=>e.some((e=>t.toLowerCase().includes(e.toLowerCase()))),not_icontains:(e,t)=>e.every((e=>!t.toLowerCase().includes(e.toLowerCase()))),regex:(e,t)=>e.some((e=>No(t,e))),not_regex:(e,t)=>e.every((e=>!No(t,e))),exact:(e,t)=>e.some((e=>t===e)),is_not:(e,t)=>e.every((e=>t!==e))};function ma(e){return null!=e?e:"icontains"}function ga(e){var t,n,r;if(null==(t=e.conditions)||!t.url)return!0;var i=null==Jo||null==(n=Jo.location)?void 0:n.href;if(!i)return!1;var o=[e.conditions.url];return pa[ma(null==(r=e.conditions)?void 0:r.urlMatchType)](o,i)}function ya(e,t){void 0===t&&(t=!1);var n="PostHogSurvey-"+e.id;return t?"."+n:n}var ba=Vn;function Ca(e,t){var n,r=ya(e),i=ba.querySelector("."+r);if(i&&i.shadowRoot)return i.shadowRoot;var o=ba.createElement("div");o.className=r;var a=o.attachShadow({mode:"open"}),s="\n .ph-survey-widget-tab {\n position: fixed;\n top: 50%;\n right: 0;\n background: "+((null==(n=e.appearance)?void 0:n.widgetColor)||"#e0a045")+";\n color: white;\n transform: rotate(-90deg) translate(0, -100%);\n transform-origin: right top;\n min-width: 40px;\n padding: 8px 12px;\n font-weight: 500;\n border-radius: 3px 3px 0 0;\n text-align: center;\n cursor: pointer;\n z-index: "+Qo+";\n }\n .ph-survey-widget-tab:hover {\n padding-bottom: 13px;\n }\n .ph-survey-widget-button {\n position: fixed;\n }\n ",u=To(ba,s,t);return u&&a.append(u),ba.body.appendChild(o),a}var Ia=0;function wa(e,t,n,r,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:n,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--Ia,__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 yi.vnode&&yi.vnode(l),l}var ka=wa("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:wa("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"})}),Sa=wa("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:wa("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"})}),Aa=wa("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:wa("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"})}),xa=wa("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:wa("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"})}),Ta=wa("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:wa("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"})}),Na=wa("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:wa("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"})}),Ma=wa("svg",{width:"77",height:"14",viewBox:"0 0 77 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[wa("g",{"clip-path":"url(#clip0_2415_6911)",children:[wa("mask",{id:"mask0_2415_6911",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"77",height:"14",children:wa("path",{d:"M0.5 0H76.5V14H0.5V0Z",fill:"white"})}),wa("g",{mask:"url(#mask0_2415_6911)",children:[wa("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"}),wa("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"}),wa("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"}),wa("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"}),wa("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"}),wa("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"})]})]}),wa("defs",{children:wa("clipPath",{id:"clip0_2415_6911",children:wa("rect",{width:"76",height:"14",fill:"white",transform:"translate(0.5)"})})})]}),Ra=wa("svg",{width:"16",height:"12",viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:wa("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"})});function _a(){return wa("a",{href:"https://posthog.com",target:"_blank",rel:"noopener",className:"footer-branding",children:["Survey by ",Ma]})}function Fa(e){var{text:t,submitDisabled:n,appearance:r,onSubmit:i,link:o,onPreviewSubmit:a}=e,{isPreviewMode:s,isPopup:u}=mo(ha),l=r.submitButtonTextColor||na(r.submitButtonColor||ra.submitButtonColor);return wa("div",{className:"bottom-section",children:[wa("div",{className:"buttons",children:wa("button",{className:"form-submit",disabled:n,"aria-label":"Submit survey",type:"button",style:u?{color:l}:{},onClick:()=>{o&&(null==Dn||Dn.open(o)),s?null==a||a():i()},children:t})}),!r.whiteLabel&&wa(_a,{})]})}function Za(e){var{question:t,description:n,descriptionContentType:r,backgroundColor:i,forceDisableHtml:o}=e,{isPopup:a}=mo(ha);return wa("div",{style:a?{backgroundColor:i||ra.backgroundColor}:{},children:[wa("div",{className:"survey-question",children:t}),n&&va({component:_i("div",{className:"survey-question-description"}),children:n,renderAsHtml:!o&&"text"!==r})]})}function Oa(e){var{onClick:t}=e,{isPreviewMode:n}=mo(ha);return wa("div",{className:"cancel-btn-wrapper",children:wa("button",{className:"form-cancel",onClick:t,disabled:n,"aria-label":"Close survey",type:"button",role:"button",children:Na})})}function Ea(e){var{header:t,description:r,contentType:i,forceDisableHtml:o,appearance:a,onClose:s,styleOverrides:u}=e,l=na(a.backgroundColor||ra.backgroundColor),{isPopup:c}=mo(ha);return wa("div",{className:"thank-you-message",style:n({},u),children:wa("div",{className:"thank-you-message-container",children:[c&&wa(Oa,{onClick:()=>s()}),wa("h3",{className:"thank-you-message-header",style:{color:l},children:t}),r&&va({component:_i("div",{className:"thank-you-message-body"}),children:r,renderAsHtml:!o&&"text"!==i,style:{color:l}}),c&&wa(Fa,{text:a.thankYouMessageCloseButtonText||"Close",submitDisabled:!1,appearance:a,onSubmit:()=>s()})]})})}function Ba(e){var{question:t,forceDisableHtml:n,appearance:r,onSubmit:i,onPreviewSubmit:o}=e,[a,s]=ho("");return wa(Zi,{children:[wa("div",{className:"question-container",children:[wa(Za,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,backgroundColor:r.backgroundColor,forceDisableHtml:n}),wa("textarea",{rows:4,placeholder:null==r?void 0:r.placeholder,onInput:e=>{s(e.currentTarget.value),e.stopPropagation()},onKeyDown:e=>{e.stopPropagation()}})]}),wa(Fa,{text:t.buttonText||"Submit",submitDisabled:!a&&!t.optional,appearance:r,onSubmit:()=>i(a),onPreviewSubmit:()=>o(a)})]})}function La(e){var{question:t,forceDisableHtml:n,appearance:r,onSubmit:i,onPreviewSubmit:o}=e;return wa(Zi,{children:[wa("div",{className:"question-container",children:wa(Za,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,forceDisableHtml:n})}),wa(Fa,{text:t.buttonText||"Submit",submitDisabled:!1,link:t.link,appearance:r,onSubmit:()=>i("link clicked"),onPreviewSubmit:()=>o("link clicked")})]})}function Da(e){var{question:t,forceDisableHtml:n,displayQuestionIndex:r,appearance:i,onSubmit:o,onPreviewSubmit:a}=e,s=t.scale,u=10===t.scale?0:1,[l,c]=ho(null);return wa(Zi,{children:[wa("div",{className:"question-container",children:[wa(Za,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,forceDisableHtml:n,backgroundColor:i.backgroundColor}),wa("div",{className:"rating-section",children:[wa("div",{className:"rating-options",children:["emoji"===t.display&&wa("div",{className:"rating-options-emoji",children:(3===t.scale?Va:Pa).map(((e,t)=>{var n=t+1===l;return wa("button",{className:"ratings-emoji question-"+r+"-rating-"+t+" "+(n?"rating-active":""),value:t+1,type:"button",onClick:()=>{c(t+1)},style:{fill:n?i.ratingButtonActiveColor:i.ratingButtonColor,borderColor:i.borderColor},children:e},t)}))}),"number"===t.display&&wa("div",{className:"rating-options-number",style:{gridTemplateColumns:"repeat("+(s-u+1)+", minmax(0, 1fr))"},children:Xa(t.scale).map(((e,t)=>wa(qa,{displayQuestionIndex:r,active:l===e,appearance:i,num:e,setActiveNumber:e=>{c(e)}},t)))})]}),wa("div",{className:"rating-text",children:[wa("div",{children:t.lowerBoundLabel}),wa("div",{children:t.upperBoundLabel})]})]})]}),wa(Fa,{text:t.buttonText||(null==i?void 0:i.submitButtonText)||"Submit",submitDisabled:sr(l)&&!t.optional,appearance:i,onSubmit:()=>o(l),onPreviewSubmit:()=>a(l)})]})}function qa(e){var{num:t,active:n,displayQuestionIndex:r,appearance:i,setActiveNumber:o}=e;return wa("button",{className:"ratings-number question-"+r+"-rating-"+t+" "+(n?"rating-active":""),type:"button",onClick:()=>{o(t)},style:{color:na(n?i.ratingButtonActiveColor:i.ratingButtonColor),backgroundColor:n?i.ratingButtonActiveColor:i.ratingButtonColor,borderColor:i.borderColor},children:t})}function Ha(e,t,n,r){if(r)return!1;if(sr(e))return!0;if($n(e)){if(!t&&0===e.length)return!0;if(t&&!n&&0===e.length)return!0}return!1}function Ya(e){var{question:t,forceDisableHtml:n,displayQuestionIndex:r,appearance:i,onSubmit:o,onPreviewSubmit:a}=e,s=function(e){return ro=5,po((function(){return{current:e}}),[])}(null),u=po((()=>(e=>{if(!e.shuffleOptions)return e.choices;var t=e.choices,n="";e.hasOpenChoice&&(n=t.pop());var r=ua(t,sa(t));return e.hasOpenChoice&&(e.choices.push(n),r.push(n)),r})(t)),[t]),[l,c]=ho(t.type===hi.MultipleChoice?[]:null),[d,f]=ho(!1),[h,v]=ho(""),p=t.type===hi.SingleChoice?"radio":"checkbox",m=(e,n)=>n?(f(!d),void(d||setTimeout((()=>{var e;return null==(e=s.current)?void 0:e.focus()}),0))):t.type===hi.SingleChoice?(c(e),void f(!1)):void(t.type===hi.MultipleChoice&&$n(l)&&(l.includes(e)?c(l.filter((t=>t!==e))):c([...l,e])));return wa(Zi,{children:[wa("div",{className:"question-container",children:[wa(Za,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,forceDisableHtml:n,backgroundColor:i.backgroundColor}),wa("div",{className:"multiple-choice-options limit-height",children:u.map(((e,n)=>{var i=!!t.hasOpenChoice&&n===t.choices.length-1,o="choice-option"+(i?" choice-option-open":""),a=i?d:t.type===hi.SingleChoice?l===e:$n(l)&&l.includes(e);return wa("div",{className:o,children:[wa("input",{type:p,id:"surveyQuestion"+r+"Choice"+n,name:"question"+r,checked:a,onClick:()=>m(e,i)}),wa("label",{htmlFor:"surveyQuestion"+r+"Choice"+n,style:{color:"black"},children:i?wa(Zi,{children:[wa("span",{children:[e,":"]}),wa("input",{type:"text",ref:s,id:"surveyQuestion"+r+"Choice"+n+"Open",name:"question"+r,value:h,onKeyDown:e=>{e.stopPropagation()},onInput:e=>(e=>{e.stopPropagation(),v(e.currentTarget.value),t.type===hi.SingleChoice&&c(e.currentTarget.value)})(e),onClick:t=>{d||m(e,!0),t.stopPropagation()}})]}):e}),wa("span",{className:"choice-check",style:{color:"black"},children:Ra})]},n)}))})]}),wa(Fa,{text:t.buttonText||"Submit",submitDisabled:Ha(l,d,h,!!t.optional),appearance:i,onSubmit:()=>{d&&t.type===hi.MultipleChoice?$n(l)&&o([...l,h]):o(l)},onPreviewSubmit:()=>{d&&t.type===hi.MultipleChoice?$n(l)&&a([...l,h]):a(l)}})]})}var Va=[Aa,Sa,ka],Pa=[xa,Aa,Sa,ka,Ta],Ga=[1,2,3,4,5],Wa=[1,2,3,4,5,6,7],ja=[0,1,2,3,4,5,6,7,8,9,10];function Xa(e){switch(e){case 5:default:return Ga;case 7:return Wa;case 10:return ja}}var za=Dn,Ka=Vn,Ja="ph:show_survey_widget";function Ua(e,t,n){var r,i=e.questions[t],o=t+1;if(null==(r=i.branching)||!r.type)return t===e.questions.length-1?vi.End:o;if(i.branching.type===vi.End)return vi.End;if(i.branching.type===vi.SpecificQuestion){if(Number.isInteger(i.branching.index))return i.branching.index}else if(i.branching.type===vi.ResponseBased){if(i.type===hi.SingleChoice){var a,s,u=i.choices.indexOf(""+n);if(-1===u&&i.hasOpenChoice&&(u=i.choices.length-1),null!=(a=i.branching)&&null!=(s=a.responseValues)&&s.hasOwnProperty(u)){var l=i.branching.responseValues[u];return Number.isInteger(l)?l:l===vi.End?vi.End:o}}else if(i.type===hi.Rating){var c,d;if("number"!=typeof n||!Number.isInteger(n))throw new Error("The response type must be an integer");var f=function(e,t){if(3===t){if(e<1||e>3)throw new Error("The response must be in range 1-3");return 1===e?"negative":2===e?"neutral":"positive"}if(5===t){if(e<1||e>5)throw new Error("The response must be in range 1-5");return e<=2?"negative":3===e?"neutral":"positive"}if(7===t){if(e<1||e>7)throw new Error("The response must be in range 1-7");return e<=3?"negative":4===e?"neutral":"positive"}if(10===t){if(e<0||e>10)throw new Error("The response must be in range 0-10");return e<=6?"detractors":e<=8?"passives":"promoters"}throw new Error("The scale must be one of: 3, 5, 7, 10")}(n,i.scale);if(null!=(c=i.branching)&&null!=(d=c.responseValues)&&d.hasOwnProperty(f)){var h=i.branching.responseValues[f];return Number.isInteger(h)?h:h===vi.End?vi.End:o}}return o}return So.warn("Falling back to next question index due to unexpected branching type"),o}class Qa{constructor(e){var t=this;this.h=new Map,this.p=new Map,this.m=()=>{var e,t=Ka.querySelectorAll("div[class^=PostHogSurvey]");return!(t.length>0)||1===(null==(e=t[t.length-1].shadowRoot)?void 0:e.childElementCount)},this.C=e=>{var t,r=null==(t=e.conditions)?void 0:t.seenSurveyWaitPeriodInDays;if(((e,t)=>{if(!t||!e)return!0;var n=new Date,r=Math.abs(n.getTime()-new Date(e).getTime());return Math.ceil(r/864e5)>t})(localStorage.getItem("lastSeenSurveyDate"),r)){var i=(e=>!!localStorage.getItem(da(e))&&!ca(e))(e);if(!i){var o;this.I(e.id),this.k(e.id);var a=(null==(o=e.appearance)?void 0:o.surveyPopupDelaySeconds)||0,s=((e,t,n,r)=>{var i=Uo.createElement("div");i.className=ya({id:t});var o=i.attachShadow({mode:"open"});if(e){var a=To(Uo,e,r);a&&o.appendChild(a)}return Uo.body.appendChild(i),o})(ea(null==e?void 0:e.appearance),e.id,0,this._posthog);if(a<=0)return Ui(wa(ts,{posthog:this._posthog,survey:e,removeSurveyFromFocus:this.S,isPopup:!0},"popover-survey"),s);var u=setTimeout((()=>{if(!ga(e))return this.S(e.id);Ui(wa(ts,{posthog:this._posthog,survey:n({},e,{appearance:n({},e.appearance,{surveyPopupDelaySeconds:0})}),removeSurveyFromFocus:this.S,isPopup:!0},"popover-survey"),s)}),1e3*a);this.h.set(e.id,u)}}},this.A=e=>{var t=Ca(e,this._posthog),n=ea(e.appearance),r="ph-data-style-id";if(!t.querySelector("style["+r+'="'+r+'"]')){var i=To(Ka,n,this._posthog);i&&(i.setAttribute(r,r),t.appendChild(i))}Ui(wa(rs,{posthog:this._posthog,survey:e,removeSurveyFromFocus:this.S},"feedback-survey-"+e.id),t)},this.T=e=>{var t=this.p.get(e);t&&(t.element.removeEventListener("click",t.listener),t.element.removeAttribute("PHWidgetSurveyClickListener"),this.p.delete(e),So.info("Removed click listener for survey "+e))},this.N=e=>{var t,n=null==(t=e.appearance)?void 0:t.widgetSelector;if(n){var r=Ka.querySelector(n),i=this.p.get(e.id);if(r){if(this.A(e),i){if(r===i.element)return;So.info("Selector element changed for survey "+e.id+". Re-attaching listener."),this.T(e.id)}if(!r.hasAttribute("PHWidgetSurveyClickListener")){var o=t=>{var n,r,i;if(t.stopPropagation(),(null==(n=e.appearance)?void 0:n.position)===di.NextToTrigger){var o=t.currentTarget.getBoundingClientRect(),a=za.innerHeight,s=za.innerWidth,u=parseInt((null==(r=e.appearance)?void 0:r.maxWidth)||"300"),l=o.left+o.width/2-u/2;l+u>s-20&&(l=s-u-20),l<20&&(l=20);var c=a-o.bottom,d=o.top,f=c<250&&d>c,h={position:"fixed",top:f?"auto":o.bottom+12+"px",left:l+"px",right:"auto",bottom:f?a-o.top+12+"px":"auto",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",borderBottom:"1.5px solid "+((null==(i=e.appearance)?void 0:i.borderColor)||"#c9c6c6"),borderRadius:"10px",zIndex:Qo};za.dispatchEvent(new CustomEvent(Ja,{detail:{surveyId:e.id,position:h}}))}else za.dispatchEvent(new CustomEvent(Ja,{detail:{surveyId:e.id,position:{}}}))};Ir(r,"click",o),r.setAttribute("PHWidgetSurveyClickListener","true"),this.p.set(e.id,{element:r,listener:o}),So.info("Attached click listener for survey "+e.id)}}else i&&this.T(e.id)}},this.renderSurvey=(e,t)=>{Ui(wa(ts,{posthog:this._posthog,survey:e,removeSurveyFromFocus:this.S,isPopup:!1},"popover-survey"),t)},this.getActiveMatchingSurveys=function(e,n){var r;void 0===n&&(n=!1),null==(r=t._posthog)||r.surveys.getSurveys((n=>{var r=n.filter((e=>t.checkSurveyEligibility(e).eligible&&t.M(e)&&t.R(e)&&t.F(e)));e(r)}),n)},this.callSurveysAndEvaluateDisplayLogic=function(e){void 0===e&&(e=!1),t.getActiveMatchingSurveys((e=>{var n=e.filter((e=>e.type!==fi.API)),r=t.Z(n),i=new Set;r.forEach((e=>{var n,r,o;e.type===fi.Widget&&((null==(n=e.appearance)?void 0:n.widgetType)===ci.Tab?t.A(e):(null==(r=e.appearance)?void 0:r.widgetType)===ci.Selector&&null!=(o=e.appearance)&&o.widgetSelector&&(i.add(e.id),t.N(e)));sr(t.O)&&e.type===fi.Popover&&t.m()&&t.C(e)})),t.p.forEach(((e,n)=>{i.has(n)||t.T(n)}))}),e)},this.k=e=>{sr(this.O)||So.error("Survey "+[...this.O]+" already in focus. Cannot add survey "+e+"."),this.O=e},this.S=e=>{this.O!==e&&So.error("Survey "+e+" is not in focus. Cannot remove survey "+e+"."),this.I(e),this.O=null},this._posthog=e,this.O=null}I(e){var t=this.h.get(e);t&&(clearTimeout(t),this.h.delete(e))}Z(e){return e.sort(((e,t)=>{var n,r,i=e.schedule===pi.Always,o=t.schedule===pi.Always;return i&&!o?1:!i&&o?-1:((null==(n=e.appearance)?void 0:n.surveyPopupDelaySeconds)||0)-((null==(r=t.appearance)?void 0:r.surveyPopupDelaySeconds)||0)}))}B(e){return!e||!!this._posthog.featureFlags.isFeatureEnabled(e)}M(e){return!e.conditions||ga(e)&&function(e){var t,n,r;if(null==(t=e.conditions)||!t.deviceTypes||0===(null==(n=e.conditions)?void 0:n.deviceTypes.length))return!0;if(!Gn)return!1;var i=Ko(Gn);return pa[ma(null==(r=e.conditions)?void 0:r.deviceTypesMatchType)](e.conditions.deviceTypes,i)}(e)&&function(e){var t;return null==(t=e.conditions)||!t.selector||!(null==Uo||!Uo.querySelector(e.conditions.selector))}(e)}L(e){return ca(e)||this.B(e.internal_targeting_flag_key)}checkSurveyEligibility(e){var t={eligible:!0,reason:void 0};return function(e){return!(!e.start_date||e.end_date)}(e)?this.B(e.linked_flag_key)?this.B(e.targeting_flag_key)?(this.L(e)||(t.eligible=!1,t.reason="Survey internal targeting flag is not enabled and survey cannot activate repeatedly"),t):(t.eligible=!1,t.reason="Survey targeting feature flag is not enabled",t):(t.eligible=!1,t.reason="Survey linked feature flag is not enabled",t):(t.eligible=!1,t.reason="Survey is not running. It was completed on "+e.end_date,t)}R(e){var t;if(!function(e){var t,n,r;return!(null==(t=e.conditions)||null==(n=t.events)||null==(r=n.values)||!r.length)}(e)&&!function(e){var t,n,r;return!(null==(t=e.conditions)||null==(n=t.actions)||null==(r=n.values)||!r.length)}(e))return!0;var n=null==(t=this._posthog.surveys._surveyEventReceiver)?void 0:t.getSurveys();return!(null==n||!n.includes(e.id))}F(e){var t;return null==(t=e.feature_flag_keys)||!t.length||e.feature_flag_keys.every((e=>{var{key:t,value:n}=e;return!t||!n||this._posthog.featureFlags.isFeatureEnabled(n)}))}getTestAPI(){return{addSurveyToFocus:this.k,removeSurveyFromFocus:this.S,surveyInFocus:this.O,surveyTimeouts:this.h,canShowNextEventBasedSurvey:this.m,handleWidget:this.A,handlePopoverSurvey:this.C,manageWidgetSelectorListener:this.N,sortSurveysByAppearanceDelay:this.Z,checkFlags:this.F.bind(this)}}}function $a(e){if(Ka&&za){var t=new Qa(e);return t.callSurveysAndEvaluateDisplayLogic(!0),setInterval((()=>{t.callSurveysAndEvaluateDisplayLogic(!1)}),1e3),t}}function es(e){var{survey:t,removeSurveyFromFocus:n,setSurveyVisible:r,isPreviewMode:i=!1}=e;vo((()=>{var e;if(!i&&null!=(e=t.conditions)&&e.url){var o=()=>{var e,i=t.type===fi.Widget,o=ga(t),a=(null==(e=t.appearance)?void 0:e.widgetType)===ci.Tab&&i;if(!o)return So.info("Hiding survey "+t.id+" because URL does not match"),r(!1),n(t.id);a&&(So.info("Showing survey "+t.id+" because it is a feedback button tab and URL matches"),r(!0))};Ir(za,"popstate",o),Ir(za,"hashchange",o);var a=za.history.pushState,s=za.history.replaceState;return za.history.pushState=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];a.apply(this,t),o()},za.history.replaceState=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];s.apply(this,t),o()},()=>{za.removeEventListener("popstate",o),za.removeEventListener("hashchange",o),za.history.pushState=a,za.history.replaceState=s}}}),[i,t,n,r])}function ts(e){var t,r,i,o,a,s,{survey:u,forceDisableHtml:l,posthog:c,style:d,previewPageIndex:f,removeSurveyFromFocus:h,isPopup:v,onPreviewSubmit:p=(()=>{}),onPopupSurveyDismissed:m=(()=>{}),onCloseConfirmationMessage:g=(()=>{})}=e,y=Number.isInteger(f),b=null!=(t=u.appearance)&&t.surveyPopupDelaySeconds?1e3*u.appearance.surveyPopupDelaySeconds:0,{isPopupVisible:C,isSurveySent:I,setIsPopupVisible:w}=function(e,t,n,r,i){var[o,a]=ho(r||0===n),[s,u]=ho(!1);return vo((()=>{if(t){if(!r){var o=t=>{t.detail.surveyId===e.id&&(i(e.id),a(!1))},s=t=>{var n,r;t.detail.surveyId===e.id&&(null!=(n=e.appearance)&&n.displayThankYouMessage?(u(!0),i(e.id),null!=(r=e.appearance)&&r.autoDisappear&&setTimeout((()=>{a(!1)}),5e3)):(i(e.id),a(!1)))},l=()=>{ga(e)&&(a(!0),za.dispatchEvent(new Event("PHSurveyShown")),t.capture("survey shown",{$survey_name:e.name,$survey_id:e.id,$survey_iteration:e.current_iteration,$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()),setTimeout((()=>{var t,n,r=null==(t=Ka.querySelector(ya(e,!0)))||null==(n=t.shadowRoot)?void 0:n.querySelector('textarea, input[type="text"]');r&&r.focus()}),100))};if(Ir(za,"PHSurveyClosed",o),Ir(za,"PHSurveySent",s),n>0){var c=setTimeout(l,n);return()=>{clearTimeout(c),za.removeEventListener("PHSurveyClosed",o),za.removeEventListener("PHSurveySent",s)}}return l(),()=>{za.removeEventListener("PHSurveyClosed",o),za.removeEventListener("PHSurveySent",s)}}}else So.error("usePopupVisibility hook called without a PostHog instance.")}),[]),es({survey:e,removeSurveyFromFocus:i,setSurveyVisible:a,isPreviewMode:r}),{isPopupVisible:o,isSurveySent:s,setIsPopupVisible:a}}(u,c,b,y,h),k=I||f===u.questions.length,S=null!=(r=d)&&r.left&&lr(null==(i=d)?void 0:i.left)?{left:d.left-40}:{};return y&&((d=d||{}).left="unset",d.right="unset",d.transform="unset"),C?wa(ha.Provider,{value:{isPreviewMode:y,previewPageIndex:f,onPopupSurveyDismissed:()=>{aa(u,c,y),m()},isPopup:v||!1,onPreviewSubmit:p},children:k?wa(Ea,{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||ra,styleOverrides:n({},d,S),onClose:()=>{w(!1),g()}}):wa(ns,{survey:u,forceDisableHtml:!!l,posthog:c,styleOverrides:d})}):null}function ns(e){var t,r,{survey:i,forceDisableHtml:o,posthog:a,styleOverrides:s}=e,u=na((null==(t=i.appearance)?void 0:t.backgroundColor)||ra.backgroundColor),[l,c]=ho({}),{previewPageIndex:d,onPopupSurveyDismissed:f,isPopup:h,onPreviewSubmit:v}=mo(ha),[p,m]=ho(d||0),g=po((()=>la(i)),[i]);vo((()=>{m(null!=d?d:0)}),[d]);return wa("form",{className:"survey-form",name:"surveyForm",style:h?n({color:u,borderColor:null==(r=i.appearance)?void 0:r.borderColor},s):{},children:g.map(((e,t)=>{var r;return p===t&&wa("div",{className:"survey-box",style:h?{backgroundColor:(null==(r=i.appearance)?void 0:r.backgroundColor)||ra.backgroundColor}:{},children:[h&&wa(Oa,{onClick:()=>{f()}}),is({question:e,forceDisableHtml:o,displayQuestionIndex:t,appearance:i.appearance||ra,onSubmit:r=>(e=>{var{res:t,displayQuestionIndex:r,questionId:o}=e;if(a)if(o){var s=function(e){return"$survey_response_"+e}(o);c(n({},l,{[s]:t}));var u=Ua(i,r,t);u===vi.End?oa(n({},l,{[s]:t}),i,a):m(u)}else So.error("onNextButtonClick called without a questionId.");else So.error("onNextButtonClick called without a PostHog instance.")})({res:r,displayQuestionIndex:t,questionId:e.id}),onPreviewSubmit:v})]})}))})}function rs(e){var t,n,r,i,o,{survey:a,forceDisableHtml:s,posthog:u,readOnly:l,removeSurveyFromFocus:c}=e,[d,f]=ho(!0),[h,v]=ho(!1),[p,m]=ho({});if(vo((()=>{var e;if(u){if(!l){var t;if("tab"===(null==(e=a.appearance)?void 0:e.widgetType))m({top:"50%",bottom:"auto",borderRadius:10,borderBottom:"1.5px solid "+((null==(t=a.appearance)?void 0:t.borderColor)||"#c9c6c6")});var n=e=>{var t,n=e;(null==(t=n.detail)?void 0:t.surveyId)===a.id&&(So.info("Received show event for survey "+a.id),m(n.detail.position||{}),v(!0))};return Ir(za,Ja,n),()=>{za.removeEventListener(Ja,n)}}}else So.error("FeedbackWidget called without a PostHog instance.")}),[u,l,a.id,null==(t=a.appearance)?void 0:t.widgetType,null==(n=a.appearance)?void 0:n.widgetSelector,null==(r=a.appearance)?void 0:r.borderColor]),es({survey:a,removeSurveyFromFocus:c,setSurveyVisible:f}),!d)return null;var g=()=>{v(!1)};return wa(Zi,{children:["tab"===(null==(i=a.appearance)?void 0:i.widgetType)&&wa("div",{className:"ph-survey-widget-tab",onClick:()=>!l&&v(!h),style:{color:na(a.appearance.widgetColor)},children:[wa("div",{className:"ph-survey-widget-tab-icon"}),(null==(o=a.appearance)?void 0:o.widgetLabel)||""]}),h&&wa(ts,{posthog:u,survey:a,forceDisableHtml:s,style:p,removeSurveyFromFocus:c,isPopup:!0,onPopupSurveyDismissed:g,onCloseConfirmationMessage:g},"feedback-widget-survey")]})}var is=e=>{var{question:t,forceDisableHtml:r,displayQuestionIndex:i,appearance:o,onSubmit:a,onPreviewSubmit:s}=e,u={[hi.Open]:Ba,[hi.Link]:La,[hi.Rating]:Da,[hi.SingleChoice]:Ya,[hi.MultipleChoice]:Ya},l={question:t,forceDisableHtml:r,appearance:o,onPreviewSubmit:e=>{s(e)},onSubmit:e=>{a(e)}},c={[hi.Open]:{},[hi.Link]:{},[hi.Rating]:{displayQuestionIndex:i},[hi.SingleChoice]:{displayQuestionIndex:i},[hi.MultipleChoice]:{displayQuestionIndex:i}},d=u[t.type],f=n({},l,c[t.type]);return wa(d,n({},f))};function os(e){return!ir(Event)&&as(e,Event)}function as(e,t){try{return e instanceof t}catch(e){return!1}}function ss(e){return sr(e)||!rr(e)&&!er(e)}function us(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object DOMError]":return!0;default:return as(e,Error)}}function ls(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function cs(e){return ls(e,"DOMError")}Wn.__PosthogExtensions__=Wn.__PosthogExtensions__||{},Wn.__PosthogExtensions__.canActivateRepeatedly=ca,Wn.__PosthogExtensions__.generateSurveys=$a,Wn.extendPostHogWithSurveys=$a;var ds=/\(error: (.*)\)/,fs=50,hs="?";function vs(e,t,n,r){var i={platform:"web:javascript",filename:e,function:"<anonymous>"===t?hs:t,in_app:!0};return ir(n)||(i.lineno=n),ir(r)||(i.colno=r),i}var ps=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,ms=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,gs=/\((\S*)(?::(\d+))(?::(\d+))\)/,ys=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,bs=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Cs=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i=t.sort(((e,t)=>e[0]-t[0])).map((e=>e[1]));return function(e,t){void 0===t&&(t=0);for(var r=[],o=e.split("\n"),a=t;a<o.length;a++){var s=o[a];if(!(s.length>1024)){var u=ds.test(s)?s.replace(ds,"$1"):s;if(!u.match(/\S*Error: /)){for(var l of i){var c=l(u);if(c){r.push(c);break}}if(r.length>=fs)break}}}return function(e){if(!e.length)return[];var t=Array.from(e);return t.reverse(),t.slice(0,fs).map((e=>n({},e,{filename:e.filename||Is(t).filename,function:e.function||hs})))}(r)}}(...[[30,e=>{var t=ps.exec(e);if(t){var[,n,r,i]=t;return vs(n,hs,+r,+i)}var o=ms.exec(e);if(o){if(o[2]&&0===o[2].indexOf("eval")){var a=gs.exec(o[2]);a&&(o[2]=a[1],o[3]=a[2],o[4]=a[3])}var[s,u]=As(o[1]||hs,o[2]);return vs(u,s,o[3]?+o[3]:void 0,o[4]?+o[4]:void 0)}}],[50,e=>{var t=ys.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){var n=bs.exec(t[3]);n&&(t[1]=t[1]||"eval",t[3]=n[1],t[4]=n[2],t[5]="")}var r=t[3],i=t[1]||hs;return[i,r]=As(i,r),vs(r,i,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]);function Is(e){return e[e.length-1]||{}}var ws,ks,Ss,As=(e,t)=>{var n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:hs,n?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]};var xs=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;function Ts(e,t){void 0===t&&(t=0);var n=e.stacktrace||e.stack||"",r=function(e){if(e&&Ns.test(e.message))return 1;return 0}(e);try{var i=Cs,o=function(e,t){var n=function(e){var t=globalThis._posthogChunkIds;if(!t)return{};var n=Object.keys(t);return Ss&&n.length===ks||(ks=n.length,Ss=n.reduce(((n,r)=>{ws||(ws={});var i=ws[r];if(i)n[i[0]]=i[1];else for(var o=e(r),a=o.length-1;a>=0;a--){var s=o[a],u=null==s?void 0:s.filename,l=t[r];if(u&&l){n[u]=l,ws[r]=[u,l];break}}return n}),{})),Ss}(t);return e.forEach((e=>{e.filename&&(e.chunk_id=n[e.filename])})),e}(i(n,r),i);return o.slice(0,o.length-t)}catch(e){}return[]}var Ns=/Minified React error #\d+;/i;function Ms(e,t){var n,r,i=Ts(e),o=null===(n=null==t?void 0:t.handled)||void 0===n||n,a=null!==(r=null==t?void 0:t.synthetic)&&void 0!==r&&r;return{type:null!=t&&t.overrideExceptionType?t.overrideExceptionType:e.name,value:function(e){var t=e.message;if(t.error&&"string"==typeof t.error.message)return String(t.error.message);return String(t)}(e),stacktrace:{frames:i,type:"raw"},mechanism:{handled:o,synthetic:a}}}function Rs(e,t){var n=Ms(e,t);return e.cause&&us(e.cause)&&e.cause!==e?[n,...Rs(e.cause,{handled:null==t?void 0:t.handled,synthetic:null==t?void 0:t.synthetic})]:[n]}function _s(e,t){return{$exception_list:Rs(e,t),$exception_level:"error"}}function Fs(e,t){var n,r,i,o=null===(n=null==t?void 0:t.handled)||void 0===n||n,a=null===(r=null==t?void 0:t.synthetic)||void 0===r||r,s={type:null!=t&&t.overrideExceptionType?t.overrideExceptionType:null!==(i=null==t?void 0:t.defaultExceptionType)&&void 0!==i?i:"Error",value:e||(null==t?void 0:t.defaultExceptionMessage),mechanism:{handled:o,synthetic:a}};if(null!=t&&t.syntheticException){var u=Ts(t.syntheticException,1);u.length&&(s.stacktrace={frames:u,type:"raw"})}return{$exception_list:[s],$exception_level:"error"}}function Zs(e){return or(e)&&!ar(e)&&jn.indexOf(e)>=0}function Os(e,t){var n,r,i=null===(n=null==t?void 0:t.handled)||void 0===n||n,o=null===(r=null==t?void 0:t.synthetic)||void 0===r||r,a=null!=t&&t.overrideExceptionType?t.overrideExceptionType:os(e)?e.constructor.name:"Error",s="Non-Error 'exception' captured with keys: "+function(e,t){void 0===t&&(t=40);var n=Object.keys(e);if(n.sort(),!n.length)return"[object has no keys]";for(var r=n.length;r>0;r--){var i=n.slice(0,r).join(", ");if(!(i.length>t))return r===n.length||i.length<=t?i:i.slice(0,t)+"..."}return""}(e),u={type:a,value:s,mechanism:{handled:i,synthetic:o}};if(null!=t&&t.syntheticException){var l=Ts(null==t?void 0:t.syntheticException,1);l.length&&(u.stacktrace={frames:l,type:"raw"})}return{$exception_list:[u],$exception_level:Zs(e.level)?e.level:"error"}}function Es(e,t){var{error:r,event:i}=e,o={$exception_list:[]},a=r||i;if(cs(a)||function(e){return ls(e,"DOMException")}(a)){var s=a;if(function(e){return"stack"in e}(a))o=_s(a,t);else{var u=s.name||(cs(s)?"DOMError":"DOMException"),l=s.message?u+": "+s.message:u;o=Fs(l,n({},t,{overrideExceptionType:cs(s)?"DOMError":"DOMException",defaultExceptionMessage:l}))}return"code"in s&&(o.$exception_DOMException_code=""+s.code),o}if(function(e){return ls(e,"ErrorEvent")}(a)&&a.error)return _s(a.error,t);if(us(a))return _s(a,t);if(function(e){return ls(e,"Object")}(a)||os(a))return Os(a,t);if(ir(r)&&or(i)){var c="Error",d=i,f=i.match(xs);return f&&(c=f[1],d=f[2]),Fs(d,n({},t,{overrideExceptionType:c,defaultExceptionMessage:d}))}return Fs(a,t)}function Bs(e){var[t]=e,n=function(e){if(ss(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}(t);return ss(n)?Fs("Non-Error promise rejection captured with value: "+String(n),{handled:!1,synthetic:!1,overrideExceptionType:"UnhandledRejection"}):Es({event:n},{handled:!1,overrideExceptionType:"UnhandledRejection",defaultExceptionMessage:String(n)})}var Ls=pr("[ExceptionAutocapture]"),Ds={wrapOnError:e=>{var t=Dn;t||Ls.info("window not available, cannot wrap onerror");var n=t.onerror;return t.onerror=function(){for(var t,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=Es({event:i[0],error:i[4]});return e(a),null!==(t=null==n?void 0:n(...i))&&void 0!==t&&t},t.onerror.__POSTHOG_INSTRUMENTED__=!0,()=>{var e;null==(e=t.onerror)||delete e.__POSTHOG_INSTRUMENTED__,t.onerror=n}},wrapUnhandledRejection:e=>{var t=Dn;t||Ls.info("window not available, cannot wrap onUnhandledRejection");var n=t.onunhandledrejection;return t.onunhandledrejection=function(){for(var r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var s=Bs(o);return e(s),null!==(r=null==n?void 0:n.apply(t,o))&&void 0!==r&&r},t.onunhandledrejection.__POSTHOG_INSTRUMENTED__=!0,()=>{var e;null==(e=t.onunhandledrejection)||delete e.__POSTHOG_INSTRUMENTED__,t.onunhandledrejection=n}},wrapConsoleError:e=>{var t=console;t||Ls.info("console not available, cannot wrap console.error");var n=t.error;return t.error=function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];var o=r.join(" "),a=r.find((e=>e instanceof Error)),s=a?Es({event:o,error:a}):Es({event:o},{syntheticException:new Error("PostHog syntheticException")});return e(s),null==n?void 0:n(...r)},t.error.__POSTHOG_INSTRUMENTED__=!0,()=>{var e;null==(e=t.error)||delete e.__POSTHOG_INSTRUMENTED__,t.error=n}}};Wn.__PosthogExtensions__=Wn.__PosthogExtensions__||{},Wn.__PosthogExtensions__.errorWrappingFunctions=Ds,Wn.posthogErrorWrappingFunctions=Ds;var qs=(e,t)=>{if(e){var{sessionId:n,windowId:r}=e.checkAndGetSessionAndWindowId(!0);t.headers.set("X-POSTHOG-SESSION-ID",n),t.headers.set("X-POSTHOG-WINDOW-ID",r)}};Wn.__PosthogExtensions__=Wn.__PosthogExtensions__||{};var Hs={_patchFetch:e=>kr(Dn,"fetch",(n=>function(){var r=t((function*(t,r){var i=new Request(t,r);return qs(e,i),n(i)}));return function(e,t){return r.apply(this,arguments)}}())),_patchXHR:e=>kr(Dn.XMLHttpRequest.prototype,"open",(t=>function(n,r,i,o,a){void 0===i&&(i=!0);var s=new Request(r);return qs(e,s),t.call(this,n,s.url,i,o,a)}))};Wn.__PosthogExtensions__.tracingHeadersPatchFns=Hs,Wn.postHogTracingHeadersPatchFns=Hs;var Ys,Vs,Ps=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},Gs=function(e){if("loading"===document.readyState)return"loading";var t=Ps();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"},Ws=function(e){var t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},js=function(e,t){var n="";try{for(;e&&9!==e.nodeType;){var r=e,i=r.id?"#"+r.id:Ws(r)+(r.classList&&r.classList.value&&r.classList.value.trim()&&r.classList.value.trim().length?"."+r.classList.value.trim().replace(/\s+/g,"."):"");if(n.length+i.length>(t||100)-1)return n||i;if(n=n?i+">"+n:i,r.id)break;e=r.parentNode}}catch(e){}return n},Xs=-1,zs=function(){return Xs},Ks=function(e){addEventListener("pageshow",(function(t){t.persisted&&(Xs=t.timeStamp,e(t))}),!0)},Js=function(){var e=Ps();return e&&e.activationStart||0},Us=function(e,t){var n=Ps(),r="navigate";return zs()>=0?r="back-forward-cache":n&&(document.prerendering||Js()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.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:r}},Qs=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},$s=function(e,t,n,r){var i,o;return function(a){t.value>=0&&(a||r)&&((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,n),e(t))}},eu=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},tu=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},nu=function(e){var t=!1;return function(){t||(e(),t=!0)}},ru=-1,iu=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},ou=function(e){"hidden"===document.visibilityState&&ru>-1&&(ru="visibilitychange"===e.type?e.timeStamp:0,su())},au=function(){addEventListener("visibilitychange",ou,!0),addEventListener("prerenderingchange",ou,!0)},su=function(){removeEventListener("visibilitychange",ou,!0),removeEventListener("prerenderingchange",ou,!0)},uu=function(){return ru<0&&(ru=iu(),au(),Ks((function(){setTimeout((function(){ru=iu(),au()}),0)}))),{get firstHiddenTime(){return ru}}},lu=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},cu=[1800,3e3],du=function(e,t){t=t||{},lu((function(){var n,r=uu(),i=Us("FCP"),o=Qs("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime<r.firstHiddenTime&&(i.value=Math.max(e.startTime-Js(),0),i.entries.push(e),n(!0)))}))}));o&&(n=$s(e,i,cu,t.reportAllChanges),Ks((function(r){i=Us("FCP"),n=$s(e,i,cu,t.reportAllChanges),eu((function(){i.value=performance.now()-r.timeStamp,n(!0)}))})))}))},fu=[.1,.25],hu=0,vu=1/0,pu=0,mu=function(e){e.forEach((function(e){e.interactionId&&(vu=Math.min(vu,e.interactionId),pu=Math.max(pu,e.interactionId),hu=pu?(pu-vu)/7+1:0)}))},gu=function(){return Ys?hu:performance.interactionCount||0},yu=function(){"interactionCount"in performance||Ys||(Ys=Qs("event",mu,{type:"event",buffered:!0,durationThreshold:0}))},bu=[],Cu=new Map,Iu=0,wu=[],ku=function(e){if(wu.forEach((function(t){return t(e)})),e.interactionId||"first-input"===e.entryType){var t=bu[bu.length-1],n=Cu.get(e.interactionId);if(n||bu.length<10||e.duration>t.latency){if(n)e.duration>n.latency?(n.entries=[e],n.latency=e.duration):e.duration===n.latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};Cu.set(r.id,r),bu.push(r)}bu.sort((function(e,t){return t.latency-e.latency})),bu.length>10&&bu.splice(10).forEach((function(e){return Cu.delete(e.id)}))}}},Su=function(e){var t=self.requestIdleCallback||self.setTimeout,n=-1;return e=nu(e),"hidden"===document.visibilityState?e():(n=t(e),tu(e)),n},Au=[200,500],xu=function(e,t){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(t=t||{},lu((function(){var n;yu();var r,i=Us("INP"),o=function(e){Su((function(){e.forEach(ku);var t=function(){var e=Math.min(bu.length-1,Math.floor((gu()-Iu)/50));return bu[e]}();t&&t.latency!==i.value&&(i.value=t.latency,i.entries=t.entries,r())}))},a=Qs("event",o,{durationThreshold:null!==(n=t.durationThreshold)&&void 0!==n?n:40});r=$s(e,i,Au,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),tu((function(){o(a.takeRecords()),r(!0)})),Ks((function(){Iu=gu(),bu.length=0,Cu.clear(),i=Us("INP"),r=$s(e,i,Au,t.reportAllChanges)})))})))},Tu=[],Nu=[],Mu=0,Ru=new WeakMap,_u=new Map,Fu=-1,Zu=function(e){Tu=Tu.concat(e),Ou()},Ou=function(){Fu<0&&(Fu=Su(Eu))},Eu=function(){_u.size>10&&_u.forEach((function(e,t){Cu.has(t)||_u.delete(t)}));var e=bu.map((function(e){return Ru.get(e.entries[0])})),t=Nu.length-50;Nu=Nu.filter((function(n,r){return r>=t||e.includes(n)}));for(var n=new Set,r=0;r<Nu.length;r++){var i=Nu[r];Bu(i.startTime,i.processingEnd).forEach((function(e){n.add(e)}))}var o=Tu.length-1-50;Tu=Tu.filter((function(e,t){return e.startTime>Mu&&t>o||n.has(e)})),Fu=-1};wu.push((function(e){e.interactionId&&e.target&&!_u.has(e.interactionId)&&_u.set(e.interactionId,e.target)}),(function(e){var t,n=e.startTime+e.duration;Mu=Math.max(Mu,e.processingEnd);for(var r=Nu.length-1;r>=0;r--){var i=Nu[r];if(Math.abs(n-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:n,entries:[e]},Nu.push(t)),(e.interactionId||"first-input"===e.entryType)&&Ru.set(e,t),Ou()}));var Bu=function(e,t){for(var n,r=[],i=0;n=Tu[i];i++)if(!(n.startTime+n.duration<e)){if(n.startTime>t)break;r.push(n)}return r},Lu=[2500,4e3],Du={},qu={onLCP:function(e,t){!function(e,t){t=t||{},lu((function(){var n,r=uu(),i=Us("LCP"),o=function(e){t.reportAllChanges||(e=e.slice(-1)),e.forEach((function(e){e.startTime<r.firstHiddenTime&&(i.value=Math.max(e.startTime-Js(),0),i.entries=[e],n())}))},a=Qs("largest-contentful-paint",o);if(a){n=$s(e,i,Lu,t.reportAllChanges);var s=nu((function(){Du[i.id]||(o(a.takeRecords()),a.disconnect(),Du[i.id]=!0,n(!0))}));["keydown","click"].forEach((function(e){addEventListener(e,(function(){return Su(s)}),{once:!0,capture:!0})})),tu(s),Ks((function(r){i=Us("LCP"),n=$s(e,i,Lu,t.reportAllChanges),eu((function(){i.value=performance.now()-r.timeStamp,Du[i.id]=!0,n(!0)}))}))}}))}((function(t){var n=function(e){var t={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:e.value};if(e.entries.length){var n=Ps();if(n){var r=n.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,n.responseStart-r),s=Math.max(a,o?(o.requestStart||o.startTime)-r:0),u=Math.max(s,o?o.responseEnd-r:0),l=Math.max(u,i.startTime-r);t={element:js(i.element),timeToFirstByte:a,resourceLoadDelay:s-a,resourceLoadDuration:u-s,elementRenderDelay:l-u,navigationEntry:n,lcpEntry:i},i.url&&(t.url=i.url),o&&(t.lcpResourceEntry=o)}}return Object.assign(e,{attribution:t})}(t);e(n)}),t)},onCLS:function(e,t){!function(e,t){t=t||{},du(nu((function(){var n,r=Us("CLS",0),i=0,o=[],a=function(e){e.forEach((function(e){if(!e.hadRecentInput){var t=o[0],n=o[o.length-1];i&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(i+=e.value,o.push(e)):(i=e.value,o=[e])}})),i>r.value&&(r.value=i,r.entries=o,n())},s=Qs("layout-shift",a);s&&(n=$s(e,r,fu,t.reportAllChanges),tu((function(){a(s.takeRecords()),n(!0)})),Ks((function(){i=0,r=Us("CLS",0),n=$s(e,r,fu,t.reportAllChanges),eu((function(){return n()}))})),setTimeout(n,0))})))}((function(t){var n=function(e){var t,n={};if(e.entries.length){var r=e.entries.reduce((function(e,t){return e&&e.value>t.value?e:t}));if(r&&r.sources&&r.sources.length){var i=(t=r.sources).find((function(e){return e.node&&1===e.node.nodeType}))||t[0];i&&(n={largestShiftTarget:js(i.node),largestShiftTime:r.startTime,largestShiftValue:r.value,largestShiftSource:i,largestShiftEntry:r,loadState:Gs(r.startTime)})}}return Object.assign(e,{attribution:n})}(t);e(n)}),t)},onFCP:function(e,t){du((function(t){var n=function(e){var t={timeToFirstByte:0,firstByteToFCP:e.value,loadState:Gs(zs())};if(e.entries.length){var n=Ps(),r=e.entries[e.entries.length-1];if(n){var i=n.activationStart||0,o=Math.max(0,n.responseStart-i);t={timeToFirstByte:o,firstByteToFCP:e.value-o,loadState:Gs(e.entries[0].startTime),navigationEntry:n,fcpEntry:r}}}return Object.assign(e,{attribution:t})}(t);e(n)}),t)},onINP:function(e,t){Vs||(Vs=Qs("long-animation-frame",Zu)),xu((function(t){var n=function(e){var t=e.entries[0],n=Ru.get(t),r=t.processingStart,i=n.processingEnd,o=n.entries.sort((function(e,t){return e.processingStart-t.processingStart})),a=Bu(t.startTime,i),s=e.entries.find((function(e){return e.target})),u=s&&s.target||_u.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:js(u),interactionTargetElement:u,interactionType:t.name.startsWith("key")?"keyboard":"pointer",interactionTime:t.startTime,nextPaintTime:c,processedEventEntries:o,longAnimationFrameEntries:a,inputDelay:r-t.startTime,processingDuration:i-r,presentationDelay:Math.max(c-i,0),loadState:Gs(t.startTime)};return Object.assign(e,{attribution:d})}(t);e(n)}),t)}};function Hu(e,t){return t.length>e?t.slice(0,e)+"...":t}function Yu(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do{t=t.previousSibling}while(t&&!Ar(t));return t}function Vu(e,t,n,r){var i=e.tagName.toLowerCase(),o={tag_name:i};Rr.indexOf(i)>-1&&!n&&("a"===i.toLowerCase()||"button"===i.toLowerCase()?o.$el_text=Hu(1024,Hr(e)):o.$el_text=Hu(1024,Mr(e)));var a=Nr(e);a.length>0&&(o.classes=a.filter((function(e){return""!==e}))),yr(e.attributes,(function(n){var i;if((!Fr(e)||-1!==["name","id","class","aria-label"].indexOf(n.name))&&((null==r||!r.includes(n.name))&&!t&&qr(n.value)&&(i=n.name,!or(i)||"_ngcontent"!==i.substring(0,10)&&"_nghost"!==i.substring(0,7)))){var a=n.value;"class"===n.name&&(a=Tr(a).join(" ")),o["attr__"+n.name]=Hu(1024,a)}}));for(var s=1,u=1,l=e;l=Yu(l);)s++,l.tagName===e.tagName&&u++;return o.nth_child=s,o.nth_of_type=u,o}function Pu(e,t){for(var n,r,i,{e:o,maskAllElementAttributes:a,maskAllText:s,elementAttributeIgnoreList:u,elementsChainAsString:l}=t,c=[e],d=e;d.parentNode&&!xr(d,"body");)(i=d.parentNode)&&11===i.nodeType?(c.push(d.parentNode.host),d=d.parentNode.host):(c.push(d.parentNode),d=d.parentNode);var f,h,v,p=[],m={},g=!1,y=!1;if(yr(c,(e=>{var t=_r(e);"a"===e.tagName.toLowerCase()&&(g=e.getAttribute("href"),g=t&&g&&qr(g)&&g),Xn(Nr(e),"ph-no-capture")&&(y=!0),p.push(Vu(e,a,s,u));var n=function(e){if(!_r(e))return{};var t={};return yr(e.attributes,(function(e){if(e.name&&0===e.name.indexOf("data-ph-capture-attribute")){var n=e.name.replace("data-ph-capture-attribute-",""),r=e.value;n&&r&&qr(r)&&(t[n]=r)}})),t}(e);br(m,n)})),y)return{props:{},explicitNoCapture:y};if(s||("a"===e.tagName.toLowerCase()||"button"===e.tagName.toLowerCase()?p[0].$el_text=Hr(e):p[0].$el_text=Mr(e)),g){var b,C;p[0].attr__href=g;var I=null==(h=g,v=null==Vn?void 0:Vn.createElement("a"),b=ir(v)?null:(v.href=h,v))?void 0:b.host,w=null==Dn||null==(C=Dn.location)?void 0:C.host;I&&w&&I!==w&&(f=g)}return{props:br({$event_type:o.type,$ce_version:1},l?{}:{$elements:p},{$elements_chain:Vr(p)},null!=(n=p[0])&&n.$el_text?{$el_text:null==(r=p[0])?void 0:r.$el_text}:{},f&&"click"===o.type?{$external_click_url:f}:{},m)}}Wn.__PosthogExtensions__=Wn.__PosthogExtensions__||{},Wn.__PosthogExtensions__.postHogWebVitalsCallbacks=qu,Wn.postHogWebVitalsCallbacks=qu;var Gu={};function Wu(e){return function(e,t){var n=Gu[e];if(n)return n;var r=t[e];if(tr(r)&&!nr())return Gu[e]=r.bind(t);var i=t.document;if(i&&er(i.createElement))try{var o=i.createElement("iframe");o.hidden=!0,i.head.appendChild(o);var a=o.contentWindow;a&&a[e]&&(r=a[e]),i.head.removeChild(o)}catch(t){vr.warn("Could not create sandbox iframe for "+e+" check, bailing to assignableWindow."+e+": ",t)}return r&&er(r)?Gu[e]=r.bind(t):r}("MutationObserver",e)}function ju(e){var t=function(e){return ir(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 Xu(e,t){return lr(e)&&e>=t}class zu{D(e){var t,n,r,i,o=this.q((null==e?void 0:e.__onCapture)||this.H.bind(this));return{element_attribute_ignorelist:null!==(t=null==e?void 0:e.element_attribute_ignorelist)&&void 0!==t?t:o.element_attribute_ignorelist,scroll_threshold_ms:null!==(n=null==e?void 0:e.scroll_threshold_ms)&&void 0!==n?n:o.scroll_threshold_ms,selection_change_threshold_ms:null!==(r=null==e?void 0:e.selection_change_threshold_ms)&&void 0!==r?r:o.selection_change_threshold_ms,mutation_threshold_ms:null!==(i=null==e?void 0:e.mutation_threshold_ms)&&void 0!==i?i:o.mutation_threshold_ms,__onCapture:o.__onCapture}}constructor(e,t){this.Y=[],this.q=e=>({element_attribute_ignorelist:[],scroll_threshold_ms:100,selection_change_threshold_ms:100,mutation_threshold_ms:2500,__onCapture:e}),this.V=e=>{var t=ju(e);sr(t)||this.P(t)||this.Y.push(t),this.Y.length&&ir(this.G)&&(this.G=Wn.setTimeout((()=>{this.W()}),1e3))},this.j=()=>{var e=Date.now();e%50==0&&this.Y.forEach((t=>{ir(t.scrollDelayMs)&&(t.scrollDelayMs=e-t.timestamp)}))},this.X=()=>{this.K=Date.now()},this.instance=e,this.J=this.D(t),this._onCapture=this.J.__onCapture}start(e){this.U(),this.$(),this.ee(),this.te(e)}te(e){if(!this.ne){var t=Wu(Wn);this.ne=new t((e=>{this.re(e)})),this.ne.observe(e,{attributes:!0,characterData:!0,childList:!0,subtree:!0})}}stop(){var e;null==(e=this.ne)||e.disconnect(),this.ne=void 0,Wn.removeEventListener("click",this.V),Wn.removeEventListener("scroll",this.j,{capture:!0}),Wn.removeEventListener("selectionchange",this.X)}re(e){this.ie=Date.now()}U(){Ir(Wn,"click",this.V)}$(){Ir(Wn,"scroll",this.j,{capture:!0})}ee(){Ir(Wn,"selectionchange",this.X)}P(e){if(!e)return!0;if((t=e.node)instanceof Element&&("__POSTHOG_TOOLBAR__"===t.id||null!=t.closest&&t.closest(".toolbar-global-fade-container")))return!0;var t,n=this.Y.some((t=>t.node===e.node&&Math.abs(t.timestamp-e.timestamp)<1e3));return!!n||!(!xr(e.node,"html")&&Ar(e.node)&&!Rr.includes(e.node.tagName.toLowerCase()))}W(){if(this.Y.length){clearTimeout(this.G),this.G=void 0;var e=this.Y;for(var t of(this.Y=[],e)){var n;t.mutationDelayMs=null!==(n=t.mutationDelayMs)&&void 0!==n?n:this.ie&&t.timestamp<=this.ie?this.ie-t.timestamp:void 0,t.absoluteDelayMs=Date.now()-t.timestamp,t.selectionChangedDelayMs=this.K&&t.timestamp<=this.K?this.K-t.timestamp:void 0;var r=Xu(t.scrollDelayMs,this.J.scroll_threshold_ms),i=Xu(t.selectionChangedDelayMs,this.J.selection_change_threshold_ms),o=Xu(t.mutationDelayMs,this.J.mutation_threshold_ms),a=Xu(t.absoluteDelayMs,1.1*this.J.mutation_threshold_ms),s=lr(t.scrollDelayMs)&&t.scrollDelayMs<this.J.scroll_threshold_ms,u=lr(t.mutationDelayMs)&&t.mutationDelayMs<this.J.mutation_threshold_ms,l=lr(t.selectionChangedDelayMs)&&t.selectionChangedDelayMs<this.J.selection_change_threshold_ms;s||u||l||(r||o||a||i?this._onCapture(t,{$dead_click_last_mutation_timestamp:this.ie,$dead_click_event_timestamp:t.timestamp,$dead_click_scroll_timeout:r,$dead_click_mutation_timeout:o,$dead_click_absolute_timeout:a,$dead_click_selection_changed_timeout:i}):t.absoluteDelayMs<this.J.mutation_threshold_ms&&this.Y.push(t))}this.Y.length&&ir(this.G)&&(this.G=Wn.setTimeout((()=>{this.W()}),1e3))}}H(e,t){this.instance.capture("$dead_click",n({},t,Pu(e.node,{e:e.originalEvent,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.J.element_attribute_ignorelist,elementsChainAsString:!1}).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)})}}Wn.__PosthogExtensions__=Wn.__PosthogExtensions__||{},Wn.__PosthogExtensions__.initDeadClicksAutocapture=(e,t)=>new zu(e,t)}();
2
2
  //# sourceMappingURL=all-external-dependencies.js.map