posthog-js 1.217.2 → 1.217.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/all-external-dependencies.js +1 -1
- package/dist/all-external-dependencies.js.map +1 -1
- package/dist/array.full.es5.js +1 -1
- package/dist/array.full.es5.js.map +1 -1
- package/dist/array.full.js +1 -1
- package/dist/array.full.js.map +1 -1
- package/dist/array.full.no-external.js +1 -1
- package/dist/array.full.no-external.js.map +1 -1
- package/dist/array.js +1 -1
- package/dist/array.no-external.js +1 -1
- package/dist/customizations.full.js +1 -1
- package/dist/main.js +1 -1
- package/dist/module.full.js +1 -1
- package/dist/module.full.js.map +1 -1
- package/dist/module.full.no-external.js +1 -1
- package/dist/module.full.no-external.js.map +1 -1
- package/dist/module.js +1 -1
- package/dist/module.no-external.js +1 -1
- package/dist/surveys-preview.js.map +1 -1
- package/dist/surveys.js +1 -1
- package/dist/surveys.js.map +1 -1
- package/lib/package.json +1 -1
- package/lib/src/extensions/surveys.jsx +1 -5
- package/lib/src/extensions/surveys.jsx.map +1 -1
- package/package.json +1 -1
|
@@ -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=Array.from(t,(t=>T(t,e.href))).join("");return(r=n).includes(" background-clip: text;")&&!r.includes(" -webkit-background-clip: text;")&&(r=r.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),r}catch(e){return null}var r}function 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 E(e){var{element:t,maskInputOptions:n,tagName:r,type:o,value:i,maskInputFn:a}=e,s=i||"",l=o&&N(o);return(n[r.toLowerCase()]||l&&n[l])&&(s=a?a(s,t):"*".repeat(s.length)),s}function N(e){return e.toLowerCase()}var A="__rrweb_original__";function R(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?N(t):null}function O(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,Z,q=1,W=new RegExp("[^a-z0-9-_:]"),V=-2;function Y(){return q++}var j=/^[^ \t\n\r\u000c]+/,G=/^[, \t\n\r\u000c]+/;var U=new WeakMap;function z(e,t){return t&&""!==t.trim()?K(e,t):t}function X(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function K(e,t){var n=U.get(e);if(n||(n=e.createElement("a"),U.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function J(e,t,n,r){return r?"src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?z(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(G),!(n>=t.length);){var i=r(j);if(","===i.slice(-1))i=z(e,i.substring(0,i.length-1)),o.push(i);else{var a="";i=z(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,K(e)):"object"===t&&"data"===n?z(e,r):r:z(e,r):r}function Q(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function $(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&$(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&&$(C.parentNode(e),t,n)}function ee(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($(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 te(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}=t,g=function(e,t){if(!t.hasNode(e))return;var n=t.getId(e);return 1===n?void 0:n}(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type: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:g};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=N(e.tagName);return W.test(t)?"div":t}(e),y={},b=e.attributes.length,_=0;_<b;_++){var S=e.attributes[_];Q(g,S.name,S.value)||(y[S.name]=J(r,g,N(S.name),S.value))}if("link"===g&&a){var I=function(e){return null==e?void 0:e.href}(e);if(I){var w=x(r,I);if(!w&&I.includes(".css"))w=x(r,window.location.origin+"/"+I.replace(window.location.href,""));var T=null;w&&(T=k(w)),T&&(delete y.rel,delete y.href,y._cssText=T)}}if("style"===g&&e.sheet&&!(e.innerText||C.textContent(e)||"").trim().length){var M=k(e.sheet);M&&(y._cssText=M)}if("input"===g||"textarea"===g||"select"===g){var O=e.value,L=e.checked;"radio"!==y.type&&"checkbox"!==y.type&&"submit"!==y.type&&"button"!==y.type&&O?y.value=E({element:e,type:R(e),tagName:g,value:O,maskInputOptions:s,maskInputFn:l}):L&&(y.checked=L)}"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 D=e.toDataURL(c.type,c.quality),F=r.createElement("canvas");F.width=e.width,F.height=e.height,D!==F.toDataURL(c.type,c.quality)&&(y.rr_dataURL=D)}if("img"===g&&u){H||(H=r.createElement("canvas"),Z=H.getContext("2d"));var P=e,B=P.currentSrc||P.getAttribute("src")||"<unknown-src>",q=P.crossOrigin,V=()=>{P.removeEventListener("load",V);try{H.width=P.naturalWidth,H.height=P.naturalHeight,Z.drawImage(P,0,0),y.rr_dataURL=H.toDataURL(c.type,c.quality)}catch(e){if("anonymous"!==P.crossOrigin)return P.crossOrigin="anonymous",void(P.complete&&0!==P.naturalWidth?V():P.addEventListener("load",V));console.warn("Cannot inline img src=".concat(B,"! Error: ").concat(e))}"anonymous"===P.crossOrigin&&(q?y.crossOrigin=q:P.removeAttribute("crossorigin"))};P.complete&&0!==P.naturalWidth?V():P.addEventListener("load",V)}if("audio"===g||"video"===g){var Y=y;Y.rr_mediaState=e.paused?"paused":"played",Y.rr_mediaCurrentTime=e.currentTime,Y.rr_mediaPlaybackRate=e.playbackRate,Y.rr_mediaMuted=e.muted,Y.rr_mediaLoop=e.loop,Y.rr_mediaVolume=e.volume}f||(e.scrollLeft&&(y.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(y.rr_scrollTop=e.scrollTop));if(v){var{width:j,height:G}=e.getBoundingClientRect();y={class:y.class,rr_width:"".concat(j,"px"),rr_height:"".concat(G,"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:X(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:g});case e.TEXT_NODE:return function(e,t){var n,{needsMask:r,maskTextFn:o,rootId:i}=t,a=C.parentNode(e),s=a&&a.tagName,l=C.textContent(e),c="STYLE"===s||void 0,u="SCRIPT"===s||void 0;if(c&&l){try{e.nextSibling||e.previousSibling||(null==(n=a.sheet)?void 0:n.cssRules)&&(l=k(a.sheet))}catch(t){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(t),e)}l=B(l,K(t.doc))}u&&(l="SCRIPT_PLACEHOLDER");!c&&!u&&l&&r&&(l=o?o(l,C.parentElement(e)):l.replace(/[\S]/g,"*"));return{type:p.Text,textContent:l||"",isStyle:c,rootId:i}}(e,{doc:n,needsMask:a,maskTextFn:c,rootId:g});case e.CDATA_SECTION_NODE:return{type:p.CDATA,textContent:"",rootId:g};case e.COMMENT_NODE:return{type:p.Comment,textContent:C.textContent(e)||"",rootId:g};default:return!1}}function ne(e){return null==e?"":e.toLowerCase()}function re(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}=t,{needsMask:E}=t,{preserveWhiteSpace:N=!0}=t;E||(E=ee(e,a,s,void 0===E));var A,R=te(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});if(!R)return console.warn(e,"not serialized"),null;A=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"===O(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(ne(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===ne(e.attributes.name)||"icon"===ne(e.attributes.rel)||"apple-touch-icon"===ne(e.attributes.rel)||"shortcut icon"===ne(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&ne(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(ne(e.attributes.property).match(/^(og|twitter|fb):/)||ne(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===ne(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===ne(e.attributes.name)||"googlebot"===ne(e.attributes.name)||"bingbot"===ne(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===ne(e.attributes.name)||"generator"===ne(e.attributes.name)||"framework"===ne(e.attributes.name)||"publisher"===ne(e.attributes.name)||"progid"===ne(e.attributes.name)||ne(e.attributes.property).match(/^article:/)||ne(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===ne(e.attributes.name)||"yandex-verification"===ne(e.attributes.name)||"csrf-token"===ne(e.attributes.name)||"p:domain_verify"===ne(e.attributes.name)||"verify-v1"===ne(e.attributes.name)||"verification"===ne(e.attributes.name)||"shopify-checkout-api-token"===ne(e.attributes.name)))return!0}}return!1}(R,f)&&(N||R.type!==p.Text||R.isStyle||R.textContent.replace(/^\s+|\s+$/gm,"").length)?Y():V;var L=Object.assign(R,{id:A});if(r.add(e,L),A===V)return null;y&&y(e);var D=!l;if(L.type===p.Element){D=D&&!L.needBlock,delete L.needBlock;var F=C.shadowRoot(e);F&&w(F)&&(L.isShadowHost=!0)}if((L.type===p.Document||L.type===p.Element)&&D){f.headWhitespace&&L.type===p.Element&&"head"===L.tagName&&(N=!1);var P={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:N,onSerialize:y,onIframeLoad:b,iframeLoadTimeout:_,onStylesheetLoad:k,stylesheetLoadTimeout:T,keepIframeSrcFn:x};if(L.type===p.Element&&"textarea"===L.tagName&&void 0!==L.attributes.value);else for(var B of Array.from(C.childNodes(e))){var H=re(B,P);H&&L.childNodes.push(H)}var Z=null;if(S(e)&&(Z=C.shadowRoot(e)))for(var q of Array.from(C.childNodes(Z))){var W=re(q,P);W&&(w(Z)&&(W.isShadow=!0),L.childNodes.push(W))}}var j=C.parentNode(e);return j&&I(j)&&w(j)&&(L.isShadow=!0),L.type===p.Element&&"iframe"===L.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=re(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:N,onSerialize:y,onIframeLoad:b,iframeLoadTimeout:_,onStylesheetLoad:k,stylesheetLoadTimeout:T,keepIframeSrcFn:x});n&&b(e,n)}}),_),L.type===p.Element&&"link"===L.tagName&&"string"==typeof L.attributes.rel&&("stylesheet"===L.attributes.rel||"preload"===L.attributes.rel&&"string"==typeof L.attributes.href&&"css"===O(L.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=re(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:N,onSerialize:y,onIframeLoad:b,iframeLoadTimeout:_,onStylesheetLoad:k,stylesheetLoadTimeout:T,keepIframeSrcFn:x});t&&k(e,t)}}),T),L}let oe=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 ie={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ae={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]};var se={};function le(e){if(se[e])return se[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 ie?ie[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 ae?ae[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 se[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?se[e]=c:n}catch(e){return n}}var ce={};function ue(e,t,n){var r,o="".concat(e,".").concat(String(n));if(ce[o])return ce[o].call(t);var i=le(e),a=null==(r=Object.getOwnPropertyDescriptor(i,n))?void 0:r.get;return a?(ce[o]=a,a.call(t)):t[n]}var de={};function pe(e,t,n){var r="".concat(e,".").concat(String(n));if(de[r])return de[r].bind(t);var o=le(e)[n];return"function"!=typeof o?t[n]:(de[r]=o,o.bind(t))}function he(){return le("MutationObserver").constructor}var fe={childNodes:function(e){return ue("Node",e,"childNodes")},parentNode:function(e){return ue("Node",e,"parentNode")},parentElement:function(e){return ue("Node",e,"parentElement")},textContent:function(e){return ue("Node",e,"textContent")},contains:function(e,t){return pe("Node",e,"contains")(t)},getRootNode:function(e){return pe("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?ue("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?ue("Element",e,"shadowRoot"):null},querySelector:function(e,t){return ue("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return ue("Element",e,"querySelectorAll")(t)},mutationObserver:he};function me(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 ve="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",ge={map:{},getId:()=>(console.error(ve),-1),getNode:()=>(console.error(ve),null),removeNodeFromMap(){console.error(ve)},has:()=>(console.error(ve),!1),reset(){console.error(ve)}};function ye(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 be(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)}}),()=>be(e,t,i||{},!0)}function _e(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&&(ge=new Proxy(ge,{get:(e,t,n)=>("map"===t&&console.error(ve),Reflect.get(e,t,n))}));var Ce=Date.now;function Se(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=fe.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=fe.parentElement(i.body))?void 0:r.scrollTop)||(null==(o=null==i?void 0:i.body)?void 0:o.scrollTop)||0}}function Ie(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function we(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ke(e){return e?e.nodeType===e.ELEMENT_NODE?e:fe.parentElement(e):null}function Te(e,t,n,r){if(!e)return!1;var o=ke(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($(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 xe(e,t,n){return!("TITLE"!==e.tagName||!n.headTitleMutations)||t.getId(e)===V}function Me(e,t){if(I(e))return!1;var n=t.getId(e);if(!t.has(n))return!0;var r=fe.parentNode(e);return(!r||r.nodeType!==e.DOCUMENT_NODE)&&(!r||Me(r,t))}function Ee(e){return Boolean(e.changedTouches)}function Ne(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function Ae(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function Re(e){return!!e&&(e instanceof oe&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(fe.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(Ce=()=>(new Date).getTime());let Oe=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 Le(e){var t,n=null;return"getRootNode"in e&&(null==(t=fe.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&fe.host(fe.getRootNode(e))&&(n=fe.host(fe.getRootNode(e))),n}function De(e){var t=e.ownerDocument;if(!t)return!1;var n=function(e){for(var t,n=e;t=Le(n);)n=t;return n}(e);return fe.contains(t,n)}function Fe(e){var t=e.ownerDocument;return!!t&&(fe.contains(t,e)||De(e))}var Pe=(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))(Pe||{}),Be=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(Be||{}),He=(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))(He||{}),Ze=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Ze||{}),qe=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(qe||{}),We=(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))(We||{});function Ve(e){return"__ln"in e}class Ye{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&&Ve(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&&Ve(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 je,Ge=(e,t)=>"".concat(e,"@").concat(t);class Ue{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,"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 Ye,r=e=>{for(var t=e,n=V;n===V;)n=(t=t&&t.nextSibling)&&this.mirror.getId(t);return n},o=o=>{var i=fe.parentNode(o);if(i&&Fe(o)&&"TEXTAREA"!==i.tagName){var a=I(i)?this.mirror.getId(Le(o)):this.mirror.getId(i),s=r(o);if(-1===a||-1===s)return n.addNode(o);var l=re(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=>{Ne(e,this.mirror)&&this.iframeManager.addIframe(e),Ae(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),Re(o)&&this.shadowDomManager.addShadowRoot(fe.shadowRoot(o),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}});l&&(e.push({parentId:a,nextId:s,node:l}),t.add(l.id))}};this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(var i of this.movedSet)Xe(this.removes,i,this.mirror)&&!this.movedSet.has(fe.parentNode(i))||o(i);for(var a of this.addedSet)Ke(this.droppedSet,a)||Xe(this.removes,a,this.mirror)?Ke(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(fe.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(fe.parentNode(p.value));if(-1===r(p.value))continue;if(-1!==h){l=p;break}var f=p.value,m=fe.parentNode(f);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var v=fe.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=fe.parentNode(t);return n&&"TEXTAREA"===n.tagName&&this.genTextAreaValueMutation(n),{id:this.mirror.getId(t),value:e.value}})).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),attributes:this.attributes.map((e=>{var{attributes:t}=e;if("string"==typeof t.style){var n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length<t.style.length&&(n+r).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}})).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),removes:this.removes,adds:e};(g.texts.length||g.attributes.length||g.removes.length||g.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(g))}})),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(fe.childNodes(e),(e=>fe.textContent(e)||"")).join("")})),c(this,"processMutation",(e=>{if(!xe(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":var t=fe.textContent(e.target);Te(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:ee(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,ke(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break;case"attributes":var n=e.target,r=e.attributeName,o=e.target.getAttribute(r);if("value"===r){var i=R(n);o=E({element:n,maskInputOptions:this.maskInputOptions,tagName:n.tagName,type:i,value:o,maskInputFn:this.maskInputFn})}if(Te(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"),!Q(n.tagName,r))if(a.attributes[r]=J(this.doc,N(n.tagName),N(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(Te(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(fe.host(e.target)):this.mirror.getId(e.target);Te(e.target,this.blockClass,this.blockSelector,!1)||xe(t,this.mirror,this.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(ze(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||Me(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Ge(n,r)]?ze(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:!(!I(e.target)||!w(e.target))||void 0})),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(xe(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[Ge(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Te(e,this.blockClass,this.blockSelector,!1)||(fe.childNodes(e).forEach((e=>this.genAdds(e))),Re(e)&&fe.childNodes(fe.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 ze(e,t){e.delete(t),fe.childNodes(t).forEach((t=>ze(e,t)))}function Xe(e,t,n){return 0!==e.length&&function(e,t,n){var r=fe.parentNode(t),o=function(){var t=n.getId(r);if(e.some((e=>e.id===t)))return{v:!0};r=fe.parentNode(r)};for(;r;){var i=o();if("object"==typeof i)return i.v}return!1}(e,t,n)}function Ke(e,t){return 0!==e.size&&Je(e,t)}function Je(e,t){var n=fe.parentNode(t);return!!n&&(!!e.has(n)||Je(e,n))}var Qe=e=>{if(!je)return e;return function(){try{return e(...arguments)}catch(e){if(je&&!0===je(e))return;throw e}}},$e=[];function et(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 tt(e,t){var n=new Ue;$e.push(n),n.init(e);var r=new(he())(Qe(n.processMutations.bind(n)));return r.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function nt(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(He).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==l[e])).forEach((e=>{var s=N(e),l=(e=>r=>{var s=et(r);if(!Te(s,i,a,!0)){var l=null,c=e;if("pointerType"in r){switch(r.pointerType){case"mouse":l=Ze.Mouse;break;case"touch":l=Ze.Touch;break;case"pen":l=Ze.Pen}l===Ze.Touch?He[e]===He.MouseDown?c="TouchStart":He[e]===He.MouseUp&&(c="TouchEnd"):Ze.Pen}else Ee(r)&&(l=Ze.Touch);null!==l?(u=l,(c.startsWith("Touch")&&l===Ze.Touch||c.startsWith("Mouse")&&l===Ze.Mouse)&&(l=null)):He[e]===He.Click&&(l=u,u=null);var d=Ee(r)?r.changedTouches[0]:r;if(d){var p=o.getId(s),{clientX:h,clientY:f}=d;Qe(n)(t({type:He[c],id:p,x:h,y:f},null!==l&&{pointerType:l}))}}})(e);if(window.PointerEvent)switch(He[e]){case He.MouseDown:case He.MouseUp:s=s.replace("mouse","pointer");break;case He.TouchStart:case He.TouchEnd:return}c.push(me(s,l,r))})),Qe((()=>{c.forEach((e=>e()))}))}function rt(e){var{scrollCb:t,doc:n,mirror:r,blockClass:o,blockSelector:i,sampling:a}=e;return me("scroll",Qe(ye(Qe((e=>{var a=et(e);if(a&&!Te(a,o,i,!0)){var s=r.getId(a);if(a===n&&n.defaultView){var l=Se(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 ot=["INPUT","TEXTAREA","SELECT"],it=new WeakMap;function at(e){return function(e,t){if(ut("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||ut("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||ut("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||ut("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){var 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 st(e,t,n){var r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function lt(e,t){var n,r,o,{mirror:i,stylesheetManager:a}=e,s=null;s="#document"===t.nodeName?i.getId(t):i.getId(fe.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}}),Qe((()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}))):()=>{}}function ct(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=tt(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=ye(Qe((e=>{var n=Date.now()-i;t(l.map((e=>(e.timeOffset-=n,e))),e),l=[],i=null})),s),u=Qe(ye(Qe((e=>{var t=et(e),{clientX:n,clientY:r}=Ee(e)?e.changedTouches[0]:e;i||(i=Ce()),l.push({x:n,y:r,id:o.getId(t),timeOffset:Ce()-i}),c("undefined"!=typeof DragEvent&&e instanceof DragEvent?Be.Drag:e instanceof MouseEvent?Be.MouseMove:Be.TouchMove)})),a,{trailing:!1})),d=[me("mousemove",u,r),me("touchmove",u,r),me("drag",u,r)];return Qe((()=>{d.forEach((e=>e()))}))}(e),a=nt(e),s=rt(e),l=function(e,t){var{viewportResizeCb:n}=e,{win:r}=t,o=-1,i=-1;return me("resize",Qe(ye(Qe((()=>{var e=Ie(),t=we();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=et(e),n=e.isTrusted,o=t&&t.tagName;if(t&&"OPTION"===o&&(t=fe.parentElement(t)),t&&o&&!(ot.indexOf(o)<0)&&!Te(t,i,a,!0)&&!(t.classList.contains(s)||l&&t.matches(l))){var d=t.value,h=!1,m=R(t)||"";"radio"===m||"checkbox"===m?h=t.checked:(c[o.toLowerCase()]||c[m])&&(d=E({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=it.get(e);if(!i||i.text!==r.text||i.isChecked!==r.isChecked){it.set(e,r);var a=o.getId(e);Qe(n)(t(t({},r),{},{id:a}))}}var m=("last"===d.input?["change"]:["input","change"]).map((e=>me(e,Qe(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=>be(e[0],e[1],{set(){Qe(h)({target:this,isTrusted:!1})}},!1,v)))),Qe((()=>{m.forEach((e=>e()))}))}(e),u=function(e){var{mediaInteractionCb:t,blockClass:n,blockSelector:r,mirror:o,sampling:i,doc:a}=e,s=Qe((e=>ye(Qe((i=>{var a=et(i);if(a&&!Te(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=[me("play",s(We.Play),a),me("pause",s(We.Pause),a),me("seeked",s(We.Seeked),a),me("volumechange",s(We.VolumeChange),a),me("ratechange",s(We.RateChange),a)];return Qe((()=>{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:Qe(((e,t,i)=>{var[a,s]=i,{id:l,styleId:c}=st(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:Qe(((e,t,i)=>{var[a]=i,{id:s,styleId:l}=st(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:Qe(((e,t,i)=>{var[a]=i,{id:s,styleId:l}=st(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:Qe(((e,t,i)=>{var[a]=i,{id:s,styleId:l}=st(t,r,o.styleMirror);return(s&&-1!==s||l&&-1!==l)&&n({id:s,styleId:l,replaceSync:a}),e.apply(t,i)}))}));var u={};dt("CSSGroupingRule")?u.CSSGroupingRule=i.CSSGroupingRule:(dt("CSSMediaRule")&&(u.CSSMediaRule=i.CSSMediaRule),dt("CSSConditionRule")&&(u.CSSConditionRule=i.CSSConditionRule),dt("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:Qe(((e,t,i)=>{var[a,s]=i,{id:l,styleId:c}=st(t.parentStyleSheet,r,o.styleMirror);return(l&&-1!==l||c&&-1!==c)&&n({id:l,styleId:c,adds:[{rule:a,index:[...at(t),s||0]}]}),e.apply(t,i)}))}),i.prototype.deleteRule=new Proxy(d[t].deleteRule,{apply:Qe(((e,t,i)=>{var[a]=i,{id:s,styleId:l}=st(t.parentStyleSheet,r,o.styleMirror);return(s&&-1!==s||l&&-1!==l)&&n({id:s,styleId:l,removes:[{index:[...at(t),a]}]}),e.apply(t,i)}))})})),Qe((()=>{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=lt(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:Qe(((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}=st(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:at(t.parentRule)}),e.apply(t,a)}))});var l=a.CSSStyleDeclaration.prototype.removeProperty;return a.CSSStyleDeclaration.prototype.removeProperty=new Proxy(l,{apply:Qe(((e,t,a)=>{var s,[c]=a;if(o.has(c))return l.apply(t,[c]);var{id:u,styleId:d}=st(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:at(t.parentRule)}),e.apply(t,a)}))}),Qe((()=>{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=_e(n.fonts,"add",(function(e){return function(n){return setTimeout(Qe((()=>{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),Qe((()=>{o.forEach((e=>e()))}))}(e)));var m=function(e){var{doc:t,mirror:n,blockClass:r,blockSelector:o,selectionCb:i}=e,a=!0,s=Qe((()=>{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;Te(d,r,o,!0)||Te(h,r,o,!0)||s.push({start:n.getId(d),startOffset:p,end:n.getId(h),endOffset:f})}i({ranges:s})}}));return s(),me("selectionchange",s)}(e),v=function(e){var{doc:t,customElementCb:n}=e,r=t.defaultView;return r&&r.customElements?_e(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 Qe((()=>{$e.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 ut(e){return void 0!==window[e]}function dt(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class pt{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 ht{constructor(e){c(this,"iframes",new WeakMap),c(this,"crossOriginIframeMap",new WeakMap),c(this,"crossOriginIframeMirror",new pt(Y)),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 pt(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 Pe.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:Pe.IncrementalSnapshot,data:{source:Be.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case Pe.Meta:case Pe.Load:case Pe.DomContentLoaded:return!1;case Pe.Plugin:return t;case Pe.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case Pe.IncrementalSnapshot:switch(t.data.source){case Be.Mutation:return t.data.adds.forEach((t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);var 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 Be.Drag:case Be.TouchMove:case Be.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case Be.ViewportResize:return!1;case Be.MediaInteraction:case Be.MouseInteraction:case Be.Scroll:case Be.CanvasMutation:case Be.Input:return this.replaceIds(t.data,e,["id"]),t;case Be.StyleSheetRule:case Be.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case Be.Font:return t;case Be.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case Be.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(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===p.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,t)}))}}class ft{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=tt(t(t({},this.bypassOptions),{},{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push((()=>r.disconnect())),this.restoreHandlers.push(rt(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(fe.host(e))),this.restoreHandlers.push(lt({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(_e(e.prototype,"attachShadow",(function(e){return function(r){var o=e.call(this,r),i=fe.shadowRoot(this);return i&&Fe(this)&&n.addShadowRoot(i,t),o}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch(e){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var mt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",vt="undefined"==typeof Uint8Array?[]:new Uint8Array(256),gt=0;gt<64;gt++)vt[mt.charCodeAt(gt)]=gt;var yt=new Map;var bt=(e,t,n)=>{if(e&&(St(e,t)||"object"==typeof e)){var r=function(e,t){var n=yt.get(e);return n||(n=new Map,yt.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 _t(e,t,n){if(e instanceof Array)return e.map((e=>_t(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+=mt[n[t]>>2],o+=mt[(3&n[t])<<4|n[t+1]>>4],o+=mt[(15&n[t+1])<<2|n[t+2]>>6],o+=mt[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:[_t(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:[_t(e.data,t,n),e.width,e.height]}:St(e,t)||"object"==typeof e?{rr_type:e.constructor.name,index:bt(e,t,n)}:e}var Ct=(e,t,n)=>e.map((e=>_t(e,t,n))),St=(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 It(e,t,n,r){var o=[];try{var i=_e(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(!Te(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 wt(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=_e(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(bt(u,i,this),"tagName"in this.canvas&&!Te(this.canvas,r,o,!0)){var d=Ct(l,i,this),p={type:t,property:s,args:d};n(this.canvas,p)}return u}}));a.push(l)}catch(r){var c=be(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 kt,Tt,xt,Mt,Et="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Nt="undefined"!=typeof window&&window.Blob&&new Blob([(kt=Et,Uint8Array.from(atob(kt),(e=>e.charCodeAt(0))))],{type:"text/javascript;charset=utf-8"});function At(e){var t;try{if(!(t=Nt&&(window.URL||window.webkitURL).createObjectURL(Nt)))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,"+Et,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class Rt{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=It(t,n,o,!0),l=new Map,c=new At;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:qe["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=>{Te(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=It(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=_e(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 Te(this.canvas,n,r,!0)||setTimeout((()=>{var n=Ct(s,t,this);e(this.canvas,{type:qe["2D"],property:i,args:n})}),0),o.apply(this,s)}}));o.push(a)}catch(n){var s=be(t.CanvasRenderingContext2D.prototype,i,{set(t){e(this.canvas,{type:qe["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(...wt(t.WebGLRenderingContext.prototype,qe.WebGL,e,n,r,t)),void 0!==t.WebGL2RenderingContext&&o.push(...wt(t.WebGL2RenderingContext.prototype,qe.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 Ot{constructor(e){c(this,"trackedLinkElements",new WeakSet),c(this,"mutationCb"),c(this,"adoptedStyleSheetCb"),c(this,"styleMirror",new Oe),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 Lt{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 Dt=!1;try{if(2!==Array.from([1],(e=>2*e))[0]){var Ft=document.createElement("iframe");document.body.appendChild(Ft),Array.from=(null==(a=Ft.contentWindow)?void 0:a.Array.from)||Array.from,document.body.removeChild(Ft)}}catch(e){console.debug("Unable to override Array.from",e)}var Pt,Bt,Ht=new M;function Zt(){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:E=!1,plugins:N,keepIframeSrcFn:A=(()=>!1),ignoreCSSAttributes:R=new Set([]),errorHandler:O}=e;je=O;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),Ht.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 N||[])t.eventProcessor&&(e=t.eventProcessor(e));return y&&!D&&(e=y(e)),e};Tt=(e,t)=>{var i,a=e;if(a.timestamp=Ce(),!(null==(i=$e[0])?void 0:i.isFrozen())||a.type===Pe.FullSnapshot||a.type===Pe.IncrementalSnapshot&&a.data.source===Be.Mutation||$e.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===Pe.FullSnapshot)F=a,H=0;else if(a.type===Pe.IncrementalSnapshot){if(a.data.source===Be.Mutation&&a.data.isAttachIframe)return;H++;var l=o&&H>=o,c=r&&a.timestamp-F.timestamp>r;(l||c)&&xt(!0)}};var q=e=>{Tt({type:Pe.IncrementalSnapshot,data:t({source:Be.Mutation},e)})},W=e=>Tt({type:Pe.IncrementalSnapshot,data:t({source:Be.Scroll},e)}),V=e=>Tt({type:Pe.IncrementalSnapshot,data:t({source:Be.CanvasMutation},e)}),Y=new Ot({mutationCb:q,adoptedStyleSheetCb:e=>Tt({type:Pe.IncrementalSnapshot,data:t({source:Be.AdoptedStyleSheet},e)})}),j=new ht({mirror:Ht,mutationCb:q,stylesheetManager:Y,recordCrossOriginIframes:w,wrappedEmit:Tt});for(var G of N||[])G.getMirror&&G.getMirror({nodeMirror:Ht,crossOriginIframeMirror:j.crossOriginIframeMirror,crossOriginIframeStyleMirror:j.crossOriginIframeStyleMirror});var U=new Lt;Mt=new Rt({recordCanvas:I,mutationCb:V,win:window,blockClass:i,blockSelector:a,mirror:Ht,sampling:b.canvas,dataURLOptions:_});var z=new ft({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:E,sampling:b,slimDOMOptions:B,iframeManager:j,stylesheetManager:Y,canvasManager:Mt,keepIframeSrcFn:A,processedNodeManager:U},mirror:Ht});xt=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(S){Tt({type:Pe.Meta,data:{href:window.location.href,width:we(),height:Ie()}},e),Y.reset(),z.init(),$e.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 re(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:Ht,blockClass:i,blockSelector:a,maskTextClass:c,maskTextSelector:u,inlineStylesheet:d,maskAllInputs:P,maskTextFn:v,maskInputFn:m,slimDOM:B,dataURLOptions:_,recordCanvas:I,inlineImages:E,onSerialize:e=>{Ne(e,Ht)&&j.addIframe(e),Ae(e,Ht)&&Y.trackLinkElement(e),Re(e)&&z.addShadowRoot(fe.shadowRoot(e),document)},onIframeLoad:(e,t)=>{j.attachIframe(e,t),z.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{Y.attachLinkElement(e,t)},keepIframeSrcFn:A});if(!t)return console.warn("Failed to snapshot the document");Tt({type:Pe.FullSnapshot,data:{node:t,initialOffset:Se(window)}},e),$e.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Y.adoptStyleSheets(document.adoptedStyleSheets,Ht.getId(document))}};try{var X=[],K=e=>{var n;return Qe(ct)({mutationCb:q,mousemoveCb:(e,t)=>Tt({type:Pe.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>Tt({type:Pe.IncrementalSnapshot,data:t({source:Be.MouseInteraction},e)}),scrollCb:W,viewportResizeCb:e=>Tt({type:Pe.IncrementalSnapshot,data:t({source:Be.ViewportResize},e)}),inputCb:e=>Tt({type:Pe.IncrementalSnapshot,data:t({source:Be.Input},e)}),mediaInteractionCb:e=>Tt({type:Pe.IncrementalSnapshot,data:t({source:Be.MediaInteraction},e)}),styleSheetRuleCb:e=>Tt({type:Pe.IncrementalSnapshot,data:t({source:Be.StyleSheetRule},e)}),styleDeclarationCb:e=>Tt({type:Pe.IncrementalSnapshot,data:t({source:Be.StyleDeclaration},e)}),canvasMutationCb:V,fontCb:e=>Tt({type:Pe.IncrementalSnapshot,data:t({source:Be.Font},e)}),selectionCb:e=>{Tt({type:Pe.IncrementalSnapshot,data:t({source:Be.Selection},e)})},customElementCb:e=>{Tt({type:Pe.IncrementalSnapshot,data:t({source:Be.CustomElement},e)})},blockClass:i,ignoreClass:s,ignoreSelector:l,maskTextClass:c,maskTextSelector:u,maskInputOptions:P,inlineStylesheet:d,sampling:b,recordDOM:S,recordCanvas:I,inlineImages:E,userTriggeredOnInput:T,collectFonts:x,doc:e,maskInputFn:m,maskTextFn:v,keepIframeSrcFn:A,blockSelector:a,slimDOMOptions:B,dataURLOptions:_,mirror:Ht,iframeManager:j,stylesheetManager:Y,shadowDomManager:z,processedNodeManager:U,canvasManager:Mt,ignoreCSSAttributes:R,plugins:(null==(n=null==N?void 0:N.filter((e=>e.observer)))?void 0:n.map((e=>({observer:e.observer,options:e.options,callback:t=>Tt({type:Pe.Plugin,data:{plugin:e.name,payload:t}})}))))||[]},g)};j.addLoadListener((e=>{try{X.push(K(e.contentDocument))}catch(e){console.warn(e)}}));var J=()=>{xt(),X.push(K(document)),Dt=!0};return"interactive"===document.readyState||"complete"===document.readyState?J():(X.push(me("DOMContentLoaded",(()=>{Tt({type:Pe.DomContentLoaded,data:{}}),"DOMContentLoaded"===k&&J()}))),X.push(me("load",(()=>{Tt({type:Pe.Load,data:{}}),"load"===k&&J()}),window))),()=>{X.forEach((e=>e())),U.destroy(),Dt=!1,je=void 0}}catch(e){console.warn(e)}}Zt.addCustomEvent=(e,t)=>{if(!Dt)throw new Error("please add custom event after start recording");Tt({type:Pe.Custom,data:{tag:e,payload:t}})},Zt.freezePage=()=>{$e.forEach((e=>e.freeze()))},Zt.takeFullSnapshot=e=>{if(!Dt)throw new Error("please take full snapshot after start recording");xt(e)},Zt.mirror=Ht,(Bt=Pt||(Pt={}))[Bt.NotStarted=0]="NotStarted",Bt[Bt.Running=1]="Running",Bt[Bt.Stopped=2]="Stopped";var qt,Wt=Object.defineProperty,Vt=(e,t,n)=>((e,t,n)=>t in e?Wt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),Yt=Object.defineProperty,jt=(e,t,n)=>((e,t,n)=>t in e?Yt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),Gt=Object.defineProperty,Ut=(e,t,n)=>((e,t,n)=>t in e?Gt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),zt={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Xt={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Kt={};function Jt(e){if(Kt[e])return Kt[e];var t=globalThis[e],n=t.prototype,r=e in zt?zt[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 Xt?Xt[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 Kt[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?Kt[e]=c:n}catch(e){return n}}var Qt={};function $t(e,t,n){var r,o="".concat(e,".").concat(String(n));if(Qt[o])return Qt[o].call(t);var i=Jt(e),a=null==(r=Object.getOwnPropertyDescriptor(i,n))?void 0:r.get;return a?(Qt[o]=a,a.call(t)):t[n]}var en={};function tn(e,t,n){var r="".concat(e,".").concat(String(n));if(en[r])return en[r].bind(t);var o=Jt(e)[n];return"function"!=typeof o?t[n]:(en[r]=o,o.bind(t))}var nn={childNodes:function(e){return $t("Node",e,"childNodes")},parentNode:function(e){return $t("Node",e,"parentNode")},parentElement:function(e){return $t("Node",e,"parentElement")},textContent:function(e){return $t("Node",e,"textContent")},contains:function(e,t){return tn("Node",e,"contains")(t)},getRootNode:function(e){return tn("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?$t("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?$t("Element",e,"shadowRoot"):null},querySelector:function(e,t){return $t("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return $t("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return Jt("MutationObserver").constructor}};class rn{constructor(){Ut(this,"idNodeMap",new Map),Ut(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 on(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&on(nn.parentNode(e),t,n);for(var r=e.classList.length;r--;){var o=e.classList[r];if(t.test(o))return!0}return!!n&&on(nn.parentNode(e),t,n)}class an{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 an))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 sn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ln={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},cn={};function un(e){if(cn[e])return cn[e];var t=globalThis[e],n=t.prototype,r=e in sn?sn[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 ln?ln[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 cn[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?cn[e]=c:n}catch(e){return n}}var dn={};function pn(e,t,n){var r,o="".concat(e,".").concat(String(n));if(dn[o])return dn[o].call(t);var i=un(e),a=null==(r=Object.getOwnPropertyDescriptor(i,n))?void 0:r.get;return a?(dn[o]=a,a.call(t)):t[n]}var hn={};function fn(e,t,n){var r="".concat(e,".").concat(String(n));if(hn[r])return hn[r].bind(t);var o=un(e)[n];return"function"!=typeof o?t[n]:(hn[r]=o,o.bind(t))}var mn={childNodes:function(e){return pn("Node",e,"childNodes")},parentNode:function(e){return pn("Node",e,"parentNode")},parentElement:function(e){return pn("Node",e,"parentElement")},textContent:function(e){return pn("Node",e,"textContent")},contains:function(e,t){return fn("Node",e,"contains")(t)},getRootNode:function(e){return fn("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?pn("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?pn("Element",e,"shadowRoot"):null},querySelector:function(e,t){return pn("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return pn("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return un("MutationObserver").constructor}};var vn="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.",gn={map:{},getId:()=>(console.error(vn),-1),getNode:()=>(console.error(vn),null),removeNodeFromMap(){console.error(vn)},has:()=>(console.error(vn),!1),reset(){console.error(vn)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(gn=new Proxy(gn,{get:(e,t,n)=>("map"===t&&console.error(vn),Reflect.get(e,t,n))}));var yn=Date.now;function bn(e){return e?e.nodeType===e.ELEMENT_NODE?e:mn.parentElement(e):null}/[1-9][0-9]{12}/.test(Date.now().toString())||(yn=()=>(new Date).getTime());function _n(e){var t,n=null;return"getRootNode"in e&&(null==(t=mn.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&mn.host(mn.getRootNode(e))&&(n=mn.host(mn.getRootNode(e))),n}function Cn(e){for(var t,n=e;t=_n(n);)n=t;return n}function Sn(e){var t=e.ownerDocument;if(!t)return!1;var n=Cn(e);return mn.contains(t,n)}for(var In=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:class{constructor(){jt(this,"id",1),jt(this,"styleIDMap",new WeakMap),jt(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 gn},closestElementOfNode:bn,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:Cn,getShadowHost:_n,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=mn.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=mn.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 an&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(mn.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&&(mn.contains(t,e)||Sn(e))},isAncestorRemoved:function e(t,n){if(o=(r=t)&&"host"in r&&"mode"in r&&nn.host(r)||null,Boolean(o&&"shadowRoot"in o&&nn.shadowRoot(o)===r))return!1;var r,o,i=n.getId(t);if(!n.has(i))return!0;var a=mn.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=bn(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(on(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 yn},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:Sn,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"})),wn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",kn="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Tn=0;Tn<64;Tn++)kn[wn.charCodeAt(Tn)]=Tn;var xn;"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 Mn=document.createElement("iframe");document.body.appendChild(Mn),Array.from=(null==(qt=Mn.contentWindow)?void 0:qt.Array.from)||Array.from,document.body.removeChild(Mn)}}catch(e){console.debug("Unable to override Array.from",e)}new rn,function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(xn||(xn={}));class En{constructor(e){Vt(this,"fileName"),Vt(this,"functionName"),Vt(this,"lineNumber"),Vt(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 Nn=/(^|@)\S+:\d+/,An=/^\s*at .*(\S+:\d+|\(native\))/m,Rn=/^(eval@)?(\[native code])?$/,On={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(An)?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(An)}),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 En({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(Rn)}),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 En({functionName:e});var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(t),r=n&&n[1]?n[1]:void 0,o=this.extractLocation(e.replace(t,""));return new En({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 En({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 En({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(Nn)&&!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 En({functionName:r,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})}),this)}};function Ln(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 Dn(e){return"[object Object]"===Object.prototype.toString.call(e)}function Fn(e,t){if(0===t)return!0;var n=Object.keys(e);for(var r of n)if(Dn(e[r])&&Fn(e[r],t-1))return!0;return!1}function Pn(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(Dn(e)&&Object.keys(e).length>n.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if(Dn(e)&&Fn(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]=Ln(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 Bn={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 Hn(e,t,n){var r,o=n?Object.assign({},Bn,n):Bn,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=On.parse(r).map((e=>e.toString())),a=[Pn(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=[Pn("Uncaught (in promise) ".concat(n.name,": ").concat(n.message),o.stringifyOptions)]):(n=new Error,r=[Pn("Uncaught (in promise)",o.stringifyOptions),Pn(t.reason,o.stringifyOptions)]);var i=On.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]?In.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=On.parse(new Error).map((e=>e.toString())).splice(1),d=("assert"===n?l.slice(1):l).map((e=>Pn(e,o.stringifyOptions)));++a<o.lengthThreshold?e({level:n,trace:u,payload:d}):a===o.lengthThreshold&&e({level:"warn",trace:[],payload:[Pn("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:Hn,options:e}),qn="undefined"!=typeof window?window:void 0,Wn="undefined"!=typeof globalThis?globalThis:qn,Vn=Array.prototype.forEach,Yn=null==Wn?void 0:Wn.navigator,jn=null==Wn?void 0:Wn.document;null==Wn||Wn.location,null==Wn||Wn.fetch,null!=Wn&&Wn.XMLHttpRequest&&"withCredentials"in new Wn.XMLHttpRequest&&Wn.XMLHttpRequest,null==Wn||Wn.AbortController,null==Yn||Yn.userAgent;var Gn,Un=null!=qn?qn:{};!function(e){e.GZipJS="gzip-js",e.Base64="base64"}(Gn||(Gn={}));var zn=["fatal","error","warning","log","info","debug"],Xn=e=>{var t={_log:function(t){if(qn&&Un.POSTHOG_DEBUG&&!vr(qn.console)&&qn.console){for(var n=("__rrweb_original__"in qn.console[t]?qn.console[t].__rrweb_original__:qn.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=>Xn("".concat(e," ").concat(t))};return t},Kn=Xn("[PostHog.js]"),Jn=Kn.createLogger,Qn={};function $n(e,t,n){if(dr(e))if(Vn&&e.forEach===Vn)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)===Qn)return}function er(e,t,n){if(!_r(e)){if(dr(e))return $n(e,t,n);if(wr(e)){for(var r of e.entries())if(t.call(n,r[1],r[0])===Qn)return}else for(var o in e)if(cr.call(e,o)&&t.call(n,e[o],o)===Qn)return}}var tr=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 $n(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}function rr(e,t,n,r){var{capture:o=!1,passive:i=!0}=null!=r?r:{};null==e||e.addEventListener(t,n,{capture:o,passive:i})}function or(e,t){return-1!==e.indexOf(t)}var ir=function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},ar=function(e,t){if(!function(e){try{new RegExp(e)}catch(e){return!1}return!0}(t))return!1;try{return new RegExp(t).test(e)}catch(e){return!1}},sr=Array.isArray,lr=Object.prototype,cr=lr.hasOwnProperty,ur=lr.toString,dr=sr||function(e){return"[object Array]"===ur.call(e)},pr=e=>"function"==typeof e,hr=e=>pr(e)&&-1!==e.toString().indexOf("[native code]"),fr=()=>!!qn.Zone,mr=e=>e===Object(e)&&!dr(e),vr=e=>void 0===e,gr=e=>"[object String]"==ur.call(e),yr=e=>gr(e)&&0===e.trim().length,br=e=>null===e,_r=e=>vr(e)||br(e),Cr=e=>"[object Number]"==ur.call(e),Sr=e=>"[object Boolean]"===ur.call(e),Ir=e=>e instanceof Document,wr=e=>e instanceof FormData,kr=function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"&",o=[];return er(e,(function(e,r){vr(e)||vr(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)},Tr="$surveys_activated";function xr(e){return!!e&&1===e.nodeType}function Mr(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function Er(e){return e?ir(e).split(/\s+/):[]}function Nr(e){var t="";switch(typeof e.className){case"string":t=e.className;break;case"object":t=(e.className&&"baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:t=""}return Er(t)}function Ar(e){var t="";return Or(e)&&!Lr(e)&&e.childNodes&&e.childNodes.length&&er(e.childNodes,(function(e){var n;(function(e){return!!e&&3===e.nodeType})(e)&&e.textContent&&(t+=null!==(n=function(e){return _r(e)?null:ir(e).split(/(\s+)/).filter((e=>qr(e))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}(e.textContent))&&void 0!==n?n:"")})),ir(t)}var Rr=["a","button","form","input","select","textarea","label"];function Or(e){for(var t=e;t.parentNode&&!Mr(t,"body");t=t.parentNode){var n=Nr(t);if(or(n,"ph-sensitive")||or(n,"ph-no-capture"))return!1}if(or(Nr(e),"ph-include"))return!0;var r=e.type||"";if(gr(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var o=e.name||e.id||"";if(gr(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 Lr(e){return!!(Mr(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||Mr(e,"select")||Mr(e,"textarea")||"true"===e.getAttribute("contenteditable"))}var Dr="(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})",Fr=new RegExp("^(?:".concat(Dr,")$")),Pr=new RegExp(Dr),Br="\\d{3}-?\\d{2}-?\\d{4}",Hr=new RegExp("^(".concat(Br,")$")),Zr=new RegExp("(".concat(Br,")"));function qr(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(_r(e))return!1;if(gr(e)){if(e=ir(e),(t?Fr:Pr).test((e||"").replace(/[- ]/g,"")))return!1;if((t?Hr:Zr).test(e))return!1}return!0}function Wr(e){var t=Ar(e);return qr(t="".concat(t," ").concat(Vr(e)).trim())?t:""}function Vr(e){var t="";return e&&e.childNodes&&e.childNodes.length&&er(e.childNodes,(function(e){var n;if(e&&"span"===(null===(n=e.tagName)||void 0===n?void 0:n.toLowerCase()))try{var r=Ar(e);t="".concat(t," ").concat(r).trim(),e.childNodes&&e.childNodes.length&&(t="".concat(t," ").concat(Vr(e)).trim())}catch(e){Kn.error("[AutoCapture]",e)}})),t}function Yr(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[jr(t.toString())]=jr(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:Gr(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 jr(e){return e.replace(/"|\\"/g,'\\"')}function Gr(e){var t=e.attr__class;return t?dr(t)?t:Er(t):void 0}var Ur={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 zr(e,t,n){try{if(!(t in e))return()=>{};var r=e[t],o=n(r);return pr(o)&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=o,()=>{e[t]=r}}catch(e){return()=>{}}}function Xr(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 Kr=Jn("[Recorder]"),Jr=e=>"navigation"===e.entryType,Qr=e=>"resource"===e.entryType;function $r(e,t,n){if(n.recordInitialRequests){var r=t.performance.getEntries().filter((e=>Jr(e)||Qr(e)&&n.initiatorTypes.includes(e.initiatorType)));e({requests:r.flatMap((e=>ao({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=>Jr(e)||Qr(e)&&n.initiatorTypes.includes(e.initiatorType)&&(e=>!n.recordBody&&!n.recordHeaders||"xmlhttprequest"!==e.initiatorType&&"fetch"!==e.initiatorType)(e)));e({requests:r.flatMap((e=>ao({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 eo(e,t){return!!t&&(Sr(t)||t[e])}function to(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(Sr(n))return!0;if(dr(n))return o(n);var i=n[t];return Sr(i)?i:o(i)}function no(e,t,n,r,o){return ro.apply(this,arguments)}function ro(){return ro=r((function*(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(i>10)return Kr.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=>Qr(e)&&e.initiatorType===t&&(vr(r)||e.startTime>=r)&&(vr(o)||e.startTime<=o)));return a||(yield new Promise((e=>setTimeout(e,50*i))),no(e,t,n,r,o,i+1))})),ro.apply(this,arguments)}function oo(e){var{body:t,options:n,url:r}=e;if(_r(t))return null;var{hostname:o,isHostDenied:i}=Xr(r,n);if(i)return o+" is in deny list";if(gr(t))return t;if(Ir(t))return t.textContent;if(wr(t))return kr(t);if(mr(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 io=e=>!br(e)&&("navigation"===e.entryType||"resource"===e.entryType);function ao(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:vr(s)?void 0:Math.round(s),endTime:vr(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(io(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 so=["video/","audio/"];function lo(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 co(){return co=r((function*(e){var{r:t,options:n,url:r}=e,{hostname:o,isHostDenied:i}=Xr(r,n);return i?Promise.resolve(o+" is in deny list"):lo(t)})),co.apply(this,arguments)}function uo(){return uo=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=so.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}=Xr(o,r);return l?s+" is in deny list":null}({r:t,options:n,url:r});return br(o)?lo(t):Promise.resolve(o)})),uo.apply(this,arguments)}function po(e,t,n){if(!n.initiatorTypes.includes("fetch"))return()=>{};var o=eo("request",n.recordHeaders),i=eo("response",n.recordHeaders),a=zr(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),to({type:"request",headers:h,url:r,recordBody:n.recordBody})&&(p.requestBody=yield function(e){return co.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),to({type:"response",headers:f,url:r,recordBody:n.recordBody})&&(p.responseBody=yield function(e){return uo.apply(this,arguments)}({r:l,options:n,url:r})),l}finally{no(t,"fetch",d.url,c,u).then((t=>{var n,r=ao({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 ho=null;function fo(e,n,r){if(!("performance"in n))return()=>{};if(ho)return Kr.warn("Network observer already initialised, doing nothing"),()=>{};var o=r?Object.assign({},Ur,r):Ur,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=$r(i,n,o),s=()=>{},l=()=>{};return(o.recordHeaders||o.recordBody)&&(s=function(e,t,n){if(!n.initiatorTypes.includes("xmlhttprequest"))return()=>{};var r=eo("request",n.recordHeaders),o=eo("response",n.recordHeaders),i=zr(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=>(to({type:"request",headers:v,url:s,recordBody:n.recordBody})&&(m.requestBody=oo({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),to({type:"response",headers:r,url:s,recordBody:n.recordBody})&&(m.responseBody=oo({body:h.response,options:n,url:s})),no(t,"xmlhttprequest",f.url,l,c).then((t=>{var n=ao({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=po(i,n,o)),ho=()=>{a(),s(),l()}}var mo=e=>({name:"rrweb/network@1",observer:fo,options:e});Un.__PosthogExtensions__=Un.__PosthogExtensions__||{},Un.__PosthogExtensions__.rrwebPlugins={getRecordConsolePlugin:Zn,getRecordNetworkPlugin:mo},Un.__PosthogExtensions__.rrweb={record:Zt,version:"v2"},Un.rrweb={record:Zt,version:"v2"},Un.rrwebConsoleRecord={getRecordConsolePlugin:Zn},Un.getRecordNetworkPlugin=mo;var vo,go,yo,bo,_o,Co,So,Io,wo={},ko=[],To=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,xo=Array.isArray;function Mo(e,t){for(var n in t)e[n]=t[n];return e}function Eo(e){var t=e.parentNode;t&&t.removeChild(e)}function No(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?vo.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 Ao(e,a,r,o,null)}function Ao(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?++yo:o,__i:-1,__u:0};return null==o&&null!=go.vnode&&go.vnode(i),i}function Ro(e){return e.children}function Oo(e,t){this.props=e,this.context=t}function Lo(e,t){if(null==t)return e.__?Lo(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?Lo(e):null}function Do(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 Do(e)}}function Fo(e){(!e.__d&&(e.__d=!0)&&bo.push(e)&&!Po.__r++||_o!==go.debounceRendering)&&((_o=go.debounceRendering)||Co)(Po)}function Po(){var e,t,n,r,o,i,a,s,l;for(bo.sort(So);e=bo.shift();)e.__d&&(t=bo.length,r=void 0,i=(o=(n=e).__v).__e,s=[],l=[],(a=n.__P)&&((r=Mo({},o)).__v=o.__v+1,go.vnode&&go.vnode(r),jo(a,r,o,n.__n,void 0!==a.ownerSVGElement,32&o.__u?[i]:null,s,null==i?Lo(o):i,!!(32&o.__u),l),r.__.__k[r.__i]=r,Go(s,r,l),r.__e!=i&&Do(r)),bo.length>t&&bo.sort(So));Po.__r=0}function Bo(e,t,n,r,o,i,a,s,l,c,u){var d,p,h,f,m,v=r&&r.__k||ko,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?Ao(null,o,null,null,o):xo(o)?Ao(Ro,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?Ao(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=Lo(i)),zo(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=Lo(i)),zo(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?wo:v[h.__i]||wo,h.__i=d,jo(e,h,p,o,i,a,s,l,c,u),f=h.__e,h.ref&&p.ref!=h.ref&&(p.ref&&Uo(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=Ho(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 Ho(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=Ho(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 qo(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||To.test(t)?n:n+"px"}function Wo(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||qo(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||qo(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?Yo:Vo,i)):e.removeEventListener(t,i?Yo:Vo,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 Vo(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(go.event?go.event(e):e)}function Yo(e){return this.l[e.type+!0](go.event?go.event(e):e)}function jo(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=go.__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 Oo(g,b),d.constructor=k,d.render=Xo),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=Mo({},d.__s)),Mo(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=go.__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=Mo(Mo({},r),d.getChildContext())),p||null==d.getSnapshotBeforeUpdate||(m=d.getSnapshotBeforeUpdate(h,f)),Bo(e,xo(w=null!=u&&u.type===Ro&&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),go.__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&&vo.call(e.childNodes),v=n.props||wo,!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||Wo(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||Wo(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=""),Bo(e,xo(p)?p:[p],t,n,r,o&&"foreignObject"!==y,i,a,i?i[0]:n.__k&&Lo(n,0),s,l),null!=i)for(c=i.length;c--;)null!=i[c]&&Eo(i[c]);s||(c="value",void 0!==f&&(f!==e[c]||"progress"===y&&!f||"option"===y&&f!==v[c])&&Wo(e,c,f,v[c],!1),c="checked",void 0!==m&&m!==e[c]&&Wo(e,c,m,v[c],!1))}return e}(n.__e,t,n,r,o,i,a,l,c);(u=go.diffed)&&u(t)}function Go(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)Uo(n[r],n[++r],n[++r]);go.__c&&go.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){go.__e(e,t.__v)}}))}function Uo(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){go.__e(e,n)}}function zo(e,t,n){var r,o;if(go.unmount&&go.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Uo(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){go.__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]&&zo(r[o],t,n||"function"!=typeof e.type);n||null==e.__e||Eo(e.__e),e.__=e.__e=e.__d=void 0}function Xo(e,t,n){return this.constructor(e,n)}function Ko(e,t,n){var r,o,i,a;go.__&&go.__(e,t),o=(r="function"==typeof n)?null:t.__k,i=[],a=[],jo(t,e=(!r&&n||t).__k=No(Ro,null,[e]),o||wo,wo,void 0!==t.ownerSVGElement,!r&&n?[n]:o?null:t.firstChild?vo.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,a),Go(i,e,a)}function Jo(e,t,n){var r,o,i,a,s=Mo({},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?vo.call(arguments,2):n),Ao(e.type,s,r||e.key,o||e.ref,null)}vo=ko.slice,go={__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}},yo=0,Oo.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Mo({},this.state),"function"==typeof e&&(e=e(Mo({},n),this.props)),e&&Mo(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),Fo(this))},Oo.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Fo(this))},Oo.prototype.render=Ro,bo=[],Co="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,So=function(e,t){return e.__v.__b-t.__v.__b},Po.__r=0,Io=0;var Qo=qn,$o=jn,ei="seenSurvey_",ti=Jn("[Surveys]"),ni=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(oi((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 ri(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 oi(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ci;"#"===t[0]&&(e=ri(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=ri(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 ii,ai,si,li={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"},ci="#eeeded",ui=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(vi(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:{[gi(r,"responded")]:!0}})),Qo.dispatchEvent(new Event("PHSurveySent"))):ti.error("[survey sent] event not captured, PostHog instance not found.")},di=(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:{[gi(e,"dismissed")]:!0}}),localStorage.setItem(vi(e),"true"),Qo.dispatchEvent(new Event("PHSurveyClosed"))):ti.error("[survey dismissed] event not captured, PostHog instance not found.")},pi=e=>e.map((e=>({sort:Math.floor(10*Math.random()),value:e}))).sort(((e,t)=>e.sort-t.sort)).map((e=>e.value)),hi=(e,t)=>e.length===t.length&&e.every(((e,n)=>e===t[n]))?t.reverse():t,fi=e=>(e.questions.forEach(((e,t)=>{e.originalQuestionIndex=t})),e.appearance&&e.appearance.shuffleQuestions?hi(e.questions,pi(e.questions)):e.questions),mi=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))},vi=e=>{var t="".concat(ei).concat(e.id);return e.current_iteration&&e.current_iteration>0&&(t="".concat(ei).concat(e.id,"_").concat(e.current_iteration)),t},gi=(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},yi=function(e,t){var n={__c:t="__cC"+Io++,__: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,Fo(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:()=>{}}),bi=e=>{var{component:t,children:n,renderAsHtml:r,style:o}=e;return Jo(t,r?{dangerouslySetInnerHTML:{__html:n},style:o}:{children:n,style:o})};!function(e){e.Popover="popover",e.API="api",e.Widget="widget"}(ii||(ii={})),function(e){e.Open="open",e.MultipleChoice="multiple_choice",e.SingleChoice="single_choice",e.Rating="rating",e.Link="link"}(ai||(ai={})),function(e){e.NextQuestion="next_question",e.End="end",e.ResponseBased="response_based",e.SpecificQuestion="specific_question"}(si||(si={}));!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];$n(n,(function(t){$n(t,(function(t){e.push(t)}))}))}(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","irclid","_kx"]);class _i{constructor(){o(this,"events",{}),this.events={}}on(e,t){return this.events[e]||(this.events[e]=[]),this.events[e].push(t),()=>{this.events[e]=this.events[e].filter((e=>e!==t))}}emit(e,t){for(var n of this.events[e]||[])n(t);for(var r of this.events["*"]||[])r(e,t)}}class Ci{constructor(e){o(this,"_debugEventEmitter",new _i),o(this,"checkStep",((e,t)=>this.checkStepEvent(e,t)&&this.checkStepUrl(e,t)&&this.checkStepElement(e,t))),o(this,"checkStepEvent",((e,t)=>null==t||!t.event||(null==e?void 0:e.event)===(null==t?void 0:t.event))),this.instance=e,this.actionEvents=new Set,this.actionRegistry=new Set}init(){var e;if(!vr(null===(e=this.instance)||void 0===e?void 0:e._addCaptureHook)){var t;null===(t=this.instance)||void 0===t||t._addCaptureHook(((e,t)=>{this.on(e,t)}))}}register(e){var t,n;if(!vr(null===(t=this.instance)||void 0===t?void 0:t._addCaptureHook)&&(e.forEach((e=>{var t,n;null===(t=this.actionRegistry)||void 0===t||t.add(e),null===(n=e.steps)||void 0===n||n.forEach((e=>{var t;null===(t=this.actionEvents)||void 0===t||t.add((null==e?void 0:e.event)||"")}))})),null!==(n=this.instance)&&void 0!==n&&n.autocapture)){var r,o=new Set;e.forEach((e=>{var t;null===(t=e.steps)||void 0===t||t.forEach((e=>{null!=e&&e.selector&&o.add(null==e?void 0:e.selector)}))})),null===(r=this.instance)||void 0===r||r.autocapture.setElementSelectors(o)}}on(e,t){var n;null!=t&&0!=e.length&&(this.actionEvents.has(e)||this.actionEvents.has(null==t?void 0:t.event))&&this.actionRegistry&&(null===(n=this.actionRegistry)||void 0===n?void 0:n.size)>0&&this.actionRegistry.forEach((e=>{this.checkAction(t,e)&&this._debugEventEmitter.emit("actionCaptured",e.name)}))}_addActionHook(e){this.onAction("actionCaptured",(t=>e(t)))}checkAction(e,t){if(null==(null==t?void 0:t.steps))return!1;for(var n of t.steps)if(this.checkStep(e,n))return!0;return!1}onAction(e,t){return this._debugEventEmitter.on(e,t)}checkStepUrl(e,t){if(null!=t&&t.url){var n,r=null==e||null===(n=e.properties)||void 0===n?void 0:n.$current_url;if(!r||"string"!=typeof r)return!1;if(!Ci.matchString(r,null==t?void 0:t.url,(null==t?void 0:t.url_matching)||"contains"))return!1}return!0}static matchString(e,t,n){switch(n){case"regex":return!!qn&&ar(e,t);case"exact":return t===e;case"contains":var r=Ci.escapeStringRegexp(t).replace(/_/g,".").replace(/%/g,".*");return ar(e,r);default:return!1}}static escapeStringRegexp(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}checkStepElement(e,t){if((null!=t&&t.href||null!=t&&t.tag_name||null!=t&&t.text)&&!this.getElementsList(e).some((e=>!(null!=t&&t.href&&!Ci.matchString(e.href||"",null==t?void 0:t.href,(null==t?void 0:t.href_matching)||"exact"))&&((null==t||!t.tag_name||e.tag_name===(null==t?void 0:t.tag_name))&&!(null!=t&&t.text&&!Ci.matchString(e.text||"",null==t?void 0:t.text,(null==t?void 0:t.text_matching)||"exact")&&!Ci.matchString(e.$el_text||"",null==t?void 0:t.text,(null==t?void 0:t.text_matching)||"exact"))))))return!1;if(null!=t&&t.selector){var n,r=null==e||null===(n=e.properties)||void 0===n?void 0:n.$element_selectors;if(!r)return!1;if(!r.includes(null==t?void 0:t.selector))return!1}return!0}getElementsList(e){return null==(null==e?void 0:e.properties.$elements)?[]:null==e?void 0:e.properties.$elements}}class Si{constructor(e){this.instance=e,this.eventToSurveys=new Map,this.actionToSurveys=new Map}register(e){var t;vr(null===(t=this.instance)||void 0===t?void 0:t._addCaptureHook)||(this.setupEventBasedSurveys(e),this.setupActionBasedSurveys(e))}setupActionBasedSurveys(e){var t=e.filter((e=>{var t,n,r,o;return(null===(t=e.conditions)||void 0===t?void 0:t.actions)&&(null===(n=e.conditions)||void 0===n||null===(r=n.actions)||void 0===r||null===(o=r.values)||void 0===o?void 0:o.length)>0}));if(0!==t.length){if(null==this.actionMatcher){this.actionMatcher=new Ci(this.instance),this.actionMatcher.init();this.actionMatcher._addActionHook((e=>{this.onAction(e)}))}t.forEach((e=>{var t,n,r,o,i,a,s,l,c,u;e.conditions&&null!==(t=e.conditions)&&void 0!==t&&t.actions&&null!==(n=e.conditions)&&void 0!==n&&null!==(r=n.actions)&&void 0!==r&&r.values&&(null===(o=e.conditions)||void 0===o||null===(i=o.actions)||void 0===i||null===(a=i.values)||void 0===a?void 0:a.length)>0&&(null===(s=this.actionMatcher)||void 0===s||s.register(e.conditions.actions.values),null===(l=e.conditions)||void 0===l||null===(c=l.actions)||void 0===c||null===(u=c.values)||void 0===u||u.forEach((t=>{if(t&&t.name){var n=this.actionToSurveys.get(t.name);n&&n.push(e.id),this.actionToSurveys.set(t.name,n||[e.id])}})))}))}}setupEventBasedSurveys(e){var t;if(0!==e.filter((e=>{var t,n,r,o;return(null===(t=e.conditions)||void 0===t?void 0:t.events)&&(null===(n=e.conditions)||void 0===n||null===(r=n.events)||void 0===r||null===(o=r.values)||void 0===o?void 0:o.length)>0})).length){null===(t=this.instance)||void 0===t||t._addCaptureHook(((e,t)=>{this.onEvent(e,t)})),e.forEach((e=>{var t,n,r;null===(t=e.conditions)||void 0===t||null===(n=t.events)||void 0===n||null===(r=n.values)||void 0===r||r.forEach((t=>{if(t&&t.name){var n=this.eventToSurveys.get(t.name);n&&n.push(e.id),this.eventToSurveys.set(t.name,n||[e.id])}}))}))}}onEvent(e,t){var n,r,o=(null===(n=this.instance)||void 0===n||null===(r=n.persistence)||void 0===r?void 0:r.props[Tr])||[];if(Si.SURVEY_SHOWN_EVENT_NAME==e&&t&&o.length>0){var i,a=null==t||null===(i=t.properties)||void 0===i?void 0:i.$survey_id;if(a){var s=o.indexOf(a);s>=0&&(o.splice(s,1),this._updateActivatedSurveys(o))}}else this.eventToSurveys.has(e)&&this._updateActivatedSurveys(o.concat(this.eventToSurveys.get(e)||[]))}onAction(e){var t,n,r=(null===(t=this.instance)||void 0===t||null===(n=t.persistence)||void 0===n?void 0:n.props[Tr])||[];this.actionToSurveys.has(e)&&this._updateActivatedSurveys(r.concat(this.actionToSurveys.get(e)||[]))}_updateActivatedSurveys(e){var t,n;null===(t=this.instance)||void 0===t||null===(n=t.persistence)||void 0===n||n.register({[Tr]:[...new Set(e)]})}getSurveys(){var e,t,n=null===(e=this.instance)||void 0===e||null===(t=e.persistence)||void 0===t?void 0:t.props[Tr];return n||[]}getEventToSurveys(){return this.eventToSurveys}_getActionMatcher(){return this.actionMatcher}}o(Si,"SURVEY_SHOWN_EVENT_NAME","survey shown");var Ii={icontains:(e,t)=>e.some((e=>t.toLowerCase().includes(e.toLowerCase()))),not_icontains:(e,t)=>e.every((e=>!t.toLowerCase().includes(e.toLowerCase()))),regex:(e,t)=>e.some((e=>ar(t,e))),not_regex:(e,t)=>e.every((e=>!ar(t,e))),exact:(e,t)=>e.some((e=>t===e)),is_not:(e,t)=>e.every((e=>t!==e))};function wi(e){var t,n,r;if(null===(t=e.conditions)||void 0===t||!t.url)return!0;var o=null==qn||null===(n=qn.location)||void 0===n?void 0:n.href;if(!o)return!1;var i,a=[e.conditions.url];return Ii[(i=null===(r=e.conditions)||void 0===r?void 0:r.urlMatchType,null!=i?i:"icontains")](a,o)}var ki,Ti,xi,Mi,Ei=0,Ni=[],Ai=[],Ri=go.__b,Oi=go.__r,Li=go.diffed,Di=go.__c,Fi=go.unmount;function Pi(e,t){go.__h&&go.__h(Ti,e,Ei||t),Ei=0;var n=Ti.__H||(Ti.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:Ai}),n.__[e]}function Bi(e){return Ei=1,function(e,t,n){var r=Pi(ki++,2);if(r.t=e,!r.__c&&(r.__=[Xi(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=Ti,!Ti.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))};Ti.u=!0;var i=Ti.shouldComponentUpdate,a=Ti.componentWillUpdate;Ti.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)},Ti.shouldComponentUpdate=o}return r.__N||r.__}(Xi,e)}function Hi(e,t){var n=Pi(ki++,3);!go.__s&&zi(n.__H,t)&&(n.__=e,n.i=t,Ti.__H.__h.push(n))}function Zi(e){return Ei=5,qi((function(){return{current:e}}),[])}function qi(e,t){var n=Pi(ki++,7);return zi(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function Wi(e){var t=Ti.context[e.__c],n=Pi(ki++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(Ti)),t.props.value):e.__}function Vi(){for(var e;e=Ni.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Gi),e.__H.__h.forEach(Ui),e.__H.__h=[]}catch(t){e.__H.__h=[],go.__e(t,e.__v)}}go.__b=function(e){Ti=null,Ri&&Ri(e)},go.__r=function(e){Oi&&Oi(e),ki=0;var t=(Ti=e.__c).__H;t&&(xi===Ti?(t.__h=[],Ti.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=Ai,e.__N=e.i=void 0}))):(t.__h.forEach(Gi),t.__h.forEach(Ui),t.__h=[],ki=0)),xi=Ti},go.diffed=function(e){Li&&Li(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==Ni.push(t)&&Mi===go.requestAnimationFrame||((Mi=go.requestAnimationFrame)||ji)(Vi)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==Ai&&(e.__=e.__V),e.i=void 0,e.__V=Ai}))),xi=Ti=null},go.__c=function(e,t){t.some((function(e){try{e.__h.forEach(Gi),e.__h=e.__h.filter((function(e){return!e.__||Ui(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],go.__e(n,e.__v)}})),Di&&Di(e,t)},go.unmount=function(e){Fi&&Fi(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{Gi(e)}catch(e){t=e}})),n.__H=void 0,t&&go.__e(t,n.__v))};var Yi="function"==typeof requestAnimationFrame;function ji(e){var t,n=function(){clearTimeout(r),Yi&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Yi&&(t=requestAnimationFrame(n))}function Gi(e){var t=Ti,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),Ti=t}function Ui(e){var t=Ti;e.__c=e.__(),Ti=t}function zi(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function Xi(e,t){return"function"==typeof t?t(e):t}var Ki=jn;var Ji=0;function Qi(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:--Ji,__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 go.vnode&&go.vnode(c),c}var $i=Qi("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Qi("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"})}),ea=Qi("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Qi("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"})}),ta=Qi("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Qi("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"})}),na=Qi("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Qi("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"})}),ra=Qi("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Qi("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"})}),oa=Qi("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Qi("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"})}),ia=Qi("svg",{width:"77",height:"14",viewBox:"0 0 77 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Qi("g",{"clip-path":"url(#clip0_2415_6911)",children:[Qi("mask",{id:"mask0_2415_6911",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"77",height:"14",children:Qi("path",{d:"M0.5 0H76.5V14H0.5V0Z",fill:"white"})}),Qi("g",{mask:"url(#mask0_2415_6911)",children:[Qi("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"}),Qi("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"}),Qi("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"}),Qi("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"}),Qi("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"}),Qi("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"})]})]}),Qi("defs",{children:Qi("clipPath",{id:"clip0_2415_6911",children:Qi("rect",{width:"76",height:"14",fill:"white",transform:"translate(0.5)"})})})]}),aa=Qi("svg",{width:"16",height:"12",viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Qi("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 sa(){return Qi("a",{href:"https://posthog.com",target:"_blank",rel:"noopener",className:"footer-branding",children:["Survey by ",ia]})}function la(e){var{text:t,submitDisabled:n,appearance:r,onSubmit:o,link:i,onPreviewSubmit:a}=e,{isPreviewMode:s,isPopup:l}=Wi(yi),c=r.submitButtonTextColor||oi(r.submitButtonColor||li.submitButtonColor);return Qi("div",{className:"bottom-section",children:[Qi("div",{className:"buttons",children:Qi("button",{className:"form-submit",disabled:n&&!s,type:"button",style:l?{color:c}:{},onClick:()=>{s?null==a||a():(i&&(null==qn||qn.open(i)),o())},children:t})}),!r.whiteLabel&&Qi(sa,{})]})}function ca(e){var{question:t,description:n,descriptionContentType:r,backgroundColor:o,forceDisableHtml:i}=e,{isPopup:a}=Wi(yi);return Qi("div",{style:a?{backgroundColor:o||li.backgroundColor}:{},children:[Qi("div",{className:"survey-question",children:t}),n&&bi({component:No("div",{className:"survey-question-description"}),children:n,renderAsHtml:!i&&"text"!==r})]})}function ua(e){var{onClick:t}=e,{isPreviewMode:n}=Wi(yi);return Qi("div",{className:"cancel-btn-wrapper",onClick:t,disabled:n,children:Qi("button",{className:"form-cancel",onClick:t,disabled:n,children:oa})})}function da(e){var{header:n,description:r,contentType:o,forceDisableHtml:i,appearance:a,onClose:s,styleOverrides:l}=e,c=oi(a.backgroundColor||li.backgroundColor),{isPopup:u}=Wi(yi);return Qi(Ro,{children:Qi("div",{className:"thank-you-message",style:t({},l),children:Qi("div",{className:"thank-you-message-container",children:[u&&Qi(ua,{onClick:()=>s()}),Qi("h3",{className:"thank-you-message-header",style:{color:c},children:n}),r&&bi({component:No("div",{className:"thank-you-message-body"}),children:r,renderAsHtml:!i&&"text"!==o,style:{color:c}}),u&&Qi(la,{text:a.thankYouMessageCloseButtonText||"Close",submitDisabled:!1,appearance:a,onSubmit:()=>s()})]})})})}function pa(e){var t,n=Zi(null),[r,o]=Bi(null!==(t=e.defaultTextColor)&&void 0!==t?t:"black");return Hi((()=>{if(n.current){var e=function(e){var t=Qo.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 ha(e){var{question:t,forceDisableHtml:n,appearance:r,onSubmit:o,onPreviewSubmit:i}=e,a=Zi(null),[s,l]=Bi("");return Qi("div",{ref:a,children:[Qi(ca,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,backgroundColor:r.backgroundColor,forceDisableHtml:n}),Qi("textarea",{rows:4,placeholder:null==r?void 0:r.placeholder,onInput:e=>l(e.currentTarget.value)}),Qi(la,{text:t.buttonText||"Submit",submitDisabled:!s&&!t.optional,appearance:r,onSubmit:()=>o(s),onPreviewSubmit:()=>i(s)})]})}function fa(e){var{question:t,forceDisableHtml:n,appearance:r,onSubmit:o,onPreviewSubmit:i}=e;return Qi(Ro,{children:[Qi(ca,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,forceDisableHtml:n}),Qi(la,{text:t.buttonText||"Submit",submitDisabled:!1,link:t.link,appearance:r,onSubmit:()=>o("link clicked"),onPreviewSubmit:()=>i("link clicked")})]})}function ma(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]=Bi(null);return Qi(Ro,{children:[Qi(ca,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,forceDisableHtml:n,backgroundColor:o.backgroundColor}),Qi("div",{className:"rating-section",children:[Qi("div",{className:"rating-options",children:["emoji"===t.display&&Qi("div",{className:"rating-options-emoji",children:(3===t.scale?ya:ba).map(((e,t)=>{var n=t+1===c;return Qi("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&&Qi("div",{className:"rating-options-number",style:{gridTemplateColumns:"repeat(".concat(s-l+1,", minmax(0, 1fr))")},children:Ia(t.scale).map(((e,t)=>Qi(va,{displayQuestionIndex:r,active:c===e,appearance:o,num:e,setActiveNumber:e=>{u(e)}},t)))})]}),Qi("div",{className:"rating-text",children:[Qi("div",{children:t.lowerBoundLabel}),Qi("div",{children:t.upperBoundLabel})]})]}),Qi(la,{text:t.buttonText||(null==o?void 0:o.submitButtonText)||"Submit",submitDisabled:br(c)&&!t.optional,appearance:o,onSubmit:()=>i(c),onPreviewSubmit:()=>a(c)})]})}function va(e){var{num:t,active:n,displayQuestionIndex:r,appearance:o,setActiveNumber:i}=e,{textColor:a,ref:s}=pa({appearance:o,defaultTextColor:"black",forceUpdate:n});return Qi("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 ga(e){var{question:t,forceDisableHtml:n,displayQuestionIndex:r,appearance:o,onSubmit:i,onPreviewSubmit:a}=e,s=Zi(null),l=qi((()=>(e=>{if(!e.shuffleOptions)return e.choices;var t=e.choices,n="";e.hasOpenChoice&&(n=t.pop());var r=hi(t,pi(t));return e.hasOpenChoice&&(e.choices.push(n),r.push(n)),r})(t)),[t]),[c,u]=Bi(t.type===ai.MultipleChoice?[]:null),[d,p]=Bi(!1),[h,f]=Bi(""),m=t.type===ai.SingleChoice?"radio":"checkbox";return Qi("div",{ref:s,children:[Qi(ca,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,forceDisableHtml:n,backgroundColor:o.backgroundColor}),Qi("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"),Qi("div",{className:o,children:[Qi("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===ai.SingleChoice?u(i):t.type===ai.MultipleChoice&&dr(c)?c.includes(i)?u(c.filter((e=>e!==i))):u([...c,i]):void 0}),Qi("label",{htmlFor:"surveyQuestion".concat(r,"Choice").concat(n),style:{color:"black"},children:t.hasOpenChoice&&n===t.choices.length-1?Qi(Ro,{children:[Qi("span",{children:[a,":"]}),Qi("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===ai.SingleChoice?u(n):t.type===ai.MultipleChoice&&dr(c)?f(n):void 0}})]}):a}),Qi("span",{className:"choice-check",style:{color:"black"},children:aa})]})}))}),Qi(la,{text:t.buttonText||"Submit",submitDisabled:(br(c)||dr(c)&&!d&&0===c.length||dr(c)&&d&&!h&&0===c.length&&!t.optional)&&!t.optional,appearance:o,onSubmit:()=>{d&&t.type===ai.MultipleChoice?dr(c)&&i([...c,h]):i(c)},onPreviewSubmit:()=>{d&&t.type===ai.MultipleChoice?dr(c)&&a([...c,h]):a(c)}})]})}var ya=[ta,ea,$i],ba=[na,ta,ea,$i,ra],_a=[1,2,3,4,5],Ca=[1,2,3,4,5,6,7],Sa=[0,1,2,3,4,5,6,7,8,9,10];function Ia(e){switch(e){case 5:default:return _a;case 7:return Ca;case 10:return Sa}}var wa=Jn("[Surveys]"),ka=qn,Ta=jn;class xa{constructor(e){var t=this;o(this,"canShowNextEventBasedSurvey",(()=>{var e,t=Ta.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(vi(e))&&!mi(e))(e);if(!a){this.addSurveyToFocus(e.id);var s=((e,t,n)=>{var r=$o.createElement("div");r.className="PostHogSurvey".concat(t);var o=r.attachShadow({mode:"open"});if(e){var i=Object.assign($o.createElement("style"),{innerText:e});o.appendChild(i)}return $o.body.appendChild(r),o})(ni(null==e?void 0:e.appearance),e.id);Ko(Qi(Ea,{posthog:this.posthog,survey:e,removeSurveyFromFocus:this.removeSurveyFromFocus,isPopup:!0},"popover-survey"),s)}})),o(this,"handleWidget",(e=>{var t=function(e){var t,n=Ki.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(Ki.createElement("style"),{innerText:i})),Ki.body.appendChild(n),o}(e),n=ni(e.appearance);t.appendChild(Object.assign(Ta.createElement("style"),{innerText:n})),Ko(Qi(Aa,{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)&&Ta.querySelector(e.appearance.widgetSelector);if(n)if(0===Ta.querySelectorAll(".PostHogWidget".concat(e.id)).length)this.handleWidget(e);else if(1===Ta.querySelectorAll(".PostHogWidget".concat(e.id)).length&&!n.getAttribute("PHWidgetSurveyClickListener")){var r,o,i=null===(r=Ta.querySelector(".PostHogWidget".concat(e.id)))||void 0===r||null===(o=r.shadowRoot)||void 0===o?void 0:o.querySelector(".survey-form");rr(n,"click",(()=>{i&&(i.style.display="none"===i.style.display?"block":"none",rr(i,"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!=ii.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)=>{Ko(Qi(Ea,{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(br(t.surveyInFocus)&&wi(e)){var n,r,o;if(e.type===ii.Widget)"tab"===(null===(n=e.appearance)||void 0===n?void 0:n.widgetType)&&0===Ta.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===ii.Popover&&t.canShowNextEventBasedSurvey()&&t.handlePopoverSurvey(e)}}))}),n)})),o(this,"addSurveyToFocus",(e=>{br(this.surveyInFocus)||wa.error("Survey ".concat([...this.surveyInFocus]," already in focus. Cannot add survey ").concat(e,".")),this.surveyInFocus=e})),o(this,"removeSurveyFromFocus",(e=>{this.surveyInFocus!==e&&wa.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 Ma(e){if(Ta&&ka){var t=new xa(e);return t.callSurveysAndEvaluateDisplayLogic(!0),setInterval((()=>{t.callSurveysAndEvaluateDisplayLogic(!1)}),1e3),t}}function Ea(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]=Bi(r||0===n),[s,l]=Bi(!1);return Hi((()=>{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),ka.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 rr(ka,"PHSurveyClosed",s),rr(ka,"PHSurveySent",c),n>0?(i=setTimeout((()=>{u()}),n),()=>{clearTimeout(i),ka.removeEventListener("PHSurveyClosed",s),ka.removeEventListener("PHSurveySent",c)}):(u(),()=>{ka.removeEventListener("PHSurveyClosed",s),ka.removeEventListener("PHSurveySent",c)})}}else wa.error("usePopupVisibility hook called without a PostHog instance.")}),[]),Hi((()=>{var t;if(!r&&null!==(t=e.conditions)&&void 0!==t&&t.url){var n=()=>{wi(e)||(a(!1),o(e.id))};rr(ka,"popstate",n),rr(ka,"hashchange",n);var i=ka.history.pushState,s=ka.history.replaceState;return ka.history.pushState=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];i.apply(this,t),n()},ka.history.replaceState=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];s.apply(this,t),n()},()=>{ka.removeEventListener("popstate",n),ka.removeEventListener("hashchange",n),ka.history.pushState=i,ka.history.replaceState=s}}}),[r,e,o]),{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&&Cr(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?Qi(yi.Provider,{value:{isPreviewMode:v,previewPageIndex:p,handleCloseSurveyPopup:()=>di(l,u,v),isPopup:f||!1,onPreviewSubmit:m},children:C?Qi(da,{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||li,styleOverrides:t(t({},d),S),onClose:()=>_(!1)}):Qi(Na,{survey:l,forceDisableHtml:!!c,posthog:u,styleOverrides:d})}):null}function Na(e){var n,r,{survey:o,forceDisableHtml:i,posthog:a,styleOverrides:s}=e,l=oi((null===(n=o.appearance)||void 0===n?void 0:n.backgroundColor)||li.backgroundColor),[c,u]=Bi({}),{isPreviewMode:d,previewPageIndex:p,handleCloseSurveyPopup:h,isPopup:f,onPreviewSubmit:m}=Wi(yi),[v,g]=Bi(p||0),y=qi((()=>fi(o)),[o]);Hi((()=>{g(null!=p?p:0)}),[p]);return Qi("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)&&Qi("div",{className:"survey-box",style:f?{backgroundColor:(null===(r=o.appearance)||void 0===r?void 0:r.backgroundColor)||li.backgroundColor}:{},children:[f&&Qi(ua,{onClick:()=>h()}),Ra({question:e,forceDisableHtml:i,displayQuestionIndex:n,appearance:o.appearance||li,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===si.End?ui(t(t({},c),{},{[s]:n}),o,a):g(l)}else i===o.questions.length-1?ui(t(t({},c),{},{[s]:n}),o,a):g(i+1)}else wa.error("onNextButtonClick called without a PostHog instance.")})({res:e,originalQuestionIndex:s,displayQuestionIndex:n}),onPreviewSubmit:m})]})}))})}function Aa(e){var t,n,{survey:r,forceDisableHtml:o,posthog:i,readOnly:a,removeSurveyFromFocus:s}=e,[l,c]=Bi(!1),[u,d]=Bi({}),p=Zi(null);return Hi((()=>{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,h=null!==(u=Ta.querySelector(r.appearance.widgetSelector||""))&&void 0!==u?u:void 0;rr(h,"click",(()=>{c(!l)})),null==h||h.setAttribute("PHWidgetSurveyClickListener","true")}}}else wa.error("FeedbackWidget called without a PostHog instance.")}),[]),Qi(Ro,{children:["tab"===(null===(t=r.appearance)||void 0===t?void 0:t.widgetType)&&Qi("div",{className:"ph-survey-widget-tab",ref:p,onClick:()=>!a&&c(!l),style:{color:oi(r.appearance.widgetColor)},children:[Qi("div",{className:"ph-survey-widget-tab-icon"}),(null===(n=r.appearance)||void 0===n?void 0:n.widgetLabel)||""]}),l&&Qi(Ea,{posthog:i,survey:r,forceDisableHtml:o,style:u,removeSurveyFromFocus:s,isPopup:!0},"feedback-widget-survey")]})}var Ra=e=>{var{question:n,forceDisableHtml:r,displayQuestionIndex:o,appearance:i,onSubmit:a,onPreviewSubmit:s}=e,l={[ai.Open]:ha,[ai.Link]:fa,[ai.Rating]:ma,[ai.SingleChoice]:ga,[ai.MultipleChoice]:ga},c={question:n,forceDisableHtml:r,appearance:i,onPreviewSubmit:e=>{s(e)},onSubmit:e=>{a(e)}},u={[ai.Open]:{},[ai.Link]:{},[ai.Rating]:{displayQuestionIndex:o},[ai.SingleChoice]:{displayQuestionIndex:o},[ai.MultipleChoice]:{displayQuestionIndex:o}},d=l[n.type],p=t(t({},c),u[n.type]);return Qi(d,t({},p))};function Oa(e){return!vr(Event)&&La(e,Event)}function La(e,t){try{return e instanceof t}catch(e){return!1}}function Da(e){return br(e)||!mr(e)&&!pr(e)}function Fa(e,t){return Object.prototype.toString.call(e)==="[object ".concat(t,"]")}function Pa(e){return Fa(e,"DOMError")}Un.__PosthogExtensions__=Un.__PosthogExtensions__||{},Un.__PosthogExtensions__.canActivateRepeatedly=mi,Un.__PosthogExtensions__.generateSurveys=Ma,Un.extendPostHogWithSurveys=Ma;var Ba=/\(error: (.*)\)/,Ha=50,Za="?";function qa(e,t,n,r){var o={platform:"web:javascript",filename:e,function:"<anonymous>"===t?Za:t,in_app:!0};return vr(n)||(o.lineno=n),vr(r)||(o.colno=r),o}var Wa=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Va=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Ya=/\((\S*)(?::(\d+))(?::(\d+))\)/,ja=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Ga=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Ua=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=Ba.test(s)?s.replace(Ba,"$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>=Ha)break}}}return function(e){if(!e.length)return[];var n=Array.from(e);return n.reverse(),n.slice(0,Ha).map((e=>t(t({},e),{},{filename:e.filename||za(n).filename,function:e.function||Za})))}(r)}}(...[[30,e=>{var t=Wa.exec(e);if(t){var[,n,r,o]=t;return qa(n,Za,+r,+o)}var i=Va.exec(e);if(i){if(i[2]&&0===i[2].indexOf("eval")){var a=Ya.exec(i[2]);a&&(i[2]=a[1],i[3]=a[2],i[4]=a[3])}var[s,l]=Xa(i[1]||Za,i[2]);return qa(l,s,i[3]?+i[3]:void 0,i[4]?+i[4]:void 0)}}],[50,e=>{var t=ja.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){var n=Ga.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]||Za;return[o,r]=Xa(o,r),qa(r,o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]);function za(e){return e[e.length-1]||{}}var Xa=(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]:Za,n?"safari-extension:".concat(t):"safari-web-extension:".concat(t)]:[e,t]},Ka=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;function Ja(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e.stacktrace||e.stack||"",r=function(e){if(e&&Qa.test(e.message))return 1;return 0}(e);try{var o=Ua(n,r);return o.slice(0,o.length-t)}catch(e){}return[]}var Qa=/Minified React error #\d+;/i;function $a(e,t){var n,r,o=Ja(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 es(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=Ja(t.syntheticException,1);l.length&&(s.stacktrace={frames:l,type:"raw"})}return{$exception_list:[s],$exception_level:"error"}}function ts(e){return gr(e)&&!yr(e)&&zn.indexOf(e)>=0}function ns(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=Ja(null==t?void 0:t.syntheticException,1);c.length&&(l.stacktrace={frames:c,type:"raw"})}return{$exception_list:[l],$exception_level:ts(e.level)?e.level:"error"}}function rs(e,n){var{error:r,event:o}=e,i={$exception_list:[]},a=r||o;if(Pa(a)||function(e){return Fa(e,"DOMException")}(a)){var s=a;if(function(e){return"stack"in e}(a))i=$a(a,n);else{var l=s.name||(Pa(s)?"DOMError":"DOMException"),c=s.message?"".concat(l,": ").concat(s.message):l,u=Pa(s)?"DOMError":"DOMException";i=es(c,t(t({},n),{},{overrideExceptionType:u,defaultExceptionMessage:c}))}return"code"in s&&(i.$exception_DOMException_code="".concat(s.code)),i}if(function(e){return Fa(e,"ErrorEvent")}(a)&&a.error)return $a(a.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 La(e,Error)}}(a))return $a(a,n);if(function(e){return Fa(e,"Object")}(a)||Oa(a))return ns(a,n);if(vr(r)&&gr(o)){var d="Error",p=o,h=o.match(Ka);return h&&(d=h[1],p=h[2]),es(p,t(t({},n),{},{overrideExceptionType:d,defaultExceptionMessage:p}))}return es(a,n)}function os(e){var[t]=e,n=function(e){if(Da(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 Da(n)?es("Non-Error promise rejection captured with value: ".concat(String(n)),{handled:!1,synthetic:!1,overrideExceptionType:"UnhandledRejection"}):rs({event:n},{handled:!1,overrideExceptionType:"UnhandledRejection",defaultExceptionMessage:String(n)})}var is=Jn("[ExceptionAutocapture]"),as={wrapOnError:e=>{var t=qn;t||is.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=rs({event:o[0],error:o[4]});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=qn;t||is.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=os(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}}};Un.__PosthogExtensions__=Un.__PosthogExtensions__||{},Un.__PosthogExtensions__.errorWrappingFunctions=as,Un.__PosthogExtensions__.parseErrorAsProperties=rs,Un.posthogErrorWrappingFunctions=as,Un.parseErrorAsProperties=rs;var ss=(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)}};Un.__PosthogExtensions__=Un.__PosthogExtensions__||{};var ls={_patchFetch:e=>zr(qn,"fetch",(t=>function(){var n=r((function*(n,r){var o=new Request(n,r);return ss(e,o),t(o)}));return function(e,t){return n.apply(this,arguments)}}())),_patchXHR:e=>zr(qn.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 ss(e,s),t.call(this,n,s.url,o,i,a)}))};Un.__PosthogExtensions__.tracingHeadersPatchFns=ls,Un.postHogTracingHeadersPatchFns=ls;var cs,us,ds,ps=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},hs=function(e){if("loading"===document.readyState)return"loading";var t=ps();if(t){if(e<t.domInteractive)return"loading";if(0===t.domContentLoadedEventStart||e<t.domContentLoadedEventStart)return"dom-interactive";if(0===t.domComplete||e<t.domComplete)return"dom-content-loaded"}return"complete"},fs=function(e){var t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},ms=function(e,t){var n="";try{for(;e&&9!==e.nodeType;){var r=e,o=r.id?"#"+r.id:fs(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},vs=-1,gs=function(){return vs},ys=function(e){addEventListener("pageshow",(function(t){t.persisted&&(vs=t.timeStamp,e(t))}),!0)},bs=function(){var e=ps();return e&&e.activationStart||0},_s=function(e,t){var n=ps(),r="navigate";return gs()>=0?r="back-forward-cache":n&&(document.prerendering||bs()>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}},Cs=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){}},Ss=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))}},Is=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},ws=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},ks=function(e){var t=!1;return function(){t||(e(),t=!0)}},Ts=-1,xs=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},Ms=function(e){"hidden"===document.visibilityState&&Ts>-1&&(Ts="visibilitychange"===e.type?e.timeStamp:0,Ns())},Es=function(){addEventListener("visibilitychange",Ms,!0),addEventListener("prerenderingchange",Ms,!0)},Ns=function(){removeEventListener("visibilitychange",Ms,!0),removeEventListener("prerenderingchange",Ms,!0)},As=function(){return Ts<0&&(Ts=xs(),Es(),ys((function(){setTimeout((function(){Ts=xs(),Es()}),0)}))),{get firstHiddenTime(){return Ts}}},Rs=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},Os=[1800,3e3],Ls=function(e,t){t=t||{},Rs((function(){var n,r=As(),o=_s("FCP"),i=Cs("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(i.disconnect(),e.startTime<r.firstHiddenTime&&(o.value=Math.max(e.startTime-bs(),0),o.entries.push(e),n(!0)))}))}));i&&(n=Ss(e,o,Os,t.reportAllChanges),ys((function(r){o=_s("FCP"),n=Ss(e,o,Os,t.reportAllChanges),Is((function(){o.value=performance.now()-r.timeStamp,n(!0)}))})))}))},Ds=[.1,.25],Fs=0,Ps=1/0,Bs=0,Hs=function(e){e.forEach((function(e){e.interactionId&&(Ps=Math.min(Ps,e.interactionId),Bs=Math.max(Bs,e.interactionId),Fs=Bs?(Bs-Ps)/7+1:0)}))},Zs=function(){"interactionCount"in performance||cs||(cs=Cs("event",Hs,{type:"event",buffered:!0,durationThreshold:0}))},qs=[],Ws=new Map,Vs=0,Ys=function(){return(cs?Fs:performance.interactionCount||0)-Vs},js=[],Gs=function(e){if(js.forEach((function(t){return t(e)})),e.interactionId||"first-input"===e.entryType){var t=qs[qs.length-1],n=Ws.get(e.interactionId);if(n||qs.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]};Ws.set(r.id,r),qs.push(r)}qs.sort((function(e,t){return t.latency-e.latency})),qs.length>10&&qs.splice(10).forEach((function(e){return Ws.delete(e.id)}))}}},Us=function(e){var t=self.requestIdleCallback||self.setTimeout,n=-1;return e=ks(e),"hidden"===document.visibilityState?e():(n=t(e),ws(e)),n},zs=[200,500],Xs=[],Ks=[],Js=new WeakMap,Qs=new Map,$s=-1,el=function(e){Xs=Xs.concat(e),tl()},tl=function(){$s<0&&($s=Us(nl))},nl=function(){Qs.size>10&&Qs.forEach((function(e,t){Ws.has(t)||Qs.delete(t)}));var e=qs.map((function(e){return Js.get(e.entries[0])})),t=Ks.length-50;Ks=Ks.filter((function(n,r){return r>=t||e.includes(n)}));for(var n=new Set,r=0;r<Ks.length;r++){var o=Ks[r];rl(o.startTime,o.processingEnd).forEach((function(e){n.add(e)}))}for(var i=0;i<50;i++){var a=Xs[Xs.length-1-i];if(!a||a.startTime<ds)break;n.add(a)}Xs=Array.from(n),$s=-1};js.push((function(e){e.interactionId&&e.target&&!Qs.has(e.interactionId)&&Qs.set(e.interactionId,e.target)}),(function(e){var t,n=e.startTime+e.duration;ds=Math.max(ds,e.processingEnd);for(var r=Ks.length-1;r>=0;r--){var o=Ks[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]},Ks.push(t)),(e.interactionId||"first-input"===e.entryType)&&Js.set(e,t),tl()}));var rl=function(e,t){for(var n,r=[],o=0;n=Xs[o];o++)if(!(n.startTime+n.duration<e)){if(n.startTime>t)break;r.push(n)}return r},ol=[2500,4e3],il={},al={onLCP:function(e,t){!function(e,t){t=t||{},Rs((function(){var n,r=As(),o=_s("LCP"),i=function(e){t.reportAllChanges||(e=e.slice(-1)),e.forEach((function(e){e.startTime<r.firstHiddenTime&&(o.value=Math.max(e.startTime-bs(),0),o.entries=[e],n())}))},a=Cs("largest-contentful-paint",i);if(a){n=Ss(e,o,ol,t.reportAllChanges);var s=ks((function(){il[o.id]||(i(a.takeRecords()),a.disconnect(),il[o.id]=!0,n(!0))}));["keydown","click"].forEach((function(e){addEventListener(e,(function(){return Us(s)}),!0)})),ws(s),ys((function(r){o=_s("LCP"),n=Ss(e,o,ol,t.reportAllChanges),Is((function(){o.value=performance.now()-r.timeStamp,il[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=ps();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:ms(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||{},Ls(ks((function(){var n,r=_s("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=Cs("layout-shift",a);s&&(n=Ss(e,r,Ds,t.reportAllChanges),ws((function(){a(s.takeRecords()),n(!0)})),ys((function(){o=0,r=_s("CLS",0),n=Ss(e,r,Ds,t.reportAllChanges),Is((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:ms(o.node),largestShiftTime:r.startTime,largestShiftValue:r.value,largestShiftSource:o,largestShiftEntry:r,loadState:hs(r.startTime)})}}return Object.assign(e,{attribution:n})}(t);e(n)}),t)},onFCP:function(e,t){Ls((function(t){var n=function(e){var t={timeToFirstByte:0,firstByteToFCP:e.value,loadState:hs(gs())};if(e.entries.length){var n=ps(),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:hs(e.entries[0].startTime),navigationEntry:n,fcpEntry:r}}}return Object.assign(e,{attribution:t})}(t);e(n)}),t)},onINP:function(e,t){us||(us=Cs("long-animation-frame",el)),function(e,t){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(t=t||{},Rs((function(){var n;Zs();var r,o=_s("INP"),i=function(e){Us((function(){e.forEach(Gs);var t,n=(t=Math.min(qs.length-1,Math.floor(Ys()/50)),qs[t]);n&&n.latency!==o.value&&(o.value=n.latency,o.entries=n.entries,r())}))},a=Cs("event",i,{durationThreshold:null!==(n=t.durationThreshold)&&void 0!==n?n:40});r=Ss(e,o,zs,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),ws((function(){i(a.takeRecords()),r(!0)})),ys((function(){Vs=0,qs.length=0,Ws.clear(),o=_s("INP"),r=Ss(e,o,zs,t.reportAllChanges)})))})))}((function(t){var n=function(e){var t=e.entries[0],n=Js.get(t),r=t.processingStart,o=n.processingEnd,i=n.entries.sort((function(e,t){return e.processingStart-t.processingStart})),a=rl(t.startTime,o),s=e.entries.find((function(e){return e.target})),l=s&&s.target||Qs.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:ms(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:hs(t.startTime)};return Object.assign(e,{attribution:d})}(t);e(n)}),t)}};function sl(e,t){return t.length>e?t.slice(0,e)+"...":t}function ll(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do{t=t.previousSibling}while(t&&!xr(t));return t}function cl(e,t,n,r){var o=e.tagName.toLowerCase(),i={tag_name:o};Rr.indexOf(o)>-1&&!n&&("a"===o.toLowerCase()||"button"===o.toLowerCase()?i.$el_text=sl(1024,Wr(e)):i.$el_text=sl(1024,Ar(e)));var a=Nr(e);a.length>0&&(i.classes=a.filter((function(e){return""!==e}))),er(e.attributes,(function(n){var o;if((!Lr(e)||-1!==["name","id","class","aria-label"].indexOf(n.name))&&((null==r||!r.includes(n.name))&&!t&&qr(n.value)&&(o=n.name,!gr(o)||"_ngcontent"!==o.substring(0,10)&&"_nghost"!==o.substring(0,7)))){var a=n.value;"class"===n.name&&(a=Er(a).join(" ")),i["attr__"+n.name]=sl(1024,a)}}));for(var s=1,l=1,c=e;c=ll(c);)s++,c.tagName===e.tagName&&l++;return i.nth_child=s,i.nth_of_type=l,i}function ul(e,t){for(var n,r,o,{e:i,maskAllElementAttributes:a,maskAllText:s,elementAttributeIgnoreList:l,elementsChainAsString:c}=t,u=[e],d=e;d.parentNode&&!Mr(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(er(u,(e=>{var t=Or(e);"a"===e.tagName.toLowerCase()&&(g=e.getAttribute("href"),g=t&&g&&qr(g)&&g),or(Nr(e),"ph-no-capture")&&(y=!0),m.push(cl(e,a,s,l));var n=function(e){if(!Or(e))return{};var t={};return er(e.attributes,(function(e){if(e.name&&0===e.name.indexOf("data-ph-capture-attribute")){var n=e.name.replace("data-ph-capture-attribute-",""),r=e.value;n&&r&&qr(r)&&(t[n]=r)}})),t}(e);tr(v,n)})),y)return{props:{},explicitNoCapture:y};if(s||("a"===e.tagName.toLowerCase()||"button"===e.tagName.toLowerCase()?m[0].$el_text=Wr(e):m[0].$el_text=Ar(e)),g){var b,_;m[0].attr__href=g;var C=null===(h=g,f=null==jn?void 0:jn.createElement("a"),b=vr(f)?null:(f.href=h,f))||void 0===b?void 0:b.host,S=null==qn||null===(_=qn.location)||void 0===_?void 0:_.host;C&&S&&C!==S&&(p=g)}return{props:tr({$event_type:i.type,$ce_version:1},c?{}:{$elements:m},{$elements_chain:Yr(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)}}Un.__PosthogExtensions__=Un.__PosthogExtensions__||{},Un.__PosthogExtensions__.postHogWebVitalsCallbacks=al,Un.postHogWebVitalsCallbacks=al;var dl={};function pl(e){return function(e,t){var n=dl[e];if(n)return n;var r=t[e];if(hr(r)&&!fr())return dl[e]=r.bind(t);var o=t.document;if(o&&pr(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){Kn.warn("Could not create sandbox iframe for ".concat(e," check, bailing to assignableWindow.").concat(e,": "),t)}return r&&pr(r)?dl[e]=r.bind(t):r}("MutationObserver",e)}function hl(e){var t=function(e){return vr(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 fl(e,t){return Cr(e)&&e>=t}class ml{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=hl(e);br(t)||this._ignoreClick(t)||this._clicks.push(t),this._clicks.length&&vr(this._checkClickTimer)&&(this._checkClickTimer=Un.setTimeout((()=>{this._checkClicks()}),1e3))})),o(this,"_onScroll",(()=>{var e=Date.now();e%50==0&&this._clicks.forEach((t=>{vr(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=pl(Un);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,Un.removeEventListener("click",this._onClick),Un.removeEventListener("scroll",this._onScroll,{capture:!0}),Un.removeEventListener("selectionchange",this._onSelectionChange)}onMutation(e){this._lastMutation=Date.now()}_startClickObserver(){rr(Un,"click",this._onClick)}_startScrollObserver(){rr(Un,"scroll",this._onScroll,{capture:!0})}_startSelectionChangedObserver(){rr(Un,"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||!(!Mr(e.node,"html")&&xr(e.node)&&!Rr.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=fl(t.scrollDelayMs,this._config.scroll_threshold_ms),o=fl(t.selectionChangedDelayMs,this._config.selection_change_threshold_ms),i=fl(t.mutationDelayMs,this._config.mutation_threshold_ms),a=fl(t.absoluteDelayMs,1.1*this._config.mutation_threshold_ms),s=Cr(t.scrollDelayMs)&&t.scrollDelayMs<this._config.scroll_threshold_ms,l=Cr(t.mutationDelayMs)&&t.mutationDelayMs<this._config.mutation_threshold_ms,c=Cr(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&&vr(this._checkClickTimer)&&(this._checkClickTimer=Un.setTimeout((()=>{this._checkClicks()}),1e3))}}_captureDeadClick(e,n){this.instance.capture("$dead_click",t(t(t({},n),ul(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)})}}Un.__PosthogExtensions__=Un.__PosthogExtensions__||{},Un.__PosthogExtensions__.initDeadClicksAutocapture=(e,t)=>new ml(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=Array.from(t,(t=>T(t,e.href))).join("");return(r=n).includes(" background-clip: text;")&&!r.includes(" -webkit-background-clip: text;")&&(r=r.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),r}catch(e){return null}var r}function 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 E(e){var{element:t,maskInputOptions:n,tagName:r,type:o,value:i,maskInputFn:a}=e,s=i||"",l=o&&N(o);return(n[r.toLowerCase()]||l&&n[l])&&(s=a?a(s,t):"*".repeat(s.length)),s}function N(e){return e.toLowerCase()}var A="__rrweb_original__";function R(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?N(t):null}function O(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,Z,q=1,W=new RegExp("[^a-z0-9-_:]"),V=-2;function Y(){return q++}var j=/^[^ \t\n\r\u000c]+/,G=/^[, \t\n\r\u000c]+/;var U=new WeakMap;function z(e,t){return t&&""!==t.trim()?K(e,t):t}function X(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function K(e,t){var n=U.get(e);if(n||(n=e.createElement("a"),U.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function J(e,t,n,r){return r?"src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?z(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(G),!(n>=t.length);){var i=r(j);if(","===i.slice(-1))i=z(e,i.substring(0,i.length-1)),o.push(i);else{var a="";i=z(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,K(e)):"object"===t&&"data"===n?z(e,r):r:z(e,r):r}function Q(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function $(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&$(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&&$(C.parentNode(e),t,n)}function ee(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($(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 te(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}=t,g=function(e,t){if(!t.hasNode(e))return;var n=t.getId(e);return 1===n?void 0:n}(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type: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:g};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=N(e.tagName);return W.test(t)?"div":t}(e),y={},b=e.attributes.length,_=0;_<b;_++){var S=e.attributes[_];Q(g,S.name,S.value)||(y[S.name]=J(r,g,N(S.name),S.value))}if("link"===g&&a){var I=function(e){return null==e?void 0:e.href}(e);if(I){var w=x(r,I);if(!w&&I.includes(".css"))w=x(r,window.location.origin+"/"+I.replace(window.location.href,""));var T=null;w&&(T=k(w)),T&&(delete y.rel,delete y.href,y._cssText=T)}}if("style"===g&&e.sheet&&!(e.innerText||C.textContent(e)||"").trim().length){var M=k(e.sheet);M&&(y._cssText=M)}if("input"===g||"textarea"===g||"select"===g){var O=e.value,L=e.checked;"radio"!==y.type&&"checkbox"!==y.type&&"submit"!==y.type&&"button"!==y.type&&O?y.value=E({element:e,type:R(e),tagName:g,value:O,maskInputOptions:s,maskInputFn:l}):L&&(y.checked=L)}"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 D=e.toDataURL(c.type,c.quality),F=r.createElement("canvas");F.width=e.width,F.height=e.height,D!==F.toDataURL(c.type,c.quality)&&(y.rr_dataURL=D)}if("img"===g&&u){H||(H=r.createElement("canvas"),Z=H.getContext("2d"));var P=e,B=P.currentSrc||P.getAttribute("src")||"<unknown-src>",q=P.crossOrigin,V=()=>{P.removeEventListener("load",V);try{H.width=P.naturalWidth,H.height=P.naturalHeight,Z.drawImage(P,0,0),y.rr_dataURL=H.toDataURL(c.type,c.quality)}catch(e){if("anonymous"!==P.crossOrigin)return P.crossOrigin="anonymous",void(P.complete&&0!==P.naturalWidth?V():P.addEventListener("load",V));console.warn("Cannot inline img src=".concat(B,"! Error: ").concat(e))}"anonymous"===P.crossOrigin&&(q?y.crossOrigin=q:P.removeAttribute("crossorigin"))};P.complete&&0!==P.naturalWidth?V():P.addEventListener("load",V)}if("audio"===g||"video"===g){var Y=y;Y.rr_mediaState=e.paused?"paused":"played",Y.rr_mediaCurrentTime=e.currentTime,Y.rr_mediaPlaybackRate=e.playbackRate,Y.rr_mediaMuted=e.muted,Y.rr_mediaLoop=e.loop,Y.rr_mediaVolume=e.volume}f||(e.scrollLeft&&(y.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(y.rr_scrollTop=e.scrollTop));if(v){var{width:j,height:G}=e.getBoundingClientRect();y={class:y.class,rr_width:"".concat(j,"px"),rr_height:"".concat(G,"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:X(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:g});case e.TEXT_NODE:return function(e,t){var n,{needsMask:r,maskTextFn:o,rootId:i}=t,a=C.parentNode(e),s=a&&a.tagName,l=C.textContent(e),c="STYLE"===s||void 0,u="SCRIPT"===s||void 0;if(c&&l){try{e.nextSibling||e.previousSibling||(null==(n=a.sheet)?void 0:n.cssRules)&&(l=k(a.sheet))}catch(t){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(t),e)}l=B(l,K(t.doc))}u&&(l="SCRIPT_PLACEHOLDER");!c&&!u&&l&&r&&(l=o?o(l,C.parentElement(e)):l.replace(/[\S]/g,"*"));return{type:p.Text,textContent:l||"",isStyle:c,rootId:i}}(e,{doc:n,needsMask:a,maskTextFn:c,rootId:g});case e.CDATA_SECTION_NODE:return{type:p.CDATA,textContent:"",rootId:g};case e.COMMENT_NODE:return{type:p.Comment,textContent:C.textContent(e)||"",rootId:g};default:return!1}}function ne(e){return null==e?"":e.toLowerCase()}function re(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}=t,{needsMask:E}=t,{preserveWhiteSpace:N=!0}=t;E||(E=ee(e,a,s,void 0===E));var A,R=te(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});if(!R)return console.warn(e,"not serialized"),null;A=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"===O(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(ne(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===ne(e.attributes.name)||"icon"===ne(e.attributes.rel)||"apple-touch-icon"===ne(e.attributes.rel)||"shortcut icon"===ne(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&ne(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(ne(e.attributes.property).match(/^(og|twitter|fb):/)||ne(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===ne(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===ne(e.attributes.name)||"googlebot"===ne(e.attributes.name)||"bingbot"===ne(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===ne(e.attributes.name)||"generator"===ne(e.attributes.name)||"framework"===ne(e.attributes.name)||"publisher"===ne(e.attributes.name)||"progid"===ne(e.attributes.name)||ne(e.attributes.property).match(/^article:/)||ne(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===ne(e.attributes.name)||"yandex-verification"===ne(e.attributes.name)||"csrf-token"===ne(e.attributes.name)||"p:domain_verify"===ne(e.attributes.name)||"verify-v1"===ne(e.attributes.name)||"verification"===ne(e.attributes.name)||"shopify-checkout-api-token"===ne(e.attributes.name)))return!0}}return!1}(R,f)&&(N||R.type!==p.Text||R.isStyle||R.textContent.replace(/^\s+|\s+$/gm,"").length)?Y():V;var L=Object.assign(R,{id:A});if(r.add(e,L),A===V)return null;y&&y(e);var D=!l;if(L.type===p.Element){D=D&&!L.needBlock,delete L.needBlock;var F=C.shadowRoot(e);F&&w(F)&&(L.isShadowHost=!0)}if((L.type===p.Document||L.type===p.Element)&&D){f.headWhitespace&&L.type===p.Element&&"head"===L.tagName&&(N=!1);var P={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:N,onSerialize:y,onIframeLoad:b,iframeLoadTimeout:_,onStylesheetLoad:k,stylesheetLoadTimeout:T,keepIframeSrcFn:x};if(L.type===p.Element&&"textarea"===L.tagName&&void 0!==L.attributes.value);else for(var B of Array.from(C.childNodes(e))){var H=re(B,P);H&&L.childNodes.push(H)}var Z=null;if(S(e)&&(Z=C.shadowRoot(e)))for(var q of Array.from(C.childNodes(Z))){var W=re(q,P);W&&(w(Z)&&(W.isShadow=!0),L.childNodes.push(W))}}var j=C.parentNode(e);return j&&I(j)&&w(j)&&(L.isShadow=!0),L.type===p.Element&&"iframe"===L.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=re(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:N,onSerialize:y,onIframeLoad:b,iframeLoadTimeout:_,onStylesheetLoad:k,stylesheetLoadTimeout:T,keepIframeSrcFn:x});n&&b(e,n)}}),_),L.type===p.Element&&"link"===L.tagName&&"string"==typeof L.attributes.rel&&("stylesheet"===L.attributes.rel||"preload"===L.attributes.rel&&"string"==typeof L.attributes.href&&"css"===O(L.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=re(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:N,onSerialize:y,onIframeLoad:b,iframeLoadTimeout:_,onStylesheetLoad:k,stylesheetLoadTimeout:T,keepIframeSrcFn:x});t&&k(e,t)}}),T),L}let oe=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 ie={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ae={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]};var se={};function le(e){if(se[e])return se[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 ie?ie[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 ae?ae[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 se[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?se[e]=c:n}catch(e){return n}}var ce={};function ue(e,t,n){var r,o="".concat(e,".").concat(String(n));if(ce[o])return ce[o].call(t);var i=le(e),a=null==(r=Object.getOwnPropertyDescriptor(i,n))?void 0:r.get;return a?(ce[o]=a,a.call(t)):t[n]}var de={};function pe(e,t,n){var r="".concat(e,".").concat(String(n));if(de[r])return de[r].bind(t);var o=le(e)[n];return"function"!=typeof o?t[n]:(de[r]=o,o.bind(t))}function he(){return le("MutationObserver").constructor}var fe={childNodes:function(e){return ue("Node",e,"childNodes")},parentNode:function(e){return ue("Node",e,"parentNode")},parentElement:function(e){return ue("Node",e,"parentElement")},textContent:function(e){return ue("Node",e,"textContent")},contains:function(e,t){return pe("Node",e,"contains")(t)},getRootNode:function(e){return pe("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?ue("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?ue("Element",e,"shadowRoot"):null},querySelector:function(e,t){return ue("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return ue("Element",e,"querySelectorAll")(t)},mutationObserver:he};function me(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 ve="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",ge={map:{},getId:()=>(console.error(ve),-1),getNode:()=>(console.error(ve),null),removeNodeFromMap(){console.error(ve)},has:()=>(console.error(ve),!1),reset(){console.error(ve)}};function ye(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 be(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)}}),()=>be(e,t,i||{},!0)}function _e(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&&(ge=new Proxy(ge,{get:(e,t,n)=>("map"===t&&console.error(ve),Reflect.get(e,t,n))}));var Ce=Date.now;function Se(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=fe.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=fe.parentElement(i.body))?void 0:r.scrollTop)||(null==(o=null==i?void 0:i.body)?void 0:o.scrollTop)||0}}function Ie(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function we(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ke(e){return e?e.nodeType===e.ELEMENT_NODE?e:fe.parentElement(e):null}function Te(e,t,n,r){if(!e)return!1;var o=ke(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($(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 xe(e,t,n){return!("TITLE"!==e.tagName||!n.headTitleMutations)||t.getId(e)===V}function Me(e,t){if(I(e))return!1;var n=t.getId(e);if(!t.has(n))return!0;var r=fe.parentNode(e);return(!r||r.nodeType!==e.DOCUMENT_NODE)&&(!r||Me(r,t))}function Ee(e){return Boolean(e.changedTouches)}function Ne(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function Ae(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function Re(e){return!!e&&(e instanceof oe&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(fe.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(Ce=()=>(new Date).getTime());let Oe=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 Le(e){var t,n=null;return"getRootNode"in e&&(null==(t=fe.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&fe.host(fe.getRootNode(e))&&(n=fe.host(fe.getRootNode(e))),n}function De(e){var t=e.ownerDocument;if(!t)return!1;var n=function(e){for(var t,n=e;t=Le(n);)n=t;return n}(e);return fe.contains(t,n)}function Fe(e){var t=e.ownerDocument;return!!t&&(fe.contains(t,e)||De(e))}var Pe=(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))(Pe||{}),Be=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(Be||{}),He=(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))(He||{}),Ze=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Ze||{}),qe=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(qe||{}),We=(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))(We||{});function Ve(e){return"__ln"in e}class Ye{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&&Ve(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&&Ve(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 je,Ge=(e,t)=>"".concat(e,"@").concat(t);class Ue{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,"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 Ye,r=e=>{for(var t=e,n=V;n===V;)n=(t=t&&t.nextSibling)&&this.mirror.getId(t);return n},o=o=>{var i=fe.parentNode(o);if(i&&Fe(o)&&"TEXTAREA"!==i.tagName){var a=I(i)?this.mirror.getId(Le(o)):this.mirror.getId(i),s=r(o);if(-1===a||-1===s)return n.addNode(o);var l=re(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=>{Ne(e,this.mirror)&&this.iframeManager.addIframe(e),Ae(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),Re(o)&&this.shadowDomManager.addShadowRoot(fe.shadowRoot(o),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}});l&&(e.push({parentId:a,nextId:s,node:l}),t.add(l.id))}};this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(var i of this.movedSet)Xe(this.removes,i,this.mirror)&&!this.movedSet.has(fe.parentNode(i))||o(i);for(var a of this.addedSet)Ke(this.droppedSet,a)||Xe(this.removes,a,this.mirror)?Ke(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(fe.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(fe.parentNode(p.value));if(-1===r(p.value))continue;if(-1!==h){l=p;break}var f=p.value,m=fe.parentNode(f);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var v=fe.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=fe.parentNode(t);return n&&"TEXTAREA"===n.tagName&&this.genTextAreaValueMutation(n),{id:this.mirror.getId(t),value:e.value}})).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),attributes:this.attributes.map((e=>{var{attributes:t}=e;if("string"==typeof t.style){var n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length<t.style.length&&(n+r).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}})).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),removes:this.removes,adds:e};(g.texts.length||g.attributes.length||g.removes.length||g.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(g))}})),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(fe.childNodes(e),(e=>fe.textContent(e)||"")).join("")})),c(this,"processMutation",(e=>{if(!xe(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":var t=fe.textContent(e.target);Te(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:ee(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,ke(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break;case"attributes":var n=e.target,r=e.attributeName,o=e.target.getAttribute(r);if("value"===r){var i=R(n);o=E({element:n,maskInputOptions:this.maskInputOptions,tagName:n.tagName,type:i,value:o,maskInputFn:this.maskInputFn})}if(Te(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"),!Q(n.tagName,r))if(a.attributes[r]=J(this.doc,N(n.tagName),N(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(Te(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(fe.host(e.target)):this.mirror.getId(e.target);Te(e.target,this.blockClass,this.blockSelector,!1)||xe(t,this.mirror,this.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(ze(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||Me(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Ge(n,r)]?ze(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:!(!I(e.target)||!w(e.target))||void 0})),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(xe(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[Ge(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Te(e,this.blockClass,this.blockSelector,!1)||(fe.childNodes(e).forEach((e=>this.genAdds(e))),Re(e)&&fe.childNodes(fe.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 ze(e,t){e.delete(t),fe.childNodes(t).forEach((t=>ze(e,t)))}function Xe(e,t,n){return 0!==e.length&&function(e,t,n){var r=fe.parentNode(t),o=function(){var t=n.getId(r);if(e.some((e=>e.id===t)))return{v:!0};r=fe.parentNode(r)};for(;r;){var i=o();if("object"==typeof i)return i.v}return!1}(e,t,n)}function Ke(e,t){return 0!==e.size&&Je(e,t)}function Je(e,t){var n=fe.parentNode(t);return!!n&&(!!e.has(n)||Je(e,n))}var Qe=e=>{if(!je)return e;return function(){try{return e(...arguments)}catch(e){if(je&&!0===je(e))return;throw e}}},$e=[];function et(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 tt(e,t){var n=new Ue;$e.push(n),n.init(e);var r=new(he())(Qe(n.processMutations.bind(n)));return r.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function nt(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(He).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==l[e])).forEach((e=>{var s=N(e),l=(e=>r=>{var s=et(r);if(!Te(s,i,a,!0)){var l=null,c=e;if("pointerType"in r){switch(r.pointerType){case"mouse":l=Ze.Mouse;break;case"touch":l=Ze.Touch;break;case"pen":l=Ze.Pen}l===Ze.Touch?He[e]===He.MouseDown?c="TouchStart":He[e]===He.MouseUp&&(c="TouchEnd"):Ze.Pen}else Ee(r)&&(l=Ze.Touch);null!==l?(u=l,(c.startsWith("Touch")&&l===Ze.Touch||c.startsWith("Mouse")&&l===Ze.Mouse)&&(l=null)):He[e]===He.Click&&(l=u,u=null);var d=Ee(r)?r.changedTouches[0]:r;if(d){var p=o.getId(s),{clientX:h,clientY:f}=d;Qe(n)(t({type:He[c],id:p,x:h,y:f},null!==l&&{pointerType:l}))}}})(e);if(window.PointerEvent)switch(He[e]){case He.MouseDown:case He.MouseUp:s=s.replace("mouse","pointer");break;case He.TouchStart:case He.TouchEnd:return}c.push(me(s,l,r))})),Qe((()=>{c.forEach((e=>e()))}))}function rt(e){var{scrollCb:t,doc:n,mirror:r,blockClass:o,blockSelector:i,sampling:a}=e;return me("scroll",Qe(ye(Qe((e=>{var a=et(e);if(a&&!Te(a,o,i,!0)){var s=r.getId(a);if(a===n&&n.defaultView){var l=Se(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 ot=["INPUT","TEXTAREA","SELECT"],it=new WeakMap;function at(e){return function(e,t){if(ut("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||ut("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||ut("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||ut("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){var 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 st(e,t,n){var r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function lt(e,t){var n,r,o,{mirror:i,stylesheetManager:a}=e,s=null;s="#document"===t.nodeName?i.getId(t):i.getId(fe.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}}),Qe((()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}))):()=>{}}function ct(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=tt(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=ye(Qe((e=>{var n=Date.now()-i;t(l.map((e=>(e.timeOffset-=n,e))),e),l=[],i=null})),s),u=Qe(ye(Qe((e=>{var t=et(e),{clientX:n,clientY:r}=Ee(e)?e.changedTouches[0]:e;i||(i=Ce()),l.push({x:n,y:r,id:o.getId(t),timeOffset:Ce()-i}),c("undefined"!=typeof DragEvent&&e instanceof DragEvent?Be.Drag:e instanceof MouseEvent?Be.MouseMove:Be.TouchMove)})),a,{trailing:!1})),d=[me("mousemove",u,r),me("touchmove",u,r),me("drag",u,r)];return Qe((()=>{d.forEach((e=>e()))}))}(e),a=nt(e),s=rt(e),l=function(e,t){var{viewportResizeCb:n}=e,{win:r}=t,o=-1,i=-1;return me("resize",Qe(ye(Qe((()=>{var e=Ie(),t=we();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=et(e),n=e.isTrusted,o=t&&t.tagName;if(t&&"OPTION"===o&&(t=fe.parentElement(t)),t&&o&&!(ot.indexOf(o)<0)&&!Te(t,i,a,!0)&&!(t.classList.contains(s)||l&&t.matches(l))){var d=t.value,h=!1,m=R(t)||"";"radio"===m||"checkbox"===m?h=t.checked:(c[o.toLowerCase()]||c[m])&&(d=E({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=it.get(e);if(!i||i.text!==r.text||i.isChecked!==r.isChecked){it.set(e,r);var a=o.getId(e);Qe(n)(t(t({},r),{},{id:a}))}}var m=("last"===d.input?["change"]:["input","change"]).map((e=>me(e,Qe(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=>be(e[0],e[1],{set(){Qe(h)({target:this,isTrusted:!1})}},!1,v)))),Qe((()=>{m.forEach((e=>e()))}))}(e),u=function(e){var{mediaInteractionCb:t,blockClass:n,blockSelector:r,mirror:o,sampling:i,doc:a}=e,s=Qe((e=>ye(Qe((i=>{var a=et(i);if(a&&!Te(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=[me("play",s(We.Play),a),me("pause",s(We.Pause),a),me("seeked",s(We.Seeked),a),me("volumechange",s(We.VolumeChange),a),me("ratechange",s(We.RateChange),a)];return Qe((()=>{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:Qe(((e,t,i)=>{var[a,s]=i,{id:l,styleId:c}=st(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:Qe(((e,t,i)=>{var[a]=i,{id:s,styleId:l}=st(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:Qe(((e,t,i)=>{var[a]=i,{id:s,styleId:l}=st(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:Qe(((e,t,i)=>{var[a]=i,{id:s,styleId:l}=st(t,r,o.styleMirror);return(s&&-1!==s||l&&-1!==l)&&n({id:s,styleId:l,replaceSync:a}),e.apply(t,i)}))}));var u={};dt("CSSGroupingRule")?u.CSSGroupingRule=i.CSSGroupingRule:(dt("CSSMediaRule")&&(u.CSSMediaRule=i.CSSMediaRule),dt("CSSConditionRule")&&(u.CSSConditionRule=i.CSSConditionRule),dt("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:Qe(((e,t,i)=>{var[a,s]=i,{id:l,styleId:c}=st(t.parentStyleSheet,r,o.styleMirror);return(l&&-1!==l||c&&-1!==c)&&n({id:l,styleId:c,adds:[{rule:a,index:[...at(t),s||0]}]}),e.apply(t,i)}))}),i.prototype.deleteRule=new Proxy(d[t].deleteRule,{apply:Qe(((e,t,i)=>{var[a]=i,{id:s,styleId:l}=st(t.parentStyleSheet,r,o.styleMirror);return(s&&-1!==s||l&&-1!==l)&&n({id:s,styleId:l,removes:[{index:[...at(t),a]}]}),e.apply(t,i)}))})})),Qe((()=>{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=lt(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:Qe(((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}=st(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:at(t.parentRule)}),e.apply(t,a)}))});var l=a.CSSStyleDeclaration.prototype.removeProperty;return a.CSSStyleDeclaration.prototype.removeProperty=new Proxy(l,{apply:Qe(((e,t,a)=>{var s,[c]=a;if(o.has(c))return l.apply(t,[c]);var{id:u,styleId:d}=st(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:at(t.parentRule)}),e.apply(t,a)}))}),Qe((()=>{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=_e(n.fonts,"add",(function(e){return function(n){return setTimeout(Qe((()=>{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),Qe((()=>{o.forEach((e=>e()))}))}(e)));var m=function(e){var{doc:t,mirror:n,blockClass:r,blockSelector:o,selectionCb:i}=e,a=!0,s=Qe((()=>{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;Te(d,r,o,!0)||Te(h,r,o,!0)||s.push({start:n.getId(d),startOffset:p,end:n.getId(h),endOffset:f})}i({ranges:s})}}));return s(),me("selectionchange",s)}(e),v=function(e){var{doc:t,customElementCb:n}=e,r=t.defaultView;return r&&r.customElements?_e(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 Qe((()=>{$e.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 ut(e){return void 0!==window[e]}function dt(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class pt{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 ht{constructor(e){c(this,"iframes",new WeakMap),c(this,"crossOriginIframeMap",new WeakMap),c(this,"crossOriginIframeMirror",new pt(Y)),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 pt(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 Pe.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:Pe.IncrementalSnapshot,data:{source:Be.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case Pe.Meta:case Pe.Load:case Pe.DomContentLoaded:return!1;case Pe.Plugin:return t;case Pe.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case Pe.IncrementalSnapshot:switch(t.data.source){case Be.Mutation:return t.data.adds.forEach((t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);var 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 Be.Drag:case Be.TouchMove:case Be.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case Be.ViewportResize:return!1;case Be.MediaInteraction:case Be.MouseInteraction:case Be.Scroll:case Be.CanvasMutation:case Be.Input:return this.replaceIds(t.data,e,["id"]),t;case Be.StyleSheetRule:case Be.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case Be.Font:return t;case Be.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case Be.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(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===p.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,t)}))}}class ft{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=tt(t(t({},this.bypassOptions),{},{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push((()=>r.disconnect())),this.restoreHandlers.push(rt(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(fe.host(e))),this.restoreHandlers.push(lt({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(_e(e.prototype,"attachShadow",(function(e){return function(r){var o=e.call(this,r),i=fe.shadowRoot(this);return i&&Fe(this)&&n.addShadowRoot(i,t),o}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch(e){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var mt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",vt="undefined"==typeof Uint8Array?[]:new Uint8Array(256),gt=0;gt<64;gt++)vt[mt.charCodeAt(gt)]=gt;var yt=new Map;var bt=(e,t,n)=>{if(e&&(St(e,t)||"object"==typeof e)){var r=function(e,t){var n=yt.get(e);return n||(n=new Map,yt.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 _t(e,t,n){if(e instanceof Array)return e.map((e=>_t(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+=mt[n[t]>>2],o+=mt[(3&n[t])<<4|n[t+1]>>4],o+=mt[(15&n[t+1])<<2|n[t+2]>>6],o+=mt[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:[_t(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:[_t(e.data,t,n),e.width,e.height]}:St(e,t)||"object"==typeof e?{rr_type:e.constructor.name,index:bt(e,t,n)}:e}var Ct=(e,t,n)=>e.map((e=>_t(e,t,n))),St=(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 It(e,t,n,r){var o=[];try{var i=_e(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(!Te(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 wt(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=_e(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(bt(u,i,this),"tagName"in this.canvas&&!Te(this.canvas,r,o,!0)){var d=Ct(l,i,this),p={type:t,property:s,args:d};n(this.canvas,p)}return u}}));a.push(l)}catch(r){var c=be(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 kt,Tt,xt,Mt,Et="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Nt="undefined"!=typeof window&&window.Blob&&new Blob([(kt=Et,Uint8Array.from(atob(kt),(e=>e.charCodeAt(0))))],{type:"text/javascript;charset=utf-8"});function At(e){var t;try{if(!(t=Nt&&(window.URL||window.webkitURL).createObjectURL(Nt)))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,"+Et,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class Rt{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=It(t,n,o,!0),l=new Map,c=new At;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:qe["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=>{Te(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=It(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=_e(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 Te(this.canvas,n,r,!0)||setTimeout((()=>{var n=Ct(s,t,this);e(this.canvas,{type:qe["2D"],property:i,args:n})}),0),o.apply(this,s)}}));o.push(a)}catch(n){var s=be(t.CanvasRenderingContext2D.prototype,i,{set(t){e(this.canvas,{type:qe["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(...wt(t.WebGLRenderingContext.prototype,qe.WebGL,e,n,r,t)),void 0!==t.WebGL2RenderingContext&&o.push(...wt(t.WebGL2RenderingContext.prototype,qe.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 Ot{constructor(e){c(this,"trackedLinkElements",new WeakSet),c(this,"mutationCb"),c(this,"adoptedStyleSheetCb"),c(this,"styleMirror",new Oe),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 Lt{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 Dt=!1;try{if(2!==Array.from([1],(e=>2*e))[0]){var Ft=document.createElement("iframe");document.body.appendChild(Ft),Array.from=(null==(a=Ft.contentWindow)?void 0:a.Array.from)||Array.from,document.body.removeChild(Ft)}}catch(e){console.debug("Unable to override Array.from",e)}var Pt,Bt,Ht=new M;function Zt(){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:E=!1,plugins:N,keepIframeSrcFn:A=(()=>!1),ignoreCSSAttributes:R=new Set([]),errorHandler:O}=e;je=O;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),Ht.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 N||[])t.eventProcessor&&(e=t.eventProcessor(e));return y&&!D&&(e=y(e)),e};Tt=(e,t)=>{var i,a=e;if(a.timestamp=Ce(),!(null==(i=$e[0])?void 0:i.isFrozen())||a.type===Pe.FullSnapshot||a.type===Pe.IncrementalSnapshot&&a.data.source===Be.Mutation||$e.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===Pe.FullSnapshot)F=a,H=0;else if(a.type===Pe.IncrementalSnapshot){if(a.data.source===Be.Mutation&&a.data.isAttachIframe)return;H++;var l=o&&H>=o,c=r&&a.timestamp-F.timestamp>r;(l||c)&&xt(!0)}};var q=e=>{Tt({type:Pe.IncrementalSnapshot,data:t({source:Be.Mutation},e)})},W=e=>Tt({type:Pe.IncrementalSnapshot,data:t({source:Be.Scroll},e)}),V=e=>Tt({type:Pe.IncrementalSnapshot,data:t({source:Be.CanvasMutation},e)}),Y=new Ot({mutationCb:q,adoptedStyleSheetCb:e=>Tt({type:Pe.IncrementalSnapshot,data:t({source:Be.AdoptedStyleSheet},e)})}),j=new ht({mirror:Ht,mutationCb:q,stylesheetManager:Y,recordCrossOriginIframes:w,wrappedEmit:Tt});for(var G of N||[])G.getMirror&&G.getMirror({nodeMirror:Ht,crossOriginIframeMirror:j.crossOriginIframeMirror,crossOriginIframeStyleMirror:j.crossOriginIframeStyleMirror});var U=new Lt;Mt=new Rt({recordCanvas:I,mutationCb:V,win:window,blockClass:i,blockSelector:a,mirror:Ht,sampling:b.canvas,dataURLOptions:_});var z=new ft({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:E,sampling:b,slimDOMOptions:B,iframeManager:j,stylesheetManager:Y,canvasManager:Mt,keepIframeSrcFn:A,processedNodeManager:U},mirror:Ht});xt=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(S){Tt({type:Pe.Meta,data:{href:window.location.href,width:we(),height:Ie()}},e),Y.reset(),z.init(),$e.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 re(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:Ht,blockClass:i,blockSelector:a,maskTextClass:c,maskTextSelector:u,inlineStylesheet:d,maskAllInputs:P,maskTextFn:v,maskInputFn:m,slimDOM:B,dataURLOptions:_,recordCanvas:I,inlineImages:E,onSerialize:e=>{Ne(e,Ht)&&j.addIframe(e),Ae(e,Ht)&&Y.trackLinkElement(e),Re(e)&&z.addShadowRoot(fe.shadowRoot(e),document)},onIframeLoad:(e,t)=>{j.attachIframe(e,t),z.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{Y.attachLinkElement(e,t)},keepIframeSrcFn:A});if(!t)return console.warn("Failed to snapshot the document");Tt({type:Pe.FullSnapshot,data:{node:t,initialOffset:Se(window)}},e),$e.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Y.adoptStyleSheets(document.adoptedStyleSheets,Ht.getId(document))}};try{var X=[],K=e=>{var n;return Qe(ct)({mutationCb:q,mousemoveCb:(e,t)=>Tt({type:Pe.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>Tt({type:Pe.IncrementalSnapshot,data:t({source:Be.MouseInteraction},e)}),scrollCb:W,viewportResizeCb:e=>Tt({type:Pe.IncrementalSnapshot,data:t({source:Be.ViewportResize},e)}),inputCb:e=>Tt({type:Pe.IncrementalSnapshot,data:t({source:Be.Input},e)}),mediaInteractionCb:e=>Tt({type:Pe.IncrementalSnapshot,data:t({source:Be.MediaInteraction},e)}),styleSheetRuleCb:e=>Tt({type:Pe.IncrementalSnapshot,data:t({source:Be.StyleSheetRule},e)}),styleDeclarationCb:e=>Tt({type:Pe.IncrementalSnapshot,data:t({source:Be.StyleDeclaration},e)}),canvasMutationCb:V,fontCb:e=>Tt({type:Pe.IncrementalSnapshot,data:t({source:Be.Font},e)}),selectionCb:e=>{Tt({type:Pe.IncrementalSnapshot,data:t({source:Be.Selection},e)})},customElementCb:e=>{Tt({type:Pe.IncrementalSnapshot,data:t({source:Be.CustomElement},e)})},blockClass:i,ignoreClass:s,ignoreSelector:l,maskTextClass:c,maskTextSelector:u,maskInputOptions:P,inlineStylesheet:d,sampling:b,recordDOM:S,recordCanvas:I,inlineImages:E,userTriggeredOnInput:T,collectFonts:x,doc:e,maskInputFn:m,maskTextFn:v,keepIframeSrcFn:A,blockSelector:a,slimDOMOptions:B,dataURLOptions:_,mirror:Ht,iframeManager:j,stylesheetManager:Y,shadowDomManager:z,processedNodeManager:U,canvasManager:Mt,ignoreCSSAttributes:R,plugins:(null==(n=null==N?void 0:N.filter((e=>e.observer)))?void 0:n.map((e=>({observer:e.observer,options:e.options,callback:t=>Tt({type:Pe.Plugin,data:{plugin:e.name,payload:t}})}))))||[]},g)};j.addLoadListener((e=>{try{X.push(K(e.contentDocument))}catch(e){console.warn(e)}}));var J=()=>{xt(),X.push(K(document)),Dt=!0};return"interactive"===document.readyState||"complete"===document.readyState?J():(X.push(me("DOMContentLoaded",(()=>{Tt({type:Pe.DomContentLoaded,data:{}}),"DOMContentLoaded"===k&&J()}))),X.push(me("load",(()=>{Tt({type:Pe.Load,data:{}}),"load"===k&&J()}),window))),()=>{X.forEach((e=>e())),U.destroy(),Dt=!1,je=void 0}}catch(e){console.warn(e)}}Zt.addCustomEvent=(e,t)=>{if(!Dt)throw new Error("please add custom event after start recording");Tt({type:Pe.Custom,data:{tag:e,payload:t}})},Zt.freezePage=()=>{$e.forEach((e=>e.freeze()))},Zt.takeFullSnapshot=e=>{if(!Dt)throw new Error("please take full snapshot after start recording");xt(e)},Zt.mirror=Ht,(Bt=Pt||(Pt={}))[Bt.NotStarted=0]="NotStarted",Bt[Bt.Running=1]="Running",Bt[Bt.Stopped=2]="Stopped";var qt,Wt=Object.defineProperty,Vt=(e,t,n)=>((e,t,n)=>t in e?Wt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),Yt=Object.defineProperty,jt=(e,t,n)=>((e,t,n)=>t in e?Yt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),Gt=Object.defineProperty,Ut=(e,t,n)=>((e,t,n)=>t in e?Gt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),zt={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Xt={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Kt={};function Jt(e){if(Kt[e])return Kt[e];var t=globalThis[e],n=t.prototype,r=e in zt?zt[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 Xt?Xt[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 Kt[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?Kt[e]=c:n}catch(e){return n}}var Qt={};function $t(e,t,n){var r,o="".concat(e,".").concat(String(n));if(Qt[o])return Qt[o].call(t);var i=Jt(e),a=null==(r=Object.getOwnPropertyDescriptor(i,n))?void 0:r.get;return a?(Qt[o]=a,a.call(t)):t[n]}var en={};function tn(e,t,n){var r="".concat(e,".").concat(String(n));if(en[r])return en[r].bind(t);var o=Jt(e)[n];return"function"!=typeof o?t[n]:(en[r]=o,o.bind(t))}var nn={childNodes:function(e){return $t("Node",e,"childNodes")},parentNode:function(e){return $t("Node",e,"parentNode")},parentElement:function(e){return $t("Node",e,"parentElement")},textContent:function(e){return $t("Node",e,"textContent")},contains:function(e,t){return tn("Node",e,"contains")(t)},getRootNode:function(e){return tn("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?$t("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?$t("Element",e,"shadowRoot"):null},querySelector:function(e,t){return $t("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return $t("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return Jt("MutationObserver").constructor}};class rn{constructor(){Ut(this,"idNodeMap",new Map),Ut(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 on(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&on(nn.parentNode(e),t,n);for(var r=e.classList.length;r--;){var o=e.classList[r];if(t.test(o))return!0}return!!n&&on(nn.parentNode(e),t,n)}class an{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 an))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 sn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ln={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},cn={};function un(e){if(cn[e])return cn[e];var t=globalThis[e],n=t.prototype,r=e in sn?sn[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 ln?ln[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 cn[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?cn[e]=c:n}catch(e){return n}}var dn={};function pn(e,t,n){var r,o="".concat(e,".").concat(String(n));if(dn[o])return dn[o].call(t);var i=un(e),a=null==(r=Object.getOwnPropertyDescriptor(i,n))?void 0:r.get;return a?(dn[o]=a,a.call(t)):t[n]}var hn={};function fn(e,t,n){var r="".concat(e,".").concat(String(n));if(hn[r])return hn[r].bind(t);var o=un(e)[n];return"function"!=typeof o?t[n]:(hn[r]=o,o.bind(t))}var mn={childNodes:function(e){return pn("Node",e,"childNodes")},parentNode:function(e){return pn("Node",e,"parentNode")},parentElement:function(e){return pn("Node",e,"parentElement")},textContent:function(e){return pn("Node",e,"textContent")},contains:function(e,t){return fn("Node",e,"contains")(t)},getRootNode:function(e){return fn("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?pn("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?pn("Element",e,"shadowRoot"):null},querySelector:function(e,t){return pn("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return pn("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return un("MutationObserver").constructor}};var vn="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.",gn={map:{},getId:()=>(console.error(vn),-1),getNode:()=>(console.error(vn),null),removeNodeFromMap(){console.error(vn)},has:()=>(console.error(vn),!1),reset(){console.error(vn)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(gn=new Proxy(gn,{get:(e,t,n)=>("map"===t&&console.error(vn),Reflect.get(e,t,n))}));var yn=Date.now;function bn(e){return e?e.nodeType===e.ELEMENT_NODE?e:mn.parentElement(e):null}/[1-9][0-9]{12}/.test(Date.now().toString())||(yn=()=>(new Date).getTime());function _n(e){var t,n=null;return"getRootNode"in e&&(null==(t=mn.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&mn.host(mn.getRootNode(e))&&(n=mn.host(mn.getRootNode(e))),n}function Cn(e){for(var t,n=e;t=_n(n);)n=t;return n}function Sn(e){var t=e.ownerDocument;if(!t)return!1;var n=Cn(e);return mn.contains(t,n)}for(var In=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:class{constructor(){jt(this,"id",1),jt(this,"styleIDMap",new WeakMap),jt(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 gn},closestElementOfNode:bn,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:Cn,getShadowHost:_n,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=mn.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=mn.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 an&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(mn.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&&(mn.contains(t,e)||Sn(e))},isAncestorRemoved:function e(t,n){if(o=(r=t)&&"host"in r&&"mode"in r&&nn.host(r)||null,Boolean(o&&"shadowRoot"in o&&nn.shadowRoot(o)===r))return!1;var r,o,i=n.getId(t);if(!n.has(i))return!0;var a=mn.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=bn(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(on(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 yn},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:Sn,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"})),wn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",kn="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Tn=0;Tn<64;Tn++)kn[wn.charCodeAt(Tn)]=Tn;var xn;"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 Mn=document.createElement("iframe");document.body.appendChild(Mn),Array.from=(null==(qt=Mn.contentWindow)?void 0:qt.Array.from)||Array.from,document.body.removeChild(Mn)}}catch(e){console.debug("Unable to override Array.from",e)}new rn,function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(xn||(xn={}));class En{constructor(e){Vt(this,"fileName"),Vt(this,"functionName"),Vt(this,"lineNumber"),Vt(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 Nn=/(^|@)\S+:\d+/,An=/^\s*at .*(\S+:\d+|\(native\))/m,Rn=/^(eval@)?(\[native code])?$/,On={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(An)?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(An)}),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 En({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(Rn)}),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 En({functionName:e});var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(t),r=n&&n[1]?n[1]:void 0,o=this.extractLocation(e.replace(t,""));return new En({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 En({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 En({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(Nn)&&!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 En({functionName:r,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})}),this)}};function Ln(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 Dn(e){return"[object Object]"===Object.prototype.toString.call(e)}function Fn(e,t){if(0===t)return!0;var n=Object.keys(e);for(var r of n)if(Dn(e[r])&&Fn(e[r],t-1))return!0;return!1}function Pn(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(Dn(e)&&Object.keys(e).length>n.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if(Dn(e)&&Fn(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]=Ln(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 Bn={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 Hn(e,t,n){var r,o=n?Object.assign({},Bn,n):Bn,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=On.parse(r).map((e=>e.toString())),a=[Pn(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=[Pn("Uncaught (in promise) ".concat(n.name,": ").concat(n.message),o.stringifyOptions)]):(n=new Error,r=[Pn("Uncaught (in promise)",o.stringifyOptions),Pn(t.reason,o.stringifyOptions)]);var i=On.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]?In.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=On.parse(new Error).map((e=>e.toString())).splice(1),d=("assert"===n?l.slice(1):l).map((e=>Pn(e,o.stringifyOptions)));++a<o.lengthThreshold?e({level:n,trace:u,payload:d}):a===o.lengthThreshold&&e({level:"warn",trace:[],payload:[Pn("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:Hn,options:e}),qn="undefined"!=typeof window?window:void 0,Wn="undefined"!=typeof globalThis?globalThis:qn,Vn=Array.prototype.forEach,Yn=null==Wn?void 0:Wn.navigator,jn=null==Wn?void 0:Wn.document;null==Wn||Wn.location,null==Wn||Wn.fetch,null!=Wn&&Wn.XMLHttpRequest&&"withCredentials"in new Wn.XMLHttpRequest&&Wn.XMLHttpRequest,null==Wn||Wn.AbortController,null==Yn||Yn.userAgent;var Gn,Un=null!=qn?qn:{};!function(e){e.GZipJS="gzip-js",e.Base64="base64"}(Gn||(Gn={}));var zn=["fatal","error","warning","log","info","debug"],Xn=e=>{var t={_log:function(t){if(qn&&Un.POSTHOG_DEBUG&&!vr(qn.console)&&qn.console){for(var n=("__rrweb_original__"in qn.console[t]?qn.console[t].__rrweb_original__:qn.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=>Xn("".concat(e," ").concat(t))};return t},Kn=Xn("[PostHog.js]"),Jn=Kn.createLogger,Qn={};function $n(e,t,n){if(dr(e))if(Vn&&e.forEach===Vn)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)===Qn)return}function er(e,t,n){if(!_r(e)){if(dr(e))return $n(e,t,n);if(wr(e)){for(var r of e.entries())if(t.call(n,r[1],r[0])===Qn)return}else for(var o in e)if(cr.call(e,o)&&t.call(n,e[o],o)===Qn)return}}var tr=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 $n(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}function rr(e,t,n,r){var{capture:o=!1,passive:i=!0}=null!=r?r:{};null==e||e.addEventListener(t,n,{capture:o,passive:i})}function or(e,t){return-1!==e.indexOf(t)}var ir=function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},ar=function(e,t){if(!function(e){try{new RegExp(e)}catch(e){return!1}return!0}(t))return!1;try{return new RegExp(t).test(e)}catch(e){return!1}},sr=Array.isArray,lr=Object.prototype,cr=lr.hasOwnProperty,ur=lr.toString,dr=sr||function(e){return"[object Array]"===ur.call(e)},pr=e=>"function"==typeof e,hr=e=>pr(e)&&-1!==e.toString().indexOf("[native code]"),fr=()=>!!qn.Zone,mr=e=>e===Object(e)&&!dr(e),vr=e=>void 0===e,gr=e=>"[object String]"==ur.call(e),yr=e=>gr(e)&&0===e.trim().length,br=e=>null===e,_r=e=>vr(e)||br(e),Cr=e=>"[object Number]"==ur.call(e),Sr=e=>"[object Boolean]"===ur.call(e),Ir=e=>e instanceof Document,wr=e=>e instanceof FormData,kr=function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"&",o=[];return er(e,(function(e,r){vr(e)||vr(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)},Tr="$surveys_activated";function xr(e){return!!e&&1===e.nodeType}function Mr(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function Er(e){return e?ir(e).split(/\s+/):[]}function Nr(e){var t="";switch(typeof e.className){case"string":t=e.className;break;case"object":t=(e.className&&"baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:t=""}return Er(t)}function Ar(e){var t="";return Or(e)&&!Lr(e)&&e.childNodes&&e.childNodes.length&&er(e.childNodes,(function(e){var n;(function(e){return!!e&&3===e.nodeType})(e)&&e.textContent&&(t+=null!==(n=function(e){return _r(e)?null:ir(e).split(/(\s+)/).filter((e=>qr(e))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}(e.textContent))&&void 0!==n?n:"")})),ir(t)}var Rr=["a","button","form","input","select","textarea","label"];function Or(e){for(var t=e;t.parentNode&&!Mr(t,"body");t=t.parentNode){var n=Nr(t);if(or(n,"ph-sensitive")||or(n,"ph-no-capture"))return!1}if(or(Nr(e),"ph-include"))return!0;var r=e.type||"";if(gr(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var o=e.name||e.id||"";if(gr(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 Lr(e){return!!(Mr(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||Mr(e,"select")||Mr(e,"textarea")||"true"===e.getAttribute("contenteditable"))}var Dr="(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})",Fr=new RegExp("^(?:".concat(Dr,")$")),Pr=new RegExp(Dr),Br="\\d{3}-?\\d{2}-?\\d{4}",Hr=new RegExp("^(".concat(Br,")$")),Zr=new RegExp("(".concat(Br,")"));function qr(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(_r(e))return!1;if(gr(e)){if(e=ir(e),(t?Fr:Pr).test((e||"").replace(/[- ]/g,"")))return!1;if((t?Hr:Zr).test(e))return!1}return!0}function Wr(e){var t=Ar(e);return qr(t="".concat(t," ").concat(Vr(e)).trim())?t:""}function Vr(e){var t="";return e&&e.childNodes&&e.childNodes.length&&er(e.childNodes,(function(e){var n;if(e&&"span"===(null===(n=e.tagName)||void 0===n?void 0:n.toLowerCase()))try{var r=Ar(e);t="".concat(t," ").concat(r).trim(),e.childNodes&&e.childNodes.length&&(t="".concat(t," ").concat(Vr(e)).trim())}catch(e){Kn.error("[AutoCapture]",e)}})),t}function Yr(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[jr(t.toString())]=jr(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:Gr(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 jr(e){return e.replace(/"|\\"/g,'\\"')}function Gr(e){var t=e.attr__class;return t?dr(t)?t:Er(t):void 0}var Ur={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 zr(e,t,n){try{if(!(t in e))return()=>{};var r=e[t],o=n(r);return pr(o)&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=o,()=>{e[t]=r}}catch(e){return()=>{}}}function Xr(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 Kr=Jn("[Recorder]"),Jr=e=>"navigation"===e.entryType,Qr=e=>"resource"===e.entryType;function $r(e,t,n){if(n.recordInitialRequests){var r=t.performance.getEntries().filter((e=>Jr(e)||Qr(e)&&n.initiatorTypes.includes(e.initiatorType)));e({requests:r.flatMap((e=>ao({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=>Jr(e)||Qr(e)&&n.initiatorTypes.includes(e.initiatorType)&&(e=>!n.recordBody&&!n.recordHeaders||"xmlhttprequest"!==e.initiatorType&&"fetch"!==e.initiatorType)(e)));e({requests:r.flatMap((e=>ao({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 eo(e,t){return!!t&&(Sr(t)||t[e])}function to(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(Sr(n))return!0;if(dr(n))return o(n);var i=n[t];return Sr(i)?i:o(i)}function no(e,t,n,r,o){return ro.apply(this,arguments)}function ro(){return ro=r((function*(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(i>10)return Kr.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=>Qr(e)&&e.initiatorType===t&&(vr(r)||e.startTime>=r)&&(vr(o)||e.startTime<=o)));return a||(yield new Promise((e=>setTimeout(e,50*i))),no(e,t,n,r,o,i+1))})),ro.apply(this,arguments)}function oo(e){var{body:t,options:n,url:r}=e;if(_r(t))return null;var{hostname:o,isHostDenied:i}=Xr(r,n);if(i)return o+" is in deny list";if(gr(t))return t;if(Ir(t))return t.textContent;if(wr(t))return kr(t);if(mr(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 io=e=>!br(e)&&("navigation"===e.entryType||"resource"===e.entryType);function ao(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:vr(s)?void 0:Math.round(s),endTime:vr(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(io(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 so=["video/","audio/"];function lo(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 co(){return co=r((function*(e){var{r:t,options:n,url:r}=e,{hostname:o,isHostDenied:i}=Xr(r,n);return i?Promise.resolve(o+" is in deny list"):lo(t)})),co.apply(this,arguments)}function uo(){return uo=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=so.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}=Xr(o,r);return l?s+" is in deny list":null}({r:t,options:n,url:r});return br(o)?lo(t):Promise.resolve(o)})),uo.apply(this,arguments)}function po(e,t,n){if(!n.initiatorTypes.includes("fetch"))return()=>{};var o=eo("request",n.recordHeaders),i=eo("response",n.recordHeaders),a=zr(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),to({type:"request",headers:h,url:r,recordBody:n.recordBody})&&(p.requestBody=yield function(e){return co.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),to({type:"response",headers:f,url:r,recordBody:n.recordBody})&&(p.responseBody=yield function(e){return uo.apply(this,arguments)}({r:l,options:n,url:r})),l}finally{no(t,"fetch",d.url,c,u).then((t=>{var n,r=ao({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 ho=null;function fo(e,n,r){if(!("performance"in n))return()=>{};if(ho)return Kr.warn("Network observer already initialised, doing nothing"),()=>{};var o=r?Object.assign({},Ur,r):Ur,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=$r(i,n,o),s=()=>{},l=()=>{};return(o.recordHeaders||o.recordBody)&&(s=function(e,t,n){if(!n.initiatorTypes.includes("xmlhttprequest"))return()=>{};var r=eo("request",n.recordHeaders),o=eo("response",n.recordHeaders),i=zr(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=>(to({type:"request",headers:v,url:s,recordBody:n.recordBody})&&(m.requestBody=oo({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),to({type:"response",headers:r,url:s,recordBody:n.recordBody})&&(m.responseBody=oo({body:h.response,options:n,url:s})),no(t,"xmlhttprequest",f.url,l,c).then((t=>{var n=ao({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=po(i,n,o)),ho=()=>{a(),s(),l()}}var mo=e=>({name:"rrweb/network@1",observer:fo,options:e});Un.__PosthogExtensions__=Un.__PosthogExtensions__||{},Un.__PosthogExtensions__.rrwebPlugins={getRecordConsolePlugin:Zn,getRecordNetworkPlugin:mo},Un.__PosthogExtensions__.rrweb={record:Zt,version:"v2"},Un.rrweb={record:Zt,version:"v2"},Un.rrwebConsoleRecord={getRecordConsolePlugin:Zn},Un.getRecordNetworkPlugin=mo;var vo,go,yo,bo,_o,Co,So,Io,wo={},ko=[],To=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,xo=Array.isArray;function Mo(e,t){for(var n in t)e[n]=t[n];return e}function Eo(e){var t=e.parentNode;t&&t.removeChild(e)}function No(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?vo.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 Ao(e,a,r,o,null)}function Ao(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?++yo:o,__i:-1,__u:0};return null==o&&null!=go.vnode&&go.vnode(i),i}function Ro(e){return e.children}function Oo(e,t){this.props=e,this.context=t}function Lo(e,t){if(null==t)return e.__?Lo(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?Lo(e):null}function Do(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 Do(e)}}function Fo(e){(!e.__d&&(e.__d=!0)&&bo.push(e)&&!Po.__r++||_o!==go.debounceRendering)&&((_o=go.debounceRendering)||Co)(Po)}function Po(){var e,t,n,r,o,i,a,s,l;for(bo.sort(So);e=bo.shift();)e.__d&&(t=bo.length,r=void 0,i=(o=(n=e).__v).__e,s=[],l=[],(a=n.__P)&&((r=Mo({},o)).__v=o.__v+1,go.vnode&&go.vnode(r),jo(a,r,o,n.__n,void 0!==a.ownerSVGElement,32&o.__u?[i]:null,s,null==i?Lo(o):i,!!(32&o.__u),l),r.__.__k[r.__i]=r,Go(s,r,l),r.__e!=i&&Do(r)),bo.length>t&&bo.sort(So));Po.__r=0}function Bo(e,t,n,r,o,i,a,s,l,c,u){var d,p,h,f,m,v=r&&r.__k||ko,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?Ao(null,o,null,null,o):xo(o)?Ao(Ro,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?Ao(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=Lo(i)),zo(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=Lo(i)),zo(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?wo:v[h.__i]||wo,h.__i=d,jo(e,h,p,o,i,a,s,l,c,u),f=h.__e,h.ref&&p.ref!=h.ref&&(p.ref&&Uo(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=Ho(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 Ho(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=Ho(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 qo(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||To.test(t)?n:n+"px"}function Wo(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||qo(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||qo(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?Yo:Vo,i)):e.removeEventListener(t,i?Yo:Vo,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 Vo(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(go.event?go.event(e):e)}function Yo(e){return this.l[e.type+!0](go.event?go.event(e):e)}function jo(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=go.__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 Oo(g,b),d.constructor=k,d.render=Xo),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=Mo({},d.__s)),Mo(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=go.__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=Mo(Mo({},r),d.getChildContext())),p||null==d.getSnapshotBeforeUpdate||(m=d.getSnapshotBeforeUpdate(h,f)),Bo(e,xo(w=null!=u&&u.type===Ro&&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),go.__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&&vo.call(e.childNodes),v=n.props||wo,!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||Wo(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||Wo(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=""),Bo(e,xo(p)?p:[p],t,n,r,o&&"foreignObject"!==y,i,a,i?i[0]:n.__k&&Lo(n,0),s,l),null!=i)for(c=i.length;c--;)null!=i[c]&&Eo(i[c]);s||(c="value",void 0!==f&&(f!==e[c]||"progress"===y&&!f||"option"===y&&f!==v[c])&&Wo(e,c,f,v[c],!1),c="checked",void 0!==m&&m!==e[c]&&Wo(e,c,m,v[c],!1))}return e}(n.__e,t,n,r,o,i,a,l,c);(u=go.diffed)&&u(t)}function Go(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)Uo(n[r],n[++r],n[++r]);go.__c&&go.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){go.__e(e,t.__v)}}))}function Uo(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){go.__e(e,n)}}function zo(e,t,n){var r,o;if(go.unmount&&go.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Uo(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){go.__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]&&zo(r[o],t,n||"function"!=typeof e.type);n||null==e.__e||Eo(e.__e),e.__=e.__e=e.__d=void 0}function Xo(e,t,n){return this.constructor(e,n)}function Ko(e,t,n){var r,o,i,a;go.__&&go.__(e,t),o=(r="function"==typeof n)?null:t.__k,i=[],a=[],jo(t,e=(!r&&n||t).__k=No(Ro,null,[e]),o||wo,wo,void 0!==t.ownerSVGElement,!r&&n?[n]:o?null:t.firstChild?vo.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,a),Go(i,e,a)}function Jo(e,t,n){var r,o,i,a,s=Mo({},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?vo.call(arguments,2):n),Ao(e.type,s,r||e.key,o||e.ref,null)}vo=ko.slice,go={__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}},yo=0,Oo.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Mo({},this.state),"function"==typeof e&&(e=e(Mo({},n),this.props)),e&&Mo(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),Fo(this))},Oo.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Fo(this))},Oo.prototype.render=Ro,bo=[],Co="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,So=function(e,t){return e.__v.__b-t.__v.__b},Po.__r=0,Io=0;var Qo=qn,$o=jn,ei="seenSurvey_",ti=Jn("[Surveys]"),ni=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(oi((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 ri(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 oi(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ci;"#"===t[0]&&(e=ri(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=ri(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 ii,ai,si,li={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"},ci="#eeeded",ui=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(vi(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:{[gi(r,"responded")]:!0}})),Qo.dispatchEvent(new Event("PHSurveySent"))):ti.error("[survey sent] event not captured, PostHog instance not found.")},di=(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:{[gi(e,"dismissed")]:!0}}),localStorage.setItem(vi(e),"true"),Qo.dispatchEvent(new Event("PHSurveyClosed"))):ti.error("[survey dismissed] event not captured, PostHog instance not found.")},pi=e=>e.map((e=>({sort:Math.floor(10*Math.random()),value:e}))).sort(((e,t)=>e.sort-t.sort)).map((e=>e.value)),hi=(e,t)=>e.length===t.length&&e.every(((e,n)=>e===t[n]))?t.reverse():t,fi=e=>(e.questions.forEach(((e,t)=>{e.originalQuestionIndex=t})),e.appearance&&e.appearance.shuffleQuestions?hi(e.questions,pi(e.questions)):e.questions),mi=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))},vi=e=>{var t="".concat(ei).concat(e.id);return e.current_iteration&&e.current_iteration>0&&(t="".concat(ei).concat(e.id,"_").concat(e.current_iteration)),t},gi=(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},yi=function(e,t){var n={__c:t="__cC"+Io++,__: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,Fo(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:()=>{}}),bi=e=>{var{component:t,children:n,renderAsHtml:r,style:o}=e;return Jo(t,r?{dangerouslySetInnerHTML:{__html:n},style:o}:{children:n,style:o})};!function(e){e.Popover="popover",e.API="api",e.Widget="widget"}(ii||(ii={})),function(e){e.Open="open",e.MultipleChoice="multiple_choice",e.SingleChoice="single_choice",e.Rating="rating",e.Link="link"}(ai||(ai={})),function(e){e.NextQuestion="next_question",e.End="end",e.ResponseBased="response_based",e.SpecificQuestion="specific_question"}(si||(si={}));!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];$n(n,(function(t){$n(t,(function(t){e.push(t)}))}))}(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","irclid","_kx"]);class _i{constructor(){o(this,"events",{}),this.events={}}on(e,t){return this.events[e]||(this.events[e]=[]),this.events[e].push(t),()=>{this.events[e]=this.events[e].filter((e=>e!==t))}}emit(e,t){for(var n of this.events[e]||[])n(t);for(var r of this.events["*"]||[])r(e,t)}}class Ci{constructor(e){o(this,"_debugEventEmitter",new _i),o(this,"checkStep",((e,t)=>this.checkStepEvent(e,t)&&this.checkStepUrl(e,t)&&this.checkStepElement(e,t))),o(this,"checkStepEvent",((e,t)=>null==t||!t.event||(null==e?void 0:e.event)===(null==t?void 0:t.event))),this.instance=e,this.actionEvents=new Set,this.actionRegistry=new Set}init(){var e;if(!vr(null===(e=this.instance)||void 0===e?void 0:e._addCaptureHook)){var t;null===(t=this.instance)||void 0===t||t._addCaptureHook(((e,t)=>{this.on(e,t)}))}}register(e){var t,n;if(!vr(null===(t=this.instance)||void 0===t?void 0:t._addCaptureHook)&&(e.forEach((e=>{var t,n;null===(t=this.actionRegistry)||void 0===t||t.add(e),null===(n=e.steps)||void 0===n||n.forEach((e=>{var t;null===(t=this.actionEvents)||void 0===t||t.add((null==e?void 0:e.event)||"")}))})),null!==(n=this.instance)&&void 0!==n&&n.autocapture)){var r,o=new Set;e.forEach((e=>{var t;null===(t=e.steps)||void 0===t||t.forEach((e=>{null!=e&&e.selector&&o.add(null==e?void 0:e.selector)}))})),null===(r=this.instance)||void 0===r||r.autocapture.setElementSelectors(o)}}on(e,t){var n;null!=t&&0!=e.length&&(this.actionEvents.has(e)||this.actionEvents.has(null==t?void 0:t.event))&&this.actionRegistry&&(null===(n=this.actionRegistry)||void 0===n?void 0:n.size)>0&&this.actionRegistry.forEach((e=>{this.checkAction(t,e)&&this._debugEventEmitter.emit("actionCaptured",e.name)}))}_addActionHook(e){this.onAction("actionCaptured",(t=>e(t)))}checkAction(e,t){if(null==(null==t?void 0:t.steps))return!1;for(var n of t.steps)if(this.checkStep(e,n))return!0;return!1}onAction(e,t){return this._debugEventEmitter.on(e,t)}checkStepUrl(e,t){if(null!=t&&t.url){var n,r=null==e||null===(n=e.properties)||void 0===n?void 0:n.$current_url;if(!r||"string"!=typeof r)return!1;if(!Ci.matchString(r,null==t?void 0:t.url,(null==t?void 0:t.url_matching)||"contains"))return!1}return!0}static matchString(e,t,n){switch(n){case"regex":return!!qn&&ar(e,t);case"exact":return t===e;case"contains":var r=Ci.escapeStringRegexp(t).replace(/_/g,".").replace(/%/g,".*");return ar(e,r);default:return!1}}static escapeStringRegexp(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}checkStepElement(e,t){if((null!=t&&t.href||null!=t&&t.tag_name||null!=t&&t.text)&&!this.getElementsList(e).some((e=>!(null!=t&&t.href&&!Ci.matchString(e.href||"",null==t?void 0:t.href,(null==t?void 0:t.href_matching)||"exact"))&&((null==t||!t.tag_name||e.tag_name===(null==t?void 0:t.tag_name))&&!(null!=t&&t.text&&!Ci.matchString(e.text||"",null==t?void 0:t.text,(null==t?void 0:t.text_matching)||"exact")&&!Ci.matchString(e.$el_text||"",null==t?void 0:t.text,(null==t?void 0:t.text_matching)||"exact"))))))return!1;if(null!=t&&t.selector){var n,r=null==e||null===(n=e.properties)||void 0===n?void 0:n.$element_selectors;if(!r)return!1;if(!r.includes(null==t?void 0:t.selector))return!1}return!0}getElementsList(e){return null==(null==e?void 0:e.properties.$elements)?[]:null==e?void 0:e.properties.$elements}}class Si{constructor(e){this.instance=e,this.eventToSurveys=new Map,this.actionToSurveys=new Map}register(e){var t;vr(null===(t=this.instance)||void 0===t?void 0:t._addCaptureHook)||(this.setupEventBasedSurveys(e),this.setupActionBasedSurveys(e))}setupActionBasedSurveys(e){var t=e.filter((e=>{var t,n,r,o;return(null===(t=e.conditions)||void 0===t?void 0:t.actions)&&(null===(n=e.conditions)||void 0===n||null===(r=n.actions)||void 0===r||null===(o=r.values)||void 0===o?void 0:o.length)>0}));if(0!==t.length){if(null==this.actionMatcher){this.actionMatcher=new Ci(this.instance),this.actionMatcher.init();this.actionMatcher._addActionHook((e=>{this.onAction(e)}))}t.forEach((e=>{var t,n,r,o,i,a,s,l,c,u;e.conditions&&null!==(t=e.conditions)&&void 0!==t&&t.actions&&null!==(n=e.conditions)&&void 0!==n&&null!==(r=n.actions)&&void 0!==r&&r.values&&(null===(o=e.conditions)||void 0===o||null===(i=o.actions)||void 0===i||null===(a=i.values)||void 0===a?void 0:a.length)>0&&(null===(s=this.actionMatcher)||void 0===s||s.register(e.conditions.actions.values),null===(l=e.conditions)||void 0===l||null===(c=l.actions)||void 0===c||null===(u=c.values)||void 0===u||u.forEach((t=>{if(t&&t.name){var n=this.actionToSurveys.get(t.name);n&&n.push(e.id),this.actionToSurveys.set(t.name,n||[e.id])}})))}))}}setupEventBasedSurveys(e){var t;if(0!==e.filter((e=>{var t,n,r,o;return(null===(t=e.conditions)||void 0===t?void 0:t.events)&&(null===(n=e.conditions)||void 0===n||null===(r=n.events)||void 0===r||null===(o=r.values)||void 0===o?void 0:o.length)>0})).length){null===(t=this.instance)||void 0===t||t._addCaptureHook(((e,t)=>{this.onEvent(e,t)})),e.forEach((e=>{var t,n,r;null===(t=e.conditions)||void 0===t||null===(n=t.events)||void 0===n||null===(r=n.values)||void 0===r||r.forEach((t=>{if(t&&t.name){var n=this.eventToSurveys.get(t.name);n&&n.push(e.id),this.eventToSurveys.set(t.name,n||[e.id])}}))}))}}onEvent(e,t){var n,r,o=(null===(n=this.instance)||void 0===n||null===(r=n.persistence)||void 0===r?void 0:r.props[Tr])||[];if(Si.SURVEY_SHOWN_EVENT_NAME==e&&t&&o.length>0){var i,a=null==t||null===(i=t.properties)||void 0===i?void 0:i.$survey_id;if(a){var s=o.indexOf(a);s>=0&&(o.splice(s,1),this._updateActivatedSurveys(o))}}else this.eventToSurveys.has(e)&&this._updateActivatedSurveys(o.concat(this.eventToSurveys.get(e)||[]))}onAction(e){var t,n,r=(null===(t=this.instance)||void 0===t||null===(n=t.persistence)||void 0===n?void 0:n.props[Tr])||[];this.actionToSurveys.has(e)&&this._updateActivatedSurveys(r.concat(this.actionToSurveys.get(e)||[]))}_updateActivatedSurveys(e){var t,n;null===(t=this.instance)||void 0===t||null===(n=t.persistence)||void 0===n||n.register({[Tr]:[...new Set(e)]})}getSurveys(){var e,t,n=null===(e=this.instance)||void 0===e||null===(t=e.persistence)||void 0===t?void 0:t.props[Tr];return n||[]}getEventToSurveys(){return this.eventToSurveys}_getActionMatcher(){return this.actionMatcher}}o(Si,"SURVEY_SHOWN_EVENT_NAME","survey shown");var Ii={icontains:(e,t)=>e.some((e=>t.toLowerCase().includes(e.toLowerCase()))),not_icontains:(e,t)=>e.every((e=>!t.toLowerCase().includes(e.toLowerCase()))),regex:(e,t)=>e.some((e=>ar(t,e))),not_regex:(e,t)=>e.every((e=>!ar(t,e))),exact:(e,t)=>e.some((e=>t===e)),is_not:(e,t)=>e.every((e=>t!==e))};var wi,ki,Ti,xi,Mi=0,Ei=[],Ni=[],Ai=go.__b,Ri=go.__r,Oi=go.diffed,Li=go.__c,Di=go.unmount;function Fi(e,t){go.__h&&go.__h(ki,e,Mi||t),Mi=0;var n=ki.__H||(ki.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:Ni}),n.__[e]}function Pi(e){return Mi=1,function(e,t,n){var r=Fi(wi++,2);if(r.t=e,!r.__c&&(r.__=[zi(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=ki,!ki.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))};ki.u=!0;var i=ki.shouldComponentUpdate,a=ki.componentWillUpdate;ki.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)},ki.shouldComponentUpdate=o}return r.__N||r.__}(zi,e)}function Bi(e,t){var n=Fi(wi++,3);!go.__s&&Ui(n.__H,t)&&(n.__=e,n.i=t,ki.__H.__h.push(n))}function Hi(e){return Mi=5,Zi((function(){return{current:e}}),[])}function Zi(e,t){var n=Fi(wi++,7);return Ui(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function qi(e){var t=ki.context[e.__c],n=Fi(wi++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(ki)),t.props.value):e.__}function Wi(){for(var e;e=Ei.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ji),e.__H.__h.forEach(Gi),e.__H.__h=[]}catch(t){e.__H.__h=[],go.__e(t,e.__v)}}go.__b=function(e){ki=null,Ai&&Ai(e)},go.__r=function(e){Ri&&Ri(e),wi=0;var t=(ki=e.__c).__H;t&&(Ti===ki?(t.__h=[],ki.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=Ni,e.__N=e.i=void 0}))):(t.__h.forEach(ji),t.__h.forEach(Gi),t.__h=[],wi=0)),Ti=ki},go.diffed=function(e){Oi&&Oi(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==Ei.push(t)&&xi===go.requestAnimationFrame||((xi=go.requestAnimationFrame)||Yi)(Wi)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==Ni&&(e.__=e.__V),e.i=void 0,e.__V=Ni}))),Ti=ki=null},go.__c=function(e,t){t.some((function(e){try{e.__h.forEach(ji),e.__h=e.__h.filter((function(e){return!e.__||Gi(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],go.__e(n,e.__v)}})),Li&&Li(e,t)},go.unmount=function(e){Di&&Di(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{ji(e)}catch(e){t=e}})),n.__H=void 0,t&&go.__e(t,n.__v))};var Vi="function"==typeof requestAnimationFrame;function Yi(e){var t,n=function(){clearTimeout(r),Vi&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Vi&&(t=requestAnimationFrame(n))}function ji(e){var t=ki,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),ki=t}function Gi(e){var t=ki;e.__c=e.__(),ki=t}function Ui(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function zi(e,t){return"function"==typeof t?t(e):t}var Xi=jn;var 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 go.vnode&&go.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}=qi(yi),c=r.submitButtonTextColor||oi(r.submitButtonColor||li.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==qn||qn.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}=qi(yi);return Ji("div",{style:a?{backgroundColor:o||li.backgroundColor}:{},children:[Ji("div",{className:"survey-question",children:t}),n&&bi({component:No("div",{className:"survey-question-description"}),children:n,renderAsHtml:!i&&"text"!==r})]})}function ca(e){var{onClick:t}=e,{isPreviewMode:n}=qi(yi);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=oi(a.backgroundColor||li.backgroundColor),{isPopup:u}=qi(yi);return Ji(Ro,{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&&bi({component:No("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=Hi(null),[r,o]=Pi(null!==(t=e.defaultTextColor)&&void 0!==t?t:"black");return Bi((()=>{if(n.current){var e=function(e){var t=Qo.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=Hi(null),[s,l]=Pi("");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(Ro,{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]=Pi(null);return Ji(Ro,{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:br(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=Hi(null),l=Zi((()=>(e=>{if(!e.shuffleOptions)return e.choices;var t=e.choices,n="";e.hasOpenChoice&&(n=t.pop());var r=hi(t,pi(t));return e.hasOpenChoice&&(e.choices.push(n),r.push(n)),r})(t)),[t]),[c,u]=Pi(t.type===ai.MultipleChoice?[]:null),[d,p]=Pi(!1),[h,f]=Pi(""),m=t.type===ai.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===ai.SingleChoice?u(i):t.type===ai.MultipleChoice&&dr(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(Ro,{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===ai.SingleChoice?u(n):t.type===ai.MultipleChoice&&dr(c)?f(n):void 0}})]}):a}),Ji("span",{className:"choice-check",style:{color:"black"},children:ia})]})}))}),Ji(sa,{text:t.buttonText||"Submit",submitDisabled:(br(c)||dr(c)&&!d&&0===c.length||dr(c)&&d&&!h&&0===c.length&&!t.optional)&&!t.optional,appearance:o,onSubmit:()=>{d&&t.type===ai.MultipleChoice?dr(c)&&i([...c,h]):i(c)},onPreviewSubmit:()=>{d&&t.type===ai.MultipleChoice?dr(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=Jn("[Surveys]"),wa=qn,ka=jn;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(vi(e))&&!mi(e))(e);if(!a){this.addSurveyToFocus(e.id);var s=((e,t,n)=>{var r=$o.createElement("div");r.className="PostHogSurvey".concat(t);var o=r.attachShadow({mode:"open"});if(e){var i=Object.assign($o.createElement("style"),{innerText:e});o.appendChild(i)}return $o.body.appendChild(r),o})(ni(null==e?void 0:e.appearance),e.id);Ko(Ji(Ea,{posthog:this.posthog,survey:e,removeSurveyFromFocus:this.removeSurveyFromFocus,isPopup:!0},"popover-survey"),s)}})),o(this,"handleWidget",(e=>{var t=function(e){var t,n=Xi.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(Xi.createElement("style"),{innerText:i})),Xi.body.appendChild(n),o}(e),n=ni(e.appearance);t.appendChild(Object.assign(ka.createElement("style"),{innerText:n})),Ko(Ji(Aa,{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");rr(n,"click",(()=>{i&&(i.style.display="none"===i.style.display?"block":"none",rr(i,"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!=ii.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)=>{Ko(Ji(Ea,{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(br(t.surveyInFocus)){var n,r,o;if(e.type===ii.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===ii.Popover&&t.canShowNextEventBasedSurvey()&&t.handlePopoverSurvey(e)}}))}),n)})),o(this,"addSurveyToFocus",(e=>{br(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,t,n,r,o){var[i,a]=Pi(r||0===n),[s,l]=Pi(!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 rr(wa,"PHSurveyClosed",s),rr(wa,"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.")}),[]),Bi((()=>{var t;if(!r&&null!==(t=e.conditions)&&void 0!==t&&t.url){var n=()=>{var t=function(e){var t,n,r;if(null===(t=e.conditions)||void 0===t||!t.url)return!0;var o=null==qn||null===(n=qn.location)||void 0===n?void 0:n.href;if(!o)return!1;var i,a=[e.conditions.url];return Ii[(i=null===(r=e.conditions)||void 0===r?void 0:r.urlMatchType,null!=i?i:"icontains")](a,o)}(e);t||(a(!1),o(e.id))};rr(wa,"popstate",n),rr(wa,"hashchange",n);var i=wa.history.pushState,s=wa.history.replaceState;return wa.history.pushState=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];i.apply(this,t),n()},wa.history.replaceState=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];s.apply(this,t),n()},()=>{wa.removeEventListener("popstate",n),wa.removeEventListener("hashchange",n),wa.history.pushState=i,wa.history.replaceState=s}}}),[r,e,o]),{isPopupVisible:i,isSurveySent:s,setIsPopupVisible:a}}function Ea(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:_}=Ma(l,u,g,v,h),C=b||p===l.questions.length,S=null!==(r=d)&&void 0!==r&&r.left&&Cr(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(yi.Provider,{value:{isPreviewMode:v,previewPageIndex:p,handleCloseSurveyPopup:()=>di(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||li,styleOverrides:t(t({},d),S),onClose:()=>_(!1)}):Ji(Na,{survey:l,forceDisableHtml:!!c,posthog:u,styleOverrides:d})}):null}function Na(e){var n,r,{survey:o,forceDisableHtml:i,posthog:a,styleOverrides:s}=e,l=oi((null===(n=o.appearance)||void 0===n?void 0:n.backgroundColor)||li.backgroundColor),[c,u]=Pi({}),{isPreviewMode:d,previewPageIndex:p,handleCloseSurveyPopup:h,isPopup:f,onPreviewSubmit:m}=qi(yi),[v,g]=Pi(p||0),y=Zi((()=>fi(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)||li.backgroundColor}:{},children:[f&&Ji(ca,{onClick:()=>h()}),Ra({question:e,forceDisableHtml:i,displayQuestionIndex:n,appearance:o.appearance||li,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===si.End?ui(t(t({},c),{},{[s]:n}),o,a):g(l)}else i===o.questions.length-1?ui(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 Aa(e){var t,n,{survey:r,forceDisableHtml:o,posthog:i,readOnly:a,removeSurveyFromFocus:s}=e,[l,c]=Pi(!1),[u,d]=Pi({}),p=Hi(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,h=null!==(u=ka.querySelector(r.appearance.widgetSelector||""))&&void 0!==u?u:void 0;rr(h,"click",(()=>{c(!l)})),null==h||h.setAttribute("PHWidgetSurveyClickListener","true")}}}else Ia.error("FeedbackWidget called without a PostHog instance.")}),[]),Ji(Ro,{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:oi(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(Ea,{posthog:i,survey:r,forceDisableHtml:o,style:u,removeSurveyFromFocus:s,isPopup:!0},"feedback-widget-survey")]})}var Ra=e=>{var{question:n,forceDisableHtml:r,displayQuestionIndex:o,appearance:i,onSubmit:a,onPreviewSubmit:s}=e,l={[ai.Open]:pa,[ai.Link]:ha,[ai.Rating]:fa,[ai.SingleChoice]:va,[ai.MultipleChoice]:va},c={question:n,forceDisableHtml:r,appearance:i,onPreviewSubmit:e=>{s(e)},onSubmit:e=>{a(e)}},u={[ai.Open]:{},[ai.Link]:{},[ai.Rating]:{displayQuestionIndex:o},[ai.SingleChoice]:{displayQuestionIndex:o},[ai.MultipleChoice]:{displayQuestionIndex:o}},d=l[n.type],p=t(t({},c),u[n.type]);return Ji(d,t({},p))};function Oa(e){return!vr(Event)&&La(e,Event)}function La(e,t){try{return e instanceof t}catch(e){return!1}}function Da(e){return br(e)||!mr(e)&&!pr(e)}function Fa(e,t){return Object.prototype.toString.call(e)==="[object ".concat(t,"]")}function Pa(e){return Fa(e,"DOMError")}Un.__PosthogExtensions__=Un.__PosthogExtensions__||{},Un.__PosthogExtensions__.canActivateRepeatedly=mi,Un.__PosthogExtensions__.generateSurveys=xa,Un.extendPostHogWithSurveys=xa;var Ba=/\(error: (.*)\)/,Ha=50,Za="?";function qa(e,t,n,r){var o={platform:"web:javascript",filename:e,function:"<anonymous>"===t?Za:t,in_app:!0};return vr(n)||(o.lineno=n),vr(r)||(o.colno=r),o}var Wa=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Va=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Ya=/\((\S*)(?::(\d+))(?::(\d+))\)/,ja=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Ga=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Ua=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=Ba.test(s)?s.replace(Ba,"$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>=Ha)break}}}return function(e){if(!e.length)return[];var n=Array.from(e);return n.reverse(),n.slice(0,Ha).map((e=>t(t({},e),{},{filename:e.filename||za(n).filename,function:e.function||Za})))}(r)}}(...[[30,e=>{var t=Wa.exec(e);if(t){var[,n,r,o]=t;return qa(n,Za,+r,+o)}var i=Va.exec(e);if(i){if(i[2]&&0===i[2].indexOf("eval")){var a=Ya.exec(i[2]);a&&(i[2]=a[1],i[3]=a[2],i[4]=a[3])}var[s,l]=Xa(i[1]||Za,i[2]);return qa(l,s,i[3]?+i[3]:void 0,i[4]?+i[4]:void 0)}}],[50,e=>{var t=ja.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){var n=Ga.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]||Za;return[o,r]=Xa(o,r),qa(r,o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]);function za(e){return e[e.length-1]||{}}var Xa=(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]:Za,n?"safari-extension:".concat(t):"safari-web-extension:".concat(t)]:[e,t]},Ka=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;function Ja(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e.stacktrace||e.stack||"",r=function(e){if(e&&Qa.test(e.message))return 1;return 0}(e);try{var o=Ua(n,r);return o.slice(0,o.length-t)}catch(e){}return[]}var Qa=/Minified React error #\d+;/i;function $a(e,t){var n,r,o=Ja(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 es(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=Ja(t.syntheticException,1);l.length&&(s.stacktrace={frames:l,type:"raw"})}return{$exception_list:[s],$exception_level:"error"}}function ts(e){return gr(e)&&!yr(e)&&zn.indexOf(e)>=0}function ns(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=Ja(null==t?void 0:t.syntheticException,1);c.length&&(l.stacktrace={frames:c,type:"raw"})}return{$exception_list:[l],$exception_level:ts(e.level)?e.level:"error"}}function rs(e,n){var{error:r,event:o}=e,i={$exception_list:[]},a=r||o;if(Pa(a)||function(e){return Fa(e,"DOMException")}(a)){var s=a;if(function(e){return"stack"in e}(a))i=$a(a,n);else{var l=s.name||(Pa(s)?"DOMError":"DOMException"),c=s.message?"".concat(l,": ").concat(s.message):l,u=Pa(s)?"DOMError":"DOMException";i=es(c,t(t({},n),{},{overrideExceptionType:u,defaultExceptionMessage:c}))}return"code"in s&&(i.$exception_DOMException_code="".concat(s.code)),i}if(function(e){return Fa(e,"ErrorEvent")}(a)&&a.error)return $a(a.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 La(e,Error)}}(a))return $a(a,n);if(function(e){return Fa(e,"Object")}(a)||Oa(a))return ns(a,n);if(vr(r)&&gr(o)){var d="Error",p=o,h=o.match(Ka);return h&&(d=h[1],p=h[2]),es(p,t(t({},n),{},{overrideExceptionType:d,defaultExceptionMessage:p}))}return es(a,n)}function os(e){var[t]=e,n=function(e){if(Da(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 Da(n)?es("Non-Error promise rejection captured with value: ".concat(String(n)),{handled:!1,synthetic:!1,overrideExceptionType:"UnhandledRejection"}):rs({event:n},{handled:!1,overrideExceptionType:"UnhandledRejection",defaultExceptionMessage:String(n)})}var is=Jn("[ExceptionAutocapture]"),as={wrapOnError:e=>{var t=qn;t||is.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=rs({event:o[0],error:o[4]});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=qn;t||is.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=os(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}}};Un.__PosthogExtensions__=Un.__PosthogExtensions__||{},Un.__PosthogExtensions__.errorWrappingFunctions=as,Un.__PosthogExtensions__.parseErrorAsProperties=rs,Un.posthogErrorWrappingFunctions=as,Un.parseErrorAsProperties=rs;var ss=(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)}};Un.__PosthogExtensions__=Un.__PosthogExtensions__||{};var ls={_patchFetch:e=>zr(qn,"fetch",(t=>function(){var n=r((function*(n,r){var o=new Request(n,r);return ss(e,o),t(o)}));return function(e,t){return n.apply(this,arguments)}}())),_patchXHR:e=>zr(qn.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 ss(e,s),t.call(this,n,s.url,o,i,a)}))};Un.__PosthogExtensions__.tracingHeadersPatchFns=ls,Un.postHogTracingHeadersPatchFns=ls;var cs,us,ds,ps=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},hs=function(e){if("loading"===document.readyState)return"loading";var t=ps();if(t){if(e<t.domInteractive)return"loading";if(0===t.domContentLoadedEventStart||e<t.domContentLoadedEventStart)return"dom-interactive";if(0===t.domComplete||e<t.domComplete)return"dom-content-loaded"}return"complete"},fs=function(e){var t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},ms=function(e,t){var n="";try{for(;e&&9!==e.nodeType;){var r=e,o=r.id?"#"+r.id:fs(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},vs=-1,gs=function(){return vs},ys=function(e){addEventListener("pageshow",(function(t){t.persisted&&(vs=t.timeStamp,e(t))}),!0)},bs=function(){var e=ps();return e&&e.activationStart||0},_s=function(e,t){var n=ps(),r="navigate";return gs()>=0?r="back-forward-cache":n&&(document.prerendering||bs()>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}},Cs=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){}},Ss=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))}},Is=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},ws=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},ks=function(e){var t=!1;return function(){t||(e(),t=!0)}},Ts=-1,xs=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},Ms=function(e){"hidden"===document.visibilityState&&Ts>-1&&(Ts="visibilitychange"===e.type?e.timeStamp:0,Ns())},Es=function(){addEventListener("visibilitychange",Ms,!0),addEventListener("prerenderingchange",Ms,!0)},Ns=function(){removeEventListener("visibilitychange",Ms,!0),removeEventListener("prerenderingchange",Ms,!0)},As=function(){return Ts<0&&(Ts=xs(),Es(),ys((function(){setTimeout((function(){Ts=xs(),Es()}),0)}))),{get firstHiddenTime(){return Ts}}},Rs=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},Os=[1800,3e3],Ls=function(e,t){t=t||{},Rs((function(){var n,r=As(),o=_s("FCP"),i=Cs("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(i.disconnect(),e.startTime<r.firstHiddenTime&&(o.value=Math.max(e.startTime-bs(),0),o.entries.push(e),n(!0)))}))}));i&&(n=Ss(e,o,Os,t.reportAllChanges),ys((function(r){o=_s("FCP"),n=Ss(e,o,Os,t.reportAllChanges),Is((function(){o.value=performance.now()-r.timeStamp,n(!0)}))})))}))},Ds=[.1,.25],Fs=0,Ps=1/0,Bs=0,Hs=function(e){e.forEach((function(e){e.interactionId&&(Ps=Math.min(Ps,e.interactionId),Bs=Math.max(Bs,e.interactionId),Fs=Bs?(Bs-Ps)/7+1:0)}))},Zs=function(){"interactionCount"in performance||cs||(cs=Cs("event",Hs,{type:"event",buffered:!0,durationThreshold:0}))},qs=[],Ws=new Map,Vs=0,Ys=function(){return(cs?Fs:performance.interactionCount||0)-Vs},js=[],Gs=function(e){if(js.forEach((function(t){return t(e)})),e.interactionId||"first-input"===e.entryType){var t=qs[qs.length-1],n=Ws.get(e.interactionId);if(n||qs.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]};Ws.set(r.id,r),qs.push(r)}qs.sort((function(e,t){return t.latency-e.latency})),qs.length>10&&qs.splice(10).forEach((function(e){return Ws.delete(e.id)}))}}},Us=function(e){var t=self.requestIdleCallback||self.setTimeout,n=-1;return e=ks(e),"hidden"===document.visibilityState?e():(n=t(e),ws(e)),n},zs=[200,500],Xs=[],Ks=[],Js=new WeakMap,Qs=new Map,$s=-1,el=function(e){Xs=Xs.concat(e),tl()},tl=function(){$s<0&&($s=Us(nl))},nl=function(){Qs.size>10&&Qs.forEach((function(e,t){Ws.has(t)||Qs.delete(t)}));var e=qs.map((function(e){return Js.get(e.entries[0])})),t=Ks.length-50;Ks=Ks.filter((function(n,r){return r>=t||e.includes(n)}));for(var n=new Set,r=0;r<Ks.length;r++){var o=Ks[r];rl(o.startTime,o.processingEnd).forEach((function(e){n.add(e)}))}for(var i=0;i<50;i++){var a=Xs[Xs.length-1-i];if(!a||a.startTime<ds)break;n.add(a)}Xs=Array.from(n),$s=-1};js.push((function(e){e.interactionId&&e.target&&!Qs.has(e.interactionId)&&Qs.set(e.interactionId,e.target)}),(function(e){var t,n=e.startTime+e.duration;ds=Math.max(ds,e.processingEnd);for(var r=Ks.length-1;r>=0;r--){var o=Ks[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]},Ks.push(t)),(e.interactionId||"first-input"===e.entryType)&&Js.set(e,t),tl()}));var rl=function(e,t){for(var n,r=[],o=0;n=Xs[o];o++)if(!(n.startTime+n.duration<e)){if(n.startTime>t)break;r.push(n)}return r},ol=[2500,4e3],il={},al={onLCP:function(e,t){!function(e,t){t=t||{},Rs((function(){var n,r=As(),o=_s("LCP"),i=function(e){t.reportAllChanges||(e=e.slice(-1)),e.forEach((function(e){e.startTime<r.firstHiddenTime&&(o.value=Math.max(e.startTime-bs(),0),o.entries=[e],n())}))},a=Cs("largest-contentful-paint",i);if(a){n=Ss(e,o,ol,t.reportAllChanges);var s=ks((function(){il[o.id]||(i(a.takeRecords()),a.disconnect(),il[o.id]=!0,n(!0))}));["keydown","click"].forEach((function(e){addEventListener(e,(function(){return Us(s)}),!0)})),ws(s),ys((function(r){o=_s("LCP"),n=Ss(e,o,ol,t.reportAllChanges),Is((function(){o.value=performance.now()-r.timeStamp,il[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=ps();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:ms(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||{},Ls(ks((function(){var n,r=_s("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=Cs("layout-shift",a);s&&(n=Ss(e,r,Ds,t.reportAllChanges),ws((function(){a(s.takeRecords()),n(!0)})),ys((function(){o=0,r=_s("CLS",0),n=Ss(e,r,Ds,t.reportAllChanges),Is((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:ms(o.node),largestShiftTime:r.startTime,largestShiftValue:r.value,largestShiftSource:o,largestShiftEntry:r,loadState:hs(r.startTime)})}}return Object.assign(e,{attribution:n})}(t);e(n)}),t)},onFCP:function(e,t){Ls((function(t){var n=function(e){var t={timeToFirstByte:0,firstByteToFCP:e.value,loadState:hs(gs())};if(e.entries.length){var n=ps(),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:hs(e.entries[0].startTime),navigationEntry:n,fcpEntry:r}}}return Object.assign(e,{attribution:t})}(t);e(n)}),t)},onINP:function(e,t){us||(us=Cs("long-animation-frame",el)),function(e,t){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(t=t||{},Rs((function(){var n;Zs();var r,o=_s("INP"),i=function(e){Us((function(){e.forEach(Gs);var t,n=(t=Math.min(qs.length-1,Math.floor(Ys()/50)),qs[t]);n&&n.latency!==o.value&&(o.value=n.latency,o.entries=n.entries,r())}))},a=Cs("event",i,{durationThreshold:null!==(n=t.durationThreshold)&&void 0!==n?n:40});r=Ss(e,o,zs,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),ws((function(){i(a.takeRecords()),r(!0)})),ys((function(){Vs=0,qs.length=0,Ws.clear(),o=_s("INP"),r=Ss(e,o,zs,t.reportAllChanges)})))})))}((function(t){var n=function(e){var t=e.entries[0],n=Js.get(t),r=t.processingStart,o=n.processingEnd,i=n.entries.sort((function(e,t){return e.processingStart-t.processingStart})),a=rl(t.startTime,o),s=e.entries.find((function(e){return e.target})),l=s&&s.target||Qs.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:ms(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:hs(t.startTime)};return Object.assign(e,{attribution:d})}(t);e(n)}),t)}};function sl(e,t){return t.length>e?t.slice(0,e)+"...":t}function ll(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do{t=t.previousSibling}while(t&&!xr(t));return t}function cl(e,t,n,r){var o=e.tagName.toLowerCase(),i={tag_name:o};Rr.indexOf(o)>-1&&!n&&("a"===o.toLowerCase()||"button"===o.toLowerCase()?i.$el_text=sl(1024,Wr(e)):i.$el_text=sl(1024,Ar(e)));var a=Nr(e);a.length>0&&(i.classes=a.filter((function(e){return""!==e}))),er(e.attributes,(function(n){var o;if((!Lr(e)||-1!==["name","id","class","aria-label"].indexOf(n.name))&&((null==r||!r.includes(n.name))&&!t&&qr(n.value)&&(o=n.name,!gr(o)||"_ngcontent"!==o.substring(0,10)&&"_nghost"!==o.substring(0,7)))){var a=n.value;"class"===n.name&&(a=Er(a).join(" ")),i["attr__"+n.name]=sl(1024,a)}}));for(var s=1,l=1,c=e;c=ll(c);)s++,c.tagName===e.tagName&&l++;return i.nth_child=s,i.nth_of_type=l,i}function ul(e,t){for(var n,r,o,{e:i,maskAllElementAttributes:a,maskAllText:s,elementAttributeIgnoreList:l,elementsChainAsString:c}=t,u=[e],d=e;d.parentNode&&!Mr(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(er(u,(e=>{var t=Or(e);"a"===e.tagName.toLowerCase()&&(g=e.getAttribute("href"),g=t&&g&&qr(g)&&g),or(Nr(e),"ph-no-capture")&&(y=!0),m.push(cl(e,a,s,l));var n=function(e){if(!Or(e))return{};var t={};return er(e.attributes,(function(e){if(e.name&&0===e.name.indexOf("data-ph-capture-attribute")){var n=e.name.replace("data-ph-capture-attribute-",""),r=e.value;n&&r&&qr(r)&&(t[n]=r)}})),t}(e);tr(v,n)})),y)return{props:{},explicitNoCapture:y};if(s||("a"===e.tagName.toLowerCase()||"button"===e.tagName.toLowerCase()?m[0].$el_text=Wr(e):m[0].$el_text=Ar(e)),g){var b,_;m[0].attr__href=g;var C=null===(h=g,f=null==jn?void 0:jn.createElement("a"),b=vr(f)?null:(f.href=h,f))||void 0===b?void 0:b.host,S=null==qn||null===(_=qn.location)||void 0===_?void 0:_.host;C&&S&&C!==S&&(p=g)}return{props:tr({$event_type:i.type,$ce_version:1},c?{}:{$elements:m},{$elements_chain:Yr(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)}}Un.__PosthogExtensions__=Un.__PosthogExtensions__||{},Un.__PosthogExtensions__.postHogWebVitalsCallbacks=al,Un.postHogWebVitalsCallbacks=al;var dl={};function pl(e){return function(e,t){var n=dl[e];if(n)return n;var r=t[e];if(hr(r)&&!fr())return dl[e]=r.bind(t);var o=t.document;if(o&&pr(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){Kn.warn("Could not create sandbox iframe for ".concat(e," check, bailing to assignableWindow.").concat(e,": "),t)}return r&&pr(r)?dl[e]=r.bind(t):r}("MutationObserver",e)}function hl(e){var t=function(e){return vr(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 fl(e,t){return Cr(e)&&e>=t}class ml{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=hl(e);br(t)||this._ignoreClick(t)||this._clicks.push(t),this._clicks.length&&vr(this._checkClickTimer)&&(this._checkClickTimer=Un.setTimeout((()=>{this._checkClicks()}),1e3))})),o(this,"_onScroll",(()=>{var e=Date.now();e%50==0&&this._clicks.forEach((t=>{vr(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=pl(Un);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,Un.removeEventListener("click",this._onClick),Un.removeEventListener("scroll",this._onScroll,{capture:!0}),Un.removeEventListener("selectionchange",this._onSelectionChange)}onMutation(e){this._lastMutation=Date.now()}_startClickObserver(){rr(Un,"click",this._onClick)}_startScrollObserver(){rr(Un,"scroll",this._onScroll,{capture:!0})}_startSelectionChangedObserver(){rr(Un,"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||!(!Mr(e.node,"html")&&xr(e.node)&&!Rr.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=fl(t.scrollDelayMs,this._config.scroll_threshold_ms),o=fl(t.selectionChangedDelayMs,this._config.selection_change_threshold_ms),i=fl(t.mutationDelayMs,this._config.mutation_threshold_ms),a=fl(t.absoluteDelayMs,1.1*this._config.mutation_threshold_ms),s=Cr(t.scrollDelayMs)&&t.scrollDelayMs<this._config.scroll_threshold_ms,l=Cr(t.mutationDelayMs)&&t.mutationDelayMs<this._config.mutation_threshold_ms,c=Cr(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&&vr(this._checkClickTimer)&&(this._checkClickTimer=Un.setTimeout((()=>{this._checkClicks()}),1e3))}}_captureDeadClick(e,n){this.instance.capture("$dead_click",t(t(t({},n),ul(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)})}}Un.__PosthogExtensions__=Un.__PosthogExtensions__||{},Un.__PosthogExtensions__.initDeadClicksAutocapture=(e,t)=>new ml(e,t)}();
|
|
2
2
|
//# sourceMappingURL=all-external-dependencies.js.map
|