posthog-js 1.210.0 → 1.210.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- !function(){"use strict";function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?e(Object(r),!0).forEach((function(e){o(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function n(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}function r(e){return function(){var t=this,r=arguments;return new Promise((function(o,i){var a=e.apply(t,r);function s(e){n(a,o,i,s,l,"next",e)}function l(e){n(a,o,i,s,l,"throw",e)}s(void 0)}))}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var a,s=["type"],l=Object.defineProperty,c=(e,t,n)=>((e,t,n)=>t in e?l(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),u=Object.defineProperty,d=(e,t,n)=>((e,t,n)=>t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),p=(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))(p||{}),h={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},f={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]};var m={};function v(e){if(m[e])return m[e];var t=function(e){var t,n,r=null===globalThis||void 0===globalThis||null===(t=globalThis.Zone)||void 0===t||null===(n=t.__symbol__)||void 0===n?void 0:n.call(t,e);return r&&globalThis[r]?globalThis[r]:void 0}(e)||globalThis[e],n=t.prototype,r=e in h?h[e]:void 0,o=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]"))}))),i=e in f?f[e]:void 0,a=Boolean(i&&i.every((e=>{var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))})));if(o&&a)return m[e]=t.prototype,t.prototype;try{var s=document.createElement("iframe");document.body.appendChild(s);var l=s.contentWindow;if(!l)return t.prototype;var c=l[e].prototype;return document.body.removeChild(s),c?m[e]=c:t.prototype}catch(e){return t.prototype}}var g={};function y(e,t,n){var r,o="".concat(e,".").concat(String(n));if(g[o])return g[o].call(t);var i=v(e),a=null==(r=Object.getOwnPropertyDescriptor(i,n))?void 0:r.get;return a?(g[o]=a,a.call(t)):t[n]}var b={};function _(e,t,n){var r="".concat(e,".").concat(String(n));if(b[r])return b[r].bind(t);var o=v(e)[n];return"function"!=typeof o?t[n]:(b[r]=o,o.bind(t))}var C={childNodes:function(e){return y("Node",e,"childNodes")},parentNode:function(e){return y("Node",e,"parentNode")},parentElement:function(e){return y("Node",e,"parentElement")},textContent:function(e){return y("Node",e,"textContent")},contains:function(e,t){return _("Node",e,"contains")(t)},getRootNode:function(e){return _("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?y("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?y("Element",e,"shadowRoot"):null},querySelector:function(e,t){return y("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return y("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return v("MutationObserver").constructor}};function S(e){return e.nodeType===e.ELEMENT_NODE}function I(e){var t=e&&"host"in e&&"mode"in e&&C.host(e)||null;return Boolean(t&&"shadowRoot"in t&&C.shadowRoot(t)===e)}function w(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function k(e){try{var t=e.rules||e.cssRules;if(!t)return null;var n=e.href;!n&&e.ownerNode&&e.ownerNode.ownerDocument&&(n=e.ownerNode.ownerDocument.location.href);var r=Array.from(t,(e=>T(e,n))).join("");return(o=r).includes(" background-clip: text;")&&!o.includes(" -webkit-background-clip: text;")&&(o=o.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),o}catch(e){return null}var o}function T(e,t){if(function(e){return"styleSheet"in e}(e)){var n;try{n=k(e.styleSheet)||function(e){var{cssText:t}=e;if(t.split('"').length<3)return t;var n=["@import","url(".concat(JSON.stringify(e.href),")")];return""===e.layerName?n.push("layer"):e.layerName&&n.push("layer(".concat(e.layerName,")")),e.supportsText&&n.push("supports(".concat(e.supportsText,")")),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}(e)}catch(t){n=e.cssText}return e.styleSheet.href?B(n,e.styleSheet.href):n}var r,o=e.cssText;return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(r=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,o=o.replace(r,"$1\\$2")),t?B(o,t):o}function x(e,t){return Array.from(e.styleSheets).find((e=>e.href===t))}let M=class{constructor(){d(this,"idNodeMap",new Map),d(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 N(e){var{element:t,maskInputOptions:n,tagName:r,type:o,value:i,maskInputFn:a}=e,s=i||"",l=o&&E(o);return(n[r.toLowerCase()]||l&&n[l])&&(s=a?a(s,t):"*".repeat(s.length)),s}function E(e){return e.toLowerCase()}var A="__rrweb_original__";function O(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?E(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 o=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(n=null==o?void 0:o[1])&&void 0!==n?n:null}var L=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,D=/^(?:[a-z+]+:)?\/\//i,F=/^www\..*/i,P=/^(data:)([^,]*),(.*)/i;function B(e,t){return(e||"").replace(L,((e,n,r,o,i,a)=>{var s,l=r||i||a,c=n||o||"";if(!l)return e;if(D.test(l)||F.test(l))return"url(".concat(c).concat(l).concat(c,")");if(P.test(l))return"url(".concat(c).concat(l).concat(c,")");if("/"===l[0])return"url(".concat(c).concat((s=t,(s.indexOf("//")>-1?s.split("/").slice(0,3).join("/"):s.split("/")[0]).split("?")[0]+l)).concat(c,")");var u=t.split("/"),d=l.split("/");for(var p of(u.pop(),d))"."!==p&&(".."===p?u.pop():u.push(p));return"url(".concat(c).concat(u.join("/")).concat(c,")")}))}var H=new Map,Z=new Map;function q(e){if(!H.has(e)){var t=e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"");H.set(e,t)}return H.get(e)}function W(e,t){return function(e,t){var n=Array.from(t.childNodes),r=[],o=0;if(n.length>1&&e&&"string"==typeof e){if(Z.has(e))return Z.get(e);for(var i=q(e),a=i.length/e.length,s=1;s<n.length;s++)if(n[s].textContent&&"string"==typeof n[s].textContent){for(var l=q(n[s].textContent),c=3;c<l.length&&(l[c].match(/[a-zA-Z0-9]/)||-1!==l.indexOf(l.substring(0,c),1));c++);for(;c<l.length;c++){var u=l.substring(0,c),d=i.split(u),p=-1;if(2===d.length?p=i.indexOf(u):d.length>2&&""===d[0]&&""!==n[s-1].textContent&&(p=i.indexOf(u,1)),-1!==p){for(var h=Math.floor(p/a);h>0&&h<e.length;){if((o+=1)>50*n.length)return r.push(e),r;var f=q(e.substring(0,h));if(f.length===p){r.push(e.substring(0,h)),e=e.substring(h),i=i.substring(p);break}f.length<p?h+=Math.max(1,Math.floor((p-f.length)/a)):h-=Math.max(1,Math.floor((f.length-p)*a))}break}}}}return r.push(e),Z.set(og,r),r}(e,t).join("/* rr_split */")}var V,Y,j=1,G=new RegExp("[^a-z0-9-_:]"),z=-2;function U(){return j++}var X=/^[^ \t\n\r\u000c]+/,K=/^[, \t\n\r\u000c]+/;var J=new WeakMap;function Q(e,t){return t&&""!==t.trim()?ee(e,t):t}function $(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function ee(e,t){var n=J.get(e);if(n||(n=e.createElement("a"),J.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function te(e,t,n,r){return r?"src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?Q(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,o=e.exec(t.substring(n));return o?(r=o[0],n+=r.length,r):""}for(var o=[];r(K),!(n>=t.length);){var i=r(X);if(","===i.slice(-1))i=Q(e,i.substring(0,i.length-1)),o.push(i);else{var a="";i=Q(e,i);for(var s=!1;;){var l=t.charAt(n);if(""===l){o.push((i+a).trim());break}if(s)")"===l&&(s=!1);else{if(","===l){n+=1,o.push((i+a).trim());break}"("===l&&(s=!0)}a+=l,n+=1}}}return o.join(", ")}(e,r):"style"===n?B(r,ee(e)):"object"===t&&"data"===n?Q(e,r):r:Q(e,r):r}function ne(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function re(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&re(C.parentNode(e),t,n);for(var r=e.classList.length;r--;){var o=e.classList[r];if(t.test(o))return!0}return!!n&&re(C.parentNode(e),t,n)}function oe(e,t,n,r){var o;if(S(e)){if(o=e,!C.childNodes(o).length)return!1}else{if(null===C.parentElement(e))return!1;o=C.parentElement(e)}try{if("string"==typeof t){if(r){if(o.closest(".".concat(t)))return!0}else if(o.classList.contains(t))return!0}else if(re(o,t,r))return!0;if(n)if(r){if(o.closest(n))return!0}else if(o.matches(n))return!0}catch(e){}return!1}function ie(e,t){var{doc:n,mirror:r,blockClass:o,blockSelector:i,needsMask:a,inlineStylesheet:s,maskInputOptions:l={},maskTextFn:c,maskInputFn:u,dataURLOptions:d={},inlineImages:h,recordCanvas:f,keepIframeSrcFn:m,newlyAddedElement:v=!1,cssCaptured:g=!1}=t,y=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:p.Document,childNodes:[],compatMode:e.compatMode}:{type:p.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:p.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:y};case e.ELEMENT_NODE:return function(e,t){for(var n,{doc:r,blockClass:o,blockSelector:i,inlineStylesheet:a,maskInputOptions:s={},maskInputFn:l,dataURLOptions:c={},inlineImages:u,recordCanvas:d,keepIframeSrcFn:h,newlyAddedElement:f=!1,rootId:m}=t,v=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 o=e.classList[r];if(t.test(o))return!0}if(n)return e.matches(n)}catch(e){}return!1}(e,o,i),g=function(e){if(e instanceof HTMLFormElement)return"form";var t=E(e.tagName);return G.test(t)?"div":t}(e),y={},b=e.attributes.length,_=0;_<b;_++){var C=e.attributes[_];ne(g,C.name,C.value)||(y[C.name]=te(r,g,E(C.name),C.value))}if("link"===g&&a){var S=e.href;if(S){var I=x(r,S);if(!I&&S.includes(".css"))I=x(r,window.location.origin+"/"+S.replace(window.location.href,""));var w=null;I&&(w=k(I)),w&&(delete y.rel,delete y.href,y._cssText=w)}}if("style"===g&&e.sheet){var T=k(e.sheet);T&&(e.childNodes.length>1&&(T=W(T,e)),y._cssText=T)}if("input"===g||"textarea"===g||"select"===g){var M=e.value,R=e.checked;"radio"!==y.type&&"checkbox"!==y.type&&"submit"!==y.type&&"button"!==y.type&&M?y.value=N({element:e,type:O(e),tagName:g,value:M,maskInputOptions:s,maskInputFn:l}):R&&(y.checked=R)}"option"===g&&(e.selected&&!s.select?y.selected=!0:delete y.selected);if("dialog"===g&&e.open)try{y.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"}catch(e){y.rr_open_mode="modal",y.ph_rr_could_not_detect_modal=!0}if("canvas"===g&&d)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 o=t.getImageData,i=A in o?o[A]:o;if(new Uint32Array(i.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)||(y.rr_dataURL=e.toDataURL(c.type,c.quality));else if(!("__context"in e)){var L=e.toDataURL(c.type,c.quality),D=r.createElement("canvas");D.width=e.width,D.height=e.height,L!==D.toDataURL(c.type,c.quality)&&(y.rr_dataURL=L)}if("img"===g&&u){V||(V=r.createElement("canvas"),Y=V.getContext("2d"));var F=e,P=F.currentSrc||F.getAttribute("src")||"<unknown-src>",B=F.crossOrigin,H=()=>{F.removeEventListener("load",H);try{V.width=F.naturalWidth,V.height=F.naturalHeight,Y.drawImage(F,0,0),y.rr_dataURL=V.toDataURL(c.type,c.quality)}catch(e){if("anonymous"!==F.crossOrigin)return F.crossOrigin="anonymous",void(F.complete&&0!==F.naturalWidth?H():F.addEventListener("load",H));console.warn("Cannot inline img src=".concat(P,"! Error: ").concat(e))}"anonymous"===F.crossOrigin&&(B?y.crossOrigin=B:F.removeAttribute("crossorigin"))};F.complete&&0!==F.naturalWidth?H():F.addEventListener("load",H)}if("audio"===g||"video"===g){var Z=y;Z.rr_mediaState=e.paused?"paused":"played",Z.rr_mediaCurrentTime=e.currentTime,Z.rr_mediaPlaybackRate=e.playbackRate,Z.rr_mediaMuted=e.muted,Z.rr_mediaLoop=e.loop,Z.rr_mediaVolume=e.volume}f||(e.scrollLeft&&(y.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(y.rr_scrollTop=e.scrollTop));if(v){var{width:q,height:j}=e.getBoundingClientRect();y={class:y.class,rr_width:"".concat(q,"px"),rr_height:"".concat(j,"px")}}"iframe"!==g||h(y.src)||(e.contentDocument||(y.rr_src=y.src),delete y.src);try{customElements.get(g)&&(n=!0)}catch(e){}return{type:p.Element,tagName:g,attributes:y,childNodes:[],isSVG:$(e)||void 0,needBlock:v,rootId:m,isCustom:n}}(e,{doc:n,blockClass:o,blockSelector:i,inlineStylesheet:s,maskInputOptions:l,maskInputFn:u,dataURLOptions:d,inlineImages:h,recordCanvas:f,keepIframeSrcFn:m,newlyAddedElement:v,rootId:y});case e.TEXT_NODE:return function(e,t){var{needsMask:n,maskTextFn:r,rootId:o,cssCaptured:i}=t,a=C.parentNode(e),s=a&&a.tagName,l="",c="STYLE"===s||void 0,u="SCRIPT"===s||void 0;u?l="SCRIPT_PLACEHOLDER":i||(l=C.textContent(e),c&&l&&(l=B(l,ee(t.doc))));!c&&!u&&l&&n&&(l=r?r(l,C.parentElement(e)):l.replace(/[\S]/g,"*"));return{type:p.Text,textContent:l||"",rootId:o}}(e,{doc:n,needsMask:a,maskTextFn:c,rootId:y,cssCaptured:g});case e.CDATA_SECTION_NODE:return{type:p.CDATA,textContent:"",rootId:y};case e.COMMENT_NODE:return{type:p.Comment,textContent:C.textContent(e)||"",rootId:y};default:return!1}}function ae(e){return null==e?"":e.toLowerCase()}function se(e,t){var{doc:n,mirror:r,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:s,skipChild:l=!1,inlineStylesheet:c=!0,maskInputOptions:u={},maskTextFn:d,maskInputFn:h,slimDOMOptions:f,dataURLOptions:m={},inlineImages:v=!1,recordCanvas:g=!1,onSerialize:y,onIframeLoad:b,iframeLoadTimeout:_=5e3,onStylesheetLoad:k,stylesheetLoadTimeout:T=5e3,keepIframeSrcFn:x=(()=>!1),newlyAddedElement:M=!1,cssCaptured:N=!1}=t,{needsMask:E}=t,{preserveWhiteSpace:A=!0}=t;E||(E=oe(e,a,s,void 0===E));var O,L=ie(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,needsMask:E,inlineStylesheet:c,maskInputOptions:u,maskTextFn:d,maskInputFn:h,dataURLOptions:m,inlineImages:v,recordCanvas:g,keepIframeSrcFn:x,newlyAddedElement:M,cssCaptured:N});if(!L)return console.warn(e,"not serialized"),null;O=r.hasNode(e)?r.getId(e):function(e,t){if(t.comment&&e.type===p.Comment)return!0;if(e.type===p.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&&(ae(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===ae(e.attributes.name)||"icon"===ae(e.attributes.rel)||"apple-touch-icon"===ae(e.attributes.rel)||"shortcut icon"===ae(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&ae(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(ae(e.attributes.property).match(/^(og|twitter|fb):/)||ae(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===ae(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===ae(e.attributes.name)||"googlebot"===ae(e.attributes.name)||"bingbot"===ae(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===ae(e.attributes.name)||"generator"===ae(e.attributes.name)||"framework"===ae(e.attributes.name)||"publisher"===ae(e.attributes.name)||"progid"===ae(e.attributes.name)||ae(e.attributes.property).match(/^article:/)||ae(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===ae(e.attributes.name)||"yandex-verification"===ae(e.attributes.name)||"csrf-token"===ae(e.attributes.name)||"p:domain_verify"===ae(e.attributes.name)||"verify-v1"===ae(e.attributes.name)||"verification"===ae(e.attributes.name)||"shopify-checkout-api-token"===ae(e.attributes.name)))return!0}}return!1}(L,f)||!A&&L.type===p.Text&&!L.textContent.replace(/^\s+|\s+$/gm,"").length?z:U();var D=Object.assign(L,{id:O});if(r.add(e,D),O===z)return null;y&&y(e);var F=!l;if(D.type===p.Element){F=F&&!D.needBlock,delete D.needBlock;var P=C.shadowRoot(e);P&&w(P)&&(D.isShadowHost=!0)}if((D.type===p.Document||D.type===p.Element)&&F){f.headWhitespace&&D.type===p.Element&&"head"===D.tagName&&(A=!1);var B={doc:n,mirror:r,blockClass:o,blockSelector:i,needsMask:E,maskTextClass:a,maskTextSelector:s,skipChild:l,inlineStylesheet:c,maskInputOptions:u,maskTextFn:d,maskInputFn:h,slimDOMOptions:f,dataURLOptions:m,inlineImages:v,recordCanvas:g,preserveWhiteSpace:A,onSerialize:y,onIframeLoad:b,iframeLoadTimeout:_,onStylesheetLoad:k,stylesheetLoadTimeout:T,keepIframeSrcFn:x,cssCaptured:!1};if(D.type===p.Element&&"textarea"===D.tagName&&void 0!==D.attributes.value);else for(var H of(D.type===p.Element&&void 0!==D.attributes._cssText&&"string"==typeof D.attributes._cssText&&(B.cssCaptured=!0),Array.from(C.childNodes(e)))){var Z=se(H,B);Z&&D.childNodes.push(Z)}var q=null;if(S(e)&&(q=C.shadowRoot(e)))for(var W of Array.from(C.childNodes(q))){var V=se(W,B);V&&(w(q)&&(V.isShadow=!0),D.childNodes.push(V))}}var Y=C.parentNode(e);return Y&&I(Y)&&w(Y)&&(D.isShadow=!0),D.type===p.Element&&"iframe"===D.tagName&&function(e,t,n){var r=e.contentWindow;if(r){var o,i=!1;try{o=r.document.readyState}catch(e){return}if("complete"===o){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((()=>{i||(t(),i=!0)}),n);e.addEventListener("load",(()=>{clearTimeout(s),i=!0,t()}))}}}(e,(()=>{var t=e.contentDocument;if(t&&b){var n=se(t,{doc:t,mirror:r,blockClass:o,blockSelector:i,needsMask:E,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:d,maskInputFn:h,slimDOMOptions:f,dataURLOptions:m,inlineImages:v,recordCanvas:g,preserveWhiteSpace:A,onSerialize:y,onIframeLoad:b,iframeLoadTimeout:_,onStylesheetLoad:k,stylesheetLoadTimeout:T,keepIframeSrcFn:x});n&&b(e,n)}}),_),D.type===p.Element&&"link"===D.tagName&&"string"==typeof D.attributes.rel&&("stylesheet"===D.attributes.rel||"preload"===D.attributes.rel&&"string"==typeof D.attributes.href&&"css"===R(D.attributes.href))&&function(e,t,n){var r,o=!1;try{r=e.sheet}catch(e){return}if(!r){var i=setTimeout((()=>{o||(t(),o=!0)}),n);e.addEventListener("load",(()=>{clearTimeout(i),o=!0,t()}))}}(e,(()=>{if(k){var t=se(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,needsMask:E,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:d,maskInputFn:h,slimDOMOptions:f,dataURLOptions:m,inlineImages:v,recordCanvas:g,preserveWhiteSpace:A,onSerialize:y,onIframeLoad:b,iframeLoadTimeout:_,onStylesheetLoad:k,stylesheetLoadTimeout:T,keepIframeSrcFn:x});t&&k(e,t)}}),T),D}let le=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 ce={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ue={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},de={};function pe(e){if(de[e])return de[e];var t=function(e){var t,n,r=null===globalThis||void 0===globalThis||null===(t=globalThis.Zone)||void 0===t||null===(n=t.__symbol__)||void 0===n?void 0:n.call(t,e);return r&&globalThis[r]?globalThis[r]:void 0}(e)||globalThis[e],n=t.prototype,r=e in ce?ce[e]:void 0,o=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]"))}))),i=e in ue?ue[e]:void 0,a=Boolean(i&&i.every((e=>{var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))})));if(o&&a)return de[e]=t.prototype,t.prototype;try{var s=document.createElement("iframe");document.body.appendChild(s);var l=s.contentWindow;if(!l)return t.prototype;var c=l[e].prototype;return document.body.removeChild(s),c?de[e]=c:n}catch(e){return n}}var he={};function fe(e,t,n){var r,o="".concat(e,".").concat(String(n));if(he[o])return he[o].call(t);var i=pe(e),a=null==(r=Object.getOwnPropertyDescriptor(i,n))?void 0:r.get;return a?(he[o]=a,a.call(t)):t[n]}var me={};function ve(e,t,n){var r="".concat(e,".").concat(String(n));if(me[r])return me[r].bind(t);var o=pe(e)[n];return"function"!=typeof o?t[n]:(me[r]=o,o.bind(t))}function ge(){return pe("MutationObserver").constructor}var ye={childNodes:function(e){return fe("Node",e,"childNodes")},parentNode:function(e){return fe("Node",e,"parentNode")},parentElement:function(e){return fe("Node",e,"parentElement")},textContent:function(e){return fe("Node",e,"textContent")},contains:function(e,t){return ve("Node",e,"contains")(t)},getRootNode:function(e){return ve("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?fe("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?fe("Element",e,"shadowRoot"):null},querySelector:function(e,t){return fe("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return fe("Element",e,"querySelectorAll")(t)},mutationObserver:ge};function be(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}var _e="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.",Ce={map:{},getId:()=>(console.error(_e),-1),getNode:()=>(console.error(_e),null),removeNodeFromMap(){console.error(_e)},has:()=>(console.error(_e),!1),reset(){console.error(_e)}};function Se(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=null,o=0;return function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];var l=Date.now();o||!1!==n.leading||(o=l);var c=t-(l-o),u=this;c<=0||c>t?(r&&(clearTimeout(r),r=null),o=l,e.apply(u,a)):r||!1===n.trailing||(r=setTimeout((()=>{o=!1===n.leading?0:Date.now(),r=null,e.apply(u,a)}),c))}}function Ie(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window,i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(e){setTimeout((()=>{n.set.call(this,e)}),0),i&&i.set&&i.set.call(this,e)}}),()=>Ie(e,t,i||{},!0)}function we(e,t,n){try{if(!(t in e))return()=>{};var r=e[t],o=n(r);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch(e){return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Ce=new Proxy(Ce,{get:(e,t,n)=>("map"===t&&console.error(_e),Reflect.get(e,t,n))}));var ke=Date.now;function Te(e){var t,n,r,o,i=e.document;return{left:i.scrollingElement?i.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:i.documentElement.scrollLeft||(null==i?void 0:i.body)&&(null==(t=ye.parentElement(i.body))?void 0:t.scrollLeft)||(null==(n=null==i?void 0:i.body)?void 0:n.scrollLeft)||0,top:i.scrollingElement?i.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==i?void 0:i.documentElement.scrollTop)||(null==i?void 0:i.body)&&(null==(r=ye.parentElement(i.body))?void 0:r.scrollTop)||(null==(o=null==i?void 0:i.body)?void 0:o.scrollTop)||0}}function xe(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Me(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Ne(e){return e?e.nodeType===e.ELEMENT_NODE?e:ye.parentElement(e):null}function Ee(e,t,n,r){if(!e)return!1;var o=Ne(e);if(!o)return!1;try{if("string"==typeof t){if(o.classList.contains(t))return!0;if(r&&null!==o.closest("."+t))return!0}else if(re(o,t,r))return!0}catch(e){}if(n){if(o.matches(n))return!0;if(r&&null!==o.closest(n))return!0}return!1}function Ae(e,t,n){return!("TITLE"!==e.tagName||!n.headTitleMutations)||t.getId(e)===z}function Oe(e,t){if(I(e))return!1;var n=t.getId(e);if(!t.has(n))return!0;var r=ye.parentNode(e);return(!r||r.nodeType!==e.DOCUMENT_NODE)&&(!r||Oe(r,t))}function Re(e){return Boolean(e.changedTouches)}function Le(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function De(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function Fe(e){return!!e&&(e instanceof le&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(ye.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(ke=()=>(new Date).getTime());let Pe=class{constructor(){c(this,"id",1),c(this,"styleIDMap",new WeakMap),c(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 Be(e){var t,n=null;return"getRootNode"in e&&(null==(t=ye.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&ye.host(ye.getRootNode(e))&&(n=ye.host(ye.getRootNode(e))),n}function He(e){var t=e.ownerDocument;if(!t)return!1;var n=function(e){for(var t,n=e;t=Be(n);)n=t;return n}(e);return ye.contains(t,n)}function Ze(e){var t=e.ownerDocument;return!!t&&(ye.contains(t,e)||He(e))}var qe=(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))(qe||{}),We=(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))(We||{}),Ve=(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))(Ve||{}),Ye=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Ye||{}),je=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(je||{}),Ge=(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))(Ge||{}),ze=(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))(ze||{});function Ue(e){return"__ln"in e}class Xe{constructor(){c(this,"length",0),c(this,"head",null),c(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&&Ue(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&&Ue(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 Ke,Je=(e,t)=>"".concat(e,"@").concat(t);class Qe{constructor(){c(this,"frozen",!1),c(this,"locked",!1),c(this,"texts",[]),c(this,"attributes",[]),c(this,"attributeMap",new WeakMap),c(this,"removes",[]),c(this,"mapRemoves",[]),c(this,"movedMap",{}),c(this,"addedSet",new Set),c(this,"movedSet",new Set),c(this,"droppedSet",new Set),c(this,"removesSubTreeCache",new Set),c(this,"mutationCb"),c(this,"blockClass"),c(this,"blockSelector"),c(this,"maskTextClass"),c(this,"maskTextSelector"),c(this,"inlineStylesheet"),c(this,"maskInputOptions"),c(this,"maskTextFn"),c(this,"maskInputFn"),c(this,"keepIframeSrcFn"),c(this,"recordCanvas"),c(this,"inlineImages"),c(this,"slimDOMOptions"),c(this,"dataURLOptions"),c(this,"doc"),c(this,"mirror"),c(this,"iframeManager"),c(this,"stylesheetManager"),c(this,"shadowDomManager"),c(this,"canvasManager"),c(this,"processedNodeManager"),c(this,"unattachedDoc"),c(this,"processMutations",(e=>{e.forEach(this.processMutation),this.emit()})),c(this,"emit",(()=>{if(!this.frozen&&!this.locked){for(var e=[],t=new Set,n=new Xe,r=e=>{for(var t=e,n=z;n===z;)n=(t=t&&t.nextSibling)&&this.mirror.getId(t);return n},o=o=>{var i=ye.parentNode(o);if(i&&Ze(o)){var a=!1;if(o.nodeType===Node.TEXT_NODE){var s=i.tagName;if("TEXTAREA"===s)return;"STYLE"===s&&this.addedSet.has(i)&&(a=!0)}var l=I(i)?this.mirror.getId(Be(o)):this.mirror.getId(i),c=r(o);if(-1===l||-1===c)return n.addNode(o);var u=se(o,{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=>{Le(e,this.mirror)&&this.iframeManager.addIframe(e),De(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),Fe(o)&&this.shadowDomManager.addShadowRoot(ye.shadowRoot(o),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},cssCaptured:a});u&&(e.push({parentId:l,nextId:c,node:u}),t.add(u.id))}};this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(var i of this.movedSet)et(this.removesSubTreeCache,i,this.mirror)&&!this.movedSet.has(ye.parentNode(i))||o(i);for(var a of this.addedSet)tt(this.droppedSet,a)||et(this.removesSubTreeCache,a,this.mirror)?tt(this.movedSet,a)?o(a):this.droppedSet.add(a):o(a);for(var s=null;n.length;){var l=null;if(s){var c=this.mirror.getId(ye.parentNode(s.value)),u=r(s.value);-1!==c&&-1!==u&&(l=s)}if(!l)for(var d=n.tail;d;){var p=d;if(d=d.previous,p){var h=this.mirror.getId(ye.parentNode(p.value));if(-1===r(p.value))continue;if(-1!==h){l=p;break}var f=p.value,m=ye.parentNode(f);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var v=ye.host(m);if(-1!==this.mirror.getId(v)){l=p;break}}}}if(!l){for(;n.head;)n.removeNode(n.head.value);break}s=l.previous,n.removeNode(l.value),o(l.value)}var g={texts:this.texts.map((e=>{var t=e.node,n=ye.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.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(g))}})),c(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(ye.childNodes(e),(e=>ye.textContent(e)||"")).join("")})),c(this,"processMutation",(e=>{if(!Ae(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":var t=ye.textContent(e.target);Ee(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:oe(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Ne(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break;case"attributes":var n=e.target,r=e.attributeName,o=e.target.getAttribute(r);if("value"===r){var i=O(n);o=N({element:n,maskInputOptions:this.maskInputOptions,tagName:n.tagName,type:i,value:o,maskInputFn:this.maskInputFn})}if(Ee(e.target,this.blockClass,this.blockSelector,!1)||o===e.oldValue)return;var a=this.attributeMap.get(e.target);if("IFRAME"===n.tagName&&"src"===r&&!this.keepIframeSrcFn(o)){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"),!ne(n.tagName,r))if(a.attributes[r]=te(this.doc,E(n.tagName),E(r),o),"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 l of(e.oldValue&&s.setAttribute("style",e.oldValue),Array.from(n.style))){var c=n.style.getPropertyValue(l),u=n.style.getPropertyPriority(l);c!==s.style.getPropertyValue(l)||u!==s.style.getPropertyPriority(l)?a.styleDiff[l]=""===u?c:[c,u]:a._unchangedStyles[l]=[c,u]}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(Ee(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=I(e.target)?this.mirror.getId(ye.host(e.target)):this.mirror.getId(e.target);Ee(e.target,this.blockClass,this.blockSelector,!1)||Ae(t,this.mirror,this.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?($e(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||Oe(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Je(n,r)]?$e(this.movedSet,t):(this.removes.push({parentId:r,id:n,isShadow:!(!I(e.target)||!w(e.target))||void 0}),function(e,t){var n=[e];for(;n.length;){var r=n.pop();t.has(r)||(t.add(r),ye.childNodes(r).forEach((e=>n.push(e))))}}(t,this.removesSubTreeCache))),this.mapRemoves.push(t))}))}})),c(this,"genAdds",((e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(Ae(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[Je(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Ee(e,this.blockClass,this.blockSelector,!1)||(ye.childNodes(e).forEach((e=>this.genAdds(e))),Fe(e)&&ye.childNodes(ye.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 $e(e,t){e.delete(t),ye.childNodes(t).forEach((t=>$e(e,t)))}function et(e,t,n){return 0!==e.size&&function(e,t,n){var r=ye.parentNode(t);return!!r&&e.has(r)}(e,t)}function tt(e,t){return 0!==e.size&&nt(e,t)}function nt(e,t){var n=ye.parentNode(t);return!!n&&(!!e.has(n)||nt(e,n))}var rt=e=>{if(!Ke)return e;return function(){try{return e(...arguments)}catch(e){if(Ke&&!0===Ke(e))return;throw e}}},ot=[];function it(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 at(e,t){var n=new Qe;ot.push(n),n.init(e);var r=new(ge())(rt(n.processMutations.bind(n)));return r.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function st(e){var{mouseInteractionCb:n,doc:r,mirror:o,blockClass:i,blockSelector:a,sampling:s}=e;if(!1===s.mouseInteraction)return()=>{};var l=!0===s.mouseInteraction||void 0===s.mouseInteraction?{}:s.mouseInteraction,c=[],u=null;return Object.keys(Ve).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==l[e])).forEach((e=>{var s=E(e),l=(e=>r=>{var s=it(r);if(!Ee(s,i,a,!0)){var l=null,c=e;if("pointerType"in r){switch(r.pointerType){case"mouse":l=Ye.Mouse;break;case"touch":l=Ye.Touch;break;case"pen":l=Ye.Pen}l===Ye.Touch?Ve[e]===Ve.MouseDown?c="TouchStart":Ve[e]===Ve.MouseUp&&(c="TouchEnd"):Ye.Pen}else Re(r)&&(l=Ye.Touch);null!==l?(u=l,(c.startsWith("Touch")&&l===Ye.Touch||c.startsWith("Mouse")&&l===Ye.Mouse)&&(l=null)):Ve[e]===Ve.Click&&(l=u,u=null);var d=Re(r)?r.changedTouches[0]:r;if(d){var p=o.getId(s),{clientX:h,clientY:f}=d;rt(n)(t({type:Ve[c],id:p,x:h,y:f},null!==l&&{pointerType:l}))}}})(e);if(window.PointerEvent)switch(Ve[e]){case Ve.MouseDown:case Ve.MouseUp:s=s.replace("mouse","pointer");break;case Ve.TouchStart:case Ve.TouchEnd:return}c.push(be(s,l,r))})),rt((()=>{c.forEach((e=>e()))}))}function lt(e){var{scrollCb:t,doc:n,mirror:r,blockClass:o,blockSelector:i,sampling:a}=e;return be("scroll",rt(Se(rt((e=>{var a=it(e);if(a&&!Ee(a,o,i,!0)){var s=r.getId(a);if(a===n&&n.defaultView){var l=Te(n.defaultView);t({id:s,x:l.left,y:l.top})}else t({id:s,x:a.scrollLeft,y:a.scrollTop})}})),a.scroll||100)),n)}var ct=["INPUT","TEXTAREA","SELECT"],ut=new WeakMap;function dt(e){return function(e,t){if(mt("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||mt("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||mt("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||mt("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 pt(e,t,n){var r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function ht(e,t){var n,r,o,{mirror:i,stylesheetManager:a}=e,s=null;s="#document"===t.nodeName?i.getId(t):i.getId(ye.host(t));var l="#document"===t.nodeName?null==(n=t.defaultView)?void 0:n.Document:null==(o=null==(r=t.ownerDocument)?void 0:r.defaultView)?void 0:o.ShadowRoot,c=(null==l?void 0:l.prototype)?Object.getOwnPropertyDescriptor(null==l?void 0:l.prototype,"adoptedStyleSheets"):void 0;return null!==s&&-1!==s&&l&&c?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get(){var e;return null==(e=c.get)?void 0:e.call(this)},set(e){var t,n=null==(t=c.set)?void 0:t.call(this,e);if(null!==s&&-1!==s)try{a.adoptStyleSheets(e,s)}catch(e){}return n}}),rt((()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}))):()=>{}}function ft(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=e.doc.defaultView;if(!o)return()=>{};!function(e,t){var{mutationCb:n,mousemoveCb:r,mouseInteractionCb:o,scrollCb:i,viewportResizeCb:a,inputCb:s,mediaInteractionCb:l,styleSheetRuleCb:c,styleDeclarationCb:u,canvasMutationCb:d,fontCb:p,selectionCb:h,customElementCb:f}=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),o(...arguments)},e.scrollCb=function(){t.scroll&&t.scroll(...arguments),i(...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),l(...arguments)},e.styleSheetRuleCb=function(){t.styleSheetRule&&t.styleSheetRule(...arguments),c(...arguments)},e.styleDeclarationCb=function(){t.styleDeclaration&&t.styleDeclaration(...arguments),u(...arguments)},e.canvasMutationCb=function(){t.canvasMutation&&t.canvasMutation(...arguments),d(...arguments)},e.fontCb=function(){t.font&&t.font(...arguments),p(...arguments)},e.selectionCb=function(){t.selection&&t.selection(...arguments),h(...arguments)},e.customElementCb=function(){t.customElement&&t.customElement(...arguments),f(...arguments)}}(e,r),e.recordDOM&&(n=at(e,e.doc));var i=function(e){var{mousemoveCb:t,sampling:n,doc:r,mirror:o}=e;if(!1===n.mousemove)return()=>{};var i,a="number"==typeof n.mousemove?n.mousemove:50,s="number"==typeof n.mousemoveCallback?n.mousemoveCallback:500,l=[],c=Se(rt((e=>{var n=Date.now()-i;t(l.map((e=>(e.timeOffset-=n,e))),e),l=[],i=null})),s),u=rt(Se(rt((e=>{var t=it(e),{clientX:n,clientY:r}=Re(e)?e.changedTouches[0]:e;i||(i=ke()),l.push({x:n,y:r,id:o.getId(t),timeOffset:ke()-i}),c("undefined"!=typeof DragEvent&&e instanceof DragEvent?We.Drag:e instanceof MouseEvent?We.MouseMove:We.TouchMove)})),a,{trailing:!1})),d=[be("mousemove",u,r),be("touchmove",u,r),be("drag",u,r)];return rt((()=>{d.forEach((e=>e()))}))}(e),a=st(e),s=lt(e),l=function(e,t){var{viewportResizeCb:n}=e,{win:r}=t,o=-1,i=-1;return be("resize",rt(Se(rt((()=>{var e=xe(),t=Me();o===e&&i===t||(n({width:Number(t),height:Number(e)}),o=e,i=t)})),200)),r)}(e,{win:o}),c=function(e){var{inputCb:n,doc:r,mirror:o,blockClass:i,blockSelector:a,ignoreClass:s,ignoreSelector:l,maskInputOptions:c,maskInputFn:u,sampling:d,userTriggeredOnInput:p}=e;function h(e){var t=it(e),n=e.isTrusted,o=t&&t.tagName;if(t&&"OPTION"===o&&(t=ye.parentElement(t)),t&&o&&!(ct.indexOf(o)<0)&&!Ee(t,i,a,!0)&&!(t.classList.contains(s)||l&&t.matches(l))){var d=t.value,h=!1,m=O(t)||"";"radio"===m||"checkbox"===m?h=t.checked:(c[o.toLowerCase()]||c[m])&&(d=N({element:t,maskInputOptions:c,tagName:o,type:m,value:d,maskInputFn:u})),f(t,p?{text:d,isChecked:h,userTriggered:n}:{text:d,isChecked:h});var v=t.name;"radio"===m&&v&&h&&r.querySelectorAll('input[type="radio"][name="'.concat(v,'"]')).forEach((e=>{if(e!==t){var n=e.value;f(e,p?{text:n,isChecked:!h,userTriggered:!1}:{text:n,isChecked:!h})}}))}}function f(e,r){var i=ut.get(e);if(!i||i.text!==r.text||i.isChecked!==r.isChecked){ut.set(e,r);var a=o.getId(e);rt(n)(t(t({},r),{},{id:a}))}}var m=("last"===d.input?["change"]:["input","change"]).map((e=>be(e,rt(h),r))),v=r.defaultView;if(!v)return()=>{m.forEach((e=>e()))};var g=v.Object.getOwnPropertyDescriptor(v.HTMLInputElement.prototype,"value"),y=[[v.HTMLInputElement.prototype,"value"],[v.HTMLInputElement.prototype,"checked"],[v.HTMLSelectElement.prototype,"value"],[v.HTMLTextAreaElement.prototype,"value"],[v.HTMLSelectElement.prototype,"selectedIndex"],[v.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&m.push(...y.map((e=>Ie(e[0],e[1],{set(){rt(h)({target:this,isTrusted:!1})}},!1,v)))),rt((()=>{m.forEach((e=>e()))}))}(e),u=function(e){var{mediaInteractionCb:t,blockClass:n,blockSelector:r,mirror:o,sampling:i,doc:a}=e,s=rt((e=>Se(rt((i=>{var a=it(i);if(a&&!Ee(a,n,r,!0)){var{currentTime:s,volume:l,muted:c,playbackRate:u,loop:d}=a;t({type:e,id:o.getId(a),currentTime:s,volume:l,muted:c,playbackRate:u,loop:d})}})),i.media||500))),l=[be("play",s(Ge.Play),a),be("pause",s(Ge.Pause),a),be("seeked",s(Ge.Seeked),a),be("volumechange",s(Ge.VolumeChange),a),be("ratechange",s(Ge.RateChange),a)];return rt((()=>{l.forEach((e=>e()))}))}(e),d=()=>{},p=()=>{},h=()=>{},f=()=>{};e.recordDOM&&(d=function(e,t){var{styleSheetRuleCb:n,mirror:r,stylesheetManager:o}=e,{win:i}=t;if(!i.CSSStyleSheet||!i.CSSStyleSheet.prototype)return()=>{};var a=i.CSSStyleSheet.prototype.insertRule;i.CSSStyleSheet.prototype.insertRule=new Proxy(a,{apply:rt(((e,t,i)=>{var[a,s]=i,{id:l,styleId:c}=pt(t,r,o.styleMirror);return(l&&-1!==l||c&&-1!==c)&&n({id:l,styleId:c,adds:[{rule:a,index:s}]}),e.apply(t,i)}))}),i.CSSStyleSheet.prototype.addRule=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.cssRules.length,r="".concat(e," { ").concat(t," }");return i.CSSStyleSheet.prototype.insertRule.apply(this,[r,n])};var s,l,c=i.CSSStyleSheet.prototype.deleteRule;i.CSSStyleSheet.prototype.deleteRule=new Proxy(c,{apply:rt(((e,t,i)=>{var[a]=i,{id:s,styleId:l}=pt(t,r,o.styleMirror);return(s&&-1!==s||l&&-1!==l)&&n({id:s,styleId:l,removes:[{index:a}]}),e.apply(t,i)}))}),i.CSSStyleSheet.prototype.removeRule=function(e){return i.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},i.CSSStyleSheet.prototype.replace&&(s=i.CSSStyleSheet.prototype.replace,i.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:rt(((e,t,i)=>{var[a]=i,{id:s,styleId:l}=pt(t,r,o.styleMirror);return(s&&-1!==s||l&&-1!==l)&&n({id:s,styleId:l,replace:a}),e.apply(t,i)}))})),i.CSSStyleSheet.prototype.replaceSync&&(l=i.CSSStyleSheet.prototype.replaceSync,i.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:rt(((e,t,i)=>{var[a]=i,{id:s,styleId:l}=pt(t,r,o.styleMirror);return(s&&-1!==s||l&&-1!==l)&&n({id:s,styleId:l,replaceSync:a}),e.apply(t,i)}))}));var u={};vt("CSSGroupingRule")?u.CSSGroupingRule=i.CSSGroupingRule:(vt("CSSMediaRule")&&(u.CSSMediaRule=i.CSSMediaRule),vt("CSSConditionRule")&&(u.CSSConditionRule=i.CSSConditionRule),vt("CSSSupportsRule")&&(u.CSSSupportsRule=i.CSSSupportsRule));var d={};return Object.entries(u).forEach((e=>{var[t,i]=e;d[t]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=new Proxy(d[t].insertRule,{apply:rt(((e,t,i)=>{var[a,s]=i,{id:l,styleId:c}=pt(t.parentStyleSheet,r,o.styleMirror);return(l&&-1!==l||c&&-1!==c)&&n({id:l,styleId:c,adds:[{rule:a,index:[...dt(t),s||0]}]}),e.apply(t,i)}))}),i.prototype.deleteRule=new Proxy(d[t].deleteRule,{apply:rt(((e,t,i)=>{var[a]=i,{id:s,styleId:l}=pt(t.parentStyleSheet,r,o.styleMirror);return(s&&-1!==s||l&&-1!==l)&&n({id:s,styleId:l,removes:[{index:[...dt(t),a]}]}),e.apply(t,i)}))})})),rt((()=>{i.CSSStyleSheet.prototype.insertRule=a,i.CSSStyleSheet.prototype.deleteRule=c,s&&(i.CSSStyleSheet.prototype.replace=s),l&&(i.CSSStyleSheet.prototype.replaceSync=l),Object.entries(u).forEach((e=>{var[t,n]=e;n.prototype.insertRule=d[t].insertRule,n.prototype.deleteRule=d[t].deleteRule}))}))}(e,{win:o}),p=ht(e,e.doc),h=function(e,t){var{styleDeclarationCb:n,mirror:r,ignoreCSSAttributes:o,stylesheetManager:i}=e,{win:a}=t,s=a.CSSStyleDeclaration.prototype.setProperty;a.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:rt(((e,t,a)=>{var l,[c,u,d]=a;if(o.has(c))return s.apply(t,[c,u,d]);var{id:p,styleId:h}=pt(null==(l=t.parentRule)?void 0:l.parentStyleSheet,r,i.styleMirror);return(p&&-1!==p||h&&-1!==h)&&n({id:p,styleId:h,set:{property:c,value:u,priority:d},index:dt(t.parentRule)}),e.apply(t,a)}))});var l=a.CSSStyleDeclaration.prototype.removeProperty;return a.CSSStyleDeclaration.prototype.removeProperty=new Proxy(l,{apply:rt(((e,t,a)=>{var s,[c]=a;if(o.has(c))return l.apply(t,[c]);var{id:u,styleId:d}=pt(null==(s=t.parentRule)?void 0:s.parentStyleSheet,r,i.styleMirror);return(u&&-1!==u||d&&-1!==d)&&n({id:u,styleId:d,remove:{property:c},index:dt(t.parentRule)}),e.apply(t,a)}))}),rt((()=>{a.CSSStyleDeclaration.prototype.setProperty=s,a.CSSStyleDeclaration.prototype.removeProperty=l}))}(e,{win:o}),e.collectFonts&&(f=function(e){var{fontCb:t,doc:n}=e,r=n.defaultView;if(!r)return()=>{};var o=[],i=new WeakMap,a=r.FontFace;r.FontFace=function(e,t,n){var r=new a(e,t,n);return i.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=we(n.fonts,"add",(function(e){return function(n){return setTimeout(rt((()=>{var e=i.get(n);e&&(t(e),i.delete(n))})),0),e.apply(this,[n])}}));return o.push((()=>{r.FontFace=a})),o.push(s),rt((()=>{o.forEach((e=>e()))}))}(e)));var m=function(e){var{doc:t,mirror:n,blockClass:r,blockSelector:o,selectionCb:i}=e,a=!0,s=rt((()=>{var e=t.getSelection();if(!(!e||a&&(null==e?void 0:e.isCollapsed))){a=e.isCollapsed||!1;for(var s=[],l=e.rangeCount||0,c=0;c<l;c++){var u=e.getRangeAt(c),{startContainer:d,startOffset:p,endContainer:h,endOffset:f}=u;Ee(d,r,o,!0)||Ee(h,r,o,!0)||s.push({start:n.getId(d),startOffset:p,end:n.getId(h),endOffset:f})}i({ranges:s})}}));return s(),be("selectionchange",s)}(e),v=function(e){var{doc:t,customElementCb:n}=e,r=t.defaultView;return r&&r.customElements?we(r.customElements,"define",(function(e){return function(t,r,o){try{n({define:{name:t}})}catch(e){console.warn("Custom element callback failed for ".concat(t))}return e.apply(this,[t,r,o])}})):()=>{}}(e),g=[];for(var y of e.plugins)g.push(y.observer(y.callback,o,y.options));return rt((()=>{ot.forEach((e=>e.reset())),null==n||n.disconnect(),i(),a(),s(),l(),c(),u(),d(),p(),h(),f(),m(),v(),g.forEach((e=>e()))}))}function mt(e){return void 0!==window[e]}function vt(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class gt{constructor(e){c(this,"iframeIdToRemoteIdMap",new WeakMap),c(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,n,r){var o=n||this.getIdToRemoteIdMap(e),i=r||this.getRemoteIdToIdMap(e),a=o.get(t);return a||(a=this.generateIdFn(),o.set(t,a),i.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 o=r.get(t);return o||-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 yt{constructor(e){c(this,"iframes",new WeakMap),c(this,"crossOriginIframeMap",new WeakMap),c(this,"crossOriginIframeMirror",new gt(U)),c(this,"crossOriginIframeStyleMirror"),c(this,"crossOriginIframeRootIdMap",new WeakMap),c(this,"mirror"),c(this,"mutationCb"),c(this,"wrappedEmit"),c(this,"loadListener"),c(this,"stylesheetManager"),c(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new gt(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 qe.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:qe.IncrementalSnapshot,data:{source:We.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case qe.Meta:case qe.Load:case qe.DomContentLoaded:return!1;case qe.Plugin:return t;case qe.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case qe.IncrementalSnapshot:switch(t.data.source){case We.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 We.Drag:case We.TouchMove:case We.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case We.ViewportResize:return!1;case We.MediaInteraction:case We.MouseInteraction:case We.Scroll:case We.CanvasMutation:case We.Input:return this.replaceIds(t.data,e,["id"]),t;case We.StyleSheetRule:case We.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case We.Font:return t;case We.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case We.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 o of r)(Array.isArray(t[o])||"number"==typeof t[o])&&(Array.isArray(t[o])?t[o]=e.getIds(n,t[o]):t[o]=e.getId(n,t[o]));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===ze.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,t)}))}}class bt{constructor(e){c(this,"shadowDoms",new WeakSet),c(this,"mutationCb"),c(this,"scrollCb"),c(this,"bypassOptions"),c(this,"mirror"),c(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,n){if(w(e)&&!this.shadowDoms.has(e)){this.shadowDoms.add(e);var r=at(t(t({},this.bypassOptions),{},{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push((()=>r.disconnect())),this.restoreHandlers.push(lt(t(t({},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(ye.host(e))),this.restoreHandlers.push(ht({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(we(e.prototype,"attachShadow",(function(e){return function(r){var o=e.call(this,r),i=ye.shadowRoot(this);return i&&Ze(this)&&n.addShadowRoot(i,t),o}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch(e){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var _t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ct="undefined"==typeof Uint8Array?[]:new Uint8Array(256),St=0;St<64;St++)Ct[_t.charCodeAt(St)]=St;var It=new Map;var wt=(e,t,n)=>{if(e&&(xt(e,t)||"object"==typeof e)){var r=function(e,t){var n=It.get(e);return n||(n=new Map,It.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name),o=r.indexOf(e);return-1===o&&(o=r.length,r.push(e)),o}};function kt(e,t,n){if(e instanceof Array)return e.map((e=>kt(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,o="";for(t=0;t<r;t+=3)o+=_t[n[t]>>2],o+=_t[(3&n[t])<<4|n[t+1]>>4],o+=_t[(15&n[t+1])<<2|n[t+2]>>6],o+=_t[63&n[t+2]];return r%3==2?o=o.substring(0,o.length-1)+"=":r%3==1&&(o=o.substring(0,o.length-2)+"=="),o}(e)};if(e instanceof DataView)return{rr_type:e.constructor.name,args:[kt(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){var r=e.constructor.name,{src:o}=e;return{rr_type:r,src:o}}if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}return e instanceof ImageData?{rr_type:e.constructor.name,args:[kt(e.data,t,n),e.width,e.height]}:xt(e,t)||"object"==typeof e?{rr_type:e.constructor.name,index:wt(e,t,n)}:e}var Tt=(e,t,n)=>e.map((e=>kt(e,t,n))),xt=(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 Mt(e,t,n,r){var o=[];try{var i=we(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(o){for(var i=arguments.length,a=new Array(i>1?i-1:0),s=1;s<i;s++)a[s-1]=arguments[s];if(!Ee(this,t,n,!0)){var l=function(e){return"experimental-webgl"===e?"webgl":e}(o);if("__context"in this||(this.__context=l),r&&["webgl","webgl2"].includes(l))if(a[0]&&"object"==typeof a[0]){var c=a[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[o,...a])}}));o.push(i)}catch(e){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{o.forEach((e=>e()))}}function Nt(e,t,n,r,o,i){var a=[],s=Object.getOwnPropertyNames(e),l=function(s){if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(s))return"continue";try{if("function"!=typeof e[s])return"continue";var l=we(e,s,(function(e){return function(){for(var a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];var u=e.apply(this,l);if(wt(u,i,this),"tagName"in this.canvas&&!Ee(this.canvas,r,o,!0)){var d=Tt(l,i,this),p={type:t,property:s,args:d};n(this.canvas,p)}return u}}));a.push(l)}catch(r){var c=Ie(e,s,{set(e){n(this.canvas,{type:t,property:s,args:[e],setter:!0})}});a.push(c)}};for(var c of s)l(c);return a}var Et,At,Ot,Rt,Lt="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Dt="undefined"!=typeof window&&window.Blob&&new Blob([(Et=Lt,Uint8Array.from(atob(Et),(e=>e.charCodeAt(0))))],{type:"text/javascript;charset=utf-8"});function Ft(e){var t;try{if(!(t=Dt&&(window.URL||window.webkitURL).createObjectURL(Dt)))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,"+Lt,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class Pt{constructor(e){c(this,"pendingCanvasMutations",new Map),c(this,"rafStamps",{latestId:0,invokeId:null}),c(this,"mirror"),c(this,"mutationCb"),c(this,"resetObservers"),c(this,"frozen",!1),c(this,"locked",!1),c(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:o,recordCanvas:i,dataURLOptions:a}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,i&&"all"===t&&this.initCanvasMutationObserver(n,r,o),i&&"number"==typeof t&&this.initCanvasFPSObserver(t,n,r,o,{dataURLOptions:a})}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,t,n,o,i){var a=this,s=Mt(t,n,o,!0),l=new Map,c=new Ft;c.onmessage=e=>{var{id:t}=e.data;if(l.set(t,!1),"base64"in e.data){var{base64:n,type:r,width:o,height:i}=e.data;this.mutationCb({id:t,type:je["2D"],commands:[{property:"clearRect",args:[0,0,o,i]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:n}],type:r}]},0,0]}]})}};var u,d=1e3/e,p=0,h=e=>{var s,f;p&&e-p<d?u=requestAnimationFrame(h):(p=e,(s=[],f=e=>{e.querySelectorAll("canvas").forEach((e=>{Ee(e,n,o,!0)||s.push(e)})),e.querySelectorAll("*").forEach((e=>{e.shadowRoot&&f(e.shadowRoot)}))},f(t.document),s).forEach(function(){var e=r((function*(e){var t,n=a.mirror.getId(e);if(!l.get(n)&&0!==e.width&&0!==e.height){if(l.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 o=e.clientWidth||e.width,s=e.clientHeight||e.height,u=yield createImageBitmap(e,{resizeWidth:o,resizeHeight:s});c.postMessage({id:n,bitmap:u,width:o,height:s,dataURLOptions:i.dataURLOptions},[u])}}));return function(t){return e.apply(this,arguments)}}()),u=requestAnimationFrame(h))};u=requestAnimationFrame(h),this.resetObservers=()=>{s(),cancelAnimationFrame(u)}}initCanvasMutationObserver(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var r=Mt(e,t,n,!1),o=function(e,t,n,r){var o=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype),a=function(i){try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[i])return"continue";var a=we(t.CanvasRenderingContext2D.prototype,i,(function(o){return function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return Ee(this.canvas,n,r,!0)||setTimeout((()=>{var n=Tt(s,t,this);e(this.canvas,{type:je["2D"],property:i,args:n})}),0),o.apply(this,s)}}));o.push(a)}catch(n){var s=Ie(t.CanvasRenderingContext2D.prototype,i,{set(t){e(this.canvas,{type:je["2D"],property:i,args:[t],setter:!0})}});o.push(s)}};for(var s of i)a(s);return()=>{o.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,n),i=function(e,t,n,r){var o=[];return o.push(...Nt(t.WebGLRenderingContext.prototype,je.WebGL,e,n,r,t)),void 0!==t.WebGL2RenderingContext&&o.push(...Nt(t.WebGL2RenderingContext.prototype,je.WebGL2,e,n,r,t)),()=>{o.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,n);this.resetObservers=()=>{r(),o(),i()}}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=>i(e,s))),{type:o}=n[0];this.mutationCb({id:t,type:o,commands:r}),this.pendingCanvasMutations.delete(e)}}}}class Bt{constructor(e){c(this,"trackedLinkElements",new WeakSet),c(this,"mutationCb"),c(this,"adoptedStyleSheetCb"),c(this,"styleMirror",new Pe),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:[]},o=[],i=function(e){var t=void 0;n.styleMirror.has(e)?t=n.styleMirror.getId(e):(t=n.styleMirror.add(e),o.push({styleId:t,rules:Array.from(e.rules||CSSRule,((t,n)=>({rule:T(t,e.href),index:n})))})),r.styleIds.push(t)};for(var a of e)i(a);o.length>0&&(r.styles=o),this.adoptedStyleSheetCb(r)}}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Ht{constructor(){c(this,"nodeMap",new WeakMap),c(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 Zt=!1;try{if(2!==Array.from([1],(e=>2*e))[0]){var qt=document.createElement("iframe");document.body.appendChild(qt),Array.from=(null==(a=qt.contentWindow)?void 0:a.Array.from)||Array.from,document.body.removeChild(qt)}}catch(e){console.debug("Unable to override Array.from",e)}var Wt,Vt,Yt=new M;function jt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{emit:n,checkoutEveryNms:r,checkoutEveryNth:o,blockClass:i="rr-block",blockSelector:a=null,ignoreClass:s="rr-ignore",ignoreSelector:l=null,maskTextClass:c="rr-mask",maskTextSelector:u=null,inlineStylesheet:d=!0,maskAllInputs:p,maskInputOptions:h,slimDOMOptions:f,maskInputFn:m,maskTextFn:v,hooks:g,packFn:y,sampling:b={},dataURLOptions:_={},mousemoveWait:C,recordDOM:S=!0,recordCanvas:I=!1,recordCrossOriginIframes:w=!1,recordAfter:k=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:T=!1,collectFonts:x=!1,inlineImages:N=!1,plugins:E,keepIframeSrcFn:A=(()=>!1),ignoreCSSAttributes:O=new Set([]),errorHandler:R}=e;Ke=R;var L=!w||window.parent===window,D=!1;if(!L)try{window.parent.document&&(D=!1)}catch(e){D=!0}if(L&&!n)throw new Error("emit function is required");if(!L&&!D)return()=>{};void 0!==C&&void 0===b.mousemove&&(b.mousemove=C),Yt.reset();var F,P=!0===p?{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},B=!0===f||"all"===f?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===f,headMetaDescKeywords:"all"===f,headTitleMutations:"all"===f}:f||{};!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]: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 H=0,Z=e=>{for(var t of E||[])t.eventProcessor&&(e=t.eventProcessor(e));return y&&!D&&(e=y(e)),e};At=(e,t)=>{var i,a=e;if(a.timestamp=ke(),!(null==(i=ot[0])?void 0:i.isFrozen())||a.type===qe.FullSnapshot||a.type===qe.IncrementalSnapshot&&a.data.source===We.Mutation||ot.forEach((e=>e.unfreeze())),L)null==n||n(Z(a),t);else if(D){var s={type:"rrweb",event:Z(a),origin:window.location.origin,isCheckout:t};window.parent.postMessage(s,"*")}if(a.type===qe.FullSnapshot)F=a,H=0;else if(a.type===qe.IncrementalSnapshot){if(a.data.source===We.Mutation&&a.data.isAttachIframe)return;H++;var l=o&&H>=o,c=r&&a.timestamp-F.timestamp>r;(l||c)&&Ot(!0)}};var q=e=>{At({type:qe.IncrementalSnapshot,data:t({source:We.Mutation},e)})},W=e=>At({type:qe.IncrementalSnapshot,data:t({source:We.Scroll},e)}),V=e=>At({type:qe.IncrementalSnapshot,data:t({source:We.CanvasMutation},e)}),Y=new Bt({mutationCb:q,adoptedStyleSheetCb:e=>At({type:qe.IncrementalSnapshot,data:t({source:We.AdoptedStyleSheet},e)})}),j=new yt({mirror:Yt,mutationCb:q,stylesheetManager:Y,recordCrossOriginIframes:w,wrappedEmit:At});for(var G of E||[])G.getMirror&&G.getMirror({nodeMirror:Yt,crossOriginIframeMirror:j.crossOriginIframeMirror,crossOriginIframeStyleMirror:j.crossOriginIframeStyleMirror});var z=new Ht;Rt=new Pt({recordCanvas:I,mutationCb:V,win:window,blockClass:i,blockSelector:a,mirror:Yt,sampling:b.canvas,dataURLOptions:_});var U=new bt({mutationCb:q,scrollCb:W,bypassOptions:{blockClass:i,blockSelector:a,maskTextClass:c,maskTextSelector:u,inlineStylesheet:d,maskInputOptions:P,dataURLOptions:_,maskTextFn:v,maskInputFn:m,recordCanvas:I,inlineImages:N,sampling:b,slimDOMOptions:B,iframeManager:j,stylesheetManager:Y,canvasManager:Rt,keepIframeSrcFn:A,processedNodeManager:z},mirror:Yt});Ot=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(S){At({type:qe.Meta,data:{href:window.location.href,width:Me(),height:xe()}},e),Y.reset(),U.init(),ot.forEach((e=>e.lock()));var t=function(e,t){var{mirror:n=new M,blockClass:r="rr-block",blockSelector:o=null,maskTextClass:i="rr-mask",maskTextSelector:a=null,inlineStylesheet:s=!0,inlineImages:l=!1,recordCanvas:c=!1,maskAllInputs:u=!1,maskTextFn:d,maskInputFn:p,slimDOM:h=!1,dataURLOptions:f,preserveWhiteSpace:m,onSerialize:v,onIframeLoad:g,iframeLoadTimeout:y,onStylesheetLoad:b,stylesheetLoadTimeout:_,keepIframeSrcFn:C=(()=>!1)}=t||{};return se(e,{doc:e,mirror:n,blockClass:r,blockSelector:o,maskTextClass:i,maskTextSelector:a,skipChild:!1,inlineStylesheet:s,maskInputOptions:!0===u?{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===u?{password:!0}:u,maskTextFn:d,maskInputFn:p,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:f,inlineImages:l,recordCanvas:c,preserveWhiteSpace:m,onSerialize:v,onIframeLoad:g,iframeLoadTimeout:y,onStylesheetLoad:b,stylesheetLoadTimeout:_,keepIframeSrcFn:C,newlyAddedElement:!1})}(document,{mirror:Yt,blockClass:i,blockSelector:a,maskTextClass:c,maskTextSelector:u,inlineStylesheet:d,maskAllInputs:P,maskTextFn:v,maskInputFn:m,slimDOM:B,dataURLOptions:_,recordCanvas:I,inlineImages:N,onSerialize:e=>{Le(e,Yt)&&j.addIframe(e),De(e,Yt)&&Y.trackLinkElement(e),Fe(e)&&U.addShadowRoot(ye.shadowRoot(e),document)},onIframeLoad:(e,t)=>{j.attachIframe(e,t),U.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{Y.attachLinkElement(e,t)},keepIframeSrcFn:A});if(!t)return console.warn("Failed to snapshot the document");At({type:qe.FullSnapshot,data:{node:t,initialOffset:Te(window)}},e),ot.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Y.adoptStyleSheets(document.adoptedStyleSheets,Yt.getId(document))}};try{var X=[],K=e=>{var n;return rt(ft)({mutationCb:q,mousemoveCb:(e,t)=>At({type:qe.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>At({type:qe.IncrementalSnapshot,data:t({source:We.MouseInteraction},e)}),scrollCb:W,viewportResizeCb:e=>At({type:qe.IncrementalSnapshot,data:t({source:We.ViewportResize},e)}),inputCb:e=>At({type:qe.IncrementalSnapshot,data:t({source:We.Input},e)}),mediaInteractionCb:e=>At({type:qe.IncrementalSnapshot,data:t({source:We.MediaInteraction},e)}),styleSheetRuleCb:e=>At({type:qe.IncrementalSnapshot,data:t({source:We.StyleSheetRule},e)}),styleDeclarationCb:e=>At({type:qe.IncrementalSnapshot,data:t({source:We.StyleDeclaration},e)}),canvasMutationCb:V,fontCb:e=>At({type:qe.IncrementalSnapshot,data:t({source:We.Font},e)}),selectionCb:e=>{At({type:qe.IncrementalSnapshot,data:t({source:We.Selection},e)})},customElementCb:e=>{At({type:qe.IncrementalSnapshot,data:t({source:We.CustomElement},e)})},blockClass:i,ignoreClass:s,ignoreSelector:l,maskTextClass:c,maskTextSelector:u,maskInputOptions:P,inlineStylesheet:d,sampling:b,recordDOM:S,recordCanvas:I,inlineImages:N,userTriggeredOnInput:T,collectFonts:x,doc:e,maskInputFn:m,maskTextFn:v,keepIframeSrcFn:A,blockSelector:a,slimDOMOptions:B,dataURLOptions:_,mirror:Yt,iframeManager:j,stylesheetManager:Y,shadowDomManager:U,processedNodeManager:z,canvasManager:Rt,ignoreCSSAttributes:O,plugins:(null==(n=null==E?void 0:E.filter((e=>e.observer)))?void 0:n.map((e=>({observer:e.observer,options:e.options,callback:t=>At({type:qe.Plugin,data:{plugin:e.name,payload:t}})}))))||[]},g)};j.addLoadListener((e=>{try{X.push(K(e.contentDocument))}catch(e){console.warn(e)}}));var J=()=>{Ot(),X.push(K(document)),Zt=!0};return"interactive"===document.readyState||"complete"===document.readyState?J():(X.push(be("DOMContentLoaded",(()=>{At({type:qe.DomContentLoaded,data:{}}),"DOMContentLoaded"===k&&J()}))),X.push(be("load",(()=>{At({type:qe.Load,data:{}}),"load"===k&&J()}),window))),()=>{X.forEach((e=>e())),z.destroy(),Zt=!1,Ke=void 0}}catch(e){console.warn(e)}}jt.addCustomEvent=(e,t)=>{if(!Zt)throw new Error("please add custom event after start recording");At({type:qe.Custom,data:{tag:e,payload:t}})},jt.freezePage=()=>{ot.forEach((e=>e.freeze()))},jt.takeFullSnapshot=e=>{if(!Zt)throw new Error("please take full snapshot after start recording");Ot(e)},jt.mirror=Yt,(Vt=Wt||(Wt={}))[Vt.NotStarted=0]="NotStarted",Vt[Vt.Running=1]="Running",Vt[Vt.Stopped=2]="Stopped";var Gt,zt=Object.defineProperty,Ut=(e,t,n)=>((e,t,n)=>t in e?zt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),Xt=Object.defineProperty,Kt=(e,t,n)=>((e,t,n)=>t in e?Xt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),Jt=Object.defineProperty,Qt=(e,t,n)=>((e,t,n)=>t in e?Jt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),$t={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},en={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},tn={},nn=()=>!!globalThis.Zone;function rn(e){if(tn[e])return tn[e];var t=globalThis[e],n=t.prototype,r=e in $t?$t[e]:void 0,o=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]"))}))),i=e in en?en[e]:void 0,a=Boolean(i&&i.every((e=>{var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))})));if(o&&a&&!nn())return tn[e]=t.prototype,t.prototype;try{var s=document.createElement("iframe");document.body.appendChild(s);var l=s.contentWindow;if(!l)return t.prototype;var c=l[e].prototype;return document.body.removeChild(s),c?tn[e]=c:n}catch(e){return n}}var on={};function an(e,t,n){var r,o="".concat(e,".").concat(String(n));if(on[o])return on[o].call(t);var i=rn(e),a=null==(r=Object.getOwnPropertyDescriptor(i,n))?void 0:r.get;return a?(on[o]=a,a.call(t)):t[n]}var sn={};function ln(e,t,n){var r="".concat(e,".").concat(String(n));if(sn[r])return sn[r].bind(t);var o=rn(e)[n];return"function"!=typeof o?t[n]:(sn[r]=o,o.bind(t))}var cn={childNodes:function(e){return an("Node",e,"childNodes")},parentNode:function(e){return an("Node",e,"parentNode")},parentElement:function(e){return an("Node",e,"parentElement")},textContent:function(e){return an("Node",e,"textContent")},contains:function(e,t){return ln("Node",e,"contains")(t)},getRootNode:function(e){return ln("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?an("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?an("Element",e,"shadowRoot"):null},querySelector:function(e,t){return an("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return an("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return rn("MutationObserver").constructor}};class un{constructor(){Qt(this,"idNodeMap",new Map),Qt(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 dn(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&dn(cn.parentNode(e),t,n);for(var r=e.classList.length;r--;){var o=e.classList[r];if(t.test(o))return!0}return!!n&&dn(cn.parentNode(e),t,n)}class pn{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 pn))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 hn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},fn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},mn={},vn=()=>!!globalThis.Zone;function gn(e){if(mn[e])return mn[e];var t=globalThis[e],n=t.prototype,r=e in hn?hn[e]:void 0,o=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]"))}))),i=e in fn?fn[e]:void 0,a=Boolean(i&&i.every((e=>{var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))})));if(o&&a&&!vn())return mn[e]=t.prototype,t.prototype;try{var s=document.createElement("iframe");document.body.appendChild(s);var l=s.contentWindow;if(!l)return t.prototype;var c=l[e].prototype;return document.body.removeChild(s),c?mn[e]=c:n}catch(e){return n}}var yn={};function bn(e,t,n){var r,o="".concat(e,".").concat(String(n));if(yn[o])return yn[o].call(t);var i=gn(e),a=null==(r=Object.getOwnPropertyDescriptor(i,n))?void 0:r.get;return a?(yn[o]=a,a.call(t)):t[n]}var _n={};function Cn(e,t,n){var r="".concat(e,".").concat(String(n));if(_n[r])return _n[r].bind(t);var o=gn(e)[n];return"function"!=typeof o?t[n]:(_n[r]=o,o.bind(t))}var Sn={childNodes:function(e){return bn("Node",e,"childNodes")},parentNode:function(e){return bn("Node",e,"parentNode")},parentElement:function(e){return bn("Node",e,"parentElement")},textContent:function(e){return bn("Node",e,"textContent")},contains:function(e,t){return Cn("Node",e,"contains")(t)},getRootNode:function(e){return Cn("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?bn("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?bn("Element",e,"shadowRoot"):null},querySelector:function(e,t){return bn("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return bn("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return gn("MutationObserver").constructor}};var In="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.",wn={map:{},getId:()=>(console.error(In),-1),getNode:()=>(console.error(In),null),removeNodeFromMap(){console.error(In)},has:()=>(console.error(In),!1),reset(){console.error(In)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(wn=new Proxy(wn,{get:(e,t,n)=>("map"===t&&console.error(In),Reflect.get(e,t,n))}));var kn=Date.now;function Tn(e){return e?e.nodeType===e.ELEMENT_NODE?e:Sn.parentElement(e):null}/[1-9][0-9]{12}/.test(Date.now().toString())||(kn=()=>(new Date).getTime());function xn(e){var t,n=null;return"getRootNode"in e&&(null==(t=Sn.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Sn.host(Sn.getRootNode(e))&&(n=Sn.host(Sn.getRootNode(e))),n}function Mn(e){for(var t,n=e;t=xn(n);)n=t;return n}function Nn(e){var t=e.ownerDocument;if(!t)return!1;var n=Mn(e);return Sn.contains(t,n)}for(var En=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:class{constructor(){Kt(this,"id",1),Kt(this,"styleIDMap",new WeakMap),Kt(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 wn},closestElementOfNode:Tn,getBaseDimension:function e(t,n){var r,o,i=null==(o=null==(r=t.ownerDocument)?void 0:r.defaultView)?void 0:o.frameElement;if(!i||i===n)return{x:0,y:0,relativeScale:1,absoluteScale:1};var a=i.getBoundingClientRect(),s=e(i,n),l=a.height/i.clientHeight;return{x:a.x*s.relativeScale+s.x,y:a.y*s.relativeScale+s.y,relativeScale:l,absoluteScale:s.absoluteScale*l}},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:Mn,getShadowHost:xn,getWindowHeight:function(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight},getWindowScroll:function(e){var t,n,r,o,i=e.document;return{left:i.scrollingElement?i.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:i.documentElement.scrollLeft||(null==i?void 0:i.body)&&(null==(t=Sn.parentElement(i.body))?void 0:t.scrollLeft)||(null==(n=null==i?void 0:i.body)?void 0:n.scrollLeft)||0,top:i.scrollingElement?i.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==i?void 0:i.documentElement.scrollTop)||(null==i?void 0:i.body)&&(null==(r=Sn.parentElement(i.body))?void 0:r.scrollTop)||(null==(o=null==i?void 0:i.body)?void 0:o.scrollTop)||0}},getWindowWidth:function(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth},hasShadowRoot:function(e){return!!e&&(e instanceof pn&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(Sn.shadowRoot(e)))},hookSetter:function e(t,n,r,o){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window,a=i.Object.getOwnPropertyDescriptor(t,n);return i.Object.defineProperty(t,n,o?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&&(Sn.contains(t,e)||Nn(e))},isAncestorRemoved:function e(t,n){if(o=(r=t)&&"host"in r&&"mode"in r&&cn.host(r)||null,Boolean(o&&"shadowRoot"in o&&cn.shadowRoot(o)===r))return!1;var r,o,i=n.getId(t);if(!n.has(i))return!0;var a=Sn.parentNode(t);return(!a||a.nodeType!==t.DOCUMENT_NODE)&&(!a||e(a,n))},isBlocked:function(e,t,n,r){if(!e)return!1;var o=Tn(e);if(!o)return!1;try{if("string"==typeof t){if(o.classList.contains(t))return!0;if(r&&null!==o.closest("."+t))return!0}else if(dn(o,t,r))return!0}catch(e){}if(n){if(o.matches(n))return!0;if(r&&null!==o.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 kn},on:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,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],o=n(r);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch(e){return()=>{}}},polyfill:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]: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 o of e){var{nextId:i,parentId:a}=o;if(i&&i in t){var s=t[i];if(s.parent){var l=s.parent.children.indexOf(s);s.parent.children.splice(l,0,n(o,s.parent))}else{var c=r.indexOf(s);r.splice(c,0,n(o,null))}}else if(a in t){var u=t[a];u.children.push(n(o,u))}else r.push(n(o,null))}return r},shadowHostInDom:Nn,throttle:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=null,o=0;return function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];var l=Date.now();o||!1!==n.leading||(o=l);var c=t-(l-o),u=this;c<=0||c>t?(r&&(clearTimeout(r),r=null),o=l,e.apply(u,a)):r||!1===n.trailing||(r=setTimeout((()=>{o=!1===n.leading?0:Date.now(),r=null,e.apply(u,a)}),c))}},uniqueTextMutations:function(e){for(var t=new Set,n=[],r=e.length;r--;){var o=e[r];t.has(o.id)||(n.push(o),t.add(o.id))}return n}},Symbol.toStringTag,{value:"Module"})),An="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",On="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Rn=0;Rn<64;Rn++)On[An.charCodeAt(Rn)]=Rn;var Ln;"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 Dn=document.createElement("iframe");document.body.appendChild(Dn),Array.from=(null==(Gt=Dn.contentWindow)?void 0:Gt.Array.from)||Array.from,document.body.removeChild(Dn)}}catch(e){console.debug("Unable to override Array.from",e)}new un,function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(Ln||(Ln={}));class Fn{constructor(e){Ut(this,"fileName"),Ut(this,"functionName"),Ut(this,"lineNumber"),Ut(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?"".concat(this.functionName," (").concat(this.fileName,":").concat(e,":").concat(t,")"):"".concat(this.fileName,":").concat(e,":").concat(t)}}var Pn=/(^|@)\S+:\d+/,Bn=/^\s*at .*(\S+:\d+|\(native\))/m,Hn=/^(eval@)?(\[native code])?$/,Zn={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(Bn)?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: ".concat(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(Bn)}),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),o=this.extractLocation(n?n[1]:r.pop()),i=r.join(" ")||void 0,a=["eval","<anonymous>"].indexOf(o[0])>-1?void 0:o[0];return new Fn({functionName:i,fileName:a,lineNumber:o[1],columnNumber:o[2]})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(e){return!e.match(Hn)}),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 Fn({functionName:e});var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(t),r=n&&n[1]?n[1]:void 0,o=this.extractLocation(e.replace(t,""));return new Fn({functionName:r,fileName:o[0],lineNumber:o[1],columnNumber:o[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=[],o=2,i=n.length;o<i;o+=2){var a=t.exec(n[o]);a&&r.push(new Fn({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=[],o=0,i=n.length;o<i;o+=2){var a=t.exec(n[o]);a&&r.push(new Fn({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(Pn)&&!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 Fn({functionName:r,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})}),this)}};function qn(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,o=[];if(r.children&&r.children.length>0)for(var i=0;i<r.children.length;i++){var a=r.children[i];a.localName&&a.localName.toLowerCase&&a.localName.toLowerCase()===n&&o.push(a)}o.length>1&&(n+=":eq(".concat(o.indexOf(e),")")),t=n+(t?">"+t:""),e=r}return t}function Wn(e){return"[object Object]"===Object.prototype.toString.call(e)}function Vn(e,t){if(0===t)return!0;var n=Object.keys(e);for(var r of n)if(Wn(e[r])&&Vn(e[r],t-1))return!0;return!1}function Yn(e,t){var n={numOfKeysLimit:50,depthOfLimit:4};Object.assign(n,t);var r=[],o=[];return JSON.stringify(e,(function(e,t){if(r.length>0){var i=r.indexOf(this);~i?r.splice(i+1):r.push(this),~i?o.splice(i,1/0,e):o.push(e),~r.indexOf(t)&&(t=r[0]===t?"[Circular ~]":"[Circular ~."+o.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(Wn(e)&&Object.keys(e).length>n.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if(Wn(e)&&Vn(e,n.depthOfLimit))return!0;return!1}(t))return function(e){var t=e.toString();n.stringLengthLimit&&t.length>n.stringLengthLimit&&(t="".concat(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 l=t[s];Array.isArray(l)?a[s]=qn(l.length?l[0]:null):a[s]=l}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 jn={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 Gn(e,t,n){var r,o=n?Object.assign({},jn,n):jn,i=o.logger;if(!i)return()=>{};r="string"==typeof i?t[i]:i;var a=0,s=!1,l=[];if(o.level.includes("error")){var c=t=>{var n=t.message,r=t.error,i=Zn.parse(r).map((e=>e.toString())),a=[Yn(n,o.stringifyOptions)];e({level:"error",trace:i,payload:a})};t.addEventListener("error",c),l.push((()=>{t.removeEventListener("error",c)}));var u=t=>{var n,r;t.reason instanceof Error?(n=t.reason,r=[Yn("Uncaught (in promise) ".concat(n.name,": ").concat(n.message),o.stringifyOptions)]):(n=new Error,r=[Yn("Uncaught (in promise)",o.stringifyOptions),Yn(t.reason,o.stringifyOptions)]);var i=Zn.parse(n).map((e=>e.toString()));e({level:"error",trace:i,payload:r})};t.addEventListener("unhandledrejection",u),l.push((()=>{t.removeEventListener("unhandledrejection",u)}))}for(var d of o.level)l.push(p(r,d));return()=>{l.forEach((e=>e()))};function p(t,n){var r=this;return t[n]?En.patch(t,n,(t=>function(){for(var i=arguments.length,l=new Array(i),c=0;c<i;c++)l[c]=arguments[c];if(t.apply(r,l),!("assert"===n&&l[0]||s)){s=!0;try{var u=Zn.parse(new Error).map((e=>e.toString())).splice(1),d=("assert"===n?l.slice(1):l).map((e=>Yn(e,o.stringifyOptions)));++a<o.lengthThreshold?e({level:n,trace:u,payload:d}):a===o.lengthThreshold&&e({level:"warn",trace:[],payload:[Yn("The number of log records reached the threshold.")]})}catch(e){t("rrweb logger error:",e,...l)}finally{s=!1}}})):()=>{}}}var zn=e=>({name:"rrweb/console@1",observer:Gn,options:e}),Un="undefined"!=typeof window?window:void 0,Xn="undefined"!=typeof globalThis?globalThis:Un,Kn=Array.prototype.forEach,Jn=null==Xn?void 0:Xn.navigator,Qn=null==Xn?void 0:Xn.document;null==Xn||Xn.location,null==Xn||Xn.fetch,null!=Xn&&Xn.XMLHttpRequest&&"withCredentials"in new Xn.XMLHttpRequest&&Xn.XMLHttpRequest,null==Xn||Xn.AbortController,null==Jn||Jn.userAgent;var $n,er=null!=Un?Un:{};!function(e){e.GZipJS="gzip-js",e.Base64="base64"}($n||($n={}));var tr=["fatal","error","warning","log","info","debug"];function nr(e,t){return-1!==e.indexOf(t)}var rr=function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},or=Array.isArray,ir=Object.prototype,ar=ir.hasOwnProperty,sr=ir.toString,lr=or||function(e){return"[object Array]"===sr.call(e)},cr=e=>"function"==typeof e,ur=e=>cr(e)&&-1!==e.toString().indexOf("[native code]"),dr=()=>!!Un.Zone,pr=e=>e===Object(e)&&!lr(e),hr=e=>void 0===e,fr=e=>"[object String]"==sr.call(e),mr=e=>fr(e)&&0===e.trim().length,vr=e=>null===e,gr=e=>hr(e)||vr(e),yr=e=>"[object Number]"==sr.call(e),br=e=>"[object Boolean]"===sr.call(e),_r=e=>e instanceof Document,Cr=e=>e instanceof FormData,Sr=e=>{var t={_log:function(t){if(Un&&er.POSTHOG_DEBUG&&!hr(Un.console)&&Un.console){for(var n=("__rrweb_original__"in Un.console[t]?Un.console[t].__rrweb_original__:Un.console[t]),r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];n(e,...o)}},info:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t._log("log",...n)},warn:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t._log("warn",...n)},error:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t._log("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 ".concat(e))},createLogger:t=>Sr("".concat(e," ").concat(t))};return t},Ir=Sr("[PostHog.js]"),wr=Ir.createLogger,kr={};function Tr(e,t,n){if(lr(e))if(Kn&&e.forEach===Kn)e.forEach(t,n);else if("length"in e&&e.length===+e.length)for(var r=0,o=e.length;r<o;r++)if(r in e&&t.call(n,e[r],r)===kr)return}function xr(e,t,n){if(!gr(e)){if(lr(e))return Tr(e,t,n);if(Cr(e)){for(var r of e.entries())if(t.call(n,r[1],r[0])===kr)return}else for(var o in e)if(ar.call(e,o)&&t.call(n,e[o],o)===kr)return}}var Mr=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 Tr(n,(function(t){for(var n in t)void 0!==t[n]&&(e[n]=t[n])})),e};function Nr(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r}var Er=function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"&",o=[];return xr(e,(function(e,r){hr(e)||hr(r)||"undefined"===r||(t=encodeURIComponent((e=>e instanceof File)(e)?e.name:e.toString()),n=encodeURIComponent(r),o[o.length]=n+"="+t)})),o.join(r)};function Ar(e){return!!e&&1===e.nodeType}function Or(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function Rr(e){return e?rr(e).split(/\s+/):[]}function Lr(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 Rr(t)}function Dr(e){var t="";return Pr(e)&&!Br(e)&&e.childNodes&&e.childNodes.length&&xr(e.childNodes,(function(e){var n;(function(e){return!!e&&3===e.nodeType})(e)&&e.textContent&&(t+=null!==(n=function(e){return gr(e)?null:rr(e).split(/(\s+)/).filter((e=>jr(e))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}(e.textContent))&&void 0!==n?n:"")})),rr(t)}var Fr=["a","button","form","input","select","textarea","label"];function Pr(e){for(var t=e;t.parentNode&&!Or(t,"body");t=t.parentNode){var n=Lr(t);if(nr(n,"ph-sensitive")||nr(n,"ph-no-capture"))return!1}if(nr(Lr(e),"ph-include"))return!0;var r=e.type||"";if(fr(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var o=e.name||e.id||"";if(fr(o)){if(/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(o.replace(/[^a-zA-Z0-9]/g,"")))return!1}return!0}function Br(e){return!!(Or(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||Or(e,"select")||Or(e,"textarea")||"true"===e.getAttribute("contenteditable"))}var Hr="(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})",Zr=new RegExp("^(?:".concat(Hr,")$")),qr=new RegExp(Hr),Wr="\\d{3}-?\\d{2}-?\\d{4}",Vr=new RegExp("^(".concat(Wr,")$")),Yr=new RegExp("(".concat(Wr,")"));function jr(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(gr(e))return!1;if(fr(e)){if(e=rr(e),(t?Zr:qr).test((e||"").replace(/[- ]/g,"")))return!1;if((t?Vr:Yr).test(e))return!1}return!0}function Gr(e){var t=Dr(e);return jr(t="".concat(t," ").concat(zr(e)).trim())?t:""}function zr(e){var t="";return e&&e.childNodes&&e.childNodes.length&&xr(e.childNodes,(function(e){var n;if(e&&"span"===(null===(n=e.tagName)||void 0===n?void 0:n.toLowerCase()))try{var r=Dr(e);t="".concat(t," ").concat(r).trim(),e.childNodes&&e.childNodes.length&&(t="".concat(t," ").concat(zr(e)).trim())}catch(e){Ir.error("[AutoCapture]",e)}})),t}function Ur(e){return function(e){var n=e.map((e=>{var n,r,o="";if(e.tag_name&&(o+=e.tag_name),e.attr_class)for(var i of(e.attr_class.sort(),e.attr_class))o+=".".concat(i.replace(/"/g,""));var a=t(t(t(t({},e.text?{text:e.text}:{}),{},{"nth-child":null!==(n=e.nth_child)&&void 0!==n?n: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 Nr(a).sort(((e,t)=>{var[n]=e,[r]=t;return n.localeCompare(r)})).forEach((e=>{var[t,n]=e;return s[Xr(t.toString())]=Xr(n.toString())})),o+=":",o+=Nr(a).map((e=>{var[t,n]=e;return"".concat(t,'="').concat(n,'"')})).join("")}));return n.join(";")}(function(e){return e.map((e=>{var t,n,r={text:null===(t=e.$el_text)||void 0===t?void 0:t.slice(0,400),tag_name:e.tag_name,href:null===(n=e.attr__href)||void 0===n?void 0:n.slice(0,2048),attr_class:Kr(e),attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return Nr(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 Xr(e){return e.replace(/"|\\"/g,'\\"')}function Kr(e){var t=e.attr__class;return t?lr(t)?t:Rr(t):void 0}var Jr={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"]};function Qr(e,t,n){try{if(!(t in e))return()=>{};var r=e[t],o=n(r);return cr(o)&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=o,()=>{e[t]=r}}catch(e){return()=>{}}}function $r(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),o={hostname:r,isHostDenied:!1};if(null===(n=t.payloadHostDenyList)||void 0===n||!n.length||null==r||!r.trim().length)return o;for(var i of t.payloadHostDenyList)if(r.endsWith(i))return{hostname:r,isHostDenied:!0};return o}var eo=wr("[Recorder]"),to=e=>"navigation"===e.entryType,no=e=>"resource"===e.entryType;function ro(e,t,n){if(n.recordInitialRequests){var r=t.performance.getEntries().filter((e=>to(e)||no(e)&&n.initiatorTypes.includes(e.initiatorType)));e({requests:r.flatMap((e=>uo({entry:e,method:void 0,status:void 0,networkRequest:{},isInitial:!0}))),isInitial:!0})}var o=new t.PerformanceObserver((t=>{var r=t.getEntries().filter((e=>to(e)||no(e)&&n.initiatorTypes.includes(e.initiatorType)&&(e=>!n.recordBody&&!n.recordHeaders||"xmlhttprequest"!==e.initiatorType&&"fetch"!==e.initiatorType)(e)));e({requests:r.flatMap((e=>uo({entry:e,method:void 0,status:void 0,networkRequest:{}})))})})),i=PerformanceObserver.supportedEntryTypes.filter((e=>n.performanceEntryTypeToObserve.includes(e)));return o.observe({entryTypes:i}),()=>{o.disconnect()}}function oo(e,t){return!!t&&(br(t)||t[e])}function io(e){var{type:t,recordBody:n,headers:r}=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(br(n))return!0;if(lr(n))return o(n);var i=n[t];return br(i)?i:o(i)}function ao(e,t,n,r,o){return so.apply(this,arguments)}function so(){return so=r((function*(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(i>10)return eo.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=>no(e)&&e.initiatorType===t&&(hr(r)||e.startTime>=r)&&(hr(o)||e.startTime<=o)));return a||(yield new Promise((e=>setTimeout(e,50*i))),ao(e,t,n,r,o,i+1))})),so.apply(this,arguments)}function lo(e){var{body:t,options:n,url:r}=e;if(gr(t))return null;var{hostname:o,isHostDenied:i}=$r(r,n);if(i)return o+" is in deny list";if(fr(t))return t;if(_r(t))return t.textContent;if(Cr(t))return Er(t);if(pr(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 co=e=>!vr(e)&&("navigation"===e.entryType||"resource"===e.entryType);function uo(e){var{entry:n,method:r,status:o,networkRequest:i,isInitial:a,start:s,end:l,url:c,initiatorType:u}=e;s=n?n.startTime:s,l=n?n.responseEnd:l;var d=Math.floor(Date.now()-performance.now()),p=Math.floor(d+(s||0)),h=[t(t({},n?n.toJSON():{name:c}),{},{startTime:hr(s)?void 0:Math.round(s),endTime:hr(l)?void 0:Math.round(l),timeOrigin:d,timestamp:p,method:r,initiatorType:u||(n?n.initiatorType:void 0),status:o,requestHeaders:i.requestHeaders,requestBody:i.requestBody,responseHeaders:i.responseHeaders,responseBody:i.responseBody,isInitial:a})];if(co(n))for(var f of n.serverTiming||[])h.push({timeOrigin:d,timestamp:p,startTime:Math.round(n.startTime),name:f.name,duration:f.duration,entryType:"serverTiming"});return h}var po=["video/","audio/"];function ho(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 fo(){return fo=r((function*(e){var{r:t,options:n,url:r}=e,{hostname:o,isHostDenied:i}=$r(r,n);return i?Promise.resolve(o+" is in deny list"):ho(t)})),fo.apply(this,arguments)}function mo(){return mo=r((function*(e){var{r:t,options:n,url:r}=e,o=function(e){var t,{r:n,options:r,url:o}=e;if("chunked"===n.headers.get("Transfer-Encoding"))return"Chunked Transfer-Encoding is not supported";var i=null===(t=n.headers.get("Content-Type"))||void 0===t?void 0:t.toLowerCase(),a=po.some((e=>null==i?void 0:i.startsWith(e)));if(i&&a)return"Content-Type ".concat(i," is not supported");var{hostname:s,isHostDenied:l}=$r(o,r);return l?s+" is in deny list":null}({r:t,options:n,url:r});return vr(o)?ho(t):Promise.resolve(o)})),mo.apply(this,arguments)}function vo(e,t,n){if(!n.initiatorTypes.includes("fetch"))return()=>{};var o=oo("request",n.recordHeaders),i=oo("response",n.recordHeaders),a=Qr(t,"fetch",(a=>function(){var s=r((function*(r,s){var l,c,u,d=new Request(r,s),p={};try{var h={};d.headers.forEach(((e,t)=>{h[t]=e})),o&&(p.requestHeaders=h),io({type:"request",headers:h,url:r,recordBody:n.recordBody})&&(p.requestBody=yield function(e){return fo.apply(this,arguments)}({r:d,options:n,url:r})),c=t.performance.now(),l=yield a(d),u=t.performance.now();var f={};return l.headers.forEach(((e,t)=>{f[t]=e})),i&&(p.responseHeaders=f),io({type:"response",headers:f,url:r,recordBody:n.recordBody})&&(p.responseBody=yield function(e){return mo.apply(this,arguments)}({r:l,options:n,url:r})),l}finally{ao(t,"fetch",d.url,c,u).then((t=>{var n,r=uo({entry:t,method:d.method,status:null===(n=l)||void 0===n?void 0:n.status,networkRequest:p,start:c,end:u,url:d.url,initiatorType:"fetch"});e({requests:r})})).catch((()=>{}))}}));return function(e,t){return s.apply(this,arguments)}}()));return()=>{a()}}var go=null;function yo(e,n,r){if(!("performance"in n))return()=>{};if(go)return eo.warn("Network observer already initialised, doing nothing"),()=>{};var o=r?Object.assign({},Jr,r):Jr,i=n=>{var r=[];n.requests.forEach((e=>{var t=o.maskRequestFn(e);t&&r.push(t)})),r.length>0&&e(t(t({},n),{},{requests:r}))},a=ro(i,n,o),s=()=>{},l=()=>{};return(o.recordHeaders||o.recordBody)&&(s=function(e,t,n){if(!n.initiatorTypes.includes("xmlhttprequest"))return()=>{};var r=oo("request",n.recordHeaders),o=oo("response",n.recordHeaders),i=Qr(t.XMLHttpRequest.prototype,"open",(i=>function(a,s){var l,c,u=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],d=arguments.length>3?arguments[3]:void 0,p=arguments.length>4?arguments[4]:void 0,h=this,f=new Request(s),m={},v={},g=h.setRequestHeader.bind(h);h.setRequestHeader=(e,t)=>(v[e]=t,g(e,t)),r&&(m.requestHeaders=v);var y=h.send.bind(h);h.send=e=>(io({type:"request",headers:v,url:s,recordBody:n.recordBody})&&(m.requestBody=lo({body:e,options:n,url:s})),l=t.performance.now(),y(e)),h.addEventListener("readystatechange",(()=>{if(h.readyState===h.DONE){c=t.performance.now();var r={};h.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((e=>{var t=e.split(": "),n=t.shift(),o=t.join(": ");n&&(r[n]=o)})),o&&(m.responseHeaders=r),io({type:"response",headers:r,url:s,recordBody:n.recordBody})&&(m.responseBody=lo({body:h.response,options:n,url:s})),ao(t,"xmlhttprequest",f.url,l,c).then((t=>{var n=uo({entry:t,method:a,status:null==h?void 0:h.status,networkRequest:m,start:l,end:c,url:s.toString(),initiatorType:"xmlhttprequest"});e({requests:n})})).catch((()=>{}))}})),i.call(h,a,s,u,d,p)}));return()=>{i()}}(i,n,o),l=vo(i,n,o)),go=()=>{a(),s(),l()}}var bo,_o,Co,So=e=>({name:"rrweb/network@1",observer:yo,options:e});er.__PosthogExtensions__=er.__PosthogExtensions__||{},er.__PosthogExtensions__.rrwebPlugins={getRecordConsolePlugin:zn,getRecordNetworkPlugin:So},er.__PosthogExtensions__.rrweb={record:jt,version:"v2"},er.rrweb={record:jt,version:"v2"},er.rrwebConsoleRecord={getRecordConsolePlugin:zn},er.getRecordNetworkPlugin=So,function(e){e.Popover="popover",e.API="api",e.Widget="widget"}(bo||(bo={})),function(e){e.Open="open",e.MultipleChoice="multiple_choice",e.SingleChoice="single_choice",e.Rating="rating",e.Link="link"}(_o||(_o={})),function(e){e.NextQuestion="next_question",e.End="end",e.ResponseBased="response_based",e.SpecificQuestion="specific_question"}(Co||(Co={}));var Io,wo,ko,To,xo,Mo,No,Eo,Ao={},Oo=[],Ro=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Lo=Array.isArray;function Do(e,t){for(var n in t)e[n]=t[n];return e}function Fo(e){var t=e.parentNode;t&&t.removeChild(e)}function Po(e,t,n){var r,o,i,a={};for(i in t)"key"==i?r=t[i]:"ref"==i?o=t[i]:a[i]=t[i];if(arguments.length>2&&(a.children=arguments.length>3?Io.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===a[i]&&(a[i]=e.defaultProps[i]);return Bo(e,a,r,o,null)}function Bo(e,t,n,r,o){var i={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==o?++ko:o,__i:-1,__u:0};return null==o&&null!=wo.vnode&&wo.vnode(i),i}function Ho(e){return e.children}function Zo(e,t){this.props=e,this.context=t}function qo(e,t){if(null==t)return e.__?qo(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?qo(e):null}function Wo(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 Wo(e)}}function Vo(e){(!e.__d&&(e.__d=!0)&&To.push(e)&&!Yo.__r++||xo!==wo.debounceRendering)&&((xo=wo.debounceRendering)||Mo)(Yo)}function Yo(){var e,t,n,r,o,i,a,s,l;for(To.sort(No);e=To.shift();)e.__d&&(t=To.length,r=void 0,i=(o=(n=e).__v).__e,s=[],l=[],(a=n.__P)&&((r=Do({},o)).__v=o.__v+1,wo.vnode&&wo.vnode(r),Qo(a,r,o,n.__n,void 0!==a.ownerSVGElement,32&o.__u?[i]:null,s,null==i?qo(o):i,!!(32&o.__u),l),r.__.__k[r.__i]=r,$o(s,r,l),r.__e!=i&&Wo(r)),To.length>t&&To.sort(No));Yo.__r=0}function jo(e,t,n,r,o,i,a,s,l,c,u){var d,p,h,f,m,v=r&&r.__k||Oo,g=t.length;for(n.__d=l,function(e,t,n){var r,o,i,a,s,l=t.length,c=n.length,u=c,d=0;for(e.__k=[],r=0;r<l;r++)null!=(o=e.__k[r]=null==(o=t[r])||"boolean"==typeof o||"function"==typeof o?null:"string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?Bo(null,o,null,null,o):Lo(o)?Bo(Ho,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?Bo(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)?(o.__=e,o.__b=e.__b+1,s=zo(o,n,a=r+d,u),o.__i=s,i=null,-1!==s&&(u--,(i=n[s])&&(i.__u|=131072)),null==i||null===i.__v?(-1==s&&d--,"function"!=typeof o.type&&(o.__u|=65536)):s!==a&&(s===a+1?d++:s>a?u>l-a?d+=s-a:d--:d=s<a&&s==a-1?s-a:0,s!==r+d&&(o.__u|=65536))):(i=n[r])&&null==i.key&&i.__e&&(i.__e==e.__d&&(e.__d=qo(i)),ti(i,i,!1),n[r]=null,u--);if(u)for(r=0;r<c;r++)null!=(i=n[r])&&0==(131072&i.__u)&&(i.__e==e.__d&&(e.__d=qo(i)),ti(i,i))}(n,t,v),l=n.__d,d=0;d<g;d++)null!=(h=n.__k[d])&&"boolean"!=typeof h&&"function"!=typeof h&&(p=-1===h.__i?Ao:v[h.__i]||Ao,h.__i=d,Qo(e,h,p,o,i,a,s,l,c,u),f=h.__e,h.ref&&p.ref!=h.ref&&(p.ref&&ei(p.ref,null,h),u.push(h.ref,h.__c||f,h)),null==m&&null!=f&&(m=f),65536&h.__u||p.__k===h.__k?l=Go(h,l,e):"function"==typeof h.type&&void 0!==h.__d?l=h.__d:f&&(l=f.nextSibling),h.__d=void 0,h.__u&=-196609);n.__d=l,n.__e=m}function Go(e,t,n){var r,o;if("function"==typeof e.type){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=Go(r[o],t,n));return t}return e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e),t&&t.nextSibling}function zo(e,t,n,r){var o=e.key,i=e.type,a=n-1,s=n+1,l=t[n];if(null===l||l&&o==l.key&&i===l.type)return n;if(r>(null!=l&&0==(131072&l.__u)?1:0))for(;a>=0||s<t.length;){if(a>=0){if((l=t[a])&&0==(131072&l.__u)&&o==l.key&&i===l.type)return a;a--}if(s<t.length){if((l=t[s])&&0==(131072&l.__u)&&o==l.key&&i===l.type)return s;s++}}return-1}function Uo(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||Ro.test(t)?n:n+"px"}function Xo(e,t,n,r,o){var i;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||Uo(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Uo(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])i=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+i]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,i?Jo:Ko,i)):e.removeEventListener(t,i?Jo:Ko,i);else{if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&"rowSpan"!==t&&"colSpan"!==t&&"role"!==t&&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 Ko(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(wo.event?wo.event(e):e)}function Jo(e){return this.l[e.type+!0](wo.event?wo.event(e):e)}function Qo(e,t,n,r,o,i,a,s,l,c){var u,d,p,h,f,m,v,g,y,b,_,C,S,I,w,k=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(l=!!(32&n.__u),i=[s=t.__e=n.__e]),(u=wo.__b)&&u(t);e:if("function"==typeof k)try{if(g=t.props,y=(u=k.contextType)&&r[u.__c],b=u?y?y.props.value:u.__:r,n.__c?v=(d=t.__c=n.__c).__=d.__E:("prototype"in k&&k.prototype.render?t.__c=d=new k(g,b):(t.__c=d=new Zo(g,b),d.constructor=k,d.render=ni),y&&y.sub(d),d.props=g,d.state||(d.state={}),d.context=b,d.__n=r,p=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=k.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=Do({},d.__s)),Do(d.__s,k.getDerivedStateFromProps(g,d.__s))),h=d.props,f=d.state,d.__v=t,p)null==k.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==k.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)})),_=0;_<d._sb.length;_++)d.__h.push(d._sb[_]);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,f,m)}))}if(d.context=b,d.props=g,d.__P=e,d.__e=!1,C=wo.__r,S=0,"prototype"in k&&k.prototype.render){for(d.state=d.__s,d.__d=!1,C&&C(t),u=d.render(d.props,d.state,d.context),I=0;I<d._sb.length;I++)d.__h.push(d._sb[I]);d._sb=[]}else do{d.__d=!1,C&&C(t),u=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++S<25);d.state=d.__s,null!=d.getChildContext&&(r=Do(Do({},r),d.getChildContext())),p||null==d.getSnapshotBeforeUpdate||(m=d.getSnapshotBeforeUpdate(h,f)),jo(e,Lo(w=null!=u&&u.type===Ho&&null==u.key?u.props.children:u)?w:[w],t,n,r,o,i,a,s,l,c),d.base=t.__e,t.__u&=-161,d.__h.length&&a.push(d),v&&(d.__E=d.__=null)}catch(e){t.__v=null,l||null!=i?(t.__e=s,t.__u|=l?160:32,i[i.indexOf(s)]=null):(t.__e=n.__e,t.__k=n.__k),wo.__e(e,t,n)}else null==i&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=function(e,t,n,r,o,i,a,s,l){var c,u,d,p,h,f,m,v=n.props,g=t.props,y=t.type;if("svg"===y&&(o=!0),null!=i)for(c=0;c<i.length;c++)if((h=i[c])&&"setAttribute"in h==!!y&&(y?h.localName===y:3===h.nodeType)){e=h,i[c]=null;break}if(null==e){if(null===y)return document.createTextNode(g);e=o?document.createElementNS("http://www.w3.org/2000/svg",y):document.createElement(y,g.is&&g),i=null,s=!1}if(null===y)v===g||s&&e.data===g||(e.data=g);else{if(i=i&&Io.call(e.childNodes),v=n.props||Ao,!s&&null!=i)for(v={},c=0;c<e.attributes.length;c++)v[(h=e.attributes[c]).name]=h.value;for(c in v)h=v[c],"children"==c||("dangerouslySetInnerHTML"==c?d=h:"key"===c||c in g||Xo(e,c,null,h,o));for(c in g)h=g[c],"children"==c?p=h:"dangerouslySetInnerHTML"==c?u=h:"value"==c?f=h:"checked"==c?m=h:"key"===c||s&&"function"!=typeof h||v[c]===h||Xo(e,c,h,v[c],o);if(u)s||d&&(u.__html===d.__html||u.__html===e.innerHTML)||(e.innerHTML=u.__html),t.__k=[];else if(d&&(e.innerHTML=""),jo(e,Lo(p)?p:[p],t,n,r,o&&"foreignObject"!==y,i,a,i?i[0]:n.__k&&qo(n,0),s,l),null!=i)for(c=i.length;c--;)null!=i[c]&&Fo(i[c]);s||(c="value",void 0!==f&&(f!==e[c]||"progress"===y&&!f||"option"===y&&f!==v[c])&&Xo(e,c,f,v[c],!1),c="checked",void 0!==m&&m!==e[c]&&Xo(e,c,m,v[c],!1))}return e}(n.__e,t,n,r,o,i,a,l,c);(u=wo.diffed)&&u(t)}function $o(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)ei(n[r],n[++r],n[++r]);wo.__c&&wo.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){wo.__e(e,t.__v)}}))}function ei(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){wo.__e(e,n)}}function ti(e,t,n){var r,o;if(wo.unmount&&wo.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||ei(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){wo.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&ti(r[o],t,n||"function"!=typeof e.type);n||null==e.__e||Fo(e.__e),e.__=e.__e=e.__d=void 0}function ni(e,t,n){return this.constructor(e,n)}function ri(e,t,n){var r,o,i,a;wo.__&&wo.__(e,t),o=(r="function"==typeof n)?null:t.__k,i=[],a=[],Qo(t,e=(!r&&n||t).__k=Po(Ho,null,[e]),o||Ao,Ao,void 0!==t.ownerSVGElement,!r&&n?[n]:o?null:t.firstChild?Io.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,a),$o(i,e,a)}function oi(e,t,n){var r,o,i,a,s=Do({},e.props);for(i in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)"key"==i?r=t[i]:"ref"==i?o=t[i]:s[i]=void 0===t[i]&&void 0!==a?a[i]:t[i];return arguments.length>2&&(s.children=arguments.length>3?Io.call(arguments,2):n),Bo(e.type,s,r||e.key,o||e.ref,null)}Io=Oo.slice,wo={__e:function(e,t,n,r){for(var o,i,a;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),a=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),a=o.__d),a)return o.__E=o}catch(t){e=t}throw e}},ko=0,Zo.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Do({},this.state),"function"==typeof e&&(e=e(Do({},n),this.props)),e&&Do(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),Vo(this))},Zo.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Vo(this))},Zo.prototype.render=Ho,To=[],Mo="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,No=function(e,t){return e.__v.__b-t.__v.__b},Yo.__r=0,Eo=0;var ii,ai,si,li,ci=0,ui=[],di=[],pi=wo.__b,hi=wo.__r,fi=wo.diffed,mi=wo.__c,vi=wo.unmount;function gi(e,t){wo.__h&&wo.__h(ai,e,ci||t),ci=0;var n=ai.__H||(ai.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:di}),n.__[e]}function yi(e){return ci=1,function(e,t,n){var r=gi(ii++,2);if(r.t=e,!r.__c&&(r.__=[Ni(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=ai,!ai.u)){var o=function(e,t,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter((function(e){return e.__c}));if(o.every((function(e){return!e.__N})))return!i||i.call(this,e,t,n);var a=!1;return o.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)&&(!i||i.call(this,e,t,n))};ai.u=!0;var i=ai.shouldComponentUpdate,a=ai.componentWillUpdate;ai.componentWillUpdate=function(e,t,n){if(this.__e){var r=i;i=void 0,o(e,t,n),i=r}a&&a.call(this,e,t,n)},ai.shouldComponentUpdate=o}return r.__N||r.__}(Ni,e)}function bi(e,t){var n=gi(ii++,3);!wo.__s&&Mi(n.__H,t)&&(n.__=e,n.i=t,ai.__H.__h.push(n))}function _i(e){return ci=5,Ci((function(){return{current:e}}),[])}function Ci(e,t){var n=gi(ii++,7);return Mi(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function Si(e){var t=ai.context[e.__c],n=gi(ii++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(ai)),t.props.value):e.__}function Ii(){for(var e;e=ui.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Ti),e.__H.__h.forEach(xi),e.__H.__h=[]}catch(t){e.__H.__h=[],wo.__e(t,e.__v)}}wo.__b=function(e){ai=null,pi&&pi(e)},wo.__r=function(e){hi&&hi(e),ii=0;var t=(ai=e.__c).__H;t&&(si===ai?(t.__h=[],ai.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=di,e.__N=e.i=void 0}))):(t.__h.forEach(Ti),t.__h.forEach(xi),t.__h=[],ii=0)),si=ai},wo.diffed=function(e){fi&&fi(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==ui.push(t)&&li===wo.requestAnimationFrame||((li=wo.requestAnimationFrame)||ki)(Ii)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==di&&(e.__=e.__V),e.i=void 0,e.__V=di}))),si=ai=null},wo.__c=function(e,t){t.some((function(e){try{e.__h.forEach(Ti),e.__h=e.__h.filter((function(e){return!e.__||xi(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],wo.__e(n,e.__v)}})),mi&&mi(e,t)},wo.unmount=function(e){vi&&vi(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{Ti(e)}catch(e){t=e}})),n.__H=void 0,t&&wo.__e(t,n.__v))};var wi="function"==typeof requestAnimationFrame;function ki(e){var t,n=function(){clearTimeout(r),wi&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);wi&&(t=requestAnimationFrame(n))}function Ti(e){var t=ai,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),ai=t}function xi(e){var t=ai;e.__c=e.__(),ai=t}function Mi(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function Ni(e,t){return"function"==typeof t?t(e):t}var Ei=Qn;var Ai=Un,Oi=Qn,Ri="seenSurvey_",Li=wr("[Surveys]"),Di=e=>"\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: ".concat((null==e?void 0:e.fontFamily)||"-apple-system",', BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n text-align: left;\n max-width: ').concat(parseInt((null==e?void 0:e.maxWidth)||"300"),"px;\n width: 100%;\n z-index: ").concat(parseInt((null==e?void 0:e.zIndex)||"99999"),";\n border: 1.5px solid ").concat((null==e?void 0:e.borderColor)||"#c9c6c6",";\n border-bottom: 0px;\n ").concat({left:"left: 30px;",right:"right: 30px;",center:"\n left: 50%;\n transform: translateX(-50%);\n "}[(null==e?void 0:e.position)||"right"]||"right: 30px;","\n flex-direction: column;\n background: ").concat((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: 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: ").concat((null==e?void 0:e.fontFamily)||"-apple-system",', BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\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: ').concat((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: ").concat((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 ").concat((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: ").concat((null==e?void 0:e.backgroundColor)||"#eeeded",";\n text-decoration: none;\n backgroundColor: ").concat((null==e?void 0:e.backgroundColor)||"#eeeded",";\n color: ").concat(Pi((null==e?void 0:e.backgroundColor)||"#eeeded"),";\n }\n .survey-question {\n font-weight: 500;\n font-size: 14px;\n background: ").concat((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: ").concat((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 ").concat((null==e?void 0:e.borderColor)||"#c9c6c6",";\n }\n .rating-options-number > .ratings-number {\n border-right: 1px solid ").concat((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: ").concat((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: ").concat((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: ").concat((null==e?void 0:e.backgroundColor)||"#eeeded",";\n opacity: .60;\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: ").concat((null==e?void 0:e.backgroundColor)||"#eeeded",";\n }\n .thank-you-message-header {\n margin: 10px 0px 0px;\n background: ").concat((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 ");function Fi(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 Pi(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Hi;"#"===t[0]&&(e=Fi(t)),t.startsWith("rgb")&&(e=t);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"}[t.toLowerCase()];if(n&&(e=Fi(n)),!e)return"black";var r=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(r){var o=parseInt(r[1]),i=parseInt(r[2]),a=parseInt(r[3]);return Math.sqrt(o*o*.299+i*i*.587+a*a*.114)>127.5?"black":"white"}return"black"}var Bi={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:"right"},Hi="#eeeded",Zi=function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,o=arguments.length>2?arguments[2]:void 0;o?(localStorage.setItem(Gi(r),"true"),o.capture("survey sent",t(t({$survey_name:r.name,$survey_id:r.id,$survey_iteration:r.current_iteration,$survey_iteration_start_date:r.current_iteration_start_date,$survey_questions:r.questions.map((e=>e.question)),sessionRecordingUrl:null===(e=o.get_session_replay_url)||void 0===e?void 0:e.call(o)},n),{},{$set:{[zi(r,"responded")]:!0}})),Ai.dispatchEvent(new Event("PHSurveySent"))):Li.error("[survey sent] event not captured, PostHog instance not found.")},qi=(e,t,n)=>{var r;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===(r=t.get_session_replay_url)||void 0===r?void 0:r.call(t),$set:{[zi(e,"dismissed")]:!0}}),localStorage.setItem(Gi(e),"true"),Ai.dispatchEvent(new Event("PHSurveyClosed"))):Li.error("[survey dismissed] event not captured, PostHog instance not found.")},Wi=e=>e.map((e=>({sort:Math.floor(10*Math.random()),value:e}))).sort(((e,t)=>e.sort-t.sort)).map((e=>e.value)),Vi=(e,t)=>e.length===t.length&&e.every(((e,n)=>e===t[n]))?t.reverse():t,Yi=e=>(e.questions.forEach(((e,t)=>{e.originalQuestionIndex=t})),e.appearance&&e.appearance.shuffleQuestions?Vi(e.questions,Wi(e.questions)):e.questions),ji=e=>{var t,n;return!(null===(t=e.conditions)||void 0===t||null===(n=t.events)||void 0===n||!n.repeatedActivation||!(e=>{var t,n,r,o,i,a;return null!=(null===(t=e.conditions)||void 0===t||null===(n=t.events)||void 0===n||null===(r=n.values)||void 0===r?void 0:r.length)&&(null===(o=e.conditions)||void 0===o||null===(i=o.events)||void 0===i||null===(a=i.values)||void 0===a?void 0:a.length)>0})(e))},Gi=e=>{var t="".concat(Ri).concat(e.id);return e.current_iteration&&e.current_iteration>0&&(t="".concat(Ri).concat(e.id,"_").concat(e.current_iteration)),t},zi=(e,t)=>{var n="$survey_".concat(t,"/").concat(e.id);return e.current_iteration&&e.current_iteration>0&&(n="$survey_".concat(t,"/").concat(e.id,"/").concat(e.current_iteration)),n},Ui=function(e,t){var n={__c:t="__cC"+Eo++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,Vo(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,handleCloseSurveyPopup:()=>{},isPopup:!0,onPreviewSubmit:()=>{}}),Xi=e=>{var{component:t,children:n,renderAsHtml:r,style:o}=e;return oi(t,r?{dangerouslySetInnerHTML:{__html:n},style:o}:{children:n,style:o})},Ki=0;function Ji(e,t,n,r,o,i){var a,s,l={};for(s in t)"ref"==s?a=t[s]:l[s]=t[s];var c={type:e,props:l,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--Ki,__i:-1,__u:0,__source:o,__self:i};if("function"==typeof e&&(a=e.defaultProps))for(s in a)void 0===l[s]&&(l[s]=a[s]);return wo.vnode&&wo.vnode(c),c}var Qi=Ji("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Ji("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"})}),$i=Ji("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Ji("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"})}),ea=Ji("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Ji("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"})}),ta=Ji("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Ji("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"})}),na=Ji("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Ji("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"})}),ra=Ji("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Ji("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"})}),oa=Ji("svg",{width:"77",height:"14",viewBox:"0 0 77 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Ji("g",{"clip-path":"url(#clip0_2415_6911)",children:[Ji("mask",{id:"mask0_2415_6911",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"77",height:"14",children:Ji("path",{d:"M0.5 0H76.5V14H0.5V0Z",fill:"white"})}),Ji("g",{mask:"url(#mask0_2415_6911)",children:[Ji("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"}),Ji("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"}),Ji("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"}),Ji("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"}),Ji("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"}),Ji("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"})]})]}),Ji("defs",{children:Ji("clipPath",{id:"clip0_2415_6911",children:Ji("rect",{width:"76",height:"14",fill:"white",transform:"translate(0.5)"})})})]}),ia=Ji("svg",{width:"16",height:"12",viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Ji("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 aa(){return Ji("a",{href:"https://posthog.com",target:"_blank",rel:"noopener",className:"footer-branding",children:["Survey by ",oa]})}function sa(e){var{text:t,submitDisabled:n,appearance:r,onSubmit:o,link:i,onPreviewSubmit:a}=e,{isPreviewMode:s,isPopup:l}=Si(Ui),c=r.submitButtonTextColor||Pi(r.submitButtonColor||Bi.submitButtonColor);return Ji("div",{className:"bottom-section",children:[Ji("div",{className:"buttons",children:Ji("button",{className:"form-submit",disabled:n&&!s,type:"button",style:l?{color:c}:{},onClick:()=>{s?null==a||a():(i&&(null==Un||Un.open(i)),o())},children:t})}),!r.whiteLabel&&Ji(aa,{})]})}function la(e){var{question:t,description:n,descriptionContentType:r,backgroundColor:o,forceDisableHtml:i}=e,{isPopup:a}=Si(Ui);return Ji("div",{style:a?{backgroundColor:o||Bi.backgroundColor}:{},children:[Ji("div",{className:"survey-question",children:t}),n&&Xi({component:Po("div",{className:"survey-question-description"}),children:n,renderAsHtml:!i&&"text"!==r})]})}function ca(e){var{onClick:t}=e,{isPreviewMode:n}=Si(Ui);return Ji("div",{className:"cancel-btn-wrapper",onClick:t,disabled:n,children:Ji("button",{className:"form-cancel",onClick:t,disabled:n,children:ra})})}function ua(e){var{header:n,description:r,contentType:o,forceDisableHtml:i,appearance:a,onClose:s,styleOverrides:l}=e,c=Pi(a.backgroundColor||Bi.backgroundColor),{isPopup:u}=Si(Ui);return Ji(Ho,{children:Ji("div",{className:"thank-you-message",style:t({},l),children:Ji("div",{className:"thank-you-message-container",children:[u&&Ji(ca,{onClick:()=>s()}),Ji("h3",{className:"thank-you-message-header",style:{color:c},children:n}),r&&Xi({component:Po("div",{className:"thank-you-message-body"}),children:r,renderAsHtml:!i&&"text"!==o,style:{color:c}}),u&&Ji(sa,{text:a.thankYouMessageCloseButtonText||"Close",submitDisabled:!1,appearance:a,onSubmit:()=>s()})]})})})}function da(e){var t,n=_i(null),[r,o]=yi(null!==(t=e.defaultTextColor)&&void 0!==t?t:"black");return bi((()=>{if(n.current){var e=function(e){var t=Ai.getComputedStyle(e).backgroundColor;if("rgba(0, 0, 0, 0)"===t)return"black";var n=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(!n)return"black";var r=parseInt(n[1]),o=parseInt(n[2]),i=parseInt(n[3]);return Math.sqrt(r*r*.299+o*o*.587+i*i*.114)>127.5?"black":"white"}(n.current);o(e)}}),[e.appearance,e.forceUpdate]),{ref:n,textColor:r}}function pa(e){var{question:t,forceDisableHtml:n,appearance:r,onSubmit:o,onPreviewSubmit:i}=e,a=_i(null),[s,l]=yi("");return Ji("div",{ref:a,children:[Ji(la,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,backgroundColor:r.backgroundColor,forceDisableHtml:n}),Ji("textarea",{rows:4,placeholder:null==r?void 0:r.placeholder,onInput:e=>l(e.currentTarget.value)}),Ji(sa,{text:t.buttonText||"Submit",submitDisabled:!s&&!t.optional,appearance:r,onSubmit:()=>o(s),onPreviewSubmit:()=>i(s)})]})}function ha(e){var{question:t,forceDisableHtml:n,appearance:r,onSubmit:o,onPreviewSubmit:i}=e;return Ji(Ho,{children:[Ji(la,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,forceDisableHtml:n}),Ji(sa,{text:t.buttonText||"Submit",submitDisabled:!1,link:t.link,appearance:r,onSubmit:()=>o("link clicked"),onPreviewSubmit:()=>i("link clicked")})]})}function fa(e){var{question:t,forceDisableHtml:n,displayQuestionIndex:r,appearance:o,onSubmit:i,onPreviewSubmit:a}=e,s=t.scale,l=10===t.scale?0:1,[c,u]=yi(null);return Ji(Ho,{children:[Ji(la,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,forceDisableHtml:n,backgroundColor:o.backgroundColor}),Ji("div",{className:"rating-section",children:[Ji("div",{className:"rating-options",children:["emoji"===t.display&&Ji("div",{className:"rating-options-emoji",children:(3===t.scale?ga:ya).map(((e,t)=>{var n=t+1===c;return Ji("button",{className:"ratings-emoji question-".concat(r,"-rating-").concat(t," ").concat(n?"rating-active":null),value:t+1,type:"button",onClick:()=>{u(t+1)},style:{fill:n?o.ratingButtonActiveColor:o.ratingButtonColor,borderColor:o.borderColor},children:e},t)}))}),"number"===t.display&&Ji("div",{className:"rating-options-number",style:{gridTemplateColumns:"repeat(".concat(s-l+1,", minmax(0, 1fr))")},children:Sa(t.scale).map(((e,t)=>Ji(ma,{displayQuestionIndex:r,active:c===e,appearance:o,num:e,setActiveNumber:e=>{u(e)}},t)))})]}),Ji("div",{className:"rating-text",children:[Ji("div",{children:t.lowerBoundLabel}),Ji("div",{children:t.upperBoundLabel})]})]}),Ji(sa,{text:t.buttonText||(null==o?void 0:o.submitButtonText)||"Submit",submitDisabled:vr(c)&&!t.optional,appearance:o,onSubmit:()=>i(c),onPreviewSubmit:()=>a(c)})]})}function ma(e){var{num:t,active:n,displayQuestionIndex:r,appearance:o,setActiveNumber:i}=e,{textColor:a,ref:s}=da({appearance:o,defaultTextColor:"black",forceUpdate:n});return Ji("button",{ref:s,className:"ratings-number question-".concat(r,"-rating-").concat(t," ").concat(n?"rating-active":null),type:"button",onClick:()=>{i(t)},style:{color:a,backgroundColor:n?o.ratingButtonActiveColor:o.ratingButtonColor,borderColor:o.borderColor},children:t})}function va(e){var{question:t,forceDisableHtml:n,displayQuestionIndex:r,appearance:o,onSubmit:i,onPreviewSubmit:a}=e,s=_i(null),l=Ci((()=>(e=>{if(!e.shuffleOptions)return e.choices;var t=e.choices,n="";e.hasOpenChoice&&(n=t.pop());var r=Vi(t,Wi(t));return e.hasOpenChoice&&(e.choices.push(n),r.push(n)),r})(t)),[t]),[c,u]=yi(t.type===_o.MultipleChoice?[]:null),[d,p]=yi(!1),[h,f]=yi(""),m=t.type===_o.SingleChoice?"radio":"checkbox";return Ji("div",{ref:s,children:[Ji(la,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,forceDisableHtml:n,backgroundColor:o.backgroundColor}),Ji("div",{className:"multiple-choice-options",children:l.map(((e,n)=>{var o="choice-option",i=e,a=e;return t.hasOpenChoice&&n===t.choices.length-1&&(o+=" choice-option-open"),Ji("div",{className:o,children:[Ji("input",{type:m,id:"surveyQuestion".concat(r,"Choice").concat(n),name:"question".concat(r),value:i,disabled:!i,onInput:()=>t.hasOpenChoice&&n===t.choices.length-1?p(!d):t.type===_o.SingleChoice?u(i):t.type===_o.MultipleChoice&&lr(c)?c.includes(i)?u(c.filter((e=>e!==i))):u([...c,i]):void 0}),Ji("label",{htmlFor:"surveyQuestion".concat(r,"Choice").concat(n),style:{color:"black"},children:t.hasOpenChoice&&n===t.choices.length-1?Ji(Ho,{children:[Ji("span",{children:[a,":"]}),Ji("input",{type:"text",id:"surveyQuestion".concat(r,"Choice").concat(n,"Open"),name:"question".concat(r),onInput:e=>{var n=e.currentTarget.value;return t.type===_o.SingleChoice?u(n):t.type===_o.MultipleChoice&&lr(c)?f(n):void 0}})]}):a}),Ji("span",{className:"choice-check",style:{color:"black"},children:ia})]})}))}),Ji(sa,{text:t.buttonText||"Submit",submitDisabled:(vr(c)||lr(c)&&!d&&0===c.length||lr(c)&&d&&!h&&0===c.length&&!t.optional)&&!t.optional,appearance:o,onSubmit:()=>{d&&t.type===_o.MultipleChoice?lr(c)&&i([...c,h]):i(c)},onPreviewSubmit:()=>{d&&t.type===_o.MultipleChoice?lr(c)&&a([...c,h]):a(c)}})]})}var ga=[ea,$i,Qi],ya=[ta,ea,$i,Qi,na],ba=[1,2,3,4,5],_a=[1,2,3,4,5,6,7],Ca=[0,1,2,3,4,5,6,7,8,9,10];function Sa(e){switch(e){case 5:default:return ba;case 7:return _a;case 10:return Ca}}var Ia=wr("[Surveys]"),wa=Un,ka=Qn;class Ta{constructor(e){var t=this;o(this,"canShowNextEventBasedSurvey",(()=>{var e,t=ka.querySelectorAll("div[class^=PostHogSurvey]");return!(t.length>0)||1===(null===(e=t[t.length-1].shadowRoot)||void 0===e?void 0:e.childElementCount)})),o(this,"handlePopoverSurvey",(e=>{var t,n=null===(t=e.conditions)||void 0===t?void 0:t.seenSurveyWaitPeriodInDays,r=localStorage.getItem("lastSeenSurveyDate");if(n&&r){var o=new Date,i=Math.abs(o.getTime()-new Date(r).getTime());if(Math.ceil(i/864e5)<n)return}var a=(e=>!!localStorage.getItem(Gi(e))&&!ji(e))(e);if(!a){this.addSurveyToFocus(e.id);var s=((e,t,n)=>{var r=Oi.createElement("div");r.className="PostHogSurvey".concat(t);var o=r.attachShadow({mode:"open"});if(e){var i=Object.assign(Oi.createElement("style"),{innerText:e});o.appendChild(i)}return Oi.body.appendChild(r),o})(Di(null==e?void 0:e.appearance),e.id);ri(Ji(Ma,{posthog:this.posthog,survey:e,removeSurveyFromFocus:this.removeSurveyFromFocus,isPopup:!0},"popover-survey"),s)}})),o(this,"handleWidget",(e=>{var t=function(e){var t,n=Ei.createElement("div");n.className="PostHogWidget".concat(e.id);var r,o=n.attachShadow({mode:"open"}),i=(r=null===(t=e.appearance)||void 0===t?void 0:t.widgetColor,"\n .ph-survey-widget-tab {\n position: fixed;\n top: 50%;\n right: 0;\n background: ".concat(r||"#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: 9999999;\n }\n .ph-survey-widget-tab:hover {\n padding-bottom: 13px;\n }\n .ph-survey-widget-button {\n position: fixed;\n }\n "));return o.append(Object.assign(Ei.createElement("style"),{innerText:i})),Ei.body.appendChild(n),o}(e),n=Di(e.appearance);t.appendChild(Object.assign(ka.createElement("style"),{innerText:n})),ri(Ji(Ea,{posthog:this.posthog,survey:e,removeSurveyFromFocus:this.removeSurveyFromFocus},"feedback-survey"),t)})),o(this,"handleWidgetSelector",(e=>{var t,n=(null===(t=e.appearance)||void 0===t?void 0:t.widgetSelector)&&ka.querySelector(e.appearance.widgetSelector);if(n)if(0===ka.querySelectorAll(".PostHogWidget".concat(e.id)).length)this.handleWidget(e);else if(1===ka.querySelectorAll(".PostHogWidget".concat(e.id)).length&&!n.getAttribute("PHWidgetSurveyClickListener")){var r,o,i=null===(r=ka.querySelector(".PostHogWidget".concat(e.id)))||void 0===r||null===(o=r.shadowRoot)||void 0===o?void 0:o.querySelector(".survey-form");n.addEventListener("click",(()=>{i&&(i.style.display="none"===i.style.display?"block":"none",i.addEventListener("PHSurveyClosed",(()=>{this.removeSurveyFromFocus(e.id),i.style.display="none"})))})),n.setAttribute("PHWidgetSurveyClickListener","true")}})),o(this,"canRenderSurvey",(e=>{var t={visible:!1};return e.end_date?(t.disabledReason="survey was completed on ".concat(e.end_date),t):e.type!=bo.Popover?(t.disabledReason="Only Popover survey types can be rendered",t):!e.linked_flag_key||this.posthog.featureFlags.isFeatureEnabled(e.linked_flag_key)?!e.targeting_flag_key||this.posthog.featureFlags.isFeatureEnabled(e.targeting_flag_key)?!e.internal_targeting_flag_key||this.posthog.featureFlags.isFeatureEnabled(e.internal_targeting_flag_key)?(t.visible=!0,t):(t.disabledReason="internal targeting feature flag ".concat(e.internal_targeting_flag_key," is false"),t):(t.disabledReason="targeting feature flag ".concat(e.targeting_flag_key," is false"),t):(t.disabledReason="linked feature flag ".concat(e.linked_flag_key," is false"),t)})),o(this,"renderSurvey",((e,t)=>{ri(Ji(Ma,{posthog:this.posthog,survey:e,removeSurveyFromFocus:this.removeSurveyFromFocus,isPopup:!1},"popover-survey"),t)})),o(this,"callSurveysAndEvaluateDisplayLogic",(function(){var e,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];null===(e=t.posthog)||void 0===e||e.getActiveMatchingSurveys((e=>{var n=e.filter((e=>"api"!==e.type));t.sortSurveysByAppearanceDelay(n).forEach((e=>{if(vr(t.surveyInFocus)){var n,r,o;if(e.type===bo.Widget)"tab"===(null===(n=e.appearance)||void 0===n?void 0:n.widgetType)&&0===ka.querySelectorAll(".PostHogWidget".concat(e.id)).length&&t.handleWidget(e),"selector"===(null===(r=e.appearance)||void 0===r?void 0:r.widgetType)&&null!==(o=e.appearance)&&void 0!==o&&o.widgetSelector&&t.handleWidgetSelector(e);e.type===bo.Popover&&t.canShowNextEventBasedSurvey()&&t.handlePopoverSurvey(e)}}))}),n)})),o(this,"addSurveyToFocus",(e=>{vr(this.surveyInFocus)||Ia.error("Survey ".concat([...this.surveyInFocus]," already in focus. Cannot add survey ").concat(e,".")),this.surveyInFocus=e})),o(this,"removeSurveyFromFocus",(e=>{this.surveyInFocus!==e&&Ia.error("Survey ".concat(e," is not in focus. Cannot remove survey ").concat(e,".")),this.surveyInFocus=null})),this.posthog=e,this.surveyInFocus=null}sortSurveysByAppearanceDelay(e){return e.sort(((e,t)=>{var n,r;return((null===(n=e.appearance)||void 0===n?void 0:n.surveyPopupDelaySeconds)||0)-((null===(r=t.appearance)||void 0===r?void 0:r.surveyPopupDelaySeconds)||0)}))}getTestAPI(){return{addSurveyToFocus:this.addSurveyToFocus,removeSurveyFromFocus:this.removeSurveyFromFocus,surveyInFocus:this.surveyInFocus,canShowNextEventBasedSurvey:this.canShowNextEventBasedSurvey,handleWidget:this.handleWidget,handlePopoverSurvey:this.handlePopoverSurvey,handleWidgetSelector:this.handleWidgetSelector,sortSurveysByAppearanceDelay:this.sortSurveysByAppearanceDelay}}}function xa(e){if(ka&&wa){var t=new Ta(e);return t.callSurveysAndEvaluateDisplayLogic(!0),setInterval((()=>{t.callSurveysAndEvaluateDisplayLogic(!1)}),1e3),t}}function Ma(e){var n,r,o,i,a,s,{survey:l,forceDisableHtml:c,posthog:u,style:d,previewPageIndex:p,removeSurveyFromFocus:h,isPopup:f,onPreviewSubmit:m=(()=>{})}=e,v=Number.isInteger(p),g=null!==(n=l.appearance)&&void 0!==n&&n.surveyPopupDelaySeconds?1e3*l.appearance.surveyPopupDelaySeconds:0,{isPopupVisible:y,isSurveySent:b,setIsPopupVisible:_}=function(e,t,n,r,o){var[i,a]=yi(r||0===n),[s,l]=yi(!1);return bi((()=>{if(t){if(!r){var i,s=()=>{o(e.id),a(!1)},c=()=>{var t,n;null!==(t=e.appearance)&&void 0!==t&&t.displayThankYouMessage?(l(!0),o(e.id),null!==(n=e.appearance)&&void 0!==n&&n.autoDisappear&&setTimeout((()=>{a(!1)}),5e3)):(o(e.id),a(!1))},u=()=>{var n;a(!0),wa.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===(n=t.get_session_replay_url)||void 0===n?void 0:n.call(t)}),localStorage.setItem("lastSeenSurveyDate",(new Date).toISOString())};return wa.addEventListener("PHSurveyClosed",s),wa.addEventListener("PHSurveySent",c),n>0?(i=setTimeout((()=>{u()}),n),()=>{clearTimeout(i),wa.removeEventListener("PHSurveyClosed",s),wa.removeEventListener("PHSurveySent",c)}):(u(),()=>{wa.removeEventListener("PHSurveyClosed",s),wa.removeEventListener("PHSurveySent",c)})}}else Ia.error("usePopupVisibility hook called without a PostHog instance.")}),[]),{isPopupVisible:i,isSurveySent:s,setIsPopupVisible:a}}(l,u,g,v,h),C=b||p===l.questions.length,S=null!==(r=d)&&void 0!==r&&r.left&&yr(null===(o=d)||void 0===o?void 0:o.left)?{left:d.left-40}:{};return v&&((d=d||{}).left="unset",d.right="unset",d.transform="unset"),y?Ji(Ui.Provider,{value:{isPreviewMode:v,previewPageIndex:p,handleCloseSurveyPopup:()=>qi(l,u,v),isPopup:f||!1,onPreviewSubmit:m},children:C?Ji(ua,{header:(null===(i=l.appearance)||void 0===i?void 0:i.thankYouMessageHeader)||"Thank you!",description:(null===(a=l.appearance)||void 0===a?void 0:a.thankYouMessageDescription)||"",forceDisableHtml:!!c,contentType:null===(s=l.appearance)||void 0===s?void 0:s.thankYouMessageDescriptionContentType,appearance:l.appearance||Bi,styleOverrides:t(t({},d),S),onClose:()=>_(!1)}):Ji(Na,{survey:l,forceDisableHtml:!!c,posthog:u,styleOverrides:d})}):Ji(Ho,{})}function Na(e){var n,r,{survey:o,forceDisableHtml:i,posthog:a,styleOverrides:s}=e,l=Pi((null===(n=o.appearance)||void 0===n?void 0:n.backgroundColor)||Bi.backgroundColor),[c,u]=yi({}),{isPreviewMode:d,previewPageIndex:p,handleCloseSurveyPopup:h,isPopup:f,onPreviewSubmit:m}=Si(Ui),[v,g]=yi(p||0),y=Ci((()=>Yi(o)),[o]);bi((()=>{g(null!=p?p:0)}),[p]);return Ji("form",{className:"survey-form",style:f?t({color:l,borderColor:null===(r=o.appearance)||void 0===r?void 0:r.borderColor},s):{},children:y.map(((e,n)=>{var r,{originalQuestionIndex:s}=e;return(d?v===s:v===n)&&Ji("div",{className:"survey-box",style:f?{backgroundColor:(null===(r=o.appearance)||void 0===r?void 0:r.backgroundColor)||Bi.backgroundColor}:{},children:[f&&Ji(ca,{onClick:()=>h()}),Aa({question:e,forceDisableHtml:i,displayQuestionIndex:n,appearance:o.appearance||Bi,onSubmit:e=>(e=>{var{res:n,originalQuestionIndex:r,displayQuestionIndex:i}=e;if(a){var s=0===r?"$survey_response":"$survey_response_".concat(r);if(u(t(t({},c),{},{[s]:n})),a.getNextSurveyStep){var l=a.getNextSurveyStep(o,i,n);l===Co.End?Zi(t(t({},c),{},{[s]:n}),o,a):g(l)}else i===o.questions.length-1?Zi(t(t({},c),{},{[s]:n}),o,a):g(i+1)}else Ia.error("onNextButtonClick called without a PostHog instance.")})({res:e,originalQuestionIndex:s,displayQuestionIndex:n}),onPreviewSubmit:m})]})}))})}function Ea(e){var t,n,{survey:r,forceDisableHtml:o,posthog:i,readOnly:a,removeSurveyFromFocus:s}=e,[l,c]=yi(!1),[u,d]=yi({}),p=_i(null);return bi((()=>{var e,t;if(i){if(!a){if("tab"===(null===(e=r.appearance)||void 0===e?void 0:e.widgetType)&&p.current){var n,o=p.current.getBoundingClientRect(),s={top:"50%",left:parseInt("".concat(o.right-360)),bottom:"auto",borderRadius:10,borderBottom:"1.5px solid ".concat((null===(n=r.appearance)||void 0===n?void 0:n.borderColor)||"#c9c6c6")};d(s)}if("selector"===(null===(t=r.appearance)||void 0===t?void 0:t.widgetType)){var u=ka.querySelector(r.appearance.widgetSelector||"");null==u||u.addEventListener("click",(()=>{c(!l)})),null==u||u.setAttribute("PHWidgetSurveyClickListener","true")}}}else Ia.error("FeedbackWidget called without a PostHog instance.")}),[]),Ji(Ho,{children:["tab"===(null===(t=r.appearance)||void 0===t?void 0:t.widgetType)&&Ji("div",{className:"ph-survey-widget-tab",ref:p,onClick:()=>!a&&c(!l),style:{color:Pi(r.appearance.widgetColor)},children:[Ji("div",{className:"ph-survey-widget-tab-icon"}),(null===(n=r.appearance)||void 0===n?void 0:n.widgetLabel)||""]}),l&&Ji(Ma,{posthog:i,survey:r,forceDisableHtml:o,style:u,removeSurveyFromFocus:s,isPopup:!0},"feedback-widget-survey")]})}var Aa=e=>{var{question:n,forceDisableHtml:r,displayQuestionIndex:o,appearance:i,onSubmit:a,onPreviewSubmit:s}=e,l={[_o.Open]:pa,[_o.Link]:ha,[_o.Rating]:fa,[_o.SingleChoice]:va,[_o.MultipleChoice]:va},c={question:n,forceDisableHtml:r,appearance:i,onPreviewSubmit:e=>{s(e)},onSubmit:e=>{a(e)}},u={[_o.Open]:{},[_o.Link]:{},[_o.Rating]:{displayQuestionIndex:o},[_o.SingleChoice]:{displayQuestionIndex:o},[_o.MultipleChoice]:{displayQuestionIndex:o}},d=l[n.type],p=t(t({},c),u[n.type]);return Ji(d,t({},p))};function Oa(e){return!hr(Event)&&Ra(e,Event)}function Ra(e,t){try{return e instanceof t}catch(e){return!1}}function La(e){return vr(e)||!pr(e)&&!cr(e)}function Da(e,t){return Object.prototype.toString.call(e)==="[object ".concat(t,"]")}function Fa(e){return Da(e,"DOMError")}er.__PosthogExtensions__=er.__PosthogExtensions__||{},er.__PosthogExtensions__.canActivateRepeatedly=ji,er.__PosthogExtensions__.generateSurveys=xa,er.extendPostHogWithSurveys=xa;var Pa=/\(error: (.*)\)/,Ba=50,Ha="?";function Za(e,t,n,r){var o={platform:"web:javascript",filename:e,function:"<anonymous>"===t?Ha:t,in_app:!0};return hr(n)||(o.lineno=n),hr(r)||(o.colno=r),o}var qa=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Wa=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Va=/\((\S*)(?::(\d+))(?::(\d+))\)/,Ya=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ja=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Ga=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=n.sort(((e,t)=>e[0]-t[0])).map((e=>e[1]));return function(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=[],i=e.split("\n"),a=n;a<i.length;a++){var s=i[a];if(!(s.length>1024)){var l=Pa.test(s)?s.replace(Pa,"$1"):s;if(!l.match(/\S*Error: /)){for(var c of o){var u=c(l);if(u){r.push(u);break}}if(r.length>=Ba)break}}}return function(e){if(!e.length)return[];var n=Array.from(e);return n.reverse(),n.slice(0,Ba).map((e=>t(t({},e),{},{filename:e.filename||za(n).filename,function:e.function||Ha})))}(r)}}(...[[30,e=>{var t=qa.exec(e);if(t){var[,n,r,o]=t;return Za(n,Ha,+r,+o)}var i=Wa.exec(e);if(i){if(i[2]&&0===i[2].indexOf("eval")){var a=Va.exec(i[2]);a&&(i[2]=a[1],i[3]=a[2],i[4]=a[3])}var[s,l]=Ua(i[1]||Ha,i[2]);return Za(l,s,i[3]?+i[3]:void 0,i[4]?+i[4]:void 0)}}],[50,e=>{var t=Ya.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){var n=ja.exec(t[3]);n&&(t[1]=t[1]||"eval",t[3]=n[1],t[4]=n[2],t[5]="")}var r=t[3],o=t[1]||Ha;return[o,r]=Ua(o,r),Za(r,o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]);function za(e){return e[e.length-1]||{}}var Ua=(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]:Ha,n?"safari-extension:".concat(t):"safari-web-extension:".concat(t)]:[e,t]},Xa=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;function Ka(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e.stacktrace||e.stack||"",r=function(e){if(e&&Ja.test(e.message))return 1;return 0}(e);try{var o=Ga(n,r);return o.slice(0,o.length-t)}catch(e){}return[]}var Ja=/Minified React error #\d+;/i;function Qa(e,t){var n,r,o=Ka(e),i=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{$exception_list:[{type:null!=t&&t.overrideExceptionType?t.overrideExceptionType:e.name,value:null!=t&&t.overrideExceptionMessage?t.overrideExceptionMessage:function(e){var t=e.message;if(t.error&&"string"==typeof t.error.message)return t.error.message;return t}(e),stacktrace:{frames:o,type:"raw"},mechanism:{handled:i,synthetic:a}}],$exception_level:"error"}}function $a(e,t){var n,r,o,i=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!==(o=null==t?void 0:t.defaultExceptionType)&&void 0!==o?o:"Error",value:null!=t&&t.overrideExceptionMessage?t.overrideExceptionMessage:e||(null==t?void 0:t.defaultExceptionMessage),mechanism:{handled:i,synthetic:a}};if(null!=t&&t.syntheticException){var l=Ka(t.syntheticException,1);l.length&&(s.stacktrace={frames:l,type:"raw"})}return{$exception_list:[s],$exception_level:"error"}}function es(e){return fr(e)&&!mr(e)&&tr.indexOf(e)>=0}function ts(e,t){var n,r,o=null===(n=null==t?void 0:t.handled)||void 0===n||n,i=null===(r=null==t?void 0:t.synthetic)||void 0===r||r,a=null!=t&&t.overrideExceptionType?t.overrideExceptionType:Oa(e)?e.constructor.name:"Error",s=null!=t&&t.overrideExceptionMessage?t.overrideExceptionMessage:"Non-Error ".concat("exception"," captured with keys: ",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:40,n=Object.keys(e);if(n.sort(),!n.length)return"[object has no keys]";for(var r=n.length;r>0;r--){var o=n.slice(0,r).join(", ");if(!(o.length>t))return r===n.length||o.length<=t?o:"".concat(o.slice(0,t),"...")}return""}(e)),l={type:a,value:s,mechanism:{handled:o,synthetic:i}};if(null!=t&&t.syntheticException){var c=Ka(null==t?void 0:t.syntheticException,1);c.length&&(l.stacktrace={frames:c,type:"raw"})}return{$exception_list:[l],$exception_level:es(e.level)?e.level:"error"}}function ns(e,n){var[r,o,i,a,s]=e,l={$exception_list:[]},c=s||r;if(Fa(c)||function(e){return Da(e,"DOMException")}(c)){var u=c;if(function(e){return"stack"in e}(c))l=Qa(c,n);else{var d=u.name||(Fa(u)?"DOMError":"DOMException"),p=u.message?"".concat(d,": ").concat(u.message):d,h=Fa(u)?"DOMError":"DOMException";l=$a(p,t(t({},n),{},{overrideExceptionType:h,defaultExceptionMessage:p}))}return"code"in u&&(l.$exception_DOMException_code="".concat(u.code)),l}if(function(e){return Da(e,"ErrorEvent")}(c)&&c.error)return Qa(c.error,n);if(function(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object DOMError]":return!0;default:return Ra(e,Error)}}(c))return Qa(c,n);if(function(e){return Da(e,"Object")}(c)||Oa(c))return ts(c,n);if(hr(s)&&fr(r)){var f="Error",m=r,v=r.match(Xa);return v&&(f=v[1],m=v[2]),$a(m,t(t({},n),{},{overrideExceptionType:f,defaultExceptionMessage:m}))}return $a(c,n)}function rs(e){var[t]=e,n=function(e){if(La(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 La(n)?$a("Non-Error promise rejection captured with value: ".concat(String(n)),{handled:!1,synthetic:!1,overrideExceptionType:"UnhandledRejection"}):ns([n],{handled:!1,overrideExceptionType:"UnhandledRejection",defaultExceptionMessage:String(n)})}var os=wr("[ExceptionAutocapture]"),is={wrapOnError:e=>{var t=Un;t||os.info("window not available, cannot wrap onerror");var n=t.onerror;return t.onerror=function(){for(var t,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];var a=ns(o);return e(a),null!==(t=null==n?void 0:n(...o))&&void 0!==t&&t},t.onerror.__POSTHOG_INSTRUMENTED__=!0,()=>{var e;null===(e=t.onerror)||void 0===e||delete e.__POSTHOG_INSTRUMENTED__,t.onerror=n}},wrapUnhandledRejection:e=>{var t=Un;t||os.info("window not available, cannot wrap onUnhandledRejection");var n=t.onunhandledrejection;return t.onunhandledrejection=function(){for(var r,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var s=rs(i);return e(s),null!==(r=null==n?void 0:n.apply(t,i))&&void 0!==r&&r},t.onunhandledrejection.__POSTHOG_INSTRUMENTED__=!0,()=>{var e;null===(e=t.onunhandledrejection)||void 0===e||delete e.__POSTHOG_INSTRUMENTED__,t.onunhandledrejection=n}}};er.__PosthogExtensions__=er.__PosthogExtensions__||{},er.__PosthogExtensions__.errorWrappingFunctions=is,er.__PosthogExtensions__.parseErrorAsProperties=ns,er.posthogErrorWrappingFunctions=is,er.parseErrorAsProperties=ns;var as=(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)}};er.__PosthogExtensions__=er.__PosthogExtensions__||{};var ss={_patchFetch:e=>Qr(Un,"fetch",(t=>function(){var n=r((function*(n,r){var o=new Request(n,r);return as(e,o),t(o)}));return function(e,t){return n.apply(this,arguments)}}())),_patchXHR:e=>Qr(Un.XMLHttpRequest.prototype,"open",(t=>function(n,r){var o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0,s=new Request(r);return as(e,s),t.call(this,n,s.url,o,i,a)}))};er.__PosthogExtensions__.tracingHeadersPatchFns=ss,er.postHogTracingHeadersPatchFns=ss;var ls,cs,us,ds=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},ps=function(e){if("loading"===document.readyState)return"loading";var t=ds();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"},hs=function(e){var t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},fs=function(e,t){var n="";try{for(;e&&9!==e.nodeType;){var r=e,o=r.id?"#"+r.id:hs(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+o.length>(t||100)-1)return n||o;if(n=n?o+">"+n:o,r.id)break;e=r.parentNode}}catch(e){}return n},ms=-1,vs=function(){return ms},gs=function(e){addEventListener("pageshow",(function(t){t.persisted&&(ms=t.timeStamp,e(t))}),!0)},ys=function(){var e=ds();return e&&e.activationStart||0},bs=function(e,t){var n=ds(),r="navigate";return vs()>=0?r="back-forward-cache":n&&(document.prerendering||ys()>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}},_s=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){}},Cs=function(e,t,n,r){var o,i;return function(a){t.value>=0&&(a||r)&&((i=t.value-(o||0))||void 0===o)&&(o=t.value,t.delta=i,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,n),e(t))}},Ss=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},Is=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},ws=function(e){var t=!1;return function(){t||(e(),t=!0)}},ks=-1,Ts=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},xs=function(e){"hidden"===document.visibilityState&&ks>-1&&(ks="visibilitychange"===e.type?e.timeStamp:0,Ns())},Ms=function(){addEventListener("visibilitychange",xs,!0),addEventListener("prerenderingchange",xs,!0)},Ns=function(){removeEventListener("visibilitychange",xs,!0),removeEventListener("prerenderingchange",xs,!0)},Es=function(){return ks<0&&(ks=Ts(),Ms(),gs((function(){setTimeout((function(){ks=Ts(),Ms()}),0)}))),{get firstHiddenTime(){return ks}}},As=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},Os=[1800,3e3],Rs=function(e,t){t=t||{},As((function(){var n,r=Es(),o=bs("FCP"),i=_s("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(i.disconnect(),e.startTime<r.firstHiddenTime&&(o.value=Math.max(e.startTime-ys(),0),o.entries.push(e),n(!0)))}))}));i&&(n=Cs(e,o,Os,t.reportAllChanges),gs((function(r){o=bs("FCP"),n=Cs(e,o,Os,t.reportAllChanges),Ss((function(){o.value=performance.now()-r.timeStamp,n(!0)}))})))}))},Ls=[.1,.25],Ds=0,Fs=1/0,Ps=0,Bs=function(e){e.forEach((function(e){e.interactionId&&(Fs=Math.min(Fs,e.interactionId),Ps=Math.max(Ps,e.interactionId),Ds=Ps?(Ps-Fs)/7+1:0)}))},Hs=function(){"interactionCount"in performance||ls||(ls=_s("event",Bs,{type:"event",buffered:!0,durationThreshold:0}))},Zs=[],qs=new Map,Ws=0,Vs=function(){return(ls?Ds:performance.interactionCount||0)-Ws},Ys=[],js=function(e){if(Ys.forEach((function(t){return t(e)})),e.interactionId||"first-input"===e.entryType){var t=Zs[Zs.length-1],n=qs.get(e.interactionId);if(n||Zs.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]};qs.set(r.id,r),Zs.push(r)}Zs.sort((function(e,t){return t.latency-e.latency})),Zs.length>10&&Zs.splice(10).forEach((function(e){return qs.delete(e.id)}))}}},Gs=function(e){var t=self.requestIdleCallback||self.setTimeout,n=-1;return e=ws(e),"hidden"===document.visibilityState?e():(n=t(e),Is(e)),n},zs=[200,500],Us=[],Xs=[],Ks=new WeakMap,Js=new Map,Qs=-1,$s=function(e){Us=Us.concat(e),el()},el=function(){Qs<0&&(Qs=Gs(tl))},tl=function(){Js.size>10&&Js.forEach((function(e,t){qs.has(t)||Js.delete(t)}));var e=Zs.map((function(e){return Ks.get(e.entries[0])})),t=Xs.length-50;Xs=Xs.filter((function(n,r){return r>=t||e.includes(n)}));for(var n=new Set,r=0;r<Xs.length;r++){var o=Xs[r];nl(o.startTime,o.processingEnd).forEach((function(e){n.add(e)}))}for(var i=0;i<50;i++){var a=Us[Us.length-1-i];if(!a||a.startTime<us)break;n.add(a)}Us=Array.from(n),Qs=-1};Ys.push((function(e){e.interactionId&&e.target&&!Js.has(e.interactionId)&&Js.set(e.interactionId,e.target)}),(function(e){var t,n=e.startTime+e.duration;us=Math.max(us,e.processingEnd);for(var r=Xs.length-1;r>=0;r--){var o=Xs[r];if(Math.abs(n-o.renderTime)<=8){(t=o).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]},Xs.push(t)),(e.interactionId||"first-input"===e.entryType)&&Ks.set(e,t),el()}));var nl=function(e,t){for(var n,r=[],o=0;n=Us[o];o++)if(!(n.startTime+n.duration<e)){if(n.startTime>t)break;r.push(n)}return r},rl=[2500,4e3],ol={},il={onLCP:function(e,t){!function(e,t){t=t||{},As((function(){var n,r=Es(),o=bs("LCP"),i=function(e){t.reportAllChanges||(e=e.slice(-1)),e.forEach((function(e){e.startTime<r.firstHiddenTime&&(o.value=Math.max(e.startTime-ys(),0),o.entries=[e],n())}))},a=_s("largest-contentful-paint",i);if(a){n=Cs(e,o,rl,t.reportAllChanges);var s=ws((function(){ol[o.id]||(i(a.takeRecords()),a.disconnect(),ol[o.id]=!0,n(!0))}));["keydown","click"].forEach((function(e){addEventListener(e,(function(){return Gs(s)}),!0)})),Is(s),gs((function(r){o=bs("LCP"),n=Cs(e,o,rl,t.reportAllChanges),Ss((function(){o.value=performance.now()-r.timeStamp,ol[o.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=ds();if(n){var r=n.activationStart||0,o=e.entries[e.entries.length-1],i=o.url&&performance.getEntriesByType("resource").filter((function(e){return e.name===o.url}))[0],a=Math.max(0,n.responseStart-r),s=Math.max(a,i?(i.requestStart||i.startTime)-r:0),l=Math.max(s,i?i.responseEnd-r:0),c=Math.max(l,o.startTime-r);t={element:fs(o.element),timeToFirstByte:a,resourceLoadDelay:s-a,resourceLoadDuration:l-s,elementRenderDelay:c-l,navigationEntry:n,lcpEntry:o},o.url&&(t.url=o.url),i&&(t.lcpResourceEntry=i)}}return Object.assign(e,{attribution:t})}(t);e(n)}),t)},onCLS:function(e,t){!function(e,t){t=t||{},Rs(ws((function(){var n,r=bs("CLS",0),o=0,i=[],a=function(e){e.forEach((function(e){if(!e.hadRecentInput){var t=i[0],n=i[i.length-1];o&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(o+=e.value,i.push(e)):(o=e.value,i=[e])}})),o>r.value&&(r.value=o,r.entries=i,n())},s=_s("layout-shift",a);s&&(n=Cs(e,r,Ls,t.reportAllChanges),Is((function(){a(s.takeRecords()),n(!0)})),gs((function(){o=0,r=bs("CLS",0),n=Cs(e,r,Ls,t.reportAllChanges),Ss((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 o=(t=r.sources).find((function(e){return e.node&&1===e.node.nodeType}))||t[0];o&&(n={largestShiftTarget:fs(o.node),largestShiftTime:r.startTime,largestShiftValue:r.value,largestShiftSource:o,largestShiftEntry:r,loadState:ps(r.startTime)})}}return Object.assign(e,{attribution:n})}(t);e(n)}),t)},onFCP:function(e,t){Rs((function(t){var n=function(e){var t={timeToFirstByte:0,firstByteToFCP:e.value,loadState:ps(vs())};if(e.entries.length){var n=ds(),r=e.entries[e.entries.length-1];if(n){var o=n.activationStart||0,i=Math.max(0,n.responseStart-o);t={timeToFirstByte:i,firstByteToFCP:e.value-i,loadState:ps(e.entries[0].startTime),navigationEntry:n,fcpEntry:r}}}return Object.assign(e,{attribution:t})}(t);e(n)}),t)},onINP:function(e,t){cs||(cs=_s("long-animation-frame",$s)),function(e,t){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(t=t||{},As((function(){var n;Hs();var r,o=bs("INP"),i=function(e){Gs((function(){e.forEach(js);var t,n=(t=Math.min(Zs.length-1,Math.floor(Vs()/50)),Zs[t]);n&&n.latency!==o.value&&(o.value=n.latency,o.entries=n.entries,r())}))},a=_s("event",i,{durationThreshold:null!==(n=t.durationThreshold)&&void 0!==n?n:40});r=Cs(e,o,zs,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),Is((function(){i(a.takeRecords()),r(!0)})),gs((function(){Ws=0,Zs.length=0,qs.clear(),o=bs("INP"),r=Cs(e,o,zs,t.reportAllChanges)})))})))}((function(t){var n=function(e){var t=e.entries[0],n=Ks.get(t),r=t.processingStart,o=n.processingEnd,i=n.entries.sort((function(e,t){return e.processingStart-t.processingStart})),a=nl(t.startTime,o),s=e.entries.find((function(e){return e.target})),l=s&&s.target||Js.get(t.interactionId),c=[t.startTime+t.duration,o].concat(a.map((function(e){return e.startTime+e.duration}))),u=Math.max.apply(Math,c),d={interactionTarget:fs(l),interactionTargetElement:l,interactionType:t.name.startsWith("key")?"keyboard":"pointer",interactionTime:t.startTime,nextPaintTime:u,processedEventEntries:i,longAnimationFrameEntries:a,inputDelay:r-t.startTime,processingDuration:o-r,presentationDelay:Math.max(u-o,0),loadState:ps(t.startTime)};return Object.assign(e,{attribution:d})}(t);e(n)}),t)}};function al(e,t){return t.length>e?t.slice(0,e)+"...":t}function sl(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do{t=t.previousSibling}while(t&&!Ar(t));return t}function ll(e,t,n,r){var o=e.tagName.toLowerCase(),i={tag_name:o};Fr.indexOf(o)>-1&&!n&&("a"===o.toLowerCase()||"button"===o.toLowerCase()?i.$el_text=al(1024,Gr(e)):i.$el_text=al(1024,Dr(e)));var a=Lr(e);a.length>0&&(i.classes=a.filter((function(e){return""!==e}))),xr(e.attributes,(function(n){var o;if((!Br(e)||-1!==["name","id","class","aria-label"].indexOf(n.name))&&((null==r||!r.includes(n.name))&&!t&&jr(n.value)&&(o=n.name,!fr(o)||"_ngcontent"!==o.substring(0,10)&&"_nghost"!==o.substring(0,7)))){var a=n.value;"class"===n.name&&(a=Rr(a).join(" ")),i["attr__"+n.name]=al(1024,a)}}));for(var s=1,l=1,c=e;c=sl(c);)s++,c.tagName===e.tagName&&l++;return i.nth_child=s,i.nth_of_type=l,i}function cl(e,t){for(var n,r,o,{e:i,maskAllElementAttributes:a,maskAllText:s,elementAttributeIgnoreList:l,elementsChainAsString:c}=t,u=[e],d=e;d.parentNode&&!Or(d,"body");)(o=d.parentNode)&&11===o.nodeType?(u.push(d.parentNode.host),d=d.parentNode.host):(u.push(d.parentNode),d=d.parentNode);var p,h,f,m=[],v={},g=!1,y=!1;if(xr(u,(e=>{var t=Pr(e);"a"===e.tagName.toLowerCase()&&(g=e.getAttribute("href"),g=t&&g&&jr(g)&&g),nr(Lr(e),"ph-no-capture")&&(y=!0),m.push(ll(e,a,s,l));var n=function(e){if(!Pr(e))return{};var t={};return xr(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&&jr(r)&&(t[n]=r)}})),t}(e);Mr(v,n)})),y)return{props:{},explicitNoCapture:y};if(s||("a"===e.tagName.toLowerCase()||"button"===e.tagName.toLowerCase()?m[0].$el_text=Gr(e):m[0].$el_text=Dr(e)),g){var b,_;m[0].attr__href=g;var C=null===(h=g,f=null==Qn?void 0:Qn.createElement("a"),b=hr(f)?null:(f.href=h,f))||void 0===b?void 0:b.host,S=null==Un||null===(_=Un.location)||void 0===_?void 0:_.host;C&&S&&C!==S&&(p=g)}return{props:Mr({$event_type:i.type,$ce_version:1},c?{}:{$elements:m},{$elements_chain:Ur(m)},null!==(n=m[0])&&void 0!==n&&n.$el_text?{$el_text:null===(r=m[0])||void 0===r?void 0:r.$el_text}:{},p&&"click"===i.type?{$external_click_url:p}:{},v)}}er.__PosthogExtensions__=er.__PosthogExtensions__||{},er.__PosthogExtensions__.postHogWebVitalsCallbacks=il,er.postHogWebVitalsCallbacks=il;var ul={};function dl(e){return function(e,t){var n=ul[e];if(n)return n;var r=t[e];if(ur(r)&&!dr())return ul[e]=r.bind(t);var o=t.document;if(o&&cr(o.createElement))try{var i=o.createElement("iframe");i.hidden=!0,o.head.appendChild(i);var a=i.contentWindow;a&&a[e]&&(r=a[e]),o.head.removeChild(i)}catch(t){Ir.warn("Could not create sandbox iframe for ".concat(e," check, bailing to assignableWindow.").concat(e,": "),t)}return r&&cr(r)?ul[e]=r.bind(t):r}("MutationObserver",e)}function pl(e){var t=function(e){return hr(e.target)?e.srcElement||null:null!==(t=e.target)&&void 0!==t&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t}(e);return t?{node:t,originalEvent:e,timestamp:Date.now()}:null}function hl(e,t){return yr(e)&&e>=t}class fl{asRequiredConfig(e){var t,n,r,o,i=this._defaultConfig((null==e?void 0:e.__onCapture)||this._captureDeadClick.bind(this));return{element_attribute_ignorelist:null!==(t=null==e?void 0:e.element_attribute_ignorelist)&&void 0!==t?t:i.element_attribute_ignorelist,scroll_threshold_ms:null!==(n=null==e?void 0:e.scroll_threshold_ms)&&void 0!==n?n:i.scroll_threshold_ms,selection_change_threshold_ms:null!==(r=null==e?void 0:e.selection_change_threshold_ms)&&void 0!==r?r:i.selection_change_threshold_ms,mutation_threshold_ms:null!==(o=null==e?void 0:e.mutation_threshold_ms)&&void 0!==o?o:i.mutation_threshold_ms,__onCapture:i.__onCapture}}constructor(e,t){o(this,"_clicks",[]),o(this,"_defaultConfig",(e=>({element_attribute_ignorelist:[],scroll_threshold_ms:100,selection_change_threshold_ms:100,mutation_threshold_ms:2500,__onCapture:e}))),o(this,"_onClick",(e=>{var t=pl(e);vr(t)||this._ignoreClick(t)||this._clicks.push(t),this._clicks.length&&hr(this._checkClickTimer)&&(this._checkClickTimer=er.setTimeout((()=>{this._checkClicks()}),1e3))})),o(this,"_onScroll",(()=>{var e=Date.now();e%50==0&&this._clicks.forEach((t=>{hr(t.scrollDelayMs)&&(t.scrollDelayMs=e-t.timestamp)}))})),o(this,"_onSelectionChange",(()=>{this._lastSelectionChanged=Date.now()})),this.instance=e,this._config=this.asRequiredConfig(t),this._onCapture=this._config.__onCapture}start(e){this._startClickObserver(),this._startScrollObserver(),this._startSelectionChangedObserver(),this._startMutationObserver(e)}_startMutationObserver(e){if(!this._mutationObserver){var t=dl(er);this._mutationObserver=new t((e=>{this.onMutation(e)})),this._mutationObserver.observe(e,{attributes:!0,characterData:!0,childList:!0,subtree:!0})}}stop(){var e;null===(e=this._mutationObserver)||void 0===e||e.disconnect(),this._mutationObserver=void 0,er.removeEventListener("click",this._onClick),er.removeEventListener("scroll",this._onScroll,{capture:!0}),er.removeEventListener("selectionchange",this._onSelectionChange)}onMutation(e){this._lastMutation=Date.now()}_startClickObserver(){er.addEventListener("click",this._onClick)}_startScrollObserver(){er.addEventListener("scroll",this._onScroll,{capture:!0,passive:!0})}_startSelectionChangedObserver(){er.addEventListener("selectionchange",this._onSelectionChange)}_ignoreClick(e){if(!e)return!0;if((t=e.node)instanceof Element&&("__POSTHOG_TOOLBAR__"===t.id||null!==(n=t.closest)&&void 0!==n&&n.call(t,".toolbar-global-fade-container")))return!0;var t,n,r=this._clicks.some((t=>t.node===e.node&&Math.abs(t.timestamp-e.timestamp)<1e3));return!!r||!(!Or(e.node,"html")&&Ar(e.node)&&!Fr.includes(e.node.tagName.toLowerCase()))}_checkClicks(){if(this._clicks.length){clearTimeout(this._checkClickTimer),this._checkClickTimer=void 0;var e=this._clicks;for(var t of(this._clicks=[],e)){var n;t.mutationDelayMs=null!==(n=t.mutationDelayMs)&&void 0!==n?n:this._lastMutation&&t.timestamp<=this._lastMutation?this._lastMutation-t.timestamp:void 0,t.absoluteDelayMs=Date.now()-t.timestamp,t.selectionChangedDelayMs=this._lastSelectionChanged&&t.timestamp<=this._lastSelectionChanged?this._lastSelectionChanged-t.timestamp:void 0;var r=hl(t.scrollDelayMs,this._config.scroll_threshold_ms),o=hl(t.selectionChangedDelayMs,this._config.selection_change_threshold_ms),i=hl(t.mutationDelayMs,this._config.mutation_threshold_ms),a=hl(t.absoluteDelayMs,1.1*this._config.mutation_threshold_ms),s=yr(t.scrollDelayMs)&&t.scrollDelayMs<this._config.scroll_threshold_ms,l=yr(t.mutationDelayMs)&&t.mutationDelayMs<this._config.mutation_threshold_ms,c=yr(t.selectionChangedDelayMs)&&t.selectionChangedDelayMs<this._config.selection_change_threshold_ms;s||l||c||(r||i||a||o?this._onCapture(t,{$dead_click_last_mutation_timestamp:this._lastMutation,$dead_click_event_timestamp:t.timestamp,$dead_click_scroll_timeout:r,$dead_click_mutation_timeout:i,$dead_click_absolute_timeout:a,$dead_click_selection_changed_timeout:o}):t.absoluteDelayMs<this._config.mutation_threshold_ms&&this._clicks.push(t))}this._clicks.length&&hr(this._checkClickTimer)&&(this._checkClickTimer=er.setTimeout((()=>{this._checkClicks()}),1e3))}}_captureDeadClick(e,n){this.instance.capture("$dead_click",t(t(t({},n),cl(e.node,{e:e.originalEvent,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this._config.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)})}}er.__PosthogExtensions__=er.__PosthogExtensions__||{},er.__PosthogExtensions__.initDeadClicksAutocapture=(e,t)=>new fl(e,t)}();
1
+ !function(){"use strict";function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?e(Object(r),!0).forEach((function(e){o(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function n(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}function r(e){return function(){var t=this,r=arguments;return new Promise((function(o,i){var a=e.apply(t,r);function s(e){n(a,o,i,s,l,"next",e)}function l(e){n(a,o,i,s,l,"throw",e)}s(void 0)}))}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var a,s=["type"],l=Object.defineProperty,c=(e,t,n)=>((e,t,n)=>t in e?l(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),u=Object.defineProperty,d=(e,t,n)=>((e,t,n)=>t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),p=(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))(p||{}),h={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},f={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]};var m={};function v(e){if(m[e])return m[e];var t=function(e){var t,n,r=null===globalThis||void 0===globalThis||null===(t=globalThis.Zone)||void 0===t||null===(n=t.__symbol__)||void 0===n?void 0:n.call(t,e);return r&&globalThis[r]?globalThis[r]:void 0}(e)||globalThis[e],n=t.prototype,r=e in h?h[e]:void 0,o=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]"))}))),i=e in f?f[e]:void 0,a=Boolean(i&&i.every((e=>{var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))})));if(o&&a)return m[e]=t.prototype,t.prototype;try{var s=document.createElement("iframe");document.body.appendChild(s);var l=s.contentWindow;if(!l)return t.prototype;var c=l[e].prototype;return document.body.removeChild(s),c?m[e]=c:t.prototype}catch(e){return t.prototype}}var g={};function y(e,t,n){var r,o="".concat(e,".").concat(String(n));if(g[o])return g[o].call(t);var i=v(e),a=null==(r=Object.getOwnPropertyDescriptor(i,n))?void 0:r.get;return a?(g[o]=a,a.call(t)):t[n]}var b={};function _(e,t,n){var r="".concat(e,".").concat(String(n));if(b[r])return b[r].bind(t);var o=v(e)[n];return"function"!=typeof o?t[n]:(b[r]=o,o.bind(t))}var C={childNodes:function(e){return y("Node",e,"childNodes")},parentNode:function(e){return y("Node",e,"parentNode")},parentElement:function(e){return y("Node",e,"parentElement")},textContent:function(e){return y("Node",e,"textContent")},contains:function(e,t){return _("Node",e,"contains")(t)},getRootNode:function(e){return _("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?y("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?y("Element",e,"shadowRoot"):null},querySelector:function(e,t){return y("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return y("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return v("MutationObserver").constructor}};function S(e){return e.nodeType===e.ELEMENT_NODE}function I(e){var t=e&&"host"in e&&"mode"in e&&C.host(e)||null;return Boolean(t&&"shadowRoot"in t&&C.shadowRoot(t)===e)}function w(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function k(e){try{var t=e.rules||e.cssRules;if(!t)return null;var n=e.href;!n&&e.ownerNode&&e.ownerNode.ownerDocument&&(n=e.ownerNode.ownerDocument.location.href);var r=Array.from(t,(e=>T(e,n))).join("");return(o=r).includes(" background-clip: text;")&&!o.includes(" -webkit-background-clip: text;")&&(o=o.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),o}catch(e){return null}var o}function T(e,t){if(function(e){return"styleSheet"in e}(e)){var n;try{n=k(e.styleSheet)||function(e){var{cssText:t}=e;if(t.split('"').length<3)return t;var n=["@import","url(".concat(JSON.stringify(e.href),")")];return""===e.layerName?n.push("layer"):e.layerName&&n.push("layer(".concat(e.layerName,")")),e.supportsText&&n.push("supports(".concat(e.supportsText,")")),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}(e)}catch(t){n=e.cssText}return e.styleSheet.href?B(n,e.styleSheet.href):n}var r,o=e.cssText;return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(r=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,o=o.replace(r,"$1\\$2")),t?B(o,t):o}function x(e,t){return Array.from(e.styleSheets).find((e=>e.href===t))}let M=class{constructor(){d(this,"idNodeMap",new Map),d(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 N(e){var{element:t,maskInputOptions:n,tagName:r,type:o,value:i,maskInputFn:a}=e,s=i||"",l=o&&E(o);return(n[r.toLowerCase()]||l&&n[l])&&(s=a?a(s,t):"*".repeat(s.length)),s}function E(e){return e.toLowerCase()}var A="__rrweb_original__";function O(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?E(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 o=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(n=null==o?void 0:o[1])&&void 0!==n?n:null}var L=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,D=/^(?:[a-z+]+:)?\/\//i,F=/^www\..*/i,P=/^(data:)([^,]*),(.*)/i;function B(e,t){return(e||"").replace(L,((e,n,r,o,i,a)=>{var s,l=r||i||a,c=n||o||"";if(!l)return e;if(D.test(l)||F.test(l))return"url(".concat(c).concat(l).concat(c,")");if(P.test(l))return"url(".concat(c).concat(l).concat(c,")");if("/"===l[0])return"url(".concat(c).concat((s=t,(s.indexOf("//")>-1?s.split("/").slice(0,3).join("/"):s.split("/")[0]).split("?")[0]+l)).concat(c,")");var u=t.split("/"),d=l.split("/");for(var p of(u.pop(),d))"."!==p&&(".."===p?u.pop():u.push(p));return"url(".concat(c).concat(u.join("/")).concat(c,")")}))}var H=new Map,Z=new Map;function q(e){if(!H.has(e)){var t=e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"");H.set(e,t)}return H.get(e)}function W(e,t){return function(e,t){var n=Array.from(t.childNodes),r=[],o=0,i=e;if(n.length>1&&e&&"string"==typeof e){if(Z.has(e))return Z.get(e);for(var a=q(e),s=a.length/e.length,l=1;l<n.length;l++)if(n[l].textContent&&"string"==typeof n[l].textContent){for(var c=q(n[l].textContent),u=3;u<c.length&&(c[u].match(/[a-zA-Z0-9]/)||-1!==c.indexOf(c.substring(0,u),1));u++);for(;u<c.length;u++){var d=c.substring(0,u),p=a.split(d),h=-1;if(2===p.length?h=a.indexOf(d):p.length>2&&""===p[0]&&""!==n[l-1].textContent&&(h=a.indexOf(d,1)),-1!==h){for(var f=Math.floor(h/s);f>0&&f<e.length;){if((o+=1)>50*n.length)return r.push(e),r;var m=q(e.substring(0,f));if(m.length===h){r.push(e.substring(0,f)),e=e.substring(f),a=a.substring(h);break}m.length<h?f+=Math.max(1,Math.floor((h-m.length)/s)):f-=Math.max(1,Math.floor((m.length-h)*s))}break}}}}return r.push(e),i&&Z.set(i,r),r}(e,t).join("/* rr_split */")}var V,Y,j=1,G=new RegExp("[^a-z0-9-_:]"),z=-2;function U(){return j++}var X=/^[^ \t\n\r\u000c]+/,K=/^[, \t\n\r\u000c]+/;var J=new WeakMap;function Q(e,t){return t&&""!==t.trim()?ee(e,t):t}function $(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function ee(e,t){var n=J.get(e);if(n||(n=e.createElement("a"),J.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function te(e,t,n,r){return r?"src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?Q(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,o=e.exec(t.substring(n));return o?(r=o[0],n+=r.length,r):""}for(var o=[];r(K),!(n>=t.length);){var i=r(X);if(","===i.slice(-1))i=Q(e,i.substring(0,i.length-1)),o.push(i);else{var a="";i=Q(e,i);for(var s=!1;;){var l=t.charAt(n);if(""===l){o.push((i+a).trim());break}if(s)")"===l&&(s=!1);else{if(","===l){n+=1,o.push((i+a).trim());break}"("===l&&(s=!0)}a+=l,n+=1}}}return o.join(", ")}(e,r):"style"===n?B(r,ee(e)):"object"===t&&"data"===n?Q(e,r):r:Q(e,r):r}function ne(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function re(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&re(C.parentNode(e),t,n);for(var r=e.classList.length;r--;){var o=e.classList[r];if(t.test(o))return!0}return!!n&&re(C.parentNode(e),t,n)}function oe(e,t,n,r){var o;if(S(e)){if(o=e,!C.childNodes(o).length)return!1}else{if(null===C.parentElement(e))return!1;o=C.parentElement(e)}try{if("string"==typeof t){if(r){if(o.closest(".".concat(t)))return!0}else if(o.classList.contains(t))return!0}else if(re(o,t,r))return!0;if(n)if(r){if(o.closest(n))return!0}else if(o.matches(n))return!0}catch(e){}return!1}function ie(e,t){var{doc:n,mirror:r,blockClass:o,blockSelector:i,needsMask:a,inlineStylesheet:s,maskInputOptions:l={},maskTextFn:c,maskInputFn:u,dataURLOptions:d={},inlineImages:h,recordCanvas:f,keepIframeSrcFn:m,newlyAddedElement:v=!1,cssCaptured:g=!1}=t,y=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:p.Document,childNodes:[],compatMode:e.compatMode}:{type:p.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:p.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:y};case e.ELEMENT_NODE:return function(e,t){for(var n,{doc:r,blockClass:o,blockSelector:i,inlineStylesheet:a,maskInputOptions:s={},maskInputFn:l,dataURLOptions:c={},inlineImages:u,recordCanvas:d,keepIframeSrcFn:h,newlyAddedElement:f=!1,rootId:m}=t,v=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 o=e.classList[r];if(t.test(o))return!0}if(n)return e.matches(n)}catch(e){}return!1}(e,o,i),g=function(e){if(e instanceof HTMLFormElement)return"form";var t=E(e.tagName);return G.test(t)?"div":t}(e),y={},b=e.attributes.length,_=0;_<b;_++){var C=e.attributes[_];ne(g,C.name,C.value)||(y[C.name]=te(r,g,E(C.name),C.value))}if("link"===g&&a){var S=e.href;if(S){var I=x(r,S);if(!I&&S.includes(".css"))I=x(r,window.location.origin+"/"+S.replace(window.location.href,""));var w=null;I&&(w=k(I)),w&&(delete y.rel,delete y.href,y._cssText=w)}}if("style"===g&&e.sheet){var T=k(e.sheet);T&&(e.childNodes.length>1&&(T=W(T,e)),y._cssText=T)}if("input"===g||"textarea"===g||"select"===g){var M=e.value,R=e.checked;"radio"!==y.type&&"checkbox"!==y.type&&"submit"!==y.type&&"button"!==y.type&&M?y.value=N({element:e,type:O(e),tagName:g,value:M,maskInputOptions:s,maskInputFn:l}):R&&(y.checked=R)}"option"===g&&(e.selected&&!s.select?y.selected=!0:delete y.selected);if("dialog"===g&&e.open)try{y.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"}catch(e){y.rr_open_mode="modal",y.ph_rr_could_not_detect_modal=!0}if("canvas"===g&&d)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 o=t.getImageData,i=A in o?o[A]:o;if(new Uint32Array(i.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)||(y.rr_dataURL=e.toDataURL(c.type,c.quality));else if(!("__context"in e)){var L=e.toDataURL(c.type,c.quality),D=r.createElement("canvas");D.width=e.width,D.height=e.height,L!==D.toDataURL(c.type,c.quality)&&(y.rr_dataURL=L)}if("img"===g&&u){V||(V=r.createElement("canvas"),Y=V.getContext("2d"));var F=e,P=F.currentSrc||F.getAttribute("src")||"<unknown-src>",B=F.crossOrigin,H=()=>{F.removeEventListener("load",H);try{V.width=F.naturalWidth,V.height=F.naturalHeight,Y.drawImage(F,0,0),y.rr_dataURL=V.toDataURL(c.type,c.quality)}catch(e){if("anonymous"!==F.crossOrigin)return F.crossOrigin="anonymous",void(F.complete&&0!==F.naturalWidth?H():F.addEventListener("load",H));console.warn("Cannot inline img src=".concat(P,"! Error: ").concat(e))}"anonymous"===F.crossOrigin&&(B?y.crossOrigin=B:F.removeAttribute("crossorigin"))};F.complete&&0!==F.naturalWidth?H():F.addEventListener("load",H)}if("audio"===g||"video"===g){var Z=y;Z.rr_mediaState=e.paused?"paused":"played",Z.rr_mediaCurrentTime=e.currentTime,Z.rr_mediaPlaybackRate=e.playbackRate,Z.rr_mediaMuted=e.muted,Z.rr_mediaLoop=e.loop,Z.rr_mediaVolume=e.volume}f||(e.scrollLeft&&(y.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(y.rr_scrollTop=e.scrollTop));if(v){var{width:q,height:j}=e.getBoundingClientRect();y={class:y.class,rr_width:"".concat(q,"px"),rr_height:"".concat(j,"px")}}"iframe"!==g||h(y.src)||(e.contentDocument||(y.rr_src=y.src),delete y.src);try{customElements.get(g)&&(n=!0)}catch(e){}return{type:p.Element,tagName:g,attributes:y,childNodes:[],isSVG:$(e)||void 0,needBlock:v,rootId:m,isCustom:n}}(e,{doc:n,blockClass:o,blockSelector:i,inlineStylesheet:s,maskInputOptions:l,maskInputFn:u,dataURLOptions:d,inlineImages:h,recordCanvas:f,keepIframeSrcFn:m,newlyAddedElement:v,rootId:y});case e.TEXT_NODE:return function(e,t){var{needsMask:n,maskTextFn:r,rootId:o,cssCaptured:i}=t,a=C.parentNode(e),s=a&&a.tagName,l="",c="STYLE"===s||void 0,u="SCRIPT"===s||void 0;u?l="SCRIPT_PLACEHOLDER":i||(l=C.textContent(e),c&&l&&(l=B(l,ee(t.doc))));!c&&!u&&l&&n&&(l=r?r(l,C.parentElement(e)):l.replace(/[\S]/g,"*"));return{type:p.Text,textContent:l||"",rootId:o}}(e,{doc:n,needsMask:a,maskTextFn:c,rootId:y,cssCaptured:g});case e.CDATA_SECTION_NODE:return{type:p.CDATA,textContent:"",rootId:y};case e.COMMENT_NODE:return{type:p.Comment,textContent:C.textContent(e)||"",rootId:y};default:return!1}}function ae(e){return null==e?"":e.toLowerCase()}function se(e,t){var{doc:n,mirror:r,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:s,skipChild:l=!1,inlineStylesheet:c=!0,maskInputOptions:u={},maskTextFn:d,maskInputFn:h,slimDOMOptions:f,dataURLOptions:m={},inlineImages:v=!1,recordCanvas:g=!1,onSerialize:y,onIframeLoad:b,iframeLoadTimeout:_=5e3,onStylesheetLoad:k,stylesheetLoadTimeout:T=5e3,keepIframeSrcFn:x=(()=>!1),newlyAddedElement:M=!1,cssCaptured:N=!1}=t,{needsMask:E}=t,{preserveWhiteSpace:A=!0}=t;E||(E=oe(e,a,s,void 0===E));var O,L=ie(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,needsMask:E,inlineStylesheet:c,maskInputOptions:u,maskTextFn:d,maskInputFn:h,dataURLOptions:m,inlineImages:v,recordCanvas:g,keepIframeSrcFn:x,newlyAddedElement:M,cssCaptured:N});if(!L)return console.warn(e,"not serialized"),null;O=r.hasNode(e)?r.getId(e):function(e,t){if(t.comment&&e.type===p.Comment)return!0;if(e.type===p.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&&(ae(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===ae(e.attributes.name)||"icon"===ae(e.attributes.rel)||"apple-touch-icon"===ae(e.attributes.rel)||"shortcut icon"===ae(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&ae(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(ae(e.attributes.property).match(/^(og|twitter|fb):/)||ae(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===ae(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===ae(e.attributes.name)||"googlebot"===ae(e.attributes.name)||"bingbot"===ae(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===ae(e.attributes.name)||"generator"===ae(e.attributes.name)||"framework"===ae(e.attributes.name)||"publisher"===ae(e.attributes.name)||"progid"===ae(e.attributes.name)||ae(e.attributes.property).match(/^article:/)||ae(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===ae(e.attributes.name)||"yandex-verification"===ae(e.attributes.name)||"csrf-token"===ae(e.attributes.name)||"p:domain_verify"===ae(e.attributes.name)||"verify-v1"===ae(e.attributes.name)||"verification"===ae(e.attributes.name)||"shopify-checkout-api-token"===ae(e.attributes.name)))return!0}}return!1}(L,f)||!A&&L.type===p.Text&&!L.textContent.replace(/^\s+|\s+$/gm,"").length?z:U();var D=Object.assign(L,{id:O});if(r.add(e,D),O===z)return null;y&&y(e);var F=!l;if(D.type===p.Element){F=F&&!D.needBlock,delete D.needBlock;var P=C.shadowRoot(e);P&&w(P)&&(D.isShadowHost=!0)}if((D.type===p.Document||D.type===p.Element)&&F){f.headWhitespace&&D.type===p.Element&&"head"===D.tagName&&(A=!1);var B={doc:n,mirror:r,blockClass:o,blockSelector:i,needsMask:E,maskTextClass:a,maskTextSelector:s,skipChild:l,inlineStylesheet:c,maskInputOptions:u,maskTextFn:d,maskInputFn:h,slimDOMOptions:f,dataURLOptions:m,inlineImages:v,recordCanvas:g,preserveWhiteSpace:A,onSerialize:y,onIframeLoad:b,iframeLoadTimeout:_,onStylesheetLoad:k,stylesheetLoadTimeout:T,keepIframeSrcFn:x,cssCaptured:!1};if(D.type===p.Element&&"textarea"===D.tagName&&void 0!==D.attributes.value);else for(var H of(D.type===p.Element&&void 0!==D.attributes._cssText&&"string"==typeof D.attributes._cssText&&(B.cssCaptured=!0),Array.from(C.childNodes(e)))){var Z=se(H,B);Z&&D.childNodes.push(Z)}var q=null;if(S(e)&&(q=C.shadowRoot(e)))for(var W of Array.from(C.childNodes(q))){var V=se(W,B);V&&(w(q)&&(V.isShadow=!0),D.childNodes.push(V))}}var Y=C.parentNode(e);return Y&&I(Y)&&w(Y)&&(D.isShadow=!0),D.type===p.Element&&"iframe"===D.tagName&&function(e,t,n){var r=e.contentWindow;if(r){var o,i=!1;try{o=r.document.readyState}catch(e){return}if("complete"===o){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((()=>{i||(t(),i=!0)}),n);e.addEventListener("load",(()=>{clearTimeout(s),i=!0,t()}))}}}(e,(()=>{var t=e.contentDocument;if(t&&b){var n=se(t,{doc:t,mirror:r,blockClass:o,blockSelector:i,needsMask:E,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:d,maskInputFn:h,slimDOMOptions:f,dataURLOptions:m,inlineImages:v,recordCanvas:g,preserveWhiteSpace:A,onSerialize:y,onIframeLoad:b,iframeLoadTimeout:_,onStylesheetLoad:k,stylesheetLoadTimeout:T,keepIframeSrcFn:x});n&&b(e,n)}}),_),D.type===p.Element&&"link"===D.tagName&&"string"==typeof D.attributes.rel&&("stylesheet"===D.attributes.rel||"preload"===D.attributes.rel&&"string"==typeof D.attributes.href&&"css"===R(D.attributes.href))&&function(e,t,n){var r,o=!1;try{r=e.sheet}catch(e){return}if(!r){var i=setTimeout((()=>{o||(t(),o=!0)}),n);e.addEventListener("load",(()=>{clearTimeout(i),o=!0,t()}))}}(e,(()=>{if(k){var t=se(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,needsMask:E,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:d,maskInputFn:h,slimDOMOptions:f,dataURLOptions:m,inlineImages:v,recordCanvas:g,preserveWhiteSpace:A,onSerialize:y,onIframeLoad:b,iframeLoadTimeout:_,onStylesheetLoad:k,stylesheetLoadTimeout:T,keepIframeSrcFn:x});t&&k(e,t)}}),T),D}let le=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 ce={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ue={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},de={};function pe(e){if(de[e])return de[e];var t=function(e){var t,n,r=null===globalThis||void 0===globalThis||null===(t=globalThis.Zone)||void 0===t||null===(n=t.__symbol__)||void 0===n?void 0:n.call(t,e);return r&&globalThis[r]?globalThis[r]:void 0}(e)||globalThis[e],n=t.prototype,r=e in ce?ce[e]:void 0,o=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]"))}))),i=e in ue?ue[e]:void 0,a=Boolean(i&&i.every((e=>{var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))})));if(o&&a)return de[e]=t.prototype,t.prototype;try{var s=document.createElement("iframe");document.body.appendChild(s);var l=s.contentWindow;if(!l)return t.prototype;var c=l[e].prototype;return document.body.removeChild(s),c?de[e]=c:n}catch(e){return n}}var he={};function fe(e,t,n){var r,o="".concat(e,".").concat(String(n));if(he[o])return he[o].call(t);var i=pe(e),a=null==(r=Object.getOwnPropertyDescriptor(i,n))?void 0:r.get;return a?(he[o]=a,a.call(t)):t[n]}var me={};function ve(e,t,n){var r="".concat(e,".").concat(String(n));if(me[r])return me[r].bind(t);var o=pe(e)[n];return"function"!=typeof o?t[n]:(me[r]=o,o.bind(t))}function ge(){return pe("MutationObserver").constructor}var ye={childNodes:function(e){return fe("Node",e,"childNodes")},parentNode:function(e){return fe("Node",e,"parentNode")},parentElement:function(e){return fe("Node",e,"parentElement")},textContent:function(e){return fe("Node",e,"textContent")},contains:function(e,t){return ve("Node",e,"contains")(t)},getRootNode:function(e){return ve("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?fe("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?fe("Element",e,"shadowRoot"):null},querySelector:function(e,t){return fe("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return fe("Element",e,"querySelectorAll")(t)},mutationObserver:ge};function be(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}var _e="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.",Ce={map:{},getId:()=>(console.error(_e),-1),getNode:()=>(console.error(_e),null),removeNodeFromMap(){console.error(_e)},has:()=>(console.error(_e),!1),reset(){console.error(_e)}};function Se(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=null,o=0;return function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];var l=Date.now();o||!1!==n.leading||(o=l);var c=t-(l-o),u=this;c<=0||c>t?(r&&(clearTimeout(r),r=null),o=l,e.apply(u,a)):r||!1===n.trailing||(r=setTimeout((()=>{o=!1===n.leading?0:Date.now(),r=null,e.apply(u,a)}),c))}}function Ie(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window,i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(e){setTimeout((()=>{n.set.call(this,e)}),0),i&&i.set&&i.set.call(this,e)}}),()=>Ie(e,t,i||{},!0)}function we(e,t,n){try{if(!(t in e))return()=>{};var r=e[t],o=n(r);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch(e){return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Ce=new Proxy(Ce,{get:(e,t,n)=>("map"===t&&console.error(_e),Reflect.get(e,t,n))}));var ke=Date.now;function Te(e){var t,n,r,o,i=e.document;return{left:i.scrollingElement?i.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:i.documentElement.scrollLeft||(null==i?void 0:i.body)&&(null==(t=ye.parentElement(i.body))?void 0:t.scrollLeft)||(null==(n=null==i?void 0:i.body)?void 0:n.scrollLeft)||0,top:i.scrollingElement?i.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==i?void 0:i.documentElement.scrollTop)||(null==i?void 0:i.body)&&(null==(r=ye.parentElement(i.body))?void 0:r.scrollTop)||(null==(o=null==i?void 0:i.body)?void 0:o.scrollTop)||0}}function xe(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Me(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Ne(e){return e?e.nodeType===e.ELEMENT_NODE?e:ye.parentElement(e):null}function Ee(e,t,n,r){if(!e)return!1;var o=Ne(e);if(!o)return!1;try{if("string"==typeof t){if(o.classList.contains(t))return!0;if(r&&null!==o.closest("."+t))return!0}else if(re(o,t,r))return!0}catch(e){}if(n){if(o.matches(n))return!0;if(r&&null!==o.closest(n))return!0}return!1}function Ae(e,t,n){return!("TITLE"!==e.tagName||!n.headTitleMutations)||t.getId(e)===z}function Oe(e,t){if(I(e))return!1;var n=t.getId(e);if(!t.has(n))return!0;var r=ye.parentNode(e);return(!r||r.nodeType!==e.DOCUMENT_NODE)&&(!r||Oe(r,t))}function Re(e){return Boolean(e.changedTouches)}function Le(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function De(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function Fe(e){return!!e&&(e instanceof le&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(ye.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(ke=()=>(new Date).getTime());let Pe=class{constructor(){c(this,"id",1),c(this,"styleIDMap",new WeakMap),c(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 Be(e){var t,n=null;return"getRootNode"in e&&(null==(t=ye.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&ye.host(ye.getRootNode(e))&&(n=ye.host(ye.getRootNode(e))),n}function He(e){var t=e.ownerDocument;if(!t)return!1;var n=function(e){for(var t,n=e;t=Be(n);)n=t;return n}(e);return ye.contains(t,n)}function Ze(e){var t=e.ownerDocument;return!!t&&(ye.contains(t,e)||He(e))}var qe=(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))(qe||{}),We=(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))(We||{}),Ve=(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))(Ve||{}),Ye=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Ye||{}),je=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(je||{}),Ge=(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))(Ge||{}),ze=(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))(ze||{});function Ue(e){return"__ln"in e}class Xe{constructor(){c(this,"length",0),c(this,"head",null),c(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&&Ue(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&&Ue(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 Ke,Je=(e,t)=>"".concat(e,"@").concat(t);class Qe{constructor(){c(this,"frozen",!1),c(this,"locked",!1),c(this,"texts",[]),c(this,"attributes",[]),c(this,"attributeMap",new WeakMap),c(this,"removes",[]),c(this,"mapRemoves",[]),c(this,"movedMap",{}),c(this,"addedSet",new Set),c(this,"movedSet",new Set),c(this,"droppedSet",new Set),c(this,"removesSubTreeCache",new Set),c(this,"mutationCb"),c(this,"blockClass"),c(this,"blockSelector"),c(this,"maskTextClass"),c(this,"maskTextSelector"),c(this,"inlineStylesheet"),c(this,"maskInputOptions"),c(this,"maskTextFn"),c(this,"maskInputFn"),c(this,"keepIframeSrcFn"),c(this,"recordCanvas"),c(this,"inlineImages"),c(this,"slimDOMOptions"),c(this,"dataURLOptions"),c(this,"doc"),c(this,"mirror"),c(this,"iframeManager"),c(this,"stylesheetManager"),c(this,"shadowDomManager"),c(this,"canvasManager"),c(this,"processedNodeManager"),c(this,"unattachedDoc"),c(this,"processMutations",(e=>{e.forEach(this.processMutation),this.emit()})),c(this,"emit",(()=>{if(!this.frozen&&!this.locked){for(var e=[],t=new Set,n=new Xe,r=e=>{for(var t=e,n=z;n===z;)n=(t=t&&t.nextSibling)&&this.mirror.getId(t);return n},o=o=>{var i=ye.parentNode(o);if(i&&Ze(o)){var a=!1;if(o.nodeType===Node.TEXT_NODE){var s=i.tagName;if("TEXTAREA"===s)return;"STYLE"===s&&this.addedSet.has(i)&&(a=!0)}var l=I(i)?this.mirror.getId(Be(o)):this.mirror.getId(i),c=r(o);if(-1===l||-1===c)return n.addNode(o);var u=se(o,{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=>{Le(e,this.mirror)&&this.iframeManager.addIframe(e),De(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),Fe(o)&&this.shadowDomManager.addShadowRoot(ye.shadowRoot(o),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},cssCaptured:a});u&&(e.push({parentId:l,nextId:c,node:u}),t.add(u.id))}};this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(var i of this.movedSet)et(this.removesSubTreeCache,i,this.mirror)&&!this.movedSet.has(ye.parentNode(i))||o(i);for(var a of this.addedSet)tt(this.droppedSet,a)||et(this.removesSubTreeCache,a,this.mirror)?tt(this.movedSet,a)?o(a):this.droppedSet.add(a):o(a);for(var s=null;n.length;){var l=null;if(s){var c=this.mirror.getId(ye.parentNode(s.value)),u=r(s.value);-1!==c&&-1!==u&&(l=s)}if(!l)for(var d=n.tail;d;){var p=d;if(d=d.previous,p){var h=this.mirror.getId(ye.parentNode(p.value));if(-1===r(p.value))continue;if(-1!==h){l=p;break}var f=p.value,m=ye.parentNode(f);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var v=ye.host(m);if(-1!==this.mirror.getId(v)){l=p;break}}}}if(!l){for(;n.head;)n.removeNode(n.head.value);break}s=l.previous,n.removeNode(l.value),o(l.value)}var g={texts:this.texts.map((e=>{var t=e.node,n=ye.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.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(g))}})),c(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(ye.childNodes(e),(e=>ye.textContent(e)||"")).join("")})),c(this,"processMutation",(e=>{if(!Ae(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":var t=ye.textContent(e.target);Ee(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:oe(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Ne(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break;case"attributes":var n=e.target,r=e.attributeName,o=e.target.getAttribute(r);if("value"===r){var i=O(n);o=N({element:n,maskInputOptions:this.maskInputOptions,tagName:n.tagName,type:i,value:o,maskInputFn:this.maskInputFn})}if(Ee(e.target,this.blockClass,this.blockSelector,!1)||o===e.oldValue)return;var a=this.attributeMap.get(e.target);if("IFRAME"===n.tagName&&"src"===r&&!this.keepIframeSrcFn(o)){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"),!ne(n.tagName,r))if(a.attributes[r]=te(this.doc,E(n.tagName),E(r),o),"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 l of(e.oldValue&&s.setAttribute("style",e.oldValue),Array.from(n.style))){var c=n.style.getPropertyValue(l),u=n.style.getPropertyPriority(l);c!==s.style.getPropertyValue(l)||u!==s.style.getPropertyPriority(l)?a.styleDiff[l]=""===u?c:[c,u]:a._unchangedStyles[l]=[c,u]}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(Ee(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=I(e.target)?this.mirror.getId(ye.host(e.target)):this.mirror.getId(e.target);Ee(e.target,this.blockClass,this.blockSelector,!1)||Ae(t,this.mirror,this.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?($e(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||Oe(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Je(n,r)]?$e(this.movedSet,t):(this.removes.push({parentId:r,id:n,isShadow:!(!I(e.target)||!w(e.target))||void 0}),function(e,t){var n=[e];for(;n.length;){var r=n.pop();t.has(r)||(t.add(r),ye.childNodes(r).forEach((e=>n.push(e))))}}(t,this.removesSubTreeCache))),this.mapRemoves.push(t))}))}})),c(this,"genAdds",((e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(Ae(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[Je(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Ee(e,this.blockClass,this.blockSelector,!1)||(ye.childNodes(e).forEach((e=>this.genAdds(e))),Fe(e)&&ye.childNodes(ye.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 $e(e,t){e.delete(t),ye.childNodes(t).forEach((t=>$e(e,t)))}function et(e,t,n){return 0!==e.size&&function(e,t,n){var r=ye.parentNode(t);return!!r&&e.has(r)}(e,t)}function tt(e,t){return 0!==e.size&&nt(e,t)}function nt(e,t){var n=ye.parentNode(t);return!!n&&(!!e.has(n)||nt(e,n))}var rt=e=>{if(!Ke)return e;return function(){try{return e(...arguments)}catch(e){if(Ke&&!0===Ke(e))return;throw e}}},ot=[];function it(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 at(e,t){var n=new Qe;ot.push(n),n.init(e);var r=new(ge())(rt(n.processMutations.bind(n)));return r.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function st(e){var{mouseInteractionCb:n,doc:r,mirror:o,blockClass:i,blockSelector:a,sampling:s}=e;if(!1===s.mouseInteraction)return()=>{};var l=!0===s.mouseInteraction||void 0===s.mouseInteraction?{}:s.mouseInteraction,c=[],u=null;return Object.keys(Ve).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==l[e])).forEach((e=>{var s=E(e),l=(e=>r=>{var s=it(r);if(!Ee(s,i,a,!0)){var l=null,c=e;if("pointerType"in r){switch(r.pointerType){case"mouse":l=Ye.Mouse;break;case"touch":l=Ye.Touch;break;case"pen":l=Ye.Pen}l===Ye.Touch?Ve[e]===Ve.MouseDown?c="TouchStart":Ve[e]===Ve.MouseUp&&(c="TouchEnd"):Ye.Pen}else Re(r)&&(l=Ye.Touch);null!==l?(u=l,(c.startsWith("Touch")&&l===Ye.Touch||c.startsWith("Mouse")&&l===Ye.Mouse)&&(l=null)):Ve[e]===Ve.Click&&(l=u,u=null);var d=Re(r)?r.changedTouches[0]:r;if(d){var p=o.getId(s),{clientX:h,clientY:f}=d;rt(n)(t({type:Ve[c],id:p,x:h,y:f},null!==l&&{pointerType:l}))}}})(e);if(window.PointerEvent)switch(Ve[e]){case Ve.MouseDown:case Ve.MouseUp:s=s.replace("mouse","pointer");break;case Ve.TouchStart:case Ve.TouchEnd:return}c.push(be(s,l,r))})),rt((()=>{c.forEach((e=>e()))}))}function lt(e){var{scrollCb:t,doc:n,mirror:r,blockClass:o,blockSelector:i,sampling:a}=e;return be("scroll",rt(Se(rt((e=>{var a=it(e);if(a&&!Ee(a,o,i,!0)){var s=r.getId(a);if(a===n&&n.defaultView){var l=Te(n.defaultView);t({id:s,x:l.left,y:l.top})}else t({id:s,x:a.scrollLeft,y:a.scrollTop})}})),a.scroll||100)),n)}var ct=["INPUT","TEXTAREA","SELECT"],ut=new WeakMap;function dt(e){return function(e,t){if(mt("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||mt("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||mt("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||mt("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 pt(e,t,n){var r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function ht(e,t){var n,r,o,{mirror:i,stylesheetManager:a}=e,s=null;s="#document"===t.nodeName?i.getId(t):i.getId(ye.host(t));var l="#document"===t.nodeName?null==(n=t.defaultView)?void 0:n.Document:null==(o=null==(r=t.ownerDocument)?void 0:r.defaultView)?void 0:o.ShadowRoot,c=(null==l?void 0:l.prototype)?Object.getOwnPropertyDescriptor(null==l?void 0:l.prototype,"adoptedStyleSheets"):void 0;return null!==s&&-1!==s&&l&&c?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get(){var e;return null==(e=c.get)?void 0:e.call(this)},set(e){var t,n=null==(t=c.set)?void 0:t.call(this,e);if(null!==s&&-1!==s)try{a.adoptStyleSheets(e,s)}catch(e){}return n}}),rt((()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}))):()=>{}}function ft(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=e.doc.defaultView;if(!o)return()=>{};!function(e,t){var{mutationCb:n,mousemoveCb:r,mouseInteractionCb:o,scrollCb:i,viewportResizeCb:a,inputCb:s,mediaInteractionCb:l,styleSheetRuleCb:c,styleDeclarationCb:u,canvasMutationCb:d,fontCb:p,selectionCb:h,customElementCb:f}=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),o(...arguments)},e.scrollCb=function(){t.scroll&&t.scroll(...arguments),i(...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),l(...arguments)},e.styleSheetRuleCb=function(){t.styleSheetRule&&t.styleSheetRule(...arguments),c(...arguments)},e.styleDeclarationCb=function(){t.styleDeclaration&&t.styleDeclaration(...arguments),u(...arguments)},e.canvasMutationCb=function(){t.canvasMutation&&t.canvasMutation(...arguments),d(...arguments)},e.fontCb=function(){t.font&&t.font(...arguments),p(...arguments)},e.selectionCb=function(){t.selection&&t.selection(...arguments),h(...arguments)},e.customElementCb=function(){t.customElement&&t.customElement(...arguments),f(...arguments)}}(e,r),e.recordDOM&&(n=at(e,e.doc));var i=function(e){var{mousemoveCb:t,sampling:n,doc:r,mirror:o}=e;if(!1===n.mousemove)return()=>{};var i,a="number"==typeof n.mousemove?n.mousemove:50,s="number"==typeof n.mousemoveCallback?n.mousemoveCallback:500,l=[],c=Se(rt((e=>{var n=Date.now()-i;t(l.map((e=>(e.timeOffset-=n,e))),e),l=[],i=null})),s),u=rt(Se(rt((e=>{var t=it(e),{clientX:n,clientY:r}=Re(e)?e.changedTouches[0]:e;i||(i=ke()),l.push({x:n,y:r,id:o.getId(t),timeOffset:ke()-i}),c("undefined"!=typeof DragEvent&&e instanceof DragEvent?We.Drag:e instanceof MouseEvent?We.MouseMove:We.TouchMove)})),a,{trailing:!1})),d=[be("mousemove",u,r),be("touchmove",u,r),be("drag",u,r)];return rt((()=>{d.forEach((e=>e()))}))}(e),a=st(e),s=lt(e),l=function(e,t){var{viewportResizeCb:n}=e,{win:r}=t,o=-1,i=-1;return be("resize",rt(Se(rt((()=>{var e=xe(),t=Me();o===e&&i===t||(n({width:Number(t),height:Number(e)}),o=e,i=t)})),200)),r)}(e,{win:o}),c=function(e){var{inputCb:n,doc:r,mirror:o,blockClass:i,blockSelector:a,ignoreClass:s,ignoreSelector:l,maskInputOptions:c,maskInputFn:u,sampling:d,userTriggeredOnInput:p}=e;function h(e){var t=it(e),n=e.isTrusted,o=t&&t.tagName;if(t&&"OPTION"===o&&(t=ye.parentElement(t)),t&&o&&!(ct.indexOf(o)<0)&&!Ee(t,i,a,!0)&&!(t.classList.contains(s)||l&&t.matches(l))){var d=t.value,h=!1,m=O(t)||"";"radio"===m||"checkbox"===m?h=t.checked:(c[o.toLowerCase()]||c[m])&&(d=N({element:t,maskInputOptions:c,tagName:o,type:m,value:d,maskInputFn:u})),f(t,p?{text:d,isChecked:h,userTriggered:n}:{text:d,isChecked:h});var v=t.name;"radio"===m&&v&&h&&r.querySelectorAll('input[type="radio"][name="'.concat(v,'"]')).forEach((e=>{if(e!==t){var n=e.value;f(e,p?{text:n,isChecked:!h,userTriggered:!1}:{text:n,isChecked:!h})}}))}}function f(e,r){var i=ut.get(e);if(!i||i.text!==r.text||i.isChecked!==r.isChecked){ut.set(e,r);var a=o.getId(e);rt(n)(t(t({},r),{},{id:a}))}}var m=("last"===d.input?["change"]:["input","change"]).map((e=>be(e,rt(h),r))),v=r.defaultView;if(!v)return()=>{m.forEach((e=>e()))};var g=v.Object.getOwnPropertyDescriptor(v.HTMLInputElement.prototype,"value"),y=[[v.HTMLInputElement.prototype,"value"],[v.HTMLInputElement.prototype,"checked"],[v.HTMLSelectElement.prototype,"value"],[v.HTMLTextAreaElement.prototype,"value"],[v.HTMLSelectElement.prototype,"selectedIndex"],[v.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&m.push(...y.map((e=>Ie(e[0],e[1],{set(){rt(h)({target:this,isTrusted:!1})}},!1,v)))),rt((()=>{m.forEach((e=>e()))}))}(e),u=function(e){var{mediaInteractionCb:t,blockClass:n,blockSelector:r,mirror:o,sampling:i,doc:a}=e,s=rt((e=>Se(rt((i=>{var a=it(i);if(a&&!Ee(a,n,r,!0)){var{currentTime:s,volume:l,muted:c,playbackRate:u,loop:d}=a;t({type:e,id:o.getId(a),currentTime:s,volume:l,muted:c,playbackRate:u,loop:d})}})),i.media||500))),l=[be("play",s(Ge.Play),a),be("pause",s(Ge.Pause),a),be("seeked",s(Ge.Seeked),a),be("volumechange",s(Ge.VolumeChange),a),be("ratechange",s(Ge.RateChange),a)];return rt((()=>{l.forEach((e=>e()))}))}(e),d=()=>{},p=()=>{},h=()=>{},f=()=>{};e.recordDOM&&(d=function(e,t){var{styleSheetRuleCb:n,mirror:r,stylesheetManager:o}=e,{win:i}=t;if(!i.CSSStyleSheet||!i.CSSStyleSheet.prototype)return()=>{};var a=i.CSSStyleSheet.prototype.insertRule;i.CSSStyleSheet.prototype.insertRule=new Proxy(a,{apply:rt(((e,t,i)=>{var[a,s]=i,{id:l,styleId:c}=pt(t,r,o.styleMirror);return(l&&-1!==l||c&&-1!==c)&&n({id:l,styleId:c,adds:[{rule:a,index:s}]}),e.apply(t,i)}))}),i.CSSStyleSheet.prototype.addRule=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.cssRules.length,r="".concat(e," { ").concat(t," }");return i.CSSStyleSheet.prototype.insertRule.apply(this,[r,n])};var s,l,c=i.CSSStyleSheet.prototype.deleteRule;i.CSSStyleSheet.prototype.deleteRule=new Proxy(c,{apply:rt(((e,t,i)=>{var[a]=i,{id:s,styleId:l}=pt(t,r,o.styleMirror);return(s&&-1!==s||l&&-1!==l)&&n({id:s,styleId:l,removes:[{index:a}]}),e.apply(t,i)}))}),i.CSSStyleSheet.prototype.removeRule=function(e){return i.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},i.CSSStyleSheet.prototype.replace&&(s=i.CSSStyleSheet.prototype.replace,i.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:rt(((e,t,i)=>{var[a]=i,{id:s,styleId:l}=pt(t,r,o.styleMirror);return(s&&-1!==s||l&&-1!==l)&&n({id:s,styleId:l,replace:a}),e.apply(t,i)}))})),i.CSSStyleSheet.prototype.replaceSync&&(l=i.CSSStyleSheet.prototype.replaceSync,i.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:rt(((e,t,i)=>{var[a]=i,{id:s,styleId:l}=pt(t,r,o.styleMirror);return(s&&-1!==s||l&&-1!==l)&&n({id:s,styleId:l,replaceSync:a}),e.apply(t,i)}))}));var u={};vt("CSSGroupingRule")?u.CSSGroupingRule=i.CSSGroupingRule:(vt("CSSMediaRule")&&(u.CSSMediaRule=i.CSSMediaRule),vt("CSSConditionRule")&&(u.CSSConditionRule=i.CSSConditionRule),vt("CSSSupportsRule")&&(u.CSSSupportsRule=i.CSSSupportsRule));var d={};return Object.entries(u).forEach((e=>{var[t,i]=e;d[t]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=new Proxy(d[t].insertRule,{apply:rt(((e,t,i)=>{var[a,s]=i,{id:l,styleId:c}=pt(t.parentStyleSheet,r,o.styleMirror);return(l&&-1!==l||c&&-1!==c)&&n({id:l,styleId:c,adds:[{rule:a,index:[...dt(t),s||0]}]}),e.apply(t,i)}))}),i.prototype.deleteRule=new Proxy(d[t].deleteRule,{apply:rt(((e,t,i)=>{var[a]=i,{id:s,styleId:l}=pt(t.parentStyleSheet,r,o.styleMirror);return(s&&-1!==s||l&&-1!==l)&&n({id:s,styleId:l,removes:[{index:[...dt(t),a]}]}),e.apply(t,i)}))})})),rt((()=>{i.CSSStyleSheet.prototype.insertRule=a,i.CSSStyleSheet.prototype.deleteRule=c,s&&(i.CSSStyleSheet.prototype.replace=s),l&&(i.CSSStyleSheet.prototype.replaceSync=l),Object.entries(u).forEach((e=>{var[t,n]=e;n.prototype.insertRule=d[t].insertRule,n.prototype.deleteRule=d[t].deleteRule}))}))}(e,{win:o}),p=ht(e,e.doc),h=function(e,t){var{styleDeclarationCb:n,mirror:r,ignoreCSSAttributes:o,stylesheetManager:i}=e,{win:a}=t,s=a.CSSStyleDeclaration.prototype.setProperty;a.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:rt(((e,t,a)=>{var l,[c,u,d]=a;if(o.has(c))return s.apply(t,[c,u,d]);var{id:p,styleId:h}=pt(null==(l=t.parentRule)?void 0:l.parentStyleSheet,r,i.styleMirror);return(p&&-1!==p||h&&-1!==h)&&n({id:p,styleId:h,set:{property:c,value:u,priority:d},index:dt(t.parentRule)}),e.apply(t,a)}))});var l=a.CSSStyleDeclaration.prototype.removeProperty;return a.CSSStyleDeclaration.prototype.removeProperty=new Proxy(l,{apply:rt(((e,t,a)=>{var s,[c]=a;if(o.has(c))return l.apply(t,[c]);var{id:u,styleId:d}=pt(null==(s=t.parentRule)?void 0:s.parentStyleSheet,r,i.styleMirror);return(u&&-1!==u||d&&-1!==d)&&n({id:u,styleId:d,remove:{property:c},index:dt(t.parentRule)}),e.apply(t,a)}))}),rt((()=>{a.CSSStyleDeclaration.prototype.setProperty=s,a.CSSStyleDeclaration.prototype.removeProperty=l}))}(e,{win:o}),e.collectFonts&&(f=function(e){var{fontCb:t,doc:n}=e,r=n.defaultView;if(!r)return()=>{};var o=[],i=new WeakMap,a=r.FontFace;r.FontFace=function(e,t,n){var r=new a(e,t,n);return i.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=we(n.fonts,"add",(function(e){return function(n){return setTimeout(rt((()=>{var e=i.get(n);e&&(t(e),i.delete(n))})),0),e.apply(this,[n])}}));return o.push((()=>{r.FontFace=a})),o.push(s),rt((()=>{o.forEach((e=>e()))}))}(e)));var m=function(e){var{doc:t,mirror:n,blockClass:r,blockSelector:o,selectionCb:i}=e,a=!0,s=rt((()=>{var e=t.getSelection();if(!(!e||a&&(null==e?void 0:e.isCollapsed))){a=e.isCollapsed||!1;for(var s=[],l=e.rangeCount||0,c=0;c<l;c++){var u=e.getRangeAt(c),{startContainer:d,startOffset:p,endContainer:h,endOffset:f}=u;Ee(d,r,o,!0)||Ee(h,r,o,!0)||s.push({start:n.getId(d),startOffset:p,end:n.getId(h),endOffset:f})}i({ranges:s})}}));return s(),be("selectionchange",s)}(e),v=function(e){var{doc:t,customElementCb:n}=e,r=t.defaultView;return r&&r.customElements?we(r.customElements,"define",(function(e){return function(t,r,o){try{n({define:{name:t}})}catch(e){console.warn("Custom element callback failed for ".concat(t))}return e.apply(this,[t,r,o])}})):()=>{}}(e),g=[];for(var y of e.plugins)g.push(y.observer(y.callback,o,y.options));return rt((()=>{ot.forEach((e=>e.reset())),null==n||n.disconnect(),i(),a(),s(),l(),c(),u(),d(),p(),h(),f(),m(),v(),g.forEach((e=>e()))}))}function mt(e){return void 0!==window[e]}function vt(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class gt{constructor(e){c(this,"iframeIdToRemoteIdMap",new WeakMap),c(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,n,r){var o=n||this.getIdToRemoteIdMap(e),i=r||this.getRemoteIdToIdMap(e),a=o.get(t);return a||(a=this.generateIdFn(),o.set(t,a),i.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 o=r.get(t);return o||-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 yt{constructor(e){c(this,"iframes",new WeakMap),c(this,"crossOriginIframeMap",new WeakMap),c(this,"crossOriginIframeMirror",new gt(U)),c(this,"crossOriginIframeStyleMirror"),c(this,"crossOriginIframeRootIdMap",new WeakMap),c(this,"mirror"),c(this,"mutationCb"),c(this,"wrappedEmit"),c(this,"loadListener"),c(this,"stylesheetManager"),c(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new gt(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 qe.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:qe.IncrementalSnapshot,data:{source:We.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case qe.Meta:case qe.Load:case qe.DomContentLoaded:return!1;case qe.Plugin:return t;case qe.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case qe.IncrementalSnapshot:switch(t.data.source){case We.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 We.Drag:case We.TouchMove:case We.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case We.ViewportResize:return!1;case We.MediaInteraction:case We.MouseInteraction:case We.Scroll:case We.CanvasMutation:case We.Input:return this.replaceIds(t.data,e,["id"]),t;case We.StyleSheetRule:case We.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case We.Font:return t;case We.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case We.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 o of r)(Array.isArray(t[o])||"number"==typeof t[o])&&(Array.isArray(t[o])?t[o]=e.getIds(n,t[o]):t[o]=e.getId(n,t[o]));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===ze.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,t)}))}}class bt{constructor(e){c(this,"shadowDoms",new WeakSet),c(this,"mutationCb"),c(this,"scrollCb"),c(this,"bypassOptions"),c(this,"mirror"),c(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,n){if(w(e)&&!this.shadowDoms.has(e)){this.shadowDoms.add(e);var r=at(t(t({},this.bypassOptions),{},{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push((()=>r.disconnect())),this.restoreHandlers.push(lt(t(t({},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(ye.host(e))),this.restoreHandlers.push(ht({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(we(e.prototype,"attachShadow",(function(e){return function(r){var o=e.call(this,r),i=ye.shadowRoot(this);return i&&Ze(this)&&n.addShadowRoot(i,t),o}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch(e){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var _t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ct="undefined"==typeof Uint8Array?[]:new Uint8Array(256),St=0;St<64;St++)Ct[_t.charCodeAt(St)]=St;var It=new Map;var wt=(e,t,n)=>{if(e&&(xt(e,t)||"object"==typeof e)){var r=function(e,t){var n=It.get(e);return n||(n=new Map,It.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name),o=r.indexOf(e);return-1===o&&(o=r.length,r.push(e)),o}};function kt(e,t,n){if(e instanceof Array)return e.map((e=>kt(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,o="";for(t=0;t<r;t+=3)o+=_t[n[t]>>2],o+=_t[(3&n[t])<<4|n[t+1]>>4],o+=_t[(15&n[t+1])<<2|n[t+2]>>6],o+=_t[63&n[t+2]];return r%3==2?o=o.substring(0,o.length-1)+"=":r%3==1&&(o=o.substring(0,o.length-2)+"=="),o}(e)};if(e instanceof DataView)return{rr_type:e.constructor.name,args:[kt(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){var r=e.constructor.name,{src:o}=e;return{rr_type:r,src:o}}if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}return e instanceof ImageData?{rr_type:e.constructor.name,args:[kt(e.data,t,n),e.width,e.height]}:xt(e,t)||"object"==typeof e?{rr_type:e.constructor.name,index:wt(e,t,n)}:e}var Tt=(e,t,n)=>e.map((e=>kt(e,t,n))),xt=(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 Mt(e,t,n,r){var o=[];try{var i=we(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(o){for(var i=arguments.length,a=new Array(i>1?i-1:0),s=1;s<i;s++)a[s-1]=arguments[s];if(!Ee(this,t,n,!0)){var l=function(e){return"experimental-webgl"===e?"webgl":e}(o);if("__context"in this||(this.__context=l),r&&["webgl","webgl2"].includes(l))if(a[0]&&"object"==typeof a[0]){var c=a[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[o,...a])}}));o.push(i)}catch(e){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{o.forEach((e=>e()))}}function Nt(e,t,n,r,o,i){var a=[],s=Object.getOwnPropertyNames(e),l=function(s){if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(s))return"continue";try{if("function"!=typeof e[s])return"continue";var l=we(e,s,(function(e){return function(){for(var a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];var u=e.apply(this,l);if(wt(u,i,this),"tagName"in this.canvas&&!Ee(this.canvas,r,o,!0)){var d=Tt(l,i,this),p={type:t,property:s,args:d};n(this.canvas,p)}return u}}));a.push(l)}catch(r){var c=Ie(e,s,{set(e){n(this.canvas,{type:t,property:s,args:[e],setter:!0})}});a.push(c)}};for(var c of s)l(c);return a}var Et,At,Ot,Rt,Lt="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Dt="undefined"!=typeof window&&window.Blob&&new Blob([(Et=Lt,Uint8Array.from(atob(Et),(e=>e.charCodeAt(0))))],{type:"text/javascript;charset=utf-8"});function Ft(e){var t;try{if(!(t=Dt&&(window.URL||window.webkitURL).createObjectURL(Dt)))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,"+Lt,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class Pt{constructor(e){c(this,"pendingCanvasMutations",new Map),c(this,"rafStamps",{latestId:0,invokeId:null}),c(this,"mirror"),c(this,"mutationCb"),c(this,"resetObservers"),c(this,"frozen",!1),c(this,"locked",!1),c(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:o,recordCanvas:i,dataURLOptions:a}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,i&&"all"===t&&this.initCanvasMutationObserver(n,r,o),i&&"number"==typeof t&&this.initCanvasFPSObserver(t,n,r,o,{dataURLOptions:a})}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,t,n,o,i){var a=this,s=Mt(t,n,o,!0),l=new Map,c=new Ft;c.onmessage=e=>{var{id:t}=e.data;if(l.set(t,!1),"base64"in e.data){var{base64:n,type:r,width:o,height:i}=e.data;this.mutationCb({id:t,type:je["2D"],commands:[{property:"clearRect",args:[0,0,o,i]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:n}],type:r}]},0,0]}]})}};var u,d=1e3/e,p=0,h=e=>{var s,f;p&&e-p<d?u=requestAnimationFrame(h):(p=e,(s=[],f=e=>{e.querySelectorAll("canvas").forEach((e=>{Ee(e,n,o,!0)||s.push(e)})),e.querySelectorAll("*").forEach((e=>{e.shadowRoot&&f(e.shadowRoot)}))},f(t.document),s).forEach(function(){var e=r((function*(e){var t,n=a.mirror.getId(e);if(!l.get(n)&&0!==e.width&&0!==e.height){if(l.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 o=e.clientWidth||e.width,s=e.clientHeight||e.height,u=yield createImageBitmap(e,{resizeWidth:o,resizeHeight:s});c.postMessage({id:n,bitmap:u,width:o,height:s,dataURLOptions:i.dataURLOptions},[u])}}));return function(t){return e.apply(this,arguments)}}()),u=requestAnimationFrame(h))};u=requestAnimationFrame(h),this.resetObservers=()=>{s(),cancelAnimationFrame(u)}}initCanvasMutationObserver(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var r=Mt(e,t,n,!1),o=function(e,t,n,r){var o=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype),a=function(i){try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[i])return"continue";var a=we(t.CanvasRenderingContext2D.prototype,i,(function(o){return function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return Ee(this.canvas,n,r,!0)||setTimeout((()=>{var n=Tt(s,t,this);e(this.canvas,{type:je["2D"],property:i,args:n})}),0),o.apply(this,s)}}));o.push(a)}catch(n){var s=Ie(t.CanvasRenderingContext2D.prototype,i,{set(t){e(this.canvas,{type:je["2D"],property:i,args:[t],setter:!0})}});o.push(s)}};for(var s of i)a(s);return()=>{o.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,n),i=function(e,t,n,r){var o=[];return o.push(...Nt(t.WebGLRenderingContext.prototype,je.WebGL,e,n,r,t)),void 0!==t.WebGL2RenderingContext&&o.push(...Nt(t.WebGL2RenderingContext.prototype,je.WebGL2,e,n,r,t)),()=>{o.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,n);this.resetObservers=()=>{r(),o(),i()}}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=>i(e,s))),{type:o}=n[0];this.mutationCb({id:t,type:o,commands:r}),this.pendingCanvasMutations.delete(e)}}}}class Bt{constructor(e){c(this,"trackedLinkElements",new WeakSet),c(this,"mutationCb"),c(this,"adoptedStyleSheetCb"),c(this,"styleMirror",new Pe),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:[]},o=[],i=function(e){var t=void 0;n.styleMirror.has(e)?t=n.styleMirror.getId(e):(t=n.styleMirror.add(e),o.push({styleId:t,rules:Array.from(e.rules||CSSRule,((t,n)=>({rule:T(t,e.href),index:n})))})),r.styleIds.push(t)};for(var a of e)i(a);o.length>0&&(r.styles=o),this.adoptedStyleSheetCb(r)}}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Ht{constructor(){c(this,"nodeMap",new WeakMap),c(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 Zt=!1;try{if(2!==Array.from([1],(e=>2*e))[0]){var qt=document.createElement("iframe");document.body.appendChild(qt),Array.from=(null==(a=qt.contentWindow)?void 0:a.Array.from)||Array.from,document.body.removeChild(qt)}}catch(e){console.debug("Unable to override Array.from",e)}var Wt,Vt,Yt=new M;function jt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{emit:n,checkoutEveryNms:r,checkoutEveryNth:o,blockClass:i="rr-block",blockSelector:a=null,ignoreClass:s="rr-ignore",ignoreSelector:l=null,maskTextClass:c="rr-mask",maskTextSelector:u=null,inlineStylesheet:d=!0,maskAllInputs:p,maskInputOptions:h,slimDOMOptions:f,maskInputFn:m,maskTextFn:v,hooks:g,packFn:y,sampling:b={},dataURLOptions:_={},mousemoveWait:C,recordDOM:S=!0,recordCanvas:I=!1,recordCrossOriginIframes:w=!1,recordAfter:k=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:T=!1,collectFonts:x=!1,inlineImages:N=!1,plugins:E,keepIframeSrcFn:A=(()=>!1),ignoreCSSAttributes:O=new Set([]),errorHandler:R}=e;Ke=R;var L=!w||window.parent===window,D=!1;if(!L)try{window.parent.document&&(D=!1)}catch(e){D=!0}if(L&&!n)throw new Error("emit function is required");if(!L&&!D)return()=>{};void 0!==C&&void 0===b.mousemove&&(b.mousemove=C),Yt.reset();var F,P=!0===p?{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},B=!0===f||"all"===f?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===f,headMetaDescKeywords:"all"===f,headTitleMutations:"all"===f}:f||{};!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]: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 H=0,Z=e=>{for(var t of E||[])t.eventProcessor&&(e=t.eventProcessor(e));return y&&!D&&(e=y(e)),e};At=(e,t)=>{var i,a=e;if(a.timestamp=ke(),!(null==(i=ot[0])?void 0:i.isFrozen())||a.type===qe.FullSnapshot||a.type===qe.IncrementalSnapshot&&a.data.source===We.Mutation||ot.forEach((e=>e.unfreeze())),L)null==n||n(Z(a),t);else if(D){var s={type:"rrweb",event:Z(a),origin:window.location.origin,isCheckout:t};window.parent.postMessage(s,"*")}if(a.type===qe.FullSnapshot)F=a,H=0;else if(a.type===qe.IncrementalSnapshot){if(a.data.source===We.Mutation&&a.data.isAttachIframe)return;H++;var l=o&&H>=o,c=r&&a.timestamp-F.timestamp>r;(l||c)&&Ot(!0)}};var q=e=>{At({type:qe.IncrementalSnapshot,data:t({source:We.Mutation},e)})},W=e=>At({type:qe.IncrementalSnapshot,data:t({source:We.Scroll},e)}),V=e=>At({type:qe.IncrementalSnapshot,data:t({source:We.CanvasMutation},e)}),Y=new Bt({mutationCb:q,adoptedStyleSheetCb:e=>At({type:qe.IncrementalSnapshot,data:t({source:We.AdoptedStyleSheet},e)})}),j=new yt({mirror:Yt,mutationCb:q,stylesheetManager:Y,recordCrossOriginIframes:w,wrappedEmit:At});for(var G of E||[])G.getMirror&&G.getMirror({nodeMirror:Yt,crossOriginIframeMirror:j.crossOriginIframeMirror,crossOriginIframeStyleMirror:j.crossOriginIframeStyleMirror});var z=new Ht;Rt=new Pt({recordCanvas:I,mutationCb:V,win:window,blockClass:i,blockSelector:a,mirror:Yt,sampling:b.canvas,dataURLOptions:_});var U=new bt({mutationCb:q,scrollCb:W,bypassOptions:{blockClass:i,blockSelector:a,maskTextClass:c,maskTextSelector:u,inlineStylesheet:d,maskInputOptions:P,dataURLOptions:_,maskTextFn:v,maskInputFn:m,recordCanvas:I,inlineImages:N,sampling:b,slimDOMOptions:B,iframeManager:j,stylesheetManager:Y,canvasManager:Rt,keepIframeSrcFn:A,processedNodeManager:z},mirror:Yt});Ot=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(S){At({type:qe.Meta,data:{href:window.location.href,width:Me(),height:xe()}},e),Y.reset(),U.init(),ot.forEach((e=>e.lock()));var t=function(e,t){var{mirror:n=new M,blockClass:r="rr-block",blockSelector:o=null,maskTextClass:i="rr-mask",maskTextSelector:a=null,inlineStylesheet:s=!0,inlineImages:l=!1,recordCanvas:c=!1,maskAllInputs:u=!1,maskTextFn:d,maskInputFn:p,slimDOM:h=!1,dataURLOptions:f,preserveWhiteSpace:m,onSerialize:v,onIframeLoad:g,iframeLoadTimeout:y,onStylesheetLoad:b,stylesheetLoadTimeout:_,keepIframeSrcFn:C=(()=>!1)}=t||{};return se(e,{doc:e,mirror:n,blockClass:r,blockSelector:o,maskTextClass:i,maskTextSelector:a,skipChild:!1,inlineStylesheet:s,maskInputOptions:!0===u?{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===u?{password:!0}:u,maskTextFn:d,maskInputFn:p,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:f,inlineImages:l,recordCanvas:c,preserveWhiteSpace:m,onSerialize:v,onIframeLoad:g,iframeLoadTimeout:y,onStylesheetLoad:b,stylesheetLoadTimeout:_,keepIframeSrcFn:C,newlyAddedElement:!1})}(document,{mirror:Yt,blockClass:i,blockSelector:a,maskTextClass:c,maskTextSelector:u,inlineStylesheet:d,maskAllInputs:P,maskTextFn:v,maskInputFn:m,slimDOM:B,dataURLOptions:_,recordCanvas:I,inlineImages:N,onSerialize:e=>{Le(e,Yt)&&j.addIframe(e),De(e,Yt)&&Y.trackLinkElement(e),Fe(e)&&U.addShadowRoot(ye.shadowRoot(e),document)},onIframeLoad:(e,t)=>{j.attachIframe(e,t),U.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{Y.attachLinkElement(e,t)},keepIframeSrcFn:A});if(!t)return console.warn("Failed to snapshot the document");At({type:qe.FullSnapshot,data:{node:t,initialOffset:Te(window)}},e),ot.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Y.adoptStyleSheets(document.adoptedStyleSheets,Yt.getId(document))}};try{var X=[],K=e=>{var n;return rt(ft)({mutationCb:q,mousemoveCb:(e,t)=>At({type:qe.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>At({type:qe.IncrementalSnapshot,data:t({source:We.MouseInteraction},e)}),scrollCb:W,viewportResizeCb:e=>At({type:qe.IncrementalSnapshot,data:t({source:We.ViewportResize},e)}),inputCb:e=>At({type:qe.IncrementalSnapshot,data:t({source:We.Input},e)}),mediaInteractionCb:e=>At({type:qe.IncrementalSnapshot,data:t({source:We.MediaInteraction},e)}),styleSheetRuleCb:e=>At({type:qe.IncrementalSnapshot,data:t({source:We.StyleSheetRule},e)}),styleDeclarationCb:e=>At({type:qe.IncrementalSnapshot,data:t({source:We.StyleDeclaration},e)}),canvasMutationCb:V,fontCb:e=>At({type:qe.IncrementalSnapshot,data:t({source:We.Font},e)}),selectionCb:e=>{At({type:qe.IncrementalSnapshot,data:t({source:We.Selection},e)})},customElementCb:e=>{At({type:qe.IncrementalSnapshot,data:t({source:We.CustomElement},e)})},blockClass:i,ignoreClass:s,ignoreSelector:l,maskTextClass:c,maskTextSelector:u,maskInputOptions:P,inlineStylesheet:d,sampling:b,recordDOM:S,recordCanvas:I,inlineImages:N,userTriggeredOnInput:T,collectFonts:x,doc:e,maskInputFn:m,maskTextFn:v,keepIframeSrcFn:A,blockSelector:a,slimDOMOptions:B,dataURLOptions:_,mirror:Yt,iframeManager:j,stylesheetManager:Y,shadowDomManager:U,processedNodeManager:z,canvasManager:Rt,ignoreCSSAttributes:O,plugins:(null==(n=null==E?void 0:E.filter((e=>e.observer)))?void 0:n.map((e=>({observer:e.observer,options:e.options,callback:t=>At({type:qe.Plugin,data:{plugin:e.name,payload:t}})}))))||[]},g)};j.addLoadListener((e=>{try{X.push(K(e.contentDocument))}catch(e){console.warn(e)}}));var J=()=>{Ot(),X.push(K(document)),Zt=!0};return"interactive"===document.readyState||"complete"===document.readyState?J():(X.push(be("DOMContentLoaded",(()=>{At({type:qe.DomContentLoaded,data:{}}),"DOMContentLoaded"===k&&J()}))),X.push(be("load",(()=>{At({type:qe.Load,data:{}}),"load"===k&&J()}),window))),()=>{X.forEach((e=>e())),z.destroy(),Zt=!1,Ke=void 0}}catch(e){console.warn(e)}}jt.addCustomEvent=(e,t)=>{if(!Zt)throw new Error("please add custom event after start recording");At({type:qe.Custom,data:{tag:e,payload:t}})},jt.freezePage=()=>{ot.forEach((e=>e.freeze()))},jt.takeFullSnapshot=e=>{if(!Zt)throw new Error("please take full snapshot after start recording");Ot(e)},jt.mirror=Yt,(Vt=Wt||(Wt={}))[Vt.NotStarted=0]="NotStarted",Vt[Vt.Running=1]="Running",Vt[Vt.Stopped=2]="Stopped";var Gt,zt=Object.defineProperty,Ut=(e,t,n)=>((e,t,n)=>t in e?zt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),Xt=Object.defineProperty,Kt=(e,t,n)=>((e,t,n)=>t in e?Xt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),Jt=Object.defineProperty,Qt=(e,t,n)=>((e,t,n)=>t in e?Jt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),$t={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},en={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},tn={},nn=()=>!!globalThis.Zone;function rn(e){if(tn[e])return tn[e];var t=globalThis[e],n=t.prototype,r=e in $t?$t[e]:void 0,o=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]"))}))),i=e in en?en[e]:void 0,a=Boolean(i&&i.every((e=>{var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))})));if(o&&a&&!nn())return tn[e]=t.prototype,t.prototype;try{var s=document.createElement("iframe");document.body.appendChild(s);var l=s.contentWindow;if(!l)return t.prototype;var c=l[e].prototype;return document.body.removeChild(s),c?tn[e]=c:n}catch(e){return n}}var on={};function an(e,t,n){var r,o="".concat(e,".").concat(String(n));if(on[o])return on[o].call(t);var i=rn(e),a=null==(r=Object.getOwnPropertyDescriptor(i,n))?void 0:r.get;return a?(on[o]=a,a.call(t)):t[n]}var sn={};function ln(e,t,n){var r="".concat(e,".").concat(String(n));if(sn[r])return sn[r].bind(t);var o=rn(e)[n];return"function"!=typeof o?t[n]:(sn[r]=o,o.bind(t))}var cn={childNodes:function(e){return an("Node",e,"childNodes")},parentNode:function(e){return an("Node",e,"parentNode")},parentElement:function(e){return an("Node",e,"parentElement")},textContent:function(e){return an("Node",e,"textContent")},contains:function(e,t){return ln("Node",e,"contains")(t)},getRootNode:function(e){return ln("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?an("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?an("Element",e,"shadowRoot"):null},querySelector:function(e,t){return an("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return an("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return rn("MutationObserver").constructor}};class un{constructor(){Qt(this,"idNodeMap",new Map),Qt(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 dn(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&dn(cn.parentNode(e),t,n);for(var r=e.classList.length;r--;){var o=e.classList[r];if(t.test(o))return!0}return!!n&&dn(cn.parentNode(e),t,n)}class pn{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 pn))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 hn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},fn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},mn={},vn=()=>!!globalThis.Zone;function gn(e){if(mn[e])return mn[e];var t=globalThis[e],n=t.prototype,r=e in hn?hn[e]:void 0,o=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]"))}))),i=e in fn?fn[e]:void 0,a=Boolean(i&&i.every((e=>{var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))})));if(o&&a&&!vn())return mn[e]=t.prototype,t.prototype;try{var s=document.createElement("iframe");document.body.appendChild(s);var l=s.contentWindow;if(!l)return t.prototype;var c=l[e].prototype;return document.body.removeChild(s),c?mn[e]=c:n}catch(e){return n}}var yn={};function bn(e,t,n){var r,o="".concat(e,".").concat(String(n));if(yn[o])return yn[o].call(t);var i=gn(e),a=null==(r=Object.getOwnPropertyDescriptor(i,n))?void 0:r.get;return a?(yn[o]=a,a.call(t)):t[n]}var _n={};function Cn(e,t,n){var r="".concat(e,".").concat(String(n));if(_n[r])return _n[r].bind(t);var o=gn(e)[n];return"function"!=typeof o?t[n]:(_n[r]=o,o.bind(t))}var Sn={childNodes:function(e){return bn("Node",e,"childNodes")},parentNode:function(e){return bn("Node",e,"parentNode")},parentElement:function(e){return bn("Node",e,"parentElement")},textContent:function(e){return bn("Node",e,"textContent")},contains:function(e,t){return Cn("Node",e,"contains")(t)},getRootNode:function(e){return Cn("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?bn("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?bn("Element",e,"shadowRoot"):null},querySelector:function(e,t){return bn("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return bn("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return gn("MutationObserver").constructor}};var In="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.",wn={map:{},getId:()=>(console.error(In),-1),getNode:()=>(console.error(In),null),removeNodeFromMap(){console.error(In)},has:()=>(console.error(In),!1),reset(){console.error(In)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(wn=new Proxy(wn,{get:(e,t,n)=>("map"===t&&console.error(In),Reflect.get(e,t,n))}));var kn=Date.now;function Tn(e){return e?e.nodeType===e.ELEMENT_NODE?e:Sn.parentElement(e):null}/[1-9][0-9]{12}/.test(Date.now().toString())||(kn=()=>(new Date).getTime());function xn(e){var t,n=null;return"getRootNode"in e&&(null==(t=Sn.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Sn.host(Sn.getRootNode(e))&&(n=Sn.host(Sn.getRootNode(e))),n}function Mn(e){for(var t,n=e;t=xn(n);)n=t;return n}function Nn(e){var t=e.ownerDocument;if(!t)return!1;var n=Mn(e);return Sn.contains(t,n)}for(var En=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:class{constructor(){Kt(this,"id",1),Kt(this,"styleIDMap",new WeakMap),Kt(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 wn},closestElementOfNode:Tn,getBaseDimension:function e(t,n){var r,o,i=null==(o=null==(r=t.ownerDocument)?void 0:r.defaultView)?void 0:o.frameElement;if(!i||i===n)return{x:0,y:0,relativeScale:1,absoluteScale:1};var a=i.getBoundingClientRect(),s=e(i,n),l=a.height/i.clientHeight;return{x:a.x*s.relativeScale+s.x,y:a.y*s.relativeScale+s.y,relativeScale:l,absoluteScale:s.absoluteScale*l}},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:Mn,getShadowHost:xn,getWindowHeight:function(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight},getWindowScroll:function(e){var t,n,r,o,i=e.document;return{left:i.scrollingElement?i.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:i.documentElement.scrollLeft||(null==i?void 0:i.body)&&(null==(t=Sn.parentElement(i.body))?void 0:t.scrollLeft)||(null==(n=null==i?void 0:i.body)?void 0:n.scrollLeft)||0,top:i.scrollingElement?i.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==i?void 0:i.documentElement.scrollTop)||(null==i?void 0:i.body)&&(null==(r=Sn.parentElement(i.body))?void 0:r.scrollTop)||(null==(o=null==i?void 0:i.body)?void 0:o.scrollTop)||0}},getWindowWidth:function(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth},hasShadowRoot:function(e){return!!e&&(e instanceof pn&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(Sn.shadowRoot(e)))},hookSetter:function e(t,n,r,o){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window,a=i.Object.getOwnPropertyDescriptor(t,n);return i.Object.defineProperty(t,n,o?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&&(Sn.contains(t,e)||Nn(e))},isAncestorRemoved:function e(t,n){if(o=(r=t)&&"host"in r&&"mode"in r&&cn.host(r)||null,Boolean(o&&"shadowRoot"in o&&cn.shadowRoot(o)===r))return!1;var r,o,i=n.getId(t);if(!n.has(i))return!0;var a=Sn.parentNode(t);return(!a||a.nodeType!==t.DOCUMENT_NODE)&&(!a||e(a,n))},isBlocked:function(e,t,n,r){if(!e)return!1;var o=Tn(e);if(!o)return!1;try{if("string"==typeof t){if(o.classList.contains(t))return!0;if(r&&null!==o.closest("."+t))return!0}else if(dn(o,t,r))return!0}catch(e){}if(n){if(o.matches(n))return!0;if(r&&null!==o.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 kn},on:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,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],o=n(r);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch(e){return()=>{}}},polyfill:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]: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 o of e){var{nextId:i,parentId:a}=o;if(i&&i in t){var s=t[i];if(s.parent){var l=s.parent.children.indexOf(s);s.parent.children.splice(l,0,n(o,s.parent))}else{var c=r.indexOf(s);r.splice(c,0,n(o,null))}}else if(a in t){var u=t[a];u.children.push(n(o,u))}else r.push(n(o,null))}return r},shadowHostInDom:Nn,throttle:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=null,o=0;return function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];var l=Date.now();o||!1!==n.leading||(o=l);var c=t-(l-o),u=this;c<=0||c>t?(r&&(clearTimeout(r),r=null),o=l,e.apply(u,a)):r||!1===n.trailing||(r=setTimeout((()=>{o=!1===n.leading?0:Date.now(),r=null,e.apply(u,a)}),c))}},uniqueTextMutations:function(e){for(var t=new Set,n=[],r=e.length;r--;){var o=e[r];t.has(o.id)||(n.push(o),t.add(o.id))}return n}},Symbol.toStringTag,{value:"Module"})),An="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",On="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Rn=0;Rn<64;Rn++)On[An.charCodeAt(Rn)]=Rn;var Ln;"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 Dn=document.createElement("iframe");document.body.appendChild(Dn),Array.from=(null==(Gt=Dn.contentWindow)?void 0:Gt.Array.from)||Array.from,document.body.removeChild(Dn)}}catch(e){console.debug("Unable to override Array.from",e)}new un,function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(Ln||(Ln={}));class Fn{constructor(e){Ut(this,"fileName"),Ut(this,"functionName"),Ut(this,"lineNumber"),Ut(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?"".concat(this.functionName," (").concat(this.fileName,":").concat(e,":").concat(t,")"):"".concat(this.fileName,":").concat(e,":").concat(t)}}var Pn=/(^|@)\S+:\d+/,Bn=/^\s*at .*(\S+:\d+|\(native\))/m,Hn=/^(eval@)?(\[native code])?$/,Zn={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(Bn)?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: ".concat(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(Bn)}),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),o=this.extractLocation(n?n[1]:r.pop()),i=r.join(" ")||void 0,a=["eval","<anonymous>"].indexOf(o[0])>-1?void 0:o[0];return new Fn({functionName:i,fileName:a,lineNumber:o[1],columnNumber:o[2]})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(e){return!e.match(Hn)}),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 Fn({functionName:e});var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(t),r=n&&n[1]?n[1]:void 0,o=this.extractLocation(e.replace(t,""));return new Fn({functionName:r,fileName:o[0],lineNumber:o[1],columnNumber:o[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=[],o=2,i=n.length;o<i;o+=2){var a=t.exec(n[o]);a&&r.push(new Fn({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=[],o=0,i=n.length;o<i;o+=2){var a=t.exec(n[o]);a&&r.push(new Fn({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(Pn)&&!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 Fn({functionName:r,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})}),this)}};function qn(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,o=[];if(r.children&&r.children.length>0)for(var i=0;i<r.children.length;i++){var a=r.children[i];a.localName&&a.localName.toLowerCase&&a.localName.toLowerCase()===n&&o.push(a)}o.length>1&&(n+=":eq(".concat(o.indexOf(e),")")),t=n+(t?">"+t:""),e=r}return t}function Wn(e){return"[object Object]"===Object.prototype.toString.call(e)}function Vn(e,t){if(0===t)return!0;var n=Object.keys(e);for(var r of n)if(Wn(e[r])&&Vn(e[r],t-1))return!0;return!1}function Yn(e,t){var n={numOfKeysLimit:50,depthOfLimit:4};Object.assign(n,t);var r=[],o=[];return JSON.stringify(e,(function(e,t){if(r.length>0){var i=r.indexOf(this);~i?r.splice(i+1):r.push(this),~i?o.splice(i,1/0,e):o.push(e),~r.indexOf(t)&&(t=r[0]===t?"[Circular ~]":"[Circular ~."+o.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(Wn(e)&&Object.keys(e).length>n.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if(Wn(e)&&Vn(e,n.depthOfLimit))return!0;return!1}(t))return function(e){var t=e.toString();n.stringLengthLimit&&t.length>n.stringLengthLimit&&(t="".concat(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 l=t[s];Array.isArray(l)?a[s]=qn(l.length?l[0]:null):a[s]=l}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 jn={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 Gn(e,t,n){var r,o=n?Object.assign({},jn,n):jn,i=o.logger;if(!i)return()=>{};r="string"==typeof i?t[i]:i;var a=0,s=!1,l=[];if(o.level.includes("error")){var c=t=>{var n=t.message,r=t.error,i=Zn.parse(r).map((e=>e.toString())),a=[Yn(n,o.stringifyOptions)];e({level:"error",trace:i,payload:a})};t.addEventListener("error",c),l.push((()=>{t.removeEventListener("error",c)}));var u=t=>{var n,r;t.reason instanceof Error?(n=t.reason,r=[Yn("Uncaught (in promise) ".concat(n.name,": ").concat(n.message),o.stringifyOptions)]):(n=new Error,r=[Yn("Uncaught (in promise)",o.stringifyOptions),Yn(t.reason,o.stringifyOptions)]);var i=Zn.parse(n).map((e=>e.toString()));e({level:"error",trace:i,payload:r})};t.addEventListener("unhandledrejection",u),l.push((()=>{t.removeEventListener("unhandledrejection",u)}))}for(var d of o.level)l.push(p(r,d));return()=>{l.forEach((e=>e()))};function p(t,n){var r=this;return t[n]?En.patch(t,n,(t=>function(){for(var i=arguments.length,l=new Array(i),c=0;c<i;c++)l[c]=arguments[c];if(t.apply(r,l),!("assert"===n&&l[0]||s)){s=!0;try{var u=Zn.parse(new Error).map((e=>e.toString())).splice(1),d=("assert"===n?l.slice(1):l).map((e=>Yn(e,o.stringifyOptions)));++a<o.lengthThreshold?e({level:n,trace:u,payload:d}):a===o.lengthThreshold&&e({level:"warn",trace:[],payload:[Yn("The number of log records reached the threshold.")]})}catch(e){t("rrweb logger error:",e,...l)}finally{s=!1}}})):()=>{}}}var zn=e=>({name:"rrweb/console@1",observer:Gn,options:e}),Un="undefined"!=typeof window?window:void 0,Xn="undefined"!=typeof globalThis?globalThis:Un,Kn=Array.prototype.forEach,Jn=null==Xn?void 0:Xn.navigator,Qn=null==Xn?void 0:Xn.document;null==Xn||Xn.location,null==Xn||Xn.fetch,null!=Xn&&Xn.XMLHttpRequest&&"withCredentials"in new Xn.XMLHttpRequest&&Xn.XMLHttpRequest,null==Xn||Xn.AbortController,null==Jn||Jn.userAgent;var $n,er=null!=Un?Un:{};!function(e){e.GZipJS="gzip-js",e.Base64="base64"}($n||($n={}));var tr=["fatal","error","warning","log","info","debug"];function nr(e,t){return-1!==e.indexOf(t)}var rr=function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},or=Array.isArray,ir=Object.prototype,ar=ir.hasOwnProperty,sr=ir.toString,lr=or||function(e){return"[object Array]"===sr.call(e)},cr=e=>"function"==typeof e,ur=e=>cr(e)&&-1!==e.toString().indexOf("[native code]"),dr=()=>!!Un.Zone,pr=e=>e===Object(e)&&!lr(e),hr=e=>void 0===e,fr=e=>"[object String]"==sr.call(e),mr=e=>fr(e)&&0===e.trim().length,vr=e=>null===e,gr=e=>hr(e)||vr(e),yr=e=>"[object Number]"==sr.call(e),br=e=>"[object Boolean]"===sr.call(e),_r=e=>e instanceof Document,Cr=e=>e instanceof FormData,Sr=e=>{var t={_log:function(t){if(Un&&er.POSTHOG_DEBUG&&!hr(Un.console)&&Un.console){for(var n=("__rrweb_original__"in Un.console[t]?Un.console[t].__rrweb_original__:Un.console[t]),r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];n(e,...o)}},info:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t._log("log",...n)},warn:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t._log("warn",...n)},error:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t._log("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 ".concat(e))},createLogger:t=>Sr("".concat(e," ").concat(t))};return t},Ir=Sr("[PostHog.js]"),wr=Ir.createLogger,kr={};function Tr(e,t,n){if(lr(e))if(Kn&&e.forEach===Kn)e.forEach(t,n);else if("length"in e&&e.length===+e.length)for(var r=0,o=e.length;r<o;r++)if(r in e&&t.call(n,e[r],r)===kr)return}function xr(e,t,n){if(!gr(e)){if(lr(e))return Tr(e,t,n);if(Cr(e)){for(var r of e.entries())if(t.call(n,r[1],r[0])===kr)return}else for(var o in e)if(ar.call(e,o)&&t.call(n,e[o],o)===kr)return}}var Mr=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 Tr(n,(function(t){for(var n in t)void 0!==t[n]&&(e[n]=t[n])})),e};function Nr(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r}var Er=function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"&",o=[];return xr(e,(function(e,r){hr(e)||hr(r)||"undefined"===r||(t=encodeURIComponent((e=>e instanceof File)(e)?e.name:e.toString()),n=encodeURIComponent(r),o[o.length]=n+"="+t)})),o.join(r)};function Ar(e){return!!e&&1===e.nodeType}function Or(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function Rr(e){return e?rr(e).split(/\s+/):[]}function Lr(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 Rr(t)}function Dr(e){var t="";return Pr(e)&&!Br(e)&&e.childNodes&&e.childNodes.length&&xr(e.childNodes,(function(e){var n;(function(e){return!!e&&3===e.nodeType})(e)&&e.textContent&&(t+=null!==(n=function(e){return gr(e)?null:rr(e).split(/(\s+)/).filter((e=>jr(e))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}(e.textContent))&&void 0!==n?n:"")})),rr(t)}var Fr=["a","button","form","input","select","textarea","label"];function Pr(e){for(var t=e;t.parentNode&&!Or(t,"body");t=t.parentNode){var n=Lr(t);if(nr(n,"ph-sensitive")||nr(n,"ph-no-capture"))return!1}if(nr(Lr(e),"ph-include"))return!0;var r=e.type||"";if(fr(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var o=e.name||e.id||"";if(fr(o)){if(/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(o.replace(/[^a-zA-Z0-9]/g,"")))return!1}return!0}function Br(e){return!!(Or(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||Or(e,"select")||Or(e,"textarea")||"true"===e.getAttribute("contenteditable"))}var Hr="(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})",Zr=new RegExp("^(?:".concat(Hr,")$")),qr=new RegExp(Hr),Wr="\\d{3}-?\\d{2}-?\\d{4}",Vr=new RegExp("^(".concat(Wr,")$")),Yr=new RegExp("(".concat(Wr,")"));function jr(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(gr(e))return!1;if(fr(e)){if(e=rr(e),(t?Zr:qr).test((e||"").replace(/[- ]/g,"")))return!1;if((t?Vr:Yr).test(e))return!1}return!0}function Gr(e){var t=Dr(e);return jr(t="".concat(t," ").concat(zr(e)).trim())?t:""}function zr(e){var t="";return e&&e.childNodes&&e.childNodes.length&&xr(e.childNodes,(function(e){var n;if(e&&"span"===(null===(n=e.tagName)||void 0===n?void 0:n.toLowerCase()))try{var r=Dr(e);t="".concat(t," ").concat(r).trim(),e.childNodes&&e.childNodes.length&&(t="".concat(t," ").concat(zr(e)).trim())}catch(e){Ir.error("[AutoCapture]",e)}})),t}function Ur(e){return function(e){var n=e.map((e=>{var n,r,o="";if(e.tag_name&&(o+=e.tag_name),e.attr_class)for(var i of(e.attr_class.sort(),e.attr_class))o+=".".concat(i.replace(/"/g,""));var a=t(t(t(t({},e.text?{text:e.text}:{}),{},{"nth-child":null!==(n=e.nth_child)&&void 0!==n?n: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 Nr(a).sort(((e,t)=>{var[n]=e,[r]=t;return n.localeCompare(r)})).forEach((e=>{var[t,n]=e;return s[Xr(t.toString())]=Xr(n.toString())})),o+=":",o+=Nr(a).map((e=>{var[t,n]=e;return"".concat(t,'="').concat(n,'"')})).join("")}));return n.join(";")}(function(e){return e.map((e=>{var t,n,r={text:null===(t=e.$el_text)||void 0===t?void 0:t.slice(0,400),tag_name:e.tag_name,href:null===(n=e.attr__href)||void 0===n?void 0:n.slice(0,2048),attr_class:Kr(e),attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return Nr(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 Xr(e){return e.replace(/"|\\"/g,'\\"')}function Kr(e){var t=e.attr__class;return t?lr(t)?t:Rr(t):void 0}var Jr={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"]};function Qr(e,t,n){try{if(!(t in e))return()=>{};var r=e[t],o=n(r);return cr(o)&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=o,()=>{e[t]=r}}catch(e){return()=>{}}}function $r(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),o={hostname:r,isHostDenied:!1};if(null===(n=t.payloadHostDenyList)||void 0===n||!n.length||null==r||!r.trim().length)return o;for(var i of t.payloadHostDenyList)if(r.endsWith(i))return{hostname:r,isHostDenied:!0};return o}var eo=wr("[Recorder]"),to=e=>"navigation"===e.entryType,no=e=>"resource"===e.entryType;function ro(e,t,n){if(n.recordInitialRequests){var r=t.performance.getEntries().filter((e=>to(e)||no(e)&&n.initiatorTypes.includes(e.initiatorType)));e({requests:r.flatMap((e=>uo({entry:e,method:void 0,status:void 0,networkRequest:{},isInitial:!0}))),isInitial:!0})}var o=new t.PerformanceObserver((t=>{var r=t.getEntries().filter((e=>to(e)||no(e)&&n.initiatorTypes.includes(e.initiatorType)&&(e=>!n.recordBody&&!n.recordHeaders||"xmlhttprequest"!==e.initiatorType&&"fetch"!==e.initiatorType)(e)));e({requests:r.flatMap((e=>uo({entry:e,method:void 0,status:void 0,networkRequest:{}})))})})),i=PerformanceObserver.supportedEntryTypes.filter((e=>n.performanceEntryTypeToObserve.includes(e)));return o.observe({entryTypes:i}),()=>{o.disconnect()}}function oo(e,t){return!!t&&(br(t)||t[e])}function io(e){var{type:t,recordBody:n,headers:r}=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(br(n))return!0;if(lr(n))return o(n);var i=n[t];return br(i)?i:o(i)}function ao(e,t,n,r,o){return so.apply(this,arguments)}function so(){return so=r((function*(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(i>10)return eo.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=>no(e)&&e.initiatorType===t&&(hr(r)||e.startTime>=r)&&(hr(o)||e.startTime<=o)));return a||(yield new Promise((e=>setTimeout(e,50*i))),ao(e,t,n,r,o,i+1))})),so.apply(this,arguments)}function lo(e){var{body:t,options:n,url:r}=e;if(gr(t))return null;var{hostname:o,isHostDenied:i}=$r(r,n);if(i)return o+" is in deny list";if(fr(t))return t;if(_r(t))return t.textContent;if(Cr(t))return Er(t);if(pr(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 co=e=>!vr(e)&&("navigation"===e.entryType||"resource"===e.entryType);function uo(e){var{entry:n,method:r,status:o,networkRequest:i,isInitial:a,start:s,end:l,url:c,initiatorType:u}=e;s=n?n.startTime:s,l=n?n.responseEnd:l;var d=Math.floor(Date.now()-performance.now()),p=Math.floor(d+(s||0)),h=[t(t({},n?n.toJSON():{name:c}),{},{startTime:hr(s)?void 0:Math.round(s),endTime:hr(l)?void 0:Math.round(l),timeOrigin:d,timestamp:p,method:r,initiatorType:u||(n?n.initiatorType:void 0),status:o,requestHeaders:i.requestHeaders,requestBody:i.requestBody,responseHeaders:i.responseHeaders,responseBody:i.responseBody,isInitial:a})];if(co(n))for(var f of n.serverTiming||[])h.push({timeOrigin:d,timestamp:p,startTime:Math.round(n.startTime),name:f.name,duration:f.duration,entryType:"serverTiming"});return h}var po=["video/","audio/"];function ho(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 fo(){return fo=r((function*(e){var{r:t,options:n,url:r}=e,{hostname:o,isHostDenied:i}=$r(r,n);return i?Promise.resolve(o+" is in deny list"):ho(t)})),fo.apply(this,arguments)}function mo(){return mo=r((function*(e){var{r:t,options:n,url:r}=e,o=function(e){var t,{r:n,options:r,url:o}=e;if("chunked"===n.headers.get("Transfer-Encoding"))return"Chunked Transfer-Encoding is not supported";var i=null===(t=n.headers.get("Content-Type"))||void 0===t?void 0:t.toLowerCase(),a=po.some((e=>null==i?void 0:i.startsWith(e)));if(i&&a)return"Content-Type ".concat(i," is not supported");var{hostname:s,isHostDenied:l}=$r(o,r);return l?s+" is in deny list":null}({r:t,options:n,url:r});return vr(o)?ho(t):Promise.resolve(o)})),mo.apply(this,arguments)}function vo(e,t,n){if(!n.initiatorTypes.includes("fetch"))return()=>{};var o=oo("request",n.recordHeaders),i=oo("response",n.recordHeaders),a=Qr(t,"fetch",(a=>function(){var s=r((function*(r,s){var l,c,u,d=new Request(r,s),p={};try{var h={};d.headers.forEach(((e,t)=>{h[t]=e})),o&&(p.requestHeaders=h),io({type:"request",headers:h,url:r,recordBody:n.recordBody})&&(p.requestBody=yield function(e){return fo.apply(this,arguments)}({r:d,options:n,url:r})),c=t.performance.now(),l=yield a(d),u=t.performance.now();var f={};return l.headers.forEach(((e,t)=>{f[t]=e})),i&&(p.responseHeaders=f),io({type:"response",headers:f,url:r,recordBody:n.recordBody})&&(p.responseBody=yield function(e){return mo.apply(this,arguments)}({r:l,options:n,url:r})),l}finally{ao(t,"fetch",d.url,c,u).then((t=>{var n,r=uo({entry:t,method:d.method,status:null===(n=l)||void 0===n?void 0:n.status,networkRequest:p,start:c,end:u,url:d.url,initiatorType:"fetch"});e({requests:r})})).catch((()=>{}))}}));return function(e,t){return s.apply(this,arguments)}}()));return()=>{a()}}var go=null;function yo(e,n,r){if(!("performance"in n))return()=>{};if(go)return eo.warn("Network observer already initialised, doing nothing"),()=>{};var o=r?Object.assign({},Jr,r):Jr,i=n=>{var r=[];n.requests.forEach((e=>{var t=o.maskRequestFn(e);t&&r.push(t)})),r.length>0&&e(t(t({},n),{},{requests:r}))},a=ro(i,n,o),s=()=>{},l=()=>{};return(o.recordHeaders||o.recordBody)&&(s=function(e,t,n){if(!n.initiatorTypes.includes("xmlhttprequest"))return()=>{};var r=oo("request",n.recordHeaders),o=oo("response",n.recordHeaders),i=Qr(t.XMLHttpRequest.prototype,"open",(i=>function(a,s){var l,c,u=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],d=arguments.length>3?arguments[3]:void 0,p=arguments.length>4?arguments[4]:void 0,h=this,f=new Request(s),m={},v={},g=h.setRequestHeader.bind(h);h.setRequestHeader=(e,t)=>(v[e]=t,g(e,t)),r&&(m.requestHeaders=v);var y=h.send.bind(h);h.send=e=>(io({type:"request",headers:v,url:s,recordBody:n.recordBody})&&(m.requestBody=lo({body:e,options:n,url:s})),l=t.performance.now(),y(e)),h.addEventListener("readystatechange",(()=>{if(h.readyState===h.DONE){c=t.performance.now();var r={};h.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((e=>{var t=e.split(": "),n=t.shift(),o=t.join(": ");n&&(r[n]=o)})),o&&(m.responseHeaders=r),io({type:"response",headers:r,url:s,recordBody:n.recordBody})&&(m.responseBody=lo({body:h.response,options:n,url:s})),ao(t,"xmlhttprequest",f.url,l,c).then((t=>{var n=uo({entry:t,method:a,status:null==h?void 0:h.status,networkRequest:m,start:l,end:c,url:s.toString(),initiatorType:"xmlhttprequest"});e({requests:n})})).catch((()=>{}))}})),i.call(h,a,s,u,d,p)}));return()=>{i()}}(i,n,o),l=vo(i,n,o)),go=()=>{a(),s(),l()}}var bo,_o,Co,So=e=>({name:"rrweb/network@1",observer:yo,options:e});er.__PosthogExtensions__=er.__PosthogExtensions__||{},er.__PosthogExtensions__.rrwebPlugins={getRecordConsolePlugin:zn,getRecordNetworkPlugin:So},er.__PosthogExtensions__.rrweb={record:jt,version:"v2"},er.rrweb={record:jt,version:"v2"},er.rrwebConsoleRecord={getRecordConsolePlugin:zn},er.getRecordNetworkPlugin=So,function(e){e.Popover="popover",e.API="api",e.Widget="widget"}(bo||(bo={})),function(e){e.Open="open",e.MultipleChoice="multiple_choice",e.SingleChoice="single_choice",e.Rating="rating",e.Link="link"}(_o||(_o={})),function(e){e.NextQuestion="next_question",e.End="end",e.ResponseBased="response_based",e.SpecificQuestion="specific_question"}(Co||(Co={}));var Io,wo,ko,To,xo,Mo,No,Eo,Ao={},Oo=[],Ro=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Lo=Array.isArray;function Do(e,t){for(var n in t)e[n]=t[n];return e}function Fo(e){var t=e.parentNode;t&&t.removeChild(e)}function Po(e,t,n){var r,o,i,a={};for(i in t)"key"==i?r=t[i]:"ref"==i?o=t[i]:a[i]=t[i];if(arguments.length>2&&(a.children=arguments.length>3?Io.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===a[i]&&(a[i]=e.defaultProps[i]);return Bo(e,a,r,o,null)}function Bo(e,t,n,r,o){var i={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==o?++ko:o,__i:-1,__u:0};return null==o&&null!=wo.vnode&&wo.vnode(i),i}function Ho(e){return e.children}function Zo(e,t){this.props=e,this.context=t}function qo(e,t){if(null==t)return e.__?qo(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?qo(e):null}function Wo(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 Wo(e)}}function Vo(e){(!e.__d&&(e.__d=!0)&&To.push(e)&&!Yo.__r++||xo!==wo.debounceRendering)&&((xo=wo.debounceRendering)||Mo)(Yo)}function Yo(){var e,t,n,r,o,i,a,s,l;for(To.sort(No);e=To.shift();)e.__d&&(t=To.length,r=void 0,i=(o=(n=e).__v).__e,s=[],l=[],(a=n.__P)&&((r=Do({},o)).__v=o.__v+1,wo.vnode&&wo.vnode(r),Qo(a,r,o,n.__n,void 0!==a.ownerSVGElement,32&o.__u?[i]:null,s,null==i?qo(o):i,!!(32&o.__u),l),r.__.__k[r.__i]=r,$o(s,r,l),r.__e!=i&&Wo(r)),To.length>t&&To.sort(No));Yo.__r=0}function jo(e,t,n,r,o,i,a,s,l,c,u){var d,p,h,f,m,v=r&&r.__k||Oo,g=t.length;for(n.__d=l,function(e,t,n){var r,o,i,a,s,l=t.length,c=n.length,u=c,d=0;for(e.__k=[],r=0;r<l;r++)null!=(o=e.__k[r]=null==(o=t[r])||"boolean"==typeof o||"function"==typeof o?null:"string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?Bo(null,o,null,null,o):Lo(o)?Bo(Ho,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?Bo(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)?(o.__=e,o.__b=e.__b+1,s=zo(o,n,a=r+d,u),o.__i=s,i=null,-1!==s&&(u--,(i=n[s])&&(i.__u|=131072)),null==i||null===i.__v?(-1==s&&d--,"function"!=typeof o.type&&(o.__u|=65536)):s!==a&&(s===a+1?d++:s>a?u>l-a?d+=s-a:d--:d=s<a&&s==a-1?s-a:0,s!==r+d&&(o.__u|=65536))):(i=n[r])&&null==i.key&&i.__e&&(i.__e==e.__d&&(e.__d=qo(i)),ti(i,i,!1),n[r]=null,u--);if(u)for(r=0;r<c;r++)null!=(i=n[r])&&0==(131072&i.__u)&&(i.__e==e.__d&&(e.__d=qo(i)),ti(i,i))}(n,t,v),l=n.__d,d=0;d<g;d++)null!=(h=n.__k[d])&&"boolean"!=typeof h&&"function"!=typeof h&&(p=-1===h.__i?Ao:v[h.__i]||Ao,h.__i=d,Qo(e,h,p,o,i,a,s,l,c,u),f=h.__e,h.ref&&p.ref!=h.ref&&(p.ref&&ei(p.ref,null,h),u.push(h.ref,h.__c||f,h)),null==m&&null!=f&&(m=f),65536&h.__u||p.__k===h.__k?l=Go(h,l,e):"function"==typeof h.type&&void 0!==h.__d?l=h.__d:f&&(l=f.nextSibling),h.__d=void 0,h.__u&=-196609);n.__d=l,n.__e=m}function Go(e,t,n){var r,o;if("function"==typeof e.type){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=Go(r[o],t,n));return t}return e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e),t&&t.nextSibling}function zo(e,t,n,r){var o=e.key,i=e.type,a=n-1,s=n+1,l=t[n];if(null===l||l&&o==l.key&&i===l.type)return n;if(r>(null!=l&&0==(131072&l.__u)?1:0))for(;a>=0||s<t.length;){if(a>=0){if((l=t[a])&&0==(131072&l.__u)&&o==l.key&&i===l.type)return a;a--}if(s<t.length){if((l=t[s])&&0==(131072&l.__u)&&o==l.key&&i===l.type)return s;s++}}return-1}function Uo(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||Ro.test(t)?n:n+"px"}function Xo(e,t,n,r,o){var i;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||Uo(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Uo(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])i=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+i]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,i?Jo:Ko,i)):e.removeEventListener(t,i?Jo:Ko,i);else{if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&"rowSpan"!==t&&"colSpan"!==t&&"role"!==t&&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 Ko(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(wo.event?wo.event(e):e)}function Jo(e){return this.l[e.type+!0](wo.event?wo.event(e):e)}function Qo(e,t,n,r,o,i,a,s,l,c){var u,d,p,h,f,m,v,g,y,b,_,C,S,I,w,k=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(l=!!(32&n.__u),i=[s=t.__e=n.__e]),(u=wo.__b)&&u(t);e:if("function"==typeof k)try{if(g=t.props,y=(u=k.contextType)&&r[u.__c],b=u?y?y.props.value:u.__:r,n.__c?v=(d=t.__c=n.__c).__=d.__E:("prototype"in k&&k.prototype.render?t.__c=d=new k(g,b):(t.__c=d=new Zo(g,b),d.constructor=k,d.render=ni),y&&y.sub(d),d.props=g,d.state||(d.state={}),d.context=b,d.__n=r,p=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=k.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=Do({},d.__s)),Do(d.__s,k.getDerivedStateFromProps(g,d.__s))),h=d.props,f=d.state,d.__v=t,p)null==k.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==k.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)})),_=0;_<d._sb.length;_++)d.__h.push(d._sb[_]);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,f,m)}))}if(d.context=b,d.props=g,d.__P=e,d.__e=!1,C=wo.__r,S=0,"prototype"in k&&k.prototype.render){for(d.state=d.__s,d.__d=!1,C&&C(t),u=d.render(d.props,d.state,d.context),I=0;I<d._sb.length;I++)d.__h.push(d._sb[I]);d._sb=[]}else do{d.__d=!1,C&&C(t),u=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++S<25);d.state=d.__s,null!=d.getChildContext&&(r=Do(Do({},r),d.getChildContext())),p||null==d.getSnapshotBeforeUpdate||(m=d.getSnapshotBeforeUpdate(h,f)),jo(e,Lo(w=null!=u&&u.type===Ho&&null==u.key?u.props.children:u)?w:[w],t,n,r,o,i,a,s,l,c),d.base=t.__e,t.__u&=-161,d.__h.length&&a.push(d),v&&(d.__E=d.__=null)}catch(e){t.__v=null,l||null!=i?(t.__e=s,t.__u|=l?160:32,i[i.indexOf(s)]=null):(t.__e=n.__e,t.__k=n.__k),wo.__e(e,t,n)}else null==i&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=function(e,t,n,r,o,i,a,s,l){var c,u,d,p,h,f,m,v=n.props,g=t.props,y=t.type;if("svg"===y&&(o=!0),null!=i)for(c=0;c<i.length;c++)if((h=i[c])&&"setAttribute"in h==!!y&&(y?h.localName===y:3===h.nodeType)){e=h,i[c]=null;break}if(null==e){if(null===y)return document.createTextNode(g);e=o?document.createElementNS("http://www.w3.org/2000/svg",y):document.createElement(y,g.is&&g),i=null,s=!1}if(null===y)v===g||s&&e.data===g||(e.data=g);else{if(i=i&&Io.call(e.childNodes),v=n.props||Ao,!s&&null!=i)for(v={},c=0;c<e.attributes.length;c++)v[(h=e.attributes[c]).name]=h.value;for(c in v)h=v[c],"children"==c||("dangerouslySetInnerHTML"==c?d=h:"key"===c||c in g||Xo(e,c,null,h,o));for(c in g)h=g[c],"children"==c?p=h:"dangerouslySetInnerHTML"==c?u=h:"value"==c?f=h:"checked"==c?m=h:"key"===c||s&&"function"!=typeof h||v[c]===h||Xo(e,c,h,v[c],o);if(u)s||d&&(u.__html===d.__html||u.__html===e.innerHTML)||(e.innerHTML=u.__html),t.__k=[];else if(d&&(e.innerHTML=""),jo(e,Lo(p)?p:[p],t,n,r,o&&"foreignObject"!==y,i,a,i?i[0]:n.__k&&qo(n,0),s,l),null!=i)for(c=i.length;c--;)null!=i[c]&&Fo(i[c]);s||(c="value",void 0!==f&&(f!==e[c]||"progress"===y&&!f||"option"===y&&f!==v[c])&&Xo(e,c,f,v[c],!1),c="checked",void 0!==m&&m!==e[c]&&Xo(e,c,m,v[c],!1))}return e}(n.__e,t,n,r,o,i,a,l,c);(u=wo.diffed)&&u(t)}function $o(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)ei(n[r],n[++r],n[++r]);wo.__c&&wo.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){wo.__e(e,t.__v)}}))}function ei(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){wo.__e(e,n)}}function ti(e,t,n){var r,o;if(wo.unmount&&wo.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||ei(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){wo.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&ti(r[o],t,n||"function"!=typeof e.type);n||null==e.__e||Fo(e.__e),e.__=e.__e=e.__d=void 0}function ni(e,t,n){return this.constructor(e,n)}function ri(e,t,n){var r,o,i,a;wo.__&&wo.__(e,t),o=(r="function"==typeof n)?null:t.__k,i=[],a=[],Qo(t,e=(!r&&n||t).__k=Po(Ho,null,[e]),o||Ao,Ao,void 0!==t.ownerSVGElement,!r&&n?[n]:o?null:t.firstChild?Io.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,a),$o(i,e,a)}function oi(e,t,n){var r,o,i,a,s=Do({},e.props);for(i in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)"key"==i?r=t[i]:"ref"==i?o=t[i]:s[i]=void 0===t[i]&&void 0!==a?a[i]:t[i];return arguments.length>2&&(s.children=arguments.length>3?Io.call(arguments,2):n),Bo(e.type,s,r||e.key,o||e.ref,null)}Io=Oo.slice,wo={__e:function(e,t,n,r){for(var o,i,a;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),a=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),a=o.__d),a)return o.__E=o}catch(t){e=t}throw e}},ko=0,Zo.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Do({},this.state),"function"==typeof e&&(e=e(Do({},n),this.props)),e&&Do(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),Vo(this))},Zo.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Vo(this))},Zo.prototype.render=Ho,To=[],Mo="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,No=function(e,t){return e.__v.__b-t.__v.__b},Yo.__r=0,Eo=0;var ii,ai,si,li,ci=0,ui=[],di=[],pi=wo.__b,hi=wo.__r,fi=wo.diffed,mi=wo.__c,vi=wo.unmount;function gi(e,t){wo.__h&&wo.__h(ai,e,ci||t),ci=0;var n=ai.__H||(ai.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:di}),n.__[e]}function yi(e){return ci=1,function(e,t,n){var r=gi(ii++,2);if(r.t=e,!r.__c&&(r.__=[Ni(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=ai,!ai.u)){var o=function(e,t,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter((function(e){return e.__c}));if(o.every((function(e){return!e.__N})))return!i||i.call(this,e,t,n);var a=!1;return o.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)&&(!i||i.call(this,e,t,n))};ai.u=!0;var i=ai.shouldComponentUpdate,a=ai.componentWillUpdate;ai.componentWillUpdate=function(e,t,n){if(this.__e){var r=i;i=void 0,o(e,t,n),i=r}a&&a.call(this,e,t,n)},ai.shouldComponentUpdate=o}return r.__N||r.__}(Ni,e)}function bi(e,t){var n=gi(ii++,3);!wo.__s&&Mi(n.__H,t)&&(n.__=e,n.i=t,ai.__H.__h.push(n))}function _i(e){return ci=5,Ci((function(){return{current:e}}),[])}function Ci(e,t){var n=gi(ii++,7);return Mi(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function Si(e){var t=ai.context[e.__c],n=gi(ii++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(ai)),t.props.value):e.__}function Ii(){for(var e;e=ui.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Ti),e.__H.__h.forEach(xi),e.__H.__h=[]}catch(t){e.__H.__h=[],wo.__e(t,e.__v)}}wo.__b=function(e){ai=null,pi&&pi(e)},wo.__r=function(e){hi&&hi(e),ii=0;var t=(ai=e.__c).__H;t&&(si===ai?(t.__h=[],ai.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=di,e.__N=e.i=void 0}))):(t.__h.forEach(Ti),t.__h.forEach(xi),t.__h=[],ii=0)),si=ai},wo.diffed=function(e){fi&&fi(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==ui.push(t)&&li===wo.requestAnimationFrame||((li=wo.requestAnimationFrame)||ki)(Ii)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==di&&(e.__=e.__V),e.i=void 0,e.__V=di}))),si=ai=null},wo.__c=function(e,t){t.some((function(e){try{e.__h.forEach(Ti),e.__h=e.__h.filter((function(e){return!e.__||xi(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],wo.__e(n,e.__v)}})),mi&&mi(e,t)},wo.unmount=function(e){vi&&vi(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{Ti(e)}catch(e){t=e}})),n.__H=void 0,t&&wo.__e(t,n.__v))};var wi="function"==typeof requestAnimationFrame;function ki(e){var t,n=function(){clearTimeout(r),wi&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);wi&&(t=requestAnimationFrame(n))}function Ti(e){var t=ai,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),ai=t}function xi(e){var t=ai;e.__c=e.__(),ai=t}function Mi(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function Ni(e,t){return"function"==typeof t?t(e):t}var Ei=Qn;var Ai=Un,Oi=Qn,Ri="seenSurvey_",Li=wr("[Surveys]"),Di=e=>"\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: ".concat((null==e?void 0:e.fontFamily)||"-apple-system",', BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n text-align: left;\n max-width: ').concat(parseInt((null==e?void 0:e.maxWidth)||"300"),"px;\n width: 100%;\n z-index: ").concat(parseInt((null==e?void 0:e.zIndex)||"99999"),";\n border: 1.5px solid ").concat((null==e?void 0:e.borderColor)||"#c9c6c6",";\n border-bottom: 0px;\n ").concat({left:"left: 30px;",right:"right: 30px;",center:"\n left: 50%;\n transform: translateX(-50%);\n "}[(null==e?void 0:e.position)||"right"]||"right: 30px;","\n flex-direction: column;\n background: ").concat((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: 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: ").concat((null==e?void 0:e.fontFamily)||"-apple-system",', BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\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: ').concat((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: ").concat((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 ").concat((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: ").concat((null==e?void 0:e.backgroundColor)||"#eeeded",";\n text-decoration: none;\n backgroundColor: ").concat((null==e?void 0:e.backgroundColor)||"#eeeded",";\n color: ").concat(Pi((null==e?void 0:e.backgroundColor)||"#eeeded"),";\n }\n .survey-question {\n font-weight: 500;\n font-size: 14px;\n background: ").concat((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: ").concat((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 ").concat((null==e?void 0:e.borderColor)||"#c9c6c6",";\n }\n .rating-options-number > .ratings-number {\n border-right: 1px solid ").concat((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: ").concat((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: ").concat((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: ").concat((null==e?void 0:e.backgroundColor)||"#eeeded",";\n opacity: .60;\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: ").concat((null==e?void 0:e.backgroundColor)||"#eeeded",";\n }\n .thank-you-message-header {\n margin: 10px 0px 0px;\n background: ").concat((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 ");function Fi(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 Pi(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Hi;"#"===t[0]&&(e=Fi(t)),t.startsWith("rgb")&&(e=t);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"}[t.toLowerCase()];if(n&&(e=Fi(n)),!e)return"black";var r=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(r){var o=parseInt(r[1]),i=parseInt(r[2]),a=parseInt(r[3]);return Math.sqrt(o*o*.299+i*i*.587+a*a*.114)>127.5?"black":"white"}return"black"}var Bi={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:"right"},Hi="#eeeded",Zi=function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,o=arguments.length>2?arguments[2]:void 0;o?(localStorage.setItem(Gi(r),"true"),o.capture("survey sent",t(t({$survey_name:r.name,$survey_id:r.id,$survey_iteration:r.current_iteration,$survey_iteration_start_date:r.current_iteration_start_date,$survey_questions:r.questions.map((e=>e.question)),sessionRecordingUrl:null===(e=o.get_session_replay_url)||void 0===e?void 0:e.call(o)},n),{},{$set:{[zi(r,"responded")]:!0}})),Ai.dispatchEvent(new Event("PHSurveySent"))):Li.error("[survey sent] event not captured, PostHog instance not found.")},qi=(e,t,n)=>{var r;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===(r=t.get_session_replay_url)||void 0===r?void 0:r.call(t),$set:{[zi(e,"dismissed")]:!0}}),localStorage.setItem(Gi(e),"true"),Ai.dispatchEvent(new Event("PHSurveyClosed"))):Li.error("[survey dismissed] event not captured, PostHog instance not found.")},Wi=e=>e.map((e=>({sort:Math.floor(10*Math.random()),value:e}))).sort(((e,t)=>e.sort-t.sort)).map((e=>e.value)),Vi=(e,t)=>e.length===t.length&&e.every(((e,n)=>e===t[n]))?t.reverse():t,Yi=e=>(e.questions.forEach(((e,t)=>{e.originalQuestionIndex=t})),e.appearance&&e.appearance.shuffleQuestions?Vi(e.questions,Wi(e.questions)):e.questions),ji=e=>{var t,n;return!(null===(t=e.conditions)||void 0===t||null===(n=t.events)||void 0===n||!n.repeatedActivation||!(e=>{var t,n,r,o,i,a;return null!=(null===(t=e.conditions)||void 0===t||null===(n=t.events)||void 0===n||null===(r=n.values)||void 0===r?void 0:r.length)&&(null===(o=e.conditions)||void 0===o||null===(i=o.events)||void 0===i||null===(a=i.values)||void 0===a?void 0:a.length)>0})(e))},Gi=e=>{var t="".concat(Ri).concat(e.id);return e.current_iteration&&e.current_iteration>0&&(t="".concat(Ri).concat(e.id,"_").concat(e.current_iteration)),t},zi=(e,t)=>{var n="$survey_".concat(t,"/").concat(e.id);return e.current_iteration&&e.current_iteration>0&&(n="$survey_".concat(t,"/").concat(e.id,"/").concat(e.current_iteration)),n},Ui=function(e,t){var n={__c:t="__cC"+Eo++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,Vo(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,handleCloseSurveyPopup:()=>{},isPopup:!0,onPreviewSubmit:()=>{}}),Xi=e=>{var{component:t,children:n,renderAsHtml:r,style:o}=e;return oi(t,r?{dangerouslySetInnerHTML:{__html:n},style:o}:{children:n,style:o})},Ki=0;function Ji(e,t,n,r,o,i){var a,s,l={};for(s in t)"ref"==s?a=t[s]:l[s]=t[s];var c={type:e,props:l,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--Ki,__i:-1,__u:0,__source:o,__self:i};if("function"==typeof e&&(a=e.defaultProps))for(s in a)void 0===l[s]&&(l[s]=a[s]);return wo.vnode&&wo.vnode(c),c}var Qi=Ji("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Ji("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"})}),$i=Ji("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Ji("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"})}),ea=Ji("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Ji("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"})}),ta=Ji("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Ji("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"})}),na=Ji("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Ji("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"})}),ra=Ji("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Ji("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"})}),oa=Ji("svg",{width:"77",height:"14",viewBox:"0 0 77 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Ji("g",{"clip-path":"url(#clip0_2415_6911)",children:[Ji("mask",{id:"mask0_2415_6911",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"77",height:"14",children:Ji("path",{d:"M0.5 0H76.5V14H0.5V0Z",fill:"white"})}),Ji("g",{mask:"url(#mask0_2415_6911)",children:[Ji("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"}),Ji("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"}),Ji("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"}),Ji("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"}),Ji("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"}),Ji("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"})]})]}),Ji("defs",{children:Ji("clipPath",{id:"clip0_2415_6911",children:Ji("rect",{width:"76",height:"14",fill:"white",transform:"translate(0.5)"})})})]}),ia=Ji("svg",{width:"16",height:"12",viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Ji("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 aa(){return Ji("a",{href:"https://posthog.com",target:"_blank",rel:"noopener",className:"footer-branding",children:["Survey by ",oa]})}function sa(e){var{text:t,submitDisabled:n,appearance:r,onSubmit:o,link:i,onPreviewSubmit:a}=e,{isPreviewMode:s,isPopup:l}=Si(Ui),c=r.submitButtonTextColor||Pi(r.submitButtonColor||Bi.submitButtonColor);return Ji("div",{className:"bottom-section",children:[Ji("div",{className:"buttons",children:Ji("button",{className:"form-submit",disabled:n&&!s,type:"button",style:l?{color:c}:{},onClick:()=>{s?null==a||a():(i&&(null==Un||Un.open(i)),o())},children:t})}),!r.whiteLabel&&Ji(aa,{})]})}function la(e){var{question:t,description:n,descriptionContentType:r,backgroundColor:o,forceDisableHtml:i}=e,{isPopup:a}=Si(Ui);return Ji("div",{style:a?{backgroundColor:o||Bi.backgroundColor}:{},children:[Ji("div",{className:"survey-question",children:t}),n&&Xi({component:Po("div",{className:"survey-question-description"}),children:n,renderAsHtml:!i&&"text"!==r})]})}function ca(e){var{onClick:t}=e,{isPreviewMode:n}=Si(Ui);return Ji("div",{className:"cancel-btn-wrapper",onClick:t,disabled:n,children:Ji("button",{className:"form-cancel",onClick:t,disabled:n,children:ra})})}function ua(e){var{header:n,description:r,contentType:o,forceDisableHtml:i,appearance:a,onClose:s,styleOverrides:l}=e,c=Pi(a.backgroundColor||Bi.backgroundColor),{isPopup:u}=Si(Ui);return Ji(Ho,{children:Ji("div",{className:"thank-you-message",style:t({},l),children:Ji("div",{className:"thank-you-message-container",children:[u&&Ji(ca,{onClick:()=>s()}),Ji("h3",{className:"thank-you-message-header",style:{color:c},children:n}),r&&Xi({component:Po("div",{className:"thank-you-message-body"}),children:r,renderAsHtml:!i&&"text"!==o,style:{color:c}}),u&&Ji(sa,{text:a.thankYouMessageCloseButtonText||"Close",submitDisabled:!1,appearance:a,onSubmit:()=>s()})]})})})}function da(e){var t,n=_i(null),[r,o]=yi(null!==(t=e.defaultTextColor)&&void 0!==t?t:"black");return bi((()=>{if(n.current){var e=function(e){var t=Ai.getComputedStyle(e).backgroundColor;if("rgba(0, 0, 0, 0)"===t)return"black";var n=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(!n)return"black";var r=parseInt(n[1]),o=parseInt(n[2]),i=parseInt(n[3]);return Math.sqrt(r*r*.299+o*o*.587+i*i*.114)>127.5?"black":"white"}(n.current);o(e)}}),[e.appearance,e.forceUpdate]),{ref:n,textColor:r}}function pa(e){var{question:t,forceDisableHtml:n,appearance:r,onSubmit:o,onPreviewSubmit:i}=e,a=_i(null),[s,l]=yi("");return Ji("div",{ref:a,children:[Ji(la,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,backgroundColor:r.backgroundColor,forceDisableHtml:n}),Ji("textarea",{rows:4,placeholder:null==r?void 0:r.placeholder,onInput:e=>l(e.currentTarget.value)}),Ji(sa,{text:t.buttonText||"Submit",submitDisabled:!s&&!t.optional,appearance:r,onSubmit:()=>o(s),onPreviewSubmit:()=>i(s)})]})}function ha(e){var{question:t,forceDisableHtml:n,appearance:r,onSubmit:o,onPreviewSubmit:i}=e;return Ji(Ho,{children:[Ji(la,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,forceDisableHtml:n}),Ji(sa,{text:t.buttonText||"Submit",submitDisabled:!1,link:t.link,appearance:r,onSubmit:()=>o("link clicked"),onPreviewSubmit:()=>i("link clicked")})]})}function fa(e){var{question:t,forceDisableHtml:n,displayQuestionIndex:r,appearance:o,onSubmit:i,onPreviewSubmit:a}=e,s=t.scale,l=10===t.scale?0:1,[c,u]=yi(null);return Ji(Ho,{children:[Ji(la,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,forceDisableHtml:n,backgroundColor:o.backgroundColor}),Ji("div",{className:"rating-section",children:[Ji("div",{className:"rating-options",children:["emoji"===t.display&&Ji("div",{className:"rating-options-emoji",children:(3===t.scale?ga:ya).map(((e,t)=>{var n=t+1===c;return Ji("button",{className:"ratings-emoji question-".concat(r,"-rating-").concat(t," ").concat(n?"rating-active":null),value:t+1,type:"button",onClick:()=>{u(t+1)},style:{fill:n?o.ratingButtonActiveColor:o.ratingButtonColor,borderColor:o.borderColor},children:e},t)}))}),"number"===t.display&&Ji("div",{className:"rating-options-number",style:{gridTemplateColumns:"repeat(".concat(s-l+1,", minmax(0, 1fr))")},children:Sa(t.scale).map(((e,t)=>Ji(ma,{displayQuestionIndex:r,active:c===e,appearance:o,num:e,setActiveNumber:e=>{u(e)}},t)))})]}),Ji("div",{className:"rating-text",children:[Ji("div",{children:t.lowerBoundLabel}),Ji("div",{children:t.upperBoundLabel})]})]}),Ji(sa,{text:t.buttonText||(null==o?void 0:o.submitButtonText)||"Submit",submitDisabled:vr(c)&&!t.optional,appearance:o,onSubmit:()=>i(c),onPreviewSubmit:()=>a(c)})]})}function ma(e){var{num:t,active:n,displayQuestionIndex:r,appearance:o,setActiveNumber:i}=e,{textColor:a,ref:s}=da({appearance:o,defaultTextColor:"black",forceUpdate:n});return Ji("button",{ref:s,className:"ratings-number question-".concat(r,"-rating-").concat(t," ").concat(n?"rating-active":null),type:"button",onClick:()=>{i(t)},style:{color:a,backgroundColor:n?o.ratingButtonActiveColor:o.ratingButtonColor,borderColor:o.borderColor},children:t})}function va(e){var{question:t,forceDisableHtml:n,displayQuestionIndex:r,appearance:o,onSubmit:i,onPreviewSubmit:a}=e,s=_i(null),l=Ci((()=>(e=>{if(!e.shuffleOptions)return e.choices;var t=e.choices,n="";e.hasOpenChoice&&(n=t.pop());var r=Vi(t,Wi(t));return e.hasOpenChoice&&(e.choices.push(n),r.push(n)),r})(t)),[t]),[c,u]=yi(t.type===_o.MultipleChoice?[]:null),[d,p]=yi(!1),[h,f]=yi(""),m=t.type===_o.SingleChoice?"radio":"checkbox";return Ji("div",{ref:s,children:[Ji(la,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,forceDisableHtml:n,backgroundColor:o.backgroundColor}),Ji("div",{className:"multiple-choice-options",children:l.map(((e,n)=>{var o="choice-option",i=e,a=e;return t.hasOpenChoice&&n===t.choices.length-1&&(o+=" choice-option-open"),Ji("div",{className:o,children:[Ji("input",{type:m,id:"surveyQuestion".concat(r,"Choice").concat(n),name:"question".concat(r),value:i,disabled:!i,onInput:()=>t.hasOpenChoice&&n===t.choices.length-1?p(!d):t.type===_o.SingleChoice?u(i):t.type===_o.MultipleChoice&&lr(c)?c.includes(i)?u(c.filter((e=>e!==i))):u([...c,i]):void 0}),Ji("label",{htmlFor:"surveyQuestion".concat(r,"Choice").concat(n),style:{color:"black"},children:t.hasOpenChoice&&n===t.choices.length-1?Ji(Ho,{children:[Ji("span",{children:[a,":"]}),Ji("input",{type:"text",id:"surveyQuestion".concat(r,"Choice").concat(n,"Open"),name:"question".concat(r),onInput:e=>{var n=e.currentTarget.value;return t.type===_o.SingleChoice?u(n):t.type===_o.MultipleChoice&&lr(c)?f(n):void 0}})]}):a}),Ji("span",{className:"choice-check",style:{color:"black"},children:ia})]})}))}),Ji(sa,{text:t.buttonText||"Submit",submitDisabled:(vr(c)||lr(c)&&!d&&0===c.length||lr(c)&&d&&!h&&0===c.length&&!t.optional)&&!t.optional,appearance:o,onSubmit:()=>{d&&t.type===_o.MultipleChoice?lr(c)&&i([...c,h]):i(c)},onPreviewSubmit:()=>{d&&t.type===_o.MultipleChoice?lr(c)&&a([...c,h]):a(c)}})]})}var ga=[ea,$i,Qi],ya=[ta,ea,$i,Qi,na],ba=[1,2,3,4,5],_a=[1,2,3,4,5,6,7],Ca=[0,1,2,3,4,5,6,7,8,9,10];function Sa(e){switch(e){case 5:default:return ba;case 7:return _a;case 10:return Ca}}var Ia=wr("[Surveys]"),wa=Un,ka=Qn;class Ta{constructor(e){var t=this;o(this,"canShowNextEventBasedSurvey",(()=>{var e,t=ka.querySelectorAll("div[class^=PostHogSurvey]");return!(t.length>0)||1===(null===(e=t[t.length-1].shadowRoot)||void 0===e?void 0:e.childElementCount)})),o(this,"handlePopoverSurvey",(e=>{var t,n=null===(t=e.conditions)||void 0===t?void 0:t.seenSurveyWaitPeriodInDays,r=localStorage.getItem("lastSeenSurveyDate");if(n&&r){var o=new Date,i=Math.abs(o.getTime()-new Date(r).getTime());if(Math.ceil(i/864e5)<n)return}var a=(e=>!!localStorage.getItem(Gi(e))&&!ji(e))(e);if(!a){this.addSurveyToFocus(e.id);var s=((e,t,n)=>{var r=Oi.createElement("div");r.className="PostHogSurvey".concat(t);var o=r.attachShadow({mode:"open"});if(e){var i=Object.assign(Oi.createElement("style"),{innerText:e});o.appendChild(i)}return Oi.body.appendChild(r),o})(Di(null==e?void 0:e.appearance),e.id);ri(Ji(Ma,{posthog:this.posthog,survey:e,removeSurveyFromFocus:this.removeSurveyFromFocus,isPopup:!0},"popover-survey"),s)}})),o(this,"handleWidget",(e=>{var t=function(e){var t,n=Ei.createElement("div");n.className="PostHogWidget".concat(e.id);var r,o=n.attachShadow({mode:"open"}),i=(r=null===(t=e.appearance)||void 0===t?void 0:t.widgetColor,"\n .ph-survey-widget-tab {\n position: fixed;\n top: 50%;\n right: 0;\n background: ".concat(r||"#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: 9999999;\n }\n .ph-survey-widget-tab:hover {\n padding-bottom: 13px;\n }\n .ph-survey-widget-button {\n position: fixed;\n }\n "));return o.append(Object.assign(Ei.createElement("style"),{innerText:i})),Ei.body.appendChild(n),o}(e),n=Di(e.appearance);t.appendChild(Object.assign(ka.createElement("style"),{innerText:n})),ri(Ji(Ea,{posthog:this.posthog,survey:e,removeSurveyFromFocus:this.removeSurveyFromFocus},"feedback-survey"),t)})),o(this,"handleWidgetSelector",(e=>{var t,n=(null===(t=e.appearance)||void 0===t?void 0:t.widgetSelector)&&ka.querySelector(e.appearance.widgetSelector);if(n)if(0===ka.querySelectorAll(".PostHogWidget".concat(e.id)).length)this.handleWidget(e);else if(1===ka.querySelectorAll(".PostHogWidget".concat(e.id)).length&&!n.getAttribute("PHWidgetSurveyClickListener")){var r,o,i=null===(r=ka.querySelector(".PostHogWidget".concat(e.id)))||void 0===r||null===(o=r.shadowRoot)||void 0===o?void 0:o.querySelector(".survey-form");n.addEventListener("click",(()=>{i&&(i.style.display="none"===i.style.display?"block":"none",i.addEventListener("PHSurveyClosed",(()=>{this.removeSurveyFromFocus(e.id),i.style.display="none"})))})),n.setAttribute("PHWidgetSurveyClickListener","true")}})),o(this,"canRenderSurvey",(e=>{var t={visible:!1};return e.end_date?(t.disabledReason="survey was completed on ".concat(e.end_date),t):e.type!=bo.Popover?(t.disabledReason="Only Popover survey types can be rendered",t):!e.linked_flag_key||this.posthog.featureFlags.isFeatureEnabled(e.linked_flag_key)?!e.targeting_flag_key||this.posthog.featureFlags.isFeatureEnabled(e.targeting_flag_key)?!e.internal_targeting_flag_key||this.posthog.featureFlags.isFeatureEnabled(e.internal_targeting_flag_key)?(t.visible=!0,t):(t.disabledReason="internal targeting feature flag ".concat(e.internal_targeting_flag_key," is false"),t):(t.disabledReason="targeting feature flag ".concat(e.targeting_flag_key," is false"),t):(t.disabledReason="linked feature flag ".concat(e.linked_flag_key," is false"),t)})),o(this,"renderSurvey",((e,t)=>{ri(Ji(Ma,{posthog:this.posthog,survey:e,removeSurveyFromFocus:this.removeSurveyFromFocus,isPopup:!1},"popover-survey"),t)})),o(this,"callSurveysAndEvaluateDisplayLogic",(function(){var e,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];null===(e=t.posthog)||void 0===e||e.getActiveMatchingSurveys((e=>{var n=e.filter((e=>"api"!==e.type));t.sortSurveysByAppearanceDelay(n).forEach((e=>{if(vr(t.surveyInFocus)){var n,r,o;if(e.type===bo.Widget)"tab"===(null===(n=e.appearance)||void 0===n?void 0:n.widgetType)&&0===ka.querySelectorAll(".PostHogWidget".concat(e.id)).length&&t.handleWidget(e),"selector"===(null===(r=e.appearance)||void 0===r?void 0:r.widgetType)&&null!==(o=e.appearance)&&void 0!==o&&o.widgetSelector&&t.handleWidgetSelector(e);e.type===bo.Popover&&t.canShowNextEventBasedSurvey()&&t.handlePopoverSurvey(e)}}))}),n)})),o(this,"addSurveyToFocus",(e=>{vr(this.surveyInFocus)||Ia.error("Survey ".concat([...this.surveyInFocus]," already in focus. Cannot add survey ").concat(e,".")),this.surveyInFocus=e})),o(this,"removeSurveyFromFocus",(e=>{this.surveyInFocus!==e&&Ia.error("Survey ".concat(e," is not in focus. Cannot remove survey ").concat(e,".")),this.surveyInFocus=null})),this.posthog=e,this.surveyInFocus=null}sortSurveysByAppearanceDelay(e){return e.sort(((e,t)=>{var n,r;return((null===(n=e.appearance)||void 0===n?void 0:n.surveyPopupDelaySeconds)||0)-((null===(r=t.appearance)||void 0===r?void 0:r.surveyPopupDelaySeconds)||0)}))}getTestAPI(){return{addSurveyToFocus:this.addSurveyToFocus,removeSurveyFromFocus:this.removeSurveyFromFocus,surveyInFocus:this.surveyInFocus,canShowNextEventBasedSurvey:this.canShowNextEventBasedSurvey,handleWidget:this.handleWidget,handlePopoverSurvey:this.handlePopoverSurvey,handleWidgetSelector:this.handleWidgetSelector,sortSurveysByAppearanceDelay:this.sortSurveysByAppearanceDelay}}}function xa(e){if(ka&&wa){var t=new Ta(e);return t.callSurveysAndEvaluateDisplayLogic(!0),setInterval((()=>{t.callSurveysAndEvaluateDisplayLogic(!1)}),1e3),t}}function Ma(e){var n,r,o,i,a,s,{survey:l,forceDisableHtml:c,posthog:u,style:d,previewPageIndex:p,removeSurveyFromFocus:h,isPopup:f,onPreviewSubmit:m=(()=>{})}=e,v=Number.isInteger(p),g=null!==(n=l.appearance)&&void 0!==n&&n.surveyPopupDelaySeconds?1e3*l.appearance.surveyPopupDelaySeconds:0,{isPopupVisible:y,isSurveySent:b,setIsPopupVisible:_}=function(e,t,n,r,o){var[i,a]=yi(r||0===n),[s,l]=yi(!1);return bi((()=>{if(t){if(!r){var i,s=()=>{o(e.id),a(!1)},c=()=>{var t,n;null!==(t=e.appearance)&&void 0!==t&&t.displayThankYouMessage?(l(!0),o(e.id),null!==(n=e.appearance)&&void 0!==n&&n.autoDisappear&&setTimeout((()=>{a(!1)}),5e3)):(o(e.id),a(!1))},u=()=>{var n;a(!0),wa.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===(n=t.get_session_replay_url)||void 0===n?void 0:n.call(t)}),localStorage.setItem("lastSeenSurveyDate",(new Date).toISOString())};return wa.addEventListener("PHSurveyClosed",s),wa.addEventListener("PHSurveySent",c),n>0?(i=setTimeout((()=>{u()}),n),()=>{clearTimeout(i),wa.removeEventListener("PHSurveyClosed",s),wa.removeEventListener("PHSurveySent",c)}):(u(),()=>{wa.removeEventListener("PHSurveyClosed",s),wa.removeEventListener("PHSurveySent",c)})}}else Ia.error("usePopupVisibility hook called without a PostHog instance.")}),[]),{isPopupVisible:i,isSurveySent:s,setIsPopupVisible:a}}(l,u,g,v,h),C=b||p===l.questions.length,S=null!==(r=d)&&void 0!==r&&r.left&&yr(null===(o=d)||void 0===o?void 0:o.left)?{left:d.left-40}:{};return v&&((d=d||{}).left="unset",d.right="unset",d.transform="unset"),y?Ji(Ui.Provider,{value:{isPreviewMode:v,previewPageIndex:p,handleCloseSurveyPopup:()=>qi(l,u,v),isPopup:f||!1,onPreviewSubmit:m},children:C?Ji(ua,{header:(null===(i=l.appearance)||void 0===i?void 0:i.thankYouMessageHeader)||"Thank you!",description:(null===(a=l.appearance)||void 0===a?void 0:a.thankYouMessageDescription)||"",forceDisableHtml:!!c,contentType:null===(s=l.appearance)||void 0===s?void 0:s.thankYouMessageDescriptionContentType,appearance:l.appearance||Bi,styleOverrides:t(t({},d),S),onClose:()=>_(!1)}):Ji(Na,{survey:l,forceDisableHtml:!!c,posthog:u,styleOverrides:d})}):Ji(Ho,{})}function Na(e){var n,r,{survey:o,forceDisableHtml:i,posthog:a,styleOverrides:s}=e,l=Pi((null===(n=o.appearance)||void 0===n?void 0:n.backgroundColor)||Bi.backgroundColor),[c,u]=yi({}),{isPreviewMode:d,previewPageIndex:p,handleCloseSurveyPopup:h,isPopup:f,onPreviewSubmit:m}=Si(Ui),[v,g]=yi(p||0),y=Ci((()=>Yi(o)),[o]);bi((()=>{g(null!=p?p:0)}),[p]);return Ji("form",{className:"survey-form",style:f?t({color:l,borderColor:null===(r=o.appearance)||void 0===r?void 0:r.borderColor},s):{},children:y.map(((e,n)=>{var r,{originalQuestionIndex:s}=e;return(d?v===s:v===n)&&Ji("div",{className:"survey-box",style:f?{backgroundColor:(null===(r=o.appearance)||void 0===r?void 0:r.backgroundColor)||Bi.backgroundColor}:{},children:[f&&Ji(ca,{onClick:()=>h()}),Aa({question:e,forceDisableHtml:i,displayQuestionIndex:n,appearance:o.appearance||Bi,onSubmit:e=>(e=>{var{res:n,originalQuestionIndex:r,displayQuestionIndex:i}=e;if(a){var s=0===r?"$survey_response":"$survey_response_".concat(r);if(u(t(t({},c),{},{[s]:n})),a.getNextSurveyStep){var l=a.getNextSurveyStep(o,i,n);l===Co.End?Zi(t(t({},c),{},{[s]:n}),o,a):g(l)}else i===o.questions.length-1?Zi(t(t({},c),{},{[s]:n}),o,a):g(i+1)}else Ia.error("onNextButtonClick called without a PostHog instance.")})({res:e,originalQuestionIndex:s,displayQuestionIndex:n}),onPreviewSubmit:m})]})}))})}function Ea(e){var t,n,{survey:r,forceDisableHtml:o,posthog:i,readOnly:a,removeSurveyFromFocus:s}=e,[l,c]=yi(!1),[u,d]=yi({}),p=_i(null);return bi((()=>{var e,t;if(i){if(!a){if("tab"===(null===(e=r.appearance)||void 0===e?void 0:e.widgetType)&&p.current){var n,o=p.current.getBoundingClientRect(),s={top:"50%",left:parseInt("".concat(o.right-360)),bottom:"auto",borderRadius:10,borderBottom:"1.5px solid ".concat((null===(n=r.appearance)||void 0===n?void 0:n.borderColor)||"#c9c6c6")};d(s)}if("selector"===(null===(t=r.appearance)||void 0===t?void 0:t.widgetType)){var u=ka.querySelector(r.appearance.widgetSelector||"");null==u||u.addEventListener("click",(()=>{c(!l)})),null==u||u.setAttribute("PHWidgetSurveyClickListener","true")}}}else Ia.error("FeedbackWidget called without a PostHog instance.")}),[]),Ji(Ho,{children:["tab"===(null===(t=r.appearance)||void 0===t?void 0:t.widgetType)&&Ji("div",{className:"ph-survey-widget-tab",ref:p,onClick:()=>!a&&c(!l),style:{color:Pi(r.appearance.widgetColor)},children:[Ji("div",{className:"ph-survey-widget-tab-icon"}),(null===(n=r.appearance)||void 0===n?void 0:n.widgetLabel)||""]}),l&&Ji(Ma,{posthog:i,survey:r,forceDisableHtml:o,style:u,removeSurveyFromFocus:s,isPopup:!0},"feedback-widget-survey")]})}var Aa=e=>{var{question:n,forceDisableHtml:r,displayQuestionIndex:o,appearance:i,onSubmit:a,onPreviewSubmit:s}=e,l={[_o.Open]:pa,[_o.Link]:ha,[_o.Rating]:fa,[_o.SingleChoice]:va,[_o.MultipleChoice]:va},c={question:n,forceDisableHtml:r,appearance:i,onPreviewSubmit:e=>{s(e)},onSubmit:e=>{a(e)}},u={[_o.Open]:{},[_o.Link]:{},[_o.Rating]:{displayQuestionIndex:o},[_o.SingleChoice]:{displayQuestionIndex:o},[_o.MultipleChoice]:{displayQuestionIndex:o}},d=l[n.type],p=t(t({},c),u[n.type]);return Ji(d,t({},p))};function Oa(e){return!hr(Event)&&Ra(e,Event)}function Ra(e,t){try{return e instanceof t}catch(e){return!1}}function La(e){return vr(e)||!pr(e)&&!cr(e)}function Da(e,t){return Object.prototype.toString.call(e)==="[object ".concat(t,"]")}function Fa(e){return Da(e,"DOMError")}er.__PosthogExtensions__=er.__PosthogExtensions__||{},er.__PosthogExtensions__.canActivateRepeatedly=ji,er.__PosthogExtensions__.generateSurveys=xa,er.extendPostHogWithSurveys=xa;var Pa=/\(error: (.*)\)/,Ba=50,Ha="?";function Za(e,t,n,r){var o={platform:"web:javascript",filename:e,function:"<anonymous>"===t?Ha:t,in_app:!0};return hr(n)||(o.lineno=n),hr(r)||(o.colno=r),o}var qa=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Wa=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Va=/\((\S*)(?::(\d+))(?::(\d+))\)/,Ya=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ja=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Ga=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=n.sort(((e,t)=>e[0]-t[0])).map((e=>e[1]));return function(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=[],i=e.split("\n"),a=n;a<i.length;a++){var s=i[a];if(!(s.length>1024)){var l=Pa.test(s)?s.replace(Pa,"$1"):s;if(!l.match(/\S*Error: /)){for(var c of o){var u=c(l);if(u){r.push(u);break}}if(r.length>=Ba)break}}}return function(e){if(!e.length)return[];var n=Array.from(e);return n.reverse(),n.slice(0,Ba).map((e=>t(t({},e),{},{filename:e.filename||za(n).filename,function:e.function||Ha})))}(r)}}(...[[30,e=>{var t=qa.exec(e);if(t){var[,n,r,o]=t;return Za(n,Ha,+r,+o)}var i=Wa.exec(e);if(i){if(i[2]&&0===i[2].indexOf("eval")){var a=Va.exec(i[2]);a&&(i[2]=a[1],i[3]=a[2],i[4]=a[3])}var[s,l]=Ua(i[1]||Ha,i[2]);return Za(l,s,i[3]?+i[3]:void 0,i[4]?+i[4]:void 0)}}],[50,e=>{var t=Ya.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){var n=ja.exec(t[3]);n&&(t[1]=t[1]||"eval",t[3]=n[1],t[4]=n[2],t[5]="")}var r=t[3],o=t[1]||Ha;return[o,r]=Ua(o,r),Za(r,o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]);function za(e){return e[e.length-1]||{}}var Ua=(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]:Ha,n?"safari-extension:".concat(t):"safari-web-extension:".concat(t)]:[e,t]},Xa=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;function Ka(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e.stacktrace||e.stack||"",r=function(e){if(e&&Ja.test(e.message))return 1;return 0}(e);try{var o=Ga(n,r);return o.slice(0,o.length-t)}catch(e){}return[]}var Ja=/Minified React error #\d+;/i;function Qa(e,t){var n,r,o=Ka(e),i=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{$exception_list:[{type:null!=t&&t.overrideExceptionType?t.overrideExceptionType:e.name,value:null!=t&&t.overrideExceptionMessage?t.overrideExceptionMessage:function(e){var t=e.message;if(t.error&&"string"==typeof t.error.message)return t.error.message;return t}(e),stacktrace:{frames:o,type:"raw"},mechanism:{handled:i,synthetic:a}}],$exception_level:"error"}}function $a(e,t){var n,r,o,i=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!==(o=null==t?void 0:t.defaultExceptionType)&&void 0!==o?o:"Error",value:null!=t&&t.overrideExceptionMessage?t.overrideExceptionMessage:e||(null==t?void 0:t.defaultExceptionMessage),mechanism:{handled:i,synthetic:a}};if(null!=t&&t.syntheticException){var l=Ka(t.syntheticException,1);l.length&&(s.stacktrace={frames:l,type:"raw"})}return{$exception_list:[s],$exception_level:"error"}}function es(e){return fr(e)&&!mr(e)&&tr.indexOf(e)>=0}function ts(e,t){var n,r,o=null===(n=null==t?void 0:t.handled)||void 0===n||n,i=null===(r=null==t?void 0:t.synthetic)||void 0===r||r,a=null!=t&&t.overrideExceptionType?t.overrideExceptionType:Oa(e)?e.constructor.name:"Error",s=null!=t&&t.overrideExceptionMessage?t.overrideExceptionMessage:"Non-Error ".concat("exception"," captured with keys: ",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:40,n=Object.keys(e);if(n.sort(),!n.length)return"[object has no keys]";for(var r=n.length;r>0;r--){var o=n.slice(0,r).join(", ");if(!(o.length>t))return r===n.length||o.length<=t?o:"".concat(o.slice(0,t),"...")}return""}(e)),l={type:a,value:s,mechanism:{handled:o,synthetic:i}};if(null!=t&&t.syntheticException){var c=Ka(null==t?void 0:t.syntheticException,1);c.length&&(l.stacktrace={frames:c,type:"raw"})}return{$exception_list:[l],$exception_level:es(e.level)?e.level:"error"}}function ns(e,n){var[r,o,i,a,s]=e,l={$exception_list:[]},c=s||r;if(Fa(c)||function(e){return Da(e,"DOMException")}(c)){var u=c;if(function(e){return"stack"in e}(c))l=Qa(c,n);else{var d=u.name||(Fa(u)?"DOMError":"DOMException"),p=u.message?"".concat(d,": ").concat(u.message):d,h=Fa(u)?"DOMError":"DOMException";l=$a(p,t(t({},n),{},{overrideExceptionType:h,defaultExceptionMessage:p}))}return"code"in u&&(l.$exception_DOMException_code="".concat(u.code)),l}if(function(e){return Da(e,"ErrorEvent")}(c)&&c.error)return Qa(c.error,n);if(function(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object DOMError]":return!0;default:return Ra(e,Error)}}(c))return Qa(c,n);if(function(e){return Da(e,"Object")}(c)||Oa(c))return ts(c,n);if(hr(s)&&fr(r)){var f="Error",m=r,v=r.match(Xa);return v&&(f=v[1],m=v[2]),$a(m,t(t({},n),{},{overrideExceptionType:f,defaultExceptionMessage:m}))}return $a(c,n)}function rs(e){var[t]=e,n=function(e){if(La(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 La(n)?$a("Non-Error promise rejection captured with value: ".concat(String(n)),{handled:!1,synthetic:!1,overrideExceptionType:"UnhandledRejection"}):ns([n],{handled:!1,overrideExceptionType:"UnhandledRejection",defaultExceptionMessage:String(n)})}var os=wr("[ExceptionAutocapture]"),is={wrapOnError:e=>{var t=Un;t||os.info("window not available, cannot wrap onerror");var n=t.onerror;return t.onerror=function(){for(var t,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];var a=ns(o);return e(a),null!==(t=null==n?void 0:n(...o))&&void 0!==t&&t},t.onerror.__POSTHOG_INSTRUMENTED__=!0,()=>{var e;null===(e=t.onerror)||void 0===e||delete e.__POSTHOG_INSTRUMENTED__,t.onerror=n}},wrapUnhandledRejection:e=>{var t=Un;t||os.info("window not available, cannot wrap onUnhandledRejection");var n=t.onunhandledrejection;return t.onunhandledrejection=function(){for(var r,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var s=rs(i);return e(s),null!==(r=null==n?void 0:n.apply(t,i))&&void 0!==r&&r},t.onunhandledrejection.__POSTHOG_INSTRUMENTED__=!0,()=>{var e;null===(e=t.onunhandledrejection)||void 0===e||delete e.__POSTHOG_INSTRUMENTED__,t.onunhandledrejection=n}}};er.__PosthogExtensions__=er.__PosthogExtensions__||{},er.__PosthogExtensions__.errorWrappingFunctions=is,er.__PosthogExtensions__.parseErrorAsProperties=ns,er.posthogErrorWrappingFunctions=is,er.parseErrorAsProperties=ns;var as=(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)}};er.__PosthogExtensions__=er.__PosthogExtensions__||{};var ss={_patchFetch:e=>Qr(Un,"fetch",(t=>function(){var n=r((function*(n,r){var o=new Request(n,r);return as(e,o),t(o)}));return function(e,t){return n.apply(this,arguments)}}())),_patchXHR:e=>Qr(Un.XMLHttpRequest.prototype,"open",(t=>function(n,r){var o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0,s=new Request(r);return as(e,s),t.call(this,n,s.url,o,i,a)}))};er.__PosthogExtensions__.tracingHeadersPatchFns=ss,er.postHogTracingHeadersPatchFns=ss;var ls,cs,us,ds=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},ps=function(e){if("loading"===document.readyState)return"loading";var t=ds();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"},hs=function(e){var t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},fs=function(e,t){var n="";try{for(;e&&9!==e.nodeType;){var r=e,o=r.id?"#"+r.id:hs(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+o.length>(t||100)-1)return n||o;if(n=n?o+">"+n:o,r.id)break;e=r.parentNode}}catch(e){}return n},ms=-1,vs=function(){return ms},gs=function(e){addEventListener("pageshow",(function(t){t.persisted&&(ms=t.timeStamp,e(t))}),!0)},ys=function(){var e=ds();return e&&e.activationStart||0},bs=function(e,t){var n=ds(),r="navigate";return vs()>=0?r="back-forward-cache":n&&(document.prerendering||ys()>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}},_s=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){}},Cs=function(e,t,n,r){var o,i;return function(a){t.value>=0&&(a||r)&&((i=t.value-(o||0))||void 0===o)&&(o=t.value,t.delta=i,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,n),e(t))}},Ss=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},Is=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},ws=function(e){var t=!1;return function(){t||(e(),t=!0)}},ks=-1,Ts=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},xs=function(e){"hidden"===document.visibilityState&&ks>-1&&(ks="visibilitychange"===e.type?e.timeStamp:0,Ns())},Ms=function(){addEventListener("visibilitychange",xs,!0),addEventListener("prerenderingchange",xs,!0)},Ns=function(){removeEventListener("visibilitychange",xs,!0),removeEventListener("prerenderingchange",xs,!0)},Es=function(){return ks<0&&(ks=Ts(),Ms(),gs((function(){setTimeout((function(){ks=Ts(),Ms()}),0)}))),{get firstHiddenTime(){return ks}}},As=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},Os=[1800,3e3],Rs=function(e,t){t=t||{},As((function(){var n,r=Es(),o=bs("FCP"),i=_s("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(i.disconnect(),e.startTime<r.firstHiddenTime&&(o.value=Math.max(e.startTime-ys(),0),o.entries.push(e),n(!0)))}))}));i&&(n=Cs(e,o,Os,t.reportAllChanges),gs((function(r){o=bs("FCP"),n=Cs(e,o,Os,t.reportAllChanges),Ss((function(){o.value=performance.now()-r.timeStamp,n(!0)}))})))}))},Ls=[.1,.25],Ds=0,Fs=1/0,Ps=0,Bs=function(e){e.forEach((function(e){e.interactionId&&(Fs=Math.min(Fs,e.interactionId),Ps=Math.max(Ps,e.interactionId),Ds=Ps?(Ps-Fs)/7+1:0)}))},Hs=function(){"interactionCount"in performance||ls||(ls=_s("event",Bs,{type:"event",buffered:!0,durationThreshold:0}))},Zs=[],qs=new Map,Ws=0,Vs=function(){return(ls?Ds:performance.interactionCount||0)-Ws},Ys=[],js=function(e){if(Ys.forEach((function(t){return t(e)})),e.interactionId||"first-input"===e.entryType){var t=Zs[Zs.length-1],n=qs.get(e.interactionId);if(n||Zs.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]};qs.set(r.id,r),Zs.push(r)}Zs.sort((function(e,t){return t.latency-e.latency})),Zs.length>10&&Zs.splice(10).forEach((function(e){return qs.delete(e.id)}))}}},Gs=function(e){var t=self.requestIdleCallback||self.setTimeout,n=-1;return e=ws(e),"hidden"===document.visibilityState?e():(n=t(e),Is(e)),n},zs=[200,500],Us=[],Xs=[],Ks=new WeakMap,Js=new Map,Qs=-1,$s=function(e){Us=Us.concat(e),el()},el=function(){Qs<0&&(Qs=Gs(tl))},tl=function(){Js.size>10&&Js.forEach((function(e,t){qs.has(t)||Js.delete(t)}));var e=Zs.map((function(e){return Ks.get(e.entries[0])})),t=Xs.length-50;Xs=Xs.filter((function(n,r){return r>=t||e.includes(n)}));for(var n=new Set,r=0;r<Xs.length;r++){var o=Xs[r];nl(o.startTime,o.processingEnd).forEach((function(e){n.add(e)}))}for(var i=0;i<50;i++){var a=Us[Us.length-1-i];if(!a||a.startTime<us)break;n.add(a)}Us=Array.from(n),Qs=-1};Ys.push((function(e){e.interactionId&&e.target&&!Js.has(e.interactionId)&&Js.set(e.interactionId,e.target)}),(function(e){var t,n=e.startTime+e.duration;us=Math.max(us,e.processingEnd);for(var r=Xs.length-1;r>=0;r--){var o=Xs[r];if(Math.abs(n-o.renderTime)<=8){(t=o).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]},Xs.push(t)),(e.interactionId||"first-input"===e.entryType)&&Ks.set(e,t),el()}));var nl=function(e,t){for(var n,r=[],o=0;n=Us[o];o++)if(!(n.startTime+n.duration<e)){if(n.startTime>t)break;r.push(n)}return r},rl=[2500,4e3],ol={},il={onLCP:function(e,t){!function(e,t){t=t||{},As((function(){var n,r=Es(),o=bs("LCP"),i=function(e){t.reportAllChanges||(e=e.slice(-1)),e.forEach((function(e){e.startTime<r.firstHiddenTime&&(o.value=Math.max(e.startTime-ys(),0),o.entries=[e],n())}))},a=_s("largest-contentful-paint",i);if(a){n=Cs(e,o,rl,t.reportAllChanges);var s=ws((function(){ol[o.id]||(i(a.takeRecords()),a.disconnect(),ol[o.id]=!0,n(!0))}));["keydown","click"].forEach((function(e){addEventListener(e,(function(){return Gs(s)}),!0)})),Is(s),gs((function(r){o=bs("LCP"),n=Cs(e,o,rl,t.reportAllChanges),Ss((function(){o.value=performance.now()-r.timeStamp,ol[o.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=ds();if(n){var r=n.activationStart||0,o=e.entries[e.entries.length-1],i=o.url&&performance.getEntriesByType("resource").filter((function(e){return e.name===o.url}))[0],a=Math.max(0,n.responseStart-r),s=Math.max(a,i?(i.requestStart||i.startTime)-r:0),l=Math.max(s,i?i.responseEnd-r:0),c=Math.max(l,o.startTime-r);t={element:fs(o.element),timeToFirstByte:a,resourceLoadDelay:s-a,resourceLoadDuration:l-s,elementRenderDelay:c-l,navigationEntry:n,lcpEntry:o},o.url&&(t.url=o.url),i&&(t.lcpResourceEntry=i)}}return Object.assign(e,{attribution:t})}(t);e(n)}),t)},onCLS:function(e,t){!function(e,t){t=t||{},Rs(ws((function(){var n,r=bs("CLS",0),o=0,i=[],a=function(e){e.forEach((function(e){if(!e.hadRecentInput){var t=i[0],n=i[i.length-1];o&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(o+=e.value,i.push(e)):(o=e.value,i=[e])}})),o>r.value&&(r.value=o,r.entries=i,n())},s=_s("layout-shift",a);s&&(n=Cs(e,r,Ls,t.reportAllChanges),Is((function(){a(s.takeRecords()),n(!0)})),gs((function(){o=0,r=bs("CLS",0),n=Cs(e,r,Ls,t.reportAllChanges),Ss((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 o=(t=r.sources).find((function(e){return e.node&&1===e.node.nodeType}))||t[0];o&&(n={largestShiftTarget:fs(o.node),largestShiftTime:r.startTime,largestShiftValue:r.value,largestShiftSource:o,largestShiftEntry:r,loadState:ps(r.startTime)})}}return Object.assign(e,{attribution:n})}(t);e(n)}),t)},onFCP:function(e,t){Rs((function(t){var n=function(e){var t={timeToFirstByte:0,firstByteToFCP:e.value,loadState:ps(vs())};if(e.entries.length){var n=ds(),r=e.entries[e.entries.length-1];if(n){var o=n.activationStart||0,i=Math.max(0,n.responseStart-o);t={timeToFirstByte:i,firstByteToFCP:e.value-i,loadState:ps(e.entries[0].startTime),navigationEntry:n,fcpEntry:r}}}return Object.assign(e,{attribution:t})}(t);e(n)}),t)},onINP:function(e,t){cs||(cs=_s("long-animation-frame",$s)),function(e,t){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(t=t||{},As((function(){var n;Hs();var r,o=bs("INP"),i=function(e){Gs((function(){e.forEach(js);var t,n=(t=Math.min(Zs.length-1,Math.floor(Vs()/50)),Zs[t]);n&&n.latency!==o.value&&(o.value=n.latency,o.entries=n.entries,r())}))},a=_s("event",i,{durationThreshold:null!==(n=t.durationThreshold)&&void 0!==n?n:40});r=Cs(e,o,zs,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),Is((function(){i(a.takeRecords()),r(!0)})),gs((function(){Ws=0,Zs.length=0,qs.clear(),o=bs("INP"),r=Cs(e,o,zs,t.reportAllChanges)})))})))}((function(t){var n=function(e){var t=e.entries[0],n=Ks.get(t),r=t.processingStart,o=n.processingEnd,i=n.entries.sort((function(e,t){return e.processingStart-t.processingStart})),a=nl(t.startTime,o),s=e.entries.find((function(e){return e.target})),l=s&&s.target||Js.get(t.interactionId),c=[t.startTime+t.duration,o].concat(a.map((function(e){return e.startTime+e.duration}))),u=Math.max.apply(Math,c),d={interactionTarget:fs(l),interactionTargetElement:l,interactionType:t.name.startsWith("key")?"keyboard":"pointer",interactionTime:t.startTime,nextPaintTime:u,processedEventEntries:i,longAnimationFrameEntries:a,inputDelay:r-t.startTime,processingDuration:o-r,presentationDelay:Math.max(u-o,0),loadState:ps(t.startTime)};return Object.assign(e,{attribution:d})}(t);e(n)}),t)}};function al(e,t){return t.length>e?t.slice(0,e)+"...":t}function sl(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do{t=t.previousSibling}while(t&&!Ar(t));return t}function ll(e,t,n,r){var o=e.tagName.toLowerCase(),i={tag_name:o};Fr.indexOf(o)>-1&&!n&&("a"===o.toLowerCase()||"button"===o.toLowerCase()?i.$el_text=al(1024,Gr(e)):i.$el_text=al(1024,Dr(e)));var a=Lr(e);a.length>0&&(i.classes=a.filter((function(e){return""!==e}))),xr(e.attributes,(function(n){var o;if((!Br(e)||-1!==["name","id","class","aria-label"].indexOf(n.name))&&((null==r||!r.includes(n.name))&&!t&&jr(n.value)&&(o=n.name,!fr(o)||"_ngcontent"!==o.substring(0,10)&&"_nghost"!==o.substring(0,7)))){var a=n.value;"class"===n.name&&(a=Rr(a).join(" ")),i["attr__"+n.name]=al(1024,a)}}));for(var s=1,l=1,c=e;c=sl(c);)s++,c.tagName===e.tagName&&l++;return i.nth_child=s,i.nth_of_type=l,i}function cl(e,t){for(var n,r,o,{e:i,maskAllElementAttributes:a,maskAllText:s,elementAttributeIgnoreList:l,elementsChainAsString:c}=t,u=[e],d=e;d.parentNode&&!Or(d,"body");)(o=d.parentNode)&&11===o.nodeType?(u.push(d.parentNode.host),d=d.parentNode.host):(u.push(d.parentNode),d=d.parentNode);var p,h,f,m=[],v={},g=!1,y=!1;if(xr(u,(e=>{var t=Pr(e);"a"===e.tagName.toLowerCase()&&(g=e.getAttribute("href"),g=t&&g&&jr(g)&&g),nr(Lr(e),"ph-no-capture")&&(y=!0),m.push(ll(e,a,s,l));var n=function(e){if(!Pr(e))return{};var t={};return xr(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&&jr(r)&&(t[n]=r)}})),t}(e);Mr(v,n)})),y)return{props:{},explicitNoCapture:y};if(s||("a"===e.tagName.toLowerCase()||"button"===e.tagName.toLowerCase()?m[0].$el_text=Gr(e):m[0].$el_text=Dr(e)),g){var b,_;m[0].attr__href=g;var C=null===(h=g,f=null==Qn?void 0:Qn.createElement("a"),b=hr(f)?null:(f.href=h,f))||void 0===b?void 0:b.host,S=null==Un||null===(_=Un.location)||void 0===_?void 0:_.host;C&&S&&C!==S&&(p=g)}return{props:Mr({$event_type:i.type,$ce_version:1},c?{}:{$elements:m},{$elements_chain:Ur(m)},null!==(n=m[0])&&void 0!==n&&n.$el_text?{$el_text:null===(r=m[0])||void 0===r?void 0:r.$el_text}:{},p&&"click"===i.type?{$external_click_url:p}:{},v)}}er.__PosthogExtensions__=er.__PosthogExtensions__||{},er.__PosthogExtensions__.postHogWebVitalsCallbacks=il,er.postHogWebVitalsCallbacks=il;var ul={};function dl(e){return function(e,t){var n=ul[e];if(n)return n;var r=t[e];if(ur(r)&&!dr())return ul[e]=r.bind(t);var o=t.document;if(o&&cr(o.createElement))try{var i=o.createElement("iframe");i.hidden=!0,o.head.appendChild(i);var a=i.contentWindow;a&&a[e]&&(r=a[e]),o.head.removeChild(i)}catch(t){Ir.warn("Could not create sandbox iframe for ".concat(e," check, bailing to assignableWindow.").concat(e,": "),t)}return r&&cr(r)?ul[e]=r.bind(t):r}("MutationObserver",e)}function pl(e){var t=function(e){return hr(e.target)?e.srcElement||null:null!==(t=e.target)&&void 0!==t&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t}(e);return t?{node:t,originalEvent:e,timestamp:Date.now()}:null}function hl(e,t){return yr(e)&&e>=t}class fl{asRequiredConfig(e){var t,n,r,o,i=this._defaultConfig((null==e?void 0:e.__onCapture)||this._captureDeadClick.bind(this));return{element_attribute_ignorelist:null!==(t=null==e?void 0:e.element_attribute_ignorelist)&&void 0!==t?t:i.element_attribute_ignorelist,scroll_threshold_ms:null!==(n=null==e?void 0:e.scroll_threshold_ms)&&void 0!==n?n:i.scroll_threshold_ms,selection_change_threshold_ms:null!==(r=null==e?void 0:e.selection_change_threshold_ms)&&void 0!==r?r:i.selection_change_threshold_ms,mutation_threshold_ms:null!==(o=null==e?void 0:e.mutation_threshold_ms)&&void 0!==o?o:i.mutation_threshold_ms,__onCapture:i.__onCapture}}constructor(e,t){o(this,"_clicks",[]),o(this,"_defaultConfig",(e=>({element_attribute_ignorelist:[],scroll_threshold_ms:100,selection_change_threshold_ms:100,mutation_threshold_ms:2500,__onCapture:e}))),o(this,"_onClick",(e=>{var t=pl(e);vr(t)||this._ignoreClick(t)||this._clicks.push(t),this._clicks.length&&hr(this._checkClickTimer)&&(this._checkClickTimer=er.setTimeout((()=>{this._checkClicks()}),1e3))})),o(this,"_onScroll",(()=>{var e=Date.now();e%50==0&&this._clicks.forEach((t=>{hr(t.scrollDelayMs)&&(t.scrollDelayMs=e-t.timestamp)}))})),o(this,"_onSelectionChange",(()=>{this._lastSelectionChanged=Date.now()})),this.instance=e,this._config=this.asRequiredConfig(t),this._onCapture=this._config.__onCapture}start(e){this._startClickObserver(),this._startScrollObserver(),this._startSelectionChangedObserver(),this._startMutationObserver(e)}_startMutationObserver(e){if(!this._mutationObserver){var t=dl(er);this._mutationObserver=new t((e=>{this.onMutation(e)})),this._mutationObserver.observe(e,{attributes:!0,characterData:!0,childList:!0,subtree:!0})}}stop(){var e;null===(e=this._mutationObserver)||void 0===e||e.disconnect(),this._mutationObserver=void 0,er.removeEventListener("click",this._onClick),er.removeEventListener("scroll",this._onScroll,{capture:!0}),er.removeEventListener("selectionchange",this._onSelectionChange)}onMutation(e){this._lastMutation=Date.now()}_startClickObserver(){er.addEventListener("click",this._onClick)}_startScrollObserver(){er.addEventListener("scroll",this._onScroll,{capture:!0,passive:!0})}_startSelectionChangedObserver(){er.addEventListener("selectionchange",this._onSelectionChange)}_ignoreClick(e){if(!e)return!0;if((t=e.node)instanceof Element&&("__POSTHOG_TOOLBAR__"===t.id||null!==(n=t.closest)&&void 0!==n&&n.call(t,".toolbar-global-fade-container")))return!0;var t,n,r=this._clicks.some((t=>t.node===e.node&&Math.abs(t.timestamp-e.timestamp)<1e3));return!!r||!(!Or(e.node,"html")&&Ar(e.node)&&!Fr.includes(e.node.tagName.toLowerCase()))}_checkClicks(){if(this._clicks.length){clearTimeout(this._checkClickTimer),this._checkClickTimer=void 0;var e=this._clicks;for(var t of(this._clicks=[],e)){var n;t.mutationDelayMs=null!==(n=t.mutationDelayMs)&&void 0!==n?n:this._lastMutation&&t.timestamp<=this._lastMutation?this._lastMutation-t.timestamp:void 0,t.absoluteDelayMs=Date.now()-t.timestamp,t.selectionChangedDelayMs=this._lastSelectionChanged&&t.timestamp<=this._lastSelectionChanged?this._lastSelectionChanged-t.timestamp:void 0;var r=hl(t.scrollDelayMs,this._config.scroll_threshold_ms),o=hl(t.selectionChangedDelayMs,this._config.selection_change_threshold_ms),i=hl(t.mutationDelayMs,this._config.mutation_threshold_ms),a=hl(t.absoluteDelayMs,1.1*this._config.mutation_threshold_ms),s=yr(t.scrollDelayMs)&&t.scrollDelayMs<this._config.scroll_threshold_ms,l=yr(t.mutationDelayMs)&&t.mutationDelayMs<this._config.mutation_threshold_ms,c=yr(t.selectionChangedDelayMs)&&t.selectionChangedDelayMs<this._config.selection_change_threshold_ms;s||l||c||(r||i||a||o?this._onCapture(t,{$dead_click_last_mutation_timestamp:this._lastMutation,$dead_click_event_timestamp:t.timestamp,$dead_click_scroll_timeout:r,$dead_click_mutation_timeout:i,$dead_click_absolute_timeout:a,$dead_click_selection_changed_timeout:o}):t.absoluteDelayMs<this._config.mutation_threshold_ms&&this._clicks.push(t))}this._clicks.length&&hr(this._checkClickTimer)&&(this._checkClickTimer=er.setTimeout((()=>{this._checkClicks()}),1e3))}}_captureDeadClick(e,n){this.instance.capture("$dead_click",t(t(t({},n),cl(e.node,{e:e.originalEvent,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this._config.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)})}}er.__PosthogExtensions__=er.__PosthogExtensions__||{},er.__PosthogExtensions__.initDeadClicksAutocapture=(e,t)=>new fl(e,t)}();
2
2
  //# sourceMappingURL=all-external-dependencies.js.map