posthog-js 1.187.0 → 1.187.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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.js +1 -10
- package/dist/array.full.js.map +1 -1
- package/dist/array.full.no-external.js +1 -10
- package/dist/array.full.no-external.js.map +1 -1
- package/dist/array.js +1 -10
- package/dist/array.js.map +1 -1
- package/dist/array.no-external.js +1 -10
- package/dist/array.no-external.js.map +1 -1
- package/dist/dead-clicks-autocapture.js +1 -1
- package/dist/dead-clicks-autocapture.js.map +1 -1
- package/dist/exception-autocapture.js +1 -1
- package/dist/exception-autocapture.js.map +1 -1
- package/dist/external-scripts-loader.js +1 -1
- package/dist/external-scripts-loader.js.map +1 -1
- package/dist/main.js +1 -10
- package/dist/main.js.map +1 -1
- package/dist/module.full.js +1 -10
- package/dist/module.full.js.map +1 -1
- package/dist/module.full.no-external.js +1 -10
- package/dist/module.full.no-external.js.map +1 -1
- package/dist/module.js +1 -10
- package/dist/module.js.map +1 -1
- package/dist/module.no-external.js +1 -10
- package/dist/module.no-external.js.map +1 -1
- package/dist/recorder-v2.js +1 -1
- package/dist/recorder-v2.js.map +1 -1
- package/dist/recorder.js +1 -1
- package/dist/recorder.js.map +1 -1
- package/dist/surveys-preview.js +1 -1
- package/dist/surveys-preview.js.map +1 -1
- package/dist/surveys.js +1 -1
- package/dist/surveys.js.map +1 -1
- package/dist/tracing-headers.js +1 -1
- package/dist/tracing-headers.js.map +1 -1
- package/dist/web-vitals.js +1 -1
- package/dist/web-vitals.js.map +1 -1
- package/lib/package.json +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(){"use strict";var e,t=Object.defineProperty,n=(e,n,o)=>((e,n,o)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[n]=o)(e,"symbol"!=typeof n?n+"":n,o),o=Object.defineProperty,r=(e,t,n)=>((e,t,n)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),i=(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))(i||{});const s={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},a={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},l={};function c(e){if(l[e])return l[e];const t=globalThis[e],n=t.prototype,o=e in s?s[e]:void 0,r=Boolean(o&&o.every((e=>{var t,o;return Boolean(null==(o=null==(t=Object.getOwnPropertyDescriptor(n,e))?void 0:t.get)?void 0:o.toString().includes("[native code]"))}))),i=e in a?a[e]:void 0,c=Boolean(i&&i.every((e=>{var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))})));if(r&&c)return l[e]=t.prototype,t.prototype;try{const o=document.createElement("iframe");document.body.appendChild(o);const r=o.contentWindow;if(!r)return t.prototype;const i=r[e].prototype;return document.body.removeChild(o),i?l[e]=i:n}catch{return n}}const u={};function d(e,t,n){var o;const r=`${e}.${String(n)}`;if(u[r])return u[r].call(t);const i=c(e),s=null==(o=Object.getOwnPropertyDescriptor(i,n))?void 0:o.get;return s?(u[r]=s,s.call(t)):t[n]}const p={};function h(e,t,n){const o=`${e}.${String(n)}`;if(p[o])return p[o].bind(t);const r=c(e)[n];return"function"!=typeof r?t[n]:(p[o]=r,r.bind(t))}const f={childNodes:function(e){return d("Node",e,"childNodes")},parentNode:function(e){return d("Node",e,"parentNode")},parentElement:function(e){return d("Node",e,"parentElement")},textContent:function(e){return d("Node",e,"textContent")},contains:function(e,t){return h("Node",e,"contains")(t)},getRootNode:function(e){return h("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?d("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?d("Element",e,"shadowRoot"):null},querySelector:function(e,t){return d("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return d("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return c("MutationObserver").constructor}};function m(e){return e.nodeType===e.ELEMENT_NODE}function g(e){const t=e&&"host"in e&&"mode"in e&&f.host(e)||null;return Boolean(t&&"shadowRoot"in t&&f.shadowRoot(t)===e)}function y(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function v(e){try{const n=e.rules||e.cssRules;if(!n)return null;const o=Array.from(n,(t=>b(t,e.href))).join("");return(t=o).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}catch(e){return null}var t}function b(e,t){if(function(e){return"styleSheet"in e}(e)){let t;try{t=v(e.styleSheet)||function(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}(e)}catch(n){t=e.cssText}return e.styleSheet.href?A(t,e.styleSheet.href):t}{let n=e.cssText;return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(n=function(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}(n)),t?A(n,t):n}}function _(e,t){return Array.from(e.styleSheets).find((e=>e.href===t))}let C=class{constructor(){r(this,"idNodeMap",new Map),r(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;const 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){const 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){const n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){const n=this.getNode(e);if(n){const e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function S(e){let{element:t,maskInputOptions:n,tagName:o,type:r,value:i,maskInputFn:s}=e,a=i||"";const l=r&&I(r);return(n[o.toLowerCase()]||l&&n[l])&&(a=s?s(a,t):"*".repeat(a.length)),a}function I(e){return e.toLowerCase()}const w="__rrweb_original__";function k(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?I(t):null}function T(e,t){var n;let o;try{o=new URL(e,null!=t?t:window.location.href)}catch(e){return null}const r=o.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(n=null==r?void 0:r[1])&&void 0!==n?n:null}const M=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,x=/^(?:[a-z+]+:)?\/\//i,N=/^www\..*/i,E=/^(data:)([^,]*),(.*)/i;function A(e,t){return(e||"").replace(M,((e,n,o,r,i,s)=>{const a=o||i||s,l=n||r||"";if(!a)return e;if(x.test(a)||N.test(a))return`url(${l}${a}${l})`;if(E.test(a))return`url(${l}${a}${l})`;if("/"===a[0])return`url(${l}${function(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}(t)+a}${l})`;const c=t.split("/"),u=a.split("/");c.pop();for(const e of u)"."!==e&&(".."===e?c.pop():c.push(e));return`url(${l}${c.join("/")}${l})`}))}let R=1;const O=new RegExp("[^a-z0-9-_:]"),L=-2;function D(){return R++}let F,B;const H=/^[^ \t\n\r\u000c]+/,P=/^[, \t\n\r\u000c]+/;const Z=new WeakMap;function q(e,t){return t&&""!==t.trim()?V(e,t):t}function W(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function V(e,t){let n=Z.get(e);if(n||(n=e.createElement("a"),Z.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function $(e,t,n,o){return o?"src"===n||"href"===n&&("use"!==t||"#"!==o[0])||"xlink:href"===n&&"#"!==o[0]?q(e,o):"background"!==n||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n?function(e,t){if(""===t.trim())return t;let n=0;function o(e){let o;const r=e.exec(t.substring(n));return r?(o=r[0],n+=o.length,o):""}const r=[];for(;o(P),!(n>=t.length);){let i=o(H);if(","===i.slice(-1))i=q(e,i.substring(0,i.length-1)),r.push(i);else{let o="";i=q(e,i);let s=!1;for(;;){const e=t.charAt(n);if(""===e){r.push((i+o).trim());break}if(s)")"===e&&(s=!1);else{if(","===e){n+=1,r.push((i+o).trim());break}"("===e&&(s=!0)}o+=e,n+=1}}}return r.join(", ")}(e,o):"style"===n?A(o,V(e)):"object"===t&&"data"===n?q(e,o):o:q(e,o):o}function Y(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function G(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&G(f.parentNode(e),t,n);for(let n=e.classList.length;n--;){const o=e.classList[n];if(t.test(o))return!0}return!!n&&G(f.parentNode(e),t,n)}function j(e,t,n,o){let r;if(m(e)){if(r=e,!f.childNodes(r).length)return!1}else{if(null===f.parentElement(e))return!1;r=f.parentElement(e)}try{if("string"==typeof t){if(o){if(r.closest(`.${t}`))return!0}else if(r.classList.contains(t))return!0}else if(G(r,t,o))return!0;if(n)if(o){if(r.closest(n))return!0}else if(r.matches(n))return!0}catch(e){}return!1}function z(e,t){const{doc:n,mirror:o,blockClass:r,blockSelector:s,needsMask:a,inlineStylesheet:l,maskInputOptions:c={},maskTextFn:u,maskInputFn:d,dataURLOptions:p={},inlineImages:h,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:y=!1}=t,b=function(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return 1===n?void 0:n}(n,o);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:i.Document,childNodes:[],compatMode:e.compatMode}:{type:i.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:i.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:b};case e.ELEMENT_NODE:return function(e,t){const{doc:n,blockClass:o,blockSelector:r,inlineStylesheet:s,maskInputOptions:a={},maskInputFn:l,dataURLOptions:c={},inlineImages:u,recordCanvas:d,keepIframeSrcFn:p,newlyAddedElement:h=!1,rootId:m}=t,g=function(e,t,n){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){const o=e.classList[n];if(t.test(o))return!0}if(n)return e.matches(n)}catch(e){}return!1}(e,o,r),y=function(e){if(e instanceof HTMLFormElement)return"form";const t=I(e.tagName);return O.test(t)?"div":t}(e);let b={};const C=e.attributes.length;for(let t=0;t<C;t++){const o=e.attributes[t];Y(y,o.name,o.value)||(b[o.name]=$(n,y,I(o.name),o.value))}if("link"===y&&s){const t=e.href;let o=_(n,t);if(!o&&t.includes(".css")){o=_(n,window.location.origin+"/"+t.replace(window.location.href,""))}let r=null;o&&(r=v(o)),r&&(delete b.rel,delete b.href,b._cssText=r)}if("style"===y&&e.sheet&&!(e.innerText||f.textContent(e)||"").trim().length){const t=v(e.sheet);t&&(b._cssText=t)}if("input"===y||"textarea"===y||"select"===y){const t=e.value,n=e.checked;"radio"!==b.type&&"checkbox"!==b.type&&"submit"!==b.type&&"button"!==b.type&&t?b.value=S({element:e,type:k(e),tagName:y,value:t,maskInputOptions:a,maskInputFn:l}):n&&(b.checked=n)}"option"===y&&(e.selected&&!a.select?b.selected=!0:delete b.selected);"dialog"===y&&e.open&&(b.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal");if("canvas"===y&&d)if("2d"===e.__context)(function(e){const t=e.getContext("2d");if(!t)return!0;for(let n=0;n<e.width;n+=50)for(let o=0;o<e.height;o+=50){const r=t.getImageData,i=w in r?r[w]:r;if(new Uint32Array(i.call(t,n,o,Math.min(50,e.width-n),Math.min(50,e.height-o)).data.buffer).some((e=>0!==e)))return!1}return!0})(e)||(b.rr_dataURL=e.toDataURL(c.type,c.quality));else if(!("__context"in e)){const t=e.toDataURL(c.type,c.quality),o=n.createElement("canvas");o.width=e.width,o.height=e.height;t!==o.toDataURL(c.type,c.quality)&&(b.rr_dataURL=t)}if("img"===y&&u){F||(F=n.createElement("canvas"),B=F.getContext("2d"));const t=e,o=t.currentSrc||t.getAttribute("src")||"<unknown-src>",r=t.crossOrigin,i=()=>{t.removeEventListener("load",i);try{F.width=t.naturalWidth,F.height=t.naturalHeight,B.drawImage(t,0,0),b.rr_dataURL=F.toDataURL(c.type,c.quality)}catch(e){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?i():t.addEventListener("load",i));console.warn(`Cannot inline img src=${o}! Error: ${e}`)}"anonymous"===t.crossOrigin&&(r?b.crossOrigin=r:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?i():t.addEventListener("load",i)}if("audio"===y||"video"===y){const t=b;t.rr_mediaState=e.paused?"paused":"played",t.rr_mediaCurrentTime=e.currentTime,t.rr_mediaPlaybackRate=e.playbackRate,t.rr_mediaMuted=e.muted,t.rr_mediaLoop=e.loop,t.rr_mediaVolume=e.volume}h||(e.scrollLeft&&(b.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(b.rr_scrollTop=e.scrollTop));if(g){const{width:t,height:n}=e.getBoundingClientRect();b={class:b.class,rr_width:`${t}px`,rr_height:`${n}px`}}"iframe"!==y||p(b.src)||(e.contentDocument||(b.rr_src=b.src),delete b.src);let T;try{customElements.get(y)&&(T=!0)}catch(e){}return{type:i.Element,tagName:y,attributes:b,childNodes:[],isSVG:W(e)||void 0,needBlock:g,rootId:m,isCustom:T}}(e,{doc:n,blockClass:r,blockSelector:s,inlineStylesheet:l,maskInputOptions:c,maskInputFn:d,dataURLOptions:p,inlineImages:h,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:y,rootId:b});case e.TEXT_NODE:return function(e,t){var n;const{needsMask:o,maskTextFn:r,rootId:s}=t,a=f.parentNode(e),l=a&&a.tagName;let c=f.textContent(e);const u="STYLE"===l||void 0,d="SCRIPT"===l||void 0;if(u&&c){try{e.nextSibling||e.previousSibling||(null==(n=a.sheet)?void 0:n.cssRules)&&(c=v(a.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}c=A(c,V(t.doc))}d&&(c="SCRIPT_PLACEHOLDER");!u&&!d&&c&&o&&(c=r?r(c,f.parentElement(e)):c.replace(/[\S]/g,"*"));return{type:i.Text,textContent:c||"",isStyle:u,rootId:s}}(e,{doc:n,needsMask:a,maskTextFn:u,rootId:b});case e.CDATA_SECTION_NODE:return{type:i.CDATA,textContent:"",rootId:b};case e.COMMENT_NODE:return{type:i.Comment,textContent:f.textContent(e)||"",rootId:b};default:return!1}}function U(e){return null==e?"":e.toLowerCase()}function X(e,t){const{doc:n,mirror:o,blockClass:r,blockSelector:s,maskTextClass:a,maskTextSelector:l,skipChild:c=!1,inlineStylesheet:u=!0,maskInputOptions:d={},maskTextFn:p,maskInputFn:h,slimDOMOptions:v,dataURLOptions:b={},inlineImages:_=!1,recordCanvas:C=!1,onSerialize:S,onIframeLoad:I,iframeLoadTimeout:w=5e3,onStylesheetLoad:k,stylesheetLoadTimeout:M=5e3,keepIframeSrcFn:x=(()=>!1),newlyAddedElement:N=!1}=t;let{needsMask:E}=t,{preserveWhiteSpace:A=!0}=t;if(!E){E=j(e,a,l,void 0===E)}const R=z(e,{doc:n,mirror:o,blockClass:r,blockSelector:s,needsMask:E,inlineStylesheet:u,maskInputOptions:d,maskTextFn:p,maskInputFn:h,dataURLOptions:b,inlineImages:_,recordCanvas:C,keepIframeSrcFn:x,newlyAddedElement:N});if(!R)return console.warn(e,"not serialized"),null;let O;O=o.hasNode(e)?o.getId(e):!function(e,t){if(t.comment&&e.type===i.Comment)return!0;if(e.type===i.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"===T(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(U(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===U(e.attributes.name)||"icon"===U(e.attributes.rel)||"apple-touch-icon"===U(e.attributes.rel)||"shortcut icon"===U(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&U(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(U(e.attributes.property).match(/^(og|twitter|fb):/)||U(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===U(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===U(e.attributes.name)||"googlebot"===U(e.attributes.name)||"bingbot"===U(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===U(e.attributes.name)||"generator"===U(e.attributes.name)||"framework"===U(e.attributes.name)||"publisher"===U(e.attributes.name)||"progid"===U(e.attributes.name)||U(e.attributes.property).match(/^article:/)||U(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===U(e.attributes.name)||"yandex-verification"===U(e.attributes.name)||"csrf-token"===U(e.attributes.name)||"p:domain_verify"===U(e.attributes.name)||"verify-v1"===U(e.attributes.name)||"verification"===U(e.attributes.name)||"shopify-checkout-api-token"===U(e.attributes.name)))return!0}}return!1}(R,v)&&(A||R.type!==i.Text||R.isStyle||R.textContent.replace(/^\s+|\s+$/gm,"").length)?D():L;const F=Object.assign(R,{id:O});if(o.add(e,F),O===L)return null;S&&S(e);let B=!c;if(F.type===i.Element){B=B&&!F.needBlock,delete F.needBlock;const t=f.shadowRoot(e);t&&y(t)&&(F.isShadowHost=!0)}if((F.type===i.Document||F.type===i.Element)&&B){v.headWhitespace&&F.type===i.Element&&"head"===F.tagName&&(A=!1);const t={doc:n,mirror:o,blockClass:r,blockSelector:s,needsMask:E,maskTextClass:a,maskTextSelector:l,skipChild:c,inlineStylesheet:u,maskInputOptions:d,maskTextFn:p,maskInputFn:h,slimDOMOptions:v,dataURLOptions:b,inlineImages:_,recordCanvas:C,preserveWhiteSpace:A,onSerialize:S,onIframeLoad:I,iframeLoadTimeout:w,onStylesheetLoad:k,stylesheetLoadTimeout:M,keepIframeSrcFn:x};if(F.type===i.Element&&"textarea"===F.tagName&&void 0!==F.attributes.value);else for(const n of Array.from(f.childNodes(e))){const e=X(n,t);e&&F.childNodes.push(e)}let g=null;if(m(e)&&(g=f.shadowRoot(e)))for(const e of Array.from(f.childNodes(g))){const n=X(e,t);n&&(y(g)&&(n.isShadow=!0),F.childNodes.push(n))}}const H=f.parentNode(e);return H&&g(H)&&y(H)&&(F.isShadow=!0),F.type===i.Element&&"iframe"===F.tagName&&function(e,t,n){const o=e.contentWindow;if(!o)return;let r,i=!1;try{r=o.document.readyState}catch(e){return}if("complete"!==r){const o=setTimeout((()=>{i||(t(),i=!0)}),n);return void e.addEventListener("load",(()=>{clearTimeout(o),i=!0,t()}))}const s="about:blank";if(o.location.href!==s||e.src===s||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,(()=>{const t=e.contentDocument;if(t&&I){const n=X(t,{doc:t,mirror:o,blockClass:r,blockSelector:s,needsMask:E,maskTextClass:a,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:d,maskTextFn:p,maskInputFn:h,slimDOMOptions:v,dataURLOptions:b,inlineImages:_,recordCanvas:C,preserveWhiteSpace:A,onSerialize:S,onIframeLoad:I,iframeLoadTimeout:w,onStylesheetLoad:k,stylesheetLoadTimeout:M,keepIframeSrcFn:x});n&&I(e,n)}}),w),F.type===i.Element&&"link"===F.tagName&&"string"==typeof F.attributes.rel&&("stylesheet"===F.attributes.rel||"preload"===F.attributes.rel&&"string"==typeof F.attributes.href&&"css"===T(F.attributes.href))&&function(e,t,n){let o,r=!1;try{o=e.sheet}catch(e){return}if(o)return;const i=setTimeout((()=>{r||(t(),r=!0)}),n);e.addEventListener("load",(()=>{clearTimeout(i),r=!0,t()}))}(e,(()=>{if(k){const t=X(e,{doc:n,mirror:o,blockClass:r,blockSelector:s,needsMask:E,maskTextClass:a,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:d,maskTextFn:p,maskInputFn:h,slimDOMOptions:v,dataURLOptions:b,inlineImages:_,recordCanvas:C,preserveWhiteSpace:A,onSerialize:S,onIframeLoad:I,iframeLoadTimeout:w,onStylesheetLoad:k,stylesheetLoadTimeout:M,keepIframeSrcFn:x});t&&k(e,t)}}),M),F}let K=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(){const e=[];let t=this.firstChild;for(;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"}};const J={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Q={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ee={};function te(e){if(ee[e])return ee[e];const t=globalThis[e],n=t.prototype,o=e in J?J[e]:void 0,r=Boolean(o&&o.every((e=>{var t,o;return Boolean(null==(o=null==(t=Object.getOwnPropertyDescriptor(n,e))?void 0:t.get)?void 0:o.toString().includes("[native code]"))}))),i=e in Q?Q[e]:void 0,s=Boolean(i&&i.every((e=>{var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))})));if(r&&s)return ee[e]=t.prototype,t.prototype;try{const o=document.createElement("iframe");document.body.appendChild(o);const r=o.contentWindow;if(!r)return t.prototype;const i=r[e].prototype;return document.body.removeChild(o),i?ee[e]=i:n}catch{return n}}const ne={};function oe(e,t,n){var o;const r=`${e}.${String(n)}`;if(ne[r])return ne[r].call(t);const i=te(e),s=null==(o=Object.getOwnPropertyDescriptor(i,n))?void 0:o.get;return s?(ne[r]=s,s.call(t)):t[n]}const re={};function ie(e,t,n){const o=`${e}.${String(n)}`;if(re[o])return re[o].bind(t);const r=te(e)[n];return"function"!=typeof r?t[n]:(re[o]=r,r.bind(t))}function se(){return te("MutationObserver").constructor}const ae={childNodes:function(e){return oe("Node",e,"childNodes")},parentNode:function(e){return oe("Node",e,"parentNode")},parentElement:function(e){return oe("Node",e,"parentElement")},textContent:function(e){return oe("Node",e,"textContent")},contains:function(e,t){return ie("Node",e,"contains")(t)},getRootNode:function(e){return ie("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?oe("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?oe("Element",e,"shadowRoot"):null},querySelector:function(e,t){return oe("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return oe("Element",e,"querySelectorAll")(t)},mutationObserver:se};function le(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document;const o={capture:!0,passive:!0};return n.addEventListener(e,t,o),()=>n.removeEventListener(e,t,o)}const ce="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.";let ue={map:{},getId:()=>(console.error(ce),-1),getNode:()=>(console.error(ce),null),removeNodeFromMap(){console.error(ce)},has:()=>(console.error(ce),!1),reset(){console.error(ce)}};function de(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=null,r=0;return function(){for(var i=arguments.length,s=new Array(i),a=0;a<i;a++)s[a]=arguments[a];const l=Date.now();r||!1!==n.leading||(r=l);const c=t-(l-r),u=this;c<=0||c>t?(o&&(clearTimeout(o),o=null),r=l,e.apply(u,s)):o||!1===n.trailing||(o=setTimeout((()=>{r=!1===n.leading?0:Date.now(),o=null,e.apply(u,s)}),c))}}function pe(e,t,n,o){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window;const i=r.Object.getOwnPropertyDescriptor(e,t);return r.Object.defineProperty(e,t,o?n:{set(e){setTimeout((()=>{n.set.call(this,e)}),0),i&&i.set&&i.set.call(this,e)}}),()=>pe(e,t,i||{},!0)}function he(e,t,n){try{if(!(t in e))return()=>{};const o=e[t],r=n(o);return"function"==typeof r&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__rrweb_original__:{enumerable:!1,value:o}})),e[t]=r,()=>{e[t]=o}}catch{return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(ue=new Proxy(ue,{get:(e,t,n)=>("map"===t&&console.error(ce),Reflect.get(e,t,n))}));let fe=Date.now;function me(e){var t,n,o,r;const 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=ae.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==(o=ae.parentElement(i.body))?void 0:o.scrollTop)||(null==(r=null==i?void 0:i.body)?void 0:r.scrollTop)||0}}function ge(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function ye(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ve(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:ae.parentElement(e)}function be(e,t,n,o){if(!e)return!1;const r=ve(e);if(!r)return!1;try{if("string"==typeof t){if(r.classList.contains(t))return!0;if(o&&null!==r.closest("."+t))return!0}else if(G(r,t,o))return!0}catch(e){}if(n){if(r.matches(n))return!0;if(o&&null!==r.closest(n))return!0}return!1}function _e(e,t,n){return!("TITLE"!==e.tagName||!n.headTitleMutations)||t.getId(e)===L}function Ce(e,t){if(g(e))return!1;const n=t.getId(e);if(!t.has(n))return!0;const o=ae.parentNode(e);return(!o||o.nodeType!==e.DOCUMENT_NODE)&&(!o||Ce(o,t))}function Se(e){return Boolean(e.changedTouches)}function Ie(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function we(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function ke(e){return!!e&&(e instanceof K&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(ae.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(fe=()=>(new Date).getTime());let Te=class{constructor(){n(this,"id",1),n(this,"styleIDMap",new WeakMap),n(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){if(this.has(e))return this.getId(e);let n;return n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),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 Me(e){var t;let n=null;return"getRootNode"in e&&(null==(t=ae.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&ae.host(ae.getRootNode(e))&&(n=ae.host(ae.getRootNode(e))),n}function xe(e){const t=e.ownerDocument;if(!t)return!1;const n=function(e){let t,n=e;for(;t=Me(n);)n=t;return n}(e);return ae.contains(t,n)}function Ne(e){const t=e.ownerDocument;return!!t&&(ae.contains(t,e)||xe(e))}var Ee=(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))(Ee||{}),Ae=(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))(Ae||{}),Re=(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))(Re||{}),Oe=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Oe||{}),Le=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Le||{}),De=(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))(De||{});function Fe(e){return"__ln"in e}class Be{constructor(){n(this,"length",0),n(this,"head",null),n(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let n=0;n<e;n++)t=(null==t?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Fe(e.previousSibling)){const 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&&Fe(e.nextSibling)&&e.nextSibling.__ln.previous){const n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){const 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--)}}const He=(e,t)=>`${e}@${t}`;class Pe{constructor(){n(this,"frozen",!1),n(this,"locked",!1),n(this,"texts",[]),n(this,"attributes",[]),n(this,"attributeMap",new WeakMap),n(this,"removes",[]),n(this,"mapRemoves",[]),n(this,"movedMap",{}),n(this,"addedSet",new Set),n(this,"movedSet",new Set),n(this,"droppedSet",new Set),n(this,"mutationCb"),n(this,"blockClass"),n(this,"blockSelector"),n(this,"maskTextClass"),n(this,"maskTextSelector"),n(this,"inlineStylesheet"),n(this,"maskInputOptions"),n(this,"maskTextFn"),n(this,"maskInputFn"),n(this,"keepIframeSrcFn"),n(this,"recordCanvas"),n(this,"inlineImages"),n(this,"slimDOMOptions"),n(this,"dataURLOptions"),n(this,"doc"),n(this,"mirror"),n(this,"iframeManager"),n(this,"stylesheetManager"),n(this,"shadowDomManager"),n(this,"canvasManager"),n(this,"processedNodeManager"),n(this,"unattachedDoc"),n(this,"processMutations",(e=>{e.forEach(this.processMutation),this.emit()})),n(this,"emit",(()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,n=new Be,o=e=>{let t=e,n=L;for(;n===L;)t=t&&t.nextSibling,n=t&&this.mirror.getId(t);return n},r=r=>{const i=ae.parentNode(r);if(!i||!Ne(r)||"TEXTAREA"===i.tagName)return;const s=g(i)?this.mirror.getId(Me(r)):this.mirror.getId(i),a=o(r);if(-1===s||-1===a)return n.addNode(r);const l=X(r,{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=>{Ie(e,this.mirror)&&this.iframeManager.addIframe(e),we(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),ke(r)&&this.shadowDomManager.addShadowRoot(ae.shadowRoot(r),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:s,nextId:a,node:l}),t.add(l.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of this.movedSet)qe(this.removes,e,this.mirror)&&!this.movedSet.has(ae.parentNode(e))||r(e);for(const e of this.addedSet)We(this.droppedSet,e)||qe(this.removes,e,this.mirror)?We(this.movedSet,e)?r(e):this.droppedSet.add(e):r(e);let i=null;for(;n.length;){let e=null;if(i){const t=this.mirror.getId(ae.parentNode(i.value)),n=o(i.value);-1!==t&&-1!==n&&(e=i)}if(!e){let t=n.tail;for(;t;){const n=t;if(t=t.previous,n){const t=this.mirror.getId(ae.parentNode(n.value));if(-1===o(n.value))continue;if(-1!==t){e=n;break}{const t=n.value,o=ae.parentNode(t);if(o&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const t=ae.host(o);if(-1!==this.mirror.getId(t)){e=n;break}}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}i=e.previous,n.removeNode(e.value),r(e.value)}const s={texts:this.texts.map((e=>{const t=e.node,n=ae.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=>{const{attributes:t}=e;if("string"==typeof t.style){const n=JSON.stringify(e.styleDiff),o=JSON.stringify(e._unchangedStyles);n.length<t.style.length&&(n+o).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};(s.texts.length||s.attributes.length||s.removes.length||s.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(s))})),n(this,"genTextAreaValueMutation",(e=>{let 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(ae.childNodes(e),(e=>ae.textContent(e)||"")).join("")})),n(this,"processMutation",(e=>{if(!_e(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=ae.textContent(e.target);be(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:j(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,ve(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let n=e.attributeName,o=e.target.getAttribute(n);if("value"===n){const e=k(t);o=S({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:e,value:o,maskInputFn:this.maskInputFn})}if(be(e.target,this.blockClass,this.blockSelector,!1)||o===e.oldValue)return;let r=this.attributeMap.get(e.target);if("IFRAME"===t.tagName&&"src"===n&&!this.keepIframeSrcFn(o)){if(t.contentDocument)return;n="rr_src"}if(r||(r={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(r),this.attributeMap.set(e.target,r)),"type"===n&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!Y(t.tagName,n))if(r.attributes[n]=$(this.doc,I(t.tagName),I(n),o),"style"===n){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}const n=this.unattachedDoc.createElement("span");e.oldValue&&n.setAttribute("style",e.oldValue);for(const e of Array.from(t.style)){const o=t.style.getPropertyValue(e),i=t.style.getPropertyPriority(e);o!==n.style.getPropertyValue(e)||i!==n.style.getPropertyPriority(e)?r.styleDiff[e]=""===i?o:[o,i]:r._unchangedStyles[e]=[o,i]}for(const e of Array.from(n.style))""===t.style.getPropertyValue(e)&&(r.styleDiff[e]=!1)}else"open"===n&&"DIALOG"===t.tagName&&(t.matches("dialog:modal")?r.attributes.rr_open_mode="modal":r.attributes.rr_open_mode="non-modal");break}case"childList":if(be(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=>{const n=this.mirror.getId(t),o=g(e.target)?this.mirror.getId(ae.host(e.target)):this.mirror.getId(e.target);be(e.target,this.blockClass,this.blockSelector,!1)||_e(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||Ce(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[He(n,o)]?Ze(this.movedSet,t):this.removes.push({parentId:o,id:n,isShadow:!(!g(e.target)||!y(e.target))||void 0})),this.mapRemoves.push(t))}))}})),n(this,"genAdds",((e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(_e(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&-1!==n&&(this.movedMap[He(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);be(e,this.blockClass,this.blockSelector,!1)||(ae.childNodes(e).forEach((e=>this.genAdds(e))),ke(e)&&ae.childNodes(ae.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),ae.childNodes(t).forEach((t=>Ze(e,t)))}function qe(e,t,n){return 0!==e.length&&function(e,t,n){let o=ae.parentNode(t);for(;o;){const t=n.getId(o);if(e.some((e=>e.id===t)))return!0;o=ae.parentNode(o)}return!1}(e,t,n)}function We(e,t){return 0!==e.size&&Ve(e,t)}function Ve(e,t){const n=ae.parentNode(t);return!!n&&(!!e.has(n)||Ve(e,n))}let $e;const Ye=e=>{if(!$e)return e;return function(){try{return e(...arguments)}catch(e){if($e&&!0===$e(e))return;throw e}}},Ge=[];function je(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function ze(e,t){const n=new Pe;Ge.push(n),n.init(e);const o=new(se())(Ye(n.processMutations.bind(n)));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function Ue(e){let{mouseInteractionCb:t,doc:n,mirror:o,blockClass:r,blockSelector:i,sampling:s}=e;if(!1===s.mouseInteraction)return()=>{};const a=!0===s.mouseInteraction||void 0===s.mouseInteraction?{}:s.mouseInteraction,l=[];let c=null;return Object.keys(Re).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e])).forEach((e=>{let s=I(e);const a=(e=>n=>{const s=je(n);if(be(s,r,i,!0))return;let a=null,l=e;if("pointerType"in n){switch(n.pointerType){case"mouse":a=Oe.Mouse;break;case"touch":a=Oe.Touch;break;case"pen":a=Oe.Pen}a===Oe.Touch?Re[e]===Re.MouseDown?l="TouchStart":Re[e]===Re.MouseUp&&(l="TouchEnd"):Oe.Pen}else Se(n)&&(a=Oe.Touch);null!==a?(c=a,(l.startsWith("Touch")&&a===Oe.Touch||l.startsWith("Mouse")&&a===Oe.Mouse)&&(a=null)):Re[e]===Re.Click&&(a=c,c=null);const u=Se(n)?n.changedTouches[0]:n;if(!u)return;const d=o.getId(s),{clientX:p,clientY:h}=u;Ye(t)({type:Re[l],id:d,x:p,y:h,...null!==a&&{pointerType:a}})})(e);if(window.PointerEvent)switch(Re[e]){case Re.MouseDown:case Re.MouseUp:s=s.replace("mouse","pointer");break;case Re.TouchStart:case Re.TouchEnd:return}l.push(le(s,a,n))})),Ye((()=>{l.forEach((e=>e()))}))}function Xe(e){let{scrollCb:t,doc:n,mirror:o,blockClass:r,blockSelector:i,sampling:s}=e;return le("scroll",Ye(de(Ye((e=>{const s=je(e);if(!s||be(s,r,i,!0))return;const a=o.getId(s);if(s===n&&n.defaultView){const e=me(n.defaultView);t({id:a,x:e.left,y:e.top})}else t({id:a,x:s.scrollLeft,y:s.scrollTop})})),s.scroll||100)),n)}const Ke=["INPUT","TEXTAREA","SELECT"],Je=new WeakMap;function Qe(e){return function(e,t){if(ot("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||ot("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||ot("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||ot("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){const n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function et(e,t,n){let o,r;return e?(e.ownerNode?o=t.getId(e.ownerNode):r=n.getId(e),{styleId:r,id:o}):{}}function tt(e,t){let{mirror:n,stylesheetManager:o}=e;var r,i,s;let a=null;a="#document"===t.nodeName?n.getId(t):n.getId(ae.host(t));const l="#document"===t.nodeName?null==(r=t.defaultView)?void 0:r.Document:null==(s=null==(i=t.ownerDocument)?void 0:i.defaultView)?void 0:s.ShadowRoot,c=(null==l?void 0:l.prototype)?Object.getOwnPropertyDescriptor(null==l?void 0:l.prototype,"adoptedStyleSheets"):void 0;return null!==a&&-1!==a&&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;const n=null==(t=c.set)?void 0:t.call(this,e);if(null!==a&&-1!==a)try{o.adoptStyleSheets(e,a)}catch(e){}return n}}),Ye((()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}))):()=>{}}function nt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e.doc.defaultView;if(!n)return()=>{};let o;!function(e,t){const{mutationCb:n,mousemoveCb:o,mouseInteractionCb:r,scrollCb:i,viewportResizeCb:s,inputCb:a,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),o(...arguments)},e.mouseInteractionCb=function(){t.mouseInteraction&&t.mouseInteraction(...arguments),r(...arguments)},e.scrollCb=function(){t.scroll&&t.scroll(...arguments),i(...arguments)},e.viewportResizeCb=function(){t.viewportResize&&t.viewportResize(...arguments),s(...arguments)},e.inputCb=function(){t.input&&t.input(...arguments),a(...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,t),e.recordDOM&&(o=ze(e,e.doc));const r=function(e){let{mousemoveCb:t,sampling:n,doc:o,mirror:r}=e;if(!1===n.mousemove)return()=>{};const i="number"==typeof n.mousemove?n.mousemove:50,s="number"==typeof n.mousemoveCallback?n.mousemoveCallback:500;let a,l=[];const c=de(Ye((e=>{const n=Date.now()-a;t(l.map((e=>(e.timeOffset-=n,e))),e),l=[],a=null})),s),u=Ye(de(Ye((e=>{const t=je(e),{clientX:n,clientY:o}=Se(e)?e.changedTouches[0]:e;a||(a=fe()),l.push({x:n,y:o,id:r.getId(t),timeOffset:fe()-a}),c("undefined"!=typeof DragEvent&&e instanceof DragEvent?Ae.Drag:e instanceof MouseEvent?Ae.MouseMove:Ae.TouchMove)})),i,{trailing:!1})),d=[le("mousemove",u,o),le("touchmove",u,o),le("drag",u,o)];return Ye((()=>{d.forEach((e=>e()))}))}(e),i=Ue(e),s=Xe(e),a=function(e,t){let{viewportResizeCb:n}=e,{win:o}=t,r=-1,i=-1;return le("resize",Ye(de(Ye((()=>{const e=ge(),t=ye();r===e&&i===t||(n({width:Number(t),height:Number(e)}),r=e,i=t)})),200)),o)}(e,{win:n}),l=function(e){let{inputCb:t,doc:n,mirror:o,blockClass:r,blockSelector:i,ignoreClass:s,ignoreSelector:a,maskInputOptions:l,maskInputFn:c,sampling:u,userTriggeredOnInput:d}=e;function p(e){let t=je(e);const o=e.isTrusted,u=t&&t.tagName;if(t&&"OPTION"===u&&(t=ae.parentElement(t)),!t||!u||Ke.indexOf(u)<0||be(t,r,i,!0))return;if(t.classList.contains(s)||a&&t.matches(a))return;let p=t.value,f=!1;const m=k(t)||"";"radio"===m||"checkbox"===m?f=t.checked:(l[u.toLowerCase()]||l[m])&&(p=S({element:t,maskInputOptions:l,tagName:u,type:m,value:p,maskInputFn:c})),h(t,d?{text:p,isChecked:f,userTriggered:o}:{text:p,isChecked:f});const g=t.name;"radio"===m&&g&&f&&n.querySelectorAll(`input[type="radio"][name="${g}"]`).forEach((e=>{if(e!==t){const t=e.value;h(e,d?{text:t,isChecked:!f,userTriggered:!1}:{text:t,isChecked:!f})}}))}function h(e,n){const r=Je.get(e);if(!r||r.text!==n.text||r.isChecked!==n.isChecked){Je.set(e,n);const r=o.getId(e);Ye(t)({...n,id:r})}}const f=("last"===u.input?["change"]:["input","change"]).map((e=>le(e,Ye(p),n))),m=n.defaultView;if(!m)return()=>{f.forEach((e=>e()))};const g=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),y=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&f.push(...y.map((e=>pe(e[0],e[1],{set(){Ye(p)({target:this,isTrusted:!1})}},!1,m)))),Ye((()=>{f.forEach((e=>e()))}))}(e),c=function(e){let{mediaInteractionCb:t,blockClass:n,blockSelector:o,mirror:r,sampling:i,doc:s}=e;const a=Ye((e=>de(Ye((i=>{const s=je(i);if(!s||be(s,n,o,!0))return;const{currentTime:a,volume:l,muted:c,playbackRate:u,loop:d}=s;t({type:e,id:r.getId(s),currentTime:a,volume:l,muted:c,playbackRate:u,loop:d})})),i.media||500))),l=[le("play",a(De.Play),s),le("pause",a(De.Pause),s),le("seeked",a(De.Seeked),s),le("volumechange",a(De.VolumeChange),s),le("ratechange",a(De.RateChange),s)];return Ye((()=>{l.forEach((e=>e()))}))}(e);let u=()=>{},d=()=>{},p=()=>{},h=()=>{};e.recordDOM&&(u=function(e,t){let{styleSheetRuleCb:n,mirror:o,stylesheetManager:r}=e,{win:i}=t;if(!i.CSSStyleSheet||!i.CSSStyleSheet.prototype)return()=>{};const s=i.CSSStyleSheet.prototype.insertRule;i.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:Ye(((e,t,i)=>{const[s,a]=i,{id:l,styleId:c}=et(t,o,r.styleMirror);return(l&&-1!==l||c&&-1!==c)&&n({id:l,styleId:c,adds:[{rule:s,index:a}]}),e.apply(t,i)}))}),i.CSSStyleSheet.prototype.addRule=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.cssRules.length;const o=`${e} { ${t} }`;return i.CSSStyleSheet.prototype.insertRule.apply(this,[o,n])};const a=i.CSSStyleSheet.prototype.deleteRule;let l,c;i.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:Ye(((e,t,i)=>{const[s]=i,{id:a,styleId:l}=et(t,o,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&n({id:a,styleId:l,removes:[{index:s}]}),e.apply(t,i)}))}),i.CSSStyleSheet.prototype.removeRule=function(e){return i.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},i.CSSStyleSheet.prototype.replace&&(l=i.CSSStyleSheet.prototype.replace,i.CSSStyleSheet.prototype.replace=new Proxy(l,{apply:Ye(((e,t,i)=>{const[s]=i,{id:a,styleId:l}=et(t,o,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&n({id:a,styleId:l,replace:s}),e.apply(t,i)}))})),i.CSSStyleSheet.prototype.replaceSync&&(c=i.CSSStyleSheet.prototype.replaceSync,i.CSSStyleSheet.prototype.replaceSync=new Proxy(c,{apply:Ye(((e,t,i)=>{const[s]=i,{id:a,styleId:l}=et(t,o,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&n({id:a,styleId:l,replaceSync:s}),e.apply(t,i)}))}));const u={};rt("CSSGroupingRule")?u.CSSGroupingRule=i.CSSGroupingRule:(rt("CSSMediaRule")&&(u.CSSMediaRule=i.CSSMediaRule),rt("CSSConditionRule")&&(u.CSSConditionRule=i.CSSConditionRule),rt("CSSSupportsRule")&&(u.CSSSupportsRule=i.CSSSupportsRule));const d={};return Object.entries(u).forEach((e=>{let[t,i]=e;d[t]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=new Proxy(d[t].insertRule,{apply:Ye(((e,t,i)=>{const[s,a]=i,{id:l,styleId:c}=et(t.parentStyleSheet,o,r.styleMirror);return(l&&-1!==l||c&&-1!==c)&&n({id:l,styleId:c,adds:[{rule:s,index:[...Qe(t),a||0]}]}),e.apply(t,i)}))}),i.prototype.deleteRule=new Proxy(d[t].deleteRule,{apply:Ye(((e,t,i)=>{const[s]=i,{id:a,styleId:l}=et(t.parentStyleSheet,o,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&n({id:a,styleId:l,removes:[{index:[...Qe(t),s]}]}),e.apply(t,i)}))})})),Ye((()=>{i.CSSStyleSheet.prototype.insertRule=s,i.CSSStyleSheet.prototype.deleteRule=a,l&&(i.CSSStyleSheet.prototype.replace=l),c&&(i.CSSStyleSheet.prototype.replaceSync=c),Object.entries(u).forEach((e=>{let[t,n]=e;n.prototype.insertRule=d[t].insertRule,n.prototype.deleteRule=d[t].deleteRule}))}))}(e,{win:n}),d=tt(e,e.doc),p=function(e,t){let{styleDeclarationCb:n,mirror:o,ignoreCSSAttributes:r,stylesheetManager:i}=e,{win:s}=t;const a=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:Ye(((e,t,s)=>{var l;const[c,u,d]=s;if(r.has(c))return a.apply(t,[c,u,d]);const{id:p,styleId:h}=et(null==(l=t.parentRule)?void 0:l.parentStyleSheet,o,i.styleMirror);return(p&&-1!==p||h&&-1!==h)&&n({id:p,styleId:h,set:{property:c,value:u,priority:d},index:Qe(t.parentRule)}),e.apply(t,s)}))});const l=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(l,{apply:Ye(((e,t,s)=>{var a;const[c]=s;if(r.has(c))return l.apply(t,[c]);const{id:u,styleId:d}=et(null==(a=t.parentRule)?void 0:a.parentStyleSheet,o,i.styleMirror);return(u&&-1!==u||d&&-1!==d)&&n({id:u,styleId:d,remove:{property:c},index:Qe(t.parentRule)}),e.apply(t,s)}))}),Ye((()=>{s.CSSStyleDeclaration.prototype.setProperty=a,s.CSSStyleDeclaration.prototype.removeProperty=l}))}(e,{win:n}),e.collectFonts&&(h=function(e){let{fontCb:t,doc:n}=e;const o=n.defaultView;if(!o)return()=>{};const r=[],i=new WeakMap,s=o.FontFace;o.FontFace=function(e,t,n){const o=new s(e,t,n);return i.set(o,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),o};const a=he(n.fonts,"add",(function(e){return function(n){return setTimeout(Ye((()=>{const e=i.get(n);e&&(t(e),i.delete(n))})),0),e.apply(this,[n])}}));return r.push((()=>{o.FontFace=s})),r.push(a),Ye((()=>{r.forEach((e=>e()))}))}(e)));const f=function(e){const{doc:t,mirror:n,blockClass:o,blockSelector:r,selectionCb:i}=e;let s=!0;const a=Ye((()=>{const e=t.getSelection();if(!e||s&&(null==e?void 0:e.isCollapsed))return;s=e.isCollapsed||!1;const a=[],l=e.rangeCount||0;for(let t=0;t<l;t++){const i=e.getRangeAt(t),{startContainer:s,startOffset:l,endContainer:c,endOffset:u}=i;be(s,o,r,!0)||be(c,o,r,!0)||a.push({start:n.getId(s),startOffset:l,end:n.getId(c),endOffset:u})}i({ranges:a})}));return a(),le("selectionchange",a)}(e),m=function(e){let{doc:t,customElementCb:n}=e;const o=t.defaultView;return o&&o.customElements?he(o.customElements,"define",(function(e){return function(t,o,r){try{n({define:{name:t}})}catch(e){console.warn(`Custom element callback failed for ${t}`)}return e.apply(this,[t,o,r])}})):()=>{}}(e),g=[];for(const t of e.plugins)g.push(t.observer(t.callback,n,t.options));return Ye((()=>{Ge.forEach((e=>e.reset())),null==o||o.disconnect(),r(),i(),s(),a(),l(),c(),u(),d(),p(),h(),f(),m(),g.forEach((e=>e()))}))}function ot(e){return void 0!==window[e]}function rt(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class it{constructor(e){n(this,"iframeIdToRemoteIdMap",new WeakMap),n(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,n,o){const r=n||this.getIdToRemoteIdMap(e),i=o||this.getRemoteIdToIdMap(e);let s=r.get(t);return s||(s=this.generateIdFn(),r.set(t,s),i.set(s,t)),s}getIds(e,t){const n=this.getIdToRemoteIdMap(e),o=this.getRemoteIdToIdMap(e);return t.map((t=>this.getId(e,t,n,o)))}getRemoteId(e,t,n){const o=n||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;const r=o.get(t);return r||-1}getRemoteIds(e,t){const 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){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class st{constructor(e){n(this,"iframes",new WeakMap),n(this,"crossOriginIframeMap",new WeakMap),n(this,"crossOriginIframeMirror",new it(D)),n(this,"crossOriginIframeStyleMirror"),n(this,"crossOriginIframeRootIdMap",new WeakMap),n(this,"mirror"),n(this,"mutationCb"),n(this,"wrappedEmit"),n(this,"loadListener"),n(this,"stylesheetManager"),n(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new it(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,o;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==(o=this.loadListener)||o.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){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin)return;if(!e.source)return;const n=this.crossOriginIframeMap.get(e.source);if(!n)return;const o=this.transformCrossOriginEvent(n,t.data.event);o&&this.wrappedEmit(o,t.data.isCheckout)}transformCrossOriginEvent(e,t){var n;switch(t.type){case Ee.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:Ee.IncrementalSnapshot,data:{source:Ae.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Ee.Meta:case Ee.Load:case Ee.DomContentLoaded:return!1;case Ee.Plugin:return t;case Ee.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case Ee.IncrementalSnapshot:switch(t.data.source){case Ae.Mutation:return t.data.adds.forEach((t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const 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 Ae.Drag:case Ae.TouchMove:case Ae.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case Ae.ViewportResize:return!1;case Ae.MediaInteraction:case Ae.MouseInteraction:case Ae.Scroll:case Ae.CanvasMutation:case Ae.Input:return this.replaceIds(t.data,e,["id"]),t;case Ae.StyleSheetRule:case Ae.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case Ae.Font:return t;case Ae.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case Ae.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,o){for(const r of o)(Array.isArray(t[r])||"number"==typeof t[r])&&(Array.isArray(t[r])?t[r]=e.getIds(n,t[r]):t[r]=e.getId(n,t[r]));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===i.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,t)}))}}class at{constructor(e){n(this,"shadowDoms",new WeakSet),n(this,"mutationCb"),n(this,"scrollCb"),n(this,"bypassOptions"),n(this,"mirror"),n(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!y(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e);const n=ze({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push((()=>n.disconnect())),this.restoreHandlers.push(Xe({...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(ae.host(e))),this.restoreHandlers.push(tt({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){const n=this;this.restoreHandlers.push(he(e.prototype,"attachShadow",(function(e){return function(o){const r=e.call(this,o),i=ae.shadowRoot(this);return i&&Ne(this)&&n.addShadowRoot(i,t),r}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch(e){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var lt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ct="undefined"==typeof Uint8Array?[]:new Uint8Array(256),ut=0;ut<64;ut++)ct[lt.charCodeAt(ut)]=ut;const dt=new Map;const pt=(e,t,n)=>{if(!e||!mt(e,t)&&"object"!=typeof e)return;const o=function(e,t){let n=dt.get(e);return n||(n=new Map,dt.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name);let r=o.indexOf(e);return-1===r&&(r=o.length,o.push(e)),r};function ht(e,t,n){if(e instanceof Array)return e.map((e=>ht(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),o=n.length,r="";for(t=0;t<o;t+=3)r+=lt[n[t]>>2],r+=lt[(3&n[t])<<4|n[t+1]>>4],r+=lt[(15&n[t+1])<<2|n[t+2]>>6],r+=lt[63&n[t+2]];return o%3==2?r=r.substring(0,r.length-1)+"=":o%3==1&&(r=r.substring(0,r.length-2)+"=="),r}(e)}}if(e instanceof DataView){return{rr_type:e.constructor.name,args:[ht(e.buffer,t,n),e.byteOffset,e.byteLength]}}if(e instanceof HTMLImageElement){const t=e.constructor.name,{src:n}=e;return{rr_type:t,src:n}}if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}if(e instanceof ImageData){return{rr_type:e.constructor.name,args:[ht(e.data,t,n),e.width,e.height]}}if(mt(e,t)||"object"==typeof e){return{rr_type:e.constructor.name,index:pt(e,t,n)}}return e}const ft=(e,t,n)=>e.map((e=>ht(e,t,n))),mt=(e,t)=>{const 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 gt(e,t,n,o){const r=[];try{const i=he(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(r){for(var i=arguments.length,s=new Array(i>1?i-1:0),a=1;a<i;a++)s[a-1]=arguments[a];if(!be(this,t,n,!0)){const e=function(e){return"experimental-webgl"===e?"webgl":e}(r);if("__context"in this||(this.__context=e),o&&["webgl","webgl2"].includes(e))if(s[0]&&"object"==typeof s[0]){const e=s[0];e.preserveDrawingBuffer||(e.preserveDrawingBuffer=!0)}else s.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[r,...s])}}));r.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{r.forEach((e=>e()))}}function yt(e,t,n,o,r,i){const s=[],a=Object.getOwnPropertyNames(e);for(const l of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if("function"!=typeof e[l])continue;const a=he(e,l,(function(e){return function(){for(var s=arguments.length,a=new Array(s),c=0;c<s;c++)a[c]=arguments[c];const u=e.apply(this,a);if(pt(u,i,this),"tagName"in this.canvas&&!be(this.canvas,o,r,!0)){const e=ft(a,i,this),o={type:t,property:l,args:e};n(this.canvas,o)}return u}}));s.push(a)}catch{const o=pe(e,l,{set(e){n(this.canvas,{type:t,property:l,args:[e],setter:!0})}});s.push(o)}return s}const vt="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",bt="undefined"!=typeof window&&window.Blob&&new Blob([(_t=vt,Uint8Array.from(atob(_t),(e=>e.charCodeAt(0))))],{type:"text/javascript;charset=utf-8"});var _t;function Ct(e){let t;try{if(t=bt&&(window.URL||window.webkitURL).createObjectURL(bt),!t)throw"";const 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,"+vt,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class St{constructor(e){n(this,"pendingCanvasMutations",new Map),n(this,"rafStamps",{latestId:0,invokeId:null}),n(this,"mirror"),n(this,"mutationCb"),n(this,"resetObservers"),n(this,"frozen",!1),n(this,"locked",!1),n(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)}));const{sampling:t="all",win:o,blockClass:r,blockSelector:i,recordCanvas:s,dataURLOptions:a}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,s&&"all"===t&&this.initCanvasMutationObserver(o,r,i),s&&"number"==typeof t&&this.initCanvasFPSObserver(t,o,r,i,{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,r){const i=gt(t,n,o,!0),s=new Map,a=new Ct;a.onmessage=e=>{const{id:t}=e.data;if(s.set(t,!1),!("base64"in e.data))return;const{base64:n,type:o,width:r,height:i}=e.data;this.mutationCb({id:t,type:Le["2D"],commands:[{property:"clearRect",args:[0,0,r,i]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:n}],type:o}]},0,0]}]})};const l=1e3/e;let c,u=0;const d=e=>{u&&e-u<l||(u=e,(()=>{const e=[],r=t=>{t.querySelectorAll("canvas").forEach((t=>{be(t,n,o,!0)||e.push(t)})),t.querySelectorAll("*").forEach((e=>{e.shadowRoot&&r(e.shadowRoot)}))};return r(t.document),e})().forEach((async e=>{var t;const n=this.mirror.getId(e);if(s.get(n))return;if(0===e.width||0===e.height)return;if(s.set(n,!0),["webgl","webgl2"].includes(e.__context)){const n=e.getContext(e.__context);!1===(null==(t=null==n?void 0:n.getContextAttributes())?void 0:t.preserveDrawingBuffer)&&n.clear(n.COLOR_BUFFER_BIT)}const o=e.clientWidth||e.width,i=e.clientHeight||e.height,l=await createImageBitmap(e,{resizeWidth:o,resizeHeight:i});a.postMessage({id:n,bitmap:l,width:o,height:i,dataURLOptions:r.dataURLOptions},[l])}))),c=requestAnimationFrame(d)};c=requestAnimationFrame(d),this.resetObservers=()=>{i(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const o=gt(e,t,n,!1),r=function(e,t,n,o){const r=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const s of i)try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[s])continue;const i=he(t.CanvasRenderingContext2D.prototype,s,(function(r){return function(){for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return be(this.canvas,n,o,!0)||setTimeout((()=>{const n=ft(a,t,this);e(this.canvas,{type:Le["2D"],property:s,args:n})}),0),r.apply(this,a)}}));r.push(i)}catch{const n=pe(t.CanvasRenderingContext2D.prototype,s,{set(t){e(this.canvas,{type:Le["2D"],property:s,args:[t],setter:!0})}});r.push(n)}return()=>{r.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,n),i=function(e,t,n,o){const r=[];return r.push(...yt(t.WebGLRenderingContext.prototype,Le.WebGL,e,n,o,t)),void 0!==t.WebGL2RenderingContext&&r.push(...yt(t.WebGL2RenderingContext.prototype,Le.WebGL2,e,n,o,t)),()=>{r.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,n);this.resetObservers=()=>{o(),r(),i()}}startPendingCanvasMutationFlusher(){requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach(((e,t)=>{const n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n)})),requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(e);if(!n||-1===t)return;const o=n.map((e=>{const{type:t,...n}=e;return n})),{type:r}=n[0];this.mutationCb({id:t,type:r,commands:o}),this.pendingCanvasMutations.delete(e)}}class It{constructor(e){n(this,"trackedLinkElements",new WeakSet),n(this,"mutationCb"),n(this,"adoptedStyleSheetCb"),n(this,"styleMirror",new Te),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){if(0===e.length)return;const n={id:t,styleIds:[]},o=[];for(const t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),o.push({styleId:e,rules:Array.from(t.rules||CSSRule,((e,n)=>({rule:b(e,t.href),index:n})))})),n.styleIds.push(e)}o.length>0&&(n.styles=o),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class wt{constructor(){n(this,"nodeMap",new WeakMap),n(this,"active",!1)}inOtherBuffer(e,t){const 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(){}}let kt,Tt,Mt,xt=!1;try{if(2!==Array.from([1],(e=>2*e))[0]){const t=document.createElement("iframe");document.body.appendChild(t),Array.from=(null==(e=t.contentWindow)?void 0:e.Array.from)||Array.from,document.body.removeChild(t)}}catch(e){console.debug("Unable to override Array.from",e)}const Nt=new C;function Et(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{emit:t,checkoutEveryNms:n,checkoutEveryNth:o,blockClass:r="rr-block",blockSelector:i=null,ignoreClass:s="rr-ignore",ignoreSelector:a=null,maskTextClass:l="rr-mask",maskTextSelector:c=null,inlineStylesheet:u=!0,maskAllInputs:d,maskInputOptions:p,slimDOMOptions:h,maskInputFn:f,maskTextFn:m,hooks:g,packFn:y,sampling:v={},dataURLOptions:b={},mousemoveWait:_,recordDOM:S=!0,recordCanvas:I=!1,recordCrossOriginIframes:w=!1,recordAfter:k=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:T=!1,collectFonts:M=!1,inlineImages:x=!1,plugins:N,keepIframeSrcFn:E=(()=>!1),ignoreCSSAttributes:A=new Set([]),errorHandler:R}=e;$e=R;const O=!w||window.parent===window;let L=!1;if(!O)try{window.parent.document&&(L=!1)}catch(e){L=!0}if(O&&!t)throw new Error("emit function is required");if(!O&&!L)return()=>{};void 0!==_&&void 0===v.mousemove&&(v.mousemove=_),Nt.reset();const D=!0===d?{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!==p?p:{password:!0},F=!0===h||"all"===h?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===h,headMetaDescKeywords:"all"===h,headTitleMutations:"all"===h}:h||{};let B;!function(){let 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)}();let H=0;const P=e=>{for(const t of N||[])t.eventProcessor&&(e=t.eventProcessor(e));return y&&!L&&(e=y(e)),e};kt=(e,r)=>{var i;const s=e;if(s.timestamp=fe(),!(null==(i=Ge[0])?void 0:i.isFrozen())||s.type===Ee.FullSnapshot||s.type===Ee.IncrementalSnapshot&&s.data.source===Ae.Mutation||Ge.forEach((e=>e.unfreeze())),O)null==t||t(P(s),r);else if(L){const e={type:"rrweb",event:P(s),origin:window.location.origin,isCheckout:r};window.parent.postMessage(e,"*")}if(s.type===Ee.FullSnapshot)B=s,H=0;else if(s.type===Ee.IncrementalSnapshot){if(s.data.source===Ae.Mutation&&s.data.isAttachIframe)return;H++;const e=o&&H>=o,t=n&&s.timestamp-B.timestamp>n;(e||t)&&Tt(!0)}};const Z=e=>{kt({type:Ee.IncrementalSnapshot,data:{source:Ae.Mutation,...e}})},q=e=>kt({type:Ee.IncrementalSnapshot,data:{source:Ae.Scroll,...e}}),W=e=>kt({type:Ee.IncrementalSnapshot,data:{source:Ae.CanvasMutation,...e}}),V=new It({mutationCb:Z,adoptedStyleSheetCb:e=>kt({type:Ee.IncrementalSnapshot,data:{source:Ae.AdoptedStyleSheet,...e}})}),$=new st({mirror:Nt,mutationCb:Z,stylesheetManager:V,recordCrossOriginIframes:w,wrappedEmit:kt});for(const e of N||[])e.getMirror&&e.getMirror({nodeMirror:Nt,crossOriginIframeMirror:$.crossOriginIframeMirror,crossOriginIframeStyleMirror:$.crossOriginIframeStyleMirror});const Y=new wt;Mt=new St({recordCanvas:I,mutationCb:W,win:window,blockClass:r,blockSelector:i,mirror:Nt,sampling:v.canvas,dataURLOptions:b});const G=new at({mutationCb:Z,scrollCb:q,bypassOptions:{blockClass:r,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:u,maskInputOptions:D,dataURLOptions:b,maskTextFn:m,maskInputFn:f,recordCanvas:I,inlineImages:x,sampling:v,slimDOMOptions:F,iframeManager:$,stylesheetManager:V,canvasManager:Mt,keepIframeSrcFn:E,processedNodeManager:Y},mirror:Nt});Tt=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!S)return;kt({type:Ee.Meta,data:{href:window.location.href,width:ye(),height:ge()}},e),V.reset(),G.init(),Ge.forEach((e=>e.lock()));const t=function(e,t){const{mirror:n=new C,blockClass:o="rr-block",blockSelector:r=null,maskTextClass:i="rr-mask",maskTextSelector:s=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:c=!1,maskAllInputs:u=!1,maskTextFn:d,maskInputFn:p,slimDOM:h=!1,dataURLOptions:f,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:b,stylesheetLoadTimeout:_,keepIframeSrcFn:S=(()=>!1)}=t||{};return X(e,{doc:e,mirror:n,blockClass:o,blockSelector:r,maskTextClass:i,maskTextSelector:s,skipChild:!1,inlineStylesheet:a,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:g,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:b,stylesheetLoadTimeout:_,keepIframeSrcFn:S,newlyAddedElement:!1})}(document,{mirror:Nt,blockClass:r,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:u,maskAllInputs:D,maskTextFn:m,maskInputFn:f,slimDOM:F,dataURLOptions:b,recordCanvas:I,inlineImages:x,onSerialize:e=>{Ie(e,Nt)&&$.addIframe(e),we(e,Nt)&&V.trackLinkElement(e),ke(e)&&G.addShadowRoot(ae.shadowRoot(e),document)},onIframeLoad:(e,t)=>{$.attachIframe(e,t),G.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{V.attachLinkElement(e,t)},keepIframeSrcFn:E});if(!t)return console.warn("Failed to snapshot the document");kt({type:Ee.FullSnapshot,data:{node:t,initialOffset:me(window)}},e),Ge.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&V.adoptStyleSheets(document.adoptedStyleSheets,Nt.getId(document))};try{const e=[],t=e=>{var t;return Ye(nt)({mutationCb:Z,mousemoveCb:(e,t)=>kt({type:Ee.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>kt({type:Ee.IncrementalSnapshot,data:{source:Ae.MouseInteraction,...e}}),scrollCb:q,viewportResizeCb:e=>kt({type:Ee.IncrementalSnapshot,data:{source:Ae.ViewportResize,...e}}),inputCb:e=>kt({type:Ee.IncrementalSnapshot,data:{source:Ae.Input,...e}}),mediaInteractionCb:e=>kt({type:Ee.IncrementalSnapshot,data:{source:Ae.MediaInteraction,...e}}),styleSheetRuleCb:e=>kt({type:Ee.IncrementalSnapshot,data:{source:Ae.StyleSheetRule,...e}}),styleDeclarationCb:e=>kt({type:Ee.IncrementalSnapshot,data:{source:Ae.StyleDeclaration,...e}}),canvasMutationCb:W,fontCb:e=>kt({type:Ee.IncrementalSnapshot,data:{source:Ae.Font,...e}}),selectionCb:e=>{kt({type:Ee.IncrementalSnapshot,data:{source:Ae.Selection,...e}})},customElementCb:e=>{kt({type:Ee.IncrementalSnapshot,data:{source:Ae.CustomElement,...e}})},blockClass:r,ignoreClass:s,ignoreSelector:a,maskTextClass:l,maskTextSelector:c,maskInputOptions:D,inlineStylesheet:u,sampling:v,recordDOM:S,recordCanvas:I,inlineImages:x,userTriggeredOnInput:T,collectFonts:M,doc:e,maskInputFn:f,maskTextFn:m,keepIframeSrcFn:E,blockSelector:i,slimDOMOptions:F,dataURLOptions:b,mirror:Nt,iframeManager:$,stylesheetManager:V,shadowDomManager:G,processedNodeManager:Y,canvasManager:Mt,ignoreCSSAttributes:A,plugins:(null==(t=null==N?void 0:N.filter((e=>e.observer)))?void 0:t.map((e=>({observer:e.observer,options:e.options,callback:t=>kt({type:Ee.Plugin,data:{plugin:e.name,payload:t}})}))))||[]},g)};$.addLoadListener((n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}}));const n=()=>{Tt(),e.push(t(document)),xt=!0};return"interactive"===document.readyState||"complete"===document.readyState?n():(e.push(le("DOMContentLoaded",(()=>{kt({type:Ee.DomContentLoaded,data:{}}),"DOMContentLoaded"===k&&n()}))),e.push(le("load",(()=>{kt({type:Ee.Load,data:{}}),"load"===k&&n()}),window))),()=>{e.forEach((e=>e())),Y.destroy(),xt=!1,$e=void 0}}catch(e){console.warn(e)}}var At,Rt;Et.addCustomEvent=(e,t)=>{if(!xt)throw new Error("please add custom event after start recording");kt({type:Ee.Custom,data:{tag:e,payload:t}})},Et.freezePage=()=>{Ge.forEach((e=>e.freeze()))},Et.takeFullSnapshot=e=>{if(!xt)throw new Error("please take full snapshot after start recording");Tt(e)},Et.mirror=Nt,(Rt=At||(At={}))[Rt.NotStarted=0]="NotStarted",Rt[Rt.Running=1]="Running",Rt[Rt.Stopped=2]="Stopped";var Ot,Lt=Object.defineProperty,Dt=(e,t,n)=>((e,t,n)=>t in e?Lt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),Ft=Object.defineProperty,Bt=(e,t,n)=>((e,t,n)=>t in e?Ft(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),Ht=Object.defineProperty,Pt=(e,t,n)=>((e,t,n)=>t in e?Ht(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);const Zt={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},qt={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Wt={};function Vt(e){if(Wt[e])return Wt[e];const t=globalThis[e],n=t.prototype,o=e in Zt?Zt[e]:void 0,r=Boolean(o&&o.every((e=>{var t,o;return Boolean(null==(o=null==(t=Object.getOwnPropertyDescriptor(n,e))?void 0:t.get)?void 0:o.toString().includes("[native code]"))}))),i=e in qt?qt[e]:void 0,s=Boolean(i&&i.every((e=>{var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))})));if(r&&s)return Wt[e]=t.prototype,t.prototype;try{const o=document.createElement("iframe");document.body.appendChild(o);const r=o.contentWindow;if(!r)return t.prototype;const i=r[e].prototype;return document.body.removeChild(o),i?Wt[e]=i:n}catch{return n}}const $t={};function Yt(e,t,n){var o;const r=`${e}.${String(n)}`;if($t[r])return $t[r].call(t);const i=Vt(e),s=null==(o=Object.getOwnPropertyDescriptor(i,n))?void 0:o.get;return s?($t[r]=s,s.call(t)):t[n]}const Gt={};function jt(e,t,n){const o=`${e}.${String(n)}`;if(Gt[o])return Gt[o].bind(t);const r=Vt(e)[n];return"function"!=typeof r?t[n]:(Gt[o]=r,r.bind(t))}const zt={childNodes:function(e){return Yt("Node",e,"childNodes")},parentNode:function(e){return Yt("Node",e,"parentNode")},parentElement:function(e){return Yt("Node",e,"parentElement")},textContent:function(e){return Yt("Node",e,"textContent")},contains:function(e,t){return jt("Node",e,"contains")(t)},getRootNode:function(e){return jt("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?Yt("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?Yt("Element",e,"shadowRoot"):null},querySelector:function(e,t){return Yt("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return Yt("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return Vt("MutationObserver").constructor}};class Ut{constructor(){Pt(this,"idNodeMap",new Map),Pt(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;const 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){const 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){const n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){const n=this.getNode(e);if(n){const e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Xt(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&Xt(zt.parentNode(e),t,n);for(let n=e.classList.length;n--;){const o=e.classList[n];if(t.test(o))return!0}return!!n&&Xt(zt.parentNode(e),t,n)}class Kt{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(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(!(e instanceof Kt))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"}}const Jt={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Qt={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},en={};function tn(e){if(en[e])return en[e];const t=globalThis[e],n=t.prototype,o=e in Jt?Jt[e]:void 0,r=Boolean(o&&o.every((e=>{var t,o;return Boolean(null==(o=null==(t=Object.getOwnPropertyDescriptor(n,e))?void 0:t.get)?void 0:o.toString().includes("[native code]"))}))),i=e in Qt?Qt[e]:void 0,s=Boolean(i&&i.every((e=>{var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))})));if(r&&s)return en[e]=t.prototype,t.prototype;try{const o=document.createElement("iframe");document.body.appendChild(o);const r=o.contentWindow;if(!r)return t.prototype;const i=r[e].prototype;return document.body.removeChild(o),i?en[e]=i:n}catch{return n}}const nn={};function on(e,t,n){var o;const r=`${e}.${String(n)}`;if(nn[r])return nn[r].call(t);const i=tn(e),s=null==(o=Object.getOwnPropertyDescriptor(i,n))?void 0:o.get;return s?(nn[r]=s,s.call(t)):t[n]}const rn={};function sn(e,t,n){const o=`${e}.${String(n)}`;if(rn[o])return rn[o].bind(t);const r=tn(e)[n];return"function"!=typeof r?t[n]:(rn[o]=r,r.bind(t))}const an={childNodes:function(e){return on("Node",e,"childNodes")},parentNode:function(e){return on("Node",e,"parentNode")},parentElement:function(e){return on("Node",e,"parentElement")},textContent:function(e){return on("Node",e,"textContent")},contains:function(e,t){return sn("Node",e,"contains")(t)},getRootNode:function(e){return sn("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?on("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?on("Element",e,"shadowRoot"):null},querySelector:function(e,t){return on("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return on("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return tn("MutationObserver").constructor}};const ln="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.";let cn={map:{},getId:()=>(console.error(ln),-1),getNode:()=>(console.error(ln),null),removeNodeFromMap(){console.error(ln)},has:()=>(console.error(ln),!1),reset(){console.error(ln)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(cn=new Proxy(cn,{get:(e,t,n)=>("map"===t&&console.error(ln),Reflect.get(e,t,n))}));let un=Date.now;function dn(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:an.parentElement(e)}/[1-9][0-9]{12}/.test(Date.now().toString())||(un=()=>(new Date).getTime());function pn(e){var t;let n=null;return"getRootNode"in e&&(null==(t=an.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&an.host(an.getRootNode(e))&&(n=an.host(an.getRootNode(e))),n}function hn(e){let t,n=e;for(;t=pn(n);)n=t;return n}function fn(e){const t=e.ownerDocument;if(!t)return!1;const n=hn(e);return an.contains(t,n)}const mn=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:class{constructor(){Bt(this,"id",1),Bt(this,"styleIDMap",new WeakMap),Bt(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){if(this.has(e))return this.getId(e);let n;return n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),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 cn},closestElementOfNode:dn,getBaseDimension:function e(t,n){var o,r;const i=null==(r=null==(o=t.ownerDocument)?void 0:o.defaultView)?void 0:r.frameElement;if(!i||i===n)return{x:0,y:0,relativeScale:1,absoluteScale:1};const s=i.getBoundingClientRect(),a=e(i,n),l=s.height/i.clientHeight;return{x:s.x*a.relativeScale+a.x,y:s.y*a.relativeScale+a.y,relativeScale:l,absoluteScale:a.absoluteScale*l}},getNestedRule:function e(t,n){const o=t[n[0]];return 1===n.length?o:e(o.cssRules[n[1]].cssRules,n.slice(2))},getPositionsAndIndex:function(e){const t=[...e],n=t.pop();return{positions:t,index:n}},getRootShadowHost:hn,getShadowHost:pn,getWindowHeight:function(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight},getWindowScroll:function(e){var t,n,o,r;const 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=an.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==(o=an.parentElement(i.body))?void 0:o.scrollTop)||(null==(r=null==i?void 0:i.body)?void 0:r.scrollTop)||0}},getWindowWidth:function(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth},hasShadowRoot:function(e){return!!e&&(e instanceof Kt&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(an.shadowRoot(e)))},hookSetter:function e(t,n,o,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window;const s=i.Object.getOwnPropertyDescriptor(t,n);return i.Object.defineProperty(t,n,r?o:{set(e){setTimeout((()=>{o.set.call(this,e)}),0),s&&s.set&&s.set.call(this,e)}}),()=>e(t,n,s||{},!0)},inDom:function(e){const t=e.ownerDocument;return!!t&&(an.contains(t,e)||fn(e))},isAncestorRemoved:function e(t,n){if(function(e){const t=e&&"host"in e&&"mode"in e&&zt.host(e)||null;return Boolean(t&&"shadowRoot"in t&&zt.shadowRoot(t)===e)}(t))return!1;const o=n.getId(t);if(!n.has(o))return!0;const r=an.parentNode(t);return(!r||r.nodeType!==t.DOCUMENT_NODE)&&(!r||e(r,n))},isBlocked:function(e,t,n,o){if(!e)return!1;const r=dn(e);if(!r)return!1;try{if("string"==typeof t){if(r.classList.contains(t))return!0;if(o&&null!==r.closest("."+t))return!0}else if(Xt(r,t,o))return!0}catch(e){}if(n){if(r.matches(n))return!0;if(o&&null!==r.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(let o=t.children.length-1;o>=0;o--)e(t.children[o],n)},legacy_isTouchEvent:function(e){return Boolean(e.changedTouches)},get nowTimestamp(){return un},on:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document;const o={capture:!0,passive:!0};return n.addEventListener(e,t,o),()=>n.removeEventListener(e,t,o)},patch:function(e,t,n){try{if(!(t in e))return()=>{};const o=e[t],r=n(o);return"function"==typeof r&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__rrweb_original__:{enumerable:!1,value:o}})),e[t]=r,()=>{e[t]=o}}catch{return()=>{}}},polyfill:function(){let 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){const t={},n=(e,n)=>{const o={value:e,parent:n,children:[]};return t[e.node.id]=o,o},o=[];for(const r of e){const{nextId:e,parentId:i}=r;if(e&&e in t){const i=t[e];if(i.parent){const e=i.parent.children.indexOf(i);i.parent.children.splice(e,0,n(r,i.parent))}else{const e=o.indexOf(i);o.splice(e,0,n(r,null))}}else if(i in t){const e=t[i];e.children.push(n(r,e))}else o.push(n(r,null))}return o},shadowHostInDom:fn,throttle:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=null,r=0;return function(){for(var i=arguments.length,s=new Array(i),a=0;a<i;a++)s[a]=arguments[a];const l=Date.now();r||!1!==n.leading||(r=l);const c=t-(l-r),u=this;c<=0||c>t?(o&&(clearTimeout(o),o=null),r=l,e.apply(u,s)):o||!1===n.trailing||(o=setTimeout((()=>{r=!1===n.leading?0:Date.now(),o=null,e.apply(u,s)}),c))}},uniqueTextMutations:function(e){const t=new Set,n=[];for(let o=e.length;o--;){const r=e[o];t.has(r.id)||(n.push(r),t.add(r.id))}return n}},Symbol.toStringTag,{value:"Module"}));for(var gn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",yn="undefined"==typeof Uint8Array?[]:new Uint8Array(256),vn=0;vn<64;vn++)yn[gn.charCodeAt(vn)]=vn;"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]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(Ot=e.contentWindow)?void 0:Ot.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}var bn;new Ut,function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(bn||(bn={}));class _n{constructor(e){Dt(this,"fileName"),Dt(this,"functionName"),Dt(this,"lineNumber"),Dt(this,"columnNumber"),this.fileName=e.fileName||"",this.functionName=e.functionName||"",this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber}toString(){const e=this.lineNumber||"",t=this.columnNumber||"";return this.functionName?`${this.functionName} (${this.fileName}:${e}:${t})`:`${this.fileName}:${e}:${t}`}}const Cn=/(^|@)\S+:\d+/,Sn=/^\s*at .*(\S+:\d+|\(native\))/m,In=/^(eval@)?(\[native code])?$/,wn={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(Sn)?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];const t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!t)throw new Error(`Cannot parse given url: ${e}`);return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter((function(e){return!!e.match(Sn)}),this).map((function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));let t=e.replace(/^\s+/,"").replace(/\(eval code/g,"(");const n=t.match(/ (\((.+):(\d+):(\d+)\)$)/);t=n?t.replace(n[0],""):t;const o=t.split(/\s+/).slice(1),r=this.extractLocation(n?n[1]:o.pop()),i=o.join(" ")||void 0,s=["eval","<anonymous>"].indexOf(r[0])>-1?void 0:r[0];return new _n({functionName:i,fileName:s,lineNumber:r[1],columnNumber:r[2]})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(e){return!e.match(In)}),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 _n({functionName:e});{const t=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(t),o=n&&n[1]?n[1]:void 0,r=this.extractLocation(e.replace(t,""));return new _n({functionName:o,fileName:r[0],lineNumber:r[1],columnNumber:r[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){const t=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),o=[];for(let e=2,r=n.length;e<r;e+=2){const r=t.exec(n[e]);r&&o.push(new _n({fileName:r[2],lineNumber:parseFloat(r[1])}))}return o},parseOpera10:function(e){const t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,n=e.stacktrace.split("\n"),o=[];for(let e=0,r=n.length;e<r;e+=2){const r=t.exec(n[e]);r&&o.push(new _n({functionName:r[3]||void 0,fileName:r[2],lineNumber:parseFloat(r[1])}))}return o},parseOpera11:function(e){return e.stack.split("\n").filter((function(e){return!!e.match(Cn)&&!e.match(/^Error created at/)}),this).map((function(e){const t=e.split("@"),n=this.extractLocation(t.pop()),o=(t.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new _n({functionName:o,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})}),this)}};function kn(e){if(!e||!e.outerHTML)return"";let t="";for(;e.parentElement;){let n=e.localName;if(!n)break;n=n.toLowerCase();const o=e.parentElement,r=[];if(o.children&&o.children.length>0)for(let e=0;e<o.children.length;e++){const t=o.children[e];t.localName&&t.localName.toLowerCase&&t.localName.toLowerCase()===n&&r.push(t)}r.length>1&&(n+=`:eq(${r.indexOf(e)})`),t=n+(t?">"+t:""),e=o}return t}function Tn(e){return"[object Object]"===Object.prototype.toString.call(e)}function Mn(e,t){if(0===t)return!0;const n=Object.keys(e);for(const o of n)if(Tn(e[o])&&Mn(e[o],t-1))return!0;return!1}function xn(e,t){const n={numOfKeysLimit:50,depthOfLimit:4};Object.assign(n,t);const o=[],r=[];return JSON.stringify(e,(function(e,t){if(o.length>0){const n=o.indexOf(this);~n?o.splice(n+1):o.push(this),~n?r.splice(n,1/0,e):r.push(e),~o.indexOf(t)&&(t=o[0]===t?"[Circular ~]":"[Circular ~."+r.slice(0,o.indexOf(t)).join(".")+"]")}else o.push(t);if(null===t)return t;if(void 0===t)return"undefined";if(function(e){if(Tn(e)&&Object.keys(e).length>n.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if(Tn(e)&&Mn(e,n.depthOfLimit))return!0;return!1}(t))return function(e){let t=e.toString();n.stringLengthLimit&&t.length>n.stringLengthLimit&&(t=`${t.slice(0,n.stringLengthLimit)}...`);return t}(t);if("bigint"==typeof t)return t.toString()+"n";if(t instanceof Event){const e={};for(const n in t){const o=t[n];Array.isArray(o)?e[n]=kn(o.length?o[0]:null):e[n]=o}return e}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}))}const Nn={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 En(e,t,n){const o=n?Object.assign({},Nn,n):Nn,r=o.logger;if(!r)return()=>{};let i;i="string"==typeof r?t[r]:r;let s=0,a=!1;const l=[];if(o.level.includes("error")){const n=t=>{const n=t.message,r=t.error,i=wn.parse(r).map((e=>e.toString())),s=[xn(n,o.stringifyOptions)];e({level:"error",trace:i,payload:s})};t.addEventListener("error",n),l.push((()=>{t.removeEventListener("error",n)}));const r=t=>{let n,r;t.reason instanceof Error?(n=t.reason,r=[xn(`Uncaught (in promise) ${n.name}: ${n.message}`,o.stringifyOptions)]):(n=new Error,r=[xn("Uncaught (in promise)",o.stringifyOptions),xn(t.reason,o.stringifyOptions)]);const i=wn.parse(n).map((e=>e.toString()));e({level:"error",trace:i,payload:r})};t.addEventListener("unhandledrejection",r),l.push((()=>{t.removeEventListener("unhandledrejection",r)}))}for(const e of o.level)l.push(c(i,e));return()=>{l.forEach((e=>e()))};function c(t,n){var r=this;return t[n]?mn.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]||a)){a=!0;try{const t=wn.parse(new Error).map((e=>e.toString())).splice(1),r=("assert"===n?l.slice(1):l).map((e=>xn(e,o.stringifyOptions)));s++,s<o.lengthThreshold?e({level:n,trace:t,payload:r}):s===o.lengthThreshold&&e({level:"warn",trace:[],payload:[xn("The number of log records reached the threshold.")]})}catch(e){t("rrweb logger error:",e,...l)}finally{a=!1}}})):()=>{}}}const An=e=>({name:"rrweb/console@1",observer:En,options:e}),Rn="undefined"!=typeof window?window:void 0,On="undefined"!=typeof globalThis?globalThis:Rn,Ln=Array.prototype.forEach,Dn=null==On?void 0:On.navigator,Fn=null==On?void 0:On.document;null==On||On.location,null==On||On.fetch,null!=On&&On.XMLHttpRequest&&"withCredentials"in new On.XMLHttpRequest&&On.XMLHttpRequest,null==On||On.AbortController,null==Dn||Dn.userAgent;const Bn=null!=Rn?Rn:{},Hn="[PostHog.js]",Pn={_log:function(e){if(Rn&&Bn.POSTHOG_DEBUG&&!ro(Rn.console)&&Rn.console){const r="__rrweb_original__"in Rn.console[e]?Rn.console[e].__rrweb_original__:Rn.console[e];for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];r(Hn,...n)}},info:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Pn._log("log",...t)},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Pn._log("warn",...t)},error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Pn._log("error",...t)},critical:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];console.error(Hn,...t)},uninitializedWarning:e=>{Pn.error(`You must initialize PostHog before calling ${e}`)}},Zn={},qn=function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function Wn(e,t,n){if(Qn(e))if(Ln&&e.forEach===Ln)e.forEach(t,n);else if("length"in e&&e.length===+e.length)for(let o=0,r=e.length;o<r;o++)if(o in e&&t.call(n,e[o],o)===Zn)return}function Vn(e,t,n){if(!lo(e)){if(Qn(e))return Wn(e,t,n);if(ho(e)){for(const o of e.entries())if(t.call(n,o[1],o[0])===Zn)return}else for(const o in e)if(Kn.call(e,o)&&t.call(n,e[o],o)===Zn)return}}const $n=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return Wn(n,(function(t){for(const n in t)void 0!==t[n]&&(e[n]=t[n])})),e};function Yn(e,t){return-1!==e.indexOf(t)}function Gn(e){const t=Object.keys(e);let n=t.length;const o=new Array(n);for(;n--;)o[n]=[t[n],e[t[n]]];return o}let jn;!function(e){e.GZipJS="gzip-js",e.Base64="base64"}(jn||(jn={}));const zn=["fatal","error","warning","log","info","debug"],Un=Array.isArray,Xn=Object.prototype,Kn=Xn.hasOwnProperty,Jn=Xn.toString,Qn=Un||function(e){return"[object Array]"===Jn.call(e)},eo=e=>"function"==typeof e,to=e=>eo(e)&&-1!==e.toString().indexOf("[native code]"),no=e=>{if(!eo(e))return!1;return Object.getOwnPropertyNames(e.prototype||{}).some((e=>e.indexOf("__zone")))},oo=e=>e===Object(e)&&!Qn(e),ro=e=>void 0===e,io=e=>"[object String]"==Jn.call(e),so=e=>io(e)&&0===e.trim().length,ao=e=>null===e,lo=e=>ro(e)||ao(e),co=e=>"[object Number]"==Jn.call(e),uo=e=>"[object Boolean]"===Jn.call(e),po=e=>e instanceof Document,ho=e=>e instanceof FormData,fo=function(e){let t,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"&";const r=[];return Vn(e,(function(e,o){ro(e)||ro(o)||"undefined"===o||(t=encodeURIComponent((e=>e instanceof File)(e)?e.name:e.toString()),n=encodeURIComponent(o),r[r.length]=n+"="+t)})),r.join(o)};function mo(e){return!!e&&1===e.nodeType}function go(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function yo(e){return e?qn(e).split(/\s+/):[]}function vo(e){let 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 yo(t)}function bo(e){let t="";return Co(e)&&!So(e)&&e.childNodes&&e.childNodes.length&&Vn(e.childNodes,(function(e){var n;(function(e){return!!e&&3===e.nodeType})(e)&&e.textContent&&(t+=null!==(n=function(e){return lo(e)?null:qn(e).split(/(\s+)/).filter((e=>No(e))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}(e.textContent))&&void 0!==n?n:"")})),qn(t)}const _o=["a","button","form","input","select","textarea","label"];function Co(e){for(let t=e;t.parentNode&&!go(t,"body");t=t.parentNode){const e=vo(t);if(Yn(e,"ph-sensitive")||Yn(e,"ph-no-capture"))return!1}if(Yn(vo(e),"ph-include"))return!0;const t=e.type||"";if(io(t))switch(t.toLowerCase()){case"hidden":case"password":return!1}const n=e.name||e.id||"";if(io(n)){if(/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(n.replace(/[^a-zA-Z0-9]/g,"")))return!1}return!0}function So(e){return!!(go(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||go(e,"select")||go(e,"textarea")||"true"===e.getAttribute("contenteditable"))}const Io="(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})",wo=new RegExp(`^(?:${Io})$`),ko=new RegExp(Io),To="\\d{3}-?\\d{2}-?\\d{4}",Mo=new RegExp(`^(${To})$`),xo=new RegExp(`(${To})`);function No(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(lo(e))return!1;if(io(e)){e=qn(e);if((t?wo:ko).test((e||"").replace(/[- ]/g,"")))return!1;if((t?Mo:xo).test(e))return!1}return!0}function Eo(e){let t=bo(e);return t=`${t} ${Ao(e)}`.trim(),No(t)?t:""}function Ao(e){let t="";return e&&e.childNodes&&e.childNodes.length&&Vn(e.childNodes,(function(e){var n;if(e&&"span"===(null===(n=e.tagName)||void 0===n?void 0:n.toLowerCase()))try{const n=bo(e);t=`${t} ${n}`.trim(),e.childNodes&&e.childNodes.length&&(t=`${t} ${Ao(e)}`.trim())}catch(e){Pn.error(e)}})),t}function Ro(e){return function(e){const t=e.map((e=>{var t,n;let o="";if(e.tag_name&&(o+=e.tag_name),e.attr_class){e.attr_class.sort();for(const t of e.attr_class)o+=`.${t.replace(/"/g,"")}`}const r={...e.text?{text:e.text}:{},"nth-child":null!==(t=e.nth_child)&&void 0!==t?t:0,"nth-of-type":null!==(n=e.nth_of_type)&&void 0!==n?n:0,...e.href?{href:e.href}:{},...e.attr_id?{attr_id:e.attr_id}:{},...e.attributes},i={};return Gn(r).sort(((e,t)=>{let[n]=e,[o]=t;return n.localeCompare(o)})).forEach((e=>{let[t,n]=e;return i[Oo(t.toString())]=Oo(n.toString())})),o+=":",o+=Gn(r).map((e=>{let[t,n]=e;return`${t}="${n}"`})).join(""),o}));return t.join(";")}(function(e){return e.map((e=>{var t,n;const o={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:Lo(e),attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return Gn(e).filter((e=>{let[t]=e;return 0===t.indexOf("attr__")})).forEach((e=>{let[t,n]=e;return o.attributes[t]=n})),o}))}(e))}function Oo(e){return e.replace(/"|\\"/g,'\\"')}function Lo(e){const t=e.attr__class;return t?Qn(t)?t:yo(t):void 0}const Do={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"]};function Fo(e,t,n){try{if(!(t in e))return()=>{};const o=e[t],r=n(o);return eo(r)&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=r,()=>{e[t]=o}}catch{return()=>{}}}function Bo(e,t){var n;const o=function(e){try{return"string"==typeof e?new URL(e).hostname:"url"in e?new URL(e.url).hostname:e.hostname}catch{return null}}(e),r={hostname:o,isHostDenied:!1};if(null===(n=t.payloadHostDenyList)||void 0===n||!n.length||null==o||!o.trim().length)return r;for(const e of t.payloadHostDenyList)if(o.endsWith(e))return{hostname:o,isHostDenied:!0};return r}const Ho=e=>"navigation"===e.entryType,Po=e=>"resource"===e.entryType;function Zo(e,t,n){if(n.recordInitialRequests){const o=t.performance.getEntries().filter((e=>Ho(e)||Po(e)&&n.initiatorTypes.includes(e.initiatorType)));e({requests:o.flatMap((e=>Go({entry:e,method:void 0,status:void 0,networkRequest:{},isInitial:!0}))),isInitial:!0})}const o=new t.PerformanceObserver((t=>{const o=t.getEntries().filter((e=>Ho(e)||Po(e)&&n.initiatorTypes.includes(e.initiatorType)&&(e=>!n.recordBody&&!n.recordHeaders||"xmlhttprequest"!==e.initiatorType&&"fetch"!==e.initiatorType)(e)));e({requests:o.flatMap((e=>Go({entry:e,method:void 0,status:void 0,networkRequest:{}})))})})),r=PerformanceObserver.supportedEntryTypes.filter((e=>n.performanceEntryTypeToObserve.includes(e)));return o.observe({entryTypes:r}),()=>{o.disconnect()}}function qo(e,t){return!!t&&(uo(t)||t[e])}function Wo(e){let{type:t,recordBody:n,headers:o}=e;function r(e){const t=Object.keys(o).find((e=>"content-type"===e.toLowerCase())),n=t&&o[t];return e.some((e=>null==n?void 0:n.includes(e)))}if(!n)return!1;if(uo(n))return!0;if(Qn(n))return r(n);const i=n[t];return uo(i)?i:r(i)}async function Vo(e,t,n,o,r){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(i>10)return Pn.warn("Failed to get performance entry for request",{url:n,initiatorType:t}),null;const s=function(e,t){for(let n=e.length-1;n>=0;n-=1)if(t(e[n]))return e[n]}(e.performance.getEntriesByName(n),(e=>Po(e)&&e.initiatorType===t&&(ro(o)||e.startTime>=o)&&(ro(r)||e.startTime<=r)));return s||(await new Promise((e=>setTimeout(e,50*i))),Vo(e,t,n,o,r,i+1))}function $o(e){let{body:t,options:n,url:o}=e;if(lo(t))return null;const{hostname:r,isHostDenied:i}=Bo(o,n);if(i)return r+" is in deny list";if(io(t))return t;if(po(t))return t.textContent;if(ho(t))return fo(t);if(oo(t))try{return JSON.stringify(t)}catch{return"[SessionReplay] Failed to stringify response object"}return"[SessionReplay] Cannot read body of type "+toString.call(t)}const Yo=e=>!ao(e)&&("navigation"===e.entryType||"resource"===e.entryType);function Go(e){let{entry:t,method:n,status:o,networkRequest:r,isInitial:i,start:s,end:a,url:l,initiatorType:c}=e;s=t?t.startTime:s,a=t?t.responseEnd:a;const u=Math.floor(Date.now()-performance.now()),d=Math.floor(u+(s||0)),p=[{...t?t.toJSON():{name:l},startTime:ro(s)?void 0:Math.round(s),endTime:ro(a)?void 0:Math.round(a),timeOrigin:u,timestamp:d,method:n,initiatorType:c||(t?t.initiatorType:void 0),status:o,requestHeaders:r.requestHeaders,requestBody:r.requestBody,responseHeaders:r.responseHeaders,responseBody:r.responseBody,isInitial:i}];if(Yo(t))for(const e of t.serverTiming||[])p.push({timeOrigin:u,timestamp:d,startTime:Math.round(t.startTime),name:e.name,duration:e.duration,entryType:"serverTiming"});return p}const jo=["video/","audio/"];function zo(e){return new Promise(((t,n)=>{const o=setTimeout((()=>t("[SessionReplay] Timeout while trying to read body")),500);try{e.clone().text().then((e=>t(e)),(e=>n(e))).finally((()=>clearTimeout(o)))}catch{clearTimeout(o),t("[SessionReplay] Failed to read body")}}))}async function Uo(e){let{r:t,options:n,url:o}=e;const r=function(e){var t;let{r:n,options:o,url:r}=e;if("chunked"===n.headers.get("Transfer-Encoding"))return"Chunked Transfer-Encoding is not supported";const i=null===(t=n.headers.get("Content-Type"))||void 0===t?void 0:t.toLowerCase(),s=jo.some((e=>null==i?void 0:i.startsWith(e)));if(i&&s)return`Content-Type ${i} is not supported`;const{hostname:a,isHostDenied:l}=Bo(r,o);return l?a+" is in deny list":null}({r:t,options:n,url:o});return ao(r)?zo(t):Promise.resolve(r)}function Xo(e,t,n){if(!n.initiatorTypes.includes("fetch"))return()=>{};const o=qo("request",n.recordHeaders),r=qo("response",n.recordHeaders),i=Fo(t,"fetch",(i=>async function(s,a){const l=new Request(s,a);let c;const u={};let d,p;try{const e={};l.headers.forEach(((t,n)=>{e[n]=t})),o&&(u.requestHeaders=e),Wo({type:"request",headers:e,url:s,recordBody:n.recordBody})&&(u.requestBody=await async function(e){let{r:t,options:n,url:o}=e;const{hostname:r,isHostDenied:i}=Bo(o,n);return i?Promise.resolve(r+" is in deny list"):zo(t)}({r:l,options:n,url:s})),d=t.performance.now(),c=await i(l),p=t.performance.now();const a={};return c.headers.forEach(((e,t)=>{a[t]=e})),r&&(u.responseHeaders=a),Wo({type:"response",headers:a,url:s,recordBody:n.recordBody})&&(u.responseBody=await Uo({r:c,options:n,url:s})),c}finally{Vo(t,"fetch",l.url,d,p).then((t=>{var n;const o=Go({entry:t,method:l.method,status:null===(n=c)||void 0===n?void 0:n.status,networkRequest:u,start:d,end:p,url:l.url,initiatorType:"fetch"});e({requests:o})})).catch((()=>{}))}}));return()=>{i()}}let Ko=null;function Jo(e,t,n){if(!("performance"in t))return()=>{};if(Ko)return Pn.warn("Network observer already initialised, doing nothing"),()=>{};const o=n?Object.assign({},Do,n):Do,r=t=>{const n=[];t.requests.forEach((e=>{const t=o.maskRequestFn(e);t&&n.push(t)})),n.length>0&&e({...t,requests:n})},i=Zo(r,t,o);let s=()=>{},a=()=>{};return(o.recordHeaders||o.recordBody)&&(s=function(e,t,n){if(!n.initiatorTypes.includes("xmlhttprequest"))return()=>{};const o=qo("request",n.recordHeaders),r=qo("response",n.recordHeaders),i=Fo(t.XMLHttpRequest.prototype,"open",(i=>function(s,a){let l=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],c=arguments.length>3?arguments[3]:void 0,u=arguments.length>4?arguments[4]:void 0;const d=this,p=new Request(a),h={};let f,m;const g={},y=d.setRequestHeader.bind(d);d.setRequestHeader=(e,t)=>(g[e]=t,y(e,t)),o&&(h.requestHeaders=g);const v=d.send.bind(d);d.send=e=>(Wo({type:"request",headers:g,url:a,recordBody:n.recordBody})&&(h.requestBody=$o({body:e,options:n,url:a})),f=t.performance.now(),v(e)),d.addEventListener("readystatechange",(()=>{if(d.readyState!==d.DONE)return;m=t.performance.now();const o={};d.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((e=>{const t=e.split(": "),n=t.shift(),r=t.join(": ");n&&(o[n]=r)})),r&&(h.responseHeaders=o),Wo({type:"response",headers:o,url:a,recordBody:n.recordBody})&&(h.responseBody=$o({body:d.response,options:n,url:a})),Vo(t,"xmlhttprequest",p.url,f,m).then((t=>{const n=Go({entry:t,method:s,status:null==d?void 0:d.status,networkRequest:h,start:f,end:m,url:a.toString(),initiatorType:"xmlhttprequest"});e({requests:n})})).catch((()=>{}))})),i.call(d,s,a,l,c,u)}));return()=>{i()}}(r,t,o),a=Xo(r,t,o)),Ko=()=>{i(),s(),a()},Ko}const Qo=e=>({name:"rrweb/network@1",observer:Jo,options:e});let er,tr,nr;Bn.__PosthogExtensions__=Bn.__PosthogExtensions__||{},Bn.__PosthogExtensions__.rrwebPlugins={getRecordConsolePlugin:An,getRecordNetworkPlugin:Qo},Bn.__PosthogExtensions__.rrweb={record:Et,version:"v2"},Bn.rrweb={record:Et,version:"v2"},Bn.rrwebConsoleRecord={getRecordConsolePlugin:An},Bn.getRecordNetworkPlugin=Qo,function(e){e.Popover="popover",e.API="api",e.Widget="widget"}(er||(er={})),function(e){e.Open="open",e.MultipleChoice="multiple_choice",e.SingleChoice="single_choice",e.Rating="rating",e.Link="link"}(tr||(tr={})),function(e){e.NextQuestion="next_question",e.End="end",e.ResponseBased="response_based",e.SpecificQuestion="specific_question"}(nr||(nr={}));var or,rr,ir,sr,ar,lr,cr,ur,dr={},pr=[],hr=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,fr=Array.isArray;function mr(e,t){for(var n in t)e[n]=t[n];return e}function gr(e){var t=e.parentNode;t&&t.removeChild(e)}function yr(e,t,n){var o,r,i,s={};for(i in t)"key"==i?o=t[i]:"ref"==i?r=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?or.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===s[i]&&(s[i]=e.defaultProps[i]);return vr(e,s,o,r,null)}function vr(e,t,n,o,r){var i={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==r?++ir:r,__i:-1,__u:0};return null==r&&null!=rr.vnode&&rr.vnode(i),i}function br(e){return e.children}function _r(e,t){this.props=e,this.context=t}function Cr(e,t){if(null==t)return e.__?Cr(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?Cr(e):null}function Sr(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 Sr(e)}}function Ir(e){(!e.__d&&(e.__d=!0)&&sr.push(e)&&!wr.__r++||ar!==rr.debounceRendering)&&((ar=rr.debounceRendering)||lr)(wr)}function wr(){var e,t,n,o,r,i,s,a,l;for(sr.sort(cr);e=sr.shift();)e.__d&&(t=sr.length,o=void 0,i=(r=(n=e).__v).__e,a=[],l=[],(s=n.__P)&&((o=mr({},r)).__v=r.__v+1,rr.vnode&&rr.vnode(o),Rr(s,o,r,n.__n,void 0!==s.ownerSVGElement,32&r.__u?[i]:null,a,null==i?Cr(r):i,!!(32&r.__u),l),o.__.__k[o.__i]=o,Or(a,o,l),o.__e!=i&&Sr(o)),sr.length>t&&sr.sort(cr));wr.__r=0}function kr(e,t,n,o,r,i,s,a,l,c,u){var d,p,h,f,m,g=o&&o.__k||pr,y=t.length;for(n.__d=l,function(e,t,n){var o,r,i,s,a,l=t.length,c=n.length,u=c,d=0;for(e.__k=[],o=0;o<l;o++)null!=(r=e.__k[o]=null==(r=t[o])||"boolean"==typeof r||"function"==typeof r?null:"string"==typeof r||"number"==typeof r||"bigint"==typeof r||r.constructor==String?vr(null,r,null,null,r):fr(r)?vr(br,{children:r},null,null,null):void 0===r.constructor&&r.__b>0?vr(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r)?(r.__=e,r.__b=e.__b+1,a=Mr(r,n,s=o+d,u),r.__i=a,i=null,-1!==a&&(u--,(i=n[a])&&(i.__u|=131072)),null==i||null===i.__v?(-1==a&&d--,"function"!=typeof r.type&&(r.__u|=65536)):a!==s&&(a===s+1?d++:a>s?u>l-s?d+=a-s:d--:d=a<s&&a==s-1?a-s:0,a!==o+d&&(r.__u|=65536))):(i=n[o])&&null==i.key&&i.__e&&(i.__e==e.__d&&(e.__d=Cr(i)),Dr(i,i,!1),n[o]=null,u--);if(u)for(o=0;o<c;o++)null!=(i=n[o])&&0==(131072&i.__u)&&(i.__e==e.__d&&(e.__d=Cr(i)),Dr(i,i))}(n,t,g),l=n.__d,d=0;d<y;d++)null!=(h=n.__k[d])&&"boolean"!=typeof h&&"function"!=typeof h&&(p=-1===h.__i?dr:g[h.__i]||dr,h.__i=d,Rr(e,h,p,r,i,s,a,l,c,u),f=h.__e,h.ref&&p.ref!=h.ref&&(p.ref&&Lr(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=Tr(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 Tr(e,t,n){var o,r;if("function"==typeof e.type){for(o=e.__k,r=0;o&&r<o.length;r++)o[r]&&(o[r].__=e,t=Tr(o[r],t,n));return t}return e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e),t&&t.nextSibling}function Mr(e,t,n,o){var r=e.key,i=e.type,s=n-1,a=n+1,l=t[n];if(null===l||l&&r==l.key&&i===l.type)return n;if(o>(null!=l&&0==(131072&l.__u)?1:0))for(;s>=0||a<t.length;){if(s>=0){if((l=t[s])&&0==(131072&l.__u)&&r==l.key&&i===l.type)return s;s--}if(a<t.length){if((l=t[a])&&0==(131072&l.__u)&&r==l.key&&i===l.type)return a;a++}}return-1}function xr(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||hr.test(t)?n:n+"px"}function Nr(e,t,n,o,r){var i;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof o&&(e.style.cssText=o=""),o)for(t in o)n&&t in n||xr(e.style,t,"");if(n)for(t in n)o&&n[t]===o[t]||xr(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?o?n.u=o.u:(n.u=Date.now(),e.addEventListener(t,i?Ar:Er,i)):e.removeEventListener(t,i?Ar:Er,i);else{if(r)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 Er(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(rr.event?rr.event(e):e)}function Ar(e){return this.l[e.type+!0](rr.event?rr.event(e):e)}function Rr(e,t,n,o,r,i,s,a,l,c){var u,d,p,h,f,m,g,y,v,b,_,C,S,I,w,k=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(l=!!(32&n.__u),i=[a=t.__e=n.__e]),(u=rr.__b)&&u(t);e:if("function"==typeof k)try{if(y=t.props,v=(u=k.contextType)&&o[u.__c],b=u?v?v.props.value:u.__:o,n.__c?g=(d=t.__c=n.__c).__=d.__E:("prototype"in k&&k.prototype.render?t.__c=d=new k(y,b):(t.__c=d=new _r(y,b),d.constructor=k,d.render=Fr),v&&v.sub(d),d.props=y,d.state||(d.state={}),d.context=b,d.__n=o,p=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=k.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=mr({},d.__s)),mr(d.__s,k.getDerivedStateFromProps(y,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&&y!==h&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(y,b),!d.__e&&(null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(y,d.__s,b)||t.__v===n.__v)){for(t.__v!==n.__v&&(d.props=y,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&&s.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(y,d.__s,b),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(h,f,m)}))}if(d.context=b,d.props=y,d.__P=e,d.__e=!1,C=rr.__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&&(o=mr(mr({},o),d.getChildContext())),p||null==d.getSnapshotBeforeUpdate||(m=d.getSnapshotBeforeUpdate(h,f)),kr(e,fr(w=null!=u&&u.type===br&&null==u.key?u.props.children:u)?w:[w],t,n,o,r,i,s,a,l,c),d.base=t.__e,t.__u&=-161,d.__h.length&&s.push(d),g&&(d.__E=d.__=null)}catch(e){t.__v=null,l||null!=i?(t.__e=a,t.__u|=l?160:32,i[i.indexOf(a)]=null):(t.__e=n.__e,t.__k=n.__k),rr.__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,o,r,i,s,a,l){var c,u,d,p,h,f,m,g=n.props,y=t.props,v=t.type;if("svg"===v&&(r=!0),null!=i)for(c=0;c<i.length;c++)if((h=i[c])&&"setAttribute"in h==!!v&&(v?h.localName===v:3===h.nodeType)){e=h,i[c]=null;break}if(null==e){if(null===v)return document.createTextNode(y);e=r?document.createElementNS("http://www.w3.org/2000/svg",v):document.createElement(v,y.is&&y),i=null,a=!1}if(null===v)g===y||a&&e.data===y||(e.data=y);else{if(i=i&&or.call(e.childNodes),g=n.props||dr,!a&&null!=i)for(g={},c=0;c<e.attributes.length;c++)g[(h=e.attributes[c]).name]=h.value;for(c in g)h=g[c],"children"==c||("dangerouslySetInnerHTML"==c?d=h:"key"===c||c in y||Nr(e,c,null,h,r));for(c in y)h=y[c],"children"==c?p=h:"dangerouslySetInnerHTML"==c?u=h:"value"==c?f=h:"checked"==c?m=h:"key"===c||a&&"function"!=typeof h||g[c]===h||Nr(e,c,h,g[c],r);if(u)a||d&&(u.__html===d.__html||u.__html===e.innerHTML)||(e.innerHTML=u.__html),t.__k=[];else if(d&&(e.innerHTML=""),kr(e,fr(p)?p:[p],t,n,o,r&&"foreignObject"!==v,i,s,i?i[0]:n.__k&&Cr(n,0),a,l),null!=i)for(c=i.length;c--;)null!=i[c]&&gr(i[c]);a||(c="value",void 0!==f&&(f!==e[c]||"progress"===v&&!f||"option"===v&&f!==g[c])&&Nr(e,c,f,g[c],!1),c="checked",void 0!==m&&m!==e[c]&&Nr(e,c,m,g[c],!1))}return e}(n.__e,t,n,o,r,i,s,l,c);(u=rr.diffed)&&u(t)}function Or(e,t,n){t.__d=void 0;for(var o=0;o<n.length;o++)Lr(n[o],n[++o],n[++o]);rr.__c&&rr.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){rr.__e(e,t.__v)}}))}function Lr(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){rr.__e(e,n)}}function Dr(e,t,n){var o,r;if(rr.unmount&&rr.unmount(e),(o=e.ref)&&(o.current&&o.current!==e.__e||Lr(o,null,t)),null!=(o=e.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(e){rr.__e(e,t)}o.base=o.__P=null,e.__c=void 0}if(o=e.__k)for(r=0;r<o.length;r++)o[r]&&Dr(o[r],t,n||"function"!=typeof e.type);n||null==e.__e||gr(e.__e),e.__=e.__e=e.__d=void 0}function Fr(e,t,n){return this.constructor(e,n)}function Br(e,t,n){var o,r,i,s;rr.__&&rr.__(e,t),r=(o="function"==typeof n)?null:t.__k,i=[],s=[],Rr(t,e=(!o&&n||t).__k=yr(br,null,[e]),r||dr,dr,void 0!==t.ownerSVGElement,!o&&n?[n]:r?null:t.firstChild?or.call(t.childNodes):null,i,!o&&n?n:r?r.__e:t.firstChild,o,s),Or(i,e,s)}function Hr(e,t,n){var o,r,i,s,a=mr({},e.props);for(i in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)"key"==i?o=t[i]:"ref"==i?r=t[i]:a[i]=void 0===t[i]&&void 0!==s?s[i]:t[i];return arguments.length>2&&(a.children=arguments.length>3?or.call(arguments,2):n),vr(e.type,a,o||e.key,r||e.ref,null)}or=pr.slice,rr={__e:function(e,t,n,o){for(var r,i,s;t=t.__;)if((r=t.__c)&&!r.__)try{if((i=r.constructor)&&null!=i.getDerivedStateFromError&&(r.setState(i.getDerivedStateFromError(e)),s=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e,o||{}),s=r.__d),s)return r.__E=r}catch(t){e=t}throw e}},ir=0,_r.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=mr({},this.state),"function"==typeof e&&(e=e(mr({},n),this.props)),e&&mr(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),Ir(this))},_r.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Ir(this))},_r.prototype.render=br,sr=[],lr="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,cr=function(e,t){return e.__v.__b-t.__v.__b},wr.__r=0,ur=0;const Pr=Rn,Zr=Fn,qr="seenSurvey_",Wr=e=>{const t={left:"left: 30px;",right:"right: 30px;",center:"\n left: 50%;\n transform: translateX(-50%);\n "};return`\n .survey-form, .thank-you-message {\n position: fixed;\n margin: 0px;\n bottom: 0px;\n color: black;\n font-weight: normal;\n font-family: -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: ${parseInt((null==e?void 0:e.maxWidth)||"300")}px;\n width: 100%;\n z-index: ${parseInt((null==e?void 0:e.zIndex)||"99999")};\n border: 1.5px solid ${(null==e?void 0:e.borderColor)||"#c9c6c6"};\n border-bottom: 0px;\n ${t[(null==e?void 0:e.position)||"right"]||"right: 30px;"}\n flex-direction: column;\n background: ${(null==e?void 0:e.backgroundColor)||"#eeeded"};\n border-top-left-radius: 10px;\n border-top-right-radius: 10px;\n box-shadow: -6px 0 16px -8px rgb(0 0 0 / 8%), -9px 0 28px 0 rgb(0 0 0 / 5%), -12px 0 48px 16px rgb(0 0 0 / 3%);\n }\n \n .survey-box, .thank-you-message-container {\n padding: 20px 25px 10px;\n display: flex;\n flex-direction: column;\n border-radius: 10px;\n }\n\n .thank-you-message {\n text-align: center;\n }\n\n .form-submit[disabled] {\n opacity: 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: -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: ${(null==e?void 0:e.borderColor)||"#c9c6c6"};\n margin-top: 14px;\n width: 100%;\n box-sizing: border-box;\n }\n .survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) textarea {\n margin-top: 0;\n }\n .form-submit {\n box-sizing: border-box;\n margin: 0;\n font-family: inherit;\n overflow: visible;\n text-transform: none;\n position: relative;\n display: inline-block;\n font-weight: 700;\n white-space: nowrap;\n text-align: center;\n border: 1.5px solid transparent;\n cursor: pointer;\n user-select: none;\n touch-action: manipulation;\n padding: 12px;\n font-size: 14px;\n border-radius: 6px;\n outline: 0;\n background: ${(null==e?void 0:e.submitButtonColor)||"black"} !important;\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.12);\n box-shadow: 0 2px 0 rgba(0, 0, 0, 0.045);\n width: 100%;\n }\n .form-cancel {\n display: flex;\n float: right;\n border: none;\n background: none;\n cursor: pointer;\n }\n .cancel-btn-wrapper {\n position: absolute;\n width: 35px;\n height: 35px;\n border-radius: 100%;\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n background: white;\n border: 1.5px solid ${(null==e?void 0:e.borderColor)||"#c9c6c6"};\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .bolded { font-weight: 600; }\n .buttons {\n display: flex;\n justify-content: center;\n }\n .footer-branding {\n font-size: 11px;\n margin-top: 10px;\n text-align: center;\n display: flex;\n justify-content: center;\n gap: 4px;\n align-items: center;\n font-weight: 500;\n background: ${(null==e?void 0:e.backgroundColor)||"#eeeded"};\n text-decoration: none;\n backgroundColor: ${(null==e?void 0:e.backgroundColor)||"#eeeded"};\n color: ${$r((null==e?void 0:e.backgroundColor)||"#eeeded")};\n }\n .survey-question {\n font-weight: 500;\n font-size: 14px;\n background: ${(null==e?void 0:e.backgroundColor)||"#eeeded"};\n }\n .question-textarea-wrapper {\n display: flex;\n flex-direction: column;\n }\n .survey-question-description {\n font-size: 13px;\n padding-top: 5px;\n background: ${(null==e?void 0:e.backgroundColor)||"#eeeded"};\n }\n .ratings-number {\n font-size: 16px;\n font-weight: 600;\n padding: 8px 0px;\n border: none;\n }\n .ratings-number:hover {\n cursor: pointer;\n }\n .rating-options {\n margin-top: 14px;\n }\n .rating-options-number {\n display: grid;\n border-radius: 6px;\n overflow: hidden;\n border: 1.5px solid ${(null==e?void 0:e.borderColor)||"#c9c6c6"};\n }\n .rating-options-number > .ratings-number {\n border-right: 1px solid ${(null==e?void 0:e.borderColor)||"#c9c6c6"};\n }\n .rating-options-number > .ratings-number:last-of-type {\n border-right: 0px;\n }\n .rating-options-number .rating-active {\n background: ${(null==e?void 0:e.ratingButtonActiveColor)||"black"};\n }\n .rating-options-emoji {\n display: flex;\n justify-content: space-between;\n }\n .ratings-emoji {\n font-size: 16px;\n background-color: transparent;\n border: none;\n padding: 0px;\n }\n .ratings-emoji:hover {\n cursor: pointer;\n }\n .ratings-emoji.rating-active svg {\n fill: ${(null==e?void 0:e.ratingButtonActiveColor)||"black"};\n }\n .emoji-svg {\n fill: '#939393';\n }\n .rating-text {\n display: flex;\n flex-direction: row;\n font-size: 11px;\n justify-content: space-between;\n margin-top: 6px;\n background: ${(null==e?void 0:e.backgroundColor)||"#eeeded"};\n opacity: .60;\n }\n .multiple-choice-options {\n margin-top: 13px;\n font-size: 14px;\n }\n .survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) .multiple-choice-options {\n margin-top: 0;\n }\n .multiple-choice-options .choice-option {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 13px;\n cursor: pointer;\n margin-bottom: 5px;\n position: relative;\n }\n .multiple-choice-options > .choice-option:last-of-type {\n margin-bottom: 0px;\n }\n .multiple-choice-options input {\n cursor: pointer;\n position: absolute;\n opacity: 0;\n }\n .choice-check {\n position: absolute;\n right: 10px;\n background: white;\n }\n .choice-check svg {\n display: none;\n }\n .multiple-choice-options .choice-option:hover .choice-check svg {\n display: inline-block;\n opacity: .25;\n }\n .multiple-choice-options input:checked + label + .choice-check svg {\n display: inline-block;\n opacity: 100% !important;\n }\n .multiple-choice-options input:checked + label {\n font-weight: bold;\n border: 1.5px solid rgba(0,0,0);\n }\n .multiple-choice-options input:checked + label input {\n font-weight: bold;\n }\n .multiple-choice-options label {\n width: 100%;\n cursor: pointer;\n padding: 10px;\n border: 1.5px solid rgba(0,0,0,.25);\n border-radius: 4px;\n background: white;\n }\n .multiple-choice-options .choice-option-open label {\n padding-right: 30px;\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n max-width: 100%;\n }\n .multiple-choice-options .choice-option-open label span {\n width: 100%;\n }\n .multiple-choice-options .choice-option-open input:disabled + label {\n opacity: 0.6;\n }\n .multiple-choice-options .choice-option-open label input {\n position: relative;\n opacity: 1;\n flex-grow: 1;\n border: 0;\n outline: 0;\n }\n .thank-you-message-body {\n margin-top: 6px;\n font-size: 14px;\n background: ${(null==e?void 0:e.backgroundColor)||"#eeeded"};\n }\n .thank-you-message-header {\n margin: 10px 0px 0px;\n background: ${(null==e?void 0:e.backgroundColor)||"#eeeded"};\n }\n .thank-you-message-container .form-submit {\n margin-top: 20px;\n margin-bottom: 10px;\n }\n .thank-you-message-countdown {\n margin-left: 6px;\n }\n .bottom-section {\n margin-top: 14px;\n }\n `};function Vr(e){if("#"===e[0]){const 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 $r(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Gr;"#"===t[0]&&(e=Vr(t)),t.startsWith("rgb")&&(e=t);const n={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}[t.toLowerCase()];if(n&&(e=Vr(n)),!e)return"black";const o=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(o){const e=parseInt(o[1]),t=parseInt(o[2]),n=parseInt(o[3]);return Math.sqrt(e*e*.299+t*t*.587+n*n*.114)>127.5?"black":"white"}return"black"}const Yr={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"},Gr="#eeeded",jr=function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,o=arguments.length>2?arguments[2]:void 0;o&&(localStorage.setItem(Qr(n),"true"),o.capture("survey sent",{$survey_name:n.name,$survey_id:n.id,$survey_iteration:n.current_iteration,$survey_iteration_start_date:n.current_iteration_start_date,$survey_questions:n.questions.map((e=>e.question)),sessionRecordingUrl:null===(e=o.get_session_replay_url)||void 0===e?void 0:e.call(o),...t,$set:{[ei(n,"responded")]:!0}}),Pr.dispatchEvent(new Event("PHSurveySent")))},zr=(e,t,n)=>{var o;!n&&t&&(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===(o=t.get_session_replay_url)||void 0===o?void 0:o.call(t),$set:{[ei(e,"dismissed")]:!0}}),localStorage.setItem(Qr(e),"true"),Pr.dispatchEvent(new Event("PHSurveyClosed")))},Ur=e=>e.map((e=>({sort:Math.floor(10*Math.random()),value:e}))).sort(((e,t)=>e.sort-t.sort)).map((e=>e.value)),Xr=(e,t)=>e.length===t.length&&e.every(((e,n)=>e===t[n]))?t.reverse():t,Kr=e=>(e.questions.forEach(((e,t)=>{e.originalQuestionIndex=t})),e.appearance&&e.appearance.shuffleQuestions?Xr(e.questions,Ur(e.questions)):e.questions),Jr=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,o,r,i,s;return null!=(null===(t=e.conditions)||void 0===t||null===(n=t.events)||void 0===n||null===(o=n.values)||void 0===o?void 0:o.length)&&(null===(r=e.conditions)||void 0===r||null===(i=r.events)||void 0===i||null===(s=i.values)||void 0===s?void 0:s.length)>0})(e))},Qr=e=>{let t=`${qr}${e.id}`;return e.current_iteration&&e.current_iteration>0&&(t=`${qr}${e.id}_${e.current_iteration}`),t},ei=(e,t)=>{let n=`$survey_${t}/${e.id}`;return e.current_iteration&&e.current_iteration>0&&(n=`$survey_${t}/${e.id}/${e.current_iteration}`),n},ti=function(e,t){var n={__c:t="__cC"+ur++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,o;return this.getChildContext||(n=[],(o={})[t]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,Ir(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}),ni=e=>{let{component:t,children:n,renderAsHtml:o,style:r}=e;return Hr(t,o?{dangerouslySetInnerHTML:{__html:n},style:r}:{children:n,style:r})},oi=Fn;var ri,ii,si,ai,li=0,ci=[],ui=[],di=rr.__b,pi=rr.__r,hi=rr.diffed,fi=rr.__c,mi=rr.unmount;function gi(e,t){rr.__h&&rr.__h(ii,e,li||t),li=0;var n=ii.__H||(ii.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:ui}),n.__[e]}function yi(e){return li=1,function(e,t,n){var o=gi(ri++,2);if(o.t=e,!o.__c&&(o.__=[xi(void 0,t),function(e){var t=o.__N?o.__N[0]:o.__[0],n=o.t(t,e);t!==n&&(o.__N=[n,o.__[1]],o.__c.setState({}))}],o.__c=ii,!ii.u)){var r=function(e,t,n){if(!o.__c.__H)return!0;var r=o.__c.__H.__.filter((function(e){return e.__c}));if(r.every((function(e){return!e.__N})))return!i||i.call(this,e,t,n);var s=!1;return r.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(s=!0)}})),!(!s&&o.__c.props===e)&&(!i||i.call(this,e,t,n))};ii.u=!0;var i=ii.shouldComponentUpdate,s=ii.componentWillUpdate;ii.componentWillUpdate=function(e,t,n){if(this.__e){var o=i;i=void 0,r(e,t,n),i=o}s&&s.call(this,e,t,n)},ii.shouldComponentUpdate=r}return o.__N||o.__}(xi,e)}function vi(e,t){var n=gi(ri++,3);!rr.__s&&Mi(n.__H,t)&&(n.__=e,n.i=t,ii.__H.__h.push(n))}function bi(e){return li=5,_i((function(){return{current:e}}),[])}function _i(e,t){var n=gi(ri++,7);return Mi(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function Ci(e){var t=ii.context[e.__c],n=gi(ri++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(ii)),t.props.value):e.__}function Si(){for(var e;e=ci.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ki),e.__H.__h.forEach(Ti),e.__H.__h=[]}catch(t){e.__H.__h=[],rr.__e(t,e.__v)}}rr.__b=function(e){ii=null,di&&di(e)},rr.__r=function(e){pi&&pi(e),ri=0;var t=(ii=e.__c).__H;t&&(si===ii?(t.__h=[],ii.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=ui,e.__N=e.i=void 0}))):(t.__h.forEach(ki),t.__h.forEach(Ti),t.__h=[],ri=0)),si=ii},rr.diffed=function(e){hi&&hi(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==ci.push(t)&&ai===rr.requestAnimationFrame||((ai=rr.requestAnimationFrame)||wi)(Si)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==ui&&(e.__=e.__V),e.i=void 0,e.__V=ui}))),si=ii=null},rr.__c=function(e,t){t.some((function(e){try{e.__h.forEach(ki),e.__h=e.__h.filter((function(e){return!e.__||Ti(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],rr.__e(n,e.__v)}})),fi&&fi(e,t)},rr.unmount=function(e){mi&&mi(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{ki(e)}catch(e){t=e}})),n.__H=void 0,t&&rr.__e(t,n.__v))};var Ii="function"==typeof requestAnimationFrame;function wi(e){var t,n=function(){clearTimeout(o),Ii&&cancelAnimationFrame(t),setTimeout(e)},o=setTimeout(n,100);Ii&&(t=requestAnimationFrame(n))}function ki(e){var t=ii,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),ii=t}function Ti(e){var t=ii;e.__c=e.__(),ii=t}function Mi(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 Ni=0;function Ei(e,t,n,o,r,i){var s,a,l={};for(a in t)"ref"==a?s=t[a]:l[a]=t[a];var c={type:e,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--Ni,__i:-1,__u:0,__source:r,__self:i};if("function"==typeof e&&(s=e.defaultProps))for(a in s)void 0===l[a]&&(l[a]=s[a]);return rr.vnode&&rr.vnode(c),c}const Ai=Ei("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Ei("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"})}),Ri=Ei("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Ei("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"})}),Oi=Ei("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Ei("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"})}),Li=Ei("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Ei("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"})}),Di=Ei("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Ei("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"})}),Fi=Ei("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Ei("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"})}),Bi=Ei("svg",{width:"77",height:"14",viewBox:"0 0 77 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Ei("g",{"clip-path":"url(#clip0_2415_6911)",children:[Ei("mask",{id:"mask0_2415_6911",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"77",height:"14",children:Ei("path",{d:"M0.5 0H76.5V14H0.5V0Z",fill:"white"})}),Ei("g",{mask:"url(#mask0_2415_6911)",children:[Ei("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"}),Ei("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"}),Ei("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"}),Ei("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"}),Ei("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"}),Ei("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"})]})]}),Ei("defs",{children:Ei("clipPath",{id:"clip0_2415_6911",children:Ei("rect",{width:"76",height:"14",fill:"white",transform:"translate(0.5)"})})})]}),Hi=Ei("svg",{width:"16",height:"12",viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Ei("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 Pi(){return Ei("a",{href:"https://posthog.com",target:"_blank",rel:"noopener",className:"footer-branding",children:["Survey by ",Bi]})}function Zi(e){let{text:t,submitDisabled:n,appearance:o,onSubmit:r,link:i}=e;const{isPreviewMode:s,isPopup:a}=Ci(ti),l=o.submitButtonTextColor||$r(o.submitButtonColor||Yr.submitButtonColor);return Ei("div",{className:"bottom-section",children:[Ei("div",{className:"buttons",children:Ei("button",{className:"form-submit",disabled:n&&!s,type:"button",style:a?{color:l}:{},onClick:()=>{s||(i&&(null==Rn||Rn.open(i)),r())},children:t})}),!o.whiteLabel&&Ei(Pi,{})]})}function qi(e){let{question:t,description:n,descriptionContentType:o,backgroundColor:r,forceDisableHtml:i}=e;const{isPopup:s}=Ci(ti);return Ei("div",{style:s?{backgroundColor:r||Yr.backgroundColor}:{},children:[Ei("div",{className:"survey-question",children:t}),n&&ni({component:yr("div",{className:"survey-question-description"}),children:n,renderAsHtml:!i&&"text"!==o})]})}function Wi(e){let{onClick:t}=e;const{isPreviewMode:n}=Ci(ti);return Ei("div",{className:"cancel-btn-wrapper",onClick:t,disabled:n,children:Ei("button",{className:"form-cancel",onClick:t,disabled:n,children:Fi})})}function Vi(e){let{header:t,description:n,contentType:o,forceDisableHtml:r,appearance:i,onClose:s,styleOverrides:a}=e;const l=$r(i.backgroundColor||Yr.backgroundColor),{isPopup:c}=Ci(ti);return Ei(br,{children:Ei("div",{className:"thank-you-message",style:{...a},children:Ei("div",{className:"thank-you-message-container",children:[c&&Ei(Wi,{onClick:()=>s()}),Ei("h3",{className:"thank-you-message-header",style:{color:l},children:t}),n&&ni({component:yr("div",{className:"thank-you-message-body"}),children:n,renderAsHtml:!r&&"text"!==o,style:{color:l}}),c&&Ei(Zi,{text:i.thankYouMessageCloseButtonText||"Close",submitDisabled:!1,appearance:i,onSubmit:()=>s()})]})})})}function $i(e){var t;const n=bi(null),[o,r]=yi(null!==(t=e.defaultTextColor)&&void 0!==t?t:"black");return vi((()=>{if(n.current){const e=function(e){const t=Pr.getComputedStyle(e).backgroundColor;if("rgba(0, 0, 0, 0)"===t)return"black";const n=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(!n)return"black";const o=parseInt(n[1]),r=parseInt(n[2]),i=parseInt(n[3]);return Math.sqrt(o*o*.299+r*r*.587+i*i*.114)>127.5?"black":"white"}(n.current);r(e)}}),[e.appearance,e.forceUpdate]),{ref:n,textColor:o}}function Yi(e){let{question:t,forceDisableHtml:n,appearance:o,onSubmit:r}=e;const i=bi(null),[s,a]=yi("");return Ei("div",{ref:i,children:[Ei(qi,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,backgroundColor:o.backgroundColor,forceDisableHtml:n}),Ei("textarea",{rows:4,placeholder:null==o?void 0:o.placeholder,onInput:e=>a(e.currentTarget.value)}),Ei(Zi,{text:t.buttonText||"Submit",submitDisabled:!s&&!t.optional,appearance:o,onSubmit:()=>r(s)})]})}function Gi(e){let{question:t,forceDisableHtml:n,appearance:o,onSubmit:r}=e;return Ei(br,{children:[Ei(qi,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,forceDisableHtml:n}),Ei(Zi,{text:t.buttonText||"Submit",submitDisabled:!1,link:t.link,appearance:o,onSubmit:()=>r("link clicked")})]})}function ji(e){let{question:t,forceDisableHtml:n,displayQuestionIndex:o,appearance:r,onSubmit:i}=e;const s=t.scale,a=10===t.scale?0:1,[l,c]=yi(null);return Ei(br,{children:[Ei(qi,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,forceDisableHtml:n,backgroundColor:r.backgroundColor}),Ei("div",{className:"rating-section",children:[Ei("div",{className:"rating-options",children:["emoji"===t.display&&Ei("div",{className:"rating-options-emoji",children:(3===t.scale?Xi:Ki).map(((e,t)=>{const n=t+1===l;return Ei("button",{className:`ratings-emoji question-${o}-rating-${t} ${n?"rating-active":null}`,value:t+1,type:"button",onClick:()=>{c(t+1)},style:{fill:n?r.ratingButtonActiveColor:r.ratingButtonColor,borderColor:r.borderColor},children:e},t)}))}),"number"===t.display&&Ei("div",{className:"rating-options-number",style:{gridTemplateColumns:`repeat(${s-a+1}, minmax(0, 1fr))`},children:ts(t.scale).map(((e,t)=>Ei(zi,{displayQuestionIndex:o,active:l===e,appearance:r,num:e,setActiveNumber:e=>{c(e)}},t)))})]}),Ei("div",{className:"rating-text",children:[Ei("div",{children:t.lowerBoundLabel}),Ei("div",{children:t.upperBoundLabel})]})]}),Ei(Zi,{text:t.buttonText||(null==r?void 0:r.submitButtonText)||"Submit",submitDisabled:ao(l)&&!t.optional,appearance:r,onSubmit:()=>i(l)})]})}function zi(e){let{num:t,active:n,displayQuestionIndex:o,appearance:r,setActiveNumber:i}=e;const{textColor:s,ref:a}=$i({appearance:r,defaultTextColor:"black",forceUpdate:n});return Ei("button",{ref:a,className:`ratings-number question-${o}-rating-${t} ${n?"rating-active":null}`,type:"button",onClick:()=>{i(t)},style:{color:s,backgroundColor:n?r.ratingButtonActiveColor:r.ratingButtonColor,borderColor:r.borderColor},children:t})}function Ui(e){let{question:t,forceDisableHtml:n,displayQuestionIndex:o,appearance:r,onSubmit:i}=e;const s=bi(null),a=_i((()=>(e=>{if(!e.shuffleOptions)return e.choices;const t=e.choices;let n="";e.hasOpenChoice&&(n=t.pop());const o=Xr(t,Ur(t));return e.hasOpenChoice&&(e.choices.push(n),o.push(n)),o})(t)),[t]),[l,c]=yi(t.type===tr.MultipleChoice?[]:null),[u,d]=yi(!1),[p,h]=yi(""),f=t.type===tr.SingleChoice?"radio":"checkbox";return Ei("div",{ref:s,children:[Ei(qi,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,forceDisableHtml:n,backgroundColor:r.backgroundColor}),Ei("div",{className:"multiple-choice-options",children:a.map(((e,n)=>{let r="choice-option";const i=e,s=e;return t.hasOpenChoice&&n===t.choices.length-1&&(r+=" choice-option-open"),Ei("div",{className:r,children:[Ei("input",{type:f,id:`surveyQuestion${o}Choice${n}`,name:`question${o}`,value:i,disabled:!i,onInput:()=>t.hasOpenChoice&&n===t.choices.length-1?d(!u):t.type===tr.SingleChoice?c(i):t.type===tr.MultipleChoice&&Qn(l)?l.includes(i)?c(l.filter((e=>e!==i))):c([...l,i]):void 0}),Ei("label",{htmlFor:`surveyQuestion${o}Choice${n}`,style:{color:"black"},children:t.hasOpenChoice&&n===t.choices.length-1?Ei(br,{children:[Ei("span",{children:[s,":"]}),Ei("input",{type:"text",id:`surveyQuestion${o}Choice${n}Open`,name:`question${o}`,onInput:e=>{const n=e.currentTarget.value;return t.type===tr.SingleChoice?c(n):t.type===tr.MultipleChoice&&Qn(l)?h(n):void 0}})]}):s}),Ei("span",{className:"choice-check",style:{color:"black"},children:Hi})]})}))}),Ei(Zi,{text:t.buttonText||"Submit",submitDisabled:(ao(l)||Qn(l)&&!u&&0===l.length||Qn(l)&&u&&!p&&0===l.length&&!t.optional)&&!t.optional,appearance:r,onSubmit:()=>{u&&t.type===tr.MultipleChoice?Qn(l)&&i([...l,p]):i(l)}})]})}const Xi=[Oi,Ri,Ai],Ki=[Li,Oi,Ri,Ai,Di],Ji=[1,2,3,4,5],Qi=[1,2,3,4,5,6,7],es=[0,1,2,3,4,5,6,7,8,9,10];function ts(e){switch(e){case 5:default:return Ji;case 7:return Qi;case 10:return es}}const ns=Rn,os=Fn;class rs{constructor(e){this.posthog=e,this.surveyInFocus=null}canShowNextEventBasedSurvey=()=>{const e=os.querySelectorAll("div[class^=PostHogSurvey]");var t;return!(e.length>0)||1===(null===(t=e[e.length-1].shadowRoot)||void 0===t?void 0:t.childElementCount)};handlePopoverSurvey=e=>{var t;const n=null===(t=e.conditions)||void 0===t?void 0:t.seenSurveyWaitPeriodInDays,o=localStorage.getItem("lastSeenSurveyDate");if(n&&o){const e=new Date,t=Math.abs(e.getTime()-new Date(o).getTime());if(Math.ceil(t/864e5)<n)return}const r=(e=>!!localStorage.getItem(Qr(e))&&!Jr(e))(e);if(!r){this.addSurveyToFocus(e.id);const t=((e,t,n)=>{const o=Zr.createElement("div");o.className=`PostHogSurvey${t}`;const r=o.attachShadow({mode:"open"});if(e){const t=Object.assign(Zr.createElement("style"),{innerText:e});r.appendChild(t)}return Zr.body.appendChild(o),r})(Wr(null==e?void 0:e.appearance),e.id);Br(Ei(as,{posthog:this.posthog,survey:e,removeSurveyFromFocus:this.removeSurveyFromFocus,isPopup:!0},"popover-survey"),t)}};handleWidget=e=>{const t=function(e){var t;const n=oi.createElement("div");n.className=`PostHogWidget${e.id}`;const o=n.attachShadow({mode:"open"}),r=`\n .ph-survey-widget-tab {\n position: fixed;\n top: 50%;\n right: 0;\n background: ${(null===(t=e.appearance)||void 0===t?void 0:t.widgetColor)||"#e0a045"};\n color: white;\n transform: rotate(-90deg) translate(0, -100%);\n transform-origin: right top;\n min-width: 40px;\n padding: 8px 12px;\n font-weight: 500;\n border-radius: 3px 3px 0 0;\n text-align: center;\n cursor: pointer;\n z-index: 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(oi.createElement("style"),{innerText:r})),oi.body.appendChild(n),o}(e),n=Wr(e.appearance);t.appendChild(Object.assign(os.createElement("style"),{innerText:n})),Br(Ei(cs,{posthog:this.posthog,survey:e,removeSurveyFromFocus:this.removeSurveyFromFocus},"feedback-survey"),t)};handleWidgetSelector=e=>{var t;const n=(null===(t=e.appearance)||void 0===t?void 0:t.widgetSelector)&&os.querySelector(e.appearance.widgetSelector);if(n)if(0===os.querySelectorAll(`.PostHogWidget${e.id}`).length)this.handleWidget(e);else if(1===os.querySelectorAll(`.PostHogWidget${e.id}`).length&&!n.getAttribute("PHWidgetSurveyClickListener")){var o,r;const t=null===(o=os.querySelector(`.PostHogWidget${e.id}`))||void 0===o||null===(r=o.shadowRoot)||void 0===r?void 0:r.querySelector(".survey-form");n.addEventListener("click",(()=>{t&&(t.style.display="none"===t.style.display?"block":"none",t.addEventListener("PHSurveyClosed",(()=>{this.removeSurveyFromFocus(e.id),t.style.display="none"})))})),n.setAttribute("PHWidgetSurveyClickListener","true")}};sortSurveysByAppearanceDelay(e){return e.sort(((e,t)=>{var n,o;return((null===(n=e.appearance)||void 0===n?void 0:n.surveyPopupDelaySeconds)||0)-((null===(o=t.appearance)||void 0===o?void 0:o.surveyPopupDelaySeconds)||0)}))}canRenderSurvey=e=>{const t={visible:!1};if(e.end_date)return t.disabledReason=`survey was completed on ${e.end_date}`,t;if(e.type!=er.Popover)return t.disabledReason="Only Popover survey types can be rendered",t;if(!(!e.linked_flag_key||this.posthog.featureFlags.isFeatureEnabled(e.linked_flag_key)))return t.disabledReason=`linked feature flag ${e.linked_flag_key} is false`,t;if(!(!e.targeting_flag_key||this.posthog.featureFlags.isFeatureEnabled(e.targeting_flag_key)))return t.disabledReason=`targeting feature flag ${e.targeting_flag_key} is false`,t;return!e.internal_targeting_flag_key||this.posthog.featureFlags.isFeatureEnabled(e.internal_targeting_flag_key)?(t.visible=!0,t):(t.disabledReason=`internal targeting feature flag ${e.internal_targeting_flag_key} is false`,t)};renderSurvey=(e,t)=>{Br(Ei(as,{posthog:this.posthog,survey:e,removeSurveyFromFocus:this.removeSurveyFromFocus,isPopup:!1},"popover-survey"),t)};callSurveysAndEvaluateDisplayLogic=(()=>{var e=this;return function(){var t;let n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];null===(t=e.posthog)||void 0===t||t.getActiveMatchingSurveys((t=>{const n=t.filter((e=>"api"!==e.type));e.sortSurveysByAppearanceDelay(n).forEach((t=>{if(ao(e.surveyInFocus)){var n,o,r;if(t.type===er.Widget)"tab"===(null===(n=t.appearance)||void 0===n?void 0:n.widgetType)&&0===os.querySelectorAll(`.PostHogWidget${t.id}`).length&&e.handleWidget(t),"selector"===(null===(o=t.appearance)||void 0===o?void 0:o.widgetType)&&null!==(r=t.appearance)&&void 0!==r&&r.widgetSelector&&e.handleWidgetSelector(t);t.type===er.Popover&&e.canShowNextEventBasedSurvey()&&e.handlePopoverSurvey(t)}}))}),n)}})();addSurveyToFocus=e=>{ao(this.surveyInFocus)||Pn.error(`Survey ${[...this.surveyInFocus]} already in focus. Cannot add survey ${e}.`),this.surveyInFocus=e};removeSurveyFromFocus=e=>{this.surveyInFocus!==e&&Pn.error(`Survey ${e} is not in focus. Cannot remove survey ${e}.`),this.surveyInFocus=null};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 is(e){if(!os||!ns)return;const t=new rs(e);return t.callSurveysAndEvaluateDisplayLogic(!0),setInterval((()=>{t.callSurveysAndEvaluateDisplayLogic(!1)}),1e3),t}function ss(e,t,n,o,r){const[i,s]=yi(o||0===n),[a,l]=yi(!1);return vi((()=>{if(o||!t)return;const i=()=>{r(e.id),s(!1)},a=()=>{var t,n;null!==(t=e.appearance)&&void 0!==t&&t.displayThankYouMessage?(l(!0),r(e.id),null!==(n=e.appearance)&&void 0!==n&&n.autoDisappear&&setTimeout((()=>{s(!1)}),5e3)):(r(e.id),s(!1))},c=()=>{var n;s(!0),ns.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 ns.addEventListener("PHSurveyClosed",i),ns.addEventListener("PHSurveySent",a),n>0?(()=>{const e=setTimeout((()=>{c()}),n);return()=>{clearTimeout(e),ns.removeEventListener("PHSurveyClosed",i),ns.removeEventListener("PHSurveySent",a)}})():(c(),()=>{ns.removeEventListener("PHSurveyClosed",i),ns.removeEventListener("PHSurveySent",a)})}),[]),{isPopupVisible:i,isSurveySent:a,setIsPopupVisible:s}}function as(e){var t,n,o,r,i,s;let{survey:a,forceDisableHtml:l,posthog:c,style:u,previewPageIndex:d,removeSurveyFromFocus:p,isPopup:h}=e;const f=Number.isInteger(d),m=null!==(t=a.appearance)&&void 0!==t&&t.surveyPopupDelaySeconds?1e3*a.appearance.surveyPopupDelaySeconds:0,{isPopupVisible:g,isSurveySent:y,setIsPopupVisible:v}=ss(a,c,m,f,p),b=y||d===a.questions.length,_=null!==(n=u)&&void 0!==n&&n.left&&co(null===(o=u)||void 0===o?void 0:o.left)?{left:u.left-40}:{};return f&&(u=u||{},u.left="unset",u.right="unset",u.transform="unset"),g?Ei(ti.Provider,{value:{isPreviewMode:f,previewPageIndex:d,handleCloseSurveyPopup:()=>zr(a,c,f),isPopup:h||!1},children:b?Ei(Vi,{header:(null===(r=a.appearance)||void 0===r?void 0:r.thankYouMessageHeader)||"Thank you!",description:(null===(i=a.appearance)||void 0===i?void 0:i.thankYouMessageDescription)||"",forceDisableHtml:!!l,contentType:null===(s=a.appearance)||void 0===s?void 0:s.thankYouMessageDescriptionContentType,appearance:a.appearance||Yr,styleOverrides:{...u,..._},onClose:()=>v(!1)}):Ei(ls,{survey:a,forceDisableHtml:!!l,posthog:c,styleOverrides:u})}):Ei(br,{})}function ls(e){var t,n;let{survey:o,forceDisableHtml:r,posthog:i,styleOverrides:s}=e;const a=$r((null===(t=o.appearance)||void 0===t?void 0:t.backgroundColor)||Yr.backgroundColor),[l,c]=yi({}),{isPreviewMode:u,previewPageIndex:d,handleCloseSurveyPopup:p,isPopup:h}=Ci(ti),[f,m]=yi(d||0),g=_i((()=>Kr(o)),[o]);vi((()=>{m(null!=d?d:0)}),[d]);return Ei("form",{className:"survey-form",style:h?{color:a,borderColor:null===(n=o.appearance)||void 0===n?void 0:n.borderColor,...s}:{},children:g.map(((e,t)=>{var n;const{originalQuestionIndex:s}=e;return(u?f===s:f===t)&&Ei("div",{className:"survey-box",style:h?{backgroundColor:(null===(n=o.appearance)||void 0===n?void 0:n.backgroundColor)||Yr.backgroundColor}:{},children:[h&&Ei(Wi,{onClick:()=>p()}),us({question:e,forceDisableHtml:r,displayQuestionIndex:t,appearance:o.appearance||Yr,onSubmit:e=>(e=>{let{res:t,originalQuestionIndex:n,displayQuestionIndex:r}=e;if(!i)return;const s=0===n?"$survey_response":`$survey_response_${n}`;if(c({...l,[s]:t}),!i.getNextSurveyStep)return void(r===o.questions.length-1?jr({...l,[s]:t},o,i):m(r+1));const a=i.getNextSurveyStep(o,r,t);a===nr.End?jr({...l,[s]:t},o,i):m(a)})({res:e,originalQuestionIndex:s,displayQuestionIndex:t})})]})}))})}function cs(e){var t,n;let{survey:o,forceDisableHtml:r,posthog:i,readOnly:s,removeSurveyFromFocus:a}=e;const[l,c]=yi(!1),[u,d]=yi({}),p=bi(null);return vi((()=>{var e,t;if(!s&&i){if("tab"===(null===(e=o.appearance)||void 0===e?void 0:e.widgetType)&&p.current){var n;const e=p.current.getBoundingClientRect(),t={top:"50%",left:parseInt(""+(e.right-360)),bottom:"auto",borderRadius:10,borderBottom:`1.5px solid ${(null===(n=o.appearance)||void 0===n?void 0:n.borderColor)||"#c9c6c6"}`};d(t)}if("selector"===(null===(t=o.appearance)||void 0===t?void 0:t.widgetType)){const e=os.querySelector(o.appearance.widgetSelector||"");null==e||e.addEventListener("click",(()=>{c(!l)})),null==e||e.setAttribute("PHWidgetSurveyClickListener","true")}}}),[]),Ei(br,{children:["tab"===(null===(t=o.appearance)||void 0===t?void 0:t.widgetType)&&Ei("div",{className:"ph-survey-widget-tab",ref:p,onClick:()=>!s&&c(!l),style:{color:$r(o.appearance.widgetColor)},children:[Ei("div",{className:"ph-survey-widget-tab-icon"}),(null===(n=o.appearance)||void 0===n?void 0:n.widgetLabel)||""]}),l&&Ei(as,{posthog:i,survey:o,forceDisableHtml:r,style:u,removeSurveyFromFocus:a,isPopup:!0},"feedback-widget-survey")]})}const us=e=>{let{question:t,forceDisableHtml:n,displayQuestionIndex:o,appearance:r,onSubmit:i}=e;const s={[tr.Open]:Yi,[tr.Link]:Gi,[tr.Rating]:ji,[tr.SingleChoice]:Ui,[tr.MultipleChoice]:Ui},a={question:t,forceDisableHtml:n,appearance:r,onSubmit:i},l={[tr.Open]:{},[tr.Link]:{},[tr.Rating]:{displayQuestionIndex:o},[tr.SingleChoice]:{displayQuestionIndex:o},[tr.MultipleChoice]:{displayQuestionIndex:o}};return Ei(s[t.type],{...{...a,...l[t.type]}})};function ds(e){return!ro(Event)&&ps(e,Event)}function ps(e,t){try{return e instanceof t}catch{return!1}}function hs(e){return ao(e)||!oo(e)&&!eo(e)}function fs(e,t){return Object.prototype.toString.call(e)===`[object ${t}]`}function ms(e){return fs(e,"DOMError")}Bn.__PosthogExtensions__=Bn.__PosthogExtensions__||{},Bn.__PosthogExtensions__.canActivateRepeatedly=Jr,Bn.__PosthogExtensions__.generateSurveys=is,Bn.extendPostHogWithSurveys=is;const gs=/\(error: (.*)\)/,ys=50,vs="?";function bs(e,t,n,o){const r={platform:"javascript",filename:e,function:"<anonymous>"===t?vs:t,in_app:!0};return ro(n)||(r.lineno=n),ro(o)||(r.colno=o),r}const _s=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Cs=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Ss=/\((\S*)(?::(\d+))(?::(\d+))\)/,Is=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ws=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,ks=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const o=t.sort(((e,t)=>e[0]-t[0])).map((e=>e[1]));return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=[],r=e.split("\n");for(let e=t;e<r.length;e++){const t=r[e];if(t.length>1024)continue;const i=gs.test(t)?t.replace(gs,"$1"):t;if(!i.match(/\S*Error: /)){for(const e of o){const t=e(i);if(t){n.push(t);break}}if(n.length>=ys)break}}return function(e){if(!e.length)return[];const t=Array.from(e);return t.reverse(),t.slice(0,ys).map((e=>({...e,filename:e.filename||Ts(t).filename,function:e.function||vs})))}(n)}}(...[[30,e=>{const t=_s.exec(e);if(t){const[,e,n,o]=t;return bs(e,vs,+n,+o)}const n=Cs.exec(e);if(n){if(n[2]&&0===n[2].indexOf("eval")){const e=Ss.exec(n[2]);e&&(n[2]=e[1],n[3]=e[2],n[4]=e[3])}const[e,t]=Ms(n[1]||vs,n[2]);return bs(t,e,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],[50,e=>{const t=Is.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=ws.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],n=t[1]||vs;return[n,e]=Ms(n,e),bs(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]);function Ts(e){return e[e.length-1]||{}}const Ms=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),o=-1!==e.indexOf("safari-web-extension");return n||o?[-1!==e.indexOf("@")?e.split("@")[0]:vs,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},xs=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;function Ns(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=e.stacktrace||e.stack||"",o=function(e){if(e&&Es.test(e.message))return 1;return 0}(e);try{const e=ks(n,o);return e.slice(0,e.length-t)}catch{}return[]}const Es=/Minified React error #\d+;/i;function As(e,t){var n,o;const r=Ns(e),i=null===(n=null==t?void 0:t.handled)||void 0===n||n,s=null!==(o=null==t?void 0:t.synthetic)&&void 0!==o&&o;return{$exception_list:[{type:null!=t&&t.overrideExceptionType?t.overrideExceptionType:e.name,value:null!=t&&t.overrideExceptionMessage?t.overrideExceptionMessage:function(e){const t=e.message;if(t.error&&"string"==typeof t.error.message)return t.error.message;return t}(e),stacktrace:{frames:r,type:"raw"},mechanism:{handled:i,synthetic:s}}],$exception_level:"error"}}function Rs(e,t){var n,o,r;const i=null===(n=null==t?void 0:t.handled)||void 0===n||n,s=null===(o=null==t?void 0:t.synthetic)||void 0===o||o,a={type:null!=t&&t.overrideExceptionType?t.overrideExceptionType:null!==(r=null==t?void 0:t.defaultExceptionType)&&void 0!==r?r:"Error",value:null!=t&&t.overrideExceptionMessage?t.overrideExceptionMessage:e||(null==t?void 0:t.defaultExceptionMessage),mechanism:{handled:i,synthetic:s}};if(null!=t&&t.syntheticException){const e=Ns(t.syntheticException,1);e.length&&(a.stacktrace={frames:e,type:"raw"})}return{$exception_list:[a],$exception_level:"error"}}function Os(e){return io(e)&&!so(e)&&zn.indexOf(e)>=0}function Ls(e,t){var n,o;const r=null===(n=null==t?void 0:t.handled)||void 0===n||n,i=null===(o=null==t?void 0:t.synthetic)||void 0===o||o,s=null!=t&&t.overrideExceptionType?t.overrideExceptionType:ds(e)?e.constructor.name:"Error",a=null!=t&&t.overrideExceptionMessage?t.overrideExceptionMessage:`Non-Error exception captured with keys: ${function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:40;const n=Object.keys(e);if(n.sort(),!n.length)return"[object has no keys]";for(let e=n.length;e>0;e--){const o=n.slice(0,e).join(", ");if(!(o.length>t))return e===n.length||o.length<=t?o:`${o.slice(0,t)}...`}return""}(e)}`,l={type:s,value:a,mechanism:{handled:r,synthetic:i}};if(null!=t&&t.syntheticException){const e=Ns(null==t?void 0:t.syntheticException,1);e.length&&(l.stacktrace={frames:e,type:"raw"})}return{$exception_list:[l],$exception_level:Os(e.level)?e.level:"error"}}function Ds(e,t){let[n,o,r,i,s]=e,a={$exception_list:[]};const l=s||n;if(ms(l)||function(e){return fs(e,"DOMException")}(l)){const e=l;if(function(e){return"stack"in e}(l))a=As(l,t);else{const n=e.name||(ms(e)?"DOMError":"DOMException"),o=e.message?`${n}: ${e.message}`:n,r=ms(e)?"DOMError":"DOMException";a=Rs(o,{...t,overrideExceptionType:r,defaultExceptionMessage:o})}return"code"in e&&(a.$exception_DOMException_code=`${e.code}`),a}if(function(e){return fs(e,"ErrorEvent")}(l)&&l.error)return As(l.error,t);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 ps(e,Error)}}(l))return As(l,t);if(function(e){return fs(e,"Object")}(l)||ds(l)){return Ls(l,t)}if(ro(s)&&io(n)){let e="Error",o=n;const r=n.match(xs);return r&&(e=r[1],o=r[2]),Rs(o,{...t,overrideExceptionType:e,defaultExceptionMessage:o})}return Rs(l,t)}function Fs(e){let[t]=e;const n=function(e){if(hs(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}(t);return hs(n)?Rs(`Non-Error promise rejection captured with value: ${String(n)}`,{handled:!1,synthetic:!1,overrideExceptionType:"UnhandledRejection"}):Ds([n],{handled:!1,overrideExceptionType:"UnhandledRejection",defaultExceptionMessage:String(n)})}const Bs={wrapOnError:e=>{const t=Rn;t||Pn.info("window not available, cannot wrap onerror");const n=t.onerror;return t.onerror=function(){for(var t,o=arguments.length,r=new Array(o),i=0;i<o;i++)r[i]=arguments[i];const s=Ds(r);return e(s),null!==(t=null==n?void 0:n(...r))&&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=>{const t=Rn;t||Pn.info("window not available, cannot wrap onUnhandledRejection");const n=t.onunhandledrejection;return t.onunhandledrejection=function(){for(var o,r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];const a=Fs(i);return e(a),null!==(o=null==n?void 0:n.apply(t,i))&&void 0!==o&&o},t.onunhandledrejection.__POSTHOG_INSTRUMENTED__=!0,()=>{var e;null===(e=t.onunhandledrejection)||void 0===e||delete e.__POSTHOG_INSTRUMENTED__,t.onunhandledrejection=n}}};Bn.__PosthogExtensions__=Bn.__PosthogExtensions__||{},Bn.__PosthogExtensions__.errorWrappingFunctions=Bs,Bn.__PosthogExtensions__.parseErrorAsProperties=Ds,Bn.posthogErrorWrappingFunctions=Bs,Bn.parseErrorAsProperties=Ds;const Hs=(e,t)=>{const{sessionId:n,windowId:o}=e.checkAndGetSessionAndWindowId(!0);t.headers.set("X-POSTHOG-SESSION-ID",n),t.headers.set("X-POSTHOG-WINDOW-ID",o)};Bn.__PosthogExtensions__=Bn.__PosthogExtensions__||{};const Ps={_patchFetch:e=>Fo(Rn,"fetch",(t=>async function(n,o){const r=new Request(n,o);return Hs(e,r),t(r)})),_patchXHR:e=>Fo(Rn.XMLHttpRequest.prototype,"open",(t=>function(n,o){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3?arguments[3]:void 0,s=arguments.length>4?arguments[4]:void 0;const a=new Request(o);return Hs(e,a),t.call(this,n,a.url,r,i,s)}))};Bn.__PosthogExtensions__.tracingHeadersPatchFns=Ps,Bn.postHogTracingHeadersPatchFns=Ps;var Zs,qs,Ws,Vs=-1,$s=function(e){addEventListener("pageshow",(function(t){t.persisted&&(Vs=t.timeStamp,e(t))}),!0)},Ys=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},Gs=function(){var e=Ys();return e&&e.activationStart||0},js=function(e,t){var n=Ys(),o="navigate";return Vs>=0?o="back-forward-cache":n&&(document.prerendering||Gs()>0?o="prerender":document.wasDiscarded?o="restore":n.type&&(o=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:o}},zs=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var o=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return o.observe(Object.assign({type:e,buffered:!0},n||{})),o}}catch(e){}},Us=function(e,t,n,o){var r,i;return function(s){t.value>=0&&(s||o)&&((i=t.value-(r||0))||void 0===r)&&(r=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))}},Xs=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},Ks=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},Js=function(e){var t=!1;return function(){t||(e(),t=!0)}},Qs=-1,ea=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},ta=function(e){"hidden"===document.visibilityState&&Qs>-1&&(Qs="visibilitychange"===e.type?e.timeStamp:0,oa())},na=function(){addEventListener("visibilitychange",ta,!0),addEventListener("prerenderingchange",ta,!0)},oa=function(){removeEventListener("visibilitychange",ta,!0),removeEventListener("prerenderingchange",ta,!0)},ra=function(){return Qs<0&&(Qs=ea(),na(),$s((function(){setTimeout((function(){Qs=ea(),na()}),0)}))),{get firstHiddenTime(){return Qs}}},ia=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},sa=[1800,3e3],aa=function(e,t){t=t||{},ia((function(){var n,o=ra(),r=js("FCP"),i=zs("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(i.disconnect(),e.startTime<o.firstHiddenTime&&(r.value=Math.max(e.startTime-Gs(),0),r.entries.push(e),n(!0)))}))}));i&&(n=Us(e,r,sa,t.reportAllChanges),$s((function(o){r=js("FCP"),n=Us(e,r,sa,t.reportAllChanges),Xs((function(){r.value=performance.now()-o.timeStamp,n(!0)}))})))}))},la=[.1,.25],ca=[2500,4e3],ua={},da=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},pa=function(e){if("loading"===document.readyState)return"loading";var t=da();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"},ha=function(e){var t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},fa=function(e,t){var n="";try{for(;e&&9!==e.nodeType;){var o=e,r=o.id?"#"+o.id:ha(o)+(o.classList&&o.classList.value&&o.classList.value.trim()&&o.classList.value.trim().length?"."+o.classList.value.trim().replace(/\s+/g,"."):"");if(n.length+r.length>(t||100)-1)return n||r;if(n=n?r+">"+n:r,o.id)break;e=o.parentNode}}catch(e){}return n},ma=-1,ga=function(e,t){var n=da(),o="navigate";return ma>=0?o="back-forward-cache":n&&(document.prerendering||function(){var e=da();return e&&e.activationStart||0}()>0?o="prerender":document.wasDiscarded?o="restore":n.type&&(o=n.type.replace(/_/g,"-"))),{name:e,value:-1,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:o}},ya=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var o=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return o.observe(Object.assign({type:e,buffered:!0},n||{})),o}}catch(e){}},va=function(e,t,n,o){var r,i;return function(s){t.value>=0&&(s||o)&&((i=t.value-(r||0))||void 0===r)&&(r=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))}},ba=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},_a=0,Ca=1/0,Sa=0,Ia=function(e){e.forEach((function(e){e.interactionId&&(Ca=Math.min(Ca,e.interactionId),Sa=Math.max(Sa,e.interactionId),_a=Sa?(Sa-Ca)/7+1:0)}))},wa=function(){"interactionCount"in performance||Zs||(Zs=ya("event",Ia,{type:"event",buffered:!0,durationThreshold:0}))},ka=[],Ta=new Map,Ma=0,xa=function(){return(Zs?_a:performance.interactionCount||0)-Ma},Na=[],Ea=function(e){if(Na.forEach((function(t){return t(e)})),e.interactionId||"first-input"===e.entryType){var t=ka[ka.length-1],n=Ta.get(e.interactionId);if(n||ka.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 o={id:e.interactionId,latency:e.duration,entries:[e]};Ta.set(o.id,o),ka.push(o)}ka.sort((function(e,t){return t.latency-e.latency})),ka.length>10&&ka.splice(10).forEach((function(e){return Ta.delete(e.id)}))}}},Aa=function(e){var t=self.requestIdleCallback||self.setTimeout,n=-1;return e=function(e){var t=!1;return function(){t||(e(),t=!0)}}(e),"hidden"===document.visibilityState?e():(n=t(e),ba(e)),n},Ra=[200,500],Oa=function(e,t){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(t=t||{},function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()}((function(){var n;wa();var o,r=ga("INP"),i=function(e){Aa((function(){e.forEach(Ea);var t,n=(t=Math.min(ka.length-1,Math.floor(xa()/50)),ka[t]);n&&n.latency!==r.value&&(r.value=n.latency,r.entries=n.entries,o())}))},s=ya("event",i,{durationThreshold:null!==(n=t.durationThreshold)&&void 0!==n?n:40});o=va(e,r,Ra,t.reportAllChanges),s&&(s.observe({type:"first-input",buffered:!0}),ba((function(){i(s.takeRecords()),o(!0)})),function(e){addEventListener("pageshow",(function(t){t.persisted&&(ma=t.timeStamp,e(t))}),!0)}((function(){Ma=0,ka.length=0,Ta.clear(),r=ga("INP"),o=va(e,r,Ra,t.reportAllChanges)})))})))},La=[],Da=[],Fa=new WeakMap,Ba=new Map,Ha=-1,Pa=function(e){La=La.concat(e),Za()},Za=function(){Ha<0&&(Ha=Aa(qa))},qa=function(){Ba.size>10&&Ba.forEach((function(e,t){Ta.has(t)||Ba.delete(t)}));var e=ka.map((function(e){return Fa.get(e.entries[0])})),t=Da.length-50;Da=Da.filter((function(n,o){return o>=t||e.includes(n)}));for(var n=new Set,o=0;o<Da.length;o++){var r=Da[o];Wa(r.startTime,r.processingEnd).forEach((function(e){n.add(e)}))}for(var i=0;i<50;i++){var s=La[La.length-1-i];if(!s||s.startTime<Ws)break;n.add(s)}La=Array.from(n),Ha=-1};Na.push((function(e){e.interactionId&&e.target&&!Ba.has(e.interactionId)&&Ba.set(e.interactionId,e.target)}),(function(e){var t,n=e.startTime+e.duration;Ws=Math.max(Ws,e.processingEnd);for(var o=Da.length-1;o>=0;o--){var r=Da[o];if(Math.abs(n-r.renderTime)<=8){(t=r).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]},Da.push(t)),(e.interactionId||"first-input"===e.entryType)&&Fa.set(e,t),Za()}));var Wa=function(e,t){for(var n,o=[],r=0;n=La[r];r++)if(!(n.startTime+n.duration<e)){if(n.startTime>t)break;o.push(n)}return o};const Va={onLCP:function(e,t){t=t||{},ia((function(){var n,o=ra(),r=js("LCP"),i=function(e){t.reportAllChanges||(e=e.slice(-1)),e.forEach((function(e){e.startTime<o.firstHiddenTime&&(r.value=Math.max(e.startTime-Gs(),0),r.entries=[e],n())}))},s=zs("largest-contentful-paint",i);if(s){n=Us(e,r,ca,t.reportAllChanges);var a=Js((function(){ua[r.id]||(i(s.takeRecords()),s.disconnect(),ua[r.id]=!0,n(!0))}));["keydown","click"].forEach((function(e){addEventListener(e,(function(){return function(e){var t=self.requestIdleCallback||self.setTimeout,n=-1;return e=Js(e),"hidden"===document.visibilityState?e():(n=t(e),Ks(e)),n}(a)}),!0)})),Ks(a),$s((function(o){r=js("LCP"),n=Us(e,r,ca,t.reportAllChanges),Xs((function(){r.value=performance.now()-o.timeStamp,ua[r.id]=!0,n(!0)}))}))}}))},onCLS:function(e,t){t=t||{},aa(Js((function(){var n,o=js("CLS",0),r=0,i=[],s=function(e){e.forEach((function(e){if(!e.hadRecentInput){var t=i[0],n=i[i.length-1];r&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(r+=e.value,i.push(e)):(r=e.value,i=[e])}})),r>o.value&&(o.value=r,o.entries=i,n())},a=zs("layout-shift",s);a&&(n=Us(e,o,la,t.reportAllChanges),Ks((function(){s(a.takeRecords()),n(!0)})),$s((function(){r=0,o=js("CLS",0),n=Us(e,o,la,t.reportAllChanges),Xs((function(){return n()}))})),setTimeout(n,0))})))},onFCP:aa,onINP:function(e,t){qs||(qs=ya("long-animation-frame",Pa)),Oa((function(t){var n=function(e){var t=e.entries[0],n=Fa.get(t),o=t.processingStart,r=n.processingEnd,i=n.entries.sort((function(e,t){return e.processingStart-t.processingStart})),s=Wa(t.startTime,r),a=e.entries.find((function(e){return e.target})),l=a&&a.target||Ba.get(t.interactionId),c=[t.startTime+t.duration,r].concat(s.map((function(e){return e.startTime+e.duration}))),u=Math.max.apply(Math,c),d={interactionTarget:fa(l),interactionTargetElement:l,interactionType:t.name.startsWith("key")?"keyboard":"pointer",interactionTime:t.startTime,nextPaintTime:u,processedEventEntries:i,longAnimationFrameEntries:s,inputDelay:o-t.startTime,processingDuration:r-o,presentationDelay:Math.max(u-r,0),loadState:pa(t.startTime)};return Object.assign(e,{attribution:d})}(t);e(n)}),t)}};function $a(e,t){return t.length>e?t.slice(0,e)+"...":t}function Ya(e){if(e.previousElementSibling)return e.previousElementSibling;let t=e;do{t=t.previousSibling}while(t&&!mo(t));return t}function Ga(e,t,n,o){const r=e.tagName.toLowerCase(),i={tag_name:r};_o.indexOf(r)>-1&&!n&&("a"===r.toLowerCase()||"button"===r.toLowerCase()?i.$el_text=$a(1024,Eo(e)):i.$el_text=$a(1024,bo(e)));const s=vo(e);s.length>0&&(i.classes=s.filter((function(e){return""!==e}))),Vn(e.attributes,(function(n){var r;if((!So(e)||-1!==["name","id","class","aria-label"].indexOf(n.name))&&((null==o||!o.includes(n.name))&&!t&&No(n.value)&&(r=n.name,!io(r)||"_ngcontent"!==r.substring(0,10)&&"_nghost"!==r.substring(0,7)))){let e=n.value;"class"===n.name&&(e=yo(e).join(" ")),i["attr__"+n.name]=$a(1024,e)}}));let a=1,l=1,c=e;for(;c=Ya(c);)a++,c.tagName===e.tagName&&l++;return i.nth_child=a,i.nth_of_type=l,i}function ja(e,t){var n,o;let{e:r,maskAllElementAttributes:i,maskAllText:s,elementAttributeIgnoreList:a,elementsChainAsString:l}=t;const c=[e];let u=e;for(;u.parentNode&&!go(u,"body");)(d=u.parentNode)&&11===d.nodeType?(c.push(u.parentNode.host),u=u.parentNode.host):(c.push(u.parentNode),u=u.parentNode);var d;const p=[],h={};let f,m=!1,g=!1;if(Vn(c,(e=>{const t=Co(e);"a"===e.tagName.toLowerCase()&&(m=e.getAttribute("href"),m=t&&m&&No(m)&&m);Yn(vo(e),"ph-no-capture")&&(g=!0),p.push(Ga(e,i,s,a));const n=function(e){if(!Co(e))return{};const t={};return Vn(e.attributes,(function(e){if(e.name&&0===e.name.indexOf("data-ph-capture-attribute")){const n=e.name.replace("data-ph-capture-attribute-",""),o=e.value;n&&o&&No(o)&&(t[n]=o)}})),t}(e);$n(h,n)})),g)return{props:{},explicitNoCapture:g};if(s||("a"===e.tagName.toLowerCase()||"button"===e.tagName.toLowerCase()?p[0].$el_text=Eo(e):p[0].$el_text=bo(e)),m){var y,v;p[0].attr__href=m;const e=null===(y=(e=>{const t=null==Fn?void 0:Fn.createElement("a");return ro(t)?null:(t.href=e,t)})(m))||void 0===y?void 0:y.host,t=null==Rn||null===(v=Rn.location)||void 0===v?void 0:v.host;e&&t&&e!==t&&(f=m)}return{props:$n({$event_type:r.type,$ce_version:1},l?{$elements_chain:Ro(p)}:{$elements:p},null!==(n=p[0])&&void 0!==n&&n.$el_text?{$el_text:null===(o=p[0])||void 0===o?void 0:o.$el_text}:{},f&&"click"===r.type?{$external_click_url:f}:{},h)}}Bn.__PosthogExtensions__=Bn.__PosthogExtensions__||{},Bn.__PosthogExtensions__.postHogWebVitalsCallbacks=Va,Bn.postHogWebVitalsCallbacks=Va;const za={};function Ua(e){return function(e,t){const n=za[e];if(n)return n;let o=t[e];if(to(o)&&!no(o))return za[e]=o.bind(t);const r=t.document;if(r&&eo(r.createElement))try{const t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t);const n=t.contentWindow;n&&n[e]&&(o=n[e]),r.head.removeChild(t)}catch(t){Pn.warn(`Could not create sandbox iframe for ${e} check, bailing to assignableWindow.${e}: `,t)}return o&&eo(o)?za[e]=o.bind(t):o}("MutationObserver",e)}function Xa(e){const t=function(e){return ro(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 Ka(e,t){return co(e)&&e>=t}class Ja{_clicks=[];_defaultConfig=e=>({element_attribute_ignorelist:[],scroll_threshold_ms:100,selection_change_threshold_ms:100,mutation_threshold_ms:2500,__onCapture:e});asRequiredConfig(e){var t,n,o,r;const 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!==(o=null==e?void 0:e.selection_change_threshold_ms)&&void 0!==o?o:i.selection_change_threshold_ms,mutation_threshold_ms:null!==(r=null==e?void 0:e.mutation_threshold_ms)&&void 0!==r?r:i.mutation_threshold_ms,__onCapture:i.__onCapture}}constructor(e,t){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){const t=Ua(Bn);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,Bn.removeEventListener("click",this._onClick),Bn.removeEventListener("scroll",this._onScroll,!0),Bn.removeEventListener("selectionchange",this._onSelectionChange)}onMutation(e){this._lastMutation=Date.now()}_startClickObserver(){Bn.addEventListener("click",this._onClick)}_onClick=e=>{const t=Xa(e);ao(t)||this._ignoreClick(t)||this._clicks.push(t),this._clicks.length&&ro(this._checkClickTimer)&&(this._checkClickTimer=Bn.setTimeout((()=>{this._checkClicks()}),1e3))};_startScrollObserver(){Bn.addEventListener("scroll",this._onScroll,!0)}_onScroll=()=>{const e=Date.now();e%50==0&&this._clicks.forEach((t=>{ro(t.scrollDelayMs)&&(t.scrollDelayMs=e-t.timestamp)}))};_startSelectionChangedObserver(){Bn.addEventListener("selectionchange",this._onSelectionChange)}_onSelectionChange=()=>{this._lastSelectionChanged=Date.now()};_ignoreClick(e){if(!e)return!0;if("__POSTHOG_TOOLBAR__"===(t=e.node).id||null!==(n=t.closest)&&void 0!==n&&n.call(t,".toolbar-global-fade-container"))return!0;var t,n;const o=this._clicks.some((t=>t.node===e.node&&Math.abs(t.timestamp-e.timestamp)<1e3));return!!o||!(!go(e.node,"html")&&mo(e.node)&&!_o.includes(e.node.tagName.toLowerCase()))}_checkClicks(){if(!this._clicks.length)return;clearTimeout(this._checkClickTimer),this._checkClickTimer=void 0;const e=this._clicks;this._clicks=[];for(const n of e){var t;n.mutationDelayMs=null!==(t=n.mutationDelayMs)&&void 0!==t?t:this._lastMutation&&n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0,n.absoluteDelayMs=Date.now()-n.timestamp,n.selectionChangedDelayMs=this._lastSelectionChanged&&n.timestamp<=this._lastSelectionChanged?this._lastSelectionChanged-n.timestamp:void 0;const e=Ka(n.scrollDelayMs,this._config.scroll_threshold_ms),o=Ka(n.selectionChangedDelayMs,this._config.selection_change_threshold_ms),r=Ka(n.mutationDelayMs,this._config.mutation_threshold_ms),i=Ka(n.absoluteDelayMs,1.1*this._config.mutation_threshold_ms),s=co(n.scrollDelayMs)&&n.scrollDelayMs<this._config.scroll_threshold_ms,a=co(n.mutationDelayMs)&&n.mutationDelayMs<this._config.mutation_threshold_ms,l=co(n.selectionChangedDelayMs)&&n.selectionChangedDelayMs<this._config.selection_change_threshold_ms;s||a||l||(e||r||i||o?this._onCapture(n,{$dead_click_last_mutation_timestamp:this._lastMutation,$dead_click_event_timestamp:n.timestamp,$dead_click_scroll_timeout:e,$dead_click_mutation_timeout:r,$dead_click_absolute_timeout:i,$dead_click_selection_changed_timeout:o}):n.absoluteDelayMs<this._config.mutation_threshold_ms&&this._clicks.push(n))}this._clicks.length&&ro(this._checkClickTimer)&&(this._checkClickTimer=Bn.setTimeout((()=>{this._checkClicks()}),1e3))}_captureDeadClick(e,t){this.instance.capture("$dead_click",{...t,...ja(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)})}}Bn.__PosthogExtensions__=Bn.__PosthogExtensions__||{},Bn.__PosthogExtensions__.initDeadClicksAutocapture=(e,t)=>new Ja(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"]},m=e=>!!(e=>"function"==typeof e)(e)&&Object.getOwnPropertyNames(e.prototype||{}).some((e=>e.indexOf("__zone"))),v={};function g(e){if(v[e])return v[e];var t=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&&!m(t))return v[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?v[e]=c:n}catch(e){return n}}var y={};function b(e,t,n){var r,o="".concat(e,".").concat(String(n));if(y[o])return y[o].call(t);var i=g(e),a=null==(r=Object.getOwnPropertyDescriptor(i,n))?void 0:r.get;return a?(y[o]=a,a.call(t)):t[n]}var _={};function C(e,t,n){var r="".concat(e,".").concat(String(n));if(_[r])return _[r].bind(t);var o=g(e)[n];return"function"!=typeof o?t[n]:(_[r]=o,o.bind(t))}var S={childNodes:function(e){return b("Node",e,"childNodes")},parentNode:function(e){return b("Node",e,"parentNode")},parentElement:function(e){return b("Node",e,"parentElement")},textContent:function(e){return b("Node",e,"textContent")},contains:function(e,t){return C("Node",e,"contains")(t)},getRootNode:function(e){return C("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?b("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?b("Element",e,"shadowRoot"):null},querySelector:function(e,t){return b("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return b("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return g("MutationObserver").constructor}};function I(e){return e.nodeType===e.ELEMENT_NODE}function w(e){var t=e&&"host"in e&&"mode"in e&&S.host(e)||null;return Boolean(t&&"shadowRoot"in t&&S.shadowRoot(t)===e)}function k(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function x(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=x(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?H(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?H(o,t):o}function M(e,t){return Array.from(e.styleSheets).find((e=>e.href===t))}let N=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&&A(o);return(n[r.toLowerCase()]||l&&n[l])&&(s=a?a(s,t):"*".repeat(s.length)),s}function A(e){return e.toLowerCase()}var O="__rrweb_original__";function R(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?A(t):null}function L(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 D=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,F=/^(?:[a-z+]+:)?\/\//i,B=/^www\..*/i,P=/^(data:)([^,]*),(.*)/i;function H(e,t){return(e||"").replace(D,((e,n,r,o,i,a)=>{var s,l=r||i||a,c=n||o||"";if(!l)return e;if(F.test(l)||B.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 Z,q,W=1,V=new RegExp("[^a-z0-9-_:]"),Y=-2;function j(){return W++}var G=/^[^ \t\n\r\u000c]+/,z=/^[, \t\n\r\u000c]+/;var U=new WeakMap;function X(e,t){return t&&""!==t.trim()?J(e,t):t}function K(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function J(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 Q(e,t,n,r){return r?"src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?X(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(z),!(n>=t.length);){var i=r(G);if(","===i.slice(-1))i=X(e,i.substring(0,i.length-1)),o.push(i);else{var a="";i=X(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?H(r,J(e)):"object"===t&&"data"===n?X(e,r):r:X(e,r):r}function $(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function ee(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&ee(S.parentNode(e),t,n);for(var r=e.classList.length;r--;){var o=e.classList[r];if(t.test(o))return!0}return!!n&&ee(S.parentNode(e),t,n)}function te(e,t,n,r){var o;if(I(e)){if(o=e,!S.childNodes(o).length)return!1}else{if(null===S.parentElement(e))return!1;o=S.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(ee(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 ne(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=A(e.tagName);return V.test(t)?"div":t}(e),y={},b=e.attributes.length,_=0;_<b;_++){var C=e.attributes[_];$(g,C.name,C.value)||(y[C.name]=Q(r,g,A(C.name),C.value))}if("link"===g&&a){var I=e.href,w=M(r,I);if(!w&&I.includes(".css"))w=M(r,window.location.origin+"/"+I.replace(window.location.href,""));var k=null;w&&(k=x(w)),k&&(delete y.rel,delete y.href,y._cssText=k)}if("style"===g&&e.sheet&&!(e.innerText||S.textContent(e)||"").trim().length){var T=x(e.sheet);T&&(y._cssText=T)}if("input"===g||"textarea"===g||"select"===g){var N=e.value,L=e.checked;"radio"!==y.type&&"checkbox"!==y.type&&"submit"!==y.type&&"button"!==y.type&&N?y.value=E({element:e,type:R(e),tagName:g,value:N,maskInputOptions:s,maskInputFn:l}):L&&(y.checked=L)}"option"===g&&(e.selected&&!s.select?y.selected=!0:delete y.selected);"dialog"===g&&e.open&&(y.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal");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=O in o?o[O]: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){Z||(Z=r.createElement("canvas"),q=Z.getContext("2d"));var B=e,P=B.currentSrc||B.getAttribute("src")||"<unknown-src>",H=B.crossOrigin,W=()=>{B.removeEventListener("load",W);try{Z.width=B.naturalWidth,Z.height=B.naturalHeight,q.drawImage(B,0,0),y.rr_dataURL=Z.toDataURL(c.type,c.quality)}catch(e){if("anonymous"!==B.crossOrigin)return B.crossOrigin="anonymous",void(B.complete&&0!==B.naturalWidth?W():B.addEventListener("load",W));console.warn("Cannot inline img src=".concat(P,"! Error: ").concat(e))}"anonymous"===B.crossOrigin&&(H?y.crossOrigin=H:B.removeAttribute("crossorigin"))};B.complete&&0!==B.naturalWidth?W():B.addEventListener("load",W)}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:K(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=S.parentNode(e),s=a&&a.tagName,l=S.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=x(a.sheet))}catch(t){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(t),e)}l=H(l,J(t.doc))}u&&(l="SCRIPT_PLACEHOLDER");!c&&!u&&l&&r&&(l=o?o(l,S.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:S.textContent(e)||"",rootId:g};default:return!1}}function re(e){return null==e?"":e.toLowerCase()}function oe(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:C,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:T=(()=>!1),newlyAddedElement:M=!1}=t,{needsMask:N}=t,{preserveWhiteSpace:E=!0}=t;N||(N=te(e,a,s,void 0===N));var A,O=ne(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,needsMask:N,inlineStylesheet:c,maskInputOptions:u,maskTextFn:d,maskInputFn:h,dataURLOptions:m,inlineImages:v,recordCanvas:g,keepIframeSrcFn:T,newlyAddedElement:M});if(!O)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"===L(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(re(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===re(e.attributes.name)||"icon"===re(e.attributes.rel)||"apple-touch-icon"===re(e.attributes.rel)||"shortcut icon"===re(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&re(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(re(e.attributes.property).match(/^(og|twitter|fb):/)||re(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===re(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===re(e.attributes.name)||"googlebot"===re(e.attributes.name)||"bingbot"===re(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===re(e.attributes.name)||"generator"===re(e.attributes.name)||"framework"===re(e.attributes.name)||"publisher"===re(e.attributes.name)||"progid"===re(e.attributes.name)||re(e.attributes.property).match(/^article:/)||re(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===re(e.attributes.name)||"yandex-verification"===re(e.attributes.name)||"csrf-token"===re(e.attributes.name)||"p:domain_verify"===re(e.attributes.name)||"verify-v1"===re(e.attributes.name)||"verification"===re(e.attributes.name)||"shopify-checkout-api-token"===re(e.attributes.name)))return!0}}return!1}(O,f)&&(E||O.type!==p.Text||O.isStyle||O.textContent.replace(/^\s+|\s+$/gm,"").length)?j():Y;var R=Object.assign(O,{id:A});if(r.add(e,R),A===Y)return null;y&&y(e);var D=!l;if(R.type===p.Element){D=D&&!R.needBlock,delete R.needBlock;var F=S.shadowRoot(e);F&&k(F)&&(R.isShadowHost=!0)}if((R.type===p.Document||R.type===p.Element)&&D){f.headWhitespace&&R.type===p.Element&&"head"===R.tagName&&(E=!1);var B={doc:n,mirror:r,blockClass:o,blockSelector:i,needsMask:N,maskTextClass:a,maskTextSelector:s,skipChild:l,inlineStylesheet:c,maskInputOptions:u,maskTextFn:d,maskInputFn:h,slimDOMOptions:f,dataURLOptions:m,inlineImages:v,recordCanvas:g,preserveWhiteSpace:E,onSerialize:y,onIframeLoad:b,iframeLoadTimeout:_,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:T};if(R.type===p.Element&&"textarea"===R.tagName&&void 0!==R.attributes.value);else for(var P of Array.from(S.childNodes(e))){var H=oe(P,B);H&&R.childNodes.push(H)}var Z=null;if(I(e)&&(Z=S.shadowRoot(e)))for(var q of Array.from(S.childNodes(Z))){var W=oe(q,B);W&&(k(Z)&&(W.isShadow=!0),R.childNodes.push(W))}}var V=S.parentNode(e);return V&&w(V)&&k(V)&&(R.isShadow=!0),R.type===p.Element&&"iframe"===R.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=oe(t,{doc:t,mirror:r,blockClass:o,blockSelector:i,needsMask:N,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:d,maskInputFn:h,slimDOMOptions:f,dataURLOptions:m,inlineImages:v,recordCanvas:g,preserveWhiteSpace:E,onSerialize:y,onIframeLoad:b,iframeLoadTimeout:_,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:T});n&&b(e,n)}}),_),R.type===p.Element&&"link"===R.tagName&&"string"==typeof R.attributes.rel&&("stylesheet"===R.attributes.rel||"preload"===R.attributes.rel&&"string"==typeof R.attributes.href&&"css"===L(R.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(C){var t=oe(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,needsMask:N,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:d,maskInputFn:h,slimDOMOptions:f,dataURLOptions:m,inlineImages:v,recordCanvas:g,preserveWhiteSpace:E,onSerialize:y,onIframeLoad:b,iframeLoadTimeout:_,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:T});t&&C(e,t)}}),x),R}let ie=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 ae={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},se={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},le={};function ce(e){if(le[e])return le[e];var t=globalThis[e],n=t.prototype,r=e in ae?ae[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 se?se[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&&!m(t))return le[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?le[e]=c:n}catch(e){return n}}var ue={};function de(e,t,n){var r,o="".concat(e,".").concat(String(n));if(ue[o])return ue[o].call(t);var i=ce(e),a=null==(r=Object.getOwnPropertyDescriptor(i,n))?void 0:r.get;return a?(ue[o]=a,a.call(t)):t[n]}var pe={};function he(e,t,n){var r="".concat(e,".").concat(String(n));if(pe[r])return pe[r].bind(t);var o=ce(e)[n];return"function"!=typeof o?t[n]:(pe[r]=o,o.bind(t))}function fe(){return ce("MutationObserver").constructor}var me={childNodes:function(e){return de("Node",e,"childNodes")},parentNode:function(e){return de("Node",e,"parentNode")},parentElement:function(e){return de("Node",e,"parentElement")},textContent:function(e){return de("Node",e,"textContent")},contains:function(e,t){return he("Node",e,"contains")(t)},getRootNode:function(e){return he("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?de("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?de("Element",e,"shadowRoot"):null},querySelector:function(e,t){return de("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return de("Element",e,"querySelectorAll")(t)},mutationObserver:fe};function ve(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 ge="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.",ye={map:{},getId:()=>(console.error(ge),-1),getNode:()=>(console.error(ge),null),removeNodeFromMap(){console.error(ge)},has:()=>(console.error(ge),!1),reset(){console.error(ge)}};function be(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 _e(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)}}),()=>_e(e,t,i||{},!0)}function Ce(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&&(ye=new Proxy(ye,{get:(e,t,n)=>("map"===t&&console.error(ge),Reflect.get(e,t,n))}));var Se=Date.now;function Ie(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=me.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=me.parentElement(i.body))?void 0:r.scrollTop)||(null==(o=null==i?void 0:i.body)?void 0:o.scrollTop)||0}}function we(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function ke(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function xe(e){return e?e.nodeType===e.ELEMENT_NODE?e:me.parentElement(e):null}function Te(e,t,n,r){if(!e)return!1;var o=xe(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(ee(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 Me(e,t,n){return!("TITLE"!==e.tagName||!n.headTitleMutations)||t.getId(e)===Y}function Ne(e,t){if(w(e))return!1;var n=t.getId(e);if(!t.has(n))return!0;var r=me.parentNode(e);return(!r||r.nodeType!==e.DOCUMENT_NODE)&&(!r||Ne(r,t))}function Ee(e){return Boolean(e.changedTouches)}function Ae(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function Oe(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 ie&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(me.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(Se=()=>(new Date).getTime());let Le=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 De(e){var t,n=null;return"getRootNode"in e&&(null==(t=me.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&me.host(me.getRootNode(e))&&(n=me.host(me.getRootNode(e))),n}function Fe(e){var t=e.ownerDocument;if(!t)return!1;var n=function(e){for(var t,n=e;t=De(n);)n=t;return n}(e);return me.contains(t,n)}function Be(e){var t=e.ownerDocument;return!!t&&(me.contains(t,e)||Fe(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||{}),He=(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))(He||{}),Ze=(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))(Ze||{}),qe=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(qe||{}),We=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(We||{}),Ve=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Ve||{});function Ye(e){return"__ln"in e}class je{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&&Ye(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&&Ye(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 Ge,ze=(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 je,r=e=>{for(var t=e,n=Y;n===Y;)n=(t=t&&t.nextSibling)&&this.mirror.getId(t);return n},o=o=>{var i=me.parentNode(o);if(i&&Be(o)&&"TEXTAREA"!==i.tagName){var a=w(i)?this.mirror.getId(De(o)):this.mirror.getId(i),s=r(o);if(-1===a||-1===s)return n.addNode(o);var l=oe(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=>{Ae(e,this.mirror)&&this.iframeManager.addIframe(e),Oe(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),Re(o)&&this.shadowDomManager.addShadowRoot(me.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)Ke(this.removes,i,this.mirror)&&!this.movedSet.has(me.parentNode(i))||o(i);for(var a of this.addedSet)Je(this.droppedSet,a)||Ke(this.removes,a,this.mirror)?Je(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(me.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(me.parentNode(p.value));if(-1===r(p.value))continue;if(-1!==h){l=p;break}var f=p.value,m=me.parentNode(f);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var v=me.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=me.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(me.childNodes(e),(e=>me.textContent(e)||"")).join("")})),c(this,"processMutation",(e=>{if(!Me(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":var t=me.textContent(e.target);Te(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:te(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,xe(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"),!$(n.tagName,r))if(a.attributes[r]=Q(this.doc,A(n.tagName),A(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=w(e.target)?this.mirror.getId(me.host(e.target)):this.mirror.getId(e.target);Te(e.target,this.blockClass,this.blockSelector,!1)||Me(t,this.mirror,this.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(Xe(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||Ne(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[ze(n,r)]?Xe(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:!(!w(e.target)||!k(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(Me(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[ze(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Te(e,this.blockClass,this.blockSelector,!1)||(me.childNodes(e).forEach((e=>this.genAdds(e))),Re(e)&&me.childNodes(me.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 Xe(e,t){e.delete(t),me.childNodes(t).forEach((t=>Xe(e,t)))}function Ke(e,t,n){return 0!==e.length&&function(e,t,n){var r=me.parentNode(t),o=function(){var t=n.getId(r);if(e.some((e=>e.id===t)))return{v:!0};r=me.parentNode(r)};for(;r;){var i=o();if("object"==typeof i)return i.v}return!1}(e,t,n)}function Je(e,t){return 0!==e.size&&Qe(e,t)}function Qe(e,t){var n=me.parentNode(t);return!!n&&(!!e.has(n)||Qe(e,n))}var $e=e=>{if(!Ge)return e;return function(){try{return e(...arguments)}catch(e){if(Ge&&!0===Ge(e))return;throw e}}},et=[];function tt(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 nt(e,t){var n=new Ue;et.push(n),n.init(e);var r=new(fe())($e(n.processMutations.bind(n)));return r.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function rt(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(Ze).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==l[e])).forEach((e=>{var s=A(e),l=(e=>r=>{var s=tt(r);if(!Te(s,i,a,!0)){var l=null,c=e;if("pointerType"in r){switch(r.pointerType){case"mouse":l=qe.Mouse;break;case"touch":l=qe.Touch;break;case"pen":l=qe.Pen}l===qe.Touch?Ze[e]===Ze.MouseDown?c="TouchStart":Ze[e]===Ze.MouseUp&&(c="TouchEnd"):qe.Pen}else Ee(r)&&(l=qe.Touch);null!==l?(u=l,(c.startsWith("Touch")&&l===qe.Touch||c.startsWith("Mouse")&&l===qe.Mouse)&&(l=null)):Ze[e]===Ze.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;$e(n)(t({type:Ze[c],id:p,x:h,y:f},null!==l&&{pointerType:l}))}}})(e);if(window.PointerEvent)switch(Ze[e]){case Ze.MouseDown:case Ze.MouseUp:s=s.replace("mouse","pointer");break;case Ze.TouchStart:case Ze.TouchEnd:return}c.push(ve(s,l,r))})),$e((()=>{c.forEach((e=>e()))}))}function ot(e){var{scrollCb:t,doc:n,mirror:r,blockClass:o,blockSelector:i,sampling:a}=e;return ve("scroll",$e(be($e((e=>{var a=tt(e);if(a&&!Te(a,o,i,!0)){var s=r.getId(a);if(a===n&&n.defaultView){var l=Ie(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 it=["INPUT","TEXTAREA","SELECT"],at=new WeakMap;function st(e){return function(e,t){if(dt("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||dt("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||dt("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||dt("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 lt(e,t,n){var r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function ct(e,t){var n,r,o,{mirror:i,stylesheetManager:a}=e,s=null;s="#document"===t.nodeName?i.getId(t):i.getId(me.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}}),$e((()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}))):()=>{}}function ut(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=nt(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=be($e((e=>{var n=Date.now()-i;t(l.map((e=>(e.timeOffset-=n,e))),e),l=[],i=null})),s),u=$e(be($e((e=>{var t=tt(e),{clientX:n,clientY:r}=Ee(e)?e.changedTouches[0]:e;i||(i=Se()),l.push({x:n,y:r,id:o.getId(t),timeOffset:Se()-i}),c("undefined"!=typeof DragEvent&&e instanceof DragEvent?He.Drag:e instanceof MouseEvent?He.MouseMove:He.TouchMove)})),a,{trailing:!1})),d=[ve("mousemove",u,r),ve("touchmove",u,r),ve("drag",u,r)];return $e((()=>{d.forEach((e=>e()))}))}(e),a=rt(e),s=ot(e),l=function(e,t){var{viewportResizeCb:n}=e,{win:r}=t,o=-1,i=-1;return ve("resize",$e(be($e((()=>{var e=we(),t=ke();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=tt(e),n=e.isTrusted,o=t&&t.tagName;if(t&&"OPTION"===o&&(t=me.parentElement(t)),t&&o&&!(it.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=at.get(e);if(!i||i.text!==r.text||i.isChecked!==r.isChecked){at.set(e,r);var a=o.getId(e);$e(n)(t(t({},r),{},{id:a}))}}var m=("last"===d.input?["change"]:["input","change"]).map((e=>ve(e,$e(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=>_e(e[0],e[1],{set(){$e(h)({target:this,isTrusted:!1})}},!1,v)))),$e((()=>{m.forEach((e=>e()))}))}(e),u=function(e){var{mediaInteractionCb:t,blockClass:n,blockSelector:r,mirror:o,sampling:i,doc:a}=e,s=$e((e=>be($e((i=>{var a=tt(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=[ve("play",s(Ve.Play),a),ve("pause",s(Ve.Pause),a),ve("seeked",s(Ve.Seeked),a),ve("volumechange",s(Ve.VolumeChange),a),ve("ratechange",s(Ve.RateChange),a)];return $e((()=>{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:$e(((e,t,i)=>{var[a,s]=i,{id:l,styleId:c}=lt(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:$e(((e,t,i)=>{var[a]=i,{id:s,styleId:l}=lt(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:$e(((e,t,i)=>{var[a]=i,{id:s,styleId:l}=lt(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:$e(((e,t,i)=>{var[a]=i,{id:s,styleId:l}=lt(t,r,o.styleMirror);return(s&&-1!==s||l&&-1!==l)&&n({id:s,styleId:l,replaceSync:a}),e.apply(t,i)}))}));var u={};pt("CSSGroupingRule")?u.CSSGroupingRule=i.CSSGroupingRule:(pt("CSSMediaRule")&&(u.CSSMediaRule=i.CSSMediaRule),pt("CSSConditionRule")&&(u.CSSConditionRule=i.CSSConditionRule),pt("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:$e(((e,t,i)=>{var[a,s]=i,{id:l,styleId:c}=lt(t.parentStyleSheet,r,o.styleMirror);return(l&&-1!==l||c&&-1!==c)&&n({id:l,styleId:c,adds:[{rule:a,index:[...st(t),s||0]}]}),e.apply(t,i)}))}),i.prototype.deleteRule=new Proxy(d[t].deleteRule,{apply:$e(((e,t,i)=>{var[a]=i,{id:s,styleId:l}=lt(t.parentStyleSheet,r,o.styleMirror);return(s&&-1!==s||l&&-1!==l)&&n({id:s,styleId:l,removes:[{index:[...st(t),a]}]}),e.apply(t,i)}))})})),$e((()=>{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=ct(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:$e(((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}=lt(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:st(t.parentRule)}),e.apply(t,a)}))});var l=a.CSSStyleDeclaration.prototype.removeProperty;return a.CSSStyleDeclaration.prototype.removeProperty=new Proxy(l,{apply:$e(((e,t,a)=>{var s,[c]=a;if(o.has(c))return l.apply(t,[c]);var{id:u,styleId:d}=lt(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:st(t.parentRule)}),e.apply(t,a)}))}),$e((()=>{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=Ce(n.fonts,"add",(function(e){return function(n){return setTimeout($e((()=>{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),$e((()=>{o.forEach((e=>e()))}))}(e)));var m=function(e){var{doc:t,mirror:n,blockClass:r,blockSelector:o,selectionCb:i}=e,a=!0,s=$e((()=>{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(),ve("selectionchange",s)}(e),v=function(e){var{doc:t,customElementCb:n}=e,r=t.defaultView;return r&&r.customElements?Ce(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 $e((()=>{et.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 dt(e){return void 0!==window[e]}function pt(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class ht{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 ft{constructor(e){c(this,"iframes",new WeakMap),c(this,"crossOriginIframeMap",new WeakMap),c(this,"crossOriginIframeMirror",new ht(j)),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 ht(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:He.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 He.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 He.Drag:case He.TouchMove:case He.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case He.ViewportResize:return!1;case He.MediaInteraction:case He.MouseInteraction:case He.Scroll:case He.CanvasMutation:case He.Input:return this.replaceIds(t.data,e,["id"]),t;case He.StyleSheetRule:case He.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case He.Font:return t;case He.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case He.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 mt{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(k(e)&&!this.shadowDoms.has(e)){this.shadowDoms.add(e);var r=nt(t(t({},this.bypassOptions),{},{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push((()=>r.disconnect())),this.restoreHandlers.push(ot(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(me.host(e))),this.restoreHandlers.push(ct({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(Ce(e.prototype,"attachShadow",(function(e){return function(r){var o=e.call(this,r),i=me.shadowRoot(this);return i&&Be(this)&&n.addShadowRoot(i,t),o}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch(e){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var vt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",gt="undefined"==typeof Uint8Array?[]:new Uint8Array(256),yt=0;yt<64;yt++)gt[vt.charCodeAt(yt)]=yt;var bt=new Map;var _t=(e,t,n)=>{if(e&&(It(e,t)||"object"==typeof e)){var r=function(e,t){var n=bt.get(e);return n||(n=new Map,bt.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 Ct(e,t,n){if(e instanceof Array)return e.map((e=>Ct(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+=vt[n[t]>>2],o+=vt[(3&n[t])<<4|n[t+1]>>4],o+=vt[(15&n[t+1])<<2|n[t+2]>>6],o+=vt[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:[Ct(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:[Ct(e.data,t,n),e.width,e.height]}:It(e,t)||"object"==typeof e?{rr_type:e.constructor.name,index:_t(e,t,n)}:e}var St=(e,t,n)=>e.map((e=>Ct(e,t,n))),It=(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 wt(e,t,n,r){var o=[];try{var i=Ce(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 kt(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=Ce(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(_t(u,i,this),"tagName"in this.canvas&&!Te(this.canvas,r,o,!0)){var d=St(l,i,this),p={type:t,property:s,args:d};n(this.canvas,p)}return u}}));a.push(l)}catch(r){var c=_e(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 xt,Tt,Mt,Nt,Et="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",At="undefined"!=typeof window&&window.Blob&&new Blob([(xt=Et,Uint8Array.from(atob(xt),(e=>e.charCodeAt(0))))],{type:"text/javascript;charset=utf-8"});function Ot(e){var t;try{if(!(t=At&&(window.URL||window.webkitURL).createObjectURL(At)))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=wt(t,n,o,!0),l=new Map,c=new Ot;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:We["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=wt(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=Ce(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=St(s,t,this);e(this.canvas,{type:We["2D"],property:i,args:n})}),0),o.apply(this,s)}}));o.push(a)}catch(n){var s=_e(t.CanvasRenderingContext2D.prototype,i,{set(t){e(this.canvas,{type:We["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(...kt(t.WebGLRenderingContext.prototype,We.WebGL,e,n,r,t)),void 0!==t.WebGL2RenderingContext&&o.push(...kt(t.WebGL2RenderingContext.prototype,We.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 Lt{constructor(e){c(this,"trackedLinkElements",new WeakSet),c(this,"mutationCb"),c(this,"adoptedStyleSheetCb"),c(this,"styleMirror",new Le),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 Dt{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 Ft=!1;try{if(2!==Array.from([1],(e=>2*e))[0]){var Bt=document.createElement("iframe");document.body.appendChild(Bt),Array.from=(null==(a=Bt.contentWindow)?void 0:a.Array.from)||Array.from,document.body.removeChild(Bt)}}catch(e){console.debug("Unable to override Array.from",e)}var Pt,Ht,Zt=new N;function qt(){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:x=!1,collectFonts:T=!1,inlineImages:M=!1,plugins:E,keepIframeSrcFn:A=(()=>!1),ignoreCSSAttributes:O=new Set([]),errorHandler:R}=e;Ge=R;var L=!w||window.parent===window,D=!1;if(!L)try{window.parent.document&&(D=!1)}catch(e){D=!0}if(L&&!n)throw new Error("emit function is required");if(!L&&!D)return()=>{};void 0!==C&&void 0===b.mousemove&&(b.mousemove=C),Zt.reset();var F,B=!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},P=!0===f||"all"===f?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===f,headMetaDescKeywords:"all"===f,headTitleMutations:"all"===f}:f||{};!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}();var H=0,Z=e=>{for(var t of E||[])t.eventProcessor&&(e=t.eventProcessor(e));return y&&!D&&(e=y(e)),e};Tt=(e,t)=>{var i,a=e;if(a.timestamp=Se(),!(null==(i=et[0])?void 0:i.isFrozen())||a.type===Pe.FullSnapshot||a.type===Pe.IncrementalSnapshot&&a.data.source===He.Mutation||et.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===He.Mutation&&a.data.isAttachIframe)return;H++;var l=o&&H>=o,c=r&&a.timestamp-F.timestamp>r;(l||c)&&Mt(!0)}};var q=e=>{Tt({type:Pe.IncrementalSnapshot,data:t({source:He.Mutation},e)})},W=e=>Tt({type:Pe.IncrementalSnapshot,data:t({source:He.Scroll},e)}),V=e=>Tt({type:Pe.IncrementalSnapshot,data:t({source:He.CanvasMutation},e)}),Y=new Lt({mutationCb:q,adoptedStyleSheetCb:e=>Tt({type:Pe.IncrementalSnapshot,data:t({source:He.AdoptedStyleSheet},e)})}),j=new ft({mirror:Zt,mutationCb:q,stylesheetManager:Y,recordCrossOriginIframes:w,wrappedEmit:Tt});for(var G of E||[])G.getMirror&&G.getMirror({nodeMirror:Zt,crossOriginIframeMirror:j.crossOriginIframeMirror,crossOriginIframeStyleMirror:j.crossOriginIframeStyleMirror});var z=new Dt;Nt=new Rt({recordCanvas:I,mutationCb:V,win:window,blockClass:i,blockSelector:a,mirror:Zt,sampling:b.canvas,dataURLOptions:_});var U=new mt({mutationCb:q,scrollCb:W,bypassOptions:{blockClass:i,blockSelector:a,maskTextClass:c,maskTextSelector:u,inlineStylesheet:d,maskInputOptions:B,dataURLOptions:_,maskTextFn:v,maskInputFn:m,recordCanvas:I,inlineImages:M,sampling:b,slimDOMOptions:P,iframeManager:j,stylesheetManager:Y,canvasManager:Nt,keepIframeSrcFn:A,processedNodeManager:z},mirror:Zt});Mt=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(S){Tt({type:Pe.Meta,data:{href:window.location.href,width:ke(),height:we()}},e),Y.reset(),U.init(),et.forEach((e=>e.lock()));var t=function(e,t){var{mirror:n=new N,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 oe(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:Zt,blockClass:i,blockSelector:a,maskTextClass:c,maskTextSelector:u,inlineStylesheet:d,maskAllInputs:B,maskTextFn:v,maskInputFn:m,slimDOM:P,dataURLOptions:_,recordCanvas:I,inlineImages:M,onSerialize:e=>{Ae(e,Zt)&&j.addIframe(e),Oe(e,Zt)&&Y.trackLinkElement(e),Re(e)&&U.addShadowRoot(me.shadowRoot(e),document)},onIframeLoad:(e,t)=>{j.attachIframe(e,t),U.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{Y.attachLinkElement(e,t)},keepIframeSrcFn:A});if(!t)return console.warn("Failed to snapshot the document");Tt({type:Pe.FullSnapshot,data:{node:t,initialOffset:Ie(window)}},e),et.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Y.adoptStyleSheets(document.adoptedStyleSheets,Zt.getId(document))}};try{var X=[],K=e=>{var n;return $e(ut)({mutationCb:q,mousemoveCb:(e,t)=>Tt({type:Pe.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>Tt({type:Pe.IncrementalSnapshot,data:t({source:He.MouseInteraction},e)}),scrollCb:W,viewportResizeCb:e=>Tt({type:Pe.IncrementalSnapshot,data:t({source:He.ViewportResize},e)}),inputCb:e=>Tt({type:Pe.IncrementalSnapshot,data:t({source:He.Input},e)}),mediaInteractionCb:e=>Tt({type:Pe.IncrementalSnapshot,data:t({source:He.MediaInteraction},e)}),styleSheetRuleCb:e=>Tt({type:Pe.IncrementalSnapshot,data:t({source:He.StyleSheetRule},e)}),styleDeclarationCb:e=>Tt({type:Pe.IncrementalSnapshot,data:t({source:He.StyleDeclaration},e)}),canvasMutationCb:V,fontCb:e=>Tt({type:Pe.IncrementalSnapshot,data:t({source:He.Font},e)}),selectionCb:e=>{Tt({type:Pe.IncrementalSnapshot,data:t({source:He.Selection},e)})},customElementCb:e=>{Tt({type:Pe.IncrementalSnapshot,data:t({source:He.CustomElement},e)})},blockClass:i,ignoreClass:s,ignoreSelector:l,maskTextClass:c,maskTextSelector:u,maskInputOptions:B,inlineStylesheet:d,sampling:b,recordDOM:S,recordCanvas:I,inlineImages:M,userTriggeredOnInput:x,collectFonts:T,doc:e,maskInputFn:m,maskTextFn:v,keepIframeSrcFn:A,blockSelector:a,slimDOMOptions:P,dataURLOptions:_,mirror:Zt,iframeManager:j,stylesheetManager:Y,shadowDomManager:U,processedNodeManager:z,canvasManager:Nt,ignoreCSSAttributes:O,plugins:(null==(n=null==E?void 0:E.filter((e=>e.observer)))?void 0:n.map((e=>({observer:e.observer,options:e.options,callback:t=>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=()=>{Mt(),X.push(K(document)),Ft=!0};return"interactive"===document.readyState||"complete"===document.readyState?J():(X.push(ve("DOMContentLoaded",(()=>{Tt({type:Pe.DomContentLoaded,data:{}}),"DOMContentLoaded"===k&&J()}))),X.push(ve("load",(()=>{Tt({type:Pe.Load,data:{}}),"load"===k&&J()}),window))),()=>{X.forEach((e=>e())),z.destroy(),Ft=!1,Ge=void 0}}catch(e){console.warn(e)}}qt.addCustomEvent=(e,t)=>{if(!Ft)throw new Error("please add custom event after start recording");Tt({type:Pe.Custom,data:{tag:e,payload:t}})},qt.freezePage=()=>{et.forEach((e=>e.freeze()))},qt.takeFullSnapshot=e=>{if(!Ft)throw new Error("please take full snapshot after start recording");Mt(e)},qt.mirror=Zt,(Ht=Pt||(Pt={}))[Ht.NotStarted=0]="NotStarted",Ht[Ht.Running=1]="Running",Ht[Ht.Stopped=2]="Stopped";var Wt,Vt=Object.defineProperty,Yt=(e,t,n)=>((e,t,n)=>t in e?Vt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),jt=Object.defineProperty,Gt=(e,t,n)=>((e,t,n)=>t in e?jt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),zt=Object.defineProperty,Ut=(e,t,n)=>((e,t,n)=>t in e?zt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),Xt={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Kt={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Jt={};function Qt(e){if(Jt[e])return Jt[e];var t=globalThis[e],n=t.prototype,r=e in Xt?Xt[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 Kt?Kt[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 Jt[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?Jt[e]=c:n}catch(e){return n}}var $t={};function en(e,t,n){var r,o="".concat(e,".").concat(String(n));if($t[o])return $t[o].call(t);var i=Qt(e),a=null==(r=Object.getOwnPropertyDescriptor(i,n))?void 0:r.get;return a?($t[o]=a,a.call(t)):t[n]}var tn={};function nn(e,t,n){var r="".concat(e,".").concat(String(n));if(tn[r])return tn[r].bind(t);var o=Qt(e)[n];return"function"!=typeof o?t[n]:(tn[r]=o,o.bind(t))}var rn={childNodes:function(e){return en("Node",e,"childNodes")},parentNode:function(e){return en("Node",e,"parentNode")},parentElement:function(e){return en("Node",e,"parentElement")},textContent:function(e){return en("Node",e,"textContent")},contains:function(e,t){return nn("Node",e,"contains")(t)},getRootNode:function(e){return nn("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?en("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?en("Element",e,"shadowRoot"):null},querySelector:function(e,t){return en("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return en("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return Qt("MutationObserver").constructor}};class on{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 an(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&an(rn.parentNode(e),t,n);for(var r=e.classList.length;r--;){var o=e.classList[r];if(t.test(o))return!0}return!!n&&an(rn.parentNode(e),t,n)}class sn{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 sn))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 ln={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},cn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},un={};function dn(e){if(un[e])return un[e];var t=globalThis[e],n=t.prototype,r=e in ln?ln[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 cn?cn[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 un[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?un[e]=c:n}catch(e){return n}}var pn={};function hn(e,t,n){var r,o="".concat(e,".").concat(String(n));if(pn[o])return pn[o].call(t);var i=dn(e),a=null==(r=Object.getOwnPropertyDescriptor(i,n))?void 0:r.get;return a?(pn[o]=a,a.call(t)):t[n]}var fn={};function mn(e,t,n){var r="".concat(e,".").concat(String(n));if(fn[r])return fn[r].bind(t);var o=dn(e)[n];return"function"!=typeof o?t[n]:(fn[r]=o,o.bind(t))}var vn={childNodes:function(e){return hn("Node",e,"childNodes")},parentNode:function(e){return hn("Node",e,"parentNode")},parentElement:function(e){return hn("Node",e,"parentElement")},textContent:function(e){return hn("Node",e,"textContent")},contains:function(e,t){return mn("Node",e,"contains")(t)},getRootNode:function(e){return mn("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?hn("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?hn("Element",e,"shadowRoot"):null},querySelector:function(e,t){return hn("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return hn("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return dn("MutationObserver").constructor}};var gn="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.",yn={map:{},getId:()=>(console.error(gn),-1),getNode:()=>(console.error(gn),null),removeNodeFromMap(){console.error(gn)},has:()=>(console.error(gn),!1),reset(){console.error(gn)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(yn=new Proxy(yn,{get:(e,t,n)=>("map"===t&&console.error(gn),Reflect.get(e,t,n))}));var bn=Date.now;function _n(e){return e?e.nodeType===e.ELEMENT_NODE?e:vn.parentElement(e):null}/[1-9][0-9]{12}/.test(Date.now().toString())||(bn=()=>(new Date).getTime());function Cn(e){var t,n=null;return"getRootNode"in e&&(null==(t=vn.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&vn.host(vn.getRootNode(e))&&(n=vn.host(vn.getRootNode(e))),n}function Sn(e){for(var t,n=e;t=Cn(n);)n=t;return n}function In(e){var t=e.ownerDocument;if(!t)return!1;var n=Sn(e);return vn.contains(t,n)}for(var wn=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:class{constructor(){Gt(this,"id",1),Gt(this,"styleIDMap",new WeakMap),Gt(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 yn},closestElementOfNode:_n,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:Sn,getShadowHost:Cn,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=vn.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=vn.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 sn&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(vn.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&&(vn.contains(t,e)||In(e))},isAncestorRemoved:function e(t,n){if(o=(r=t)&&"host"in r&&"mode"in r&&rn.host(r)||null,Boolean(o&&"shadowRoot"in o&&rn.shadowRoot(o)===r))return!1;var r,o,i=n.getId(t);if(!n.has(i))return!0;var a=vn.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=_n(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(an(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 bn},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:In,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"})),kn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xn="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Tn=0;Tn<64;Tn++)xn[kn.charCodeAt(Tn)]=Tn;var Mn;"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 Nn=document.createElement("iframe");document.body.appendChild(Nn),Array.from=(null==(Wt=Nn.contentWindow)?void 0:Wt.Array.from)||Array.from,document.body.removeChild(Nn)}}catch(e){console.debug("Unable to override Array.from",e)}new on,function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(Mn||(Mn={}));class En{constructor(e){Yt(this,"fileName"),Yt(this,"functionName"),Yt(this,"lineNumber"),Yt(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 An=/(^|@)\S+:\d+/,On=/^\s*at .*(\S+:\d+|\(native\))/m,Rn=/^(eval@)?(\[native code])?$/,Ln={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(On)?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(On)}),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(An)&&!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 Dn(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 Fn(e){return"[object Object]"===Object.prototype.toString.call(e)}function Bn(e,t){if(0===t)return!0;var n=Object.keys(e);for(var r of n)if(Fn(e[r])&&Bn(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(Fn(e)&&Object.keys(e).length>n.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if(Fn(e)&&Bn(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]=Dn(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 Hn={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 Zn(e,t,n){var r,o=n?Object.assign({},Hn,n):Hn,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=Ln.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=Ln.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]?wn.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=Ln.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 qn=e=>({name:"rrweb/console@1",observer:Zn,options:e}),Wn="undefined"!=typeof window?window:void 0,Vn="undefined"!=typeof globalThis?globalThis:Wn,Yn=Array.prototype.forEach,jn=null==Vn?void 0:Vn.navigator,Gn=null==Vn?void 0:Vn.document;null==Vn||Vn.location,null==Vn||Vn.fetch,null!=Vn&&Vn.XMLHttpRequest&&"withCredentials"in new Vn.XMLHttpRequest&&Vn.XMLHttpRequest,null==Vn||Vn.AbortController,null==jn||jn.userAgent;var zn=null!=Wn?Wn:{},Un="[PostHog.js]",Xn={_log:function(e){if(Wn&&zn.POSTHOG_DEBUG&&!fr(Wn.console)&&Wn.console){for(var t=("__rrweb_original__"in Wn.console[e]?Wn.console[e].__rrweb_original__:Wn.console[e]),n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];t(Un,...r)}},info:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Xn._log("log",...t)},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Xn._log("warn",...t)},error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Xn._log("error",...t)},critical:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];console.error(Un,...t)},uninitializedWarning:e=>{Xn.error("You must initialize PostHog before calling ".concat(e))}},Kn={},Jn=function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function Qn(e,t,n){if(cr(e))if(Yn&&e.forEach===Yn)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)===Kn)return}function $n(e,t,n){if(!yr(e)){if(cr(e))return Qn(e,t,n);if(Sr(e)){for(var r of e.entries())if(t.call(n,r[1],r[0])===Kn)return}else for(var o in e)if(sr.call(e,o)&&t.call(n,e[o],o)===Kn)return}}var er,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 Qn(n,(function(t){for(var n in t)void 0!==t[n]&&(e[n]=t[n])})),e};function nr(e,t){return-1!==e.indexOf(t)}function rr(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(e){e.GZipJS="gzip-js",e.Base64="base64"}(er||(er={}));var or=["fatal","error","warning","log","info","debug"],ir=Array.isArray,ar=Object.prototype,sr=ar.hasOwnProperty,lr=ar.toString,cr=ir||function(e){return"[object Array]"===lr.call(e)},ur=e=>"function"==typeof e,dr=e=>ur(e)&&-1!==e.toString().indexOf("[native code]"),pr=e=>!!ur(e)&&Object.getOwnPropertyNames(e.prototype||{}).some((e=>e.indexOf("__zone"))),hr=e=>e===Object(e)&&!cr(e),fr=e=>void 0===e,mr=e=>"[object String]"==lr.call(e),vr=e=>mr(e)&&0===e.trim().length,gr=e=>null===e,yr=e=>fr(e)||gr(e),br=e=>"[object Number]"==lr.call(e),_r=e=>"[object Boolean]"===lr.call(e),Cr=e=>e instanceof Document,Sr=e=>e instanceof FormData,Ir=function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"&",o=[];return $n(e,(function(e,r){fr(e)||fr(r)||"undefined"===r||(t=encodeURIComponent((e=>e instanceof File)(e)?e.name:e.toString()),n=encodeURIComponent(r),o[o.length]=n+"="+t)})),o.join(r)};function wr(e){return!!e&&1===e.nodeType}function kr(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function xr(e){return e?Jn(e).split(/\s+/):[]}function Tr(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 xr(t)}function Mr(e){var t="";return Er(e)&&!Ar(e)&&e.childNodes&&e.childNodes.length&&$n(e.childNodes,(function(e){var n;(function(e){return!!e&&3===e.nodeType})(e)&&e.textContent&&(t+=null!==(n=function(e){return yr(e)?null:Jn(e).split(/(\s+)/).filter((e=>Pr(e))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}(e.textContent))&&void 0!==n?n:"")})),Jn(t)}var Nr=["a","button","form","input","select","textarea","label"];function Er(e){for(var t=e;t.parentNode&&!kr(t,"body");t=t.parentNode){var n=Tr(t);if(nr(n,"ph-sensitive")||nr(n,"ph-no-capture"))return!1}if(nr(Tr(e),"ph-include"))return!0;var r=e.type||"";if(mr(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var o=e.name||e.id||"";if(mr(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 Ar(e){return!!(kr(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||kr(e,"select")||kr(e,"textarea")||"true"===e.getAttribute("contenteditable"))}var Or="(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})",Rr=new RegExp("^(?:".concat(Or,")$")),Lr=new RegExp(Or),Dr="\\d{3}-?\\d{2}-?\\d{4}",Fr=new RegExp("^(".concat(Dr,")$")),Br=new RegExp("(".concat(Dr,")"));function Pr(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(yr(e))return!1;if(mr(e)){if(e=Jn(e),(t?Rr:Lr).test((e||"").replace(/[- ]/g,"")))return!1;if((t?Fr:Br).test(e))return!1}return!0}function Hr(e){var t=Mr(e);return Pr(t="".concat(t," ").concat(Zr(e)).trim())?t:""}function Zr(e){var t="";return e&&e.childNodes&&e.childNodes.length&&$n(e.childNodes,(function(e){var n;if(e&&"span"===(null===(n=e.tagName)||void 0===n?void 0:n.toLowerCase()))try{var r=Mr(e);t="".concat(t," ").concat(r).trim(),e.childNodes&&e.childNodes.length&&(t="".concat(t," ").concat(Zr(e)).trim())}catch(e){Xn.error(e)}})),t}function qr(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 rr(a).sort(((e,t)=>{var[n]=e,[r]=t;return n.localeCompare(r)})).forEach((e=>{var[t,n]=e;return s[Wr(t.toString())]=Wr(n.toString())})),o+=":",o+=rr(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:Vr(e),attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return rr(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 Wr(e){return e.replace(/"|\\"/g,'\\"')}function Vr(e){var t=e.attr__class;return t?cr(t)?t:xr(t):void 0}var Yr={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"]};function jr(e,t,n){try{if(!(t in e))return()=>{};var r=e[t],o=n(r);return ur(o)&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=o,()=>{e[t]=r}}catch(e){return()=>{}}}function Gr(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 zr=e=>"navigation"===e.entryType,Ur=e=>"resource"===e.entryType;function Xr(e,t,n){if(n.recordInitialRequests){var r=t.performance.getEntries().filter((e=>zr(e)||Ur(e)&&n.initiatorTypes.includes(e.initiatorType)));e({requests:r.flatMap((e=>no({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=>zr(e)||Ur(e)&&n.initiatorTypes.includes(e.initiatorType)&&(e=>!n.recordBody&&!n.recordHeaders||"xmlhttprequest"!==e.initiatorType&&"fetch"!==e.initiatorType)(e)));e({requests:r.flatMap((e=>no({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 Kr(e,t){return!!t&&(_r(t)||t[e])}function Jr(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(_r(n))return!0;if(cr(n))return o(n);var i=n[t];return _r(i)?i:o(i)}function Qr(e,t,n,r,o){return $r.apply(this,arguments)}function $r(){return $r=r((function*(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(i>10)return Xn.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=>Ur(e)&&e.initiatorType===t&&(fr(r)||e.startTime>=r)&&(fr(o)||e.startTime<=o)));return a||(yield new Promise((e=>setTimeout(e,50*i))),Qr(e,t,n,r,o,i+1))})),$r.apply(this,arguments)}function eo(e){var{body:t,options:n,url:r}=e;if(yr(t))return null;var{hostname:o,isHostDenied:i}=Gr(r,n);if(i)return o+" is in deny list";if(mr(t))return t;if(Cr(t))return t.textContent;if(Sr(t))return Ir(t);if(hr(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 to=e=>!gr(e)&&("navigation"===e.entryType||"resource"===e.entryType);function no(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:fr(s)?void 0:Math.round(s),endTime:fr(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(to(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 ro=["video/","audio/"];function oo(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 io(){return io=r((function*(e){var{r:t,options:n,url:r}=e,{hostname:o,isHostDenied:i}=Gr(r,n);return i?Promise.resolve(o+" is in deny list"):oo(t)})),io.apply(this,arguments)}function ao(){return ao=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=ro.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}=Gr(o,r);return l?s+" is in deny list":null}({r:t,options:n,url:r});return gr(o)?oo(t):Promise.resolve(o)})),ao.apply(this,arguments)}function so(e,t,n){if(!n.initiatorTypes.includes("fetch"))return()=>{};var o=Kr("request",n.recordHeaders),i=Kr("response",n.recordHeaders),a=jr(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),Jr({type:"request",headers:h,url:r,recordBody:n.recordBody})&&(p.requestBody=yield function(e){return io.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),Jr({type:"response",headers:f,url:r,recordBody:n.recordBody})&&(p.responseBody=yield function(e){return ao.apply(this,arguments)}({r:l,options:n,url:r})),l}finally{Qr(t,"fetch",d.url,c,u).then((t=>{var n,r=no({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 lo=null;function co(e,n,r){if(!("performance"in n))return()=>{};if(lo)return Xn.warn("Network observer already initialised, doing nothing"),()=>{};var o=r?Object.assign({},Yr,r):Yr,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=Xr(i,n,o),s=()=>{},l=()=>{};return(o.recordHeaders||o.recordBody)&&(s=function(e,t,n){if(!n.initiatorTypes.includes("xmlhttprequest"))return()=>{};var r=Kr("request",n.recordHeaders),o=Kr("response",n.recordHeaders),i=jr(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=>(Jr({type:"request",headers:v,url:s,recordBody:n.recordBody})&&(m.requestBody=eo({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),Jr({type:"response",headers:r,url:s,recordBody:n.recordBody})&&(m.responseBody=eo({body:h.response,options:n,url:s})),Qr(t,"xmlhttprequest",f.url,l,c).then((t=>{var n=no({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=so(i,n,o)),lo=()=>{a(),s(),l()}}var uo,po,ho,fo=e=>({name:"rrweb/network@1",observer:co,options:e});zn.__PosthogExtensions__=zn.__PosthogExtensions__||{},zn.__PosthogExtensions__.rrwebPlugins={getRecordConsolePlugin:qn,getRecordNetworkPlugin:fo},zn.__PosthogExtensions__.rrweb={record:qt,version:"v2"},zn.rrweb={record:qt,version:"v2"},zn.rrwebConsoleRecord={getRecordConsolePlugin:qn},zn.getRecordNetworkPlugin=fo,function(e){e.Popover="popover",e.API="api",e.Widget="widget"}(uo||(uo={})),function(e){e.Open="open",e.MultipleChoice="multiple_choice",e.SingleChoice="single_choice",e.Rating="rating",e.Link="link"}(po||(po={})),function(e){e.NextQuestion="next_question",e.End="end",e.ResponseBased="response_based",e.SpecificQuestion="specific_question"}(ho||(ho={}));var mo,vo,go,yo,bo,_o,Co,So,Io={},wo=[],ko=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,xo=Array.isArray;function To(e,t){for(var n in t)e[n]=t[n];return e}function Mo(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?mo.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 Eo(e,a,r,o,null)}function Eo(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?++go:o,__i:-1,__u:0};return null==o&&null!=vo.vnode&&vo.vnode(i),i}function Ao(e){return e.children}function Oo(e,t){this.props=e,this.context=t}function Ro(e,t){if(null==t)return e.__?Ro(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?Ro(e):null}function Lo(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 Lo(e)}}function Do(e){(!e.__d&&(e.__d=!0)&&yo.push(e)&&!Fo.__r++||bo!==vo.debounceRendering)&&((bo=vo.debounceRendering)||_o)(Fo)}function Fo(){var e,t,n,r,o,i,a,s,l;for(yo.sort(Co);e=yo.shift();)e.__d&&(t=yo.length,r=void 0,i=(o=(n=e).__v).__e,s=[],l=[],(a=n.__P)&&((r=To({},o)).__v=o.__v+1,vo.vnode&&vo.vnode(r),Yo(a,r,o,n.__n,void 0!==a.ownerSVGElement,32&o.__u?[i]:null,s,null==i?Ro(o):i,!!(32&o.__u),l),r.__.__k[r.__i]=r,jo(s,r,l),r.__e!=i&&Lo(r)),yo.length>t&&yo.sort(Co));Fo.__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||wo,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?Eo(null,o,null,null,o):xo(o)?Eo(Ao,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?Eo(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)?(o.__=e,o.__b=e.__b+1,s=Ho(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=Ro(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=Ro(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?Io:v[h.__i]||Io,h.__i=d,Yo(e,h,p,o,i,a,s,l,c,u),f=h.__e,h.ref&&p.ref!=h.ref&&(p.ref&&Go(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=Po(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 Po(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=Po(r[o],t,n));return t}return e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e),t&&t.nextSibling}function Ho(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 Zo(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||ko.test(t)?n:n+"px"}function qo(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||Zo(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Zo(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?Vo:Wo,i)):e.removeEventListener(t,i?Vo:Wo,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 Wo(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(vo.event?vo.event(e):e)}function Vo(e){return this.l[e.type+!0](vo.event?vo.event(e):e)}function Yo(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=vo.__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=Uo),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=To({},d.__s)),To(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=vo.__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=To(To({},r),d.getChildContext())),p||null==d.getSnapshotBeforeUpdate||(m=d.getSnapshotBeforeUpdate(h,f)),Bo(e,xo(w=null!=u&&u.type===Ao&&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),vo.__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&&mo.call(e.childNodes),v=n.props||Io,!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||qo(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||qo(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&&Ro(n,0),s,l),null!=i)for(c=i.length;c--;)null!=i[c]&&Mo(i[c]);s||(c="value",void 0!==f&&(f!==e[c]||"progress"===y&&!f||"option"===y&&f!==v[c])&&qo(e,c,f,v[c],!1),c="checked",void 0!==m&&m!==e[c]&&qo(e,c,m,v[c],!1))}return e}(n.__e,t,n,r,o,i,a,l,c);(u=vo.diffed)&&u(t)}function jo(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)Go(n[r],n[++r],n[++r]);vo.__c&&vo.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){vo.__e(e,t.__v)}}))}function Go(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){vo.__e(e,n)}}function zo(e,t,n){var r,o;if(vo.unmount&&vo.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Go(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){vo.__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||Mo(e.__e),e.__=e.__e=e.__d=void 0}function Uo(e,t,n){return this.constructor(e,n)}function Xo(e,t,n){var r,o,i,a;vo.__&&vo.__(e,t),o=(r="function"==typeof n)?null:t.__k,i=[],a=[],Yo(t,e=(!r&&n||t).__k=No(Ao,null,[e]),o||Io,Io,void 0!==t.ownerSVGElement,!r&&n?[n]:o?null:t.firstChild?mo.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,a),jo(i,e,a)}function Ko(e,t,n){var r,o,i,a,s=To({},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?mo.call(arguments,2):n),Eo(e.type,s,r||e.key,o||e.ref,null)}mo=wo.slice,vo={__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}},go=0,Oo.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=To({},this.state),"function"==typeof e&&(e=e(To({},n),this.props)),e&&To(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),Do(this))},Oo.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Do(this))},Oo.prototype.render=Ao,yo=[],_o="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Co=function(e,t){return e.__v.__b-t.__v.__b},Fo.__r=0,So=0;var Jo=Wn,Qo=Gn,$o="seenSurvey_",ei=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: -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: -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(ni((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 ti(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 ni(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oi;"#"===t[0]&&(e=ti(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=ti(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 ri={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"},oi="#eeeded",ii=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(di(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:{[pi(r,"responded")]:!0}})),Jo.dispatchEvent(new Event("PHSurveySent")))},ai=(e,t,n)=>{var r;!n&&t&&(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:{[pi(e,"dismissed")]:!0}}),localStorage.setItem(di(e),"true"),Jo.dispatchEvent(new Event("PHSurveyClosed")))},si=e=>e.map((e=>({sort:Math.floor(10*Math.random()),value:e}))).sort(((e,t)=>e.sort-t.sort)).map((e=>e.value)),li=(e,t)=>e.length===t.length&&e.every(((e,n)=>e===t[n]))?t.reverse():t,ci=e=>(e.questions.forEach(((e,t)=>{e.originalQuestionIndex=t})),e.appearance&&e.appearance.shuffleQuestions?li(e.questions,si(e.questions)):e.questions),ui=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))},di=e=>{var t="".concat($o).concat(e.id);return e.current_iteration&&e.current_iteration>0&&(t="".concat($o).concat(e.id,"_").concat(e.current_iteration)),t},pi=(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},hi=function(e,t){var n={__c:t="__cC"+So++,__: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,Do(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}),fi=e=>{var{component:t,children:n,renderAsHtml:r,style:o}=e;return Ko(t,r?{dangerouslySetInnerHTML:{__html:n},style:o}:{children:n,style:o})},mi=Gn;var vi,gi,yi,bi,_i=0,Ci=[],Si=[],Ii=vo.__b,wi=vo.__r,ki=vo.diffed,xi=vo.__c,Ti=vo.unmount;function Mi(e,t){vo.__h&&vo.__h(gi,e,_i||t),_i=0;var n=gi.__H||(gi.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:Si}),n.__[e]}function Ni(e){return _i=1,function(e,t,n){var r=Mi(vi++,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=gi,!gi.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))};gi.u=!0;var i=gi.shouldComponentUpdate,a=gi.componentWillUpdate;gi.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)},gi.shouldComponentUpdate=o}return r.__N||r.__}(Zi,e)}function Ei(e,t){var n=Mi(vi++,3);!vo.__s&&Hi(n.__H,t)&&(n.__=e,n.i=t,gi.__H.__h.push(n))}function Ai(e){return _i=5,Oi((function(){return{current:e}}),[])}function Oi(e,t){var n=Mi(vi++,7);return Hi(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function Ri(e){var t=gi.context[e.__c],n=Mi(vi++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(gi)),t.props.value):e.__}function Li(){for(var e;e=Ci.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Bi),e.__H.__h.forEach(Pi),e.__H.__h=[]}catch(t){e.__H.__h=[],vo.__e(t,e.__v)}}vo.__b=function(e){gi=null,Ii&&Ii(e)},vo.__r=function(e){wi&&wi(e),vi=0;var t=(gi=e.__c).__H;t&&(yi===gi?(t.__h=[],gi.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=Si,e.__N=e.i=void 0}))):(t.__h.forEach(Bi),t.__h.forEach(Pi),t.__h=[],vi=0)),yi=gi},vo.diffed=function(e){ki&&ki(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==Ci.push(t)&&bi===vo.requestAnimationFrame||((bi=vo.requestAnimationFrame)||Fi)(Li)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==Si&&(e.__=e.__V),e.i=void 0,e.__V=Si}))),yi=gi=null},vo.__c=function(e,t){t.some((function(e){try{e.__h.forEach(Bi),e.__h=e.__h.filter((function(e){return!e.__||Pi(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],vo.__e(n,e.__v)}})),xi&&xi(e,t)},vo.unmount=function(e){Ti&&Ti(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{Bi(e)}catch(e){t=e}})),n.__H=void 0,t&&vo.__e(t,n.__v))};var Di="function"==typeof requestAnimationFrame;function Fi(e){var t,n=function(){clearTimeout(r),Di&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Di&&(t=requestAnimationFrame(n))}function Bi(e){var t=gi,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),gi=t}function Pi(e){var t=gi;e.__c=e.__(),gi=t}function Hi(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 qi=0;function Wi(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:--qi,__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 vo.vnode&&vo.vnode(c),c}var Vi=Wi("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Wi("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"})}),Yi=Wi("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Wi("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"})}),ji=Wi("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Wi("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"})}),Gi=Wi("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Wi("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"})}),zi=Wi("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Wi("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"})}),Ui=Wi("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Wi("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"})}),Xi=Wi("svg",{width:"77",height:"14",viewBox:"0 0 77 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Wi("g",{"clip-path":"url(#clip0_2415_6911)",children:[Wi("mask",{id:"mask0_2415_6911",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"77",height:"14",children:Wi("path",{d:"M0.5 0H76.5V14H0.5V0Z",fill:"white"})}),Wi("g",{mask:"url(#mask0_2415_6911)",children:[Wi("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"}),Wi("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"}),Wi("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"}),Wi("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"}),Wi("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"}),Wi("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"})]})]}),Wi("defs",{children:Wi("clipPath",{id:"clip0_2415_6911",children:Wi("rect",{width:"76",height:"14",fill:"white",transform:"translate(0.5)"})})})]}),Ki=Wi("svg",{width:"16",height:"12",viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Wi("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 Ji(){return Wi("a",{href:"https://posthog.com",target:"_blank",rel:"noopener",className:"footer-branding",children:["Survey by ",Xi]})}function Qi(e){var{text:t,submitDisabled:n,appearance:r,onSubmit:o,link:i}=e,{isPreviewMode:a,isPopup:s}=Ri(hi),l=r.submitButtonTextColor||ni(r.submitButtonColor||ri.submitButtonColor);return Wi("div",{className:"bottom-section",children:[Wi("div",{className:"buttons",children:Wi("button",{className:"form-submit",disabled:n&&!a,type:"button",style:s?{color:l}:{},onClick:()=>{a||(i&&(null==Wn||Wn.open(i)),o())},children:t})}),!r.whiteLabel&&Wi(Ji,{})]})}function $i(e){var{question:t,description:n,descriptionContentType:r,backgroundColor:o,forceDisableHtml:i}=e,{isPopup:a}=Ri(hi);return Wi("div",{style:a?{backgroundColor:o||ri.backgroundColor}:{},children:[Wi("div",{className:"survey-question",children:t}),n&&fi({component:No("div",{className:"survey-question-description"}),children:n,renderAsHtml:!i&&"text"!==r})]})}function ea(e){var{onClick:t}=e,{isPreviewMode:n}=Ri(hi);return Wi("div",{className:"cancel-btn-wrapper",onClick:t,disabled:n,children:Wi("button",{className:"form-cancel",onClick:t,disabled:n,children:Ui})})}function ta(e){var{header:n,description:r,contentType:o,forceDisableHtml:i,appearance:a,onClose:s,styleOverrides:l}=e,c=ni(a.backgroundColor||ri.backgroundColor),{isPopup:u}=Ri(hi);return Wi(Ao,{children:Wi("div",{className:"thank-you-message",style:t({},l),children:Wi("div",{className:"thank-you-message-container",children:[u&&Wi(ea,{onClick:()=>s()}),Wi("h3",{className:"thank-you-message-header",style:{color:c},children:n}),r&&fi({component:No("div",{className:"thank-you-message-body"}),children:r,renderAsHtml:!i&&"text"!==o,style:{color:c}}),u&&Wi(Qi,{text:a.thankYouMessageCloseButtonText||"Close",submitDisabled:!1,appearance:a,onSubmit:()=>s()})]})})})}function na(e){var t,n=Ai(null),[r,o]=Ni(null!==(t=e.defaultTextColor)&&void 0!==t?t:"black");return Ei((()=>{if(n.current){var e=function(e){var t=Jo.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 ra(e){var{question:t,forceDisableHtml:n,appearance:r,onSubmit:o}=e,i=Ai(null),[a,s]=Ni("");return Wi("div",{ref:i,children:[Wi($i,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,backgroundColor:r.backgroundColor,forceDisableHtml:n}),Wi("textarea",{rows:4,placeholder:null==r?void 0:r.placeholder,onInput:e=>s(e.currentTarget.value)}),Wi(Qi,{text:t.buttonText||"Submit",submitDisabled:!a&&!t.optional,appearance:r,onSubmit:()=>o(a)})]})}function oa(e){var{question:t,forceDisableHtml:n,appearance:r,onSubmit:o}=e;return Wi(Ao,{children:[Wi($i,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,forceDisableHtml:n}),Wi(Qi,{text:t.buttonText||"Submit",submitDisabled:!1,link:t.link,appearance:r,onSubmit:()=>o("link clicked")})]})}function ia(e){var{question:t,forceDisableHtml:n,displayQuestionIndex:r,appearance:o,onSubmit:i}=e,a=t.scale,s=10===t.scale?0:1,[l,c]=Ni(null);return Wi(Ao,{children:[Wi($i,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,forceDisableHtml:n,backgroundColor:o.backgroundColor}),Wi("div",{className:"rating-section",children:[Wi("div",{className:"rating-options",children:["emoji"===t.display&&Wi("div",{className:"rating-options-emoji",children:(3===t.scale?la:ca).map(((e,t)=>{var n=t+1===l;return Wi("button",{className:"ratings-emoji question-".concat(r,"-rating-").concat(t," ").concat(n?"rating-active":null),value:t+1,type:"button",onClick:()=>{c(t+1)},style:{fill:n?o.ratingButtonActiveColor:o.ratingButtonColor,borderColor:o.borderColor},children:e},t)}))}),"number"===t.display&&Wi("div",{className:"rating-options-number",style:{gridTemplateColumns:"repeat(".concat(a-s+1,", minmax(0, 1fr))")},children:ha(t.scale).map(((e,t)=>Wi(aa,{displayQuestionIndex:r,active:l===e,appearance:o,num:e,setActiveNumber:e=>{c(e)}},t)))})]}),Wi("div",{className:"rating-text",children:[Wi("div",{children:t.lowerBoundLabel}),Wi("div",{children:t.upperBoundLabel})]})]}),Wi(Qi,{text:t.buttonText||(null==o?void 0:o.submitButtonText)||"Submit",submitDisabled:gr(l)&&!t.optional,appearance:o,onSubmit:()=>i(l)})]})}function aa(e){var{num:t,active:n,displayQuestionIndex:r,appearance:o,setActiveNumber:i}=e,{textColor:a,ref:s}=na({appearance:o,defaultTextColor:"black",forceUpdate:n});return Wi("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 sa(e){var{question:t,forceDisableHtml:n,displayQuestionIndex:r,appearance:o,onSubmit:i}=e,a=Ai(null),s=Oi((()=>(e=>{if(!e.shuffleOptions)return e.choices;var t=e.choices,n="";e.hasOpenChoice&&(n=t.pop());var r=li(t,si(t));return e.hasOpenChoice&&(e.choices.push(n),r.push(n)),r})(t)),[t]),[l,c]=Ni(t.type===po.MultipleChoice?[]:null),[u,d]=Ni(!1),[p,h]=Ni(""),f=t.type===po.SingleChoice?"radio":"checkbox";return Wi("div",{ref:a,children:[Wi($i,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,forceDisableHtml:n,backgroundColor:o.backgroundColor}),Wi("div",{className:"multiple-choice-options",children:s.map(((e,n)=>{var o="choice-option",i=e,a=e;return t.hasOpenChoice&&n===t.choices.length-1&&(o+=" choice-option-open"),Wi("div",{className:o,children:[Wi("input",{type:f,id:"surveyQuestion".concat(r,"Choice").concat(n),name:"question".concat(r),value:i,disabled:!i,onInput:()=>t.hasOpenChoice&&n===t.choices.length-1?d(!u):t.type===po.SingleChoice?c(i):t.type===po.MultipleChoice&&cr(l)?l.includes(i)?c(l.filter((e=>e!==i))):c([...l,i]):void 0}),Wi("label",{htmlFor:"surveyQuestion".concat(r,"Choice").concat(n),style:{color:"black"},children:t.hasOpenChoice&&n===t.choices.length-1?Wi(Ao,{children:[Wi("span",{children:[a,":"]}),Wi("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===po.SingleChoice?c(n):t.type===po.MultipleChoice&&cr(l)?h(n):void 0}})]}):a}),Wi("span",{className:"choice-check",style:{color:"black"},children:Ki})]})}))}),Wi(Qi,{text:t.buttonText||"Submit",submitDisabled:(gr(l)||cr(l)&&!u&&0===l.length||cr(l)&&u&&!p&&0===l.length&&!t.optional)&&!t.optional,appearance:o,onSubmit:()=>{u&&t.type===po.MultipleChoice?cr(l)&&i([...l,p]):i(l)}})]})}var la=[ji,Yi,Vi],ca=[Gi,ji,Yi,Vi,zi],ua=[1,2,3,4,5],da=[1,2,3,4,5,6,7],pa=[0,1,2,3,4,5,6,7,8,9,10];function ha(e){switch(e){case 5:default:return ua;case 7:return da;case 10:return pa}}var fa=Wn,ma=Gn;class va{constructor(e){var t=this;o(this,"canShowNextEventBasedSurvey",(()=>{var e,t=ma.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(di(e))&&!ui(e))(e);if(!a){this.addSurveyToFocus(e.id);var s=((e,t,n)=>{var r=Qo.createElement("div");r.className="PostHogSurvey".concat(t);var o=r.attachShadow({mode:"open"});if(e){var i=Object.assign(Qo.createElement("style"),{innerText:e});o.appendChild(i)}return Qo.body.appendChild(r),o})(ei(null==e?void 0:e.appearance),e.id);Xo(Wi(ya,{posthog:this.posthog,survey:e,removeSurveyFromFocus:this.removeSurveyFromFocus,isPopup:!0},"popover-survey"),s)}})),o(this,"handleWidget",(e=>{var t=function(e){var t,n=mi.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(mi.createElement("style"),{innerText:i})),mi.body.appendChild(n),o}(e),n=ei(e.appearance);t.appendChild(Object.assign(ma.createElement("style"),{innerText:n})),Xo(Wi(_a,{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)&&ma.querySelector(e.appearance.widgetSelector);if(n)if(0===ma.querySelectorAll(".PostHogWidget".concat(e.id)).length)this.handleWidget(e);else if(1===ma.querySelectorAll(".PostHogWidget".concat(e.id)).length&&!n.getAttribute("PHWidgetSurveyClickListener")){var r,o,i=null===(r=ma.querySelector(".PostHogWidget".concat(e.id)))||void 0===r||null===(o=r.shadowRoot)||void 0===o?void 0:o.querySelector(".survey-form");n.addEventListener("click",(()=>{i&&(i.style.display="none"===i.style.display?"block":"none",i.addEventListener("PHSurveyClosed",(()=>{this.removeSurveyFromFocus(e.id),i.style.display="none"})))})),n.setAttribute("PHWidgetSurveyClickListener","true")}})),o(this,"canRenderSurvey",(e=>{var t={visible:!1};return e.end_date?(t.disabledReason="survey was completed on ".concat(e.end_date),t):e.type!=uo.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)=>{Xo(Wi(ya,{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(gr(t.surveyInFocus)){var n,r,o;if(e.type===uo.Widget)"tab"===(null===(n=e.appearance)||void 0===n?void 0:n.widgetType)&&0===ma.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===uo.Popover&&t.canShowNextEventBasedSurvey()&&t.handlePopoverSurvey(e)}}))}),n)})),o(this,"addSurveyToFocus",(e=>{gr(this.surveyInFocus)||Xn.error("Survey ".concat([...this.surveyInFocus]," already in focus. Cannot add survey ").concat(e,".")),this.surveyInFocus=e})),o(this,"removeSurveyFromFocus",(e=>{this.surveyInFocus!==e&&Xn.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 ga(e){if(ma&&fa){var t=new va(e);return t.callSurveysAndEvaluateDisplayLogic(!0),setInterval((()=>{t.callSurveysAndEvaluateDisplayLogic(!1)}),1e3),t}}function ya(e){var n,r,o,i,a,s,{survey:l,forceDisableHtml:c,posthog:u,style:d,previewPageIndex:p,removeSurveyFromFocus:h,isPopup:f}=e,m=Number.isInteger(p),v=null!==(n=l.appearance)&&void 0!==n&&n.surveyPopupDelaySeconds?1e3*l.appearance.surveyPopupDelaySeconds:0,{isPopupVisible:g,isSurveySent:y,setIsPopupVisible:b}=function(e,t,n,r,o){var[i,a]=Ni(r||0===n),[s,l]=Ni(!1);return Ei((()=>{if(!r&&t){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),fa.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 fa.addEventListener("PHSurveyClosed",s),fa.addEventListener("PHSurveySent",c),n>0?(i=setTimeout((()=>{u()}),n),()=>{clearTimeout(i),fa.removeEventListener("PHSurveyClosed",s),fa.removeEventListener("PHSurveySent",c)}):(u(),()=>{fa.removeEventListener("PHSurveyClosed",s),fa.removeEventListener("PHSurveySent",c)})}}),[]),{isPopupVisible:i,isSurveySent:s,setIsPopupVisible:a}}(l,u,v,m,h),_=y||p===l.questions.length,C=null!==(r=d)&&void 0!==r&&r.left&&br(null===(o=d)||void 0===o?void 0:o.left)?{left:d.left-40}:{};return m&&((d=d||{}).left="unset",d.right="unset",d.transform="unset"),g?Wi(hi.Provider,{value:{isPreviewMode:m,previewPageIndex:p,handleCloseSurveyPopup:()=>ai(l,u,m),isPopup:f||!1},children:_?Wi(ta,{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||ri,styleOverrides:t(t({},d),C),onClose:()=>b(!1)}):Wi(ba,{survey:l,forceDisableHtml:!!c,posthog:u,styleOverrides:d})}):Wi(Ao,{})}function ba(e){var n,r,{survey:o,forceDisableHtml:i,posthog:a,styleOverrides:s}=e,l=ni((null===(n=o.appearance)||void 0===n?void 0:n.backgroundColor)||ri.backgroundColor),[c,u]=Ni({}),{isPreviewMode:d,previewPageIndex:p,handleCloseSurveyPopup:h,isPopup:f}=Ri(hi),[m,v]=Ni(p||0),g=Oi((()=>ci(o)),[o]);Ei((()=>{v(null!=p?p:0)}),[p]);return Wi("form",{className:"survey-form",style:f?t({color:l,borderColor:null===(r=o.appearance)||void 0===r?void 0:r.borderColor},s):{},children:g.map(((e,n)=>{var r,{originalQuestionIndex:s}=e;return(d?m===s:m===n)&&Wi("div",{className:"survey-box",style:f?{backgroundColor:(null===(r=o.appearance)||void 0===r?void 0:r.backgroundColor)||ri.backgroundColor}:{},children:[f&&Wi(ea,{onClick:()=>h()}),Ca({question:e,forceDisableHtml:i,displayQuestionIndex:n,appearance:o.appearance||ri,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===ho.End?ii(t(t({},c),{},{[s]:n}),o,a):v(l)}else i===o.questions.length-1?ii(t(t({},c),{},{[s]:n}),o,a):v(i+1)}})({res:e,originalQuestionIndex:s,displayQuestionIndex:n})})]})}))})}function _a(e){var t,n,{survey:r,forceDisableHtml:o,posthog:i,readOnly:a,removeSurveyFromFocus:s}=e,[l,c]=Ni(!1),[u,d]=Ni({}),p=Ai(null);return Ei((()=>{var e,t;if(!a&&i){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=ma.querySelector(r.appearance.widgetSelector||"");null==u||u.addEventListener("click",(()=>{c(!l)})),null==u||u.setAttribute("PHWidgetSurveyClickListener","true")}}}),[]),Wi(Ao,{children:["tab"===(null===(t=r.appearance)||void 0===t?void 0:t.widgetType)&&Wi("div",{className:"ph-survey-widget-tab",ref:p,onClick:()=>!a&&c(!l),style:{color:ni(r.appearance.widgetColor)},children:[Wi("div",{className:"ph-survey-widget-tab-icon"}),(null===(n=r.appearance)||void 0===n?void 0:n.widgetLabel)||""]}),l&&Wi(ya,{posthog:i,survey:r,forceDisableHtml:o,style:u,removeSurveyFromFocus:s,isPopup:!0},"feedback-widget-survey")]})}var Ca=e=>{var{question:n,forceDisableHtml:r,displayQuestionIndex:o,appearance:i,onSubmit:a}=e,s={[po.Open]:ra,[po.Link]:oa,[po.Rating]:ia,[po.SingleChoice]:sa,[po.MultipleChoice]:sa},l={question:n,forceDisableHtml:r,appearance:i,onSubmit:a},c={[po.Open]:{},[po.Link]:{},[po.Rating]:{displayQuestionIndex:o},[po.SingleChoice]:{displayQuestionIndex:o},[po.MultipleChoice]:{displayQuestionIndex:o}},u=s[n.type],d=t(t({},l),c[n.type]);return Wi(u,t({},d))};function Sa(e){return!fr(Event)&&Ia(e,Event)}function Ia(e,t){try{return e instanceof t}catch(e){return!1}}function wa(e){return gr(e)||!hr(e)&&!ur(e)}function ka(e,t){return Object.prototype.toString.call(e)==="[object ".concat(t,"]")}function xa(e){return ka(e,"DOMError")}zn.__PosthogExtensions__=zn.__PosthogExtensions__||{},zn.__PosthogExtensions__.canActivateRepeatedly=ui,zn.__PosthogExtensions__.generateSurveys=ga,zn.extendPostHogWithSurveys=ga;var Ta=/\(error: (.*)\)/,Ma=50,Na="?";function Ea(e,t,n,r){var o={platform:"javascript",filename:e,function:"<anonymous>"===t?Na:t,in_app:!0};return fr(n)||(o.lineno=n),fr(r)||(o.colno=r),o}var Aa=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Oa=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Ra=/\((\S*)(?::(\d+))(?::(\d+))\)/,La=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Da=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Fa=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=Ta.test(s)?s.replace(Ta,"$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>=Ma)break}}}return function(e){if(!e.length)return[];var n=Array.from(e);return n.reverse(),n.slice(0,Ma).map((e=>t(t({},e),{},{filename:e.filename||Ba(n).filename,function:e.function||Na})))}(r)}}(...[[30,e=>{var t=Aa.exec(e);if(t){var[,n,r,o]=t;return Ea(n,Na,+r,+o)}var i=Oa.exec(e);if(i){if(i[2]&&0===i[2].indexOf("eval")){var a=Ra.exec(i[2]);a&&(i[2]=a[1],i[3]=a[2],i[4]=a[3])}var[s,l]=Pa(i[1]||Na,i[2]);return Ea(l,s,i[3]?+i[3]:void 0,i[4]?+i[4]:void 0)}}],[50,e=>{var t=La.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){var n=Da.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]||Na;return[o,r]=Pa(o,r),Ea(r,o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]);function Ba(e){return e[e.length-1]||{}}var Pa=(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]:Na,n?"safari-extension:".concat(t):"safari-web-extension:".concat(t)]:[e,t]},Ha=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;function Za(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=Fa(n,r);return o.slice(0,o.length-t)}catch(e){}return[]}var qa=/Minified React error #\d+;/i;function Wa(e,t){var n,r,o=Za(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 Va(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=Za(t.syntheticException,1);l.length&&(s.stacktrace={frames:l,type:"raw"})}return{$exception_list:[s],$exception_level:"error"}}function Ya(e){return mr(e)&&!vr(e)&&or.indexOf(e)>=0}function ja(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:Sa(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=Za(null==t?void 0:t.syntheticException,1);c.length&&(l.stacktrace={frames:c,type:"raw"})}return{$exception_list:[l],$exception_level:Ya(e.level)?e.level:"error"}}function Ga(e,n){var[r,o,i,a,s]=e,l={$exception_list:[]},c=s||r;if(xa(c)||function(e){return ka(e,"DOMException")}(c)){var u=c;if(function(e){return"stack"in e}(c))l=Wa(c,n);else{var d=u.name||(xa(u)?"DOMError":"DOMException"),p=u.message?"".concat(d,": ").concat(u.message):d,h=xa(u)?"DOMError":"DOMException";l=Va(p,t(t({},n),{},{overrideExceptionType:h,defaultExceptionMessage:p}))}return"code"in u&&(l.$exception_DOMException_code="".concat(u.code)),l}if(function(e){return ka(e,"ErrorEvent")}(c)&&c.error)return Wa(c.error,n);if(function(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object DOMError]":return!0;default:return Ia(e,Error)}}(c))return Wa(c,n);if(function(e){return ka(e,"Object")}(c)||Sa(c))return ja(c,n);if(fr(s)&&mr(r)){var f="Error",m=r,v=r.match(Ha);return v&&(f=v[1],m=v[2]),Va(m,t(t({},n),{},{overrideExceptionType:f,defaultExceptionMessage:m}))}return Va(c,n)}function za(e){var[t]=e,n=function(e){if(wa(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 wa(n)?Va("Non-Error promise rejection captured with value: ".concat(String(n)),{handled:!1,synthetic:!1,overrideExceptionType:"UnhandledRejection"}):Ga([n],{handled:!1,overrideExceptionType:"UnhandledRejection",defaultExceptionMessage:String(n)})}var Ua={wrapOnError:e=>{var t=Wn;t||Xn.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=Ga(o);return e(a),null!==(t=null==n?void 0:n(...o))&&void 0!==t&&t},t.onerror.__POSTHOG_INSTRUMENTED__=!0,()=>{var e;null===(e=t.onerror)||void 0===e||delete e.__POSTHOG_INSTRUMENTED__,t.onerror=n}},wrapUnhandledRejection:e=>{var t=Wn;t||Xn.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=za(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}}};zn.__PosthogExtensions__=zn.__PosthogExtensions__||{},zn.__PosthogExtensions__.errorWrappingFunctions=Ua,zn.__PosthogExtensions__.parseErrorAsProperties=Ga,zn.posthogErrorWrappingFunctions=Ua,zn.parseErrorAsProperties=Ga;var Xa=(e,t)=>{var{sessionId:n,windowId:r}=e.checkAndGetSessionAndWindowId(!0);t.headers.set("X-POSTHOG-SESSION-ID",n),t.headers.set("X-POSTHOG-WINDOW-ID",r)};zn.__PosthogExtensions__=zn.__PosthogExtensions__||{};var Ka={_patchFetch:e=>jr(Wn,"fetch",(t=>function(){var n=r((function*(n,r){var o=new Request(n,r);return Xa(e,o),t(o)}));return function(e,t){return n.apply(this,arguments)}}())),_patchXHR:e=>jr(Wn.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 Xa(e,s),t.call(this,n,s.url,o,i,a)}))};zn.__PosthogExtensions__.tracingHeadersPatchFns=Ka,zn.postHogTracingHeadersPatchFns=Ka;var Ja,Qa,$a,es=-1,ts=function(e){addEventListener("pageshow",(function(t){t.persisted&&(es=t.timeStamp,e(t))}),!0)},ns=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},rs=function(){var e=ns();return e&&e.activationStart||0},os=function(e,t){var n=ns(),r="navigate";return es>=0?r="back-forward-cache":n&&(document.prerendering||rs()>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}},is=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){}},as=function(e,t,n,r){var o,i;return function(a){t.value>=0&&(a||r)&&((i=t.value-(o||0))||void 0===o)&&(o=t.value,t.delta=i,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,n),e(t))}},ss=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},ls=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},cs=function(e){var t=!1;return function(){t||(e(),t=!0)}},us=-1,ds=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},ps=function(e){"hidden"===document.visibilityState&&us>-1&&(us="visibilitychange"===e.type?e.timeStamp:0,fs())},hs=function(){addEventListener("visibilitychange",ps,!0),addEventListener("prerenderingchange",ps,!0)},fs=function(){removeEventListener("visibilitychange",ps,!0),removeEventListener("prerenderingchange",ps,!0)},ms=function(){return us<0&&(us=ds(),hs(),ts((function(){setTimeout((function(){us=ds(),hs()}),0)}))),{get firstHiddenTime(){return us}}},vs=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},gs=[1800,3e3],ys=function(e,t){t=t||{},vs((function(){var n,r=ms(),o=os("FCP"),i=is("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(i.disconnect(),e.startTime<r.firstHiddenTime&&(o.value=Math.max(e.startTime-rs(),0),o.entries.push(e),n(!0)))}))}));i&&(n=as(e,o,gs,t.reportAllChanges),ts((function(r){o=os("FCP"),n=as(e,o,gs,t.reportAllChanges),ss((function(){o.value=performance.now()-r.timeStamp,n(!0)}))})))}))},bs=[.1,.25],_s=[2500,4e3],Cs={},Ss=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},Is=function(e){if("loading"===document.readyState)return"loading";var t=Ss();if(t){if(e<t.domInteractive)return"loading";if(0===t.domContentLoadedEventStart||e<t.domContentLoadedEventStart)return"dom-interactive";if(0===t.domComplete||e<t.domComplete)return"dom-content-loaded"}return"complete"},ws=function(e){var t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},ks=function(e,t){var n="";try{for(;e&&9!==e.nodeType;){var r=e,o=r.id?"#"+r.id:ws(r)+(r.classList&&r.classList.value&&r.classList.value.trim()&&r.classList.value.trim().length?"."+r.classList.value.trim().replace(/\s+/g,"."):"");if(n.length+o.length>(t||100)-1)return n||o;if(n=n?o+">"+n:o,r.id)break;e=r.parentNode}}catch(e){}return n},xs=-1,Ts=function(e,t){var n=Ss(),r="navigate";return xs>=0?r="back-forward-cache":n&&(document.prerendering||function(){var e=Ss();return e&&e.activationStart||0}()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:-1,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},Ms=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){}},Ns=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))}},Es=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},As=0,Os=1/0,Rs=0,Ls=function(e){e.forEach((function(e){e.interactionId&&(Os=Math.min(Os,e.interactionId),Rs=Math.max(Rs,e.interactionId),As=Rs?(Rs-Os)/7+1:0)}))},Ds=function(){"interactionCount"in performance||Ja||(Ja=Ms("event",Ls,{type:"event",buffered:!0,durationThreshold:0}))},Fs=[],Bs=new Map,Ps=0,Hs=function(){return(Ja?As:performance.interactionCount||0)-Ps},Zs=[],qs=function(e){if(Zs.forEach((function(t){return t(e)})),e.interactionId||"first-input"===e.entryType){var t=Fs[Fs.length-1],n=Bs.get(e.interactionId);if(n||Fs.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]};Bs.set(r.id,r),Fs.push(r)}Fs.sort((function(e,t){return t.latency-e.latency})),Fs.length>10&&Fs.splice(10).forEach((function(e){return Bs.delete(e.id)}))}}},Ws=function(e){var t=self.requestIdleCallback||self.setTimeout,n=-1;return e=function(e){var t=!1;return function(){t||(e(),t=!0)}}(e),"hidden"===document.visibilityState?e():(n=t(e),Es(e)),n},Vs=[200,500],Ys=function(e,t){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(t=t||{},function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()}((function(){var n;Ds();var r,o=Ts("INP"),i=function(e){Ws((function(){e.forEach(qs);var t,n=(t=Math.min(Fs.length-1,Math.floor(Hs()/50)),Fs[t]);n&&n.latency!==o.value&&(o.value=n.latency,o.entries=n.entries,r())}))},a=Ms("event",i,{durationThreshold:null!==(n=t.durationThreshold)&&void 0!==n?n:40});r=Ns(e,o,Vs,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),Es((function(){i(a.takeRecords()),r(!0)})),function(e){addEventListener("pageshow",(function(t){t.persisted&&(xs=t.timeStamp,e(t))}),!0)}((function(){Ps=0,Fs.length=0,Bs.clear(),o=Ts("INP"),r=Ns(e,o,Vs,t.reportAllChanges)})))})))},js=[],Gs=[],zs=new WeakMap,Us=new Map,Xs=-1,Ks=function(e){js=js.concat(e),Js()},Js=function(){Xs<0&&(Xs=Ws(Qs))},Qs=function(){Us.size>10&&Us.forEach((function(e,t){Bs.has(t)||Us.delete(t)}));var e=Fs.map((function(e){return zs.get(e.entries[0])})),t=Gs.length-50;Gs=Gs.filter((function(n,r){return r>=t||e.includes(n)}));for(var n=new Set,r=0;r<Gs.length;r++){var o=Gs[r];$s(o.startTime,o.processingEnd).forEach((function(e){n.add(e)}))}for(var i=0;i<50;i++){var a=js[js.length-1-i];if(!a||a.startTime<$a)break;n.add(a)}js=Array.from(n),Xs=-1};Zs.push((function(e){e.interactionId&&e.target&&!Us.has(e.interactionId)&&Us.set(e.interactionId,e.target)}),(function(e){var t,n=e.startTime+e.duration;$a=Math.max($a,e.processingEnd);for(var r=Gs.length-1;r>=0;r--){var o=Gs[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]},Gs.push(t)),(e.interactionId||"first-input"===e.entryType)&&zs.set(e,t),Js()}));var $s=function(e,t){for(var n,r=[],o=0;n=js[o];o++)if(!(n.startTime+n.duration<e)){if(n.startTime>t)break;r.push(n)}return r},el={onLCP:function(e,t){t=t||{},vs((function(){var n,r=ms(),o=os("LCP"),i=function(e){t.reportAllChanges||(e=e.slice(-1)),e.forEach((function(e){e.startTime<r.firstHiddenTime&&(o.value=Math.max(e.startTime-rs(),0),o.entries=[e],n())}))},a=is("largest-contentful-paint",i);if(a){n=as(e,o,_s,t.reportAllChanges);var s=cs((function(){Cs[o.id]||(i(a.takeRecords()),a.disconnect(),Cs[o.id]=!0,n(!0))}));["keydown","click"].forEach((function(e){addEventListener(e,(function(){return function(e){var t=self.requestIdleCallback||self.setTimeout,n=-1;return e=cs(e),"hidden"===document.visibilityState?e():(n=t(e),ls(e)),n}(s)}),!0)})),ls(s),ts((function(r){o=os("LCP"),n=as(e,o,_s,t.reportAllChanges),ss((function(){o.value=performance.now()-r.timeStamp,Cs[o.id]=!0,n(!0)}))}))}}))},onCLS:function(e,t){t=t||{},ys(cs((function(){var n,r=os("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=is("layout-shift",a);s&&(n=as(e,r,bs,t.reportAllChanges),ls((function(){a(s.takeRecords()),n(!0)})),ts((function(){o=0,r=os("CLS",0),n=as(e,r,bs,t.reportAllChanges),ss((function(){return n()}))})),setTimeout(n,0))})))},onFCP:ys,onINP:function(e,t){Qa||(Qa=Ms("long-animation-frame",Ks)),Ys((function(t){var n=function(e){var t=e.entries[0],n=zs.get(t),r=t.processingStart,o=n.processingEnd,i=n.entries.sort((function(e,t){return e.processingStart-t.processingStart})),a=$s(t.startTime,o),s=e.entries.find((function(e){return e.target})),l=s&&s.target||Us.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:ks(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:Is(t.startTime)};return Object.assign(e,{attribution:d})}(t);e(n)}),t)}};function tl(e,t){return t.length>e?t.slice(0,e)+"...":t}function nl(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do{t=t.previousSibling}while(t&&!wr(t));return t}function rl(e,t,n,r){var o=e.tagName.toLowerCase(),i={tag_name:o};Nr.indexOf(o)>-1&&!n&&("a"===o.toLowerCase()||"button"===o.toLowerCase()?i.$el_text=tl(1024,Hr(e)):i.$el_text=tl(1024,Mr(e)));var a=Tr(e);a.length>0&&(i.classes=a.filter((function(e){return""!==e}))),$n(e.attributes,(function(n){var o;if((!Ar(e)||-1!==["name","id","class","aria-label"].indexOf(n.name))&&((null==r||!r.includes(n.name))&&!t&&Pr(n.value)&&(o=n.name,!mr(o)||"_ngcontent"!==o.substring(0,10)&&"_nghost"!==o.substring(0,7)))){var a=n.value;"class"===n.name&&(a=xr(a).join(" ")),i["attr__"+n.name]=tl(1024,a)}}));for(var s=1,l=1,c=e;c=nl(c);)s++,c.tagName===e.tagName&&l++;return i.nth_child=s,i.nth_of_type=l,i}function ol(e,t){for(var n,r,o,{e:i,maskAllElementAttributes:a,maskAllText:s,elementAttributeIgnoreList:l,elementsChainAsString:c}=t,u=[e],d=e;d.parentNode&&!kr(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($n(u,(e=>{var t=Er(e);"a"===e.tagName.toLowerCase()&&(g=e.getAttribute("href"),g=t&&g&&Pr(g)&&g),nr(Tr(e),"ph-no-capture")&&(y=!0),m.push(rl(e,a,s,l));var n=function(e){if(!Er(e))return{};var t={};return $n(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&&Pr(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=Hr(e):m[0].$el_text=Mr(e)),g){var b,_;m[0].attr__href=g;var C=null===(h=g,f=null==Gn?void 0:Gn.createElement("a"),b=fr(f)?null:(f.href=h,f))||void 0===b?void 0:b.host,S=null==Wn||null===(_=Wn.location)||void 0===_?void 0:_.host;C&&S&&C!==S&&(p=g)}return{props:tr({$event_type:i.type,$ce_version:1},c?{$elements_chain:qr(m)}:{$elements: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)}}zn.__PosthogExtensions__=zn.__PosthogExtensions__||{},zn.__PosthogExtensions__.postHogWebVitalsCallbacks=el,zn.postHogWebVitalsCallbacks=el;var il={};function al(e){return function(e,t){var n=il[e];if(n)return n;var r=t[e];if(dr(r)&&!pr(r))return il[e]=r.bind(t);var o=t.document;if(o&&ur(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){Xn.warn("Could not create sandbox iframe for ".concat(e," check, bailing to assignableWindow.").concat(e,": "),t)}return r&&ur(r)?il[e]=r.bind(t):r}("MutationObserver",e)}function sl(e){var t=function(e){return fr(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 ll(e,t){return br(e)&&e>=t}class cl{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=sl(e);gr(t)||this._ignoreClick(t)||this._clicks.push(t),this._clicks.length&&fr(this._checkClickTimer)&&(this._checkClickTimer=zn.setTimeout((()=>{this._checkClicks()}),1e3))})),o(this,"_onScroll",(()=>{var e=Date.now();e%50==0&&this._clicks.forEach((t=>{fr(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=al(zn);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,zn.removeEventListener("click",this._onClick),zn.removeEventListener("scroll",this._onScroll,!0),zn.removeEventListener("selectionchange",this._onSelectionChange)}onMutation(e){this._lastMutation=Date.now()}_startClickObserver(){zn.addEventListener("click",this._onClick)}_startScrollObserver(){zn.addEventListener("scroll",this._onScroll,!0)}_startSelectionChangedObserver(){zn.addEventListener("selectionchange",this._onSelectionChange)}_ignoreClick(e){if(!e)return!0;if("__POSTHOG_TOOLBAR__"===(t=e.node).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||!(!kr(e.node,"html")&&wr(e.node)&&!Nr.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=ll(t.scrollDelayMs,this._config.scroll_threshold_ms),o=ll(t.selectionChangedDelayMs,this._config.selection_change_threshold_ms),i=ll(t.mutationDelayMs,this._config.mutation_threshold_ms),a=ll(t.absoluteDelayMs,1.1*this._config.mutation_threshold_ms),s=br(t.scrollDelayMs)&&t.scrollDelayMs<this._config.scroll_threshold_ms,l=br(t.mutationDelayMs)&&t.mutationDelayMs<this._config.mutation_threshold_ms,c=br(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&&fr(this._checkClickTimer)&&(this._checkClickTimer=zn.setTimeout((()=>{this._checkClicks()}),1e3))}}_captureDeadClick(e,n){this.instance.capture("$dead_click",t(t(t({},n),ol(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)})}}zn.__PosthogExtensions__=zn.__PosthogExtensions__||{},zn.__PosthogExtensions__.initDeadClicksAutocapture=(e,t)=>new cl(e,t)}();
|
|
2
2
|
//# sourceMappingURL=all-external-dependencies.js.map
|