posthog-js 1.376.2 → 1.376.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/all-external-dependencies.js +1 -1
- package/dist/all-external-dependencies.js.map +1 -1
- package/dist/array.full.es5.js +1 -1
- package/dist/array.full.js +1 -1
- package/dist/array.full.js.map +1 -1
- package/dist/array.full.no-external.js +1 -1
- package/dist/array.full.no-external.js.map +1 -1
- package/dist/array.js +1 -1
- package/dist/array.no-external.js +1 -1
- package/dist/customizations.full.js +1 -1
- package/dist/dead-clicks-autocapture.js +1 -1
- package/dist/default-extensions.js +1 -1
- package/dist/extension-bundles.js +1 -1
- package/dist/lazy-recorder.js +1 -1
- package/dist/logs.js +1 -1
- package/dist/logs.js.map +1 -1
- package/dist/main.js +1 -1
- package/dist/module.full.js +1 -1
- package/dist/module.full.js.map +1 -1
- package/dist/module.full.no-external.js +1 -1
- package/dist/module.full.no-external.js.map +1 -1
- package/dist/module.js +1 -1
- package/dist/module.no-external.js +1 -1
- package/dist/module.slim.js +1 -1
- package/dist/module.slim.no-external.js +1 -1
- package/dist/posthog-recorder.js +1 -1
- package/dist/surveys.js +1 -1
- package/lib/package.json +1 -1
- package/lib/src/entrypoints/logs.js +185 -63
- package/lib/src/entrypoints/logs.js.map +1 -1
- package/package.json +6 -6
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(){"use strict";function e(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function t(t){return function(){var r=this,n=arguments;return new Promise((function(i,o){var a=t.apply(r,n);function s(t){e(a,i,o,s,u,"next",t)}function u(t){e(a,i,o,s,u,"throw",t)}s(void 0)}))}}function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;arguments.length>t;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},r.apply(null,arguments)}var n,i=["type"],o=Object.defineProperty,a=(e,t,r)=>((e,t,r)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),s=(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))(s||{}),u=(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))(u||{}),l=(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))(l||{}),c=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(c||{}),d=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(d||{}),h=(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))(h||{}),v=(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))(v||{}),f={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},p={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},m={};function y(e){if(m[e])return m[e];var t=function(e){var t,r,n=null==(r=null==(t=null==globalThis?void 0:globalThis.Zone)?void 0:t.__symbol__)?void 0:r.call(t,e);return n&&globalThis[n]?globalThis[n]:void 0}(e)||globalThis[e],r=t.prototype,n=e in f?f[e]:void 0,i=Boolean(n&&n.every((e=>{var t,n;return Boolean(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))}))),o=e in p?p[e]:void 0,a=Boolean(o&&o.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(i&&a)return m[e]=t.prototype,t.prototype;var s=document.createElement("iframe");try{document.body.appendChild(s);var u=s.contentWindow;if(!u)return t.prototype;var l=u[e].prototype;return l?m[e]=l:r}catch(e){return r}finally{s.parentNode&&document.body.removeChild(s)}}var g={};function b(e,t,r){var n,i=e+"."+String(r);if(g[i])return g[i].call(t);var o=y(e),a=null==(n=Object.getOwnPropertyDescriptor(o,r))?void 0:n.get;return a?(g[i]=a,a.call(t)):t[r]}var w={};function k(e,t,r){var n=e+"."+String(r);if(w[n])return w[n].bind(t);var i=y(e)[r];return"function"!=typeof i?t[r]:(w[n]=i,i.bind(t))}function x(){return y("MutationObserver").constructor}function S(e,t,r){try{if(!(t in e))return()=>{};var n=e[t],i=r(n);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=i,()=>{e[t]=n}}catch(e){return()=>{}}}var C={childNodes:e=>b("Node",e,"childNodes"),parentNode:e=>b("Node",e,"parentNode"),parentElement:e=>b("Node",e,"parentElement"),textContent:e=>b("Node",e,"textContent"),contains:(e,t)=>k("Node",e,"contains")(t),getRootNode:e=>k("Node",e,"getRootNode")(),host:e=>e&&"host"in e?b("ShadowRoot",e,"host"):null,styleSheets:e=>e.styleSheets,shadowRoot:e=>e&&"shadowRoot"in e?b("Element",e,"shadowRoot"):null,querySelector:(e,t)=>k("Element",e,"querySelector")(t),querySelectorAll:(e,t)=>k("Element",e,"querySelectorAll")(t),mutationObserver:x,patch:S};function I(e){return e.nodeType===e.ELEMENT_NODE}function T(e){var t=e&&"host"in e&&"mode"in e&&C.host(e)||null;return Boolean(t&&"shadowRoot"in t&&C.shadowRoot(t)===e)}function M(e){return"[object ShadowRoot]"==={}.toString.call(e)}function _(e){try{var t=e.rules||e.cssRules;if(!t)return null;var r=e.href;return!r&&e.ownerNode&&(r=e.ownerNode.baseURI),(n=Array.from(t,(e=>L(e,r))).join("")).includes(" background-clip: text;")&&!n.includes(" -webkit-background-clip: text;")&&(n=n.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),n}catch(e){return null}var n}function L(e,t){var r;if(function(e){return"styleSheet"in e}(e)){var n;try{n=_(e.styleSheet)||function(e){var{cssText:t}=e;if(3>t.split('"').length)return t;var r=["@import","url("+JSON.stringify(e.href)+")"];return""===e.layerName?r.push("layer"):e.layerName&&r.push("layer("+e.layerName+")"),e.supportsText&&r.push("supports("+e.supportsText+")"),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}(e)}catch(t){n=e.cssText}try{if(n&&(null==(r=e.styleSheet)?void 0:r.href))return j(n,e.styleSheet.href)}catch(e){}return n}var i=e.cssText;return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(i=i.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),t?j(i,t):i}class E{constructor(){a(this,"idNodeMap",new Map),a(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;var r=null==(t=this.getMeta(e))?void 0:t.id;return null!=r?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){var t=this.getId(e);if(this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach((e=>this.removeNodeFromMap(e))),I(e)){var r=C.shadowRoot(e);r&&this.removeNodeFromMap(r),"IFRAME"===e.nodeName&&e.contentDocument&&this.removeNodeFromMap(e.contentDocument)}}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){this.idNodeMap.set(t.id,e),this.nodeMetaMap.set(e,t)}replace(e,t){var r=this.getNode(e);if(r){var n=this.nodeMetaMap.get(r);n&&this.nodeMetaMap.set(t,n)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function O(e){var{element:t,maskInputOptions:r,tagName:n,type:i,value:o,maskInputFn:a}=e,s=o||"",u=i&&R(i);return(r[n.toLowerCase()]||u&&r[u])&&(s=a?a(s,t):"*".repeat(s.length)),s}function R(e){return e.toLowerCase()}var N="__rrweb_original__";function A(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?R(t):null}var P=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,q=/^(?:[a-z+]+:)?\/\//i,D=/^www\..*/i,F=/^(data:)([^,]*),(.*)/i;function j(e,t){return(e||"").replace(P,((e,r,n,i,o,a)=>{var s,u=n||o||a,l=r||i||"";if(!u)return e;if(q.test(u)||D.test(u))return"url("+l+u+l+")";if(F.test(u))return"url("+l+u+l+")";if("/"===u[0])return"url("+l+(((s=t).indexOf("//")>-1?s.split("/").slice(0,3).join("/"):s.split("/")[0]).split("?")[0]+u)+l+")";var c=t.split("/"),d=u.split("/");for(var h of(c.pop(),d))"."!==h&&(".."===h?c.pop():c.push(h));return"url("+l+c.join("/")+l+")"}))}var H,U,B="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==",V=4096,W=1,z=new RegExp("[^a-z0-9-_:]"),Z=-2;function Q(){return W++}var G=/^[^ \t\n\r\u000c]+/,X=/^[, \t\n\r\u000c]+/,Y=new WeakMap;function J(e,t){return t&&""!==t.trim()?K(e,t):t}function K(e,t){var r=Y.get(e);if(r||(r=e.createElement("a"),Y.set(e,r)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return r.setAttribute("href",t),r.href}function ee(e,t,r,n,i,o){var a,s,u;if(!n)return n;if("src"===r||"href"===r&&("use"!==t||"#"!==n[0])){if("link"===t&&i){var l=null==(a=i.sheet)?void 0:a.href;if(l)return l}var c=J(e,n);if("img"===t&&c.startsWith("data:")&&i){var d=c;return((null==o?void 0:o.type)||void 0!==(null==o?void 0:o.quality))&&(d=function(e,t,r,n){if(!e.complete||0===e.naturalWidth)return t;if(e.naturalWidth>V||e.naturalHeight>V)return t;try{var i=document.createElement("canvas");i.width=e.naturalWidth,i.height=e.naturalHeight;var o=i.getContext("2d");return o?(o.drawImage(e,0,0),i.toDataURL(r||"image/webp",null!=n?n:.4)):t}catch(e){return t}}(i,c,o.type,o.quality)),(null==o?void 0:o.maxBase64ImageLength)&&(s=d,d=(u=o.maxBase64ImageLength)&&s.length>u?B:s),d}return c}return"xlink:href"===r&&"#"!==n[0]?J(e,n):"background"!==r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===r?function(e,t){if(""===t.trim())return t;var r=0;function n(e){var n,i=e.exec(t.substring(r));return i?(r+=(n=i[0]).length,n):""}for(var i=[];n(X),t.length>r;){var o=n(G);if(","===o.slice(-1))o=J(e,o.substring(0,o.length-1)),i.push(o);else{var a="";o=J(e,o);for(var s=!1;;){var u=t.charAt(r);if(""===u){i.push((o+a).trim());break}if(s)")"===u&&(s=!1);else{if(","===u){r+=1,i.push((o+a).trim());break}"("===u&&(s=!0)}a+=u,r+=1}}}return i.join(", ")}(e,n):"style"===r?j(n,K(e)):"object"===t&&"data"===r?J(e,n):n:J(e,n)}function te(e,t,r){return("video"===e||"audio"===e)&&"autoplay"===t}function re(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&re(C.parentNode(e),t,r);for(var n=e.classList.length;n--;)if(t.test(e.classList[n]))return!0;return!!r&&re(C.parentNode(e),t,r)}function ne(e,t,r,n){var i;if(I(e)){if(!C.childNodes(i=e).length)return!1}else{if(null===C.parentElement(e))return!1;i=C.parentElement(e)}try{if("string"==typeof t){if(n){if(i.closest("."+t))return!0}else if(i.classList.contains(t))return!0}else if(re(i,t,n))return!0;if(r)if(n){if(i.closest(r))return!0}else if(i.matches(r))return!0}catch(e){}return!1}var ie=new Map;function oe(e,t){return Array.from(e.styleSheets).find((e=>e.href===t))}function ae(e){return null==e?"":e.toLowerCase()}var se=50,ue=!1,le=!1;function ce(e,t){var{doc:r,mirror:n,blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:s,skipChild:u=!1,inlineStylesheet:l=!0,maskInputOptions:c={},maskTextFn:d,maskInputFn:h,slimDOMOptions:f,dataURLOptions:p={},inlineImages:m=!1,recordCanvas:y=!1,onSerialize:g,onIframeLoad:b,iframeLoadTimeout:w=5e3,onStylesheetLoad:k,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:S=(()=>!1),newlyAddedElement:L=!1,depth:E=0,maxDepth:P=se}=t,{needsMask:q}=t,{preserveWhiteSpace:D=!0}=t;if(E>=P)return le=!0,ue||(ue=!0,console.warn("[rrweb-snapshot] DOM tree depth exceeded max depth of "+P+". Children beyond this depth will not be recorded. This may indicate deeply nested DOM structures.")),null;q||(q=ne(e,a,s,void 0===q));var F,B=function(e,t){var{doc:r,mirror:n,blockClass:i,blockSelector:o,needsMask:a,inlineStylesheet:s,maskInputOptions:u={},maskTextFn:l,maskInputFn:c,dataURLOptions:d={},inlineImages:h,recordCanvas:f,keepIframeSrcFn:p,newlyAddedElement:m=!1}=t,y=function(e,t){if(t.hasNode(e)){var r=t.getId(e);return 1===r?void 0:r}}(r,n);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:v.Document,childNodes:[],compatMode:e.compatMode}:{type:v.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:v.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:y};case e.ELEMENT_NODE:return function(e,t){for(var r,n,i,{doc:o,blockClass:a,blockSelector:s,inlineStylesheet:u,maskInputOptions:l={},maskInputFn:c,dataURLOptions:d={},inlineImages:h,recordCanvas:f,keepIframeSrcFn:p,newlyAddedElement:m=!1,rootId:y}=t,g=function(e,t,r){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var n=e.classList.length;n--;)if(t.test(e.classList[n]))return!0;if(r)return e.matches(r)}catch(e){}return!1}(e,a,s),b=function(e){if(e instanceof HTMLFormElement)return"form";var t=R(e.tagName);return z.test(t)?"div":t}(e),w={},k=e.attributes.length,x=0;k>x;x++){var S=e.attributes[x];te(b,S.name)||(w[S.name]=ee(o,b,R(S.name),S.value,e,d))}if("link"===b&&u){var I=e.sheet;if(!I){var T=function(e){return e.href}(e);T&&!(I=oe(o,T))&&T.includes(".css")&&(I=oe(o,window.location.origin+"/"+T.replace(window.location.href,"")))}var M=null;I&&(M=_(I)),M&&(delete w.rel,delete w.href,w._cssText=M)}if("style"===b&&e.sheet&&!(e.innerText||C.textContent(e)||"").trim().length){var L=_(e.sheet);L&&(w._cssText=L)}if("input"===b||"textarea"===b||"select"===b){var E=e.value,P=e.checked;"radio"!==w.type&&"checkbox"!==w.type&&"submit"!==w.type&&"button"!==w.type&&E?w.value=O({element:e,type:A(e),tagName:b,value:E,maskInputOptions:l,maskInputFn:c}):P&&(w.checked=P)}if("option"===b&&(e.selected&&!l.select?w.selected=!0:delete w.selected),"dialog"===b&&e.open)try{w.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"}catch(e){w.rr_open_mode="modal",w.ph_rr_could_not_detect_modal=!0}if("canvas"===b&&f)if("2d"===e.__context)(function(e){var t=e.getContext("2d");if(!t)return!0;for(var r=0;e.width>r;r+=50)for(var n=0;e.height>n;n+=50){var i=t.getImageData;if(new Uint32Array((N in i?i[N]:i).call(t,r,n,Math.min(50,e.width-r),Math.min(50,e.height-n)).data.buffer).some((e=>0!==e)))return!1}return!0})(e)||(w.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){var q=e.toDataURL(d.type,d.quality),D=o.createElement("canvas");D.width=e.width,D.height=e.height,q!==D.toDataURL(d.type,d.quality)&&(w.rr_dataURL=q)}if("img"===b&&h){H||(H=o.createElement("canvas"),U=H.getContext("2d"));var F=e,j=F.currentSrc||F.getAttribute("src")||"<unknown-src>",B=F.crossOrigin,V=()=>{F.removeEventListener("load",V);try{H.width=F.naturalWidth,H.height=F.naturalHeight,U.drawImage(F,0,0),w.rr_dataURL=H.toDataURL(d.type,d.quality)}catch(e){if("anonymous"!==F.crossOrigin)return F.crossOrigin="anonymous",void(F.complete&&0!==F.naturalWidth?V():F.addEventListener("load",V));console.warn("Cannot inline img src="+j+"! Error: "+e)}"anonymous"===F.crossOrigin&&(B?w.crossOrigin=B:F.removeAttribute("crossorigin"))};F.complete&&0!==F.naturalWidth?V():F.addEventListener("load",V)}if("audio"===b||"video"===b){var W=w;W.rr_mediaState=e.paused?"paused":"played",W.rr_mediaCurrentTime=e.currentTime,W.rr_mediaPlaybackRate=e.playbackRate,W.rr_mediaMuted=e.muted,W.rr_mediaLoop=e.loop,W.rr_mediaVolume=e.volume}if(m||(e.scrollLeft&&(w.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(w.rr_scrollTop=e.scrollTop)),g){var{width:Z,height:Q,left:G,top:X}=e.getBoundingClientRect();w={class:w.class,rr_width:Z+"px",rr_height:Q+"px",rr_left:Math.floor(G+((null==(r=o.defaultView)?void 0:r.scrollX)||0))+"px",rr_top:Math.floor(X+((null==(n=o.defaultView)?void 0:n.scrollY)||0))+"px"}}"iframe"!==b||p(w.src)||(e.contentDocument||(w.rr_src=w.src),delete w.src);try{customElements.get(b)&&(i=!0)}catch(e){}return{type:v.Element,tagName:b,attributes:w,childNodes:[],isSVG:(Y=e,Boolean("svg"===Y.tagName||Y.ownerSVGElement)||void 0),needBlock:g,rootId:y,isCustom:i};var Y}(e,{doc:r,blockClass:i,blockSelector:o,inlineStylesheet:s,maskInputOptions:u,maskInputFn:c,dataURLOptions:d,inlineImages:h,recordCanvas:f,keepIframeSrcFn:p,newlyAddedElement:m,rootId:y});case e.TEXT_NODE:return function(e,t){var r,{needsMask:n,maskTextFn:i,rootId:o}=t,a=C.parentNode(e),s=a&&a.tagName,u=C.textContent(e),l="STYLE"===s||void 0,c="SCRIPT"===s||void 0;if(l&&u){try{if(e.nextSibling||e.previousSibling);else if(null==(r=a.sheet)?void 0:r.cssRules){var d=_(a.sheet);d&&!/(?:^|[\s;{}])-?[a-zA-Z][\w-]*\s*:\s*;/.test(d)&&(u=d)}}catch(t){console.warn("Cannot get CSS styles from text's parentNode. Error: "+t,e)}u=j(u,K(t.doc))}return c&&(u="SCRIPT_PLACEHOLDER"),!l&&!c&&u&&n&&(u=i?i(u,C.parentElement(e)):u.replace(/[\S]/g,"*")),{type:v.Text,textContent:u||"",isStyle:l,rootId:o}}(e,{doc:r,needsMask:a,maskTextFn:l,rootId:y});case e.CDATA_SECTION_NODE:return{type:v.CDATA,textContent:"",rootId:y};case e.COMMENT_NODE:return{type:v.Comment,textContent:C.textContent(e)||"",rootId:y};default:return!1}}(e,{doc:r,mirror:n,blockClass:i,blockSelector:o,needsMask:q,inlineStylesheet:l,maskInputOptions:c,maskTextFn:d,maskInputFn:h,dataURLOptions:p,inlineImages:m,recordCanvas:y,keepIframeSrcFn:S,newlyAddedElement:L});if(!B)return console.warn(e,"not serialized"),null;F=n.hasNode(e)?n.getId(e):function(e,t){if(t.comment&&e.type===v.Comment)return!0;if(e.type===v.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel&&"script"===e.attributes.as||"modulepreload"===e.attributes.rel)||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===function(e,t){var r,n;try{n=new URL(e,window.location.href)}catch(e){return null}var i=n.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(r=null==i?void 0:i[1])&&void 0!==r?r:null}(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(ae(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===ae(e.attributes.name)||["icon","apple-touch-icon","shortcut icon"].includes(ae(e.attributes.rel)))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&ae(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(ae(e.attributes.property).match(/^(og|twitter|fb):/)||ae(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===ae(e.attributes.name)))return!0;if(t.headMetaRobots&&["robots","googlebot","bingbot"].includes(ae(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&(["author","generator","framework","publisher","progid"].includes(ae(e.attributes.name))||ae(e.attributes.property).match(/^article:/)||ae(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&["google-site-verification","yandex-verification","csrf-token","p:domain_verify","verify-v1","verification","shopify-checkout-api-token"].includes(ae(e.attributes.name)))return!0}}return!1}(B,f)||!D&&B.type===v.Text&&!B.isStyle&&!B.textContent.replace(/^\s+|\s+$/gm,"").length?Z:Q();var V=Object.assign(B,{id:F});if(n.add(e,V),F===Z)return null;g&&g(e);var W=!u;if(V.type===v.Element){W=W&&!V.needBlock,delete V.needBlock;var G=C.shadowRoot(e);G&&M(G)&&(V.isShadowHost=!0)}if((V.type===v.Document||V.type===v.Element)&&W){f.headWhitespace&&V.type===v.Element&&"head"===V.tagName&&(D=!1);var X={doc:r,mirror:n,blockClass:i,blockSelector:o,needsMask:q,maskTextClass:a,maskTextSelector:s,skipChild:u,inlineStylesheet:l,maskInputOptions:c,maskTextFn:d,maskInputFn:h,slimDOMOptions:f,dataURLOptions:p,inlineImages:m,recordCanvas:y,preserveWhiteSpace:D,onSerialize:g,onIframeLoad:b,iframeLoadTimeout:w,onStylesheetLoad:k,stylesheetLoadTimeout:x,keepIframeSrcFn:S,depth:E+1,maxDepth:P};if(V.type===v.Element&&"textarea"===V.tagName&&void 0!==V.attributes.value);else for(var Y of Array.from(C.childNodes(e))){var J=ce(Y,X);J&&V.childNodes.push(J)}var re=null;if(I(e)&&(re=C.shadowRoot(e)))for(var de of Array.from(C.childNodes(re))){var he=ce(de,X);he&&(M(re)&&(he.isShadow=!0),V.childNodes.push(he))}}var ve=C.parentNode(e);return ve&&T(ve)&&M(ve)&&(V.isShadow=!0),V.type===v.Element&&"iframe"===V.tagName&&function(e,t,r){var n=e.contentWindow;if(n){var i,o=!1;try{i=n.document.readyState}catch(e){return}if("complete"===i){var a="about:blank";if(n.location.href!==a||e.src===a||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}else{var s=setTimeout((()=>{o||(t(),o=!0)}),r);e.addEventListener("load",(()=>{clearTimeout(s),o=!0,t()}))}}}(e,(()=>{var t=e.contentDocument;if(t&&b){var r=ce(t,{doc:t,mirror:n,blockClass:i,blockSelector:o,needsMask:q,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:l,maskInputOptions:c,maskTextFn:d,maskInputFn:h,slimDOMOptions:f,dataURLOptions:p,inlineImages:m,recordCanvas:y,preserveWhiteSpace:D,onSerialize:g,onIframeLoad:b,iframeLoadTimeout:w,onStylesheetLoad:k,stylesheetLoadTimeout:x,keepIframeSrcFn:S,depth:E+1,maxDepth:P});r&&b(e,r)}}),w),V.type===v.Element&&"link"===V.tagName&&"stylesheet"===V.attributes.rel&&function(t,u,v){if(!ie.has(t)){var C;try{C=t.sheet}catch(e){return}if(!C){var I=new AbortController,T=!1,M=()=>{if(!T){T=!0;try{(()=>{if(k){var t=ce(e,{doc:r,mirror:n,blockClass:i,blockSelector:o,needsMask:q,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:l,maskInputOptions:c,maskTextFn:d,maskInputFn:h,slimDOMOptions:f,dataURLOptions:p,inlineImages:m,recordCanvas:y,preserveWhiteSpace:D,onSerialize:g,onIframeLoad:b,iframeLoadTimeout:w,onStylesheetLoad:k,stylesheetLoadTimeout:x,keepIframeSrcFn:S,depth:E,maxDepth:P});t&&k(e,t)}})()}finally{ie.delete(t),I.abort()}}},_=setTimeout(M,v);I.signal.addEventListener("abort",(()=>clearTimeout(_)),{once:!0}),t.addEventListener("load",M,{signal:I.signal,once:!0}),ie.set(t,I)}}}(e,0,x),V}function de(e){return!0===e||"all"===e?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===e,headMetaDescKeywords:"all"===e,headTitleMutations:"all"===e}:!1===e?{}:e}class he{constructor(){a(this,"parentElement",null),a(this,"parentNode",null),a(this,"ownerDocument"),a(this,"firstChild",null),a(this,"lastChild",null),a(this,"previousSibling",null),a(this,"nextSibling",null),a(this,"ELEMENT_NODE",1),a(this,"TEXT_NODE",3),a(this,"nodeType"),a(this,"nodeName"),a(this,"RRNodeType")}get childNodes(){for(var e=[],t=this.firstChild;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(!(e instanceof he))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"}}function ve(e,t,r){void 0===r&&(r=document);var n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}function fe(e){try{e()}catch(e){if(!(e instanceof DOMException&&"SecurityError"===e.name))throw e}}var pe="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.",me={map:{},getId(){return console.error(pe),-1},getNode(){return console.error(pe),null},removeNodeFromMap(){console.error(pe)},has(){return console.error(pe),!1},reset(){console.error(pe)}};function ye(e,t,r){void 0===r&&(r={});var n=null,i=0;return function(){for(var o=arguments.length,a=new Array(o),s=0;o>s;s++)a[s]=arguments[s];var u=Date.now();i||!1!==r.leading||(i=u);var l=t-(u-i),c=this;0>=l||l>t?(n&&(clearTimeout(n),n=null),i=u,e.apply(c,a)):n||!1===r.trailing||(n=setTimeout((()=>{i=!1===r.leading?0:Date.now(),n=null,e.apply(c,a)}),l))}}function ge(e,t,r,n,i){void 0===i&&(i=window);var o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,n?r:{set(e){setTimeout((()=>{r.set.call(this,e)}),0),o&&o.set&&o.set.call(this,e)}}),()=>ge(e,t,o||{},!0)}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(me=new Proxy(me,{get(e,t,r){return"map"===t&&console.error(pe),Reflect.get(e,t,r)}}));var be=Date.now;function we(e){var t,r,n,i,o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:o.documentElement.scrollLeft||(null==o?void 0:o.body)&&(null==(t=C.parentElement(o.body))?void 0:t.scrollLeft)||(null==(r=null==o?void 0:o.body)?void 0:r.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==o?void 0:o.documentElement.scrollTop)||(null==o?void 0:o.body)&&(null==(n=C.parentElement(o.body))?void 0:n.scrollTop)||(null==(i=null==o?void 0:o.body)?void 0:i.scrollTop)||0}}function ke(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function xe(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Se(e){return e?e.nodeType===e.ELEMENT_NODE?e:C.parentElement(e):null}function Ce(e,t,r,n){if(!e)return!1;var i=Se(e);if(!i)return!1;try{if("string"==typeof t){if(i.classList.contains(t))return!0;if(n&&null!==i.closest("."+t))return!0}else if(re(i,t,n))return!0}catch(e){}if(r){if(i.matches(r))return!0;if(n&&null!==i.closest(r))return!0}return!1}function Ie(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||t.getId(e)===Z}function Te(e,t){if(T(e))return!1;var r=t.getId(e);if(!t.has(r))return!0;var n=C.parentNode(e);return(!n||n.nodeType!==e.DOCUMENT_NODE)&&(!n||Te(n,t))}function Me(e){return Boolean(e.changedTouches)}function _e(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function Le(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function Ee(e){return!!e&&(e instanceof he&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(C.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(be=()=>(new Date).getTime());class Oe{constructor(){a(this,"id",1),a(this,"styleIDMap",new WeakMap),a(this,"idStyleMap",new Map)}getId(e){var t;return null!==(t=this.styleIDMap.get(e))&&void 0!==t?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){return this.has(e)?this.getId(e):(r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r);var r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Re(e){var t,r=null;return"getRootNode"in e&&(null==(t=C.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&C.host(C.getRootNode(e))&&(r=C.host(C.getRootNode(e))),r}function Ne(e){var t=e.ownerDocument;return!!t&&(C.contains(t,e)||function(e){var t=e.ownerDocument;if(!t)return!1;var r=function(e){for(var t,r=e;t=Re(r);)r=t;return r}(e);return C.contains(t,r)}(e))}function Ae(e){return"__ln"in e}class Pe{constructor(){a(this,"length",0),a(this,"head",null),a(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,r=0;e>r;r++)t=(null==t?void 0:t.next)||null;return t}addNode(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Ae(e.previousSibling)){var r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&Ae(e.nextSibling)&&e.nextSibling.__ln.previous){var n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}var qe,De=(e,t)=>e+"@"+t;class Fe{constructor(){a(this,"frozen",!1),a(this,"locked",!1),a(this,"texts",[]),a(this,"attributes",[]),a(this,"attributeMap",new WeakMap),a(this,"removes",[]),a(this,"mapRemoves",[]),a(this,"movedMap",{}),a(this,"addedSet",new Set),a(this,"movedSet",new Set),a(this,"droppedSet",new Set),a(this,"removesSubTreeCache",new Set),a(this,"mutationCb"),a(this,"blockClass"),a(this,"blockSelector"),a(this,"maskTextClass"),a(this,"maskTextSelector"),a(this,"inlineStylesheet"),a(this,"maskInputOptions"),a(this,"maskTextFn"),a(this,"maskInputFn"),a(this,"keepIframeSrcFn"),a(this,"recordCanvas"),a(this,"inlineImages"),a(this,"slimDOMOptions"),a(this,"dataURLOptions"),a(this,"doc"),a(this,"mirror"),a(this,"iframeManager"),a(this,"stylesheetManager"),a(this,"shadowDomManager"),a(this,"canvasManager"),a(this,"processedNodeManager"),a(this,"unattachedDoc"),a(this,"processMutations",(e=>{e.forEach(this.processMutation),this.emit()})),a(this,"emit",(()=>{if(!this.frozen&&!this.locked){for(var e=[],t=new Set,r=new Pe,n=e=>{for(var t=e,r=Z;r===Z;)r=(t=t&&t.nextSibling)&&this.mirror.getId(t);return r},i=i=>{var o=C.parentNode(i);if(o&&Ne(i)&&"TEXTAREA"!==o.tagName){var a=T(o)?this.mirror.getId(Re(i)):this.mirror.getId(o),s=n(i);if(-1===a||-1===s)return r.addNode(i);var u=ce(i,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{_e(e,this.mirror)&&this.iframeManager.addIframe(e),Le(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),Ee(i)&&this.shadowDomManager.addShadowRoot(C.shadowRoot(i),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}});u&&(e.push({parentId:a,nextId:s,node:u}),t.add(u.id))}};this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(var o of this.movedSet)He(this.removesSubTreeCache,o)&&!this.movedSet.has(C.parentNode(o))||i(o);for(var a of this.addedSet)Ue(this.droppedSet,a)||He(this.removesSubTreeCache,a)?Ue(this.movedSet,a)?i(a):this.droppedSet.add(a):i(a);for(var s=null;r.length;){var u=null;if(s){var l=this.mirror.getId(C.parentNode(s.value)),c=n(s.value);-1!==l&&-1!==c&&(u=s)}if(!u)for(var d=r.tail;d;){var h=d;if(d=d.previous,h){var v=this.mirror.getId(C.parentNode(h.value));if(-1===n(h.value))continue;if(-1!==v){u=h;break}var f=C.parentNode(h.value);if(f&&f.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var p=C.host(f);if(-1!==this.mirror.getId(p)){u=h;break}}}}if(!u){for(;r.head;)r.removeNode(r.head.value);break}s=u.previous,r.removeNode(u.value),i(u.value)}var m={texts:this.texts.map((e=>{var t=e.node,r=C.parentNode(t);return r&&"TEXTAREA"===r.tagName&&this.genTextAreaValueMutation(r),{id:this.mirror.getId(t),value:e.value}})).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),attributes:this.attributes.map((e=>{var{attributes:t}=e;if("string"==typeof t.style){var r=JSON.stringify(e.styleDiff),n=JSON.stringify(e._unchangedStyles);t.style.length>r.length&&(r+n).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}})).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),removes:this.removes,adds:e};(m.texts.length||m.attributes.length||m.removes.length||m.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(m))}})),a(this,"bufferBelongsToIframe",(e=>this.doc===e.contentDocument)),a(this,"genTextAreaValueMutation",(e=>{var t=this.attributeMap.get(e);t||(this.attributes.push(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}}),this.attributeMap.set(e,t));var r=Array.from(C.childNodes(e),(e=>C.textContent(e)||"")).join("");t.attributes.value=O({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:A(e),value:r,maskInputFn:this.maskInputFn})})),a(this,"processMutation",(e=>{if(!Ie(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":var t=C.textContent(e.target);Ce(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:ne(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Se(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break;case"attributes":var r=e.target,n=e.attributeName,i=e.target.getAttribute(n);if("value"===n){var o=A(r);i=O({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:o,value:i,maskInputFn:this.maskInputFn})}if(Ce(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;var a=this.attributeMap.get(e.target);if("IFRAME"===r.tagName&&"src"===n&&!this.keepIframeSrcFn(i)){if(r.contentDocument)return;n="rr_src"}if(a||(this.attributes.push(a={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}}),this.attributeMap.set(e.target,a)),"type"===n&&"INPUT"===r.tagName&&"password"===(e.oldValue||"").toLowerCase()&&r.setAttribute("data-rr-is-password","true"),!te(r.tagName,n))if(a.attributes[n]=ee(this.doc,R(r.tagName),R(n),i,r,this.dataURLOptions),"style"===n){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}var s=this.unattachedDoc.createElement("span");for(var u of(e.oldValue&&s.setAttribute("style",e.oldValue),Array.from(r.style))){var l=r.style.getPropertyValue(u),c=r.style.getPropertyPriority(u);l!==s.style.getPropertyValue(u)||c!==s.style.getPropertyPriority(u)?a.styleDiff[u]=""===c?l:[l,c]:a._unchangedStyles[u]=[l,c]}for(var d of Array.from(s.style))""===r.style.getPropertyValue(d)&&(a.styleDiff[d]=!1)}else"open"===n&&"DIALOG"===r.tagName&&(a.attributes.rr_open_mode=r.matches("dialog:modal")?"modal":"non-modal");break;case"childList":if(Ce(e.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===e.target.tagName)return void this.genTextAreaValueMutation(e.target);e.addedNodes.forEach((t=>this.genAdds(t,e.target))),e.removedNodes.forEach((t=>{var r=this.mirror.getId(t),n=T(e.target)?this.mirror.getId(C.host(e.target)):this.mirror.getId(e.target);Ce(e.target,this.blockClass,this.blockSelector,!1)||Ie(t,this.mirror,this.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(je(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===r||Te(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[De(r,n)]?je(this.movedSet,t):(this.removes.push({parentId:n,id:r,isShadow:!(!T(e.target)||!M(e.target))||void 0}),function(e,t){for(var r=[e];r.length;){var n=r.pop();t.has(n)||(t.add(n),C.childNodes(n).forEach((e=>r.push(e))))}}(t,this.removesSubTreeCache))),this.mapRemoves.push(t))}))}})),a(this,"genAdds",((e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(Ie(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);var r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&-1!==r&&(this.movedMap[De(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Ce(e,this.blockClass,this.blockSelector,!1)||(C.childNodes(e).forEach((e=>this.genAdds(e))),Ee(e)&&C.childNodes(C.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()}destroy(){for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift())}}function je(e,t){e.delete(t),C.childNodes(t).forEach((t=>je(e,t)))}function He(e,t,r){return 0!==e.size&&function(e,t,r){var n=C.parentNode(t);return!!n&&e.has(n)}(e,t)}function Ue(e,t){return 0!==e.size&&Be(e,t)}function Be(e,t){var r=C.parentNode(t);return!!r&&(!!e.has(r)||Be(e,r))}var Ve=e=>qe?function(){try{return e(...arguments)}catch(e){if(qe&&!0===qe(e))return;throw e}}:e,We=[];function ze(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 Ze(e,t){var r=new Fe;We.push(r),r.init(e);var n=new(x())(Ve(r.processMutations.bind(r)));return n.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),{observer:n,buffer:r}}function $e(e){var{scrollCb:t,doc:r,mirror:n,blockClass:i,blockSelector:o,sampling:a}=e;return ve("scroll",Ve(ye(Ve((e=>{var a=ze(e);if(a&&!Ce(a,i,o,!0)){var s=n.getId(a);if(a===r&&r.defaultView){var u=we(r.defaultView);t({id:s,x:u.left,y:u.top})}else t({id:s,x:a.scrollLeft,y:a.scrollTop})}})),a.scroll||100)),r)}var Qe=["INPUT","TEXTAREA","SELECT"],Ge=new WeakMap;function Xe(e){return function e(t,r){if(et("CSSGroupingRule")&&t.parentRule instanceof CSSGroupingRule||et("CSSMediaRule")&&t.parentRule instanceof CSSMediaRule||et("CSSSupportsRule")&&t.parentRule instanceof CSSSupportsRule||et("CSSConditionRule")&&t.parentRule instanceof CSSConditionRule){var n=Array.from(t.parentRule.cssRules).indexOf(t);return r.unshift(n),e(t.parentRule,r)}if(t.parentStyleSheet){var i=Array.from(t.parentStyleSheet.cssRules).indexOf(t);r.unshift(i)}return r}(e,[])}function Ye(e,t,r){var n,i;return e?(e.ownerNode?n=t.getId(e.ownerNode):i=r.getId(e),{styleId:i,id:n}):{}}function Je(e,t){var r,n,i,o,{mirror:a,stylesheetManager:s}=e;o=a.getId("#document"===t.nodeName?t:C.host(t));var u="#document"===t.nodeName?null==(r=t.defaultView)?void 0:r.Document:null==(i=null==(n=t.ownerDocument)?void 0:n.defaultView)?void 0:i.ShadowRoot,l=(null==u?void 0:u.prototype)?Object.getOwnPropertyDescriptor(null==u?void 0:u.prototype,"adoptedStyleSheets"):void 0;return null!==o&&-1!==o&&u&&l?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var e;return null==(e=l.get)?void 0:e.call(this)},set(e){var t,r=null==(t=l.set)?void 0:t.call(this,e);if(null!==o&&-1!==o)try{s.adoptStyleSheets(e,o)}catch(e){}return r}}),Ve((()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))):()=>{}}function Ke(e,t){void 0===t&&(t={});var n,i,o=e.doc.defaultView;if(!o)return()=>{};if(function(e,t){var{mutationCb:r,mousemoveCb:n,mouseInteractionCb:i,scrollCb:o,viewportResizeCb:a,inputCb:s,mediaInteractionCb:u,styleSheetRuleCb:l,styleDeclarationCb:c,canvasMutationCb:d,fontCb:h,selectionCb:v,customElementCb:f}=e;e.mutationCb=function(){t.mutation&&t.mutation(...arguments),r(...arguments)},e.mousemoveCb=function(){t.mousemove&&t.mousemove(...arguments),n(...arguments)},e.mouseInteractionCb=function(){t.mouseInteraction&&t.mouseInteraction(...arguments),i(...arguments)},e.scrollCb=function(){t.scroll&&t.scroll(...arguments),o(...arguments)},e.viewportResizeCb=function(){t.viewportResize&&t.viewportResize(...arguments),a(...arguments)},e.inputCb=function(){t.input&&t.input(...arguments),s(...arguments)},e.mediaInteractionCb=function(){t.mediaInteaction&&t.mediaInteaction(...arguments),u(...arguments)},e.styleSheetRuleCb=function(){t.styleSheetRule&&t.styleSheetRule(...arguments),l(...arguments)},e.styleDeclarationCb=function(){t.styleDeclaration&&t.styleDeclaration(...arguments),c(...arguments)},e.canvasMutationCb=function(){t.canvasMutation&&t.canvasMutation(...arguments),d(...arguments)},e.fontCb=function(){t.font&&t.font(...arguments),h(...arguments)},e.selectionCb=function(){t.selection&&t.selection(...arguments),v(...arguments)},e.customElementCb=function(){t.customElement&&t.customElement(...arguments),f(...arguments)}}(e,t),e.recordDOM){var a=Ze(e,e.doc);n=a.observer,i=a.buffer}var s=function(e){var{mousemoveCb:t,sampling:r,doc:n,mirror:i}=e;if(!1===r.mousemove)return()=>{};var o,a="number"==typeof r.mousemove?r.mousemove:50,s="number"==typeof r.mousemoveCallback?r.mousemoveCallback:500,l=[],c=ye(Ve((e=>{var r=Date.now()-o;t(l.map((e=>(e.timeOffset-=r,e))),e),l=[],o=null})),s),d=Ve(ye(Ve((e=>{var t=ze(e),{clientX:r,clientY:n}=Me(e)?e.changedTouches[0]:e;o||(o=be()),l.push({x:r,y:n,id:i.getId(t),timeOffset:be()-o}),c("undefined"!=typeof DragEvent&&e instanceof DragEvent?u.Drag:e instanceof MouseEvent?u.MouseMove:u.TouchMove)})),a,{trailing:!1})),h=[ve("mousemove",d,n),ve("touchmove",d,n),ve("drag",d,n)];return Ve((()=>{h.forEach((e=>e()))}))}(e),d=function(e){var{mouseInteractionCb:t,doc:n,mirror:i,blockClass:o,blockSelector:a,sampling:s}=e;if(!1===s.mouseInteraction)return()=>{};var u=!0===s.mouseInteraction||void 0===s.mouseInteraction?{}:s.mouseInteraction,d=[],h=null;return Object.keys(l).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==u[e])).forEach((e=>{var s=R(e),u=(e=>n=>{var s=ze(n);if(!Ce(s,o,a,!0)){var u=null,d=e;if("pointerType"in n){switch(n.pointerType){case"mouse":u=c.Mouse;break;case"touch":u=c.Touch;break;case"pen":u=c.Pen}u===c.Touch&&(l[e]===l.MouseDown?d="TouchStart":l[e]===l.MouseUp&&(d="TouchEnd"))}else Me(n)&&(u=c.Touch);null!==u?(h=u,(d.startsWith("Touch")&&u===c.Touch||d.startsWith("Mouse")&&u===c.Mouse)&&(u=null)):l[e]===l.Click&&(u=h,h=null);var v=Me(n)?n.changedTouches[0]:n;if(v){var f=i.getId(s),{clientX:p,clientY:m}=v;Ve(t)(r({type:l[d],id:f,x:p,y:m},null!==u&&{pointerType:u}))}}})(e);if(window.PointerEvent)switch(l[e]){case l.MouseDown:case l.MouseUp:s=s.replace("mouse","pointer");break;case l.TouchStart:case l.TouchEnd:return}d.push(ve(s,u,n))})),Ve((()=>{d.forEach((e=>e()))}))}(e),v=$e(e),f=function(e,t){var{viewportResizeCb:r}=e,{win:n}=t,i=-1,o=-1;return ve("resize",Ve(ye(Ve((()=>{var e=ke(),t=xe();i===e&&o===t||(r({width:Number(t),height:Number(e)}),i=e,o=t)})),200)),n)}(e,{win:o}),p=function(e){var{inputCb:t,doc:n,mirror:i,blockClass:o,blockSelector:a,ignoreClass:s,ignoreSelector:u,maskInputOptions:l,maskInputFn:c,sampling:d,userTriggeredOnInput:h}=e;function v(e){var t=ze(e),r=e.isTrusted,i=t&&t.tagName;if(t&&"OPTION"===i&&(t=C.parentElement(t)),t&&i&&Qe.indexOf(i)>=0&&!Ce(t,o,a,!0)&&!(t.classList.contains(s)||u&&t.matches(u))){var d=t.value,v=!1,p=A(t)||"";"radio"===p||"checkbox"===p?v=t.checked:(l[i.toLowerCase()]||l[p])&&(d=O({element:t,maskInputOptions:l,tagName:i,type:p,value:d,maskInputFn:c})),f(t,h?{text:d,isChecked:v,userTriggered:r}:{text:d,isChecked:v});var m=t.name;"radio"===p&&m&&v&&n.querySelectorAll('input[type="radio"][name="'+m+'"]').forEach((e=>{if(e!==t){var r=e.value;f(e,h?{text:r,isChecked:!v,userTriggered:!1}:{text:r,isChecked:!v})}}))}}function f(e,n){var o=Ge.get(e);if(!o||o.text!==n.text||o.isChecked!==n.isChecked){Ge.set(e,n);var a=i.getId(e);Ve(t)(r({},n,{id:a}))}}var p=("last"===d.input?["change"]:["input","change"]).map((e=>ve(e,Ve(v),n))),m=n.defaultView;if(!m)return()=>{p.forEach((e=>e()))};var y=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value");return y&&y.set&&p.push(...[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]].map((e=>ge(e[0],e[1],{set(){Ve(v)({target:this,isTrusted:!1})}},!1,m)))),Ve((()=>{p.forEach((e=>e()))}))}(e),m=function(e){var{mediaInteractionCb:t,blockClass:r,blockSelector:n,mirror:i,sampling:o,doc:a}=e,s=Ve((e=>ye(Ve((o=>{var a=ze(o);if(a&&!Ce(a,r,n,!0)){var{currentTime:s,volume:u,muted:l,playbackRate:c,loop:d}=a;t({type:e,id:i.getId(a),currentTime:s,volume:u,muted:l,playbackRate:c,loop:d})}})),o.media||500))),u=[ve("play",s(h.Play),a),ve("pause",s(h.Pause),a),ve("seeked",s(h.Seeked),a),ve("volumechange",s(h.VolumeChange),a),ve("ratechange",s(h.RateChange),a)];return Ve((()=>{u.forEach((e=>e()))}))}(e),y=()=>{},g=()=>{},b=()=>{},w=()=>{};e.recordDOM&&(y=function(e,t){var{styleSheetRuleCb:r,mirror:n,stylesheetManager:i}=e,{win:o}=t;if(!o.CSSStyleSheet||!o.CSSStyleSheet.prototype)return()=>{};var a=o.CSSStyleSheet.prototype.insertRule;o.CSSStyleSheet.prototype.insertRule=new Proxy(a,{apply:Ve(((e,t,o)=>{var[a,s]=o,{id:u,styleId:l}=Ye(t,n,i.styleMirror);return(u&&-1!==u||l&&-1!==l)&&r({id:u,styleId:l,adds:[{rule:a,index:s}]}),e.apply(t,o)}))}),o.CSSStyleSheet.prototype.addRule=function(e,t,r){return void 0===r&&(r=this.cssRules.length),o.CSSStyleSheet.prototype.insertRule.apply(this,[e+" { "+t+" }",r])};var s,u,l=o.CSSStyleSheet.prototype.deleteRule;o.CSSStyleSheet.prototype.deleteRule=new Proxy(l,{apply:Ve(((e,t,o)=>{var[a]=o,{id:s,styleId:u}=Ye(t,n,i.styleMirror);return(s&&-1!==s||u&&-1!==u)&&r({id:s,styleId:u,removes:[{index:a}]}),e.apply(t,o)}))}),o.CSSStyleSheet.prototype.removeRule=function(e){return o.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},o.CSSStyleSheet.prototype.replace&&(s=o.CSSStyleSheet.prototype.replace,o.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:Ve(((e,t,o)=>{var[a]=o,{id:s,styleId:u}=Ye(t,n,i.styleMirror);return(s&&-1!==s||u&&-1!==u)&&r({id:s,styleId:u,replace:a}),e.apply(t,o)}))})),o.CSSStyleSheet.prototype.replaceSync&&(u=o.CSSStyleSheet.prototype.replaceSync,o.CSSStyleSheet.prototype.replaceSync=new Proxy(u,{apply:Ve(((e,t,o)=>{var[a]=o,{id:s,styleId:u}=Ye(t,n,i.styleMirror);return(s&&-1!==s||u&&-1!==u)&&r({id:s,styleId:u,replaceSync:a}),e.apply(t,o)}))}));var c={};tt("CSSGroupingRule")?c.CSSGroupingRule=o.CSSGroupingRule:(tt("CSSMediaRule")&&(c.CSSMediaRule=o.CSSMediaRule),tt("CSSConditionRule")&&(c.CSSConditionRule=o.CSSConditionRule),tt("CSSSupportsRule")&&(c.CSSSupportsRule=o.CSSSupportsRule));var d={};return Object.entries(c).forEach((e=>{var[t,o]=e;d[t]={insertRule:o.prototype.insertRule,deleteRule:o.prototype.deleteRule},o.prototype.insertRule=new Proxy(d[t].insertRule,{apply:Ve(((e,t,o)=>{var[a,s]=o,{id:u,styleId:l}=Ye(t.parentStyleSheet,n,i.styleMirror);return(u&&-1!==u||l&&-1!==l)&&r({id:u,styleId:l,adds:[{rule:a,index:[...Xe(t),s||0]}]}),e.apply(t,o)}))}),o.prototype.deleteRule=new Proxy(d[t].deleteRule,{apply:Ve(((e,t,o)=>{var[a]=o,{id:s,styleId:u}=Ye(t.parentStyleSheet,n,i.styleMirror);return(s&&-1!==s||u&&-1!==u)&&r({id:s,styleId:u,removes:[{index:[...Xe(t),a]}]}),e.apply(t,o)}))})})),Ve((()=>{o.CSSStyleSheet.prototype.insertRule=a,o.CSSStyleSheet.prototype.deleteRule=l,s&&(o.CSSStyleSheet.prototype.replace=s),u&&(o.CSSStyleSheet.prototype.replaceSync=u),Object.entries(c).forEach((e=>{var[t,r]=e;r.prototype.insertRule=d[t].insertRule,r.prototype.deleteRule=d[t].deleteRule}))}))}(e,{win:o}),g=Je(e,e.doc),b=function(e,t){var{styleDeclarationCb:r,mirror:n,ignoreCSSAttributes:i,stylesheetManager:o}=e,{win:a}=t,s=a.CSSStyleDeclaration.prototype.setProperty;a.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:Ve(((e,t,a)=>{var u,[l,c,d]=a;if(i.has(l))return s.apply(t,[l,c,d]);var{id:h,styleId:v}=Ye(null==(u=t.parentRule)?void 0:u.parentStyleSheet,n,o.styleMirror);return(h&&-1!==h||v&&-1!==v)&&r({id:h,styleId:v,set:{property:l,value:c,priority:d},index:Xe(t.parentRule)}),e.apply(t,a)}))});var u=a.CSSStyleDeclaration.prototype.removeProperty;return a.CSSStyleDeclaration.prototype.removeProperty=new Proxy(u,{apply:Ve(((e,t,a)=>{var s,[l]=a;if(i.has(l))return u.apply(t,[l]);var{id:c,styleId:d}=Ye(null==(s=t.parentRule)?void 0:s.parentStyleSheet,n,o.styleMirror);return(c&&-1!==c||d&&-1!==d)&&r({id:c,styleId:d,remove:{property:l},index:Xe(t.parentRule)}),e.apply(t,a)}))}),Ve((()=>{a.CSSStyleDeclaration.prototype.setProperty=s,a.CSSStyleDeclaration.prototype.removeProperty=u}))}(e,{win:o}),e.collectFonts&&(w=function(e){var{fontCb:t,doc:r}=e,n=r.defaultView;if(!n)return()=>{};var i=[],o=new WeakMap,a=n.FontFace;n.FontFace=function(e,t,r){var n=new a(e,t,r);return o.set(n,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),n};var s=S(r.fonts,"add",(function(e){return function(r){return setTimeout(Ve((()=>{var e=o.get(r);e&&(t(e),o.delete(r))})),0),e.apply(this,[r])}}));return i.push((()=>{n.FontFace=a})),i.push(s),Ve((()=>{i.forEach((e=>e()))}))}(e)));var k=function(e){var{doc:t,mirror:r,blockClass:n,blockSelector:i,selectionCb:o}=e,a=!0,s=Ve((()=>{var e=t.getSelection();if(!(!e||a&&(null==e?void 0:e.isCollapsed))){a=e.isCollapsed||!1;for(var s=[],u=e.rangeCount||0,l=0;u>l;l++){var c=e.getRangeAt(l),{startContainer:d,startOffset:h,endContainer:v,endOffset:f}=c;Ce(d,n,i,!0)||Ce(v,n,i,!0)||s.push({start:r.getId(d),startOffset:h,end:r.getId(v),endOffset:f})}o({ranges:s})}}));return s(),ve("selectionchange",s)}(e),x=function(e){var{doc:t,customElementCb:r}=e,n=t.defaultView;return n&&n.customElements?S(n.customElements,"define",(function(e){return function(t,n,i){try{r({define:{name:t}})}catch(e){console.warn("Custom element callback failed for "+t)}return e.apply(this,[t,n,i])}})):()=>{}}(e),I=[];for(var T of e.plugins)I.push(T.observer(T.callback,o,T.options));return Ve((()=>{if(i){i.destroy(),i.reset();var e=We.indexOf(i);-1!==e&&We.splice(e,1)}null==n||n.disconnect(),s(),d(),v(),f(),p(),m(),y(),g(),b(),w(),k(),x(),I.forEach((e=>e()))}))}function et(e){return void 0!==window[e]}function tt(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class rt{constructor(e){a(this,"iframeIdToRemoteIdMap",new WeakMap),a(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,n){var i=r||this.getIdToRemoteIdMap(e),o=n||this.getRemoteIdToIdMap(e),a=i.get(t);return a||(a=this.generateIdFn(),i.set(t,a),o.set(a,t)),a}getIds(e,t){var r=this.getIdToRemoteIdMap(e),n=this.getRemoteIdToIdMap(e);return t.map((t=>this.getId(e,t,r,n)))}getRemoteId(e,t,r){var n=r||this.getRemoteIdToIdMap(e);return"number"!=typeof t?t:n.get(t)||-1}getRemoteIds(e,t){var r=this.getRemoteIdToIdMap(e);return t.map((t=>this.getRemoteId(e,t,r)))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){var t=this.iframeIdToRemoteIdMap.get(e);return t||this.iframeIdToRemoteIdMap.set(e,t=new Map),t}getRemoteIdToIdMap(e){var t=this.iframeRemoteIdToIdMap.get(e);return t||this.iframeRemoteIdToIdMap.set(e,t=new Map),t}}class nt{constructor(e){a(this,"iframes",new WeakMap),a(this,"crossOriginIframeMap",new WeakMap),a(this,"crossOriginIframeMirror",new rt(Q)),a(this,"crossOriginIframeStyleMirror"),a(this,"crossOriginIframeRootIdMap",new WeakMap),a(this,"mirror"),a(this,"mutationCb"),a(this,"wrappedEmit"),a(this,"loadListener"),a(this,"pageHideListener"),a(this,"stylesheetManager"),a(this,"recordCrossOriginIframes"),a(this,"messageHandler"),a(this,"nestedIframeListeners",new Map),a(this,"attachedIframes",new Map),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new rt(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.messageHandler=this.handleMessage.bind(this),this.recordCrossOriginIframes&&window.addEventListener("message",this.messageHandler)}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}addPageHideListener(e){this.pageHideListener=e}removeLoadListener(){this.loadListener=void 0}trackIframeContent(e,t){var r=this.mirror.getId(e);return this.attachedIframes.set(r,{element:e,content:t}),r}attachIframe(e,t){var r,n=this.trackIframeContent(e,t);this.mutationCb({adds:[{parentId:n,nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0});var i=e.contentWindow;if(this.recordCrossOriginIframes&&i&&!this.nestedIframeListeners.has(i)){var o=this.handleMessage.bind(this);fe((()=>{i.addEventListener("message",o),this.nestedIframeListeners.set(i,o)}))}fe((()=>{var t;return null==(t=e.contentWindow)?void 0:t.addEventListener("pagehide",(()=>{var t;null==(t=this.pageHideListener)||t.call(this,e),e.contentDocument&&this.mirror.removeNodeFromMap(e.contentDocument),e.contentWindow&&this.crossOriginIframeMap.delete(e.contentWindow)}))})),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 r=this.crossOriginIframeMap.get(e.source);if(r){var n=this.transformCrossOriginEvent(r,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}}}transformCrossOriginEvent(e,t){var r;switch(t.type){case s.FullSnapshot:this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);var n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),this.trackIframeContent(e,t.data.node),{timestamp:t.timestamp,type:s.IncrementalSnapshot,data:{source:u.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case s.Meta:case s.Load:case s.DomContentLoaded:return!1;case s.Plugin:return t;case s.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case s.IncrementalSnapshot:switch(t.data.source){case u.Mutation:return t.data.adds.forEach((t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);var r=this.crossOriginIframeRootIdMap.get(e);r&&this.patchRootIdOnNode(t.node,r)})),t.data.removes.forEach((t=>{this.replaceIds(t,e,["parentId","id"])})),t.data.attributes.forEach((t=>{this.replaceIds(t,e,["id"])})),t.data.texts.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case u.Drag:case u.TouchMove:case u.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case u.ViewportResize:return!1;case u.MediaInteraction:case u.MouseInteraction:case u.Scroll:case u.CanvasMutation:case u.Input:return this.replaceIds(t.data,e,["id"]),t;case u.StyleSheetRule:case u.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case u.Font:return t;case u.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case u.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(r=t.data.styles)||r.forEach((t=>{this.replaceStyleIds(t,e,["styleId"])})),t}}return!1}replace(e,t,r,n){for(var i of n)(Array.isArray(t[i])||"number"==typeof t[i])&&(t[i]=Array.isArray(t[i])?e.getIds(r,t[i]):e.getId(r,t[i]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach((e=>{this.replaceIdOnNode(e,t)}))}patchRootIdOnNode(e,t){e.type===v.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,t)}))}removeIframeById(e){var t=this.attachedIframes.get(e),r=(null==t?void 0:t.element)||this.mirror.getNode(e);if(r){var n=r.contentWindow;if(n&&this.nestedIframeListeners.has(n)){var i=this.nestedIframeListeners.get(n);fe((()=>n.removeEventListener("message",i))),this.nestedIframeListeners.delete(n)}n&&this.crossOriginIframeMap.delete(n),this.iframes.delete(r)}t&&this.attachedIframes.delete(e)}reattachIframes(){this.attachedIframes.forEach(((e,t)=>{var{content:r}=e;this.mirror.has(t)?this.mutationCb({adds:[{parentId:t,nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}):this.attachedIframes.delete(t)}))}destroy(){this.recordCrossOriginIframes&&window.removeEventListener("message",this.messageHandler),this.nestedIframeListeners.forEach(((e,t)=>{fe((()=>t.removeEventListener("message",e)))})),this.nestedIframeListeners.clear(),this.crossOriginIframeMirror.reset(),this.crossOriginIframeStyleMirror.reset(),this.attachedIframes.clear(),this.crossOriginIframeMap=new WeakMap,this.iframes=new WeakMap,this.crossOriginIframeRootIdMap=new WeakMap}}class it{constructor(e){a(this,"shadowDoms",new WeakSet),a(this,"mutationCb"),a(this,"scrollCb"),a(this,"bypassOptions"),a(this,"mirror"),a(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(M(e)&&!this.shadowDoms.has(e)){this.shadowDoms.add(e);var{observer:n,buffer:i}=Ze(r({},this.bypassOptions,{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push((()=>{n.disconnect(),i.destroy();var e=We.indexOf(i);-1!==e&&We.splice(e,1)})),this.restoreHandlers.push($e(r({},this.bypassOptions,{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout((()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(C.host(e))),this.restoreHandlers.push(Je({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))}),0)}}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){var r=this;this.restoreHandlers.push(S(e.prototype,"attachShadow",(function(e){return function(n){var i=e.call(this,n),o=C.shadowRoot(this);return o&&Ne(this)&&r.addShadowRoot(o,t),i}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch(e){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var ot="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",at="undefined"==typeof Uint8Array?[]:new Uint8Array(256),st=0;64>st;st++)at[ot.charCodeAt(st)]=st;var ut=new Map,lt=(e,t,r)=>{if(e&&(ht(e,t)||"object"==typeof e)){var n=function(e,t){var r=ut.get(e);return r||ut.set(e,r=new Map),r.has(t)||r.set(t,[]),r.get(t)}(r,e.constructor.name),i=n.indexOf(e);return-1===i&&(i=n.length,n.push(e)),i}};function ct(e,t,r,n){if(e instanceof Array)return e.map((e=>ct(e,t,r,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){var i=e.constructor.name,o=function(e){var t,r=new Uint8Array(e),n=r.length,i="";for(t=0;n>t;t+=3)i+=ot[r[t]>>2],i+=ot[(3&r[t])<<4|r[t+1]>>4],i+=ot[(15&r[t+1])<<2|r[t+2]>>6],i+=ot[63&r[t+2]];return n%3==2?i=i.substring(0,i.length-1)+"=":n%3==1&&(i=i.substring(0,i.length-2)+"=="),i}(e);return{rr_type:i,base64:o}}if(e instanceof DataView)return{rr_type:e.constructor.name,args:[ct(e.buffer,t,r,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){var a=e.constructor.name,{src:s}=e;return{rr_type:a,src:s}}return e instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:e.toDataURL(n.type,n.quality)}:e instanceof ImageData?{rr_type:e.constructor.name,args:[ct(e.data,t,r,n),e.width,e.height]}:ht(e,t)||"object"==typeof e?{rr_type:e.constructor.name,index:lt(e,t,r)}:e}var dt=(e,t,r,n)=>e.map((e=>ct(e,t,r,n))),ht=(e,t)=>{var r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((e=>"function"==typeof t[e]));return Boolean(r.find((r=>e instanceof t[r])))},vt=["webgl","webgl2"];function ft(e){return"nodeType"in e}function pt(e,t,n,i){var o=[];try{if(i){var a=function(e,t,n){var i=e.GPUCanvasContext;if((null==i?void 0:i.prototype)&&"function"==typeof i.prototype.configure)return S(i.prototype,"configure",(function(i){return function(o){var a=function(e){var{canvas:t}=e;return t&&"object"==typeof t?t:null}(this);if(!a||ft(a)&&Ce(a,t,n,!0))return i.call(this,o);ft(a)&&!("__context"in a)&&(a.__context="webgpu");var s=function(e){var t=e.GPUTextureUsage;return t?t.COPY_SRC|t.RENDER_ATTACHMENT:null}(e);return i.call(this,null!==s&&o?r({},o,{usage:"number"==typeof o.usage?o.usage|s:s}):o)}}))}(e,t,n);a&&o.push(a)}var s=S(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(r){for(var o=function(e){return"experimental-webgl"===e?"webgl":e}(r),a=arguments.length,s=new Array(a>1?a-1:0),u=1;a>u;u++)s[u-1]=arguments[u];if(!Ce(this,t,n,!0)&&("__context"in this||(this.__context=o),i&&vt.includes(o)))if(s[0]&&"object"==typeof s[0]){var l=s[0];l.preserveDrawingBuffer||(l.preserveDrawingBuffer=!0)}else s.splice(0,1,{preserveDrawingBuffer:!0});return e.apply(this,[r,...s])}}));o.push(s)}catch(e){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{o.forEach((e=>e()))}}function mt(e,t,r,n,i,o,a){var s=[],u=Object.getOwnPropertyNames(e),l=function(u){if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(u))return 0;try{if("function"!=typeof e[u])return 0;var l=S(e,u,(function(e){return function(){for(var s=arguments.length,l=new Array(s),c=0;s>c;c++)l[c]=arguments[c];var d=e.apply(this,l);if(lt(d,o,this),"tagName"in this.canvas&&!Ce(this.canvas,n,i,!0)){var h=dt(l,o,this,a);r(this.canvas,{type:t,property:u,args:h})}return d}}));s.push(l)}catch(n){var c=ge(e,u,{set(e){r(this.canvas,{type:t,property:u,args:[e],setter:!0})}});s.push(c)}};for(var c of u)l(c);return s}var yt,gt,bt,wt='(function() {\n "use strict";\n var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";\n var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);\n for (var i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n }\n var encode = function(arraybuffer) {\n var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";\n for (i2 = 0; i2 < len; i2 += 3) {\n base64 += chars[bytes[i2] >> 2];\n base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];\n base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];\n base64 += chars[bytes[i2 + 2] & 63];\n }\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + "=";\n } else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + "==";\n }\n return base64;\n };\n const lastFingerprintMap = /* @__PURE__ */ new Map();\n const transparentBlobMap = /* @__PURE__ */ new Map();\n function fnv1aHash(buffer) {\n const view = new Uint8Array(buffer);\n let hash = 2166136261;\n for (let i2 = 0; i2 < view.length; i2++) {\n hash ^= view[i2];\n hash = hash * 16777619 | 0;\n }\n return (hash >>> 0).toString(16);\n }\n async function getTransparentBlobFor(width, height, dataURLOptions) {\n const id = `${width}-${height}`;\n if ("OffscreenCanvas" in globalThis) {\n if (transparentBlobMap.has(id)) return transparentBlobMap.get(id);\n const offscreen = new OffscreenCanvas(width, height);\n offscreen.getContext("2d");\n const blob = await offscreen.convertToBlob(dataURLOptions);\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer);\n transparentBlobMap.set(id, base64);\n return base64;\n } else {\n return "";\n }\n }\n const worker = self;\n let reusableCanvas = null;\n let reusableCtx = null;\n worker.onmessage = async function(e) {\n if ("OffscreenCanvas" in globalThis) {\n const { id, bitmap, width, height, dataURLOptions } = e.data;\n try {\n const transparentBase64 = getTransparentBlobFor(\n width,\n height,\n dataURLOptions\n );\n if (!reusableCanvas || reusableCanvas.width !== width || reusableCanvas.height !== height) {\n reusableCanvas = new OffscreenCanvas(width, height);\n reusableCtx = reusableCanvas.getContext("2d");\n }\n reusableCtx.clearRect(0, 0, width, height);\n reusableCtx.drawImage(bitmap, 0, 0);\n bitmap.close();\n const blob = await reusableCanvas.convertToBlob(dataURLOptions);\n const type = blob.type;\n const arrayBuffer = await blob.arrayBuffer();\n const fingerprint = fnv1aHash(arrayBuffer);\n if (!lastFingerprintMap.has(id)) {\n const base642 = encode(arrayBuffer);\n if (await transparentBase64 === base642) {\n lastFingerprintMap.set(id, fingerprint);\n return worker.postMessage({ id });\n }\n lastFingerprintMap.set(id, fingerprint);\n worker.postMessage({ id, type, base64: base642, width, height });\n return;\n }\n if (lastFingerprintMap.get(id) === fingerprint)\n return worker.postMessage({ id });\n const base64 = encode(arrayBuffer);\n worker.postMessage({ id, type, base64, width, height });\n lastFingerprintMap.set(id, fingerprint);\n } catch {\n worker.postMessage({ id });\n }\n } else {\n e.data.bitmap.close();\n return worker.postMessage({ id: e.data.id });\n }\n };\n})();\n//# sourceMappingURL=image-bitmap-data-url-worker-Ca9A-vl6.js.map\n',kt="undefined"!=typeof self&&self.Blob&&new Blob([wt],{type:"text/javascript;charset=utf-8"});function xt(e){var t;try{if(!(t=kt&&(self.URL||self.webkitURL).createObjectURL(kt)))throw"";var r=new Worker(t,{name:null==e?void 0:e.name});return r.addEventListener("error",(()=>{(self.URL||self.webkitURL).revokeObjectURL(t)})),r}catch(t){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(wt),{name:null==e?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}class St{constructor(e){a(this,"pendingCanvasMutations",new Map),a(this,"rafStamps",{latestId:0,invokeId:null}),a(this,"mirror"),a(this,"mutationCb"),a(this,"resetObservers"),a(this,"frozen",!1),a(this,"locked",!1),a(this,"rafIdTimestamp",null),a(this,"rafIdFlush",null),a(this,"processMutation",((e,t)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)}));var{sampling:t="all",win:r,blockClass:n,blockSelector:i,recordCanvas:o,dataURLOptions:s}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&"all"===t&&this.initCanvasMutationObserver(r,n,i,s),o&&"number"==typeof t&&this.initCanvasFPSObserver(t,r,n,i,{dataURLOptions:s})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers(),null!==this.rafIdTimestamp&&(cancelAnimationFrame(this.rafIdTimestamp),this.rafIdTimestamp=null),null!==this.rafIdFlush&&(cancelAnimationFrame(this.rafIdFlush),this.rafIdFlush=null)}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,r,n,i,o){var a=this;if("OffscreenCanvas"in r){var s=pt(r,n,i,!0),u=new Map,l=new xt;l.onmessage=e=>{var{id:t}=e.data;if(u.set(t,!1),"base64"in e.data){var{base64:r,type:n,width:i,height:o}=e.data;this.mutationCb({id:t,type:d["2D"],commands:[{property:"clearRect",args:[0,0,i,o]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:n}]},0,0]}],displayWidth:i,displayHeight:o})}};var c,h=1e3/e,v=0,f=e=>{var s,d;v&&h>e-v||(v=e,(s=[],d=e=>{try{e.querySelectorAll("canvas").forEach((e=>{Ce(e,n,i,!0)||s.push(e)})),e.querySelectorAll("*").forEach((e=>{e.shadowRoot&&d(e.shadowRoot)}))}catch(e){}},d(r.document),s).forEach(function(){var e=t((function*(e){var t,r,n=a.mirror.getId(e);if(!u.get(n)&&0!==e.width&&0!==e.height){u.set(n,!0);try{if(["webgl","webgl2"].includes(e.__context)){var i=e.getContext(e.__context);if(null==(t=null==i?void 0:i.isContextLost)?void 0:t.call(i))return void u.set(n,!1);!1===(null==(r=null==i?void 0:i.getContextAttributes())?void 0:r.preserveDrawingBuffer)&&i.clear(i.COLOR_BUFFER_BIT)}var s=e.clientWidth||e.width,c=e.clientHeight||e.height,d=yield createImageBitmap(e,{resizeWidth:s,resizeHeight:c});l.postMessage({id:n,bitmap:d,width:s,height:c,dataURLOptions:o.dataURLOptions},[d])}catch(e){u.set(n,!1)}}}));return function(t){return e.apply(this,arguments)}}())),c=requestAnimationFrame(f)};c=requestAnimationFrame(f),this.resetObservers=()=>{s(),cancelAnimationFrame(c)}}}initCanvasMutationObserver(e,t,r,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var i=pt(e,t,r,!1),o=function(e,t,r,n,i){var o=[],a=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype),s=function(a){try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[a])return 1;var s=S(t.CanvasRenderingContext2D.prototype,a,(function(o){return function(){for(var s=arguments.length,u=new Array(s),l=0;s>l;l++)u[l]=arguments[l];return Ce(this.canvas,r,n,!0)||setTimeout((()=>{var r=dt(u,t,this,i);e(this.canvas,{type:d["2D"],property:a,args:r})}),0),o.apply(this,u)}}));o.push(s)}catch(r){var u=ge(t.CanvasRenderingContext2D.prototype,a,{set(t){e(this.canvas,{type:d["2D"],property:a,args:[t],setter:!0})}});o.push(u)}};for(var u of a)s(u);return()=>{o.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,r,n),a=function(e,t,r,n,i){var o=[];return void 0!==t.WebGLRenderingContext&&o.push(...mt(t.WebGLRenderingContext.prototype,d.WebGL,e,r,n,t,i)),void 0!==t.WebGL2RenderingContext&&o.push(...mt(t.WebGL2RenderingContext.prototype,d.WebGL2,e,r,n,t,i)),()=>{o.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,r,n);this.resetObservers=()=>{i(),o(),a()}}startPendingCanvasMutationFlusher(){this.rafIdFlush=requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}startRAFTimestamping(){var e=t=>{this.rafStamps.latestId=t,this.rafIdTimestamp=requestAnimationFrame(e)};this.rafIdTimestamp=requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach(((e,t)=>{var r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)})),this.rafIdFlush=requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(e,t){if(!this.frozen&&!this.locked){var r=this.pendingCanvasMutations.get(e);if(r&&-1!==t){var n=r.map((e=>{var t=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,i);return t})),{type:o}=r[0];this.mutationCb({id:t,type:o,commands:n}),this.pendingCanvasMutations.delete(e)}}}}class Ct{constructor(e){a(this,"trackedLinkElements",new WeakSet),a(this,"mutationCb"),a(this,"adoptedStyleSheetCb"),a(this,"styleMirror",new Oe),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){var r=this;if(0!==e.length){var n={id:t,styleIds:[]},i=[],o=function(e){var t;r.styleMirror.has(e)?t=r.styleMirror.getId(e):(t=r.styleMirror.add(e),i.push({styleId:t,rules:Array.from(e.rules||CSSRule,((t,r)=>({rule:L(t,e.href),index:r})))})),n.styleIds.push(t)};for(var a of e)o(a);i.length>0&&(n.styles=i),this.adoptedStyleSheetCb(n)}}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet,ie.forEach((e=>e.abort())),ie.clear()}trackStylesheetInLinkElement(e){}}class It{constructor(){a(this,"nodeMap",new WeakMap),a(this,"active",!1)}inOtherBuffer(e,t){var r=this.nodeMap.get(e);return r&&Array.from(r).some((e=>e!==t))}add(e,t){this.active||(this.active=!0,requestAnimationFrame((()=>{this.nodeMap=new WeakMap,this.active=!1}))),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}var Tt=!1;try{if(2!==Array.from([1],(e=>2*e))[0]){var Mt=document.createElement("iframe");document.body.appendChild(Mt),Array.from=(null==(n=Mt.contentWindow)?void 0:n.Array.from)||Array.from,document.body.removeChild(Mt)}}catch(e){console.debug("Unable to override Array.from",e)}var _t=new E;function Lt(e){void 0===e&&(e={});var{emit:t,checkoutEveryNms:n,checkoutEveryNth:i,blockClass:o="rr-block",blockSelector:a=null,ignoreClass:l="rr-ignore",ignoreSelector:c=null,maskTextClass:d="rr-mask",maskTextSelector:h=null,inlineStylesheet:v=!0,maskAllInputs:f,maskInputOptions:p,slimDOMOptions:m,maskInputFn:y,maskTextFn:g,hooks:b,packFn:w,sampling:k={},dataURLOptions:x={},mousemoveWait:S,recordDOM:I=!0,recordCanvas:T=!1,recordCrossOriginIframes:M=!1,recordAfter:_=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:L=!1,collectFonts:O=!1,inlineImages:R=!1,plugins:N,keepIframeSrcFn:A=(()=>!1),ignoreCSSAttributes:P=new Set([]),errorHandler:q}=e;qe=q;var D=r({type:"image/webp",quality:.4,maxBase64ImageLength:1048576},x),F=!M||window.parent===window,j=!1;if(!F)try{window.parent.document&&(j=!1)}catch(e){j=!0}if(F&&!t)throw new Error("emit function is required");if(!F&&!j)return()=>{};void 0!==S&&void 0===k.mousemove&&(k.mousemove=S),_t.reset();var H,U=!0===f?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==p?p:{password:!0},B=de(void 0!==m&&m);!function(e){void 0===e&&(e=window),"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=[].forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=[].forEach)}();var V=0,W=new Map,z=e=>{for(var t of N||[])t.eventProcessor&&(e=t.eventProcessor(e));return w&&!j&&(e=w(e)),e};yt=(e,r)=>{var o,a=e;if(a.timestamp=be(),!(null==(o=We[0])?void 0:o.isFrozen())||a.type===s.FullSnapshot||a.type===s.IncrementalSnapshot&&a.data.source===u.Mutation||We.forEach((e=>e.unfreeze())),F)null==t||t(z(a),r);else if(j){var l={type:"rrweb",event:z(a),origin:window.location.origin,isCheckout:r};window.parent.postMessage(l,"*")}if(a.type===s.FullSnapshot)H=a,V=0;else if(a.type===s.IncrementalSnapshot){if(a.data.source===u.Mutation&&a.data.isAttachIframe)return;V++,(i&&V>=i||n&&a.timestamp-H.timestamp>n)&>(!0)}};var Z=e=>{if(M&&e.removes&&e.removes.length>0){var t=e.adds.length>0?new Set(e.adds.map((e=>e.node.id))):null;e.removes.forEach((e=>{var{id:r}=e;if(!t||!t.has(r)){var n=W.get(r);n&&(n(),W.delete(r)),Y.removeIframeById(r)}})),function(){for(var[e,t]of W){var r=_t.getNode(e);if(r)try{r.contentDocument&&r.contentDocument.defaultView||(t(),W.delete(e))}catch(r){t(),W.delete(e)}else t(),W.delete(e)}}()}yt({type:s.IncrementalSnapshot,data:r({source:u.Mutation},e)})},Q=e=>yt({type:s.IncrementalSnapshot,data:r({source:u.Scroll},e)}),G=e=>yt({type:s.IncrementalSnapshot,data:r({source:u.CanvasMutation},e)}),X=new Ct({mutationCb:Z,adoptedStyleSheetCb:e=>yt({type:s.IncrementalSnapshot,data:r({source:u.AdoptedStyleSheet},e)})}),Y=new nt({mirror:_t,mutationCb:Z,stylesheetManager:X,recordCrossOriginIframes:M,wrappedEmit:yt});for(var J of N||[])J.getMirror&&J.getMirror({nodeMirror:_t,crossOriginIframeMirror:Y.crossOriginIframeMirror,crossOriginIframeStyleMirror:Y.crossOriginIframeStyleMirror});var K=new It;bt=new St({recordCanvas:T,mutationCb:G,win:window,blockClass:o,blockSelector:a,mirror:_t,sampling:k.canvas,dataURLOptions:D});var ee=new it({mutationCb:Z,scrollCb:Q,bypassOptions:{blockClass:o,blockSelector:a,maskTextClass:d,maskTextSelector:h,inlineStylesheet:v,maskInputOptions:U,dataURLOptions:D,maskTextFn:g,maskInputFn:y,recordCanvas:T,inlineImages:R,sampling:k,slimDOMOptions:B,iframeManager:Y,stylesheetManager:X,canvasManager:bt,keepIframeSrcFn:A,processedNodeManager:K},mirror:_t});gt=function(e){if(void 0===e&&(e=!1),I){yt({type:s.Meta,data:{href:window.location.href,width:xe(),height:ke()}},e),X.reset(),ee.init(),We.forEach((e=>e.lock()));var t=function(e,t){var{mirror:r=new E,blockClass:n="rr-block",blockSelector:i=null,maskTextClass:o="rr-mask",maskTextSelector:a=null,inlineStylesheet:s=!0,inlineImages:u=!1,recordCanvas:l=!1,maskAllInputs:c=!1,maskTextFn:d,maskInputFn:h,slimDOM:v=!1,dataURLOptions:f,preserveWhiteSpace:p,onSerialize:m,onIframeLoad:y,iframeLoadTimeout:g,onStylesheetLoad:b,stylesheetLoadTimeout:w,keepIframeSrcFn:k=(()=>!1),maxDepth:x}=t||{};return ce(e,{doc:e,mirror:r,blockClass:n,blockSelector:i,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:s,maskInputOptions:!0===c?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===c?{password:!0}:c,maskTextFn:d,maskInputFn:h,slimDOMOptions:de(v),dataURLOptions:f,inlineImages:u,recordCanvas:l,preserveWhiteSpace:p,onSerialize:m,onIframeLoad:y,iframeLoadTimeout:g,onStylesheetLoad:b,stylesheetLoadTimeout:w,keepIframeSrcFn:k,newlyAddedElement:!1,maxDepth:x})}(document,{mirror:_t,blockClass:o,blockSelector:a,maskTextClass:d,maskTextSelector:h,inlineStylesheet:v,maskAllInputs:U,maskTextFn:g,maskInputFn:y,slimDOM:B,dataURLOptions:D,recordCanvas:T,inlineImages:R,onSerialize(e){_e(e,_t)&&Y.addIframe(e),Le(e,_t)&&X.trackLinkElement(e),Ee(e)&&ee.addShadowRoot(C.shadowRoot(e),document)},onIframeLoad(e,t){Y.attachIframe(e,t),ee.observeAttachShadow(e)},onStylesheetLoad(e,t){X.attachLinkElement(e,t)},keepIframeSrcFn:A});if(!t)return console.warn("Failed to snapshot the document");yt({type:s.FullSnapshot,data:{node:t,initialOffset:we(window)}},e),We.forEach((e=>e.unlock())),M&&Y.reattachIframes(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&X.adoptStyleSheets(document.adoptedStyleSheets,_t.getId(document))}};try{var te=[],re=e=>{var t;return Ve(Ke)({mutationCb:Z,mousemoveCb:(e,t)=>yt({type:s.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>yt({type:s.IncrementalSnapshot,data:r({source:u.MouseInteraction},e)}),scrollCb:Q,viewportResizeCb:e=>yt({type:s.IncrementalSnapshot,data:r({source:u.ViewportResize},e)}),inputCb:e=>yt({type:s.IncrementalSnapshot,data:r({source:u.Input},e)}),mediaInteractionCb:e=>yt({type:s.IncrementalSnapshot,data:r({source:u.MediaInteraction},e)}),styleSheetRuleCb:e=>yt({type:s.IncrementalSnapshot,data:r({source:u.StyleSheetRule},e)}),styleDeclarationCb:e=>yt({type:s.IncrementalSnapshot,data:r({source:u.StyleDeclaration},e)}),canvasMutationCb:G,fontCb:e=>yt({type:s.IncrementalSnapshot,data:r({source:u.Font},e)}),selectionCb(e){yt({type:s.IncrementalSnapshot,data:r({source:u.Selection},e)})},customElementCb(e){yt({type:s.IncrementalSnapshot,data:r({source:u.CustomElement},e)})},blockClass:o,ignoreClass:l,ignoreSelector:c,maskTextClass:d,maskTextSelector:h,maskInputOptions:U,inlineStylesheet:v,sampling:k,recordDOM:I,recordCanvas:T,inlineImages:R,userTriggeredOnInput:L,collectFonts:O,doc:e,maskInputFn:y,maskTextFn:g,keepIframeSrcFn:A,blockSelector:a,slimDOMOptions:B,dataURLOptions:D,mirror:_t,iframeManager:Y,stylesheetManager:X,shadowDomManager:ee,processedNodeManager:K,canvasManager:bt,ignoreCSSAttributes:P,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=>yt({type:s.Plugin,data:{plugin:e.name,payload:t}})}))))||[]},b)};Y.addLoadListener((e=>{try{var t=_t.getId(e),r=re(e.contentDocument);te.push(r),-1!==t&&W.set(t,r)}catch(e){console.warn(e)}})),Y.addPageHideListener((e=>{var t=_t.getId(e),r=W.get(t);r&&(r(),W.delete(t)),function(e){for(var t=We.length-1;t>=0;t--){var r=We[t];(null==r?void 0:r.bufferBelongsToIframe(e))&&(r.reset(),We.splice(t,1))}}(e)}));var ne=()=>{gt(),te.push(re(document)),Tt=!0};return["interactive","complete"].includes(document.readyState)?ne():(te.push(ve("DOMContentLoaded",(()=>{yt({type:s.DomContentLoaded,data:{}}),"DOMContentLoaded"===_&&ne()}))),te.push(ve("load",(()=>{yt({type:s.Load,data:{}}),"load"===_&&ne()}),window))),()=>{te.forEach((e=>fe(e))),K.destroy(),Y.removeLoadListener(),Y.destroy(),W.clear(),_t.reset(),Tt=!1,qe=void 0}}catch(e){console.warn(e)}}Lt.addCustomEvent=(e,t)=>{if(!Tt)throw new Error("please add custom event after start recording");yt({type:s.Custom,data:{tag:e,payload:t}})},Lt.freezePage=()=>{We.forEach((e=>e.freeze()))},Lt.takeFullSnapshot=e=>{if(!Tt)throw new Error("please take full snapshot after start recording");gt(e)},Lt.mirror=_t;var Et=Object.defineProperty,Ot=(e,t,r)=>((e,t,r)=>t in e?Et(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);class Rt{constructor(e){Ot(this,"fileName"),Ot(this,"functionName"),Ot(this,"lineNumber"),Ot(this,"columnNumber"),this.fileName=e.fileName||"",this.functionName=e.functionName||"",this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber}toString(){var e=this.lineNumber||"",t=this.columnNumber||"";return this.functionName?this.functionName+" ("+this.fileName+":"+e+":"+t+")":this.fileName+":"+e+":"+t}}var Nt=/(^|@)\S+:\d+/,At=/^\s*at .*(\S+:\d+|\(native\))/m,Pt=/^(eval@)?(\[native code])?$/,qt={parse(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(At)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):[]:[]},extractLocation(e){if(-1===e.indexOf(":"))return[e];var t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!t)throw new Error("Cannot parse given url: "+e);return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE(e){return e.stack.split("\n").filter((function(e){return!!e.match(At)}),this).map((function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var t=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),r=t.match(/ (\((.+):(\d+):(\d+)\)$)/),n=(t=r?t.replace(r[0],""):t).split(/\s+/).slice(1),i=this.extractLocation(r?r[1]:n.pop()),o=n.join(" ")||void 0,a=["eval","<anonymous>"].indexOf(i[0])>-1?void 0:i[0];return new Rt({functionName:o,fileName:a,lineNumber:i[1],columnNumber:i[2]})}),this)},parseFFOrSafari(e){return e.stack.split("\n").filter((function(e){return!e.match(Pt)}),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 Rt({functionName:e});var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=e.match(t),n=r&&r[1]?r[1]:void 0,i=this.extractLocation(e.replace(t,""));return new Rt({functionName:n,fileName:i[0],lineNumber:i[1],columnNumber:i[2]})}),this)},parseOpera(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(e){for(var t=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split("\n"),n=[],i=2,o=r.length;o>i;i+=2){var a=t.exec(r[i]);a&&n.push(new Rt({fileName:a[2],lineNumber:parseFloat(a[1])}))}return n},parseOpera10(e){for(var t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=e.stacktrace.split("\n"),n=[],i=0,o=r.length;o>i;i+=2){var a=t.exec(r[i]);a&&n.push(new Rt({functionName:a[3]||void 0,fileName:a[2],lineNumber:parseFloat(a[1])}))}return n},parseOpera11(e){return e.stack.split("\n").filter((function(e){return!!e.match(Nt)&&!e.match(/^Error created at/)}),this).map((function(e){var t=e.split("@"),r=this.extractLocation(t.pop()),n=(t.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new Rt({functionName:n,fileName:r[0],lineNumber:r[1],columnNumber:r[2]})}),this)}};function Dt(e){if(!e||!e.outerHTML)return"";for(var t="";e.parentElement;){var r=e.localName;if(!r)break;r=r.toLowerCase();var n=e.parentElement,i=[];if(n.children&&n.children.length>0)for(var o=0;n.children.length>o;o++){var a=n.children[o];a.localName&&a.localName.toLowerCase&&a.localName.toLowerCase()===r&&i.push(a)}i.length>1&&(r+=":eq("+i.indexOf(e)+")"),t=r+(t?">"+t:""),e=n}return t}function Ft(e){return Array.isArray(e)}function jt(e){return"object"==typeof e&&null!==e&&!Ft(e)}function Ht(e,t){if(0===t)return!0;var r=Object.keys(e);for(var n of r)if(jt(e[n])&&Ht(e[n],t-1))return!0;return!1}function Ut(e,t){var r={numOfKeysLimit:50,depthOfLimit:4};Object.assign(r,t);var n=[],i=[];return JSON.stringify(e,(function(e,t){if(n.length>0){var o=n.indexOf(this);~o?n.splice(o+1):n.push(this),~o?i.splice(o,1/0,e):i.push(e),~n.indexOf(t)&&(t=n[0]===t?"[Circular ~]":"[Circular ~."+i.slice(0,n.indexOf(t)).join(".")+"]")}else n.push(t);if(null===t)return t;if(void 0===t)return"undefined";if(jt(a=t)&&Object.keys(a).length>r.numOfKeysLimit||"function"==typeof a||jt(a)&&Ht(a,r.depthOfLimit))return function(e){var t=e.toString();return r.stringLengthLimit&&t.length>r.stringLengthLimit&&(t=t.slice(0,r.stringLengthLimit)+"..."),t}(t);var a;if("bigint"==typeof t)return t.toString()+"n";if(t instanceof Event){var s={};for(var u in t){var l=t[u];s[u]=Ft(l)?Dt(l.length?l[0]:null):l}return s}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 Bt={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 Vt(e,t,r){var n,i=r?Object.assign({},Bt,r):Bt,o=i.logger;if(!o)return()=>{};n="string"==typeof o?t[o]:o;var a=0,s=!1,u=[];if(i.level.includes("error")){var l=t=>{var r=t.message,n=qt.parse(t.error).map((e=>e.toString())),o=[Ut(r,i.stringifyOptions)];e({level:"error",trace:n,payload:o})};t.addEventListener("error",l),u.push((()=>{t.removeEventListener("error",l)}));var c=t=>{var r,n;t.reason instanceof Error?n=[Ut("Uncaught (in promise) "+(r=t.reason).name+": "+r.message,i.stringifyOptions)]:(r=new Error,n=[Ut("Uncaught (in promise)",i.stringifyOptions),Ut(t.reason,i.stringifyOptions)]);var o=qt.parse(r).map((e=>e.toString()));e({level:"error",trace:o,payload:n})};t.addEventListener("unhandledrejection",c),u.push((()=>{t.removeEventListener("unhandledrejection",c)}))}for(var d of i.level)u.push(h(n,d));return()=>{u.forEach((e=>e()))};function h(t,r){var n=this;return t[r]?function(t,o,u){try{if(!(o in t))return()=>{};var l=t[o],c=(t=>function(){for(var o=arguments.length,u=new Array(o),l=0;o>l;l++)u[l]=arguments[l];if(t.apply(n,u),!("assert"===r&&u[0]||s)){s=!0;try{var c=qt.parse(new Error).map((e=>e.toString())).splice(1),d=("assert"===r?u.slice(1):u).map((e=>Ut(e,i.stringifyOptions)));a++,i.lengthThreshold>a?e({level:r,trace:c,payload:d}):a===i.lengthThreshold&&e({level:"warn",trace:[],payload:[Ut("The number of log records reached the threshold.")]})}catch(e){t("rrweb logger error:",e,...u)}finally{s=!1}}})(l);return"function"==typeof c&&(c.prototype=c.prototype||{},Object.defineProperties(c,{__rrweb_original__:{enumerable:!1,value:l}})),t[o]=c,()=>{t[o]=l}}catch(e){return()=>{}}}(t,r):()=>{}}}var Wt=e=>({name:"rrweb/console@1",observer:Vt,options:e}),zt=function(e){return e.MinLength="min_length",e.MaxLength="max_length",e}({});function Zt(e,t){return-1!==e.indexOf(t)}var $t=function(e){return e.trim()},Qt=Object.prototype,Gt=Qt.hasOwnProperty,Xt=Qt.toString,Yt=Array.isArray||function(e){return"[object Array]"===Xt.call(e)},Jt=e=>"function"==typeof e,Kt=e=>e===Object(e)&&!Yt(e),er=e=>void 0===e,tr=e=>"[object String]"==Xt.call(e),rr=e=>null===e,nr=e=>er(e)||rr(e),ir=e=>"[object Number]"==Xt.call(e)&&e==e,or=e=>"[object Boolean]"===Xt.call(e),ar=e=>e instanceof FormData;function sr(e){return null===e||"object"!=typeof e}function ur(e,t){return{}.toString.call(e)==="[object "+t+"]"}function lr(e){return"undefined"!=typeof Event&&function(e,t){try{return e instanceof t}catch(e){return!1}}(e,Event)}var cr,dr,hr,vr="Mobile",fr="Android",pr="Tablet",mr=fr+" "+pr,yr="iPad",gr="Apple Watch",br="BlackBerry",wr="Nintendo",kr="PlayStation",xr="Xbox",Sr="Windows Phone",Cr="Nokia",Ir="Ouya",Tr="Generic",Mr=Tr+" "+vr.toLowerCase(),_r=Tr+" "+pr.toLowerCase(),Lr=new RegExp(xr,"i"),Er=new RegExp(kr+" \\w+","i"),Or=new RegExp(wr+" \\w+","i"),Rr=new RegExp(br+"|PlayBook|BB10","i");function Nr(e,t){if(e){var r=e.find((e=>e.type===t));return null==r?void 0:r.value}}function Ar(e){var t=globalThis._posthogChunkIds;if(t){var r=Object.keys(t);return hr&&r.length===dr||(dr=r.length,hr=r.reduce(((r,n)=>{cr||(cr={});var i=cr[n];if(i)r[i[0]]=i[1];else for(var o=e(n),a=o.length-1;a>=0;a--){var s=o[a],u=null==s?void 0:s.filename,l=t[n];if(u&&l){r[u]=l,cr[n]=[u,l];break}}return r}),{})),hr}}var Pr="?";function qr(e,t,r,n,i){var o={platform:e,filename:t,function:"<anonymous>"===r?Pr:r,in_app:!0};return er(n)||(o.lineno=n),er(i)||(o.colno=i),o}var Dr=(e,t)=>{var r=-1!==e.indexOf("safari-extension"),n=-1!==e.indexOf("safari-web-extension");return r||n?[-1!==e.indexOf("@")?e.split("@")[0]:Pr,r?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},Fr=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,jr=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Hr=/\((\S*)(?::(\d+))(?::(\d+))\)/,Ur=(e,t)=>{var r=Fr.exec(e);if(r){var[,n,i,o]=r;return qr(t,n,Pr,+i,+o)}var a=jr.exec(e);if(a){if(a[2]&&0===a[2].indexOf("eval")){var s=Hr.exec(a[2]);s&&(a[2]=s[1],a[3]=s[2],a[4]=s[3])}var[u,l]=Dr(a[1]||Pr,a[2]);return qr(t,l,u,a[3]?+a[3]:void 0,a[4]?+a[4]:void 0)}},Br=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Vr=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Wr=(e,t)=>{var r=Br.exec(e);if(r){if(r[3]&&r[3].indexOf(" > eval")>-1){var n=Vr.exec(r[3]);n&&(r[1]=r[1]||"eval",r[3]=n[1],r[4]=n[2],r[5]="")}var i=r[3],o=r[1]||Pr;return[o,i]=Dr(o,i),qr(t,i,o,r[4]?+r[4]:void 0,r[5]?+r[5]:void 0)}},zr=/\(error: (.*)\)/;var Zr=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;var $r=["fatal","error","warning","log","info","debug"];function Qr(e,t){void 0===t&&(t=40);var r=Object.keys(e);if(r.sort(),!r.length)return"[object has no keys]";for(var n=r.length;n>0;n--){var i=r.slice(0,n).join(", ");if(t>=i.length)return n===r.length?i:i.length>t?i.slice(0,t)+"...":i}return""}var Gr="undefined"!=typeof window?window:void 0,Xr="undefined"!=typeof globalThis?globalThis:Gr;"undefined"==typeof self&&(Xr.self=Xr),"undefined"==typeof File&&(Xr.File=function(){});var Yr=null==Xr?void 0:Xr.navigator,Jr=null==Xr?void 0:Xr.document;null!=Xr&&Xr.XMLHttpRequest&&new Xr.XMLHttpRequest;var Kr=null==Yr?void 0:Yr.userAgent,en=null!=Gr?Gr:{},tn=e=>e instanceof Document,rn=function(e,t){var{debugEnabled:r}=void 0===t?{}:t,n={k(t){if(Gr&&(en.POSTHOG_DEBUG||r)&&!er(Gr.console)&&Gr.console){for(var n=("__rrweb_original__"in Gr.console[t]?Gr.console[t].__rrweb_original__:Gr.console[t]),i=arguments.length,o=new Array(i>1?i-1:0),a=1;i>a;a++)o[a-1]=arguments[a];n(e,...o)}},debug(){for(var e=arguments.length,t=new Array(e),r=0;e>r;r++)t[r]=arguments[r];n.k("debug",...t)},info(){for(var e=arguments.length,t=new Array(e),r=0;e>r;r++)t[r]=arguments[r];n.k("log",...t)},warn(){for(var e=arguments.length,t=new Array(e),r=0;e>r;r++)t[r]=arguments[r];n.k("warn",...t)},error(){for(var e=arguments.length,t=new Array(e),r=0;e>r;r++)t[r]=arguments[r];n.k("error",...t)},critical(){for(var t=arguments.length,r=new Array(t),n=0;t>n;n++)r[n]=arguments[n];console.error(e,...r)},uninitializedWarning(e){n.error("You must initialize PostHog before calling "+e)},createLogger:(t,r)=>rn(e+" "+t,r)};return n},nn=rn("[PostHog.js]"),on=nn.createLogger;function an(e,t){if(!nr(e))if(Yt(e))e.forEach(t);else if(ar(e))e.forEach(((e,r)=>t(e,r)));else for(var r in e)Gt.call(e,r)&&t(e[r],r)}var sn=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;t>n;n++)r[n-1]=arguments[n];for(var i of r)for(var o in i)void 0!==i[o]&&(e[o]=i[o]);return e};function un(e){for(var t=Object.keys(e),r=t.length,n=new Array(r);r--;)n[r]=[t[r],e[t[r]]];return n}function ln(e,t,r,n){var{capture:i=!1,passive:o=!0}=null!=n?n:{};null==e||e.addEventListener(t,r,{capture:i,passive:o})}var cn=function(e,t){var r,n;void 0===t&&(t="&");var i=[];return an(e,(function(e,t){er(e)||er(t)||"undefined"===t||(r=encodeURIComponent(e instanceof File?e.name:e.toString()),n=encodeURIComponent(t),i[i.length]=n+"="+r)})),i.join(t)};function dn(e,t,r){try{if(!(t in e))return()=>{};var n=e[t],i=r(n);return Jt(i)&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=i,()=>{e[t]=n}}catch(e){return()=>{}}}function hn(e,t){var r,n=function(e){try{return"string"==typeof e?new URL(e).hostname:"url"in e?new URL(e.url).hostname:e.hostname}catch(e){return null}}(e),i={hostname:n,isHostDenied:!1};if(null==(r=t.payloadHostDenyList)||!r.length||null==n||!n.trim().length)return i;for(var o of t.payloadHostDenyList)if(n.endsWith(o))return{hostname:n,isHostDenied:!0};return i}var vn=1,fn=3,pn=11;function mn(e){return!!e&&e.nodeType===vn}function yn(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function gn(e){return!!e&&e.nodeType===pn&&mn(e.host)}function bn(e){return e?$t(e).split(/\s+/):[]}function wn(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 bn(t)}function kn(e){var t="";return Mn(e)&&!_n(e)&&e.childNodes&&e.childNodes.length&&an(e.childNodes,(function(e){var r;(function(e){return!!e&&e.nodeType===fn})(e)&&e.textContent&&(t+=null!==(r=function(e){return nr(e)?null:$t(e).split(/(\s+)/).filter((e=>Pn(e))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}(e.textContent))&&void 0!==r?r:"")})),$t(t)}var xn=["a","button","form","input","select","textarea","label"];function Sn(e){var t=e.parentNode;return!(!t||!mn(t))&&t}var Cn=[".ph-no-deadclick",".ph-no-capture"];var In=e=>!e||yn(e,"html")||!mn(e),Tn=(e,t)=>{if(!Gr||In(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var r=!1,n=[e],i=e;i.parentNode&&!yn(i,"body");)if(gn(i.parentNode))n.push(i.parentNode.host),i=i.parentNode.host;else{var o=Sn(i);if(!o)break;if(xn.indexOf(o.tagName.toLowerCase())>-1)r=!0;else{var a=Gr.getComputedStyle(o);a&&"pointer"===a.getPropertyValue("cursor")&&(r=!0)}n.push(o),i=o}return{parentIsUsefulElement:r,targetElementList:n}};function Mn(e){for(var t=e;t.parentNode&&!yn(t,"body");t=t.parentNode){var r=wn(t);if(Zt(r,"ph-sensitive")||Zt(r,"ph-no-capture"))return!1}if(Zt(wn(e),"ph-include"))return!0;var n=e.type||"";if(tr(n))switch(n.toLowerCase()){case"hidden":case"password":return!1}var i=e.name||e.id||"";return!tr(i)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(i.replace(/[^a-zA-Z0-9]/g,""))}function _n(e){return!!(yn(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||yn(e,"select")||yn(e,"textarea")||"true"===e.getAttribute("contenteditable"))}var Ln="(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})",En=new RegExp("^(?:"+Ln+")$"),On=new RegExp(Ln),Rn="\\d{3}-?\\d{2}-?\\d{4}",Nn=new RegExp("^("+Rn+")$"),An=new RegExp("("+Rn+")");function Pn(e,t){if(void 0===t&&(t=!0),nr(e))return!1;if(tr(e)){if(e=$t(e),(t?En:On).test((e||"").replace(/[- ]/g,"")))return!1;if((t?Nn:An).test(e))return!1}return!0}function qn(e){var t=kn(e);return Pn(t=(t+" "+Dn(e)).trim())?t:""}function Dn(e){var t="";return e&&e.childNodes&&e.childNodes.length&&an(e.childNodes,(function(e){var r;if(e&&"span"===(null==(r=e.tagName)?void 0:r.toLowerCase()))try{var n=kn(e);t=(t+" "+n).trim(),e.childNodes&&e.childNodes.length&&(t=(t+" "+Dn(e)).trim())}catch(e){nn.error("[AutoCapture]",e)}})),t}function Fn(e){return e.replace(/"|\\"/g,'\\"')}function jn(e){var t=e.attr__class;return t?Yt(t)?t:bn(t):void 0}var Hn={initiatorTypes:["audio","beacon","body","css","early-hint","embed","fetch","frame","iframe","icon","image","img","input","link","navigation","object","ping","script","track","video","xmlhttprequest"],maskRequestFn:e=>e,recordHeaders:!1,recordBody:!1,recordInitialRequests:!1,recordPerformance:!1,performanceEntryTypeToObserve:["first-input","navigation","paint","resource"],payloadSizeLimitBytes:1e6,payloadHostDenyList:[".lr-ingest.io",".ingest.sentry.io",".clarity.ms","analytics.google.com","bam.nr-data.net"]},Un=on("[Recorder]"),Bn=e=>"navigation"===e.entryType,Vn=e=>"resource"===e.entryType;function Wn(e,t){return!!t&&(or(t)||t[e])}function zn(e){var{type:t,recordBody:r,headers:n,url:i}=e;function o(e){var t=Object.keys(n).find((e=>"content-type"===e.toLowerCase())),r=t&&n[t];return e.some((e=>null==r?void 0:r.includes(e)))}if(!r)return!1;if(function e(t){try{return"string"==typeof t?t.startsWith("blob:"):t instanceof URL?"blob:"===t.protocol:t instanceof Request&&e(t.url)}catch(e){return!1}}(i))return!1;if(or(r))return!0;if(Yt(r))return o(r);var a=r[t];return or(a)?a:o(a)}function Zn(e,t,r,n,i,o){return $n.apply(this,arguments)}function $n(){return $n=t((function*(e,t,r,n,i,o){if(void 0===o&&(o=0),o>10)return Un.warn("Failed to get performance entry for request",{url:r,initiatorType:t}),null;var a=function(e,r){for(var o=e.length-1;o>=0;o-=1)if(Vn(a=e[o])&&a.initiatorType===t&&(er(n)||a.startTime>=n)&&(er(i)||i>=a.startTime))return e[o];var a}(e.performance.getEntriesByName(r));return a||(yield new Promise((e=>setTimeout(e,50*o))),Zn(e,t,r,n,i,o+1))})),$n.apply(this,arguments)}function Qn(e){var{body:t,options:r,url:n}=e;if(nr(t))return null;var{hostname:i,isHostDenied:o}=hn(n,r);if(o)return i+" is in deny list";if(tr(t))return t;if(tn(t))return t.textContent;if(ar(t))return cn(t);if(Kt(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 Gn=e=>!rr(e)&&("navigation"===e.entryType||"resource"===e.entryType);function Xn(e){var{entry:t,method:n,status:i,networkRequest:o,isInitial:a,start:s,end:u,url:l,initiatorType:c}=e;s=t?t.startTime:s,u=t?t.responseEnd:u;var d=Math.floor(Date.now()-performance.now()),h=Math.floor(d+(s||0)),v=[r({},t?t.toJSON():{name:l},{startTime:er(s)?void 0:Math.round(s),endTime:er(u)?void 0:Math.round(u),timeOrigin:d,timestamp:h,method:n,initiatorType:c||(t?t.initiatorType:void 0),status:i,requestHeaders:o.requestHeaders,requestBody:o.requestBody,responseHeaders:o.responseHeaders,responseBody:o.responseBody,isInitial:a})];if(Gn(t))for(var f of t.serverTiming||[])v.push({timeOrigin:d,timestamp:h,startTime:Math.round(t.startTime),name:f.name,duration:f.duration,entryType:"serverTiming"});return v}var Yn=["video/","audio/"];function Jn(e){return new Promise((t=>{var r=setTimeout((()=>t("[SessionReplay] Timeout while trying to read body")),500);try{e.clone().text().then((e=>t(e)),(e=>t("[SessionReplay] Failed to read body: "+e))).finally((()=>clearTimeout(r)))}catch(e){clearTimeout(r),t("[SessionReplay] Failed to read body")}}))}function Kn(){return Kn=t((function*(e){var{r:t,options:r,url:n}=e,{hostname:i,isHostDenied:o}=hn(n,r);return o?Promise.resolve(i+" is in deny list"):Jn(t)})),Kn.apply(this,arguments)}function ei(){return ei=t((function*(e){var{r:t,options:r,url:n}=e,i=function(e){var t,{r:r,options:n,url:i}=e;if("chunked"===r.headers.get("Transfer-Encoding"))return"Chunked Transfer-Encoding is not supported";var o=null==(t=r.headers.get("Content-Type"))?void 0:t.toLowerCase(),a=Yn.some((e=>null==o?void 0:o.startsWith(e)));if(o&&a)return"Content-Type "+o+" is not supported";var{hostname:s,isHostDenied:u}=hn(i,n);return u?s+" is in deny list":null}({r:t,options:r,url:n});return rr(i)?Jn(t):Promise.resolve(i)})),ei.apply(this,arguments)}var ti=null;function ri(e,n,i){if(!("performance"in n))return()=>{};if(ti)return Un.warn("Network observer already initialised, doing nothing"),()=>{};var o=i?Object.assign({},Hn,i):Hn,a=t=>{var n=[];t.requests.forEach((e=>{var t=o.maskRequestFn(e);t&&n.push(t)})),n.length>0&&e(r({},t,{requests:n}))},s=function(e,t,r){if(r.recordInitialRequests){var n=t.performance.getEntries().filter((e=>Bn(e)||Vn(e)&&r.initiatorTypes.includes(e.initiatorType)));e({requests:n.flatMap((e=>Xn({entry:e,method:void 0,status:void 0,networkRequest:{},isInitial:!0}))),isInitial:!0})}var i=new t.PerformanceObserver((t=>{var n=t.getEntries().filter((e=>Bn(e)||Vn(e)&&r.initiatorTypes.includes(e.initiatorType)&&(e=>!r.recordBody&&!r.recordHeaders||"xmlhttprequest"!==e.initiatorType&&"fetch"!==e.initiatorType)(e)));e({requests:n.flatMap((e=>Xn({entry:e,method:void 0,status:void 0,networkRequest:{}})))})})),o=PerformanceObserver.supportedEntryTypes.filter((e=>r.performanceEntryTypeToObserve.includes(e)));return i.observe({entryTypes:o}),()=>{i.disconnect()}}(a,n,o),u=()=>{},l=()=>{};return(o.recordHeaders||o.recordBody)&&(u=function(e,t,r){if(!r.initiatorTypes.includes("xmlhttprequest"))return()=>{};var n=Wn("request",r.recordHeaders),i=Wn("response",r.recordHeaders),o=dn(t.XMLHttpRequest.prototype,"open",(o=>function(a,s,u,l,c){void 0===u&&(u=!0);var d,h,v=this,f=new Request(s),p={},m={},y=v.setRequestHeader.bind(v);v.setRequestHeader=(e,t)=>(m[e]=t,y(e,t)),n&&(p.requestHeaders=m);var g=v.send.bind(v);v.send=e=>(zn({type:"request",headers:m,url:s,recordBody:r.recordBody})&&(p.requestBody=Qn({body:e,options:r,url:s})),d=t.performance.now(),g(e));var b=()=>{v.removeEventListener("readystatechange",w),v.removeEventListener("error",b),v.removeEventListener("abort",b),v.removeEventListener("timeout",b)},w=()=>{if(v.readyState===v.DONE){b(),h=t.performance.now();var n={};v.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((e=>{var t=e.split(": "),r=t.shift(),i=t.join(": ");r&&(n[r]=i)})),i&&(p.responseHeaders=n),zn({type:"response",headers:n,url:s,recordBody:r.recordBody})&&(p.responseBody=Qn({body:v.response,options:r,url:s})),Zn(t,"xmlhttprequest",f.url,d,h).then((t=>{var r=Xn({entry:t,method:a,status:null==v?void 0:v.status,networkRequest:p,start:d,end:h,url:s.toString(),initiatorType:"xmlhttprequest"});e({requests:r})})).catch((()=>{}))}};v.addEventListener("readystatechange",w),v.addEventListener("error",b),v.addEventListener("abort",b),v.addEventListener("timeout",b),o.call(v,a,s.toString(),u,l,c)}));return()=>{o()}}(a,n,o),l=function(e,r,n){if(!n.initiatorTypes.includes("fetch"))return()=>{};var i=Wn("request",n.recordHeaders),o=Wn("response",n.recordHeaders),a=dn(r,"fetch",(a=>function(){var s=t((function*(t,s){var u,l,c,d=new Request(t,s),h={};try{var v={};d.headers.forEach(((e,t)=>{v[t]=e})),i&&(h.requestHeaders=v),zn({type:"request",headers:v,url:t,recordBody:n.recordBody})&&(h.requestBody=yield function(e){return Kn.apply(this,arguments)}({r:d,options:n,url:t})),l=r.performance.now(),u=yield a(d),c=r.performance.now();var f={};return u.headers.forEach(((e,t)=>{f[t]=e})),o&&(h.responseHeaders=f),zn({type:"response",headers:f,url:t,recordBody:n.recordBody})&&(h.responseBody=yield function(e){return ei.apply(this,arguments)}({r:u,options:n,url:t})),u}finally{Zn(r,"fetch",d.url,l,c).then((t=>{var r,n=Xn({entry:t,method:d.method,status:null==(r=u)?void 0:r.status,networkRequest:h,start:l,end:c,url:d.url,initiatorType:"fetch"});e({requests:n})})).catch((()=>{}))}}));return function(e,t){return s.apply(this,arguments)}}()));return()=>{a()}}(a,n,o)),ti=()=>{s(),u(),l(),ti=null}}var ni=e=>({name:"rrweb/network@1",observer:ri,options:e});en.__PosthogExtensions__=en.__PosthogExtensions__||{},en.__PosthogExtensions__.rrwebPlugins={getRecordConsolePlugin:Wt,getRecordNetworkPlugin:ni},en.__PosthogExtensions__.rrweb={record:Lt,version:"v2",wasMaxDepthReached:()=>le,resetMaxDepthState(){le=!1,ue=!1}},en.rrweb={record:Lt,version:"v2"},en.rrwebConsoleRecord={getRecordConsolePlugin:Wt},en.getRecordNetworkPlugin=ni;var ii,oi,ai,si,ui,li,ci,di,hi,vi,fi,pi,mi={},yi=[],gi=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,bi=Array.isArray;function wi(e,t){for(var r in t)e[r]=t[r];return e}function ki(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function xi(e,t,r){var n,i,o,a={};for(o in t)"key"==o?n=t[o]:"ref"==o?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?ii.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===a[o]&&(a[o]=e.defaultProps[o]);return Si(e,a,n,i,null)}function Si(e,t,r,n,i){var o={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==i?++ai:i,__i:-1,__u:0};return null==i&&null!=oi.vnode&&oi.vnode(o),o}function Ci(e){return e.children}function Ii(e,t){this.props=e,this.context=t}function Ti(e,t){if(null==t)return e.__?Ti(e.__,e.__i+1):null;for(var r;e.__k.length>t;t++)if(null!=(r=e.__k[t])&&null!=r.__e)return r.__e;return"function"==typeof e.type?Ti(e):null}function Mi(e){var t,r;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;e.__k.length>t;t++)if(null!=(r=e.__k[t])&&null!=r.__e){e.__e=e.__c.base=r.__e;break}return Mi(e)}}function _i(e){(!e.__d&&(e.__d=!0)&&si.push(e)&&!$.__r++||ui!=oi.debounceRendering)&&((ui=oi.debounceRendering)||li)($)}function $(){for(var e,t,r,n,i,o,a,s=1;si.length;)si.length>s&&si.sort(ci),e=si.shift(),s=si.length,e.__d&&(r=void 0,n=void 0,i=(n=(t=e).__v).__e,o=[],a=[],t.__P&&((r=wi({},n)).__v=n.__v+1,oi.vnode&&oi.vnode(r),Pi(t.__P,r,n,t.__n,t.__P.namespaceURI,32&n.__u?[i]:null,o,null==i?Ti(n):i,!!(32&n.__u),a),r.__v=n.__v,r.__.__k[r.__i]=r,Di(o,r,a),n.__e=n.__=null,r.__e!=i&&Mi(r)));$.__r=0}function Li(e,t,r,n,i,o,a,s,u,l,c){var d,h,v,f,p,m,y,g=n&&n.__k||yi,b=t.length;for(u=function(e,t,r,n,i){var o,a,s,u,l,c=r.length,d=c,h=0;for(e.__k=new Array(i),o=0;i>o;o++)null!=(a=t[o])&&"boolean"!=typeof a&&"function"!=typeof a?("string"==typeof a||"number"==typeof a||"bigint"==typeof a||a.constructor==String?a=e.__k[o]=Si(null,a,null,null,null):bi(a)?a=e.__k[o]=Si(Ci,{children:a},null,null,null):void 0===a.constructor&&a.__b>0?a=e.__k[o]=Si(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):e.__k[o]=a,u=o+h,a.__=e,a.__b=e.__b+1,s=null,-1!=(l=a.__i=Oi(a,r,u,d))&&(d--,(s=r[l])&&(s.__u|=2)),null==s||null==s.__v?(-1==l&&(i>c?h--:c>i&&h++),"function"!=typeof a.type&&(a.__u|=4)):l!=u&&(l==u-1?h--:l==u+1?h++:(l>u?h--:h++,a.__u|=4))):e.__k[o]=null;if(d)for(o=0;c>o;o++)null!=(s=r[o])&&0==(2&s.__u)&&(s.__e==n&&(n=Ti(s)),Hi(s,s));return n}(r,t,g,u,b),d=0;b>d;d++)null!=(v=r.__k[d])&&(h=-1==v.__i?mi:g[v.__i]||mi,v.__i=d,m=Pi(e,v,h,i,o,a,s,u,l,c),f=v.__e,v.ref&&h.ref!=v.ref&&(h.ref&&ji(h.ref,null,v),c.push(v.ref,v.__c||f,v)),null==p&&null!=f&&(p=f),(y=!!(4&v.__u))||h.__k===v.__k?u=Ei(v,u,e,y):"function"==typeof v.type&&void 0!==m?u=m:f&&(u=f.nextSibling),v.__u&=-7);return r.__e=p,u}function Ei(e,t,r,n){var i,o;if("function"==typeof e.type){for(i=e.__k,o=0;i&&i.length>o;o++)i[o]&&(i[o].__=e,t=Ei(i[o],t,r,n));return t}e.__e!=t&&(n&&(t&&e.type&&!t.parentNode&&(t=Ti(e)),r.insertBefore(e.__e,t||null)),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8==t.nodeType);return t}function Oi(e,t,r,n){var i,o,a,s=e.key,u=e.type,l=t[r],c=null!=l&&0==(2&l.__u);if(null===l&&null==s||c&&s==l.key&&u==l.type)return r;if(n>(c?1:0))for(i=r-1,o=r+1;i>=0||t.length>o;)if(null!=(l=t[a=0>i?o++:i--])&&0==(2&l.__u)&&s==l.key&&u==l.type)return a;return-1}function Ri(e,t,r){"-"==t[0]?e.setProperty(t,null==r?"":r):e[t]=null==r?"":"number"!=typeof r||gi.test(t)?r:r+"px"}function Ni(e,t,r,n,i){var o,a;e:if("style"==t)if("string"==typeof r)e.style.cssText=r;else{if("string"==typeof n&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||Ri(e.style,t,"");if(r)for(t in r)n&&r[t]==n[t]||Ri(e.style,t,r[t])}else if("o"==t[0]&&"n"==t[1])o=t!=(t=t.replace(di,"$1")),a=t.toLowerCase(),t=a in e||"onFocusOut"==t||"onFocusIn"==t?a.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=r,r?n?r.u=n.u:(r.u=hi,e.addEventListener(t,o?fi:vi,o)):e.removeEventListener(t,o?fi:vi,o);else{if("http://www.w3.org/2000/svg"==i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==r?"":r;break e}catch(e){}"function"==typeof r||(null==r||!1===r&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==r?"":r))}}function Ai(e){return function(t){if(this.l){var r=this.l[t.type+e];if(null==t.t)t.t=hi++;else if(r.u>t.t)return;return r(oi.event?oi.event(t):t)}}}function Pi(e,t,r,n,i,o,a,s,u,l){var c,d,h,v,f,p,m,y,g,b,w,$,k,x,S,C,I,T=t.type;if(void 0!==t.constructor)return null;128&r.__u&&(u=!!(32&r.__u),o=[s=t.__e=r.__e]),(c=oi.__b)&&c(t);e:if("function"==typeof T)try{if(y=t.props,g="prototype"in T&&T.prototype.render,b=(c=T.contextType)&&n[c.__c],w=c?b?b.props.value:c.__:n,r.__c?m=(d=t.__c=r.__c).__=d.__E:(g?t.__c=d=new T(y,w):(t.__c=d=new Ii(y,w),d.constructor=T,d.render=Ui),b&&b.sub(d),d.state||(d.state={}),d.__n=n,h=d.__d=!0,d.__h=[],d._sb=[]),g&&null==d.__s&&(d.__s=d.state),g&&null!=T.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=wi({},d.__s)),wi(d.__s,T.getDerivedStateFromProps(y,d.__s))),v=d.props,f=d.state,d.__v=t,h)g&&null==T.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),g&&null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(g&&null==T.getDerivedStateFromProps&&y!==v&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(y,w),t.__v==r.__v||!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(y,d.__s,w)){for(t.__v!=r.__v&&(d.props=y,d.state=d.__s,d.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some((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(y,d.__s,w),g&&null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(v,f,p)}))}if(d.context=w,d.props=y,d.__P=e,d.__e=!1,k=oi.__r,x=0,g){for(d.state=d.__s,d.__d=!1,k&&k(t),c=d.render(d.props,d.state,d.context),S=0;d._sb.length>S;S++)d.__h.push(d._sb[S]);d._sb=[]}else do{d.__d=!1,k&&k(t),c=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&25>++x);d.state=d.__s,null!=d.getChildContext&&(n=wi(wi({},n),d.getChildContext())),g&&!h&&null!=d.getSnapshotBeforeUpdate&&(p=d.getSnapshotBeforeUpdate(v,f)),C=c,null!=c&&c.type===Ci&&null==c.key&&(C=Fi(c.props.children)),s=Li(e,bi(C)?C:[C],t,r,n,i,o,a,s,u,l),d.base=t.__e,t.__u&=-161,d.__h.length&&a.push(d),m&&(d.__E=d.__=null)}catch(e){if(t.__v=null,u||null!=o)if(e.then){for(t.__u|=u?160:128;s&&8==s.nodeType&&s.nextSibling;)s=s.nextSibling;o[o.indexOf(s)]=null,t.__e=s}else{for(I=o.length;I--;)ki(o[I]);qi(t)}else t.__e=r.__e,t.__k=r.__k,e.then||qi(t);oi.__e(e,t,r)}else null==o&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):s=t.__e=function(e,t,r,n,i,o,a,s,u){var l,c,d,h,v,f,p,m=r.props||mi,y=t.props,g=t.type;if("svg"==g?i="http://www.w3.org/2000/svg":"math"==g?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),null!=o)for(l=0;o.length>l;l++)if((v=o[l])&&"setAttribute"in v==!!g&&(g?v.localName==g:3==v.nodeType)){e=v,o[l]=null;break}if(null==e){if(null==g)return document.createTextNode(y);e=document.createElementNS(i,g,y.is&&y),s&&(oi.__m&&oi.__m(t,o),s=!1),o=null}if(null==g)m===y||s&&e.data==y||(e.data=y);else{if(o=o&&ii.call(e.childNodes),!s&&null!=o)for(m={},l=0;e.attributes.length>l;l++)m[(v=e.attributes[l]).name]=v.value;for(l in m)if(v=m[l],"children"==l);else if("dangerouslySetInnerHTML"==l)d=v;else if(!(l in y)){if("value"==l&&"defaultValue"in y||"checked"==l&&"defaultChecked"in y)continue;Ni(e,l,null,v,i)}for(l in y)v=y[l],"children"==l?h=v:"dangerouslySetInnerHTML"==l?c=v:"value"==l?f=v:"checked"==l?p=v:s&&"function"!=typeof v||m[l]===v||Ni(e,l,v,m[l],i);if(c)s||d&&(c.__html==d.__html||c.__html==e.innerHTML)||(e.innerHTML=c.__html),t.__k=[];else if(d&&(e.innerHTML=""),Li("template"==t.type?e.content:e,bi(h)?h:[h],t,r,n,"foreignObject"==g?"http://www.w3.org/1999/xhtml":i,o,a,o?o[0]:r.__k&&Ti(r,0),s,u),null!=o)for(l=o.length;l--;)ki(o[l]);s||(l="value","progress"==g&&null==f?e.removeAttribute("value"):null!=f&&(f!==e[l]||"progress"==g&&!f||"option"==g&&f!=m[l])&&Ni(e,l,f,m[l],i),l="checked",null!=p&&p!=e[l]&&Ni(e,l,p,m[l],i))}return e}(r.__e,t,r,n,i,o,a,u,l);return(c=oi.diffed)&&c(t),128&t.__u?void 0:s}function qi(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(qi)}function Di(e,t,r){for(var n=0;r.length>n;n++)ji(r[n],r[++n],r[++n]);oi.__c&&oi.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){oi.__e(e,t.__v)}}))}function Fi(e){return"object"!=typeof e||null==e||e.__b&&e.__b>0?e:bi(e)?e.map(Fi):wi({},e)}function ji(e,t,r){try{if("function"==typeof e){var n="function"==typeof e.__u;n&&e.__u(),n&&null==t||(e.__u=e(t))}else e.current=t}catch(e){oi.__e(e,r)}}function Hi(e,t,r){var n,i;if(oi.unmount&&oi.unmount(e),(n=e.ref)&&(n.current&&n.current!=e.__e||ji(n,null,t)),null!=(n=e.__c)){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(e){oi.__e(e,t)}n.base=n.__P=null}if(n=e.__k)for(i=0;n.length>i;i++)n[i]&&Hi(n[i],t,r||"function"!=typeof e.type);r||ki(e.__e),e.__c=e.__=e.__e=void 0}function Ui(e,t,r){return this.constructor(e,r)}function Bi(e,t,r){var n,i,o;t==document&&(t=document.documentElement),oi.__&&oi.__(e,t),n=t.__k,i=[],o=[],Pi(t,e=t.__k=xi(Ci,null,[e]),n||mi,mi,t.namespaceURI,n?null:t.firstChild?ii.call(t.childNodes):null,i,n?n.__e:t.firstChild,!1,o),Di(i,e,o)}ii=yi.slice,oi={__e(e,t,r,n){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,n||{}),a=i.__d),a)return i.__E=i}catch(t){e=t}throw e}},ai=0,Ii.prototype.setState=function(e,t){var r;r=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=wi({},this.state),"function"==typeof e&&(e=e(wi({},r),this.props)),e&&wi(r,e),null!=e&&this.__v&&(t&&this._sb.push(t),_i(this))},Ii.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),_i(this))},Ii.prototype.render=Ci,si=[],li="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ci=function(e,t){return e.__v.__b-t.__v.__b},$.__r=0,di=/(PointerCapture)$|Capture$/i,hi=0,vi=Ai(!1),fi=Ai(!0),pi=0;var Vi,Wi,zi,Zi,$i=0,Qi=[],Gi=oi,Xi=Gi.__b,Yi=Gi.__r,Ji=Gi.diffed,Ki=Gi.__c,eo=Gi.unmount,to=Gi.__;function ro(e,t){Gi.__h&&Gi.__h(Wi,e,$i||t),$i=0;var r=Wi.__H||(Wi.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function no(e){return $i=1,function(e,t,r){var n=ro(Vi++,2);if(n.t=e,!n.__c&&(n.__=[po(void 0,t),function(e){var t=n.__N?n.__N[0]:n.__[0],r=n.t(t,e);t!==r&&(n.__N=[r,n.__[1]],n.__c.setState({}))}],n.__c=Wi,!Wi.__f)){var i=function(e,t,r){if(!n.__c.__H)return!0;var i=n.__c.__H.__.filter((function(e){return!!e.__c}));if(i.every((function(e){return!e.__N})))return!o||o.call(this,e,t,r);var a=n.__c.props!==e;return i.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}})),o&&o.call(this,e,t,r)||a};Wi.__f=!0;var o=Wi.shouldComponentUpdate,a=Wi.componentWillUpdate;Wi.componentWillUpdate=function(e,t,r){if(this.__e){var n=o;o=void 0,i(e,t,r),o=n}a&&a.call(this,e,t,r)},Wi.shouldComponentUpdate=i}return n.__N||n.__}(po,e)}function io(e,t){var r=ro(Vi++,3);!Gi.__s&&fo(r.__H,t)&&(r.__=e,r.u=t,Wi.__H.__h.push(r))}function oo(e){return $i=5,ao((function(){return{current:e}}),[])}function ao(e,t){var r=ro(Vi++,7);return fo(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function so(e){var t=Wi.context[e.__c],r=ro(Vi++,9);return r.c=e,t?(null==r.__&&(r.__=!0,t.sub(Wi)),t.props.value):e.__}function uo(){for(var e;e=Qi.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ho),e.__H.__h.forEach(vo),e.__H.__h=[]}catch(t){e.__H.__h=[],Gi.__e(t,e.__v)}}Gi.__b=function(e){Wi=null,Xi&&Xi(e)},Gi.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),to&&to(e,t)},Gi.__r=function(e){Yi&&Yi(e),Vi=0;var t=(Wi=e.__c).__H;t&&(zi===Wi?(t.__h=[],Wi.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0}))):(t.__h.forEach(ho),t.__h.forEach(vo),t.__h=[],Vi=0)),zi=Wi},Gi.diffed=function(e){Ji&&Ji(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==Qi.push(t)&&Zi===Gi.requestAnimationFrame||((Zi=Gi.requestAnimationFrame)||co)(uo)),t.__H.__.forEach((function(e){e.u&&(e.__H=e.u),e.u=void 0}))),zi=Wi=null},Gi.__c=function(e,t){t.some((function(e){try{e.__h.forEach(ho),e.__h=e.__h.filter((function(e){return!e.__||vo(e)}))}catch(r){t.some((function(e){e.__h&&(e.__h=[])})),t=[],Gi.__e(r,e.__v)}})),Ki&&Ki(e,t)},Gi.unmount=function(e){eo&&eo(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach((function(e){try{ho(e)}catch(e){t=e}})),r.__H=void 0,t&&Gi.__e(t,r.__v))};var lo="function"==typeof requestAnimationFrame;function co(e){var t,r=function(){clearTimeout(n),lo&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,35);lo&&(t=requestAnimationFrame(r))}function ho(e){var t=Wi,r=e.__c;"function"==typeof r&&(e.__c=void 0,r()),Wi=t}function vo(e){var t=Wi;e.__c=e.__(),Wi=t}function fo(e,t){return!e||e.length!==t.length||t.some((function(t,r){return t!==e[r]}))}function po(e,t){return"function"==typeof t?t(e):t}var mo={Tab:"tab",Selector:"selector"},yo={TopLeft:"top_left",TopRight:"top_right",TopCenter:"top_center",MiddleLeft:"middle_left",MiddleRight:"middle_right",MiddleCenter:"middle_center",Left:"left",Center:"center",Right:"right",NextToTrigger:"next_to_trigger"},go={Top:"top",Left:"left",Right:"right",Bottom:"bottom"},bo={Popover:"popover",API:"api",Widget:"widget",ExternalSurvey:"external_survey"},wo={Open:"open",MultipleChoice:"multiple_choice",SingleChoice:"single_choice",Rating:"rating",Link:"link"},ko={End:"end",ResponseBased:"response_based",SpecificQuestion:"specific_question"},xo="always",So={SHOWN:"survey shown",DISMISSED:"survey dismissed",SENT:"survey sent",ABANDONED:"survey abandoned"},Co={SURVEY_ID:"$survey_id",SURVEY_NAME:"$survey_name",SURVEY_ITERATION:"$survey_iteration",SURVEY_ITERATION_START_DATE:"$survey_iteration_start_date",SURVEY_PARTIALLY_COMPLETED:"$survey_partially_completed",SURVEY_SUBMISSION_ID:"$survey_submission_id",SURVEY_COMPLETED:"$survey_completed",SURVEY_LANGUAGE:"$survey_language"};function Io(e){return"$survey_response_"+e}function To(e,t){if(!t)return null;var r=e[Io(t)];return Yt(r)?[...r]:r}function Mo(e,t){void 0===e&&(e={});var n={};return t.questions.forEach((t=>{if(!er(t.originalQuestionIndex)){var r,i=0===(r=t.originalQuestionIndex)?"$survey_response":"$survey_response_"+r,o=To(e,t.id);er(o)||(n[i]=o)}})),r({$survey_questions:t.questions.map((t=>({id:t.id,question:t.question,response:To(e,t.id)})))},e,n)}function _o(e,t){var r="$survey_"+t+"/"+e.id;return e.current_iteration&&e.current_iteration>0&&(r="$survey_"+t+"/"+e.id+"/"+e.current_iteration),r}function Lo(e){return"string"==typeof e&&e.trim()?e.trim():null}function Eo(e){return e.toLowerCase()}function Oo(e,t,r){if(!e||!t)return null;var n=Eo(t),i=Object.keys(e).find((e=>Eo(e)===n));if(i)return null==r||r.debug("Found exact translation match: "+i),i;if(n.includes("-")){var o=n.split("-")[0],a=Object.keys(e).find((e=>Eo(e)===o));if(a)return null==r||r.debug("Found base language translation match: "+a+" (from "+t+")"),a}return null}function Ro(e,t,n){var i,o=Oo(e.translations,t,n),a=r({},e),s=!1;if(o){var u,l=null==(u=e.translations)?void 0:u[o];l&&(null==n||n.info("Applying survey-level translation for language: "+o),er(l.name)||(a.name=l.name,s=!0),a.appearance?(a.appearance=r({},a.appearance),er(l.thankYouMessageHeader)||(a.appearance.thankYouMessageHeader=l.thankYouMessageHeader,s=!0),er(l.thankYouMessageDescription)||(a.appearance.thankYouMessageDescription=l.thankYouMessageDescription,s=!0),er(l.thankYouMessageCloseButtonText)||(a.appearance.thankYouMessageCloseButtonText=l.thankYouMessageCloseButtonText,s=!0)):function(e){return!er(e.thankYouMessageHeader)||!er(e.thankYouMessageDescription)||!er(e.thankYouMessageCloseButtonText)}(l)&&(s=!0))}var c=e.questions.map((e=>function(e,t,n){var i,o=Oo(e.translations,t,n);if(!o)return{question:e,matchedKey:null,hasChanges:!1};var a=null==(i=e.translations)?void 0:i[o];if(!a)return{question:e,matchedKey:null,hasChanges:!1};var s=r({},e),u=!1;return er(a.question)||(s.question=a.question,u=!0),er(a.description)||(s.description=a.description,u=!0),er(a.buttonText)||(s.buttonText=a.buttonText,u=!0),"link"in s&&!er(a.link)&&(s.link=a.link,u=!0),"lowerBoundLabel"in s&&!er(a.lowerBoundLabel)&&(s.lowerBoundLabel=a.lowerBoundLabel,u=!0),"upperBoundLabel"in s&&!er(a.upperBoundLabel)&&(s.upperBoundLabel=a.upperBoundLabel,u=!0),"choices"in s&&function(e){return Yt(e.choices)}(a)&&(s.choices=a.choices,u=!0),{question:u?s:e,matchedKey:u?o:null,hasChanges:u}}(e,t,n))),d=c.map((e=>e.question)),h=c.some((e=>e.hasChanges)),v=null;return o||(v=(null==(i=c.find((e=>e.matchedKey)))?void 0:i.matchedKey)||null),h&&(a.questions=d,s=!0,null==n||n.info("Applied question-level translations for language: "+t)),{survey:a,matchedKey:s?o||v:null}}var No=on("[Surveys]"),Ao="inProgressSurvey_",Po=(e,t)=>{var r=""+e+t.id;return t.current_iteration&&t.current_iteration>0&&(r=""+e+t.id+"_"+t.current_iteration),r},qo=e=>Po("seenSurvey_",e),Do=e=>{try{var t=qo(e);if(localStorage.getItem(t))return;localStorage.setItem(t,"true")}catch(e){No.error("Failed to persist survey seen state",e)}},Fo=[bo.Popover,bo.Widget,bo.API];Math.trunc||(Math.trunc=function(e){return 0>e?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return ir(e)&&isFinite(e)&&Math.floor(e)===e});class jo{constructor(e){if(this.bytes=e,16!==e.length)throw new TypeError("not 128-bit length")}static fromFieldsV7(e,t,r,n){if(!Number.isInteger(e)||!Number.isInteger(t)||!Number.isInteger(r)||!Number.isInteger(n)||0>e||0>t||0>r||0>n||e>0xffffffffffff||t>4095||r>1073741823||n>4294967295)throw new RangeError("invalid field value");var i=new Uint8Array(16);return i[0]=e/Math.pow(2,40),i[1]=e/Math.pow(2,32),i[2]=e/Math.pow(2,24),i[3]=e/Math.pow(2,16),i[4]=e/Math.pow(2,8),i[5]=e,i[6]=112|t>>>8,i[7]=t,i[8]=128|r>>>24,i[9]=r>>>16,i[10]=r>>>8,i[11]=r,i[12]=n>>>24,i[13]=n>>>16,i[14]=n>>>8,i[15]=n,new jo(i)}toString(){for(var e="",t=0;this.bytes.length>t;t++)e=e+(this.bytes[t]>>>4).toString(16)+(15&this.bytes[t]).toString(16),3!==t&&5!==t&&7!==t&&9!==t||(e+="-");if(36!==e.length)throw new Error("Invalid UUIDv7 was generated");return e}clone(){return new jo(this.bytes.slice(0))}equals(e){return 0===this.compareTo(e)}compareTo(e){for(var t=0;16>t;t++){var r=this.bytes[t]-e.bytes[t];if(0!==r)return Math.sign(r)}return 0}}class Ho{constructor(){this.S=0,this.C=0,this.I=new Vo}generate(){var e=this.generateOrAbort();if(er(e)){this.S=0;var t=this.generateOrAbort();if(er(t))throw new Error("Could not generate UUID after timestamp reset");return t}return e}generateOrAbort(){var e=Date.now();if(e>this.S)this.S=e,this.T();else{if(this.S>=e+1e4)return;this.C++,this.C>4398046511103&&(this.S++,this.T())}return jo.fromFieldsV7(this.S,Math.trunc(this.C/Math.pow(2,30)),this.C&Math.pow(2,30)-1,this.I.nextUint32())}T(){this.C=1024*this.I.nextUint32()+(1023&this.I.nextUint32())}}var Uo,Bo=e=>{if("undefined"!=typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var t=0;e.length>t;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};Gr&&!er(Gr.crypto)&&crypto.getRandomValues&&(Bo=e=>crypto.getRandomValues(e));class Vo{constructor(){this.M=new Uint32Array(8),this.O=1/0}nextUint32(){return this.M.length>this.O||(Bo(this.M),this.O=0),this.M[this.O++]}}var Wo=()=>zo().toString(),zo=()=>(Uo||(Uo=new Ho)).generate(),Zo=function(e,t){if(!function(e){try{new RegExp(e)}catch(e){return!1}return!0}(t))return!1;try{return new RegExp(t).test(e)}catch(e){return!1}},$o={exact:(e,t)=>t.some((t=>e.some((e=>t===e)))),is_not:(e,t)=>t.every((t=>e.every((e=>t!==e)))),regex:(e,t)=>t.some((t=>e.some((e=>Zo(t,e))))),not_regex:(e,t)=>t.every((t=>e.every((e=>!Zo(t,e))))),icontains:(e,t)=>t.map(Qo).some((t=>e.map(Qo).some((e=>t.includes(e))))),not_icontains:(e,t)=>t.map(Qo).every((t=>e.map(Qo).every((e=>!t.includes(e))))),gt:(e,t)=>t.some((t=>{var r=parseFloat(t);return!isNaN(r)&&e.some((e=>r>parseFloat(e)))})),lt:(e,t)=>t.some((t=>{var r=parseFloat(t);return!isNaN(r)&&e.some((e=>r<parseFloat(e)))}))},Qo=e=>e.toLowerCase(),Go=null,Xo={R(){if(!rr(Go))return Go;var e=!0;if(er(Gr))e=!1;else try{var t="__mplssupport__";Xo.N(t,"xyz"),'"xyz"'!==Xo.A(t)&&(e=!1),Xo.q(t)}catch(t){e=!1}return e||nn.error("localStorage unsupported; falling back to cookie store"),Go=e,e},D(e){nn.error("localStorage error: "+e)},A(e){try{return null==Gr?void 0:Gr.localStorage.getItem(e)}catch(e){Xo.D(e)}return null},F(e){try{return JSON.parse(Xo.A(e))||{}}catch(e){}return null},N(e,t){try{null==Gr||Gr.localStorage.setItem(e,JSON.stringify(t))}catch(e){Xo.D(e)}},q(e){try{null==Gr||Gr.localStorage.removeItem(e)}catch(e){Xo.D(e)}}},Yo=on("[Stylesheet Loader]"),Jo=Gr,Ko=Jr,ea="#020617",ta={fontFamily:"inherit",backgroundColor:"#eeeded",submitButtonColor:"black",submitButtonTextColor:"white",ratingButtonColor:"white",ratingButtonActiveColor:"black",borderColor:"#c9c6c6",placeholder:"Start typing...",whiteLabel:!1,displayThankYouMessage:!0,thankYouMessageHeader:"Thank you for your feedback!",position:yo.Right,widgetType:mo.Tab,widgetLabel:"Feedback",widgetColor:"black",zIndex:String(2147483645),disabledButtonOpacity:"0.6",maxWidth:"300px",textSubtleColor:"#939393",boxPadding:"20px 24px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",borderRadius:"10px",shuffleQuestions:!1,surveyPopupDelaySeconds:void 0,outlineColor:"rgba(59, 130, 246, 0.8)",inputBackground:"white",inputTextColor:ea,scrollbarThumbColor:"var(--ph-survey-border-color)",scrollbarTrackColor:"var(--ph-survey-background-color)"},ra=[yo.Center,yo.Left,yo.Right];function na(e){if(e.startsWith("#")){var t=e.replace(/^#/,"");return/^[0-9A-Fa-f]{3}$/.test(t)&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),/^[0-9A-Fa-f]{6}$/.test(t)?"rgb("+parseInt(t.slice(0,2),16)+","+parseInt(t.slice(2,4),16)+","+parseInt(t.slice(4,6),16)+")":"rgb(255, 255, 255)"}return"rgb(255, 255, 255)"}function ia(e){var t;void 0===e&&(e=ta.backgroundColor),"#"===e[0]&&(t=na(e)),e.startsWith("rgb")&&(t=e);var r={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}[e.toLowerCase()];if(r&&(t=na(r)),!t)return ea;var n=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(n){var i=parseInt(n[1]),o=parseInt(n[2]),a=parseInt(n[3]);return Math.sqrt(i*i*.299+o*o*.587+a*a*.114)>127.5?ea:"white"}return ea}var oa=(e,t,n)=>{var i=Ca(e),o=Ko.querySelector("."+i);if(o&&o.shadowRoot)return{shadow:o.shadowRoot,isNewlyCreated:!1};var a=Ko.createElement("div");((e,t,n)=>{var i=r({},ta,n),o=e.style,a=!ra.includes(i.position)||t===bo.Widget&&(null==n?void 0:n.widgetType)===mo.Tab;o.setProperty("--ph-survey-font-family",function(e){if("inherit"===e)return"inherit";var t='BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"';return e?e+", "+t:"-apple-system, "+t}(i.fontFamily)),o.setProperty("--ph-survey-box-padding",i.boxPadding),o.setProperty("--ph-survey-max-width",i.maxWidth),o.setProperty("--ph-survey-z-index",i.zIndex),o.setProperty("--ph-survey-border-color",i.borderColor),a?(o.setProperty("--ph-survey-border-radius",i.borderRadius),o.setProperty("--ph-survey-border-bottom","1.5px solid var(--ph-survey-border-color)")):(o.setProperty("--ph-survey-border-bottom","none"),o.setProperty("--ph-survey-border-radius",i.borderRadius+" "+i.borderRadius+" 0 0")),o.setProperty("--ph-survey-background-color",i.backgroundColor),o.setProperty("--ph-survey-box-shadow",i.boxShadow),o.setProperty("--ph-survey-disabled-button-opacity",i.disabledButtonOpacity),o.setProperty("--ph-survey-submit-button-color",i.submitButtonColor),o.setProperty("--ph-survey-submit-button-text-color",(null==n?void 0:n.submitButtonTextColor)||ia(i.submitButtonColor)),o.setProperty("--ph-survey-rating-bg-color",i.ratingButtonColor),o.setProperty("--ph-survey-rating-active-bg-color",i.ratingButtonActiveColor),o.setProperty("--ph-survey-rating-active-text-color",ia(i.ratingButtonActiveColor)),o.setProperty("--ph-survey-text-primary-color",(null==n?void 0:n.textColor)||ia(i.backgroundColor)),o.setProperty("--ph-survey-text-subtle-color",i.textSubtleColor),o.setProperty("--ph-widget-color",i.widgetColor),o.setProperty("--ph-widget-text-color",ia(i.widgetColor)),o.setProperty("--ph-widget-z-index",i.zIndex);var s=(null==n?void 0:n.inputBackground)||(null==n?void 0:n.inputBackgroundColor),u=s||i.inputBackground;s||"white"!==i.backgroundColor||(u="#f8f8f8"),o.setProperty("--ph-survey-input-background",u);var l=(null==n?void 0:n.inputTextColor)||ia(u);o.setProperty("--ph-survey-input-text-color",l),o.setProperty("--ph-survey-rating-text-color",l),o.setProperty("--ph-survey-scrollbar-thumb-color",i.scrollbarThumbColor),o.setProperty("--ph-survey-scrollbar-track-color",i.scrollbarTrackColor),o.setProperty("--ph-survey-outline-color",i.outlineColor)})(a,e.type,e.appearance),a.className=i;var s=a.attachShadow({mode:"open"}),u=function(e){var t=((e,t,r)=>{var n,i=e.createElement("style");return i.innerText=':host{--ph-survey-font-family:-apple-system,BlinkMacSystemFont,"Inter","Segoe UI","Roboto",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--ph-survey-box-padding:20px 24px;--ph-survey-max-width:300px;--ph-survey-z-index:2147483645;--ph-survey-border-color:#dcdcdc;--ph-survey-border-bottom:1.5px solid var(--ph-survey-border-color);--ph-survey-border-radius:10px;--ph-survey-background-color:#eeeded;--ph-survey-box-shadow:0 4px 12px rgba(0,0,0,.15);--ph-survey-submit-button-color:#000;--ph-survey-submit-button-text-color:#fff;--ph-survey-rating-bg-color:#fff;--ph-survey-rating-text-color:#020617;--ph-survey-rating-active-bg-color:#000;--ph-survey-rating-active-text-color:#fff;--ph-survey-text-primary-color:#020617;--ph-survey-text-subtle-color:#939393;--ph-widget-color:#e0a045;--ph-widget-text-color:#fff;--ph-survey-scrollbar-thumb-color:var(--ph-survey-border-color);--ph-survey-scrollbar-track-color:var(--ph-survey-background-color);--ph-survey-outline-color:rgba(59,130,246,.8);--ph-survey-input-background:#fff;--ph-survey-input-text-color:#020617;--ph-survey-disabled-button-opacity:0.6}.ph-survey{bottom:0;height:fit-content;margin:0;max-width:85%;min-width:300px;position:fixed;width:var(--ph-survey-max-width);z-index:var(--ph-survey-z-index)}.ph-survey h3,.ph-survey p{margin:0}.ph-survey *{box-sizing:border-box;color:var(--ph-survey-text-primary-color);font-family:var(--ph-survey-font-family)}.ph-survey .multiple-choice-options label,.ph-survey input[type=text],.ph-survey textarea{background:var(--ph-survey-input-background);border:1.5px solid var(--ph-survey-border-color);border-radius:4px;color:var(--ph-survey-input-text-color);padding:10px;transition:border-color .2s ease-out,box-shadow .2s ease-out,transform .15s ease-out}.ph-survey input[type=text],.ph-survey textarea{transition:border-color .2s ease-out,box-shadow .2s ease-out,transform .15s ease-out}.ph-survey input{margin:0}.ph-survey .form-submit:focus,.ph-survey .form-submit:focus-visible,.ph-survey input[type=checkbox]:focus,.ph-survey input[type=checkbox]:focus-visible,.ph-survey input[type=radio]:focus,.ph-survey input[type=radio]:focus-visible,.ph-survey input[type=text]:focus,.ph-survey input[type=text]:focus-visible,.ph-survey textarea:focus,.ph-survey textarea:focus-visible{border-color:var(--ph-survey-rating-active-bg-color);outline:1.5px solid var(--ph-survey-outline-color);outline-offset:2px}.ph-survey button:focus:not(:focus-visible),.ph-survey input[type=checkbox]:focus:not(:focus-visible),.ph-survey input[type=radio]:focus:not(:focus-visible),.ph-survey input[type=text]:focus:not(:focus-visible),.ph-survey textarea:focus:not(:focus-visible){outline:none}.ph-survey input[type=text]:hover:not(:focus),.ph-survey textarea:hover:not(:focus){border-color:var(--ph-survey-rating-active-bg-color)}@media (max-width:768px){.ph-survey input[type=text],.ph-survey textarea{font-size:1rem}}.ph-survey .form-cancel,.ph-survey .multiple-choice-options label,.ph-survey .rating-options-number,.ph-survey input[type=checkbox],.ph-survey input[type=radio]{border:1.5px solid var(--ph-survey-border-color)}.ph-survey .footer-branding,.ph-survey .form-cancel,.ph-survey .form-submit,.ph-survey .ratings-emoji,.ph-survey .ratings-number,.ph-survey input[type=checkbox],.ph-survey input[type=radio],.ph-survey label{transition:all .2s ease-out}@media (prefers-reduced-motion:no-preference){.ph-survey button:active,.ph-survey input[type=checkbox]:active,.ph-survey input[type=radio]:active,.ph-survey label:active{transition-duration:.1s}}.ph-survey-widget-tab{background:var(--ph-widget-color);border:none;border-radius:3px 3px 0 0;color:var(--ph-widget-text-color);cursor:pointer;padding:10px 12px;position:fixed;text-align:center;transition:padding .2s ease-out;z-index:var(--ph-survey-z-index)}.ph-survey-widget-tab:hover:not(.widget-tab-top){padding-bottom:16px}.ph-survey-widget-tab.widget-tab-top{border-radius:0 0 3px 3px}.ph-survey-widget-tab.widget-tab-top:hover{padding-top:16px}@keyframes ph-survey-fade-in{0%{opacity:0}to{opacity:1}}.survey-box{gap:16px}.bottom-section,.survey-box{display:flex;flex-direction:column}.bottom-section{gap:8px}.thank-you-message-header~.bottom-section{padding-top:16px}.question-container,.thank-you-message{display:flex;flex-direction:column;gap:8px}.survey-question{font-size:14px;font-weight:500}.survey-question-description{font-size:13px;opacity:.8;padding-top:4px}.survey-question-description,.thank-you-message-body{word-wrap:break-word;overflow-wrap:break-word}:is(.survey-question-description,.thank-you-message-body) embed,:is(.survey-question-description,.thank-you-message-body) iframe,:is(.survey-question-description,.thank-you-message-body) img,:is(.survey-question-description,.thank-you-message-body) object,:is(.survey-question-description,.thank-you-message-body) video{height:auto;max-width:100%}:is(.survey-question-description,.thank-you-message-body) svg{height:auto;max-width:100%}.question-textarea-wrapper{display:flex;flex-direction:column}.survey-form{animation:ph-survey-fade-in .3s ease-out forwards}.survey-form,.thank-you-message{background:var(--ph-survey-background-color);border:1.5px solid var(--ph-survey-border-color);border-bottom:var(--ph-survey-border-bottom);border-radius:var(--ph-survey-border-radius);box-shadow:var(--ph-survey-box-shadow);margin:0;padding:var(--ph-survey-box-padding);position:relative;text-align:left;width:100%;z-index:var(--ph-survey-z-index)}.survey-form input[type=text],.survey-form textarea{min-width:100%}:is(.survey-form textarea):focus,:is(.survey-form textarea):focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.08)}:is(.survey-form textarea):focus:not(:focus-visible){box-shadow:none}.survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) .multiple-choice-options,.survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) textarea{margin-top:0}.multiple-choice-options{border:none;display:flex;flex-direction:column;font-size:14px;gap:8px;margin:0;padding:1px 0}.multiple-choice-options .response-choice,.multiple-choice-options label{align-items:center;color:inherit;display:flex;gap:8px}.multiple-choice-options label{cursor:pointer;font-size:13px}:is(.multiple-choice-options label):hover:not(:has(input:checked)){border-color:var(--ph-survey-text-subtle-color);box-shadow:0 2px 8px rgba(0,0,0,.08)}:is(.multiple-choice-options label):has(input:checked){border-color:var(--ph-survey-rating-active-bg-color);box-shadow:0 1px 4px rgba(0,0,0,.05)}.choice-option-open:is(.multiple-choice-options label){flex-wrap:wrap}:is(.multiple-choice-options label) span{color:inherit}.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]{appearance:none;-webkit-appearance:none;-moz-appearance:none;background:var(--ph-survey-input-background);border-radius:3px;cursor:pointer;flex-shrink:0;height:1rem;position:relative;transition:all .2s cubic-bezier(.4,0,.2,1),transform .15s ease-out;width:1rem;z-index:1}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):focus{transform:scale(1.05)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):hover{border-color:var(--ph-survey-rating-active-bg-color);transform:scale(1.05)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):active{transform:scale(.95)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):checked{background:var(--ph-survey-rating-active-bg-color);border-color:var(--ph-survey-rating-active-bg-color);transform:scale(1)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):checked:hover{transform:scale(1.05)}.multiple-choice-options input[type=checkbox]:checked:after{animation:ph-survey-checkmark-reveal .2s ease-out .1s forwards;border:solid var(--ph-survey-rating-active-text-color);border-width:0 2px 2px 0;height:8px;left:4px;transform:rotate(45deg) scale(0);width:4px}.multiple-choice-options input[type=radio]:checked:after{animation:ph-survey-radio-reveal .15s ease-out .05s forwards;background:var(--ph-survey-rating-active-text-color);border-radius:50%;height:6px;left:5px;top:5px;transform:scale(0);width:6px}.multiple-choice-options input[type=checkbox]:checked:after,.multiple-choice-options input[type=radio]:checked:after{box-sizing:content-box;content:"";position:absolute}.multiple-choice-options input[type=radio]{border-radius:50%}.multiple-choice-options input[type=radio]:checked{border:none}:is(.multiple-choice-options input[type=checkbox]:checked,.multiple-choice-options input[type=radio]:checked)~*{font-weight:700}:is(:is(.multiple-choice-options .choice-option-open) input[type=text])::placeholder{color:var(--ph-survey-text-subtle-color);font-weight:400}.rating-options-emoji{display:flex;justify-content:space-between}.rating-options-emoji-2{justify-content:space-around}.ratings-emoji{background-color:transparent;border:none;font-size:16px;opacity:.5;padding:0}.ratings-emoji:hover{cursor:pointer;opacity:1;transform:scale(1.15)}.ratings-emoji.rating-active{opacity:1}.ratings-emoji svg{fill:var(--ph-survey-text-primary-color);transition:fill .2s ease-out}.rating-options-number{border-radius:6px;display:grid;grid-auto-columns:1fr;grid-auto-flow:column;overflow:hidden}.rating-options-number .ratings-number{border:none;border-right:1px solid var(--ph-survey-border-color);color:var(--ph-survey-rating-text-color);cursor:pointer;font-weight:700;text-align:center}:is(.rating-options-number .ratings-number):last-of-type{border-right:0}.rating-active:is(.rating-options-number .ratings-number){background:var(--ph-survey-rating-active-bg-color);color:var(--ph-survey-rating-active-text-color)}.ratings-number{background-color:var(--ph-survey-rating-bg-color);border:none;padding:8px 0}.ratings-number .rating-active{background-color:var(--ph-survey-rating-active-bg-color)}.ratings-number{cursor:pointer}@media (hover:hover) and (pointer:fine){.ratings-number:hover:not(.rating-active){background-color:color-mix(in srgb,var(--ph-survey-rating-active-bg-color) 14%,var(--ph-survey-rating-bg-color))}}.rating-text{display:flex;flex-direction:row;font-size:11px;justify-content:space-between;opacity:.7}.form-submit{background:var(--ph-survey-submit-button-color);border:none;border-radius:6px;box-shadow:0 2px 0 rgba(0,0,0,.045);color:var(--ph-survey-submit-button-text-color);cursor:pointer;font-weight:700;min-width:100%;padding:12px;text-align:center;user-select:none}.form-submit:not([disabled]):hover{box-shadow:0 4px 8px rgba(0,0,0,.1);transform:scale(1.02)}.form-submit:not([disabled]):active{box-shadow:0 1px 2px rgba(0,0,0,.05);transform:scale(.98)}.form-submit[disabled]{cursor:not-allowed;opacity:var(--ph-survey-disabled-button-opacity)}.validation-hint{font-size:12px;margin-top:4px;opacity:.7}.form-cancel{background:#fff;border-radius:100%;cursor:pointer;line-height:0;padding:12px;position:absolute;right:0;top:0;transform:translate(50%,-50%)}.form-cancel:hover{opacity:.7;transform:translate(50%,-50%) scale(1.1)}.footer-branding{align-items:center;display:flex;font-size:11px;font-weight:500;gap:4px;justify-content:center;opacity:.6;text-decoration:none}.footer-branding:hover{opacity:1}.footer-branding a{text-decoration:none}.thank-you-message{text-align:center}.thank-you-message-header{margin:10px 0 0}.thank-you-message-body{font-size:14px;opacity:.8}.limit-height{max-height:256px;overflow-x:hidden;overflow-y:auto;scrollbar-color:var(--ph-survey-scrollbar-thumb-color) var(--ph-survey-scrollbar-track-color);scrollbar-width:thin}.limit-height::-webkit-scrollbar{width:8px}.limit-height::-webkit-scrollbar-track{background:var(--ph-survey-scrollbar-track-color);border-radius:4px}.limit-height::-webkit-scrollbar-thumb{background-color:var(--ph-survey-scrollbar-thumb-color);border:2px solid var(--ph-survey-scrollbar-track-color);border-radius:4px}:is(.limit-height::-webkit-scrollbar-thumb):hover{background-color:var(--ph-survey-text-subtle-color)}.sr-only{clip:rect(0,0,0,0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}@media (prefers-reduced-motion:reduce){.ph-survey *{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}@keyframes ph-survey-checkmark-reveal{0%{opacity:0;transform:rotate(45deg) scale(0)}50%{opacity:1;transform:rotate(45deg) scale(1.2)}to{opacity:1;transform:rotate(45deg) scale(1)}}@keyframes ph-survey-radio-reveal{0%{opacity:0;transform:scale(0)}50%{opacity:1;transform:scale(1.3)}to{opacity:1;transform:scale(1)}}',null!=r&&null!=(n=r.config)&&n.prepare_external_dependency_stylesheet&&(i=r.config.prepare_external_dependency_stylesheet(i)),i||(Yo.error("prepare_external_dependency_stylesheet returned null"),null)})(Ko,0,e);return null==t||t.setAttribute("data-ph-survey-style","true"),t}(t);if(u){var l=s.querySelector("style");l&&s.removeChild(l),s.appendChild(u)}return Ko.body.appendChild(a),{shadow:s,isNewlyCreated:!0}},aa=e=>{var{responses:t,survey:n,surveySubmissionId:i,posthog:o,isSurveyCompleted:a,properties:s,surveyLanguage:u}=e;o?(Do(n),o.capture(So.SENT,r({[Co.SURVEY_NAME]:n.name,[Co.SURVEY_ID]:n.id,[Co.SURVEY_ITERATION]:n.current_iteration,[Co.SURVEY_ITERATION_START_DATE]:n.current_iteration_start_date,[Co.SURVEY_SUBMISSION_ID]:i,[Co.SURVEY_COMPLETED]:a},u&&{[Co.SURVEY_LANGUAGE]:u},{sessionRecordingUrl:null==o.get_session_replay_url?void 0:o.get_session_replay_url()},Mo(t,n),s,{$set:{[_o(n,"responded")]:!0}})),a&&(Jo.dispatchEvent(new CustomEvent("PHSurveySent",{detail:{surveyId:n.id}})),Sa(n))):No.error("[survey sent] event not captured, PostHog instance not found.")},sa=(e,t,n)=>{return r({[Co.SURVEY_NAME]:e.name,[Co.SURVEY_ID]:e.id,[Co.SURVEY_ITERATION]:e.current_iteration,[Co.SURVEY_ITERATION_START_DATE]:e.current_iteration_start_date,[Co.SURVEY_PARTIALLY_COMPLETED]:(i=null==t?void 0:t.responses,void 0===i&&(i={}),Object.values(i).some((e=>!nr(e))))},(null==t?void 0:t.surveyLanguage)&&{[Co.SURVEY_LANGUAGE]:t.surveyLanguage},{sessionRecordingUrl:null==n.get_session_replay_url?void 0:n.get_session_replay_url(),[Co.SURVEY_SUBMISSION_ID]:null==t?void 0:t.surveySubmissionId},Mo(null==t?void 0:t.responses,e));var i},ua=(e,t,n,i)=>{if(t){if(!n){var o=ka(e);t.capture(So.DISMISSED,r({},sa(e,o,t),i&&{[Co.SURVEY_LANGUAGE]:i},{$set:{[_o(e,"dismissed")]:!0}})),Sa(e),Do(e),Jo.dispatchEvent(new CustomEvent("PHSurveyClosed",{detail:{surveyId:e.id}}))}}else No.error("[survey dismissed] event not captured, PostHog instance not found.")},la=(e,t)=>{if(t){var r=(e=>Po("abandonedSurvey_",e))(e);try{if("true"===localStorage.getItem(r))return}catch(e){return}var n=ka(e);if(n){try{localStorage.setItem(r,"true")}catch(e){}t.capture(So.ABANDONED,sa(e,n,t),{transport:"sendBeacon"})}}else No.error("[survey abandoned] event not captured, PostHog instance not found.")},ca=e=>e.map((e=>({sort:Math.floor(10*Math.random()),value:e}))).sort(((e,t)=>e.sort-t.sort)).map((e=>e.value)),da=(e,t)=>e.length===t.length&&e.every(((e,r)=>e===t[r]))?t.reverse():t,ha=e=>e.appearance&&e.appearance.shuffleQuestions&&!e.enable_partial_responses?da(e.questions,ca(e.questions)):e.questions,va=e=>{var t;return!(null==(t=e.conditions)||null==(t=t.events)||!t.repeatedActivation||!(e=>{var t,r;return null!=(null==(t=e.conditions)||null==(t=t.events)||null==(t=t.values)?void 0:t.length)&&(null==(r=e.conditions)||null==(r=r.events)||null==(r=r.values)?void 0:r.length)>0})(e))||e.schedule===xo||xa(e)},fa=function(e){function t(e){var r,n;return this.getChildContext||(r=new Set,(n={})[t.__c]=this,this.getChildContext=function(){return n},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&r.forEach((function(e){e.__e=!0,_i(e)}))},this.sub=function(e){r.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r&&r.delete(e),t&&t.call(e)}}),e.children}return t.__c="__cC"+pi++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}({isPreviewMode:!1,previewPageIndex:0,onPopupSurveyDismissed(){},isPopup:!0,onPreviewSubmit(){},surveySubmissionId:"",properties:void 0,surveyLanguage:null}),pa=()=>so(fa),ma=e=>{var{component:t,children:r,renderAsHtml:n,style:i}=e;return function(e,t,r){var n,i,o,a,s=wi({},e.props);for(o in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)"key"==o?n=t[o]:"ref"==o?i=t[o]:s[o]=void 0===t[o]&&null!=a?a[o]:t[o];return arguments.length>2&&(s.children=arguments.length>3?ii.call(arguments,2):r),Si(e.type,s,n||e.key,i||e.ref,null)}(t,n?{dangerouslySetInnerHTML:{__html:r},style:i}:{children:r,style:i})};function ya(e){var t,r,n;if(null==(t=e.conditions)||!t.url)return!0;var i=null==Jo||null==(r=Jo.location)?void 0:r.href;if(!i)return!1;var o=[e.conditions.url],a=function(e){return null!=e?e:"icontains"}(null==(n=e.conditions)?void 0:n.urlMatchType);return $o[a](o,[i])}function ga(e){var t,r;return function(e,t){var r,n,i;if(!e||0===e.length)return!0;if(!Kr)return!1;var o,a,s,u,l,c,d=(o={userAgentDataPlatform:null==Yr||null==(r=Yr.userAgentData)?void 0:r.platform,maxTouchPoints:null==Yr?void 0:Yr.maxTouchPoints,screenWidth:null==Gr||null==(n=Gr.screen)?void 0:n.width,screenHeight:null==Gr||null==(i=Gr.screen)?void 0:i.height,devicePixelRatio:null==Gr?void 0:Gr.devicePixelRatio},(c=function(e){return Or.test(e)?wr:Er.test(e)?kr:Lr.test(e)?xr:new RegExp(Ir,"i").test(e)?Ir:new RegExp("("+Sr+"|WPDesktop)","i").test(e)?Sr:/iPad/.test(e)?yr:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?gr:Rr.test(e)?br:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(Cr,"i").test(e)?Cr:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?new RegExp(vr).test(e)&&!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)||/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?fr:mr:new RegExp("(pda|"+vr+")","i").test(e)?Mr:new RegExp(pr,"i").test(e)&&!new RegExp(pr+" pc","i").test(e)?_r:""}(Kr))===yr||c===mr||"Kobo"===c||"Kindle Fire"===c||c===_r?pr:c===wr||c===xr||c===kr||c===Ir?"Console":c===gr?"Wearable":c?vr:"Android"===(null==o?void 0:o.userAgentDataPlatform)&&(null!==(a=null==o?void 0:o.maxTouchPoints)&&void 0!==a?a:0)>0?600>Math.min(null!==(s=null==o?void 0:o.screenWidth)&&void 0!==s?s:0,null!==(u=null==o?void 0:o.screenHeight)&&void 0!==u?u:0)/(null!==(l=null==o?void 0:o.devicePixelRatio)&&void 0!==l?l:1)?vr:pr:"Desktop");return $o[null!=t?t:"icontains"](e,[d])}(null==(t=e.conditions)?void 0:t.deviceTypes,null==(r=e.conditions)?void 0:r.deviceTypesMatchType)}var ba=e=>{var t=""+Ao+e.id;return e.current_iteration&&e.current_iteration>0&&(t=""+Ao+e.id+"_"+e.current_iteration),t},wa=(e,t)=>{try{localStorage.setItem(ba(e),JSON.stringify(t))}catch(e){No.error("Error setting in-progress survey state in localStorage",e)}},ka=e=>{try{var t=localStorage.getItem(ba(e));if(t)return JSON.parse(t)}catch(e){No.error("Error getting in-progress survey state from localStorage",e)}return null},xa=e=>{var t=ka(e);return!nr(null==t?void 0:t.surveySubmissionId)},Sa=e=>{try{localStorage.removeItem(ba(e))}catch(e){No.error("Error clearing in-progress survey state from localStorage",e)}};function Ca(e,t){void 0===t&&(t=!1);var r="PostHogSurvey-"+e.id;return t?"."+r:r}function Ia(e,t,r){if(void 0===t&&(t=yo.Right),e===bo.ExternalSurvey)return{};switch(t){case yo.TopLeft:return{top:"0",left:"0",transform:"translate(30px, 30px)"};case yo.TopRight:return{top:"0",right:"0",transform:"translate(-30px, 30px)"};case yo.TopCenter:return{top:"0",left:"50%",transform:"translate(-50%, 30px)"};case yo.MiddleLeft:return{top:"50%",left:"0",transform:"translate(30px, -50%)"};case yo.MiddleRight:return{top:"50%",right:"0",transform:"translate(-30px, -50%)"};case yo.MiddleCenter:return{top:"50%",left:"50%",transform:"translate(-50%, -50%)"};case yo.Left:return{left:"30px"};case yo.Center:return{left:"50%",transform:"translateX(-50%)"};default:return{right:e===bo.Widget&&r===mo.Tab?"60px":"30px"}}}var Ta=0;function Ma(e,t,r,n,i,o){t||(t={});var a,s,u=t;if("ref"in u)for(s in u={},t)"ref"==s?a=t[s]:u[s]=t[s];var l={type:e,props:u,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Ta,__i:-1,__u:0,__source:i,__self:o};if("function"==typeof e&&(a=e.defaultProps))for(s in a)void 0===u[s]&&(u[s]=a[s]);return oi.vnode&&oi.vnode(l),l}var _a=Ma("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Ma("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"})}),La=Ma("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Ma("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm20 194h253v-49H354v49ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Ea=Ma("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Ma("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"})}),Oa=Ma("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Ma("path",{d:"M480-417q-67 0-121.5 37.5T278-280h404q-25-63-80-100t-122-37Zm-183-72 50-45 45 45 31-36-45-45 45-45-31-36-45 45-50-45-31 36 45 45-45 45 31 36Zm272 0 44-45 51 45 31-36-45-45 45-45-31-36-51 45-44-45-31 36 44 45-44 45 31 36ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142 0 241-99t99-241q0-142-99-241t-241-99q-142 0-241 99t-99 241q0 142 99 241t241 99Z"})}),Ra=Ma("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Ma("path",{d:"M479.504-261Q537-261 585.5-287q48.5-26 78.5-72.4 6-11.6-.75-22.6-6.75-11-20.25-11H316.918Q303-393 296.5-382t-.5 22.6q30 46.4 78.5 72.4 48.5 26 105.004 26ZM347-578l27 27q7.636 8 17.818 8Q402-543 410-551q8-8 8-18t-8-18l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.636-8 17.818Q276-559 284-551q8 8 18 8t18-8l27-27Zm267 0 27 27q7.714 8 18 8t18-8q8-7.636 8-17.818Q685-579 677-587l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.714-8 18t8 18q7.636 8 17.818 8Q579-543 587-551l27-27ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Na=Ma("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 0 24 24",width:"48",children:Ma("path",{d:"M2 20h2c.55 0 1-.45 1-1v-9c0-.55-.45-1-1-1H2v11zm19.83-7.12c.11-.25.17-.52.17-.8V11c0-1.1-.9-2-2-2h-5.5l.92-4.65c.05-.22.02-.46-.08-.66-.23-.45-.52-.86-.88-1.22L14 2 7.59 8.41C7.21 8.79 7 9.3 7 9.83v7.84C7 18.95 8.05 20 9.34 20h8.11c.7 0 1.36-.37 1.72-.97l2.66-6.15z"})}),Aa=Ma("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 0 24 24",width:"48",children:Ma("path",{d:"M22 4h-2c-.55 0-1 .45-1 1v9c0 .55.45 1 1 1h2V4zM2.17 11.12c-.11.25-.17.52-.17.8V13c0 1.1.9 2 2 2h5.5l-.92 4.65c-.05.22-.02.46.08.66.23.45.52.86.88 1.22L10 22l6.41-6.41c.38-.38.59-.89.59-1.42V6.34C17 5.05 15.95 4 14.66 4H6.55c-.7 0-1.36.37-1.72.97l-2.66 6.15z"})}),Pa=function(e){var{fill:t="currentColor"}=void 0===e?{}:e;return Ma("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:t,xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"close-survey-title-adam",children:[Ma("title",{id:"close-survey-title",className:"adam-testing",children:"Close survey"}),Ma("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:t})]})},qa=Ma("svg",{width:"77",height:"14",viewBox:"0 0 77 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Ma("g",{"clip-path":"url(#clip0_2415_6911)",children:[Ma("mask",{id:"mask0_2415_6911",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"77",height:"14",children:Ma("path",{d:"M0.5 0H76.5V14H0.5V0Z",fill:"white"})}),Ma("g",{mask:"url(#mask0_2415_6911)",children:[Ma("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"}),Ma("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"}),Ma("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"}),Ma("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"}),Ma("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"}),Ma("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"})]})]}),Ma("defs",{children:Ma("clipPath",{id:"clip0_2415_6911",children:Ma("rect",{width:"76",height:"14",fill:"white",transform:"translate(0.5)"})})})]});function Da(e){var{urlParams:t}=e,r=t?Object.entries(t).map((e=>{var[t,r]=e;return encodeURIComponent(t)+"="+encodeURIComponent(r)})).join("&"):"";return Ma("a",{href:"https://posthog.com/surveys"+(r?"?"+r:""),target:"_blank",rel:"noopener",className:"footer-branding",children:["Survey by ",qa]})}function Fa(e){var{text:t,submitDisabled:r,appearance:n,onSubmit:i,link:o,onPreviewSubmit:a,skipSubmitButton:s}=e,{isPreviewMode:u}=so(fa);return Ma("div",{className:"bottom-section",children:[!s&&Ma("button",{className:"form-submit",disabled:r,"aria-label":"Submit survey",type:"button",onClick(){o&&(null==Gr||Gr.open(o)),u?null==a||a():i()},children:t}),!n.whiteLabel&&Ma(Da,{urlParams:{utm_source:"survey-footer"}})]})}function ja(e){var{question:t,forceDisableHtml:r,htmlFor:n}=e;return Ma("div",{class:"question-header",children:[Ma(t.type===wo.Open?"label":"h3",{className:"survey-question",htmlFor:n,children:t.question}),t.description&&ma({component:xi("p",{className:"survey-question-description"}),children:t.description,renderAsHtml:!r&&"text"!==t.descriptionContentType})]})}function Ha(e){var{onClick:t}=e,{isPreviewMode:r}=so(fa);return Ma("button",{className:"form-cancel",onClick:t,disabled:r,"aria-label":"Close survey",type:"button",children:Pa({fill:"black"})})}Ma("svg",{width:"16",height:"12",viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Ma("path",{d:"M5.30769 10.6923L4.77736 11.2226C4.91801 11.3633 5.10878 11.4423 5.30769 11.4423C5.5066 11.4423 5.69737 11.3633 5.83802 11.2226L5.30769 10.6923ZM15.5303 1.53033C15.8232 1.23744 15.8232 0.762563 15.5303 0.46967C15.2374 0.176777 14.7626 0.176777 14.4697 0.46967L15.5303 1.53033ZM1.53033 5.85429C1.23744 5.56139 0.762563 5.56139 0.46967 5.85429C0.176777 6.14718 0.176777 6.62205 0.46967 6.91495L1.53033 5.85429ZM5.83802 11.2226L15.5303 1.53033L14.4697 0.46967L4.77736 10.162L5.83802 11.2226ZM0.46967 6.91495L4.77736 11.2226L5.83802 10.162L1.53033 5.85429L0.46967 6.91495Z",fill:"currentColor"})});var Ua=Gr;function Ba(e){var{header:t,description:r,contentType:n,forceDisableHtml:i,appearance:o,onClose:a}=e,{isPopup:s}=so(fa);return io((()=>{var e=e=>{"Enter"!==e.key&&"Escape"!==e.key||(e.preventDefault(),a())};return ln(Ua,"keydown",e),()=>{Ua.removeEventListener("keydown",e)}}),[a]),Ma("div",{className:"thank-you-message",role:"status",tabIndex:0,"aria-atomic":"true",children:[s&&!0!==o.hideCancelButton&&Ma(Ha,{onClick:()=>a()}),Ma("h3",{className:"thank-you-message-header",children:t}),r&&ma({component:xi("p",{className:"thank-you-message-body"}),children:r,renderAsHtml:!i&&"text"!==n}),s&&Ma(Fa,{text:o.thankYouMessageCloseButtonText||"Close",submitDisabled:!1,appearance:o,onSubmit:()=>a()})]})}var Va=e=>Yt(e)&&e.every((e=>tr(e)));function Wa(e){var{question:t,forceDisableHtml:r,appearance:n,onSubmit:i,onPreviewSubmit:o,displayQuestionIndex:a,initialValue:s}=e,{isPreviewMode:u}=pa(),l=oo(null),[c,d]=no((()=>tr(s)?s:""));io((()=>{setTimeout((()=>{var e;u||null==(e=l.current)||e.focus()}),100)}),[u]);var h="surveyQuestion"+a,v=ao((()=>function(e,t,r){var n,i,o=e.trim();if(!r&&""===o)return"This field is required";if(""===o)return!1;if(t&&t.length>0)for(var a of t)switch(a.type){case zt.MinLength:if(void 0!==a.value&&a.value>o.length)return null!==(n=a.errorMessage)&&void 0!==n?n:"Please enter at least "+a.value+" characters";break;case zt.MaxLength:if(void 0!==a.value&&o.length>a.value)return null!==(i=a.errorMessage)&&void 0!==i?i:"Please enter no more than "+a.value+" characters"}return!1}(c,t.validation,t.optional)),[c,t.validation,t.optional]),f=Nr(t.validation,zt.MinLength),p=Nr(t.validation,zt.MaxLength),m=ao((()=>function(e,t){var r=1===e?void 0:e;return r&&t?"Enter "+r+"-"+t+" characters":r?"Enter at least "+r+" "+(1===r?"character":"characters"):t?"Maximum "+t+" "+(1===t?"character":"characters"):void 0}(f,p)),[f,p]),y=()=>{v||i(c.trim())},g=()=>{v||o(c.trim())};return Ma(Ci,{children:[Ma("div",{className:"question-container",children:[Ma(ja,{question:t,forceDisableHtml:r,htmlFor:h}),Ma("textarea",{ref:l,id:h,rows:4,placeholder:null==n?void 0:n.placeholder,minLength:f,maxLength:p,onInput(e){d(e.currentTarget.value),e.stopPropagation()},onKeyDown(e){e.stopPropagation(),"Enter"!==e.key||!e.metaKey&&!e.ctrlKey||v||(e.preventDefault(),u?g():y())},value:c}),m&&Ma("div",{className:"validation-hint",children:m})]}),Ma(Fa,{text:t.buttonText||"Submit",submitDisabled:!!v,appearance:n,onSubmit:y,onPreviewSubmit:g})]})}function za(e){var{question:t,forceDisableHtml:r,appearance:n,onSubmit:i,onPreviewSubmit:o}=e;return Ma(Ci,{children:[Ma("div",{className:"question-container",children:Ma(ja,{question:t,forceDisableHtml:r})}),Ma(Fa,{text:t.buttonText||"Submit",submitDisabled:!1,link:t.link,appearance:n,onSubmit:()=>i("link clicked"),onPreviewSubmit:()=>o("link clicked")})]})}function Za(e){var t,{question:r,forceDisableHtml:n,displayQuestionIndex:i,appearance:o,onSubmit:a,onPreviewSubmit:s,initialValue:u}=e,l=r.scale,c=10===r.scale?0:1,[d,h]=no((()=>ir(u)?u:Yt(u)&&u.length>0&&ir(parseInt(u[0]))?parseInt(u[0]):tr(u)&&ir(parseInt(u))?parseInt(u):null)),v="emoji"===r.display&&2===r.scale,{isPreviewMode:f}=pa(),p=e=>f?s(e):a(e);return Ma(Ci,{children:[Ma("div",{className:"question-container",children:[Ma(ja,{question:r,forceDisableHtml:n}),Ma("div",{className:"rating-section",children:[Ma("div",{className:"rating-options",children:["emoji"===r.display&&Ma("div",{className:"rating-options-emoji"+(v?" rating-options-emoji-2":""),children:null==(t=Ja[r.scale])?void 0:t.map(((e,t)=>Ma("button",{"aria-label":"Rate "+(t+1),className:"ratings-emoji question-"+i+"-rating-"+t+" "+(t+1===d?"rating-active":""),value:t+1,type:"button",onClick(){var e=t+1;h(e),r.skipSubmitButton&&p(e)},children:e},t)))}),"number"===r.display&&Ma("div",{className:"rating-options-number",style:{gridTemplateColumns:"repeat("+(l-c+1)+", minmax(0, 1fr))"},children:Ka(r.scale).map(((e,t)=>Ma($a,{displayQuestionIndex:i,active:d===e,appearance:o,num:e,setActiveNumber(e){h(e),r.skipSubmitButton&&p(e)}},t)))})]}),!v&&Ma("div",{className:"rating-text",children:[Ma("div",{children:r.lowerBoundLabel}),Ma("div",{children:r.upperBoundLabel})]})]})]}),Ma(Fa,{text:r.buttonText||(null==o?void 0:o.submitButtonText)||"Submit",submitDisabled:rr(d)&&!r.optional,appearance:o,onSubmit:()=>a(d),onPreviewSubmit:()=>s(d),skipSubmitButton:r.skipSubmitButton})]})}function $a(e){var{num:t,active:r,displayQuestionIndex:n,setActiveNumber:i}=e;return Ma("button",{"aria-label":"Rate "+t,className:"ratings-number question-"+n+"-rating-"+t+" "+(r?"rating-active":""),type:"button",onClick(){i(t)},children:t})}function Qa(e){var{question:t,forceDisableHtml:n,displayQuestionIndex:i,appearance:o,onSubmit:a,onPreviewSubmit:s,initialValue:u}=e,l=oo(null),c=ao((()=>(e=>{if(!e.shuffleOptions)return e.choices;var t=e.choices,r="";e.hasOpenChoice&&(r=t.pop());var n=da(t,ca(t));return e.hasOpenChoice&&(e.choices.push(r),n.push(r)),n})(t)),[t]),[d,h]=no((()=>((e,t)=>tr(e)||Va(e)?e:t===wo.SingleChoice?null:[])(u,t.type))),[v,f]=no((()=>((e,t)=>{if(tr(e)&&!t.includes(e))return{isSelected:!0,inputValue:e};if(Va(e)){var r=e.find((e=>!t.includes(e)));if(r)return{isSelected:!0,inputValue:r}}return{isSelected:!1,inputValue:""}})(u,c))),{isPreviewMode:p}=pa(),m=t.type===wo.SingleChoice,y=t.type===wo.MultipleChoice,g=t.skipSubmitButton&&m&&!t.hasOpenChoice,b=(e,t)=>{if(t){var n=!v.isSelected;return f((e=>r({},e,{isSelected:n,inputValue:n?e.inputValue:""}))),m&&h(""),void(n&&setTimeout((()=>{var e;return null==(e=l.current)?void 0:e.focus()}),75))}if(m)return h(e),f((e=>r({},e,{isSelected:!1,inputValue:""}))),void(g&&(a(e),p&&s(e)));y&&Yt(d)&&(d.includes(e)?h(d.filter((t=>t!==e))):h([...d,e]))},w=e=>{e.stopPropagation();var t=e.currentTarget.value;f((e=>r({},e,{inputValue:t}))),m&&h(t)},k=e=>{e.stopPropagation(),"Enter"!==e.key||x()||(e.preventDefault(),S()),"Escape"===e.key&&(e.preventDefault(),f((e=>r({},e,{isSelected:!1,inputValue:""}))),m&&h(null))},x=()=>!(t.optional||!rr(d)&&(!Yt(d)||v.isSelected||0!==d.length)&&(!v.isSelected||""!==v.inputValue.trim())),S=()=>{v.isSelected&&y?Yt(d)&&(p?s([...d,v.inputValue]):a([...d,v.inputValue])):p?s(d):a(d)};return Ma(Ci,{children:[Ma("div",{className:"question-container",children:[Ma(ja,{question:t,forceDisableHtml:n}),Ma("fieldset",{className:"multiple-choice-options limit-height",children:[Ma("legend",{className:"sr-only",children:y?" Select all that apply":" Select one"}),c.map(((e,r)=>{var n=!!t.hasOpenChoice&&r===t.choices.length-1,o="surveyQuestion"+i+"Choice"+r,a=o+"Open",s=n?v.isSelected:m?d===e:Yt(d)&&d.includes(e);return Ma("label",{className:n?"choice-option-open":"",children:[Ma("div",{className:"response-choice",children:[Ma("input",{type:m?"radio":"checkbox",name:o,checked:s,onChange:()=>b(e,n),id:o,"aria-controls":a}),Ma("span",{children:n?e+":":e})]}),n&&Ma("input",{type:"text",ref:l,id:a,name:"question"+i+"Open",value:v.inputValue,onKeyDown:k,onInput:w,onClick(t){v.isSelected||b(e,!0),t.stopPropagation()},"aria-label":e+" - please specify"})]},r)}))]})]}),Ma(Fa,{text:t.buttonText||"Submit",submitDisabled:x(),appearance:o,onSubmit:S,onPreviewSubmit:S,skipSubmitButton:g})]})}var Ga=[1,2,3,4,5],Xa=[1,2,3,4,5,6,7],Ya=[0,1,2,3,4,5,6,7,8,9,10],Ja={2:[Na,Aa],3:[Ea,La,_a],5:[Oa,Ea,La,_a,Ra]};function Ka(e){switch(e){case 5:default:return Ga;case 7:return Xa;case 10:return Ya}}var es=on("[Surveys]");function ts(e,t,r){var n,i=e.questions[t],o=t+1;if(null==(n=i.branching)||!n.type)return t===e.questions.length-1?ko.End:o;if(i.branching.type===ko.End)return ko.End;if(i.branching.type===ko.SpecificQuestion){if(Number.isInteger(i.branching.index))return i.branching.index}else if(i.branching.type===ko.ResponseBased){if(i.type===wo.SingleChoice){var a,s=i.choices.indexOf(""+r);if(-1===s&&i.hasOpenChoice&&(s=i.choices.length-1),null!=(a=i.branching)&&null!=(a=a.responseValues)&&a.hasOwnProperty(s)){var u=i.branching.responseValues[s];return Number.isInteger(u)?u:u===ko.End?ko.End:o}}else if(i.type===wo.Rating){var l;if("number"!=typeof r||!Number.isInteger(r))throw new Error("The response type must be an integer");var c=function(e,t){if(2===t){if(1>e||e>2)throw new Error("The response must be in range 1-2");return 1===e?"positive":"negative"}if(3===t){if(1>e||e>3)throw new Error("The response must be in range 1-3");return 1===e?"negative":2===e?"neutral":"positive"}if(5===t){if(1>e||e>5)throw new Error("The response must be in range 1-5");return e>2?3===e?"neutral":"positive":"negative"}if(7===t){if(1>e||e>7)throw new Error("The response must be in range 1-7");return e>3?4===e?"neutral":"positive":"negative"}if(10===t){if(0>e||e>10)throw new Error("The response must be in range 0-10");return e>6?e>8?"promoters":"passives":"detractors"}throw new Error("The scale must be one of: 2, 3, 5, 7, 10")}(r,i.scale);if(null!=(l=i.branching)&&null!=(l=l.responseValues)&&l.hasOwnProperty(c)){var d=i.branching.responseValues[c];return Number.isInteger(d)?d:d===ko.End?ko.End:o}}return o}return es.warn("Falling back to next question index due to unexpected branching type"),o}var rs=on("[SurveyTranslations]");function ns(e,t){var r=function(e){return function(e,t){var{overrideLanguage:r,storedPersonProperties:n,locale:i}=e,o=Lo(r);if(o)return null==t||t.info("Using override display language: "+o),o;var a=function(e){return e&&"object"==typeof e&&"language"in e?Lo(e.language):null}(n);if(a)return null==t||t.info("Using person property language: "+a),a;var s=Lo(i);return s?(null==t||t.info("Using detected locale: "+s),s):(null==t||t.info("No user language detected"),null)}({overrideLanguage:e.config.override_display_language,storedPersonProperties:Jt(e.get_property)?e.get_property("$stored_person_properties"):void 0,locale:navigator.language||navigator.userLanguage},rs)}(t);if(!r)return rs.info("No user language detected"),{survey:e,language:null};var n=Ro(e,r,rs);return{survey:n.survey,language:n.matchedKey}}var is=Gr,os=Jr,as="ph:show_survey_widget",ss="PHWidgetSurveyClickListener";function us(e,t){try{var r=e.getBoundingClientRect(),n=is.innerHeight,i=is.innerWidth,o=r.left+r.width/2-t/2;o+t>i-20&&(o=i-t-20),20>o&&(o=20);var a=n-r.bottom,s=250>a&&r.top>a;return{position:"fixed",top:s?"auto":r.bottom+12+"px",left:o+"px",right:"auto",bottom:s?n-r.top+12+"px":"auto",zIndex:ta.zIndex}}catch(e){return No.warn("Failed to calculate trigger position:",e),null}}class ls{constructor(e){var t=this;this.j=new Map,this.H=new Map,this.U=new Set,this.handlePageUnload=()=>{var e=this._posthog.get_property("$surveys");if(e)for(var t of e)xa(t)&&la(t,this._posthog)},this.handlePopoverSurvey=(e,t)=>{var n,i,o,a,{survey:s,language:u}=this.B(e),l=null!=t&&t.position||null!=t&&t.selector?r({},s,{appearance:r({},s.appearance,t.position&&{position:t.position},t.selector&&{widgetSelector:t.selector})}):s;this.V(l.id);var{properties:c,initialResponses:d}=null!=t?t:{},h=!(!d||0>=Object.keys(d).length)&&this.W(l,d,c,u);if(!h||null!=(n=l.appearance)&&n.displayThankYouMessage){this.Z(l);var v={};if((null==(i=l.appearance)?void 0:i.position)===yo.NextToTrigger&&null!=(o=l.appearance)&&o.widgetSelector){var f,p=os.querySelector(l.appearance.widgetSelector);p&&(v=us(p,parseInt((null==(f=l.appearance)?void 0:f.maxWidth)||ta.maxWidth))||{})}var m=(null==(a=l.appearance)?void 0:a.surveyPopupDelaySeconds)||0,{shadow:y}=oa(l,this._posthog),g={posthog:this._posthog,survey:l,removeSurveyFromFocus:this.$,properties:c,style:v,isSurveyCompleted:h,skipShownEvent:null==t?void 0:t.skipShownEvent,surveyLanguage:u};if(0>=m)return Bi(Ma(vs,r({},g)),y);var b=setTimeout((()=>{if(this.j.delete(l.id),!ya(l))return this.$(l);Bi(Ma(vs,r({},g,{survey:r({},l,{appearance:r({},l.appearance,{surveyPopupDelaySeconds:0})})})),y)}),1e3*m);this.j.set(l.id,b)}},this.G=e=>{var{survey:t,language:r}=this.B(e),{shadow:n,isNewlyCreated:i}=oa(t,this._posthog);i&&Bi(Ma(ps,{posthog:this._posthog,survey:t,surveyLanguage:r},e.id),n)},this.X=e=>{this.Y(e);var t=this.H.get(e.id);t&&(t.element.removeEventListener("click",t.listener),t.element.removeAttribute(ss),this.H.delete(e.id),No.info("Removed click listener for survey "+e.id))},this.J=(e,t)=>{var r=os.querySelector(t),n=this.H.get(e.id);if(r){if(this.G(e),n){if(r===n.element)return;No.info("Selector element changed for survey "+e.id+". Re-attaching listener."),this.X(e)}if(!r.hasAttribute(ss)){var i=t=>{var r,n;t.stopPropagation();var i=(null==(r=e.appearance)?void 0:r.position)===yo.NextToTrigger?us(t.currentTarget,parseInt((null==(n=e.appearance)?void 0:n.maxWidth)||ta.maxWidth)):{};is.dispatchEvent(new CustomEvent(as,{detail:{surveyId:e.id,position:i}}))};ln(r,"click",i),r.setAttribute(ss,"true"),this.H.set(e.id,{element:r,listener:i,survey:e}),No.info("Attached click listener for feedback button survey "+e.id)}}else n&&this.X(e)},this.renderPopover=e=>{var{survey:t,language:r}=this.B(e),{shadow:n}=oa(t,this._posthog);Bi(Ma(vs,{posthog:this._posthog,survey:t,removeSurveyFromFocus:this.$,surveyLanguage:r}),n)},this.renderSurvey=(e,t,r)=>{var n,{survey:i,language:o}=this.B(e),a=!1;null!=(n=this._posthog.config)&&null!=(n=n.surveys)&&n.prefillFromUrl&&(a=this.K(i,o)),Bi(Ma(vs,{posthog:this._posthog,survey:i,removeSurveyFromFocus:this.$,isPopup:!1,properties:r,isSurveyCompleted:a,surveyLanguage:o}),t)},this.getActiveMatchingSurveys=function(e,r){var n;void 0===r&&(r=!1),null==(n=t._posthog)||null==(n=n.surveys)||n.getSurveys((r=>{var n=r.filter((e=>t.checkSurveyEligibility(e).eligible&&t.ee(e)&&t.te(e)&&t.re(e)));e(n)}),r)},this.callSurveysAndEvaluateDisplayLogic=function(e){void 0===e&&(e=!1),t.getActiveMatchingSurveys((e=>{var r=e.filter((e=>e.type===bo.Popover||e.type===bo.Widget)),n=t.ne(r),i=new Set;n.forEach((e=>{if(e.type===bo.Widget){var r,n,o,a;if((null==(r=e.appearance)?void 0:r.widgetType)===mo.Tab)return void t.G(e);(null==(n=e.appearance)?void 0:n.widgetType)===mo.Selector&&null!=(o=e.appearance)&&o.widgetSelector&&(i.add(e.id),t.J(e,null==(a=e.appearance)?void 0:a.widgetSelector))}rr(t.ie)&&e.type===bo.Popover&&t.handlePopoverSurvey(e)})),t.H.forEach((e=>{var{survey:r}=e;i.has(r.id)||t.X(r)}))}),e)},this.Z=e=>{rr(this.ie)||No.error("Survey "+this.ie+" already in focus. Cannot add survey "+e.id+"."),this.ie=e.id},this.$=e=>{this.ie!==e.id&&No.error("Survey "+e.id+" is not in focus. Cannot remove survey "+e.id+"."),this.V(e.id),this.ie=null,this.Y(e)},this._posthog=e,this.ie=null}V(e){var t=this.j.get(e);t&&(clearTimeout(t),this.j.delete(e))}cancelSurvey(e){this.j.has(e)&&(No.info("Cancelled pending survey "+e),this.V(e),this.ie===e&&(this.ie=null))}ne(e){return e.sort(((e,t)=>{var r,n,i=xa(e),o=xa(t);if(i&&!o)return-1;if(!i&&o)return 1;var a=e.schedule===xo,s=t.schedule===xo;return a&&!s?1:!a&&s?-1:((null==(r=e.appearance)?void 0:r.surveyPopupDelaySeconds)||0)-((null==(n=t.appearance)?void 0:n.surveyPopupDelaySeconds)||0)}))}B(e){return ns(e,this._posthog)}K(e,t){if(this.U.has(e.id))return!1;var{params:r}=function(e){var t={},r=!1,n=e.replace(/^\?/,"");if(!n)return{params:t,autoSubmit:r};var i=n.split("&");for(var o of i){var[a,s]=o.split("=");if(a&&!er(s)){var u=decodeURIComponent(a),l=decodeURIComponent(s);if("auto_submit"!==u||"true"!==l){var c=u.match(/^q(\d+)$/);if(c){var d=parseInt(c[1],10);t[d]||(t[d]=[]),t[d].push(l)}}else r=!0}}return{params:t,autoSubmit:r}}(is.location.search);if(0===Object.keys(r).length)return!1;No.info("[Survey Prefill] Detected URL prefill parameters");var n=this.oe(e,r,t);if(!n)return!1;var{responses:i,submissionId:o,isSurveyCompleted:a,skippedResponses:s}=n;return(Object.keys(s).length>0&&e.enable_partial_responses||a)&&aa({responses:a?i:s,survey:e,surveySubmissionId:o,posthog:this._posthog,isSurveyCompleted:a,surveyLanguage:t}),this.U.add(e.id),a}W(e,t,r,n){var i={};for(var[o,a]of Object.entries(t))i[parseInt(o)]=Yt(a)?a.map(String):[String(a)];No.info("[Survey] Processing initial responses");var s=this.oe(e,i,n);if(!s)return!1;var{responses:u,submissionId:l,isSurveyCompleted:c}=s;return aa({responses:u,survey:e,surveySubmissionId:l,posthog:this._posthog,isSurveyCompleted:c,properties:r,surveyLanguage:n}),c}oe(e,t,r){try{var n=function(e,t){var r={};return e.questions.forEach(((e,n)=>{if(t[n]&&e.id){var i=t[n],o=Io(e.id);try{switch(e.type){case wo.SingleChoice:if(!e.choices||0===e.choices.length)return void nn.warn("[Survey Prefill] Question "+n+" has no choices");var a=parseInt(i[0],10);if(isNaN(a)||0>a||a>=e.choices.length)return void nn.warn("[Survey Prefill] Invalid choice index for q"+n+": "+i[0]);r[o]=e.choices[a];break;case wo.MultipleChoice:if(!e.choices||0===e.choices.length)return void nn.warn("[Survey Prefill] Question "+n+" has no choices");var s=i.map((e=>parseInt(e,10))).filter((t=>!isNaN(t)&&t>=0&&e.choices.length>t));if(0===s.length)return void nn.warn("[Survey Prefill] No valid choices for q"+n);var u=[...new Set(s.map((t=>e.choices[t])))];s.length>u.length&&nn.warn("[Survey Prefill] Removed duplicate choices for q"+n),r[o]=u;break;case wo.Rating:var l=parseInt(i[0],10),c=e.scale||10;if(isNaN(l)||0>l||l>c)return void nn.warn("[Survey Prefill] Invalid rating for q"+n+": "+i[0]+" (scale: 0-"+c+")");r[o]=l;break;default:nn.info("[Survey Prefill] Question type "+e.type+" does not support prefill")}}catch(e){nn.error("[Survey Prefill] Error converting q"+n+":",e)}}})),r}(e,t);if(0===Object.keys(n).length)return No.warn("[Survey Prefill] No valid responses after conversion"),null;var i=Wo(),o=Object.keys(t).map((e=>parseInt(e,10))),{startQuestionIndex:a,skippedResponses:s}=function(e,t,r){for(var n=0,i={},o=e.questions.length+1;e.questions.length>n&&o>0&&t.includes(n);){var a=e.questions[n];if(!a||!("skipSubmitButton"in a)||!a.skipSubmitButton)break;if(a.id){var s=Io(a.id);er(r[s])||(i[s]=r[s])}var u=ts(e,n,a.id?r[Io(a.id)]:null);if(u===ko.End)return{startQuestionIndex:e.questions.length,skippedResponses:i};n=u}return{startQuestionIndex:n,skippedResponses:i}}(e,o,n),u=a>=e.questions.length;return wa(e,{surveySubmissionId:i,responses:n,lastQuestionIndex:a,surveyLanguage:r}),No.info("[Survey Prefill] Stored prefilled responses in localStorage"),{responses:n,submissionId:i,startQuestionIndex:a,isSurveyCompleted:u,skippedResponses:s}}catch(e){return No.error("[Survey Prefill] Error handling prefill:",e),null}}ae(e,t){var r;if(void 0===t&&(t=void 0),!e)return!0;var n,i=!(null==(r=this._posthog.featureFlags)||!r.isFeatureEnabled(e,{send_event:!e.startsWith("survey-targeting-")})),o=!0;return t&&(o=(null==(n=this._posthog.featureFlags)?void 0:n.getFeatureFlag(e,{send_event:!1}))===t||"any"===t),i&&o}ee(e){return!e.conditions||ya(e)&&ga(e)&&function(e){var t;return null==(t=e.conditions)||!t.selector||!(null==Ko||!Ko.querySelector(e.conditions.selector))}(e)}se(e){return va(e)||this.ae(e.internal_targeting_flag_key)||xa(e)}checkSurveyEligibility(e){var t,r,n={eligible:!0,reason:void 0};if(!function(e){return!(!e.start_date||e.end_date)}(e))return n.eligible=!1,n.reason="Survey is not running. It was completed on "+e.end_date,n;if(!Fo.includes(e.type))return n.eligible=!1,n.reason="Surveys of type "+e.type+" are never eligible to be shown in the app",n;var i=null==(t=e.conditions)?void 0:t.linkedFlagVariant;return this.ae(e.linked_flag_key,i)?this.ae(e.targeting_flag_key)?this.se(e)?function(e,t){if(!e||!t)return!0;var r="string"==typeof t?new Date(t):t,n=new Date,i=Math.abs(n.getTime()-r.getTime());return Math.ceil(i/864e5)>e}(null==(r=e.conditions)?void 0:r.seenSurveyWaitPeriodInDays,Xo.A("lastSeenSurveyDate"))?(e=>!!Xo.A(qo(e))&&!va(e))(e)?(n.eligible=!1,n.reason="Survey has already been seen and it can't be activated again",n):n:(n.eligible=!1,n.reason="Survey wait period has not passed",n):(n.eligible=!1,n.reason="Survey internal targeting flag is not enabled and survey cannot activate repeatedly and survey is not in progress",n):(n.eligible=!1,n.reason="Survey targeting feature flag is not enabled",n):(n.eligible=!1,n.reason=i?"Survey linked feature flag is not enabled for variant "+i:"Survey linked feature flag is not enabled",n)}te(e){var t;if(!function(e){var t;return!(null==(t=e.conditions)||null==(t=t.events)||null==(t=t.values)||!t.length)}(e)&&!function(e){var t;return!(null==(t=e.conditions)||null==(t=t.actions)||null==(t=t.values)||!t.length)}(e))return!0;var r=null==(t=this._posthog.surveys)||null==(t=t._surveyEventReceiver)?void 0:t.getSurveys();return!(null==r||!r.includes(e.id))}re(e){var t;return null==(t=e.feature_flag_keys)||!t.length||e.feature_flag_keys.every((e=>{var{key:t,value:r}=e;return!t||!r||this.ae(r)}))}Y(e){try{var t=os.querySelector(Ca(e,!0));null!=t&&t.shadowRoot&&Bi(null,t.shadowRoot),null==t||t.remove()}catch(t){No.warn("Failed to remove survey "+e.id+" from DOM:",t)}}getTestAPI(){return{addSurveyToFocus:this.Z,removeSurveyFromFocus:this.$,surveyInFocus:this.ie,surveyTimeouts:this.j,handleWidget:this.G,handlePopoverSurvey:this.handlePopoverSurvey,manageWidgetSelectorListener:this.J,sortSurveysByAppearanceDelay:this.ne,checkFlags:this.re.bind(this),isSurveyFeatureFlagEnabled:this.ae.bind(this)}}}function cs(e,t){if(os&&is){var r,n=new ls(e);if(e.config.disable_surveys_automatic_display)return No.info("Surveys automatic display is disabled. Skipping call surveys and evaluate display logic."),n;if(!1===t)return No.info("There are no surveys to load or Surveys is disabled in the project settings."),n;n.callSurveysAndEvaluateDisplayLogic(!0);var i=()=>{er(r)&&(r=setInterval((()=>{n.callSurveysAndEvaluateDisplayLogic(!1)}),1e3))};return i(),ln(os,"visibilitychange",(()=>{os.hidden?er(r)||(clearInterval(r),r=void 0):(n.callSurveysAndEvaluateDisplayLogic(!1),i())})),n}}function ds(e){var{survey:t,removeSurveyFromFocus:r=(()=>{}),setSurveyVisible:n,isPreviewMode:i=!1}=e;io((()=>{var e;if(!i&&null!=(e=t.conditions)&&e.url){var o=()=>{var e,i=t.type===bo.Widget,o=ya(t),a=(null==(e=t.appearance)?void 0:e.widgetType)===mo.Tab&&i;if(!o)return No.info("Hiding survey "+t.id+" because URL does not match"),n(!1),r(t);a&&(No.info("Showing survey "+t.id+" because it is a feedback button tab and URL matches"),n(!0))};ln(is,"popstate",o),ln(is,"hashchange",o);var a=is.history.pushState,s=is.history.replaceState;return is.history.pushState=function(){for(var e=arguments.length,t=new Array(e),r=0;e>r;r++)t[r]=arguments[r];a.apply(this,t),o()},is.history.replaceState=function(){for(var e=arguments.length,t=new Array(e),r=0;e>r;r++)t[r]=arguments[r];s.apply(this,t),o()},()=>{is.removeEventListener("popstate",o),is.removeEventListener("hashchange",o),is.history.pushState=a,is.history.replaceState=s}}}),[i,t,r,n])}function hs(e){switch(void 0===e&&(e=go.Right),e){case go.Top:return{top:"0",left:"50%",transform:"translateX(-50%)"};case go.Left:return{top:"50%",left:"0",transform:"rotate(90deg) translateY(-100%)",transformOrigin:"left top"};case go.Bottom:return{bottom:"0",left:"50%",transform:"translateX(-50%)"};default:return{top:"50%",right:"0",transform:"rotate(-90deg) translateY(-100%)",transformOrigin:"right top"}}}function vs(e){var t,n,i,o,a,s,{survey:u,forceDisableHtml:l,posthog:c,style:d={},previewPageIndex:h,removeSurveyFromFocus:v=(()=>{}),isPopup:f=!0,onPreviewSubmit:p=(()=>{}),onPopupSurveyDismissed:m=(()=>{}),onCloseConfirmationMessage:y=(()=>{}),properties:g,isSurveyCompleted:b,skipShownEvent:w,surveyLanguage:k}=e,x=oo(null),S=Number.isInteger(h),C=null!=(t=u.appearance)&&t.surveyPopupDelaySeconds?1e3*u.appearance.surveyPopupDelaySeconds:0,{isPopupVisible:I,isSurveySent:T,hidePopupWithViewTransition:M}=function(e,t,n,i,o,a,s,u,l){var[c,d]=no(i||0===n||e.type===bo.ExternalSurvey),[h,v]=no(!1),f=()=>{var t=()=>{a&&o(e),d(!1)};os.startViewTransition?os.startViewTransition((()=>{var e;null==s||null==(e=s.current)||e.remove()})).finished.then((()=>{setTimeout((()=>{t()}),100)})):t()},p=t=>{t.detail.surveyId===e.id&&f()};return io((()=>{if(t){if(!i){var o=t=>{var r,n;if(t.detail.surveyId===e.id){if(null==(r=e.appearance)||!r.displayThankYouMessage)return f();v(!0),null!=(n=e.appearance)&&n.autoDisappear&&setTimeout((()=>{f()}),5e3)}},a=()=>{ya(e)&&(d(!0),is.dispatchEvent(new Event("PHSurveyShown")),u||t.capture(So.SHOWN,r({[Co.SURVEY_NAME]:e.name,[Co.SURVEY_ID]:e.id,[Co.SURVEY_ITERATION]:e.current_iteration,[Co.SURVEY_ITERATION_START_DATE]:e.current_iteration_start_date},l&&{[Co.SURVEY_LANGUAGE]:l},{sessionRecordingUrl:null==t.get_session_replay_url?void 0:t.get_session_replay_url()})),localStorage.setItem("lastSeenSurveyDate",(new Date).toISOString()))};if(ln(is,"PHSurveyClosed",p),ln(is,"PHSurveySent",o),n>0){var s=setTimeout(a,n);return()=>{clearTimeout(s),is.removeEventListener("PHSurveyClosed",p),is.removeEventListener("PHSurveySent",o)}}return a(),()=>{is.removeEventListener("PHSurveyClosed",p),is.removeEventListener("PHSurveySent",o)}}}else No.error("usePopupVisibility hook called without a PostHog instance.")}),[]),ds({survey:e,removeSurveyFromFocus:o,setSurveyVisible:d,isPreviewMode:i}),{isPopupVisible:c,isSurveySent:h,setIsPopupVisible:d,hidePopupWithViewTransition:f}}(u,c,C,S,v,f,x,w,k),_=T||h===u.questions.length||!0===b,L=ao((()=>{var e=ka(u),t=(null==e?void 0:e.surveySubmissionId)||Wo();return{isPreviewMode:S,previewPageIndex:h,onPopupSurveyDismissed(){k?ua(u,c,S,k):ua(u,c,S),m()},isPopup:f||!1,surveySubmissionId:t,onPreviewSubmit:p,posthog:c,properties:g,surveyLanguage:k}}),[S,h,f,c,u,m,p,g,k]);return I?Ma(fa.Provider,{value:L,children:Ma("div",{className:"ph-survey",style:r({},Ia(u.type,null==(n=u.appearance)?void 0:n.position,null==(i=u.appearance)?void 0:i.widgetType),d),ref:x,children:_?Ma(Ba,{header:(null==(o=u.appearance)?void 0:o.thankYouMessageHeader)||"Thank you!",description:(null==(a=u.appearance)?void 0:a.thankYouMessageDescription)||"",forceDisableHtml:!!l,contentType:null==(s=u.appearance)?void 0:s.thankYouMessageDescriptionContentType,appearance:u.appearance||ta,onClose(){M(),y()}}):Ma(fs,{survey:u,forceDisableHtml:!!l,posthog:c})})}):null}function fs(e){var t,{survey:n,forceDisableHtml:i,posthog:o}=e,[a,s]=no((()=>{var e=ka(n);return null!=e&&e.responses&&No.info("Survey is already in progress, filling in initial responses"),(null==e?void 0:e.responses)||{}})),{previewPageIndex:u,onPopupSurveyDismissed:l,isPopup:c,onPreviewSubmit:d,surveySubmissionId:h,isPreviewMode:v,properties:f,surveyLanguage:p}=so(fa),[m,y]=no((()=>{var e=ka(n);return u||(null==e?void 0:e.lastQuestionIndex)||0})),g=ao((()=>ha(n)),[n]);io((()=>{v&&!er(u)&&y(u)}),[u,v]);var b=g.at(m);return b?Ma("form",{className:"survey-form",name:"surveyForm",children:[c&&!0!==(null==(t=n.appearance)?void 0:t.hideCancelButton)&&Ma(Ha,{onClick(){l()}}),Ma("div",{className:"survey-box","data-question-index":m,children:ms({question:b,forceDisableHtml:i,displayQuestionIndex:m,appearance:n.appearance||ta,onSubmit:e=>(e=>{var{res:t,displayQuestionIndex:i,questionId:u}=e;if(o)if(u){var l=Io(u),c=r({},a,{[l]:t});s(c);var d=ts(n,i,t),v=d===ko.End;v||(y(d),wa(n,{surveySubmissionId:h,responses:c,lastQuestionIndex:d,surveyLanguage:p})),(n.enable_partial_responses||v)&&aa({responses:c,survey:n,surveySubmissionId:h,isSurveyCompleted:v,posthog:o,properties:f,surveyLanguage:p})}else No.error("onNextButtonClick called without a questionId.");else No.error("onNextButtonClick called without a PostHog instance.")})({res:e,displayQuestionIndex:m,questionId:b.id}),onPreviewSubmit:d,initialValue:b.id?a[Io(b.id)]:void 0})})]}):null}function ps(e){var t,r,n,i,o,a,s,{survey:u,forceDisableHtml:l,posthog:c,readOnly:d,surveyLanguage:h}=e,[v,f]=no(!0),[p,m]=no(!1),[y,g]=no({}),b=()=>{m(!p)};if(io((()=>{var e;if(c){if(!d){"tab"===(null==(e=u.appearance)?void 0:e.widgetType)&&g({top:"50%",bottom:"auto"});var t=e=>{var t,r=e;(null==(t=r.detail)?void 0:t.surveyId)===u.id&&(No.info("Received show event for feedback button survey "+u.id),g(r.detail.position||{}),b())};return ln(is,as,t),()=>{is.removeEventListener(as,t)}}}else No.error("FeedbackWidget called without a PostHog instance.")}),[c,d,u.id,null==(t=u.appearance)?void 0:t.widgetType,null==(r=u.appearance)?void 0:r.widgetSelector,null==(n=u.appearance)?void 0:n.borderColor]),ds({survey:u,setSurveyVisible:f}),!v)return null;var w=()=>{u.schedule!==xo&&f(!1),setTimeout((()=>{m(!1)}),200)};return Ma(Ci,{children:["tab"===(null==(i=u.appearance)?void 0:i.widgetType)&&Ma("button",{className:"ph-survey-widget-tab "+((null==(o=u.appearance)?void 0:o.tabPosition)===go.Top?"widget-tab-top":""),onClick:b,disabled:d,style:hs(null==(a=u.appearance)?void 0:a.tabPosition),children:(null==(s=u.appearance)?void 0:s.widgetLabel)||""}),p&&Ma(vs,{posthog:c,survey:u,forceDisableHtml:l,style:y,onPopupSurveyDismissed:w,onCloseConfirmationMessage:w,surveyLanguage:h})]})}var ms=e=>{var{question:t,forceDisableHtml:n,displayQuestionIndex:i,appearance:o,onSubmit:a,onPreviewSubmit:s,initialValue:u}=e,l={forceDisableHtml:n,appearance:o,onPreviewSubmit(e){s(e)},onSubmit(e){a(e)},initialValue:u,displayQuestionIndex:i};switch(t.type){case wo.Open:return xi(Wa,r({},l,{question:t,key:t.id}));case wo.Link:return xi(za,r({},l,{question:t,key:t.id}));case wo.Rating:return xi(Za,r({},l,{question:t,key:t.id}));case wo.SingleChoice:case wo.MultipleChoice:return xi(Qa,r({},l,{question:t,key:t.id}));default:return No.error("Unsupported question type: "+t.type),null}};en.__PosthogExtensions__=en.__PosthogExtensions__||{},en.__PosthogExtensions__.generateSurveys=cs,en.extendPostHogWithSurveys=cs;class ys{emit(e){}}var gs=new ys,bs=new class{getLogger(e,t,r){return new ys}};class ws{constructor(e,t,r,n){this.ue=e,this.name=t,this.version=r,this.options=n}emit(e){this.le().emit(e)}le(){if(this.ce)return this.ce;var e=this.ue.de(this.name,this.version,this.options);return e?(this.ce=e,this.ce):gs}}class ks{getLogger(e,t,r){var n;return null!==(n=this.de(e,t,r))&&void 0!==n?n:new ws(this,e,t,r)}he(){var e;return null!==(e=this.ce)&&void 0!==e?e:bs}ve(e){this.ce=e}de(e,t,r){var n;return null===(n=this.ce)||void 0===n?void 0:n.getLogger(e,t,r)}}var xs="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{},Ss=Symbol.for("io.opentelemetry.js.api.logs"),Cs=xs;class Is{constructor(){this.fe=new ks}static getInstance(){return this._instance||(this._instance=new Is),this._instance}setGlobalLoggerProvider(e){return Cs[Ss]?this.getLoggerProvider():(Cs[Ss]=(1,t=e,r=bs,e=>1===e?t:r),this.fe.ve(e),e);var t,r}getLoggerProvider(){var e,t;return null!==(t=null===(e=Cs[Ss])||void 0===e?void 0:e.call(Cs,1))&&void 0!==t?t:this.fe}getLogger(e,t,r){return this.getLoggerProvider().getLogger(e,t,r)}disable(){delete Cs[Ss],this.fe=new ks}}var Ts=Is.getInstance();class Ms{constructor(e){this.ce=void 0,this.ce=e}export(e,t){this.ce.export(e,t)}forceFlush(){return this.ce.forceFlush()}shutdown(){return this.ce.shutdown()}}class _s extends Error{constructor(e,t,r){super(e),this.code=void 0,this.name="OTLPExporterError",this.data=void 0,this.data=r,this.code=t}}function Ls(e){if(Number.isFinite(e)&&e>0)return e;throw new Error("Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '"+e+"')")}class Es{constructor(e){this.pe=void 0,this.me=[],this.pe=e}pushPromise(e){if(this.hasReachedLimit())throw new Error("Concurrency Limit reached");this.me.push(e);var t=()=>{var t=this.me.indexOf(e);this.me.splice(t,1)};e.then(t,t)}hasReachedLimit(){return this.me.length>=this.pe}awaitAll(){var e=this;return t((function*(){yield Promise.all(e.me)}))()}}function Os(e){return new Es(e.concurrencyLimit)}var Rs="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{},Ns="1.9.0",As=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/,Ps=function(e){var t=new Set([e]),r=new Set,n=e.match(As);if(!n)return function(){return!1};var i=+n[1],o=+n[2],a=+n[3];if(null!=n[4])return function(t){return t===e};function s(e){return r.add(e),!1}function u(e){return t.add(e),!0}return function(e){if(t.has(e))return!0;if(r.has(e))return!1;var n=e.match(As);if(!n)return s(e);var l=+n[2],c=+n[3];return null!=n[4]||i!==+n[1]?s(e):0===i?o!==l||a>c?s(e):u(e):o>l?s(e):u(e)}}(Ns),qs=Ns.split(".")[0],Ds=Symbol.for("opentelemetry.js.api."+qs),Fs=Rs;function js(e,t,r,n){var i;void 0===n&&(n=!1);var o=Fs[Ds]=null!==(i=Fs[Ds])&&void 0!==i?i:{version:Ns};if(!n&&o[e]){var a=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+e);return r.error(a.stack||a.message),!1}return o.version!==Ns?(a=new Error("@opentelemetry/api: Registration of version v"+o.version+" for "+e+" does not match previously registered API v"+Ns),r.error(a.stack||a.message),!1):(o[e]=t,r.debug("@opentelemetry/api: Registered a global for "+e+" v"+Ns+"."),!0)}function Hs(e){var t,r,n=null===(t=Fs[Ds])||void 0===t?void 0:t.version;if(n&&Ps(n))return null===(r=Fs[Ds])||void 0===r?void 0:r[e]}function Us(e,t){t.debug("@opentelemetry/api: Unregistering a global for "+e+" v"+Ns+".");var r=Fs[Ds];r&&delete r[e]}var Bs,Vs=function(){function e(e){this.ye=e.namespace||"DiagComponentLogger"}return e.prototype.debug=function(){for(var e=[],t=0;arguments.length>t;t++)e[t]=arguments[t];return Ws("debug",this.ye,e)},e.prototype.error=function(){for(var e=[],t=0;arguments.length>t;t++)e[t]=arguments[t];return Ws("error",this.ye,e)},e.prototype.info=function(){for(var e=[],t=0;arguments.length>t;t++)e[t]=arguments[t];return Ws("info",this.ye,e)},e.prototype.warn=function(){for(var e=[],t=0;arguments.length>t;t++)e[t]=arguments[t];return Ws("warn",this.ye,e)},e.prototype.verbose=function(){for(var e=[],t=0;arguments.length>t;t++)e[t]=arguments[t];return Ws("verbose",this.ye,e)},e}();function Ws(e,t,r){var n=Hs("diag");if(n)return r.unshift(t),n[e].apply(n,function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;o>i;i++)!n&&i in t||(n||(n=[].slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||[].slice.call(t))}([],function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}(r),!1))}!function(e){e[e.NONE=0]="NONE",e[e.ERROR=30]="ERROR",e[e.WARN=50]="WARN",e[e.INFO=60]="INFO",e[e.DEBUG=70]="DEBUG",e[e.VERBOSE=80]="VERBOSE",e[e.ALL=9999]="ALL"}(Bs||(Bs={}));var zs=function(){function e(){function e(e){return function(){for(var t=[],r=0;arguments.length>r;r++)t[r]=arguments[r];var n=Hs("diag");if(n)return n[e].apply(n,function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;o>i;i++)!n&&i in t||(n||(n=[].slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||[].slice.call(t))}([],function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}(t),!1))}}var t=this;t.setLogger=function(e,r){var n,i,o;if(void 0===r&&(r={logLevel:Bs.INFO}),e===t){var a=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return t.error(null!==(n=a.stack)&&void 0!==n?n:a.message),!1}"number"==typeof r&&(r={logLevel:r});var s=Hs("diag"),u=function(e,t){function r(r,n){var i=t[r];return"function"!=typeof i||n>e?function(){}:i.bind(t)}return Bs.NONE>e?e=Bs.NONE:e>Bs.ALL&&(e=Bs.ALL),t=t||{},{error:r("error",Bs.ERROR),warn:r("warn",Bs.WARN),info:r("info",Bs.INFO),debug:r("debug",Bs.DEBUG),verbose:r("verbose",Bs.VERBOSE)}}(null!==(i=r.logLevel)&&void 0!==i?i:Bs.INFO,e);if(s&&!r.suppressOverrideMessage){var l=null!==(o=(new Error).stack)&&void 0!==o?o:"<failed to generate stacktrace>";s.warn("Current logger will be overwritten from "+l),u.warn("Current logger will overwrite one already registered from "+l)}return js("diag",u,t,!0)},t.disable=function(){Us("diag",t)},t.createComponentLogger=function(e){return new Vs(e)},t.verbose=e("verbose"),t.debug=e("debug"),t.info=e("info"),t.warn=e("warn"),t.error=e("error")}return e.instance=function(){return this._instance||(this._instance=new e),this._instance},e}();function Zs(e){return Symbol.for(e)}var $s,Qs=new function e(t){var r=this;r.ge=t?new Map(t):new Map,r.getValue=function(e){return r.ge.get(e)},r.setValue=function(t,n){var i=new e(r.ge);return i.ge.set(t,n),i},r.deleteValue=function(t){var n=new e(r.ge);return n.ge.delete(t),n}},Gs=function(){function e(){}return e.prototype.active=function(){return Qs},e.prototype.with=function(e,t,r){for(var n=[],i=3;arguments.length>i;i++)n[i-3]=arguments[i];return t.call.apply(t,function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;o>i;i++)!n&&i in t||(n||(n=[].slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||[].slice.call(t))}([r],function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}(n),!1))},e.prototype.bind=function(e,t){return t},e.prototype.enable=function(){return this},e.prototype.disable=function(){return this},e}(),Xs="context",Ys=new Gs,Js=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalContextManager=function(e){return js(Xs,e,zs.instance())},e.prototype.active=function(){return this.be().active()},e.prototype.with=function(e,t,r){for(var n,i=[],o=3;arguments.length>o;o++)i[o-3]=arguments[o];return(n=this.be()).with.apply(n,function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;o>i;i++)!n&&i in t||(n||(n=[].slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||[].slice.call(t))}([e,t,r],function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}(i),!1))},e.prototype.bind=function(e,t){return this.be().bind(e,t)},e.prototype.be=function(){return Hs(Xs)||Ys},e.prototype.disable=function(){this.be().disable(),Us(Xs,zs.instance())},e}();!function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"}($s||($s={}));var Ks="0000000000000000",eu="00000000000000000000000000000000",tu={traceId:eu,spanId:Ks,traceFlags:$s.NONE},ru=function(){function e(e){void 0===e&&(e=tu),this.we=e}return e.prototype.spanContext=function(){return this.we},e.prototype.setAttribute=function(e,t){return this},e.prototype.setAttributes=function(e){return this},e.prototype.addEvent=function(e,t){return this},e.prototype.addLink=function(e){return this},e.prototype.addLinks=function(e){return this},e.prototype.setStatus=function(e){return this},e.prototype.updateName=function(e){return this},e.prototype.end=function(e){},e.prototype.isRecording=function(){return!1},e.prototype.recordException=function(e,t){},e}(),nu=Zs("OpenTelemetry Context Key SPAN");function iu(e){return e.getValue(nu)||void 0}function ou(){return iu(Js.getInstance().active())}function au(e,t){return e.setValue(nu,t)}function su(e){return e.deleteValue(nu)}function uu(e,t){return au(e,new ru(t))}function lu(e){var t;return null===(t=iu(e))||void 0===t?void 0:t.spanContext()}var cu=/^([0-9a-f]{32})$/i,du=/^[0-9a-f]{16}$/i;function hu(e){return cu.test(r=e.traceId)&&r!==eu&&du.test(t=e.spanId)&&t!==Ks;var t,r}function vu(e){return new ru(e)}var fu=Js.getInstance(),pu=function(){function e(){}return e.prototype.startSpan=function(e,t,r){if(void 0===r&&(r=fu.active()),Boolean(null==t?void 0:t.root))return new ru;var n,i=r&&lu(r);return"object"==typeof(n=i)&&"string"==typeof n.spanId&&"string"==typeof n.traceId&&"number"==typeof n.traceFlags&&hu(i)?new ru(i):new ru},e.prototype.startActiveSpan=function(e,t,r,n){var i,o,a;if(arguments.length>=2){2===arguments.length?a=t:3===arguments.length?(i=t,a=r):(i=t,o=r,a=n);var s=null!=o?o:fu.active(),u=this.startSpan(e,i,s),l=au(s,u);return fu.with(l,a,void 0,u)}},e}(),mu=new pu,yu=function(){function e(e,t,r,n){this.ue=e,this.name=t,this.version=r,this.options=n}return e.prototype.startSpan=function(e,t,r){return this.ke().startSpan(e,t,r)},e.prototype.startActiveSpan=function(e,t,r,n){var i=this.ke();return Reflect.apply(i.startActiveSpan,i,arguments)},e.prototype.ke=function(){if(this.ce)return this.ce;var e=this.ue.getDelegateTracer(this.name,this.version,this.options);return e?(this.ce=e,this.ce):mu},e}(),gu=new(function(){function e(){}return e.prototype.getTracer=function(e,t,r){return new pu},e}()),bu=function(){function e(){}return e.prototype.getTracer=function(e,t,r){var n;return null!==(n=this.getDelegateTracer(e,t,r))&&void 0!==n?n:new yu(this,e,t,r)},e.prototype.getDelegate=function(){var e;return null!==(e=this.ce)&&void 0!==e?e:gu},e.prototype.setDelegate=function(e){this.ce=e},e.prototype.getDelegateTracer=function(e,t,r){var n;return null===(n=this.ce)||void 0===n?void 0:n.getTracer(e,t,r)},e}(),wu=Js.getInstance(),ku=zs.instance(),xu="trace",Su=function(){function e(){this.xe=new bu,this.wrapSpanContext=vu,this.isSpanContextValid=hu,this.deleteSpan=su,this.getSpan=iu,this.getActiveSpan=ou,this.getSpanContext=lu,this.setSpan=au,this.setSpanContext=uu}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalTracerProvider=function(e){var t=js(xu,this.xe,zs.instance());return t&&this.xe.setDelegate(e),t},e.prototype.getTracerProvider=function(){return Hs(xu)||this.xe},e.prototype.getTracer=function(e,t){return this.getTracerProvider().getTracer(e,t)},e.prototype.disable=function(){Us(xu,zs.instance()),this.xe=new bu},e}().getInstance(),Cu=Zs("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Iu(e){return null==e||(Array.isArray(e)?function(e){var t;for(var r of e)if(null!=r){var n=typeof r;if(n!==t){if(!t){if(Tu(n)){t=n;continue}return!1}return!1}}return!0}(e):Tu(typeof e))}function Tu(e){switch(e){case"number":case"boolean":case"string":return!0}return!1}function Mu(e){try{(e=>{ku.error(function(e){return"string"==typeof e?e:JSON.stringify(function(e){for(var t={},r=e;null!==r;)Object.getOwnPropertyNames(r).forEach((e=>{if(!t[e]){var n=r[e];n&&(t[e]=String(n))}})),r=Object.getPrototypeOf(r);return t}(e))}(e))})(e)}catch(e){}}var _u,Lu=performance,Eu="telemetry.sdk.language",Ou="telemetry.sdk.name",Ru="telemetry.sdk.version",Nu={[Ou]:"opentelemetry","process.runtime.name":"browser",[Eu]:"webjs",[Ru]:"2.2.0"},Au=Math.pow(10,6),Pu=Math.pow(10,9);function qu(e){return[Math.trunc(e/1e3),Math.round(e%1e3*Au)]}function Du(){var e=Lu.timeOrigin;return"number"!=typeof e&&(e=Lu.timing&&Lu.timing.fetchStart),e}function Fu(e){if(o=e,Array.isArray(o)&&2===o.length&&"number"==typeof o[0]&&"number"==typeof o[1])return e;if("number"==typeof e)return e<Du()?(t=e,r=qu(Du()),n=qu("number"==typeof t?t:Lu.now()),Pu>(i=[r[0]+n[0],r[1]+n[1]])[1]||(i[1]-=Pu,i[0]+=1),i):qu(e);var t,r,n,i,o;if(e instanceof Date)return qu(e.getTime());throw TypeError("Invalid input type")}!function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"}(_u||(_u={}));var ju="[object Object]",Hu="[object Null]",Uu="[object Undefined]",Bu=function(){}.toString,Vu=Bu.call(Object),Wu=Object.getPrototypeOf,zu=Object.prototype,Zu=zu.hasOwnProperty,$u=Symbol?Symbol.toStringTag:void 0,Qu=zu.toString;function Gu(e){if(!function(e){return null!=e&&"object"==typeof e}(e)||function(e){return null==e?void 0===e?Uu:Hu:$u&&$u in Object(e)?function(e){var t=Zu.call(e,$u),r=e[$u],n=!1;try{e[$u]=void 0,n=!0}catch(e){}var i=Qu.call(e);return n&&(t?e[$u]=r:delete e[$u]),i}(e):function(e){return Qu.call(e)}(e)}(e)!==ju)return!1;var t=Wu(e);if(null===t)return!0;var r=Zu.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Bu.call(r)===Vu}function Xu(e){return Ku(e)?e.slice():e}function Yu(e,t,r,n){var i;if(void 0===r&&(r=0),20>=r){if(r++,rl(e)||rl(t)||el(t))i=Xu(t);else if(Ku(e)){if(i=e.slice(),Ku(t))for(var o=0,a=t.length;a>o;o++)i.push(Xu(t[o]));else if(tl(t))for(var s=Object.keys(t),u=0,l=s.length;l>u;u++){var c=s[u];i[c]=Xu(t[c])}}else if(tl(e))if(tl(t)){if(!function(e,t){return!(!Gu(e)||!Gu(t))}(e,t))return t;i=Object.assign({},e);for(var d=Object.keys(t),h=0,v=d.length;v>h;h++){var f=d[h],p=t[f];if(rl(p))void 0===p?delete i[f]:i[f]=p;else{var m=i[f],y=p;if(Ju(e,f,n)||Ju(t,f,n))delete i[f];else{if(tl(m)&&tl(y)){var g=n.get(m)||[],b=n.get(y)||[];g.push({obj:e,key:f}),b.push({obj:t,key:f}),n.set(m,g),n.set(y,b)}i[f]=Yu(i[f],p,r,n)}}}}else i=t;return i}}function Ju(e,t,r){for(var n=r.get(e[t])||[],i=0,o=n.length;o>i;i++){var a=n[i];if(a.key===t&&a.obj===e)return!0}return!1}function Ku(e){return Array.isArray(e)}function el(e){return"function"==typeof e}function tl(e){return!rl(e)&&!Ku(e)&&!el(e)&&"object"==typeof e}function rl(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||void 0===e||e instanceof Date||e instanceof RegExp||null===e}class nl extends Error{constructor(e){super(e),Object.setPrototypeOf(this,nl.prototype)}}function il(e,t){var r,n=new Promise((function(e,n){r=setTimeout((function(){n(new nl("Operation timed out."))}),t)}));return Promise.race([e,n]).then((e=>(clearTimeout(r),e)),(e=>{throw clearTimeout(r),e}))}class ol{constructor(){this.Se=void 0,this.Ce=void 0,this.Ie=void 0,this.Se=new Promise(((e,t)=>{this.Ce=e,this.Ie=t}))}get promise(){return this.Se}resolve(e){this.Ce(e)}reject(e){this.Ie(e)}}class al{constructor(e,t){this.Te=void 0,this.Me=void 0,this._e=!1,this.Le=new ol,this.Te=e,this.Me=t}get isCalled(){return this._e}get promise(){return this.Le.promise}call(){if(!this._e){this._e=!0;try{for(var e=arguments.length,t=new Array(e),r=0;e>r;r++)t[r]=arguments[r];Promise.resolve(this.Te.call(this.Me,...t)).then((e=>this.Le.resolve(e)),(e=>this.Le.reject(e)))}catch(e){this.Le.reject(e)}}return this.Le.promise}}var sl={Ee:(e,t)=>new Promise((r=>{wu.with(function(e){return e.setValue(Cu,!0)}(wu.active()),(()=>{e.export(t,(e=>{r(e)}))}))}))};class ul{constructor(e,t,r,n,i){this.Oe=void 0,this.Re=void 0,this.Ne=void 0,this.Ae=void 0,this.Pe=void 0,this.qe=void 0,this.Oe=e,this.Re=t,this.Ne=r,this.Ae=n,this.Pe=i,this.qe=ku.createComponentLogger({namespace:"OTLPExportDelegate"})}export(e,t){if(this.qe.debug("items to be sent",e),this.Ae.hasReachedLimit())t({code:_u.FAILED,error:new Error("Concurrent export limit reached")});else{var r=this.Re.serializeRequest(e);null!=r?this.Ae.pushPromise(this.Oe.send(r,this.Pe).then((e=>{if("success"!==e.status)t("failure"===e.status&&e.error?{code:_u.FAILED,error:e.error}:"retryable"===e.status?{code:_u.FAILED,error:new _s("Export failed with retryable status")}:{code:_u.FAILED,error:new _s("Export failed with unknown error")});else{if(null!=e.data)try{this.Ne.handleResponse(this.Re.deserializeResponse(e.data))}catch(t){this.qe.warn("Export succeeded but could not deserialize response - is the response specification compliant?",t,e.data)}t({code:_u.SUCCESS})}}),(e=>t({code:_u.FAILED,error:e})))):t({code:_u.FAILED,error:new Error("Nothing to send")})}}forceFlush(){return this.Ae.awaitAll()}shutdown(){var e=this;return t((function*(){e.qe.debug("shutdown started"),yield e.forceFlush(),e.Oe.shutdown()}))()}}function ll(e,t,r){return n={transport:r,serializer:t,promiseHandler:Os(e)},new ul(n.transport,n.serializer,{handleResponse(e){null!=e&&function(e){return{}.hasOwnProperty.call(e,"partialSuccess")}(e)&&null!=e.partialSuccess&&0!==Object.keys(e.partialSuccess).length&&ku.warn("Received Partial Success response:",JSON.stringify(e.partialSuccess))}},n.promiseHandler,{timeout:e.timeoutMillis}.timeout);var n}function cl(e){return 48>e||e>57?97>e||e>102?e-55:e-87:e-48}function dl(e){for(var t=new Uint8Array(e.length/2),r=0,n=0;e.length>n;n+=2){var i=cl(e.charCodeAt(n)),o=cl(e.charCodeAt(n+1));t[r++]=i<<4|o}return t}function hl(e){var t=BigInt(1e9);return BigInt(Math.trunc(e[0]))*t+BigInt(Math.trunc(e[1]))}function vl(e){var t;return t=hl(e),{low:Number(BigInt.asUintN(32,t)),high:Number(BigInt.asUintN(32,t>>BigInt(32)))}}var fl="undefined"!=typeof BigInt?function(e){return hl(e).toString()}:function(e){return e[0]*Pu+e[1]};function pl(e){return e}function ml(e){if(void 0!==e)return dl(e)}var yl={encodeHrTime:vl,encodeSpanContext:dl,encodeOptionalSpanContext:ml};function gl(e,t){return{key:e,value:bl(t)}}function bl(e){var t=typeof e;return"string"===t?{stringValue:e}:"number"===t?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:"boolean"===t?{boolValue:e}:e instanceof Uint8Array?{bytesValue:e}:Array.isArray(e)?{arrayValue:{values:e.map(bl)}}:"object"===t&&null!=e?{kvlistValue:{values:Object.entries(e).map((e=>{var[t,r]=e;return gl(t,r)}))}}:{}}function wl(e,t){var r=function(e){var t=new Map;for(var r of e){var{resource:n,instrumentationScope:{name:i,version:o="",schemaUrl:a=""}}=r,s=t.get(n);s||(s=new Map,t.set(n,s));var u=i+"@"+o+":"+a,l=s.get(u);l||s.set(u,l=[]),l.push(r)}return t}(e);return Array.from(r,(e=>{var[r,n]=e,i=function(e){var t,r={attributes:(t=e.attributes,Object.keys(t).map((e=>gl(e,t[e])))),droppedAttributesCount:0},n=e.schemaUrl;return n&&""!==n&&(r.schemaUrl=n),r}(r);return{resource:i,scopeLogs:Array.from(n,(e=>{var r,[,n]=e;return{scope:(r=n[0].instrumentationScope,{name:r.name,version:r.version}),logRecords:n.map((e=>function(e,t){var r,n,i,o;return{timeUnixNano:t.encodeHrTime(e.hrTime),observedTimeUnixNano:t.encodeHrTime(e.hrTimeObserved),severityNumber:e.severityNumber,severityText:e.severityText,body:bl(e.body),eventName:e.eventName,attributes:(o=e.attributes,Object.keys(o).map((e=>gl(e,o[e])))),droppedAttributesCount:e.droppedAttributesCount,flags:null==(r=e.spanContext)?void 0:r.traceFlags,traceId:t.encodeOptionalSpanContext(null==(n=e.spanContext)?void 0:n.traceId),spanId:t.encodeOptionalSpanContext(null==(i=e.spanContext)?void 0:i.spanId)}}(e,t))),schemaUrl:n[0].instrumentationScope.schemaUrl}})),schemaUrl:i.schemaUrl}}))}var kl=e=>null!==e&&"object"==typeof e&&"function"==typeof e.then;class xl{static FromAttributeList(e,t){var r=new xl({},t);return r.De=Cl(e),r.Fe=e.filter((e=>{var[t,r]=e;return kl(r)})).length>0,r}constructor(e,t){var r;this.De=void 0,this.Fe=!1,this.je=void 0,this.He=void 0;var n=null!==(r=e.attributes)&&void 0!==r?r:{};this.De=Object.entries(n).map((e=>{var[t,r]=e;return kl(r)&&(this.Fe=!0),[t,r]})),this.De=Cl(this.De),this.je=function(e){if("string"==typeof e||void 0===e)return e;ku.warn("Schema URL must be string or undefined, got %s. Schema URL will be ignored.",e)}(null==t?void 0:t.schemaUrl)}get asyncAttributesPending(){return this.Fe}waitForAsyncAttributes(){var e=this;return t((function*(){if(e.asyncAttributesPending){for(var t=0;e.De.length>t;t++){var[r,n]=e.De[t];e.De[t]=[r,kl(n)?yield n:n]}e.Fe=!1}}))()}get attributes(){if(this.asyncAttributesPending&&ku.error("Accessing resource attributes before async attributes settled"),this.He)return this.He;var e={};for(var[t,r]of this.De){var n;kl(r)?ku.debug("Unsettled resource attribute "+t+" skipped"):null!=r&&(null!==(n=e[t])&&void 0!==n||(e[t]=r))}return this.Fe||(this.He=e),e}getRawAttributes(){return this.De}get schemaUrl(){return this.je}merge(e){if(null==e)return this;var t,r,n,i,o=(i=null==(r=e)?void 0:r.schemaUrl,void 0===(n=null==(t=this)?void 0:t.schemaUrl)||""===n?i:void 0===i||""===i||n===i?n:void ku.warn('Schema URL merge conflict: old resource has "%s", updating resource has "%s". Resulting resource will have undefined Schema URL.',n,i)),a=o?{schemaUrl:o}:void 0;return xl.FromAttributeList([...e.getRawAttributes(),...this.getRawAttributes()],a)}}function Sl(e,t){return xl.FromAttributeList(Object.entries(e),t)}function Cl(e){return e.map((e=>{var[t,r]=e;return kl(r)?[t,r.catch((e=>{ku.debug("promise rejection for resource attribute: %s - %s",t,e)}))]:[t,r]}))}var Il={serializeRequest(e){var t,r,n=(t=e,r=function(e){var t,r;if(void 0===e)return yl;var n=null===(t=e.useLongBits)||void 0===t||t,i=null!==(r=e.useHex)&&void 0!==r&&r;return{encodeHrTime:n?vl:fl,encodeSpanContext:i?pl:dl,encodeOptionalSpanContext:i?pl:ml}}({useHex:!0,useLongBits:!1}),{resourceLogs:wl(t,r)});return(new TextEncoder).encode(JSON.stringify(n))},deserializeResponse(e){if(0===e.length)return{};var t=new TextDecoder;return JSON.parse(t.decode(e))}};class Tl{constructor(e){this.Oe=void 0,this.Oe=e}retry(e,t,r){return new Promise(((n,i)=>{setTimeout((()=>{this.Oe.send(e,t).then(n,i)}),r)}))}send(e,r){var n=this;return t((function*(){for(var t=Date.now()+r,i=yield n.Oe.send(e,r),o=5,a=1e3;"retryable"===i.status&&o>0;){var s;o--;var u=Math.max(Math.min(a,5e3)+(.4*Math.random()-.2),0);a*=1.5;var l=null!==(s=i.retryInMillis)&&void 0!==s?s:u,c=t-Date.now();if(l>c)return i;i=yield n.retry(e,c,l)}return i}))()}shutdown(){return this.Oe.shutdown()}}function Ml(e){return new Tl(e.transport)}function _l(e){return[429,502,503,504].includes(e)}function Ll(e){if(null!=e){var t=Number.parseInt(e,10);if(Number.isInteger(t))return t>0?1e3*t:-1;var r=new Date(e).getTime()-Date.now();return 0>r?0:r}}class El{constructor(e){this.Ue=void 0,this.Ue=e}send(e,r){var n=this;return t((function*(){var t=yield n.Ue.headers(),i=yield new Promise((i=>{var o=new XMLHttpRequest;o.timeout=r,o.open("POST",n.Ue.url),Object.entries(t).forEach((e=>{var[t,r]=e;o.setRequestHeader(t,r)})),o.ontimeout=e=>{i({status:"failure",error:new Error("XHR request timed out")})},o.onreadystatechange=()=>{200>o.status||o.status>299?o.status&&_l(o.status)?i({status:"retryable",retryInMillis:Ll(o.getResponseHeader("Retry-After"))}):0!==o.status&&i({status:"failure",error:new Error("XHR request failed with non-retryable status")}):(ku.debug("XHR success"),i({status:"success"}))},o.onabort=()=>{i({status:"failure",error:new Error("XHR request aborted")})},o.onerror=()=>{i({status:"failure",error:new Error("XHR request errored")})},o.send(e)}));return i}))()}shutdown(){}}class Ol{constructor(e){this.Be=void 0,this.Be=e}send(e){var r=this;return t((function*(){var t=(yield r.Be.headers())["Content-Type"];return new Promise((n=>{navigator.sendBeacon(r.Be.url,new Blob([e],{type:t}))?(ku.debug("SendBeacon success"),n({status:"success"})):n({status:"failure",error:new Error("SendBeacon failed")})}))}))()}shutdown(){}}class Rl{constructor(e){this.Ue=void 0,this.Ue=e}send(e,r){var n=this;return t((function*(){var t=new AbortController,i=setTimeout((()=>t.abort()),r);try{var o,a=!!globalThis.location,s=new URL(n.Ue.url),u=yield fetch(s.href,{method:"POST",headers:yield n.Ue.headers(),body:e,signal:t.signal,keepalive:a,mode:a?(null==(o=globalThis.location)?void 0:o.origin)===s.origin?"same-origin":"cors":"no-cors"});return 200>u.status||u.status>299?_l(u.status)?{status:"retryable",retryInMillis:Ll(u.headers.get("Retry-After"))}:{status:"failure",error:new Error("Fetch request failed with non-retryable status")}:(ku.debug("response success"),{status:"success"})}catch(e){return"AbortError"===(null==e?void 0:e.name)?{status:"failure",error:new Error("Fetch request timed out",{cause:e})}:{status:"failure",error:new Error("Fetch request errored",{cause:e})}}finally{clearTimeout(i)}}))()}shutdown(){}}function Nl(e,t){return ll(e,t,Ml({transport:(r=e,new El(r))}));var r}function Al(e,t){return ll(e,t,Ml({transport:(r=e,new Rl(r))}));var r}function Pl(e,t){return ll(e,t,Ml({transport:(r={url:e.url,headers:e.headers},new Ol(r))}));var r}function ql(e){if(null!=e)try{var t,r=null==(t=globalThis.location)?void 0:t.href;return new URL(e,r).href}catch(t){throw new Error("Configuration: Could not parse user-provided export URL: '"+e+"'")}}function Dl(e){return"function"==typeof e.headers?e.headers:function(e){if(null!=e)return t((function*(){return e}))}(e.headers)}function Fl(e,n,i){return o={url:e.url,timeoutMillis:e.timeoutMillis,headers:Dl(e),concurrencyLimit:e.concurrencyLimit},a={},s=function(e,n){return r({},{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"},{headers:(i=t((function*(){return e})),function(){return i.apply(this,arguments)}),url:"http://localhost:4318/"+n});var i}(i,n),r({},function(e,t,r){var n,i,o,a,s,u;return{timeoutMillis:Ls(null!==(n=null!==(i=e.timeoutMillis)&&void 0!==i?i:t.timeoutMillis)&&void 0!==n?n:r.timeoutMillis),concurrencyLimit:null!==(o=null!==(a=e.concurrencyLimit)&&void 0!==a?a:t.concurrencyLimit)&&void 0!==o?o:r.concurrencyLimit,compression:null!==(s=null!==(u=e.compression)&&void 0!==u?u:t.compression)&&void 0!==s?s:r.compression}}(o,a,s),{headers:(c=o.headers,d=a.headers,h=s.headers,t((function*(){var e=r({},yield h()),t={};return null!=d&&Object.assign(t,yield d()),null!=c&&Object.assign(t,function(e){var t={};return Object.entries(null!=e?e:{}).forEach((e=>{var[r,n]=e;void 0!==n?t[r]=String(n):ku.warn('Header "'+r+'" has invalid value ('+n+") and will be ignored")})),t}(yield c())),Object.assign(t,e)}))),url:null!==(u=null!==(l=ql(o.url))&&void 0!==l?l:a.url)&&void 0!==u?u:s.url});var o,a,s,u,l,c,d,h}function jl(e,t,r,n){return(e.headers||"function"!=typeof navigator.sendBeacon?void 0!==globalThis.fetch?Al:Nl:Pl)(Fl(e,r,n),t)}class Hl extends Ms{constructor(e){void 0===e&&(e={}),super(jl(e,Il,"v1/logs",{"Content-Type":"application/json"}))}}class Ul{set severityText(e){this.Ve()||(this.We=e)}get severityText(){return this.We}set severityNumber(e){this.Ve()||(this.ze=e)}get severityNumber(){return this.ze}set body(e){this.Ve()||(this.Ze=e)}get body(){return this.Ze}get eventName(){return this.$e}set eventName(e){this.Ve()||(this.$e=e)}get droppedAttributesCount(){return this.totalAttributesCount-Object.keys(this.attributes).length}constructor(e,t,r){this.hrTime=void 0,this.hrTimeObserved=void 0,this.spanContext=void 0,this.resource=void 0,this.instrumentationScope=void 0,this.attributes={},this.We=void 0,this.ze=void 0,this.Ze=void 0,this.$e=void 0,this.totalAttributesCount=0,this.Qe=!1,this.Ge=void 0;var{timestamp:n,observedTimestamp:i,eventName:o,severityNumber:a,severityText:s,body:u,attributes:l={},context:c}=r,d=Date.now();if(this.hrTime=Fu(null!=n?n:d),this.hrTimeObserved=Fu(null!=i?i:d),c){var h=Su.getSpanContext(c);h&&hu(h)&&(this.spanContext=h)}this.severityNumber=a,this.severityText=s,this.body=u,this.resource=e.resource,this.instrumentationScope=t,this.Ge=e.logRecordLimits,this.$e=o,this.setAttributes(l)}setAttribute(e,t){return this.Ve()||null===t?this:0===e.length?(ku.warn("Invalid attribute key: "+e),this):Iu(t)||"object"==typeof t&&!Array.isArray(t)&&Object.keys(t).length>0?(this.totalAttributesCount+=1,Object.keys(this.attributes).length<this.Ge.attributeCountLimit||{}.hasOwnProperty.call(this.attributes,e)?(this.attributes[e]=Iu(t)?this.Xe(t):t,this):(1===this.droppedAttributesCount&&ku.warn("Dropping extra attributes."),this)):(ku.warn("Invalid attribute value set for key: "+e),this)}setAttributes(e){for(var[t,r]of Object.entries(e))this.setAttribute(t,r);return this}setBody(e){return this.body=e,this}setEventName(e){return this.eventName=e,this}setSeverityNumber(e){return this.severityNumber=e,this}setSeverityText(e){return this.severityText=e,this}Ye(){this.Qe=!0}Xe(e){var t=this.Ge.attributeValueLengthLimit;return t>0?"string"==typeof e?this.Je(e,t):Array.isArray(e)?e.map((e=>"string"==typeof e?this.Je(e,t):e)):e:(ku.warn("Attribute value limit must be positive, got "+t),e)}Je(e,t){return e.length>t?e.substring(0,t):e}Ve(){return this.Qe&&ku.warn("Can not execute the operation on emitted log record"),this.Qe}}class Bl{constructor(e,t){this.instrumentationScope=void 0,this.Ke=void 0,this.instrumentationScope=e,this.Ke=t}emit(e){var t=e.context||wu.active(),n=new Ul(this.Ke,this.instrumentationScope,r({context:t},e));this.Ke.activeProcessor.onEmit(n,t),n.Ye()}}class Vl{forceFlush(){return Promise.resolve()}onEmit(e,t){}shutdown(){return Promise.resolve()}}class Wl{constructor(e,t){this.processors=void 0,this.forceFlushTimeoutMillis=void 0,this.processors=e,this.forceFlushTimeoutMillis=t}forceFlush(){var e=this;return t((function*(){var t=e.forceFlushTimeoutMillis;yield Promise.all(e.processors.map((e=>il(e.forceFlush(),t))))}))()}onEmit(e,t){this.processors.forEach((r=>r.onEmit(e,t)))}shutdown(){var e=this;return t((function*(){yield Promise.all(e.processors.map((e=>e.shutdown())))}))()}}class zl{constructor(e,t,r,n){this.resource=void 0,this.forceFlushTimeoutMillis=void 0,this.logRecordLimits=void 0,this.processors=void 0,this.loggers=new Map,this.activeProcessor=void 0,this.registeredLogRecordProcessors=[],this.resource=e,this.forceFlushTimeoutMillis=t,this.logRecordLimits=r,this.processors=n,n.length>0?(this.registeredLogRecordProcessors=n,this.activeProcessor=new Wl(this.registeredLogRecordProcessors,this.forceFlushTimeoutMillis)):this.activeProcessor=new Vl}}class Zl{constructor(e){var t,r,n;void 0===e&&(e={}),this.et=void 0,this.Ke=void 0;var i,o,a,s,u,l,c,d=function(){for(var e=arguments.length,t=new Array(e),r=0;e>r;r++)t[r]=arguments[r];for(var n=t.shift(),i=new WeakMap;t.length>0;)n=Yu(n,t.shift(),0,i);return n}({},{forceFlushTimeoutMillis:3e4,logRecordLimits:{attributeValueLengthLimit:1/0,attributeCountLimit:128},includeTraceContext:!0},e),h=null!==(t=e.resource)&&void 0!==t?t:Sl({"service.name":"unknown_service",[Eu]:Nu[Eu],[Ou]:Nu[Ou],[Ru]:Nu[Ru]});this.Ke=new zl(h,d.forceFlushTimeoutMillis,{attributeCountLimit:null!==(o=null!==(a=null!==(s=(i=d.logRecordLimits).attributeCountLimit)&&void 0!==s?s:void 0)&&void 0!==a?a:void 0)&&void 0!==o?o:128,attributeValueLengthLimit:null!==(u=null!==(l=null!==(c=i.attributeValueLengthLimit)&&void 0!==c?c:void 0)&&void 0!==l?l:void 0)&&void 0!==u?u:1/0},null!==(r=null==(n=e)?void 0:n.processors)&&void 0!==r?r:[]),this.et=new al(this.tt,this)}getLogger(e,t,r){if(this.et.isCalled)return ku.warn("A shutdown LoggerProvider cannot provide a Logger"),gs;e||ku.warn("Logger requested without instrumentation scope name.");var n=e||"unknown",i=n+"@"+(t||"")+":"+((null==r?void 0:r.schemaUrl)||"");return this.Ke.loggers.has(i)||this.Ke.loggers.set(i,new Bl({name:n,version:t,schemaUrl:null==r?void 0:r.schemaUrl},this.Ke)),this.Ke.loggers.get(i)}forceFlush(){return this.et.isCalled?(ku.warn("invalid attempt to force flush after LoggerProvider shutdown"),this.et.promise):this.Ke.activeProcessor.forceFlush()}shutdown(){return this.et.isCalled?(ku.warn("shutdown may only be called once per LoggerProvider"),this.et.promise):this.et.call()}tt(){return this.Ke.activeProcessor.shutdown()}}class $l{constructor(e,t){var r,n,i,o,a,s,u,l;this.rt=void 0,this.nt=void 0,this.it=void 0,this.ot=void 0,this.st=void 0,this.ut=!1,this.ct=[],this.dt=void 0,this.et=void 0,this.rt=e,this.nt=null!==(r=null!==(n=null==t?void 0:t.maxExportBatchSize)&&void 0!==n?n:void 0)&&void 0!==r?r:512,this.it=null!==(i=null!==(o=null==t?void 0:t.maxQueueSize)&&void 0!==o?o:void 0)&&void 0!==i?i:2048,this.ot=null!==(a=null!==(s=null==t?void 0:t.scheduledDelayMillis)&&void 0!==s?s:void 0)&&void 0!==a?a:5e3,this.st=null!==(u=null!==(l=null==t?void 0:t.exportTimeoutMillis)&&void 0!==l?l:void 0)&&void 0!==u?u:3e4,this.et=new al(this.tt,this),this.nt>this.it&&(ku.warn("BatchLogRecordProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this.nt=this.it)}onEmit(e){this.et.isCalled||this.ht(e)}forceFlush(){return this.et.isCalled?this.et.promise:this.vt()}shutdown(){return this.et.call()}tt(){var e=this;return t((function*(){e.onShutdown(),yield e.vt(),yield e.rt.shutdown()}))()}ht(e){this.it>this.ct.length&&(this.ct.push(e),this.ft())}vt(){return new Promise(((e,t)=>{for(var r=[],n=Math.ceil(this.ct.length/this.nt),i=0;n>i;i++)r.push(this.yt());Promise.all(r).then((()=>{e()})).catch(t)}))}yt(){return this.bt(),0===this.ct.length?Promise.resolve():new Promise(((e,t)=>{il(this.Ee(this.ct.splice(0,this.nt)),this.st).then((()=>e())).catch(t)}))}ft(){if(!this.ut){var e=()=>{this.ut=!0,this.yt().then((()=>{this.ut=!1,this.ct.length>0&&(this.bt(),this.ft())})).catch((e=>{this.ut=!1,Mu(e)}))};if(this.ct.length>=this.nt)return e();void 0===this.dt&&(this.dt=setTimeout((()=>e()),this.ot),"number"!=typeof this.dt&&this.dt.unref())}}bt(){void 0!==this.dt&&(clearTimeout(this.dt),this.dt=void 0)}Ee(e){var t=()=>sl.Ee(this.rt,e).then((e=>{var t;e.code!==_u.SUCCESS&&Mu(null!==(t=e.error)&&void 0!==t?t:new Error("BatchLogRecordProcessor: log record export failed (status "+e+")"))})).catch(Mu),r=e.map((e=>e.resource)).filter((e=>e.asyncAttributesPending));return 0===r.length?t():Promise.all(r.map((e=>null==e.waitForAsyncAttributes?void 0:e.waitForAsyncAttributes()))).then(t,Mu)}}class Ql extends $l{constructor(e,t){super(e,t),this.wt=void 0,this.kt=void 0,this.xt(t)}onShutdown(){"undefined"!=typeof document&&(this.wt&&document.removeEventListener("visibilitychange",this.wt),this.kt&&document.removeEventListener("pagehide",this.kt))}xt(e){!0!==(null==e?void 0:e.disableAutoFlushOnDocumentHide)&&"undefined"!=typeof document&&(this.wt=()=>{"hidden"===document.visibilityState&&this.forceFlush()},this.kt=()=>{this.forceFlush()},document.addEventListener("visibilitychange",this.wt),document.addEventListener("pagehide",this.kt))}}var Gl=1e4,Xl=function(e,t){if(void 0===t&&(t=new WeakSet),!Kt(e)&&!Yt(e))return e;if(t.has(e))return"[Circular]";t.add(e);var r,n=Yt(e)?[]:{};try{r=Object.keys(e)}catch(e){return}for(var i of r)try{n[i]=Xl(e[i],t)}catch(e){}if(e instanceof Error){try{n.name=e.name}catch(e){}try{n.message=e.message}catch(e){}try{n.stack=e.stack}catch(e){}}return n},Yl=function(e,t,r,n,i,o){if(void 0===t&&(t=""),void 0===r&&(r={}),void 0===n&&(n=50),void 0===i&&(i=Gl),void 0===o&&(o=new WeakSet),o.has(e))return r[t||"circular"]="[Circular]",r;o.add(e);try{for(var a in e)try{if(!{}.hasOwnProperty.call(e,a))continue;var s=e[a],u=t?t+"."+a:a;if(Kt(s))Yl(s,u,r,n,i,o);else{if(n-=1,i-=String(s).length,i-=u.length,0>=n||0>=i)return void(r.attributes_truncated=!0);r[u]=s}}catch(e){continue}}catch(e){}return r},Jl={log:"INFO",warn:"WARNING",error:"ERROR",debug:"DEBUG",info:"INFO"};en.__PosthogExtensions__=en.__PosthogExtensions__||{},en.__PosthogExtensions__.logs={initializeLogs(e){(e=>{var t,n={"service.name":(null==(t=e.config.logs)?void 0:t.serviceName)||"posthog-browser-logs",host:en.location.host};if(e.sessionManager){var{sessionId:i,windowId:o}=e.sessionManager.checkAndGetSessionAndWindowId(!0);n=r({},n,{"session.id":i,"window.id":o})}Ts.setGlobalLoggerProvider(new Zl({resource:Sl(n),processors:[new Ql(new Hl({url:e.config.api_host+"/i/v1/logs?token="+e.config.token,headers:{"Content-Type":"text/plain"}}))]}))})(e);var t=Ts.getLogger("console"),n={};if(e.sessionManager){var{sessionStartTimestamp:i,lastActivityTimestamp:o}=e.sessionManager.checkAndGetSessionAndWindowId(!0);n={sessionStartTimestamp:i.toString(),lastActivityTimestamp:o.toString()}}var a=function(i){var o;en.console[i]=(o=en.console[i],function(){for(var a=arguments.length,s=new Array(a),u=0;a>u;u++)s[u]=arguments[u];if(s.length>0){var l=s.map((e=>{return((e,t)=>{try{return JSON.stringify(e,t)}catch(t){try{return JSON.stringify(Xl(e))}catch(e){return}}})(e,(t=new WeakSet,(e,n)=>{if(n instanceof Error)return r({},n,{name:n.name,message:n.message,stack:n.stack});if("object"==typeof n&&!rr(n)){if(t.has(n))return"[Circular]";t.add(n)}return n}));var t})).join(" ");l.length>Gl&&(l=l.slice(0,Gl)+"...",n.body_truncated="true"),t.emit({severityText:Jl[i],body:l,attributes:r({"log.source":"console."+i,distinct_id:e.get_distinct_id(),"location.href":en.location.href},n,Kt(s[0])?Yl(s[0]):{})}),o.apply(en.console,s)}})};for(var s of["debug","log","warn","error","info"])a(s)}},on("[Error tracking]");var Kl=on("[ExceptionAutocapture]"),ec=new class{constructor(e,t,r){void 0===r&&(r=[]),this.coercers=e,this.stackParser=t,this.modifiers=r}buildFromUnknown(e,t){void 0===t&&(t={});var r=t&&t.mechanism||{handled:!0,type:"generic"},n=this.buildCoercingContext(r,t,0).apply(e),i=this.buildParsingContext(t),o=this.parseStacktrace(n,i);return{$exception_list:this.convertToExceptionList(o,r),$exception_level:"error"}}modifyFrames(e){var r=this;return t((function*(){for(var t of e)t.stacktrace&&t.stacktrace.frames&&Yt(t.stacktrace.frames)&&(t.stacktrace.frames=yield r.applyModifiers(t.stacktrace.frames));return e}))()}coerceFallback(e){var t;return{type:"Error",value:"Unknown error",stack:null==(t=e.syntheticException)?void 0:t.stack,synthetic:!0}}parseStacktrace(e,t){var n,i;return null!=e.cause&&(n=this.parseStacktrace(e.cause,t)),""!=e.stack&&null!=e.stack&&(i=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?t.skipFirstLines:0),t.chunkIdMap)),r({},e,{cause:n,stack:i})}applyChunkIds(e,t){return e.map((e=>(e.filename&&t&&(e.chunk_id=t[e.filename]),e)))}applyCoercers(e,t){for(var r of this.coercers)if(r.match(e))return r.coerce(e,t);return this.coerceFallback(t)}applyModifiers(e){var r=this;return t((function*(){var t=e;for(var n of r.modifiers)t=yield n(t);return t}))()}convertToExceptionList(e,t){var n,i,o,a={type:e.type,value:e.value,mechanism:{type:null!==(n=t.type)&&void 0!==n?n:"generic",handled:null===(i=t.handled)||void 0===i||i,synthetic:null!==(o=e.synthetic)&&void 0!==o&&o}};e.stack&&(a.stacktrace={type:"raw",frames:e.stack});var s=[a];return null!=e.cause&&s.push(...this.convertToExceptionList(e.cause,r({},t,{handled:!0}))),s}buildParsingContext(e){var t;return{chunkIdMap:Ar(this.stackParser),skipFirstLines:null!==(t=e.skipFirstLines)&&void 0!==t?t:1}}buildCoercingContext(e,t,n){void 0===n&&(n=0);var i=(r,n)=>{if(4>=n){var i=this.buildCoercingContext(e,t,n);return this.applyCoercers(r,i)}};return r({},t,{syntheticException:0==n?t.syntheticException:void 0,mechanism:e,apply:e=>i(e,n),next:e=>i(e,n+1)})}}([new class{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,t){var r=tr(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:r?e.stack:void 0,cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return this.isDOMError(e)?"DOMError":"DOMException"}getValue(e){var t=e.name||(this.isDOMError(e)?"DOMError":"DOMException");return e.message?t+": "+e.message:t}isDOMException(e){return ur(e,"DOMException")}isDOMError(e){return ur(e,"DOMError")}},new class{match(e){return ur(e,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(e)}isCustomEventWrappingRejection(e){if(!lr(e))return!1;try{var t=e.detail;return null!=t&&"object"==typeof t&&"reason"in t}catch(e){return!1}}coerce(e,t){var r,n=this.getUnhandledRejectionReason(e);return sr(n)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(n),stack:null==(r=t.syntheticException)?void 0:r.stack,synthetic:!0}:t.apply(n)}getUnhandledRejectionReason(e){try{if("reason"in e)return e.reason;if("detail"in e&&null!=e.detail&&"object"==typeof e.detail&&"reason"in e.detail)return e.detail.reason}catch(e){}return e}},new class{constructor(){}match(e){return ur(e,"ErrorEvent")&&null!=e.error}coerce(e,t){var r;return t.apply(e.error)||{type:"ErrorEvent",value:e.message,stack:null==(r=t.syntheticException)?void 0:r.stack,synthetic:!0}}},new class{match(e){return e instanceof Error}coerce(e,t){return{type:this.getType(e),value:this.getMessage(e,t),stack:this.getStack(e),cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return e.name||e.constructor.name}getMessage(e,t){var r=e.message;return String(r.error&&"string"==typeof r.error.message?r.error.message:r)}getStack(e){return e.stacktrace||e.stack||void 0}},new class{match(e){return lr(e)}coerce(e,t){var r,n=e.constructor.name;return{type:n,value:n+" captured as exception with keys: "+Qr(e),stack:null==(r=t.syntheticException)?void 0:r.stack,synthetic:!0}}},new class{match(e){return"object"==typeof e&&null!==e}coerce(e,t){var r,n=this.getErrorPropertyFromObject(e);return n?t.apply(n):{type:this.getType(e),value:this.getValue(e),stack:null==(r=t.syntheticException)?void 0:r.stack,level:this.isSeverityLevel(e.level)?e.level:"error",synthetic:!0}}getType(e){return lr(e)?e.constructor.name:"Error"}getValue(e){if("name"in e&&"string"==typeof e.name){var t="'"+e.name+"' captured as exception";return"message"in e&&"string"==typeof e.message&&(t+=" with message: '"+e.message+"'"),t}if("message"in e&&"string"==typeof e.message)return e.message;var r=this.getObjectClassName(e);return(r&&"Object"!==r?"'"+r+"'":"Object")+" captured as exception with keys: "+Qr(e)}isSeverityLevel(e){return tr(e)&&!(e=>tr(e)&&0===e.trim().length)(e)&&$r.indexOf(e)>=0}getErrorPropertyFromObject(e){for(var t in e)if({}.hasOwnProperty.call(e,t)){var r=e[t];if(r instanceof Error)return r}}getObjectClassName(e){try{var t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){return}}},new class{match(e){return"string"==typeof e}coerce(e,t){var r,[n,i]=this.getInfos(e);return{type:null!=n?n:"Error",value:null!=i?i:e,stack:null==(r=t.syntheticException)?void 0:r.stack,synthetic:!0}}getInfos(e){var t="Error",r=e,n=e.match(Zr);return n&&(t=n[1],r=n[2]),[t,r]}},new class{match(e){return sr(e)}coerce(e,t){var r;return{type:"Error",value:"Primitive value captured as exception: "+String(e),stack:null==(r=t.syntheticException)?void 0:r.stack,synthetic:!0}}}],function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;t>i;i++)n[i-1]=arguments[i];return function(t,i){void 0===i&&(i=0);for(var o=[],a=t.split("\n"),s=i;a.length>s;s++){var u=a[s];if(1024>=u.length){var l=zr.test(u)?u.replace(zr,"$1"):u;if(!l.match(/\S*Error: /)){for(var c of n){var d=c(l,e);if(d){o.push(d);break}}if(o.length>=50)break}}}return function(e){if(!e.length)return[];var t=Array.from(e);return t.reverse(),t.slice(0,50).map((e=>{return r({},e,{filename:e.filename||(n=t,n[n.length-1]||{}).filename,function:e.function||Pr});var n}))}(o)}}("web:javascript",Ur,Wr)),tc={wrapOnError(e){var t=Gr;t||Kl.info("window not available, cannot wrap onerror");var r=t.onerror;return t.onerror=function(){for(var t,n=arguments.length,i=new Array(n),o=0;n>o;o++)i[o]=arguments[o];var a=ec.buildFromUnknown(i[4]||i[0],{mechanism:{handled:!1}});return e(a),null!==(t=null==r?void 0:r(...i))&&void 0!==t&&t},t.onerror.__POSTHOG_INSTRUMENTED__=!0,()=>{var e;null==(e=t.onerror)||delete e.__POSTHOG_INSTRUMENTED__,t.onerror=r}},wrapUnhandledRejection(e){var t=Gr;t||Kl.info("window not available, cannot wrap onUnhandledRejection");var r=t.onunhandledrejection;return t.onunhandledrejection=function(t){var n,i=ec.buildFromUnknown(t,{mechanism:{handled:!1}});return e(i),null!==(n=null==r?void 0:r(t))&&void 0!==n&&n},t.onunhandledrejection.__POSTHOG_INSTRUMENTED__=!0,()=>{var e;null==(e=t.onunhandledrejection)||delete e.__POSTHOG_INSTRUMENTED__,t.onunhandledrejection=r}},wrapConsoleError(e){var t=console;t||Kl.info("console not available, cannot wrap console.error");var r=t.error;return t.error=function(){for(var t,n=arguments.length,i=new Array(n),o=0;n>o;o++)i[o]=arguments[o];t=1==i.length?i[0]:i.join(" ");var a=i.find((e=>e instanceof Error)),s=ec.buildFromUnknown(a||t,{mechanism:{handled:!1},syntheticException:new Error("PostHog syntheticException"),skipFirstLines:2});return e(s),null==r?void 0:r(...i)},t.error.__POSTHOG_INSTRUMENTED__=!0,()=>{var e;null==(e=t.error)||delete e.__POSTHOG_INSTRUMENTED__,t.error=r}}};en.__PosthogExtensions__=en.__PosthogExtensions__||{},en.__PosthogExtensions__.errorWrappingFunctions=tc,en.posthogErrorWrappingFunctions=tc;var rc="X-POSTHOG-SESSION-ID",nc="X-POSTHOG-WINDOW-ID",ic="X-POSTHOG-DISTINCT-ID",oc=[rc,nc,ic],ac=(e,t,r,n)=>{var i;try{i=new URL(n.url).hostname}catch(e){return}if(!Yt(e)||e.includes(i)){if(r){var{sessionId:o,windowId:a}=r.checkAndGetSessionAndWindowId(!0);n.headers.set(rc,o),n.headers.set(nc,a)}"$posthog_cookieless"!==t&&n.headers.set(ic,t)}};en.__PosthogExtensions__=en.__PosthogExtensions__||{};var sc={_patchFetch:(e,r,n)=>dn(Gr,"fetch",(i=>function(){var o=t((function*(t,o){var a=new Request(t,o);return ac(e,r,n,a),i(a)}));return function(e,t){return o.apply(this,arguments)}}())),_patchXHR:(e,t,r)=>dn(Gr.XMLHttpRequest.prototype,"open",(n=>function(i,o,a,s,u){void 0===a&&(a=!0);var l=this,c=new Request(o);ac(e,t,r,c);var d=n.call(l,i,c.url,a,s,u);return oc.forEach((e=>{var t=c.headers.get(e);t&&l.setRequestHeader(e,t)})),d}))};en.__PosthogExtensions__.tracingHeadersPatchFns=sc,en.postHogTracingHeadersPatchFns=sc;var uc=-1,lc=e=>{addEventListener("pageshow",(t=>{t.persisted&&(uc=t.timeStamp,e(t))}),!0)},cc=(e,t,r,n)=>{var i,o;return a=>{t.value>=0&&(a||n)&&((o=t.value-(null!=i?i:0))||void 0===i)&&(i=t.value,t.delta=o,t.rating=((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good")(t.value,r),e(t))}},dc=e=>{requestAnimationFrame((()=>requestAnimationFrame((()=>e()))))},hc=()=>{var e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},vc=()=>{var e,t=hc();return null!==(e=null==t?void 0:t.activationStart)&&void 0!==e?e:0},fc=function(e,t){void 0===t&&(t=-1);var r=hc(),n="navigate";return 0>uc?r&&(document.prerendering||vc()>0?n="prerender":document.wasDiscarded?n="restore":r.type&&(n=r.type.replace(/_/g,"-"))):n="back-forward-cache",{name:e,value:t,rating:"good",delta:0,entries:[],id:"v5-"+Date.now()+"-"+(Math.floor(8999999999999*Math.random())+1e12),navigationType:n}},pc=new WeakMap;function mc(e,t){return pc.get(e)||pc.set(e,new t),pc.get(e)}class yc{constructor(){this.t=void 0,this.i=0,this.o=[]}h(e){var t;if(!e.hadRecentInput){var r=this.o[0],n=this.o.at(-1);this.i&&r&&n&&1e3>e.startTime-n.startTime&&5e3>e.startTime-r.startTime?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),null==(t=this.t)||t.call(this,e)}}}var gc,bc=function(e,t,n){void 0===n&&(n={});try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var i=new PerformanceObserver((e=>{Promise.resolve().then((()=>{t(e.getEntries())}))}));return i.observe(r({type:e,buffered:!0},n)),i}}catch(e){}},wc=e=>{var t=!1;return()=>{t||(e(),t=!0)}},kc=-1,xc=new Set,Sc=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,Cc=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(var t of xc)t();isFinite(kc)||(kc="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",Cc,!0))}},Ic=()=>{if(0>kc){var e,t=vc(),r=document.prerendering||null==(e=globalThis.performance.getEntriesByType("visibility-state").filter((e=>"hidden"===e.name&&e.startTime>t))[0])?void 0:e.startTime;kc=null!=r?r:Sc(),addEventListener("visibilitychange",Cc,!0),addEventListener("prerenderingchange",Cc,!0),lc((()=>{setTimeout((()=>{kc=Sc()}))}))}return{get firstHiddenTime(){return kc},onHidden(e){xc.add(e)}}},Tc=e=>{document.prerendering?addEventListener("prerenderingchange",(()=>e()),!0):e()},Mc=[1800,3e3],_c=function(e,t){void 0===t&&(t={}),Tc((()=>{var r,n=Ic(),i=fc("FCP"),o=bc("paint",(e=>{for(var t of e)"first-contentful-paint"===t.name&&(o.disconnect(),n.firstHiddenTime>t.startTime&&(i.value=Math.max(t.startTime-vc(),0),i.entries.push(t),r(!0)))}));o&&(r=cc(e,i,Mc,t.reportAllChanges),lc((n=>{i=fc("FCP"),r=cc(e,i,Mc,t.reportAllChanges),dc((()=>{i.value=performance.now()-n.timeStamp,r(!0)}))})))}))},Lc=[.1,.25],Ec=0,Oc=1/0,Rc=0,Nc=e=>{for(var t of e)t.interactionId&&(Oc=Math.min(Oc,t.interactionId),Rc=Math.max(Rc,t.interactionId),Ec=Rc?(Rc-Oc)/7+1:0)},Ac=()=>{var e;return gc?Ec:null!==(e=performance.interactionCount)&&void 0!==e?e:0},Pc=0;class qc{constructor(){this.u=[],this.l=new Map,this.m=void 0,this.p=void 0}v(){Pc=Ac(),this.u.length=0,this.l.clear()}L(){var e=Math.min(this.u.length-1,Math.floor((Ac()-Pc)/50));return this.u[e]}h(e){var t;if(null!=(t=this.m)&&t.call(this,e),e.interactionId||"first-input"===e.entryType){var r=this.u.at(-1),n=this.l.get(e.interactionId);if(n||10>this.u.length||e.duration>r.P){var i;if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(this.l.set((n={id:e.interactionId,entries:[e],P:e.duration}).id,n),this.u.push(n)),this.u.sort(((e,t)=>t.P-e.P)),this.u.length>10){var o=this.u.splice(10);for(var a of o)this.l.delete(a.id)}null==(i=this.p)||i.call(this,n)}}}}var Dc=e=>{var t=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?e():(e=wc(e),addEventListener("visibilitychange",e,{once:!0,capture:!0}),t((()=>{e(),removeEventListener("visibilitychange",e,{capture:!0})})))},Fc=[200,500];class jc{constructor(){this.m=void 0}h(e){var t;null==(t=this.m)||t.call(this,e)}}var Hc=[2500,4e3],Uc={onLCP(e,t){void 0===t&&(t={}),Tc((()=>{var r,n=Ic(),i=fc("LCP"),o=mc(t,jc),a=e=>{for(var a of(t.reportAllChanges||(e=e.slice(-1)),e))o.h(a),n.firstHiddenTime>a.startTime&&(i.value=Math.max(a.startTime-vc(),0),i.entries=[a],r())},s=bc("largest-contentful-paint",a);if(s){r=cc(e,i,Hc,t.reportAllChanges);var u=wc((()=>{a(s.takeRecords()),s.disconnect(),r(!0)})),l=e=>{e.isTrusted&&(Dc(u),removeEventListener(e.type,l,{capture:!0}))};for(var c of["keydown","click","visibilitychange"])addEventListener(c,l,{capture:!0});lc((n=>{i=fc("LCP"),r=cc(e,i,Hc,t.reportAllChanges),dc((()=>{i.value=performance.now()-n.timeStamp,r(!0)}))}))}}))},onCLS(e,t){void 0===t&&(t={});var r=Ic();_c(wc((()=>{var n,i=fc("CLS",0),o=mc(t,yc),a=e=>{for(var t of e)o.h(t);o.i>i.value&&(i.value=o.i,i.entries=o.o,n())},s=bc("layout-shift",a);s&&(n=cc(e,i,Lc,t.reportAllChanges),r.onHidden((()=>{a(s.takeRecords()),n(!0)})),lc((()=>{o.i=0,i=fc("CLS",0),n=cc(e,i,Lc,t.reportAllChanges),dc((()=>n()))})),setTimeout(n))})))},onFCP:_c,onINP(e,t){if(void 0===t&&(t={}),globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype){var r=Ic();Tc((()=>{var n;"interactionCount"in performance||gc||(gc=bc("event",Nc,{type:"event",buffered:!0,durationThreshold:0}));var i,o=fc("INP"),a=mc(t,qc),s=e=>{Dc((()=>{for(var t of e)a.h(t);var r=a.L();r&&r.P!==o.value&&(o.value=r.P,o.entries=r.entries,i())}))},u=bc("event",s,{durationThreshold:null!==(n=t.durationThreshold)&&void 0!==n?n:40});i=cc(e,o,Fc,t.reportAllChanges),u&&(u.observe({type:"first-input",buffered:!0}),r.onHidden((()=>{s(u.takeRecords()),i(!0)})),lc((()=>{a.v(),o=fc("INP"),i=cc(e,o,Fc,t.reportAllChanges)})))}))}}};function Bc(e,t){return t.length>e?t.slice(0,e)+"...":t}function Vc(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do{t=t.previousSibling}while(t&&!mn(t));return t}function Wc(e,t){var n,i,{e:o,maskAllElementAttributes:a,maskAllText:s,elementAttributeIgnoreList:u}=t;if(!mn(e))return{props:{}};for(var l=[e],c=e;c.parentNode&&!yn(c,"body");)if(gn(c.parentNode))l.push(c.parentNode.host),c=c.parentNode.host;else{if(!mn(c.parentNode))break;l.push(c.parentNode),c=c.parentNode}var d,h,v,f,p=[],m={},y=!1,g=!1;if(an(l,(e=>{var t=Mn(e);if(yn(e,"a")){var r=e.getAttribute("href");y=t&&!!r&&Pn(r)&&r}Zt(wn(e),"ph-no-capture")&&(g=!0),p.push(function(e,t,r,n){var i=e.tagName.toLowerCase(),o={tag_name:i};xn.indexOf(i)>-1&&!r&&(o.$el_text="a"===i.toLowerCase()||"button"===i.toLowerCase()?Bc(1024,qn(e)):Bc(1024,kn(e)));var a=wn(e);a.length>0&&(o.classes=a.filter((function(e){return""!==e}))),an(e.attributes,(function(r){var i;if((!_n(e)||-1!==["name","id","class","aria-label"].indexOf(r.name))&&(null==n||!n.includes(r.name))&&!t&&Pn(r.value)&&(!tr(i=r.name)||"_ngcontent"!==i.substring(0,10)&&"_nghost"!==i.substring(0,7))){var a=r.value;"class"===r.name&&(a=bn(a).join(" ")),o["attr__"+r.name]=Bc(1024,a)}}));for(var s=1,u=1,l=e;l=Vc(l);)s++,l.tagName===e.tagName&&u++;return o.nth_child=s,o.nth_of_type=u,o}(e,a,s,u));var n=function(e){if(!Mn(e))return{};var t={};return an(e.attributes,(function(e){if(e.name&&0===e.name.indexOf("data-ph-capture-attribute")){var r=e.name.replace("data-ph-capture-attribute-",""),n=e.value;r&&n&&Pn(n)&&(t[r]=n)}})),t}(e);sn(m,n)})),g)return{props:{},explicitNoCapture:g};if(s||(p[0].$el_text=yn(e,"a")||yn(e,"button")?qn(e):kn(e)),y){var b,w;p[0].attr__href=y;var k=null==(h=y,v=null==Jr?void 0:Jr.createElement("a"),b=er(v)?null:(v.href=h,v))?void 0:b.host,x=null==Gr||null==(w=Gr.location)?void 0:w.host;k&&x&&k!==x&&(d=y)}return{props:sn({$event_type:o.type,$ce_version:1},{$elements:p},{$elements_chain:(f=p,function(e){var t=e.map((e=>{var t,n,i="";if(e.tag_name&&(i+=e.tag_name),e.attr_class)for(var o of(e.attr_class.sort(),e.attr_class))i+="."+o.replace(/"/g,"");var a=r({},e.text?{text:e.text}:{},{"nth-child":null!==(t=e.nth_child)&&void 0!==t?t:0,"nth-of-type":null!==(n=e.nth_of_type)&&void 0!==n?n:0},e.href?{href:e.href}:{},e.attr_id?{attr_id:e.attr_id}:{},e.attributes),s={};return un(a).sort(((e,t)=>{var[r]=e,[n]=t;return r.localeCompare(n)})).forEach((e=>{var[t,r]=e;return s[Fn(t.toString())]=Fn(r.toString())})),(i+=":")+un(s).map((e=>{var[t,r]=e;return t+'="'+r+'"'})).join("")}));return t.join(";")}(function(e){return e.map((e=>{var t,r,n={text:null==(t=e.$el_text)?void 0:t.slice(0,400),tag_name:e.tag_name,href:null==(r=e.attr__href)?void 0:r.slice(0,2048),attr_class:jn(e),attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return un(e).filter((e=>{var[t]=e;return 0===t.indexOf("attr__")})).forEach((e=>{var[t,r]=e;return n.attributes[t]=r})),n}))}(f)))},null!=(n=p[0])&&n.$el_text?{$el_text:null==(i=p[0])?void 0:i.$el_text}:{},d&&"click"===o.type?{$external_click_url:d}:{},m)}}en.__PosthogExtensions__=en.__PosthogExtensions__||{},en.__PosthogExtensions__.postHogWebVitalsCallbacks=Uc,en.postHogWebVitalsCallbacks=Uc,en.__PosthogExtensions__.loadWebVitalsCallbacks=()=>Uc,on("[AutoCapture]");var zc={};function Zc(e){return function(e,t){var r=zc[e];if(r)return r;var n,i=t[e];if(Jt(n=i)&&-1!==n.toString().indexOf("[native code]")&&!Gr.Zone)return zc[e]=i.bind(t);var o=t.document;if(o&&Jt(o.createElement))try{var a=o.createElement("iframe");a.hidden=!0,o.head.appendChild(a);var s=a.contentWindow;s&&s[e]&&(i=s[e]),o.head.removeChild(a)}catch(t){nn.warn("Could not create sandbox iframe for "+e+" check, bailing to assignableWindow."+e+": ",t)}return i&&Jt(i)?zc[e]=i.bind(t):i}("MutationObserver",e)}function $c(e,t){return ir(e)&&e>=t}class Qc{St(e){var t,r,n,i,o,a=this.Ct((null==e?void 0:e.__onCapture)||this.It.bind(this));return{element_attribute_ignorelist:null!==(t=null==e?void 0:e.element_attribute_ignorelist)&&void 0!==t?t:a.element_attribute_ignorelist,scroll_threshold_ms:null!==(r=null==e?void 0:e.scroll_threshold_ms)&&void 0!==r?r:a.scroll_threshold_ms,selection_change_threshold_ms:null!==(n=null==e?void 0:e.selection_change_threshold_ms)&&void 0!==n?n:a.selection_change_threshold_ms,mutation_threshold_ms:null!==(i=null==e?void 0:e.mutation_threshold_ms)&&void 0!==i?i:a.mutation_threshold_ms,capture_clicks_with_modifier_keys:null!==(o=null==e?void 0:e.capture_clicks_with_modifier_keys)&&void 0!==o?o:a.capture_clicks_with_modifier_keys,css_selector_ignorelist:null==e?void 0:e.css_selector_ignorelist,__onCapture:a.__onCapture}}constructor(e,t){this.Tt=[],this.Ct=e=>({element_attribute_ignorelist:[],scroll_threshold_ms:100,selection_change_threshold_ms:100,mutation_threshold_ms:2500,capture_clicks_with_modifier_keys:!1,__onCapture:e}),this.Mt=e=>{var t=function(e){var t=function(e){return er(e.target)?e.srcElement||null:null!=(t=e.target)&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t}(e);return t?{node:t,originalEvent:e,timestamp:Date.now()}:null}(e);rr(t)||this._t(t)||this.Tt.push(t),this.Tt.length&&er(this.Lt)&&(this.Lt=en.setTimeout((()=>{this.Et()}),1e3))},this.Ot=()=>{var e=Date.now();e%50==0&&this.Tt.forEach((t=>{er(t.scrollDelayMs)&&(t.scrollDelayMs=e-t.timestamp)}))},this.Rt=()=>{this.Nt=Date.now()},this.At=()=>{"visible"===(null==Jr?void 0:Jr.visibilityState)&&(this.Pt=Date.now())},this.instance=e,this.qt=this.St(t),this._onCapture=this.qt.__onCapture}start(e){this.Dt(),this.Ft(),this.jt(),this.Ht(),this.Ut(e)}Ut(e){if(!this.Bt){var t=Zc(en);this.Bt=new t((e=>{this.Vt(e)})),this.Bt.observe(e,{attributes:!0,characterData:!0,childList:!0,subtree:!0})}}stop(){var e;null==(e=this.Bt)||e.disconnect(),this.Bt=void 0,en.removeEventListener("click",this.Mt),en.removeEventListener("scroll",this.Ot,{capture:!0}),en.removeEventListener("selectionchange",this.Rt),null==Jr||Jr.removeEventListener("visibilitychange",this.At)}Vt(e){this.Wt=Date.now()}Dt(){ln(en,"click",this.Mt)}Ft(){ln(en,"scroll",this.Ot,{capture:!0})}jt(){ln(en,"selectionchange",this.Rt)}Ht(){ln(Jr,"visibilitychange",this.At)}_t(e){if(!e)return!0;if(!this.qt.capture_clicks_with_modifier_keys&&((t=e.originalEvent).ctrlKey||t.metaKey||t.altKey||t.shiftKey))return!0;var t,r;if((r=e.node)instanceof Element&&("__POSTHOG_TOOLBAR__"===r.id||null!=r.closest&&r.closest(".toolbar-global-fade-container")))return!0;var n=this.Tt.some((t=>t.node===e.node&&1e3>Math.abs(t.timestamp-e.timestamp)));return!(!n&&!yn(e.node,"html")&&mn(e.node)&&!function(e){if(!Gr||In(e))return!1;var{targetElementList:t}=Tn(e);return t.some((e=>yn(e,"a")))}(e.node)&&function(e,t){var r;if(!Gr||In(e))return!1;var n=or(t)?Cn:null!==(r=null==t?void 0:t.css_selector_ignorelist)&&void 0!==r?r:Cn,{targetElementList:i}=Tn(e);return!function(e,t){if(er(t))return!0;var r,n=function(e){if(t.some((t=>e.matches(t))))return{v:!0}};for(var i of e)if(r=n(i))return r.v;return!1}(i,n)}(e.node,{css_selector_ignorelist:this.qt.css_selector_ignorelist}))}Et(){if(this.Tt.length){clearTimeout(this.Lt),this.Lt=void 0;var e=this.Tt;for(var t of(this.Tt=[],e)){var r;t.mutationDelayMs=null!==(r=t.mutationDelayMs)&&void 0!==r?r:this.Wt&&this.Wt>=t.timestamp?this.Wt-t.timestamp:void 0,t.absoluteDelayMs=Date.now()-t.timestamp,t.selectionChangedDelayMs=this.Nt&&this.Nt>=t.timestamp?this.Nt-t.timestamp:void 0,t.visibilityChangedDelayMs=this.Pt?Math.abs(t.timestamp-this.Pt):void 0;var n=$c(t.scrollDelayMs,this.qt.scroll_threshold_ms),i=$c(t.selectionChangedDelayMs,this.qt.selection_change_threshold_ms),o=$c(t.mutationDelayMs,this.qt.mutation_threshold_ms),a=$c(t.absoluteDelayMs,1.1*this.qt.mutation_threshold_ms),s=ir(t.scrollDelayMs)&&this.qt.scroll_threshold_ms>t.scrollDelayMs,u=ir(t.mutationDelayMs)&&this.qt.mutation_threshold_ms>t.mutationDelayMs,l=ir(t.selectionChangedDelayMs)&&this.qt.selection_change_threshold_ms>t.selectionChangedDelayMs,c=ir(t.visibilityChangedDelayMs)&&this.qt.selection_change_threshold_ms>t.visibilityChangedDelayMs;if(!(s||u||l||c)){var d=$c(t.visibilityChangedDelayMs,this.qt.selection_change_threshold_ms);n||o||a||i||d?this._onCapture(t,{$dead_click_last_mutation_timestamp:this.Wt,$dead_click_event_timestamp:t.timestamp,$dead_click_scroll_timeout:n,$dead_click_mutation_timeout:o,$dead_click_absolute_timeout:a,$dead_click_selection_changed_timeout:i,$dead_click_visibility_changed_timeout:d}):this.qt.mutation_threshold_ms>t.absoluteDelayMs&&this.Tt.push(t)}}this.Tt.length&&er(this.Lt)&&(this.Lt=en.setTimeout((()=>{this.Et()}),1e3))}}It(e,t){this.instance.capture("$dead_click",r({},t,Wc(e.node,{e:e.originalEvent,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.qt.element_attribute_ignorelist}).props,{$dead_click_scroll_delay_ms:e.scrollDelayMs,$dead_click_mutation_delay_ms:e.mutationDelayMs,$dead_click_absolute_delay_ms:e.absoluteDelayMs,$dead_click_selection_changed_delay_ms:e.selectionChangedDelayMs,$dead_click_visibility_changed_delay_ms:e.visibilityChangedDelayMs}),{timestamp:new Date(e.timestamp)})}}en.__PosthogExtensions__=en.__PosthogExtensions__||{},en.__PosthogExtensions__.initDeadClicksAutocapture=(e,t)=>new Qc(e,t)}();
|
|
1
|
+
!function(){"use strict";function e(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function t(t){return function(){var r=this,n=arguments;return new Promise((function(i,o){var a=t.apply(r,n);function s(t){e(a,i,o,s,u,"next",t)}function u(t){e(a,i,o,s,u,"throw",t)}s(void 0)}))}}function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;arguments.length>t;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},r.apply(null,arguments)}var n,i=["type"],o=Object.defineProperty,a=(e,t,r)=>((e,t,r)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),s=(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))(s||{}),u=(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))(u||{}),l=(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))(l||{}),c=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(c||{}),d=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(d||{}),h=(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))(h||{}),v=(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))(v||{}),f={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},p={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},m={};function y(e){if(m[e])return m[e];var t=function(e){var t,r,n=null==(r=null==(t=null==globalThis?void 0:globalThis.Zone)?void 0:t.__symbol__)?void 0:r.call(t,e);return n&&globalThis[n]?globalThis[n]:void 0}(e)||globalThis[e],r=t.prototype,n=e in f?f[e]:void 0,i=Boolean(n&&n.every((e=>{var t,n;return Boolean(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))}))),o=e in p?p[e]:void 0,a=Boolean(o&&o.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(i&&a)return m[e]=t.prototype,t.prototype;var s=document.createElement("iframe");try{document.body.appendChild(s);var u=s.contentWindow;if(!u)return t.prototype;var l=u[e].prototype;return l?m[e]=l:r}catch(e){return r}finally{s.parentNode&&document.body.removeChild(s)}}var g={};function b(e,t,r){var n,i=e+"."+String(r);if(g[i])return g[i].call(t);var o=y(e),a=null==(n=Object.getOwnPropertyDescriptor(o,r))?void 0:n.get;return a?(g[i]=a,a.call(t)):t[r]}var w={};function k(e,t,r){var n=e+"."+String(r);if(w[n])return w[n].bind(t);var i=y(e)[r];return"function"!=typeof i?t[r]:(w[n]=i,i.bind(t))}function x(){return y("MutationObserver").constructor}function S(e,t,r){try{if(!(t in e))return()=>{};var n=e[t],i=r(n);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=i,()=>{e[t]=n}}catch(e){return()=>{}}}var C={childNodes:e=>b("Node",e,"childNodes"),parentNode:e=>b("Node",e,"parentNode"),parentElement:e=>b("Node",e,"parentElement"),textContent:e=>b("Node",e,"textContent"),contains:(e,t)=>k("Node",e,"contains")(t),getRootNode:e=>k("Node",e,"getRootNode")(),host:e=>e&&"host"in e?b("ShadowRoot",e,"host"):null,styleSheets:e=>e.styleSheets,shadowRoot:e=>e&&"shadowRoot"in e?b("Element",e,"shadowRoot"):null,querySelector:(e,t)=>k("Element",e,"querySelector")(t),querySelectorAll:(e,t)=>k("Element",e,"querySelectorAll")(t),mutationObserver:x,patch:S};function I(e){return e.nodeType===e.ELEMENT_NODE}function T(e){var t=e&&"host"in e&&"mode"in e&&C.host(e)||null;return Boolean(t&&"shadowRoot"in t&&C.shadowRoot(t)===e)}function M(e){return"[object ShadowRoot]"==={}.toString.call(e)}function _(e){try{var t=e.rules||e.cssRules;if(!t)return null;var r=e.href;return!r&&e.ownerNode&&(r=e.ownerNode.baseURI),(n=Array.from(t,(e=>L(e,r))).join("")).includes(" background-clip: text;")&&!n.includes(" -webkit-background-clip: text;")&&(n=n.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),n}catch(e){return null}var n}function L(e,t){var r;if(function(e){return"styleSheet"in e}(e)){var n;try{n=_(e.styleSheet)||function(e){var{cssText:t}=e;if(3>t.split('"').length)return t;var r=["@import","url("+JSON.stringify(e.href)+")"];return""===e.layerName?r.push("layer"):e.layerName&&r.push("layer("+e.layerName+")"),e.supportsText&&r.push("supports("+e.supportsText+")"),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}(e)}catch(t){n=e.cssText}try{if(n&&(null==(r=e.styleSheet)?void 0:r.href))return j(n,e.styleSheet.href)}catch(e){}return n}var i=e.cssText;return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(i=i.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),t?j(i,t):i}class O{constructor(){a(this,"idNodeMap",new Map),a(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;var r=null==(t=this.getMeta(e))?void 0:t.id;return null!=r?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){var t=this.getId(e);if(this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach((e=>this.removeNodeFromMap(e))),I(e)){var r=C.shadowRoot(e);r&&this.removeNodeFromMap(r),"IFRAME"===e.nodeName&&e.contentDocument&&this.removeNodeFromMap(e.contentDocument)}}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){this.idNodeMap.set(t.id,e),this.nodeMetaMap.set(e,t)}replace(e,t){var r=this.getNode(e);if(r){var n=this.nodeMetaMap.get(r);n&&this.nodeMetaMap.set(t,n)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function E(e){var{element:t,maskInputOptions:r,tagName:n,type:i,value:o,maskInputFn:a}=e,s=o||"",u=i&&R(i);return(r[n.toLowerCase()]||u&&r[u])&&(s=a?a(s,t):"*".repeat(s.length)),s}function R(e){return e.toLowerCase()}var N="__rrweb_original__";function A(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?R(t):null}var P=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,q=/^(?:[a-z+]+:)?\/\//i,D=/^www\..*/i,F=/^(data:)([^,]*),(.*)/i;function j(e,t){return(e||"").replace(P,((e,r,n,i,o,a)=>{var s,u=n||o||a,l=r||i||"";if(!u)return e;if(q.test(u)||D.test(u))return"url("+l+u+l+")";if(F.test(u))return"url("+l+u+l+")";if("/"===u[0])return"url("+l+(((s=t).indexOf("//")>-1?s.split("/").slice(0,3).join("/"):s.split("/")[0]).split("?")[0]+u)+l+")";var c=t.split("/"),d=u.split("/");for(var h of(c.pop(),d))"."!==h&&(".."===h?c.pop():c.push(h));return"url("+l+c.join("/")+l+")"}))}var H,U,B="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==",V=4096,W=1,z=new RegExp("[^a-z0-9-_:]"),Z=-2;function Q(){return W++}var G=/^[^ \t\n\r\u000c]+/,J=/^[, \t\n\r\u000c]+/,X=new WeakMap;function Y(e,t){return t&&""!==t.trim()?K(e,t):t}function K(e,t){var r=X.get(e);if(r||(r=e.createElement("a"),X.set(e,r)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return r.setAttribute("href",t),r.href}function ee(e,t,r,n,i,o){var a,s,u;if(!n)return n;if("src"===r||"href"===r&&("use"!==t||"#"!==n[0])){if("link"===t&&i){var l=null==(a=i.sheet)?void 0:a.href;if(l)return l}var c=Y(e,n);if("img"===t&&c.startsWith("data:")&&i){var d=c;return((null==o?void 0:o.type)||void 0!==(null==o?void 0:o.quality))&&(d=function(e,t,r,n){if(!e.complete||0===e.naturalWidth)return t;if(e.naturalWidth>V||e.naturalHeight>V)return t;try{var i=document.createElement("canvas");i.width=e.naturalWidth,i.height=e.naturalHeight;var o=i.getContext("2d");return o?(o.drawImage(e,0,0),i.toDataURL(r||"image/webp",null!=n?n:.4)):t}catch(e){return t}}(i,c,o.type,o.quality)),(null==o?void 0:o.maxBase64ImageLength)&&(s=d,d=(u=o.maxBase64ImageLength)&&s.length>u?B:s),d}return c}return"xlink:href"===r&&"#"!==n[0]?Y(e,n):"background"!==r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===r?function(e,t){if(""===t.trim())return t;var r=0;function n(e){var n,i=e.exec(t.substring(r));return i?(r+=(n=i[0]).length,n):""}for(var i=[];n(J),t.length>r;){var o=n(G);if(","===o.slice(-1))o=Y(e,o.substring(0,o.length-1)),i.push(o);else{var a="";o=Y(e,o);for(var s=!1;;){var u=t.charAt(r);if(""===u){i.push((o+a).trim());break}if(s)")"===u&&(s=!1);else{if(","===u){r+=1,i.push((o+a).trim());break}"("===u&&(s=!0)}a+=u,r+=1}}}return i.join(", ")}(e,n):"style"===r?j(n,K(e)):"object"===t&&"data"===r?Y(e,n):n:Y(e,n)}function te(e,t,r){return("video"===e||"audio"===e)&&"autoplay"===t}function re(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&re(C.parentNode(e),t,r);for(var n=e.classList.length;n--;)if(t.test(e.classList[n]))return!0;return!!r&&re(C.parentNode(e),t,r)}function ne(e,t,r,n){var i;if(I(e)){if(!C.childNodes(i=e).length)return!1}else{if(null===C.parentElement(e))return!1;i=C.parentElement(e)}try{if("string"==typeof t){if(n){if(i.closest("."+t))return!0}else if(i.classList.contains(t))return!0}else if(re(i,t,n))return!0;if(r)if(n){if(i.closest(r))return!0}else if(i.matches(r))return!0}catch(e){}return!1}var ie=new Map;function oe(e,t){return Array.from(e.styleSheets).find((e=>e.href===t))}function ae(e){return null==e?"":e.toLowerCase()}var se=50,ue=!1,le=!1;function ce(e,t){var{doc:r,mirror:n,blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:s,skipChild:u=!1,inlineStylesheet:l=!0,maskInputOptions:c={},maskTextFn:d,maskInputFn:h,slimDOMOptions:f,dataURLOptions:p={},inlineImages:m=!1,recordCanvas:y=!1,onSerialize:g,onIframeLoad:b,iframeLoadTimeout:w=5e3,onStylesheetLoad:k,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:S=(()=>!1),newlyAddedElement:L=!1,depth:O=0,maxDepth:P=se}=t,{needsMask:q}=t,{preserveWhiteSpace:D=!0}=t;if(O>=P)return le=!0,ue||(ue=!0,console.warn("[rrweb-snapshot] DOM tree depth exceeded max depth of "+P+". Children beyond this depth will not be recorded. This may indicate deeply nested DOM structures.")),null;q||(q=ne(e,a,s,void 0===q));var F,B=function(e,t){var{doc:r,mirror:n,blockClass:i,blockSelector:o,needsMask:a,inlineStylesheet:s,maskInputOptions:u={},maskTextFn:l,maskInputFn:c,dataURLOptions:d={},inlineImages:h,recordCanvas:f,keepIframeSrcFn:p,newlyAddedElement:m=!1}=t,y=function(e,t){if(t.hasNode(e)){var r=t.getId(e);return 1===r?void 0:r}}(r,n);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:v.Document,childNodes:[],compatMode:e.compatMode}:{type:v.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:v.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:y};case e.ELEMENT_NODE:return function(e,t){for(var r,n,i,{doc:o,blockClass:a,blockSelector:s,inlineStylesheet:u,maskInputOptions:l={},maskInputFn:c,dataURLOptions:d={},inlineImages:h,recordCanvas:f,keepIframeSrcFn:p,newlyAddedElement:m=!1,rootId:y}=t,g=function(e,t,r){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var n=e.classList.length;n--;)if(t.test(e.classList[n]))return!0;if(r)return e.matches(r)}catch(e){}return!1}(e,a,s),b=function(e){if(e instanceof HTMLFormElement)return"form";var t=R(e.tagName);return z.test(t)?"div":t}(e),w={},k=e.attributes.length,x=0;k>x;x++){var S=e.attributes[x];te(b,S.name)||(w[S.name]=ee(o,b,R(S.name),S.value,e,d))}if("link"===b&&u){var I=e.sheet;if(!I){var T=function(e){return e.href}(e);T&&!(I=oe(o,T))&&T.includes(".css")&&(I=oe(o,window.location.origin+"/"+T.replace(window.location.href,"")))}var M=null;I&&(M=_(I)),M&&(delete w.rel,delete w.href,w._cssText=M)}if("style"===b&&e.sheet&&!(e.innerText||C.textContent(e)||"").trim().length){var L=_(e.sheet);L&&(w._cssText=L)}if("input"===b||"textarea"===b||"select"===b){var O=e.value,P=e.checked;"radio"!==w.type&&"checkbox"!==w.type&&"submit"!==w.type&&"button"!==w.type&&O?w.value=E({element:e,type:A(e),tagName:b,value:O,maskInputOptions:l,maskInputFn:c}):P&&(w.checked=P)}if("option"===b&&(e.selected&&!l.select?w.selected=!0:delete w.selected),"dialog"===b&&e.open)try{w.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"}catch(e){w.rr_open_mode="modal",w.ph_rr_could_not_detect_modal=!0}if("canvas"===b&&f)if("2d"===e.__context)(function(e){var t=e.getContext("2d");if(!t)return!0;for(var r=0;e.width>r;r+=50)for(var n=0;e.height>n;n+=50){var i=t.getImageData;if(new Uint32Array((N in i?i[N]:i).call(t,r,n,Math.min(50,e.width-r),Math.min(50,e.height-n)).data.buffer).some((e=>0!==e)))return!1}return!0})(e)||(w.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){var q=e.toDataURL(d.type,d.quality),D=o.createElement("canvas");D.width=e.width,D.height=e.height,q!==D.toDataURL(d.type,d.quality)&&(w.rr_dataURL=q)}if("img"===b&&h){H||(H=o.createElement("canvas"),U=H.getContext("2d"));var F=e,j=F.currentSrc||F.getAttribute("src")||"<unknown-src>",B=F.crossOrigin,V=()=>{F.removeEventListener("load",V);try{H.width=F.naturalWidth,H.height=F.naturalHeight,U.drawImage(F,0,0),w.rr_dataURL=H.toDataURL(d.type,d.quality)}catch(e){if("anonymous"!==F.crossOrigin)return F.crossOrigin="anonymous",void(F.complete&&0!==F.naturalWidth?V():F.addEventListener("load",V));console.warn("Cannot inline img src="+j+"! Error: "+e)}"anonymous"===F.crossOrigin&&(B?w.crossOrigin=B:F.removeAttribute("crossorigin"))};F.complete&&0!==F.naturalWidth?V():F.addEventListener("load",V)}if("audio"===b||"video"===b){var W=w;W.rr_mediaState=e.paused?"paused":"played",W.rr_mediaCurrentTime=e.currentTime,W.rr_mediaPlaybackRate=e.playbackRate,W.rr_mediaMuted=e.muted,W.rr_mediaLoop=e.loop,W.rr_mediaVolume=e.volume}if(m||(e.scrollLeft&&(w.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(w.rr_scrollTop=e.scrollTop)),g){var{width:Z,height:Q,left:G,top:J}=e.getBoundingClientRect();w={class:w.class,rr_width:Z+"px",rr_height:Q+"px",rr_left:Math.floor(G+((null==(r=o.defaultView)?void 0:r.scrollX)||0))+"px",rr_top:Math.floor(J+((null==(n=o.defaultView)?void 0:n.scrollY)||0))+"px"}}"iframe"!==b||p(w.src)||(e.contentDocument||(w.rr_src=w.src),delete w.src);try{customElements.get(b)&&(i=!0)}catch(e){}return{type:v.Element,tagName:b,attributes:w,childNodes:[],isSVG:(X=e,Boolean("svg"===X.tagName||X.ownerSVGElement)||void 0),needBlock:g,rootId:y,isCustom:i};var X}(e,{doc:r,blockClass:i,blockSelector:o,inlineStylesheet:s,maskInputOptions:u,maskInputFn:c,dataURLOptions:d,inlineImages:h,recordCanvas:f,keepIframeSrcFn:p,newlyAddedElement:m,rootId:y});case e.TEXT_NODE:return function(e,t){var r,{needsMask:n,maskTextFn:i,rootId:o}=t,a=C.parentNode(e),s=a&&a.tagName,u=C.textContent(e),l="STYLE"===s||void 0,c="SCRIPT"===s||void 0;if(l&&u){try{if(e.nextSibling||e.previousSibling);else if(null==(r=a.sheet)?void 0:r.cssRules){var d=_(a.sheet);d&&!/(?:^|[\s;{}])-?[a-zA-Z][\w-]*\s*:\s*;/.test(d)&&(u=d)}}catch(t){console.warn("Cannot get CSS styles from text's parentNode. Error: "+t,e)}u=j(u,K(t.doc))}return c&&(u="SCRIPT_PLACEHOLDER"),!l&&!c&&u&&n&&(u=i?i(u,C.parentElement(e)):u.replace(/[\S]/g,"*")),{type:v.Text,textContent:u||"",isStyle:l,rootId:o}}(e,{doc:r,needsMask:a,maskTextFn:l,rootId:y});case e.CDATA_SECTION_NODE:return{type:v.CDATA,textContent:"",rootId:y};case e.COMMENT_NODE:return{type:v.Comment,textContent:C.textContent(e)||"",rootId:y};default:return!1}}(e,{doc:r,mirror:n,blockClass:i,blockSelector:o,needsMask:q,inlineStylesheet:l,maskInputOptions:c,maskTextFn:d,maskInputFn:h,dataURLOptions:p,inlineImages:m,recordCanvas:y,keepIframeSrcFn:S,newlyAddedElement:L});if(!B)return console.warn(e,"not serialized"),null;F=n.hasNode(e)?n.getId(e):function(e,t){if(t.comment&&e.type===v.Comment)return!0;if(e.type===v.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel&&"script"===e.attributes.as||"modulepreload"===e.attributes.rel)||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===function(e,t){var r,n;try{n=new URL(e,window.location.href)}catch(e){return null}var i=n.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(r=null==i?void 0:i[1])&&void 0!==r?r:null}(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(ae(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===ae(e.attributes.name)||["icon","apple-touch-icon","shortcut icon"].includes(ae(e.attributes.rel)))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&ae(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(ae(e.attributes.property).match(/^(og|twitter|fb):/)||ae(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===ae(e.attributes.name)))return!0;if(t.headMetaRobots&&["robots","googlebot","bingbot"].includes(ae(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&(["author","generator","framework","publisher","progid"].includes(ae(e.attributes.name))||ae(e.attributes.property).match(/^article:/)||ae(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&["google-site-verification","yandex-verification","csrf-token","p:domain_verify","verify-v1","verification","shopify-checkout-api-token"].includes(ae(e.attributes.name)))return!0}}return!1}(B,f)||!D&&B.type===v.Text&&!B.isStyle&&!B.textContent.replace(/^\s+|\s+$/gm,"").length?Z:Q();var V=Object.assign(B,{id:F});if(n.add(e,V),F===Z)return null;g&&g(e);var W=!u;if(V.type===v.Element){W=W&&!V.needBlock,delete V.needBlock;var G=C.shadowRoot(e);G&&M(G)&&(V.isShadowHost=!0)}if((V.type===v.Document||V.type===v.Element)&&W){f.headWhitespace&&V.type===v.Element&&"head"===V.tagName&&(D=!1);var J={doc:r,mirror:n,blockClass:i,blockSelector:o,needsMask:q,maskTextClass:a,maskTextSelector:s,skipChild:u,inlineStylesheet:l,maskInputOptions:c,maskTextFn:d,maskInputFn:h,slimDOMOptions:f,dataURLOptions:p,inlineImages:m,recordCanvas:y,preserveWhiteSpace:D,onSerialize:g,onIframeLoad:b,iframeLoadTimeout:w,onStylesheetLoad:k,stylesheetLoadTimeout:x,keepIframeSrcFn:S,depth:O+1,maxDepth:P};if(V.type===v.Element&&"textarea"===V.tagName&&void 0!==V.attributes.value);else for(var X of Array.from(C.childNodes(e))){var Y=ce(X,J);Y&&V.childNodes.push(Y)}var re=null;if(I(e)&&(re=C.shadowRoot(e)))for(var de of Array.from(C.childNodes(re))){var he=ce(de,J);he&&(M(re)&&(he.isShadow=!0),V.childNodes.push(he))}}var ve=C.parentNode(e);return ve&&T(ve)&&M(ve)&&(V.isShadow=!0),V.type===v.Element&&"iframe"===V.tagName&&function(e,t,r){var n=e.contentWindow;if(n){var i,o=!1;try{i=n.document.readyState}catch(e){return}if("complete"===i){var a="about:blank";if(n.location.href!==a||e.src===a||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}else{var s=setTimeout((()=>{o||(t(),o=!0)}),r);e.addEventListener("load",(()=>{clearTimeout(s),o=!0,t()}))}}}(e,(()=>{var t=e.contentDocument;if(t&&b){var r=ce(t,{doc:t,mirror:n,blockClass:i,blockSelector:o,needsMask:q,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:l,maskInputOptions:c,maskTextFn:d,maskInputFn:h,slimDOMOptions:f,dataURLOptions:p,inlineImages:m,recordCanvas:y,preserveWhiteSpace:D,onSerialize:g,onIframeLoad:b,iframeLoadTimeout:w,onStylesheetLoad:k,stylesheetLoadTimeout:x,keepIframeSrcFn:S,depth:O+1,maxDepth:P});r&&b(e,r)}}),w),V.type===v.Element&&"link"===V.tagName&&"stylesheet"===V.attributes.rel&&function(t,u,v){if(!ie.has(t)){var C;try{C=t.sheet}catch(e){return}if(!C){var I=new AbortController,T=!1,M=()=>{if(!T){T=!0;try{(()=>{if(k){var t=ce(e,{doc:r,mirror:n,blockClass:i,blockSelector:o,needsMask:q,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:l,maskInputOptions:c,maskTextFn:d,maskInputFn:h,slimDOMOptions:f,dataURLOptions:p,inlineImages:m,recordCanvas:y,preserveWhiteSpace:D,onSerialize:g,onIframeLoad:b,iframeLoadTimeout:w,onStylesheetLoad:k,stylesheetLoadTimeout:x,keepIframeSrcFn:S,depth:O,maxDepth:P});t&&k(e,t)}})()}finally{ie.delete(t),I.abort()}}},_=setTimeout(M,v);I.signal.addEventListener("abort",(()=>clearTimeout(_)),{once:!0}),t.addEventListener("load",M,{signal:I.signal,once:!0}),ie.set(t,I)}}}(e,0,x),V}function de(e){return!0===e||"all"===e?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===e,headMetaDescKeywords:"all"===e,headTitleMutations:"all"===e}:!1===e?{}:e}class he{constructor(){a(this,"parentElement",null),a(this,"parentNode",null),a(this,"ownerDocument"),a(this,"firstChild",null),a(this,"lastChild",null),a(this,"previousSibling",null),a(this,"nextSibling",null),a(this,"ELEMENT_NODE",1),a(this,"TEXT_NODE",3),a(this,"nodeType"),a(this,"nodeName"),a(this,"RRNodeType")}get childNodes(){for(var e=[],t=this.firstChild;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(!(e instanceof he))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"}}function ve(e,t,r){void 0===r&&(r=document);var n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}function fe(e){try{e()}catch(e){if(!(e instanceof DOMException&&"SecurityError"===e.name))throw e}}var pe="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.",me={map:{},getId(){return console.error(pe),-1},getNode(){return console.error(pe),null},removeNodeFromMap(){console.error(pe)},has(){return console.error(pe),!1},reset(){console.error(pe)}};function ye(e,t,r){void 0===r&&(r={});var n=null,i=0;return function(){for(var o=arguments.length,a=new Array(o),s=0;o>s;s++)a[s]=arguments[s];var u=Date.now();i||!1!==r.leading||(i=u);var l=t-(u-i),c=this;0>=l||l>t?(n&&(clearTimeout(n),n=null),i=u,e.apply(c,a)):n||!1===r.trailing||(n=setTimeout((()=>{i=!1===r.leading?0:Date.now(),n=null,e.apply(c,a)}),l))}}function ge(e,t,r,n,i){void 0===i&&(i=window);var o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,n?r:{set(e){setTimeout((()=>{r.set.call(this,e)}),0),o&&o.set&&o.set.call(this,e)}}),()=>ge(e,t,o||{},!0)}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(me=new Proxy(me,{get(e,t,r){return"map"===t&&console.error(pe),Reflect.get(e,t,r)}}));var be=Date.now;function we(e){var t,r,n,i,o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:o.documentElement.scrollLeft||(null==o?void 0:o.body)&&(null==(t=C.parentElement(o.body))?void 0:t.scrollLeft)||(null==(r=null==o?void 0:o.body)?void 0:r.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==o?void 0:o.documentElement.scrollTop)||(null==o?void 0:o.body)&&(null==(n=C.parentElement(o.body))?void 0:n.scrollTop)||(null==(i=null==o?void 0:o.body)?void 0:i.scrollTop)||0}}function ke(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function xe(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Se(e){return e?e.nodeType===e.ELEMENT_NODE?e:C.parentElement(e):null}function Ce(e,t,r,n){if(!e)return!1;var i=Se(e);if(!i)return!1;try{if("string"==typeof t){if(i.classList.contains(t))return!0;if(n&&null!==i.closest("."+t))return!0}else if(re(i,t,n))return!0}catch(e){}if(r){if(i.matches(r))return!0;if(n&&null!==i.closest(r))return!0}return!1}function Ie(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||t.getId(e)===Z}function Te(e,t){if(T(e))return!1;var r=t.getId(e);if(!t.has(r))return!0;var n=C.parentNode(e);return(!n||n.nodeType!==e.DOCUMENT_NODE)&&(!n||Te(n,t))}function Me(e){return Boolean(e.changedTouches)}function _e(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function Le(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function Oe(e){return!!e&&(e instanceof he&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(C.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(be=()=>(new Date).getTime());class Ee{constructor(){a(this,"id",1),a(this,"styleIDMap",new WeakMap),a(this,"idStyleMap",new Map)}getId(e){var t;return null!==(t=this.styleIDMap.get(e))&&void 0!==t?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){return this.has(e)?this.getId(e):(r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r);var r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Re(e){var t,r=null;return"getRootNode"in e&&(null==(t=C.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&C.host(C.getRootNode(e))&&(r=C.host(C.getRootNode(e))),r}function Ne(e){var t=e.ownerDocument;return!!t&&(C.contains(t,e)||function(e){var t=e.ownerDocument;if(!t)return!1;var r=function(e){for(var t,r=e;t=Re(r);)r=t;return r}(e);return C.contains(t,r)}(e))}function Ae(e){return"__ln"in e}class Pe{constructor(){a(this,"length",0),a(this,"head",null),a(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,r=0;e>r;r++)t=(null==t?void 0:t.next)||null;return t}addNode(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Ae(e.previousSibling)){var r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&Ae(e.nextSibling)&&e.nextSibling.__ln.previous){var n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}var qe,De=(e,t)=>e+"@"+t;class Fe{constructor(){a(this,"frozen",!1),a(this,"locked",!1),a(this,"texts",[]),a(this,"attributes",[]),a(this,"attributeMap",new WeakMap),a(this,"removes",[]),a(this,"mapRemoves",[]),a(this,"movedMap",{}),a(this,"addedSet",new Set),a(this,"movedSet",new Set),a(this,"droppedSet",new Set),a(this,"removesSubTreeCache",new Set),a(this,"mutationCb"),a(this,"blockClass"),a(this,"blockSelector"),a(this,"maskTextClass"),a(this,"maskTextSelector"),a(this,"inlineStylesheet"),a(this,"maskInputOptions"),a(this,"maskTextFn"),a(this,"maskInputFn"),a(this,"keepIframeSrcFn"),a(this,"recordCanvas"),a(this,"inlineImages"),a(this,"slimDOMOptions"),a(this,"dataURLOptions"),a(this,"doc"),a(this,"mirror"),a(this,"iframeManager"),a(this,"stylesheetManager"),a(this,"shadowDomManager"),a(this,"canvasManager"),a(this,"processedNodeManager"),a(this,"unattachedDoc"),a(this,"processMutations",(e=>{e.forEach(this.processMutation),this.emit()})),a(this,"emit",(()=>{if(!this.frozen&&!this.locked){for(var e=[],t=new Set,r=new Pe,n=e=>{for(var t=e,r=Z;r===Z;)r=(t=t&&t.nextSibling)&&this.mirror.getId(t);return r},i=i=>{var o=C.parentNode(i);if(o&&Ne(i)&&"TEXTAREA"!==o.tagName){var a=T(o)?this.mirror.getId(Re(i)):this.mirror.getId(o),s=n(i);if(-1===a||-1===s)return r.addNode(i);var u=ce(i,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{_e(e,this.mirror)&&this.iframeManager.addIframe(e),Le(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),Oe(i)&&this.shadowDomManager.addShadowRoot(C.shadowRoot(i),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}});u&&(e.push({parentId:a,nextId:s,node:u}),t.add(u.id))}};this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(var o of this.movedSet)He(this.removesSubTreeCache,o)&&!this.movedSet.has(C.parentNode(o))||i(o);for(var a of this.addedSet)Ue(this.droppedSet,a)||He(this.removesSubTreeCache,a)?Ue(this.movedSet,a)?i(a):this.droppedSet.add(a):i(a);for(var s=null;r.length;){var u=null;if(s){var l=this.mirror.getId(C.parentNode(s.value)),c=n(s.value);-1!==l&&-1!==c&&(u=s)}if(!u)for(var d=r.tail;d;){var h=d;if(d=d.previous,h){var v=this.mirror.getId(C.parentNode(h.value));if(-1===n(h.value))continue;if(-1!==v){u=h;break}var f=C.parentNode(h.value);if(f&&f.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var p=C.host(f);if(-1!==this.mirror.getId(p)){u=h;break}}}}if(!u){for(;r.head;)r.removeNode(r.head.value);break}s=u.previous,r.removeNode(u.value),i(u.value)}var m={texts:this.texts.map((e=>{var t=e.node,r=C.parentNode(t);return r&&"TEXTAREA"===r.tagName&&this.genTextAreaValueMutation(r),{id:this.mirror.getId(t),value:e.value}})).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),attributes:this.attributes.map((e=>{var{attributes:t}=e;if("string"==typeof t.style){var r=JSON.stringify(e.styleDiff),n=JSON.stringify(e._unchangedStyles);t.style.length>r.length&&(r+n).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}})).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),removes:this.removes,adds:e};(m.texts.length||m.attributes.length||m.removes.length||m.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(m))}})),a(this,"bufferBelongsToIframe",(e=>this.doc===e.contentDocument)),a(this,"genTextAreaValueMutation",(e=>{var t=this.attributeMap.get(e);t||(this.attributes.push(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}}),this.attributeMap.set(e,t));var r=Array.from(C.childNodes(e),(e=>C.textContent(e)||"")).join("");t.attributes.value=E({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:A(e),value:r,maskInputFn:this.maskInputFn})})),a(this,"processMutation",(e=>{if(!Ie(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":var t=C.textContent(e.target);Ce(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:ne(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Se(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break;case"attributes":var r=e.target,n=e.attributeName,i=e.target.getAttribute(n);if("value"===n){var o=A(r);i=E({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:o,value:i,maskInputFn:this.maskInputFn})}if(Ce(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;var a=this.attributeMap.get(e.target);if("IFRAME"===r.tagName&&"src"===n&&!this.keepIframeSrcFn(i)){if(r.contentDocument)return;n="rr_src"}if(a||(this.attributes.push(a={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}}),this.attributeMap.set(e.target,a)),"type"===n&&"INPUT"===r.tagName&&"password"===(e.oldValue||"").toLowerCase()&&r.setAttribute("data-rr-is-password","true"),!te(r.tagName,n))if(a.attributes[n]=ee(this.doc,R(r.tagName),R(n),i,r,this.dataURLOptions),"style"===n){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}var s=this.unattachedDoc.createElement("span");for(var u of(e.oldValue&&s.setAttribute("style",e.oldValue),Array.from(r.style))){var l=r.style.getPropertyValue(u),c=r.style.getPropertyPriority(u);l!==s.style.getPropertyValue(u)||c!==s.style.getPropertyPriority(u)?a.styleDiff[u]=""===c?l:[l,c]:a._unchangedStyles[u]=[l,c]}for(var d of Array.from(s.style))""===r.style.getPropertyValue(d)&&(a.styleDiff[d]=!1)}else"open"===n&&"DIALOG"===r.tagName&&(a.attributes.rr_open_mode=r.matches("dialog:modal")?"modal":"non-modal");break;case"childList":if(Ce(e.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===e.target.tagName)return void this.genTextAreaValueMutation(e.target);e.addedNodes.forEach((t=>this.genAdds(t,e.target))),e.removedNodes.forEach((t=>{var r=this.mirror.getId(t),n=T(e.target)?this.mirror.getId(C.host(e.target)):this.mirror.getId(e.target);Ce(e.target,this.blockClass,this.blockSelector,!1)||Ie(t,this.mirror,this.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(je(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===r||Te(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[De(r,n)]?je(this.movedSet,t):(this.removes.push({parentId:n,id:r,isShadow:!(!T(e.target)||!M(e.target))||void 0}),function(e,t){for(var r=[e];r.length;){var n=r.pop();t.has(n)||(t.add(n),C.childNodes(n).forEach((e=>r.push(e))))}}(t,this.removesSubTreeCache))),this.mapRemoves.push(t))}))}})),a(this,"genAdds",((e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(Ie(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);var r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&-1!==r&&(this.movedMap[De(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Ce(e,this.blockClass,this.blockSelector,!1)||(C.childNodes(e).forEach((e=>this.genAdds(e))),Oe(e)&&C.childNodes(C.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()}destroy(){for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift())}}function je(e,t){e.delete(t),C.childNodes(t).forEach((t=>je(e,t)))}function He(e,t,r){return 0!==e.size&&function(e,t,r){var n=C.parentNode(t);return!!n&&e.has(n)}(e,t)}function Ue(e,t){return 0!==e.size&&Be(e,t)}function Be(e,t){var r=C.parentNode(t);return!!r&&(!!e.has(r)||Be(e,r))}var Ve=e=>qe?function(){try{return e(...arguments)}catch(e){if(qe&&!0===qe(e))return;throw e}}:e,We=[];function ze(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 Ze(e,t){var r=new Fe;We.push(r),r.init(e);var n=new(x())(Ve(r.processMutations.bind(r)));return n.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),{observer:n,buffer:r}}function $e(e){var{scrollCb:t,doc:r,mirror:n,blockClass:i,blockSelector:o,sampling:a}=e;return ve("scroll",Ve(ye(Ve((e=>{var a=ze(e);if(a&&!Ce(a,i,o,!0)){var s=n.getId(a);if(a===r&&r.defaultView){var u=we(r.defaultView);t({id:s,x:u.left,y:u.top})}else t({id:s,x:a.scrollLeft,y:a.scrollTop})}})),a.scroll||100)),r)}var Qe=["INPUT","TEXTAREA","SELECT"],Ge=new WeakMap;function Je(e){return function e(t,r){if(et("CSSGroupingRule")&&t.parentRule instanceof CSSGroupingRule||et("CSSMediaRule")&&t.parentRule instanceof CSSMediaRule||et("CSSSupportsRule")&&t.parentRule instanceof CSSSupportsRule||et("CSSConditionRule")&&t.parentRule instanceof CSSConditionRule){var n=Array.from(t.parentRule.cssRules).indexOf(t);return r.unshift(n),e(t.parentRule,r)}if(t.parentStyleSheet){var i=Array.from(t.parentStyleSheet.cssRules).indexOf(t);r.unshift(i)}return r}(e,[])}function Xe(e,t,r){var n,i;return e?(e.ownerNode?n=t.getId(e.ownerNode):i=r.getId(e),{styleId:i,id:n}):{}}function Ye(e,t){var r,n,i,o,{mirror:a,stylesheetManager:s}=e;o=a.getId("#document"===t.nodeName?t:C.host(t));var u="#document"===t.nodeName?null==(r=t.defaultView)?void 0:r.Document:null==(i=null==(n=t.ownerDocument)?void 0:n.defaultView)?void 0:i.ShadowRoot,l=(null==u?void 0:u.prototype)?Object.getOwnPropertyDescriptor(null==u?void 0:u.prototype,"adoptedStyleSheets"):void 0;return null!==o&&-1!==o&&u&&l?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var e;return null==(e=l.get)?void 0:e.call(this)},set(e){var t,r=null==(t=l.set)?void 0:t.call(this,e);if(null!==o&&-1!==o)try{s.adoptStyleSheets(e,o)}catch(e){}return r}}),Ve((()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))):()=>{}}function Ke(e,t){void 0===t&&(t={});var n,i,o=e.doc.defaultView;if(!o)return()=>{};if(function(e,t){var{mutationCb:r,mousemoveCb:n,mouseInteractionCb:i,scrollCb:o,viewportResizeCb:a,inputCb:s,mediaInteractionCb:u,styleSheetRuleCb:l,styleDeclarationCb:c,canvasMutationCb:d,fontCb:h,selectionCb:v,customElementCb:f}=e;e.mutationCb=function(){t.mutation&&t.mutation(...arguments),r(...arguments)},e.mousemoveCb=function(){t.mousemove&&t.mousemove(...arguments),n(...arguments)},e.mouseInteractionCb=function(){t.mouseInteraction&&t.mouseInteraction(...arguments),i(...arguments)},e.scrollCb=function(){t.scroll&&t.scroll(...arguments),o(...arguments)},e.viewportResizeCb=function(){t.viewportResize&&t.viewportResize(...arguments),a(...arguments)},e.inputCb=function(){t.input&&t.input(...arguments),s(...arguments)},e.mediaInteractionCb=function(){t.mediaInteaction&&t.mediaInteaction(...arguments),u(...arguments)},e.styleSheetRuleCb=function(){t.styleSheetRule&&t.styleSheetRule(...arguments),l(...arguments)},e.styleDeclarationCb=function(){t.styleDeclaration&&t.styleDeclaration(...arguments),c(...arguments)},e.canvasMutationCb=function(){t.canvasMutation&&t.canvasMutation(...arguments),d(...arguments)},e.fontCb=function(){t.font&&t.font(...arguments),h(...arguments)},e.selectionCb=function(){t.selection&&t.selection(...arguments),v(...arguments)},e.customElementCb=function(){t.customElement&&t.customElement(...arguments),f(...arguments)}}(e,t),e.recordDOM){var a=Ze(e,e.doc);n=a.observer,i=a.buffer}var s=function(e){var{mousemoveCb:t,sampling:r,doc:n,mirror:i}=e;if(!1===r.mousemove)return()=>{};var o,a="number"==typeof r.mousemove?r.mousemove:50,s="number"==typeof r.mousemoveCallback?r.mousemoveCallback:500,l=[],c=ye(Ve((e=>{var r=Date.now()-o;t(l.map((e=>(e.timeOffset-=r,e))),e),l=[],o=null})),s),d=Ve(ye(Ve((e=>{var t=ze(e),{clientX:r,clientY:n}=Me(e)?e.changedTouches[0]:e;o||(o=be()),l.push({x:r,y:n,id:i.getId(t),timeOffset:be()-o}),c("undefined"!=typeof DragEvent&&e instanceof DragEvent?u.Drag:e instanceof MouseEvent?u.MouseMove:u.TouchMove)})),a,{trailing:!1})),h=[ve("mousemove",d,n),ve("touchmove",d,n),ve("drag",d,n)];return Ve((()=>{h.forEach((e=>e()))}))}(e),d=function(e){var{mouseInteractionCb:t,doc:n,mirror:i,blockClass:o,blockSelector:a,sampling:s}=e;if(!1===s.mouseInteraction)return()=>{};var u=!0===s.mouseInteraction||void 0===s.mouseInteraction?{}:s.mouseInteraction,d=[],h=null;return Object.keys(l).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==u[e])).forEach((e=>{var s=R(e),u=(e=>n=>{var s=ze(n);if(!Ce(s,o,a,!0)){var u=null,d=e;if("pointerType"in n){switch(n.pointerType){case"mouse":u=c.Mouse;break;case"touch":u=c.Touch;break;case"pen":u=c.Pen}u===c.Touch&&(l[e]===l.MouseDown?d="TouchStart":l[e]===l.MouseUp&&(d="TouchEnd"))}else Me(n)&&(u=c.Touch);null!==u?(h=u,(d.startsWith("Touch")&&u===c.Touch||d.startsWith("Mouse")&&u===c.Mouse)&&(u=null)):l[e]===l.Click&&(u=h,h=null);var v=Me(n)?n.changedTouches[0]:n;if(v){var f=i.getId(s),{clientX:p,clientY:m}=v;Ve(t)(r({type:l[d],id:f,x:p,y:m},null!==u&&{pointerType:u}))}}})(e);if(window.PointerEvent)switch(l[e]){case l.MouseDown:case l.MouseUp:s=s.replace("mouse","pointer");break;case l.TouchStart:case l.TouchEnd:return}d.push(ve(s,u,n))})),Ve((()=>{d.forEach((e=>e()))}))}(e),v=$e(e),f=function(e,t){var{viewportResizeCb:r}=e,{win:n}=t,i=-1,o=-1;return ve("resize",Ve(ye(Ve((()=>{var e=ke(),t=xe();i===e&&o===t||(r({width:Number(t),height:Number(e)}),i=e,o=t)})),200)),n)}(e,{win:o}),p=function(e){var{inputCb:t,doc:n,mirror:i,blockClass:o,blockSelector:a,ignoreClass:s,ignoreSelector:u,maskInputOptions:l,maskInputFn:c,sampling:d,userTriggeredOnInput:h}=e;function v(e){var t=ze(e),r=e.isTrusted,i=t&&t.tagName;if(t&&"OPTION"===i&&(t=C.parentElement(t)),t&&i&&Qe.indexOf(i)>=0&&!Ce(t,o,a,!0)&&!(t.classList.contains(s)||u&&t.matches(u))){var d=t.value,v=!1,p=A(t)||"";"radio"===p||"checkbox"===p?v=t.checked:(l[i.toLowerCase()]||l[p])&&(d=E({element:t,maskInputOptions:l,tagName:i,type:p,value:d,maskInputFn:c})),f(t,h?{text:d,isChecked:v,userTriggered:r}:{text:d,isChecked:v});var m=t.name;"radio"===p&&m&&v&&n.querySelectorAll('input[type="radio"][name="'+m+'"]').forEach((e=>{if(e!==t){var r=e.value;f(e,h?{text:r,isChecked:!v,userTriggered:!1}:{text:r,isChecked:!v})}}))}}function f(e,n){var o=Ge.get(e);if(!o||o.text!==n.text||o.isChecked!==n.isChecked){Ge.set(e,n);var a=i.getId(e);Ve(t)(r({},n,{id:a}))}}var p=("last"===d.input?["change"]:["input","change"]).map((e=>ve(e,Ve(v),n))),m=n.defaultView;if(!m)return()=>{p.forEach((e=>e()))};var y=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value");return y&&y.set&&p.push(...[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]].map((e=>ge(e[0],e[1],{set(){Ve(v)({target:this,isTrusted:!1})}},!1,m)))),Ve((()=>{p.forEach((e=>e()))}))}(e),m=function(e){var{mediaInteractionCb:t,blockClass:r,blockSelector:n,mirror:i,sampling:o,doc:a}=e,s=Ve((e=>ye(Ve((o=>{var a=ze(o);if(a&&!Ce(a,r,n,!0)){var{currentTime:s,volume:u,muted:l,playbackRate:c,loop:d}=a;t({type:e,id:i.getId(a),currentTime:s,volume:u,muted:l,playbackRate:c,loop:d})}})),o.media||500))),u=[ve("play",s(h.Play),a),ve("pause",s(h.Pause),a),ve("seeked",s(h.Seeked),a),ve("volumechange",s(h.VolumeChange),a),ve("ratechange",s(h.RateChange),a)];return Ve((()=>{u.forEach((e=>e()))}))}(e),y=()=>{},g=()=>{},b=()=>{},w=()=>{};e.recordDOM&&(y=function(e,t){var{styleSheetRuleCb:r,mirror:n,stylesheetManager:i}=e,{win:o}=t;if(!o.CSSStyleSheet||!o.CSSStyleSheet.prototype)return()=>{};var a=o.CSSStyleSheet.prototype.insertRule;o.CSSStyleSheet.prototype.insertRule=new Proxy(a,{apply:Ve(((e,t,o)=>{var[a,s]=o,{id:u,styleId:l}=Xe(t,n,i.styleMirror);return(u&&-1!==u||l&&-1!==l)&&r({id:u,styleId:l,adds:[{rule:a,index:s}]}),e.apply(t,o)}))}),o.CSSStyleSheet.prototype.addRule=function(e,t,r){return void 0===r&&(r=this.cssRules.length),o.CSSStyleSheet.prototype.insertRule.apply(this,[e+" { "+t+" }",r])};var s,u,l=o.CSSStyleSheet.prototype.deleteRule;o.CSSStyleSheet.prototype.deleteRule=new Proxy(l,{apply:Ve(((e,t,o)=>{var[a]=o,{id:s,styleId:u}=Xe(t,n,i.styleMirror);return(s&&-1!==s||u&&-1!==u)&&r({id:s,styleId:u,removes:[{index:a}]}),e.apply(t,o)}))}),o.CSSStyleSheet.prototype.removeRule=function(e){return o.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},o.CSSStyleSheet.prototype.replace&&(s=o.CSSStyleSheet.prototype.replace,o.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:Ve(((e,t,o)=>{var[a]=o,{id:s,styleId:u}=Xe(t,n,i.styleMirror);return(s&&-1!==s||u&&-1!==u)&&r({id:s,styleId:u,replace:a}),e.apply(t,o)}))})),o.CSSStyleSheet.prototype.replaceSync&&(u=o.CSSStyleSheet.prototype.replaceSync,o.CSSStyleSheet.prototype.replaceSync=new Proxy(u,{apply:Ve(((e,t,o)=>{var[a]=o,{id:s,styleId:u}=Xe(t,n,i.styleMirror);return(s&&-1!==s||u&&-1!==u)&&r({id:s,styleId:u,replaceSync:a}),e.apply(t,o)}))}));var c={};tt("CSSGroupingRule")?c.CSSGroupingRule=o.CSSGroupingRule:(tt("CSSMediaRule")&&(c.CSSMediaRule=o.CSSMediaRule),tt("CSSConditionRule")&&(c.CSSConditionRule=o.CSSConditionRule),tt("CSSSupportsRule")&&(c.CSSSupportsRule=o.CSSSupportsRule));var d={};return Object.entries(c).forEach((e=>{var[t,o]=e;d[t]={insertRule:o.prototype.insertRule,deleteRule:o.prototype.deleteRule},o.prototype.insertRule=new Proxy(d[t].insertRule,{apply:Ve(((e,t,o)=>{var[a,s]=o,{id:u,styleId:l}=Xe(t.parentStyleSheet,n,i.styleMirror);return(u&&-1!==u||l&&-1!==l)&&r({id:u,styleId:l,adds:[{rule:a,index:[...Je(t),s||0]}]}),e.apply(t,o)}))}),o.prototype.deleteRule=new Proxy(d[t].deleteRule,{apply:Ve(((e,t,o)=>{var[a]=o,{id:s,styleId:u}=Xe(t.parentStyleSheet,n,i.styleMirror);return(s&&-1!==s||u&&-1!==u)&&r({id:s,styleId:u,removes:[{index:[...Je(t),a]}]}),e.apply(t,o)}))})})),Ve((()=>{o.CSSStyleSheet.prototype.insertRule=a,o.CSSStyleSheet.prototype.deleteRule=l,s&&(o.CSSStyleSheet.prototype.replace=s),u&&(o.CSSStyleSheet.prototype.replaceSync=u),Object.entries(c).forEach((e=>{var[t,r]=e;r.prototype.insertRule=d[t].insertRule,r.prototype.deleteRule=d[t].deleteRule}))}))}(e,{win:o}),g=Ye(e,e.doc),b=function(e,t){var{styleDeclarationCb:r,mirror:n,ignoreCSSAttributes:i,stylesheetManager:o}=e,{win:a}=t,s=a.CSSStyleDeclaration.prototype.setProperty;a.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:Ve(((e,t,a)=>{var u,[l,c,d]=a;if(i.has(l))return s.apply(t,[l,c,d]);var{id:h,styleId:v}=Xe(null==(u=t.parentRule)?void 0:u.parentStyleSheet,n,o.styleMirror);return(h&&-1!==h||v&&-1!==v)&&r({id:h,styleId:v,set:{property:l,value:c,priority:d},index:Je(t.parentRule)}),e.apply(t,a)}))});var u=a.CSSStyleDeclaration.prototype.removeProperty;return a.CSSStyleDeclaration.prototype.removeProperty=new Proxy(u,{apply:Ve(((e,t,a)=>{var s,[l]=a;if(i.has(l))return u.apply(t,[l]);var{id:c,styleId:d}=Xe(null==(s=t.parentRule)?void 0:s.parentStyleSheet,n,o.styleMirror);return(c&&-1!==c||d&&-1!==d)&&r({id:c,styleId:d,remove:{property:l},index:Je(t.parentRule)}),e.apply(t,a)}))}),Ve((()=>{a.CSSStyleDeclaration.prototype.setProperty=s,a.CSSStyleDeclaration.prototype.removeProperty=u}))}(e,{win:o}),e.collectFonts&&(w=function(e){var{fontCb:t,doc:r}=e,n=r.defaultView;if(!n)return()=>{};var i=[],o=new WeakMap,a=n.FontFace;n.FontFace=function(e,t,r){var n=new a(e,t,r);return o.set(n,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),n};var s=S(r.fonts,"add",(function(e){return function(r){return setTimeout(Ve((()=>{var e=o.get(r);e&&(t(e),o.delete(r))})),0),e.apply(this,[r])}}));return i.push((()=>{n.FontFace=a})),i.push(s),Ve((()=>{i.forEach((e=>e()))}))}(e)));var k=function(e){var{doc:t,mirror:r,blockClass:n,blockSelector:i,selectionCb:o}=e,a=!0,s=Ve((()=>{var e=t.getSelection();if(!(!e||a&&(null==e?void 0:e.isCollapsed))){a=e.isCollapsed||!1;for(var s=[],u=e.rangeCount||0,l=0;u>l;l++){var c=e.getRangeAt(l),{startContainer:d,startOffset:h,endContainer:v,endOffset:f}=c;Ce(d,n,i,!0)||Ce(v,n,i,!0)||s.push({start:r.getId(d),startOffset:h,end:r.getId(v),endOffset:f})}o({ranges:s})}}));return s(),ve("selectionchange",s)}(e),x=function(e){var{doc:t,customElementCb:r}=e,n=t.defaultView;return n&&n.customElements?S(n.customElements,"define",(function(e){return function(t,n,i){try{r({define:{name:t}})}catch(e){console.warn("Custom element callback failed for "+t)}return e.apply(this,[t,n,i])}})):()=>{}}(e),I=[];for(var T of e.plugins)I.push(T.observer(T.callback,o,T.options));return Ve((()=>{if(i){i.destroy(),i.reset();var e=We.indexOf(i);-1!==e&&We.splice(e,1)}null==n||n.disconnect(),s(),d(),v(),f(),p(),m(),y(),g(),b(),w(),k(),x(),I.forEach((e=>e()))}))}function et(e){return void 0!==window[e]}function tt(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class rt{constructor(e){a(this,"iframeIdToRemoteIdMap",new WeakMap),a(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,n){var i=r||this.getIdToRemoteIdMap(e),o=n||this.getRemoteIdToIdMap(e),a=i.get(t);return a||(a=this.generateIdFn(),i.set(t,a),o.set(a,t)),a}getIds(e,t){var r=this.getIdToRemoteIdMap(e),n=this.getRemoteIdToIdMap(e);return t.map((t=>this.getId(e,t,r,n)))}getRemoteId(e,t,r){var n=r||this.getRemoteIdToIdMap(e);return"number"!=typeof t?t:n.get(t)||-1}getRemoteIds(e,t){var r=this.getRemoteIdToIdMap(e);return t.map((t=>this.getRemoteId(e,t,r)))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){var t=this.iframeIdToRemoteIdMap.get(e);return t||this.iframeIdToRemoteIdMap.set(e,t=new Map),t}getRemoteIdToIdMap(e){var t=this.iframeRemoteIdToIdMap.get(e);return t||this.iframeRemoteIdToIdMap.set(e,t=new Map),t}}class nt{constructor(e){a(this,"iframes",new WeakMap),a(this,"crossOriginIframeMap",new WeakMap),a(this,"crossOriginIframeMirror",new rt(Q)),a(this,"crossOriginIframeStyleMirror"),a(this,"crossOriginIframeRootIdMap",new WeakMap),a(this,"mirror"),a(this,"mutationCb"),a(this,"wrappedEmit"),a(this,"loadListener"),a(this,"pageHideListener"),a(this,"stylesheetManager"),a(this,"recordCrossOriginIframes"),a(this,"messageHandler"),a(this,"nestedIframeListeners",new Map),a(this,"attachedIframes",new Map),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new rt(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.messageHandler=this.handleMessage.bind(this),this.recordCrossOriginIframes&&window.addEventListener("message",this.messageHandler)}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}addPageHideListener(e){this.pageHideListener=e}removeLoadListener(){this.loadListener=void 0}trackIframeContent(e,t){var r=this.mirror.getId(e);return this.attachedIframes.set(r,{element:e,content:t}),r}attachIframe(e,t){var r,n=this.trackIframeContent(e,t);this.mutationCb({adds:[{parentId:n,nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0});var i=e.contentWindow;if(this.recordCrossOriginIframes&&i&&!this.nestedIframeListeners.has(i)){var o=this.handleMessage.bind(this);fe((()=>{i.addEventListener("message",o),this.nestedIframeListeners.set(i,o)}))}fe((()=>{var t;return null==(t=e.contentWindow)?void 0:t.addEventListener("pagehide",(()=>{var t;null==(t=this.pageHideListener)||t.call(this,e),e.contentDocument&&this.mirror.removeNodeFromMap(e.contentDocument),e.contentWindow&&this.crossOriginIframeMap.delete(e.contentWindow)}))})),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 r=this.crossOriginIframeMap.get(e.source);if(r){var n=this.transformCrossOriginEvent(r,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}}}transformCrossOriginEvent(e,t){var r;switch(t.type){case s.FullSnapshot:this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);var n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),this.trackIframeContent(e,t.data.node),{timestamp:t.timestamp,type:s.IncrementalSnapshot,data:{source:u.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case s.Meta:case s.Load:case s.DomContentLoaded:return!1;case s.Plugin:return t;case s.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case s.IncrementalSnapshot:switch(t.data.source){case u.Mutation:return t.data.adds.forEach((t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);var r=this.crossOriginIframeRootIdMap.get(e);r&&this.patchRootIdOnNode(t.node,r)})),t.data.removes.forEach((t=>{this.replaceIds(t,e,["parentId","id"])})),t.data.attributes.forEach((t=>{this.replaceIds(t,e,["id"])})),t.data.texts.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case u.Drag:case u.TouchMove:case u.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case u.ViewportResize:return!1;case u.MediaInteraction:case u.MouseInteraction:case u.Scroll:case u.CanvasMutation:case u.Input:return this.replaceIds(t.data,e,["id"]),t;case u.StyleSheetRule:case u.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case u.Font:return t;case u.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case u.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(r=t.data.styles)||r.forEach((t=>{this.replaceStyleIds(t,e,["styleId"])})),t}}return!1}replace(e,t,r,n){for(var i of n)(Array.isArray(t[i])||"number"==typeof t[i])&&(t[i]=Array.isArray(t[i])?e.getIds(r,t[i]):e.getId(r,t[i]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach((e=>{this.replaceIdOnNode(e,t)}))}patchRootIdOnNode(e,t){e.type===v.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,t)}))}removeIframeById(e){var t=this.attachedIframes.get(e),r=(null==t?void 0:t.element)||this.mirror.getNode(e);if(r){var n=r.contentWindow;if(n&&this.nestedIframeListeners.has(n)){var i=this.nestedIframeListeners.get(n);fe((()=>n.removeEventListener("message",i))),this.nestedIframeListeners.delete(n)}n&&this.crossOriginIframeMap.delete(n),this.iframes.delete(r)}t&&this.attachedIframes.delete(e)}reattachIframes(){this.attachedIframes.forEach(((e,t)=>{var{content:r}=e;this.mirror.has(t)?this.mutationCb({adds:[{parentId:t,nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}):this.attachedIframes.delete(t)}))}destroy(){this.recordCrossOriginIframes&&window.removeEventListener("message",this.messageHandler),this.nestedIframeListeners.forEach(((e,t)=>{fe((()=>t.removeEventListener("message",e)))})),this.nestedIframeListeners.clear(),this.crossOriginIframeMirror.reset(),this.crossOriginIframeStyleMirror.reset(),this.attachedIframes.clear(),this.crossOriginIframeMap=new WeakMap,this.iframes=new WeakMap,this.crossOriginIframeRootIdMap=new WeakMap}}class it{constructor(e){a(this,"shadowDoms",new WeakSet),a(this,"mutationCb"),a(this,"scrollCb"),a(this,"bypassOptions"),a(this,"mirror"),a(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(M(e)&&!this.shadowDoms.has(e)){this.shadowDoms.add(e);var{observer:n,buffer:i}=Ze(r({},this.bypassOptions,{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push((()=>{n.disconnect(),i.destroy();var e=We.indexOf(i);-1!==e&&We.splice(e,1)})),this.restoreHandlers.push($e(r({},this.bypassOptions,{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout((()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(C.host(e))),this.restoreHandlers.push(Ye({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))}),0)}}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){var r=this;this.restoreHandlers.push(S(e.prototype,"attachShadow",(function(e){return function(n){var i=e.call(this,n),o=C.shadowRoot(this);return o&&Ne(this)&&r.addShadowRoot(o,t),i}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch(e){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var ot="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",at="undefined"==typeof Uint8Array?[]:new Uint8Array(256),st=0;64>st;st++)at[ot.charCodeAt(st)]=st;var ut=new Map,lt=(e,t,r)=>{if(e&&(ht(e,t)||"object"==typeof e)){var n=function(e,t){var r=ut.get(e);return r||ut.set(e,r=new Map),r.has(t)||r.set(t,[]),r.get(t)}(r,e.constructor.name),i=n.indexOf(e);return-1===i&&(i=n.length,n.push(e)),i}};function ct(e,t,r,n){if(e instanceof Array)return e.map((e=>ct(e,t,r,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){var i=e.constructor.name,o=function(e){var t,r=new Uint8Array(e),n=r.length,i="";for(t=0;n>t;t+=3)i+=ot[r[t]>>2],i+=ot[(3&r[t])<<4|r[t+1]>>4],i+=ot[(15&r[t+1])<<2|r[t+2]>>6],i+=ot[63&r[t+2]];return n%3==2?i=i.substring(0,i.length-1)+"=":n%3==1&&(i=i.substring(0,i.length-2)+"=="),i}(e);return{rr_type:i,base64:o}}if(e instanceof DataView)return{rr_type:e.constructor.name,args:[ct(e.buffer,t,r,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){var a=e.constructor.name,{src:s}=e;return{rr_type:a,src:s}}return e instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:e.toDataURL(n.type,n.quality)}:e instanceof ImageData?{rr_type:e.constructor.name,args:[ct(e.data,t,r,n),e.width,e.height]}:ht(e,t)||"object"==typeof e?{rr_type:e.constructor.name,index:lt(e,t,r)}:e}var dt=(e,t,r,n)=>e.map((e=>ct(e,t,r,n))),ht=(e,t)=>{var r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((e=>"function"==typeof t[e]));return Boolean(r.find((r=>e instanceof t[r])))},vt=["webgl","webgl2"];function ft(e){return"nodeType"in e}function pt(e,t,n,i){var o=[];try{if(i){var a=function(e,t,n){var i=e.GPUCanvasContext;if((null==i?void 0:i.prototype)&&"function"==typeof i.prototype.configure)return S(i.prototype,"configure",(function(i){return function(o){var a=function(e){var{canvas:t}=e;return t&&"object"==typeof t?t:null}(this);if(!a||ft(a)&&Ce(a,t,n,!0))return i.call(this,o);ft(a)&&!("__context"in a)&&(a.__context="webgpu");var s=function(e){var t=e.GPUTextureUsage;return t?t.COPY_SRC|t.RENDER_ATTACHMENT:null}(e);return i.call(this,null!==s&&o?r({},o,{usage:"number"==typeof o.usage?o.usage|s:s}):o)}}))}(e,t,n);a&&o.push(a)}var s=S(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(r){for(var o=function(e){return"experimental-webgl"===e?"webgl":e}(r),a=arguments.length,s=new Array(a>1?a-1:0),u=1;a>u;u++)s[u-1]=arguments[u];if(!Ce(this,t,n,!0)&&("__context"in this||(this.__context=o),i&&vt.includes(o)))if(s[0]&&"object"==typeof s[0]){var l=s[0];l.preserveDrawingBuffer||(l.preserveDrawingBuffer=!0)}else s.splice(0,1,{preserveDrawingBuffer:!0});return e.apply(this,[r,...s])}}));o.push(s)}catch(e){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{o.forEach((e=>e()))}}function mt(e,t,r,n,i,o,a){var s=[],u=Object.getOwnPropertyNames(e),l=function(u){if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(u))return 0;try{if("function"!=typeof e[u])return 0;var l=S(e,u,(function(e){return function(){for(var s=arguments.length,l=new Array(s),c=0;s>c;c++)l[c]=arguments[c];var d=e.apply(this,l);if(lt(d,o,this),"tagName"in this.canvas&&!Ce(this.canvas,n,i,!0)){var h=dt(l,o,this,a);r(this.canvas,{type:t,property:u,args:h})}return d}}));s.push(l)}catch(n){var c=ge(e,u,{set(e){r(this.canvas,{type:t,property:u,args:[e],setter:!0})}});s.push(c)}};for(var c of u)l(c);return s}var yt,gt,bt,wt='(function() {\n "use strict";\n var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";\n var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);\n for (var i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n }\n var encode = function(arraybuffer) {\n var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";\n for (i2 = 0; i2 < len; i2 += 3) {\n base64 += chars[bytes[i2] >> 2];\n base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];\n base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];\n base64 += chars[bytes[i2 + 2] & 63];\n }\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + "=";\n } else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + "==";\n }\n return base64;\n };\n const lastFingerprintMap = /* @__PURE__ */ new Map();\n const transparentBlobMap = /* @__PURE__ */ new Map();\n function fnv1aHash(buffer) {\n const view = new Uint8Array(buffer);\n let hash = 2166136261;\n for (let i2 = 0; i2 < view.length; i2++) {\n hash ^= view[i2];\n hash = hash * 16777619 | 0;\n }\n return (hash >>> 0).toString(16);\n }\n async function getTransparentBlobFor(width, height, dataURLOptions) {\n const id = `${width}-${height}`;\n if ("OffscreenCanvas" in globalThis) {\n if (transparentBlobMap.has(id)) return transparentBlobMap.get(id);\n const offscreen = new OffscreenCanvas(width, height);\n offscreen.getContext("2d");\n const blob = await offscreen.convertToBlob(dataURLOptions);\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer);\n transparentBlobMap.set(id, base64);\n return base64;\n } else {\n return "";\n }\n }\n const worker = self;\n let reusableCanvas = null;\n let reusableCtx = null;\n worker.onmessage = async function(e) {\n if ("OffscreenCanvas" in globalThis) {\n const { id, bitmap, width, height, dataURLOptions } = e.data;\n try {\n const transparentBase64 = getTransparentBlobFor(\n width,\n height,\n dataURLOptions\n );\n if (!reusableCanvas || reusableCanvas.width !== width || reusableCanvas.height !== height) {\n reusableCanvas = new OffscreenCanvas(width, height);\n reusableCtx = reusableCanvas.getContext("2d");\n }\n reusableCtx.clearRect(0, 0, width, height);\n reusableCtx.drawImage(bitmap, 0, 0);\n bitmap.close();\n const blob = await reusableCanvas.convertToBlob(dataURLOptions);\n const type = blob.type;\n const arrayBuffer = await blob.arrayBuffer();\n const fingerprint = fnv1aHash(arrayBuffer);\n if (!lastFingerprintMap.has(id)) {\n const base642 = encode(arrayBuffer);\n if (await transparentBase64 === base642) {\n lastFingerprintMap.set(id, fingerprint);\n return worker.postMessage({ id });\n }\n lastFingerprintMap.set(id, fingerprint);\n worker.postMessage({ id, type, base64: base642, width, height });\n return;\n }\n if (lastFingerprintMap.get(id) === fingerprint)\n return worker.postMessage({ id });\n const base64 = encode(arrayBuffer);\n worker.postMessage({ id, type, base64, width, height });\n lastFingerprintMap.set(id, fingerprint);\n } catch {\n worker.postMessage({ id });\n }\n } else {\n e.data.bitmap.close();\n return worker.postMessage({ id: e.data.id });\n }\n };\n})();\n//# sourceMappingURL=image-bitmap-data-url-worker-Ca9A-vl6.js.map\n',kt="undefined"!=typeof self&&self.Blob&&new Blob([wt],{type:"text/javascript;charset=utf-8"});function xt(e){var t;try{if(!(t=kt&&(self.URL||self.webkitURL).createObjectURL(kt)))throw"";var r=new Worker(t,{name:null==e?void 0:e.name});return r.addEventListener("error",(()=>{(self.URL||self.webkitURL).revokeObjectURL(t)})),r}catch(t){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(wt),{name:null==e?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}class St{constructor(e){a(this,"pendingCanvasMutations",new Map),a(this,"rafStamps",{latestId:0,invokeId:null}),a(this,"mirror"),a(this,"mutationCb"),a(this,"resetObservers"),a(this,"frozen",!1),a(this,"locked",!1),a(this,"rafIdTimestamp",null),a(this,"rafIdFlush",null),a(this,"processMutation",((e,t)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)}));var{sampling:t="all",win:r,blockClass:n,blockSelector:i,recordCanvas:o,dataURLOptions:s}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&"all"===t&&this.initCanvasMutationObserver(r,n,i,s),o&&"number"==typeof t&&this.initCanvasFPSObserver(t,r,n,i,{dataURLOptions:s})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers(),null!==this.rafIdTimestamp&&(cancelAnimationFrame(this.rafIdTimestamp),this.rafIdTimestamp=null),null!==this.rafIdFlush&&(cancelAnimationFrame(this.rafIdFlush),this.rafIdFlush=null)}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,r,n,i,o){var a=this;if("OffscreenCanvas"in r){var s=pt(r,n,i,!0),u=new Map,l=new xt;l.onmessage=e=>{var{id:t}=e.data;if(u.set(t,!1),"base64"in e.data){var{base64:r,type:n,width:i,height:o}=e.data;this.mutationCb({id:t,type:d["2D"],commands:[{property:"clearRect",args:[0,0,i,o]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:n}]},0,0]}],displayWidth:i,displayHeight:o})}};var c,h=1e3/e,v=0,f=e=>{var s,d;v&&h>e-v||(v=e,(s=[],d=e=>{try{e.querySelectorAll("canvas").forEach((e=>{Ce(e,n,i,!0)||s.push(e)})),e.querySelectorAll("*").forEach((e=>{e.shadowRoot&&d(e.shadowRoot)}))}catch(e){}},d(r.document),s).forEach(function(){var e=t((function*(e){var t,r,n=a.mirror.getId(e);if(!u.get(n)&&0!==e.width&&0!==e.height){u.set(n,!0);try{if(["webgl","webgl2"].includes(e.__context)){var i=e.getContext(e.__context);if(null==(t=null==i?void 0:i.isContextLost)?void 0:t.call(i))return void u.set(n,!1);!1===(null==(r=null==i?void 0:i.getContextAttributes())?void 0:r.preserveDrawingBuffer)&&i.clear(i.COLOR_BUFFER_BIT)}var s=e.clientWidth||e.width,c=e.clientHeight||e.height,d=yield createImageBitmap(e,{resizeWidth:s,resizeHeight:c});l.postMessage({id:n,bitmap:d,width:s,height:c,dataURLOptions:o.dataURLOptions},[d])}catch(e){u.set(n,!1)}}}));return function(t){return e.apply(this,arguments)}}())),c=requestAnimationFrame(f)};c=requestAnimationFrame(f),this.resetObservers=()=>{s(),cancelAnimationFrame(c)}}}initCanvasMutationObserver(e,t,r,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var i=pt(e,t,r,!1),o=function(e,t,r,n,i){var o=[],a=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype),s=function(a){try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[a])return 1;var s=S(t.CanvasRenderingContext2D.prototype,a,(function(o){return function(){for(var s=arguments.length,u=new Array(s),l=0;s>l;l++)u[l]=arguments[l];return Ce(this.canvas,r,n,!0)||setTimeout((()=>{var r=dt(u,t,this,i);e(this.canvas,{type:d["2D"],property:a,args:r})}),0),o.apply(this,u)}}));o.push(s)}catch(r){var u=ge(t.CanvasRenderingContext2D.prototype,a,{set(t){e(this.canvas,{type:d["2D"],property:a,args:[t],setter:!0})}});o.push(u)}};for(var u of a)s(u);return()=>{o.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,r,n),a=function(e,t,r,n,i){var o=[];return void 0!==t.WebGLRenderingContext&&o.push(...mt(t.WebGLRenderingContext.prototype,d.WebGL,e,r,n,t,i)),void 0!==t.WebGL2RenderingContext&&o.push(...mt(t.WebGL2RenderingContext.prototype,d.WebGL2,e,r,n,t,i)),()=>{o.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,r,n);this.resetObservers=()=>{i(),o(),a()}}startPendingCanvasMutationFlusher(){this.rafIdFlush=requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}startRAFTimestamping(){var e=t=>{this.rafStamps.latestId=t,this.rafIdTimestamp=requestAnimationFrame(e)};this.rafIdTimestamp=requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach(((e,t)=>{var r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)})),this.rafIdFlush=requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(e,t){if(!this.frozen&&!this.locked){var r=this.pendingCanvasMutations.get(e);if(r&&-1!==t){var n=r.map((e=>{var t=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,i);return t})),{type:o}=r[0];this.mutationCb({id:t,type:o,commands:n}),this.pendingCanvasMutations.delete(e)}}}}class Ct{constructor(e){a(this,"trackedLinkElements",new WeakSet),a(this,"mutationCb"),a(this,"adoptedStyleSheetCb"),a(this,"styleMirror",new Ee),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){var r=this;if(0!==e.length){var n={id:t,styleIds:[]},i=[],o=function(e){var t;r.styleMirror.has(e)?t=r.styleMirror.getId(e):(t=r.styleMirror.add(e),i.push({styleId:t,rules:Array.from(e.rules||CSSRule,((t,r)=>({rule:L(t,e.href),index:r})))})),n.styleIds.push(t)};for(var a of e)o(a);i.length>0&&(n.styles=i),this.adoptedStyleSheetCb(n)}}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet,ie.forEach((e=>e.abort())),ie.clear()}trackStylesheetInLinkElement(e){}}class It{constructor(){a(this,"nodeMap",new WeakMap),a(this,"active",!1)}inOtherBuffer(e,t){var r=this.nodeMap.get(e);return r&&Array.from(r).some((e=>e!==t))}add(e,t){this.active||(this.active=!0,requestAnimationFrame((()=>{this.nodeMap=new WeakMap,this.active=!1}))),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}var Tt=!1;try{if(2!==Array.from([1],(e=>2*e))[0]){var Mt=document.createElement("iframe");document.body.appendChild(Mt),Array.from=(null==(n=Mt.contentWindow)?void 0:n.Array.from)||Array.from,document.body.removeChild(Mt)}}catch(e){console.debug("Unable to override Array.from",e)}var _t=new O;function Lt(e){void 0===e&&(e={});var{emit:t,checkoutEveryNms:n,checkoutEveryNth:i,blockClass:o="rr-block",blockSelector:a=null,ignoreClass:l="rr-ignore",ignoreSelector:c=null,maskTextClass:d="rr-mask",maskTextSelector:h=null,inlineStylesheet:v=!0,maskAllInputs:f,maskInputOptions:p,slimDOMOptions:m,maskInputFn:y,maskTextFn:g,hooks:b,packFn:w,sampling:k={},dataURLOptions:x={},mousemoveWait:S,recordDOM:I=!0,recordCanvas:T=!1,recordCrossOriginIframes:M=!1,recordAfter:_=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:L=!1,collectFonts:E=!1,inlineImages:R=!1,plugins:N,keepIframeSrcFn:A=(()=>!1),ignoreCSSAttributes:P=new Set([]),errorHandler:q}=e;qe=q;var D=r({type:"image/webp",quality:.4,maxBase64ImageLength:1048576},x),F=!M||window.parent===window,j=!1;if(!F)try{window.parent.document&&(j=!1)}catch(e){j=!0}if(F&&!t)throw new Error("emit function is required");if(!F&&!j)return()=>{};void 0!==S&&void 0===k.mousemove&&(k.mousemove=S),_t.reset();var H,U=!0===f?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==p?p:{password:!0},B=de(void 0!==m&&m);!function(e){void 0===e&&(e=window),"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=[].forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=[].forEach)}();var V=0,W=new Map,z=e=>{for(var t of N||[])t.eventProcessor&&(e=t.eventProcessor(e));return w&&!j&&(e=w(e)),e};yt=(e,r)=>{var o,a=e;if(a.timestamp=be(),!(null==(o=We[0])?void 0:o.isFrozen())||a.type===s.FullSnapshot||a.type===s.IncrementalSnapshot&&a.data.source===u.Mutation||We.forEach((e=>e.unfreeze())),F)null==t||t(z(a),r);else if(j){var l={type:"rrweb",event:z(a),origin:window.location.origin,isCheckout:r};window.parent.postMessage(l,"*")}if(a.type===s.FullSnapshot)H=a,V=0;else if(a.type===s.IncrementalSnapshot){if(a.data.source===u.Mutation&&a.data.isAttachIframe)return;V++,(i&&V>=i||n&&a.timestamp-H.timestamp>n)&>(!0)}};var Z=e=>{if(M&&e.removes&&e.removes.length>0){var t=e.adds.length>0?new Set(e.adds.map((e=>e.node.id))):null;e.removes.forEach((e=>{var{id:r}=e;if(!t||!t.has(r)){var n=W.get(r);n&&(n(),W.delete(r)),X.removeIframeById(r)}})),function(){for(var[e,t]of W){var r=_t.getNode(e);if(r)try{r.contentDocument&&r.contentDocument.defaultView||(t(),W.delete(e))}catch(r){t(),W.delete(e)}else t(),W.delete(e)}}()}yt({type:s.IncrementalSnapshot,data:r({source:u.Mutation},e)})},Q=e=>yt({type:s.IncrementalSnapshot,data:r({source:u.Scroll},e)}),G=e=>yt({type:s.IncrementalSnapshot,data:r({source:u.CanvasMutation},e)}),J=new Ct({mutationCb:Z,adoptedStyleSheetCb:e=>yt({type:s.IncrementalSnapshot,data:r({source:u.AdoptedStyleSheet},e)})}),X=new nt({mirror:_t,mutationCb:Z,stylesheetManager:J,recordCrossOriginIframes:M,wrappedEmit:yt});for(var Y of N||[])Y.getMirror&&Y.getMirror({nodeMirror:_t,crossOriginIframeMirror:X.crossOriginIframeMirror,crossOriginIframeStyleMirror:X.crossOriginIframeStyleMirror});var K=new It;bt=new St({recordCanvas:T,mutationCb:G,win:window,blockClass:o,blockSelector:a,mirror:_t,sampling:k.canvas,dataURLOptions:D});var ee=new it({mutationCb:Z,scrollCb:Q,bypassOptions:{blockClass:o,blockSelector:a,maskTextClass:d,maskTextSelector:h,inlineStylesheet:v,maskInputOptions:U,dataURLOptions:D,maskTextFn:g,maskInputFn:y,recordCanvas:T,inlineImages:R,sampling:k,slimDOMOptions:B,iframeManager:X,stylesheetManager:J,canvasManager:bt,keepIframeSrcFn:A,processedNodeManager:K},mirror:_t});gt=function(e){if(void 0===e&&(e=!1),I){yt({type:s.Meta,data:{href:window.location.href,width:xe(),height:ke()}},e),J.reset(),ee.init(),We.forEach((e=>e.lock()));var t=function(e,t){var{mirror:r=new O,blockClass:n="rr-block",blockSelector:i=null,maskTextClass:o="rr-mask",maskTextSelector:a=null,inlineStylesheet:s=!0,inlineImages:u=!1,recordCanvas:l=!1,maskAllInputs:c=!1,maskTextFn:d,maskInputFn:h,slimDOM:v=!1,dataURLOptions:f,preserveWhiteSpace:p,onSerialize:m,onIframeLoad:y,iframeLoadTimeout:g,onStylesheetLoad:b,stylesheetLoadTimeout:w,keepIframeSrcFn:k=(()=>!1),maxDepth:x}=t||{};return ce(e,{doc:e,mirror:r,blockClass:n,blockSelector:i,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:s,maskInputOptions:!0===c?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===c?{password:!0}:c,maskTextFn:d,maskInputFn:h,slimDOMOptions:de(v),dataURLOptions:f,inlineImages:u,recordCanvas:l,preserveWhiteSpace:p,onSerialize:m,onIframeLoad:y,iframeLoadTimeout:g,onStylesheetLoad:b,stylesheetLoadTimeout:w,keepIframeSrcFn:k,newlyAddedElement:!1,maxDepth:x})}(document,{mirror:_t,blockClass:o,blockSelector:a,maskTextClass:d,maskTextSelector:h,inlineStylesheet:v,maskAllInputs:U,maskTextFn:g,maskInputFn:y,slimDOM:B,dataURLOptions:D,recordCanvas:T,inlineImages:R,onSerialize(e){_e(e,_t)&&X.addIframe(e),Le(e,_t)&&J.trackLinkElement(e),Oe(e)&&ee.addShadowRoot(C.shadowRoot(e),document)},onIframeLoad(e,t){X.attachIframe(e,t),ee.observeAttachShadow(e)},onStylesheetLoad(e,t){J.attachLinkElement(e,t)},keepIframeSrcFn:A});if(!t)return console.warn("Failed to snapshot the document");yt({type:s.FullSnapshot,data:{node:t,initialOffset:we(window)}},e),We.forEach((e=>e.unlock())),M&&X.reattachIframes(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&J.adoptStyleSheets(document.adoptedStyleSheets,_t.getId(document))}};try{var te=[],re=e=>{var t;return Ve(Ke)({mutationCb:Z,mousemoveCb:(e,t)=>yt({type:s.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>yt({type:s.IncrementalSnapshot,data:r({source:u.MouseInteraction},e)}),scrollCb:Q,viewportResizeCb:e=>yt({type:s.IncrementalSnapshot,data:r({source:u.ViewportResize},e)}),inputCb:e=>yt({type:s.IncrementalSnapshot,data:r({source:u.Input},e)}),mediaInteractionCb:e=>yt({type:s.IncrementalSnapshot,data:r({source:u.MediaInteraction},e)}),styleSheetRuleCb:e=>yt({type:s.IncrementalSnapshot,data:r({source:u.StyleSheetRule},e)}),styleDeclarationCb:e=>yt({type:s.IncrementalSnapshot,data:r({source:u.StyleDeclaration},e)}),canvasMutationCb:G,fontCb:e=>yt({type:s.IncrementalSnapshot,data:r({source:u.Font},e)}),selectionCb(e){yt({type:s.IncrementalSnapshot,data:r({source:u.Selection},e)})},customElementCb(e){yt({type:s.IncrementalSnapshot,data:r({source:u.CustomElement},e)})},blockClass:o,ignoreClass:l,ignoreSelector:c,maskTextClass:d,maskTextSelector:h,maskInputOptions:U,inlineStylesheet:v,sampling:k,recordDOM:I,recordCanvas:T,inlineImages:R,userTriggeredOnInput:L,collectFonts:E,doc:e,maskInputFn:y,maskTextFn:g,keepIframeSrcFn:A,blockSelector:a,slimDOMOptions:B,dataURLOptions:D,mirror:_t,iframeManager:X,stylesheetManager:J,shadowDomManager:ee,processedNodeManager:K,canvasManager:bt,ignoreCSSAttributes:P,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=>yt({type:s.Plugin,data:{plugin:e.name,payload:t}})}))))||[]},b)};X.addLoadListener((e=>{try{var t=_t.getId(e),r=re(e.contentDocument);te.push(r),-1!==t&&W.set(t,r)}catch(e){console.warn(e)}})),X.addPageHideListener((e=>{var t=_t.getId(e),r=W.get(t);r&&(r(),W.delete(t)),function(e){for(var t=We.length-1;t>=0;t--){var r=We[t];(null==r?void 0:r.bufferBelongsToIframe(e))&&(r.reset(),We.splice(t,1))}}(e)}));var ne=()=>{gt(),te.push(re(document)),Tt=!0};return["interactive","complete"].includes(document.readyState)?ne():(te.push(ve("DOMContentLoaded",(()=>{yt({type:s.DomContentLoaded,data:{}}),"DOMContentLoaded"===_&&ne()}))),te.push(ve("load",(()=>{yt({type:s.Load,data:{}}),"load"===_&&ne()}),window))),()=>{te.forEach((e=>fe(e))),K.destroy(),X.removeLoadListener(),X.destroy(),W.clear(),_t.reset(),Tt=!1,qe=void 0}}catch(e){console.warn(e)}}Lt.addCustomEvent=(e,t)=>{if(!Tt)throw new Error("please add custom event after start recording");yt({type:s.Custom,data:{tag:e,payload:t}})},Lt.freezePage=()=>{We.forEach((e=>e.freeze()))},Lt.takeFullSnapshot=e=>{if(!Tt)throw new Error("please take full snapshot after start recording");gt(e)},Lt.mirror=_t;var Ot=Object.defineProperty,Et=(e,t,r)=>((e,t,r)=>t in e?Ot(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);class Rt{constructor(e){Et(this,"fileName"),Et(this,"functionName"),Et(this,"lineNumber"),Et(this,"columnNumber"),this.fileName=e.fileName||"",this.functionName=e.functionName||"",this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber}toString(){var e=this.lineNumber||"",t=this.columnNumber||"";return this.functionName?this.functionName+" ("+this.fileName+":"+e+":"+t+")":this.fileName+":"+e+":"+t}}var Nt=/(^|@)\S+:\d+/,At=/^\s*at .*(\S+:\d+|\(native\))/m,Pt=/^(eval@)?(\[native code])?$/,qt={parse(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(At)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):[]:[]},extractLocation(e){if(-1===e.indexOf(":"))return[e];var t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!t)throw new Error("Cannot parse given url: "+e);return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE(e){return e.stack.split("\n").filter((function(e){return!!e.match(At)}),this).map((function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var t=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),r=t.match(/ (\((.+):(\d+):(\d+)\)$)/),n=(t=r?t.replace(r[0],""):t).split(/\s+/).slice(1),i=this.extractLocation(r?r[1]:n.pop()),o=n.join(" ")||void 0,a=["eval","<anonymous>"].indexOf(i[0])>-1?void 0:i[0];return new Rt({functionName:o,fileName:a,lineNumber:i[1],columnNumber:i[2]})}),this)},parseFFOrSafari(e){return e.stack.split("\n").filter((function(e){return!e.match(Pt)}),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 Rt({functionName:e});var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=e.match(t),n=r&&r[1]?r[1]:void 0,i=this.extractLocation(e.replace(t,""));return new Rt({functionName:n,fileName:i[0],lineNumber:i[1],columnNumber:i[2]})}),this)},parseOpera(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(e){for(var t=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split("\n"),n=[],i=2,o=r.length;o>i;i+=2){var a=t.exec(r[i]);a&&n.push(new Rt({fileName:a[2],lineNumber:parseFloat(a[1])}))}return n},parseOpera10(e){for(var t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=e.stacktrace.split("\n"),n=[],i=0,o=r.length;o>i;i+=2){var a=t.exec(r[i]);a&&n.push(new Rt({functionName:a[3]||void 0,fileName:a[2],lineNumber:parseFloat(a[1])}))}return n},parseOpera11(e){return e.stack.split("\n").filter((function(e){return!!e.match(Nt)&&!e.match(/^Error created at/)}),this).map((function(e){var t=e.split("@"),r=this.extractLocation(t.pop()),n=(t.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new Rt({functionName:n,fileName:r[0],lineNumber:r[1],columnNumber:r[2]})}),this)}};function Dt(e){if(!e||!e.outerHTML)return"";for(var t="";e.parentElement;){var r=e.localName;if(!r)break;r=r.toLowerCase();var n=e.parentElement,i=[];if(n.children&&n.children.length>0)for(var o=0;n.children.length>o;o++){var a=n.children[o];a.localName&&a.localName.toLowerCase&&a.localName.toLowerCase()===r&&i.push(a)}i.length>1&&(r+=":eq("+i.indexOf(e)+")"),t=r+(t?">"+t:""),e=n}return t}function Ft(e){return Array.isArray(e)}function jt(e){return"object"==typeof e&&null!==e&&!Ft(e)}function Ht(e,t){if(0===t)return!0;var r=Object.keys(e);for(var n of r)if(jt(e[n])&&Ht(e[n],t-1))return!0;return!1}function Ut(e,t){var r={numOfKeysLimit:50,depthOfLimit:4};Object.assign(r,t);var n=[],i=[];return JSON.stringify(e,(function(e,t){if(n.length>0){var o=n.indexOf(this);~o?n.splice(o+1):n.push(this),~o?i.splice(o,1/0,e):i.push(e),~n.indexOf(t)&&(t=n[0]===t?"[Circular ~]":"[Circular ~."+i.slice(0,n.indexOf(t)).join(".")+"]")}else n.push(t);if(null===t)return t;if(void 0===t)return"undefined";if(jt(a=t)&&Object.keys(a).length>r.numOfKeysLimit||"function"==typeof a||jt(a)&&Ht(a,r.depthOfLimit))return function(e){var t=e.toString();return r.stringLengthLimit&&t.length>r.stringLengthLimit&&(t=t.slice(0,r.stringLengthLimit)+"..."),t}(t);var a;if("bigint"==typeof t)return t.toString()+"n";if(t instanceof Event){var s={};for(var u in t){var l=t[u];s[u]=Ft(l)?Dt(l.length?l[0]:null):l}return s}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 Bt={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 Vt(e,t,r){var n,i=r?Object.assign({},Bt,r):Bt,o=i.logger;if(!o)return()=>{};n="string"==typeof o?t[o]:o;var a=0,s=!1,u=[];if(i.level.includes("error")){var l=t=>{var r=t.message,n=qt.parse(t.error).map((e=>e.toString())),o=[Ut(r,i.stringifyOptions)];e({level:"error",trace:n,payload:o})};t.addEventListener("error",l),u.push((()=>{t.removeEventListener("error",l)}));var c=t=>{var r,n;t.reason instanceof Error?n=[Ut("Uncaught (in promise) "+(r=t.reason).name+": "+r.message,i.stringifyOptions)]:(r=new Error,n=[Ut("Uncaught (in promise)",i.stringifyOptions),Ut(t.reason,i.stringifyOptions)]);var o=qt.parse(r).map((e=>e.toString()));e({level:"error",trace:o,payload:n})};t.addEventListener("unhandledrejection",c),u.push((()=>{t.removeEventListener("unhandledrejection",c)}))}for(var d of i.level)u.push(h(n,d));return()=>{u.forEach((e=>e()))};function h(t,r){var n=this;return t[r]?function(t,o,u){try{if(!(o in t))return()=>{};var l=t[o],c=(t=>function(){for(var o=arguments.length,u=new Array(o),l=0;o>l;l++)u[l]=arguments[l];if(t.apply(n,u),!("assert"===r&&u[0]||s)){s=!0;try{var c=qt.parse(new Error).map((e=>e.toString())).splice(1),d=("assert"===r?u.slice(1):u).map((e=>Ut(e,i.stringifyOptions)));a++,i.lengthThreshold>a?e({level:r,trace:c,payload:d}):a===i.lengthThreshold&&e({level:"warn",trace:[],payload:[Ut("The number of log records reached the threshold.")]})}catch(e){t("rrweb logger error:",e,...u)}finally{s=!1}}})(l);return"function"==typeof c&&(c.prototype=c.prototype||{},Object.defineProperties(c,{__rrweb_original__:{enumerable:!1,value:l}})),t[o]=c,()=>{t[o]=l}}catch(e){return()=>{}}}(t,r):()=>{}}}var Wt=e=>({name:"rrweb/console@1",observer:Vt,options:e}),zt=function(e){return e.MinLength="min_length",e.MaxLength="max_length",e}({});function Zt(e,t){return-1!==e.indexOf(t)}var $t=function(e){return e.trim()},Qt=Object.prototype,Gt=Qt.hasOwnProperty,Jt=Qt.toString,Xt=Array.isArray||function(e){return"[object Array]"===Jt.call(e)},Yt=e=>"function"==typeof e,Kt=e=>e===Object(e)&&!Xt(e),er=e=>void 0===e,tr=e=>"[object String]"==Jt.call(e),rr=e=>null===e,nr=e=>er(e)||rr(e),ir=e=>"[object Number]"==Jt.call(e)&&e==e,or=e=>"[object Boolean]"===Jt.call(e),ar=e=>e instanceof FormData;function sr(e){return null===e||"object"!=typeof e}function ur(e,t){return{}.toString.call(e)==="[object "+t+"]"}function lr(e){return"undefined"!=typeof Event&&function(e,t){try{return e instanceof t}catch(e){return!1}}(e,Event)}var cr,dr,hr,vr="Mobile",fr="Android",pr="Tablet",mr=fr+" "+pr,yr="iPad",gr="Apple Watch",br="BlackBerry",wr="Nintendo",kr="PlayStation",xr="Xbox",Sr="Windows Phone",Cr="Nokia",Ir="Ouya",Tr="Generic",Mr=Tr+" "+vr.toLowerCase(),_r=Tr+" "+pr.toLowerCase(),Lr=new RegExp(xr,"i"),Or=new RegExp(kr+" \\w+","i"),Er=new RegExp(wr+" \\w+","i"),Rr=new RegExp(br+"|PlayBook|BB10","i");function Nr(e,t){if(e){var r=e.find((e=>e.type===t));return null==r?void 0:r.value}}function Ar(e){var t=globalThis._posthogChunkIds;if(t){var r=Object.keys(t);return hr&&r.length===dr||(dr=r.length,hr=r.reduce(((r,n)=>{cr||(cr={});var i=cr[n];if(i)r[i[0]]=i[1];else for(var o=e(n),a=o.length-1;a>=0;a--){var s=o[a],u=null==s?void 0:s.filename,l=t[n];if(u&&l){r[u]=l,cr[n]=[u,l];break}}return r}),{})),hr}}var Pr="?";function qr(e,t,r,n,i){var o={platform:e,filename:t,function:"<anonymous>"===r?Pr:r,in_app:!0};return er(n)||(o.lineno=n),er(i)||(o.colno=i),o}var Dr=(e,t)=>{var r=-1!==e.indexOf("safari-extension"),n=-1!==e.indexOf("safari-web-extension");return r||n?[-1!==e.indexOf("@")?e.split("@")[0]:Pr,r?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},Fr=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,jr=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Hr=/\((\S*)(?::(\d+))(?::(\d+))\)/,Ur=(e,t)=>{var r=Fr.exec(e);if(r){var[,n,i,o]=r;return qr(t,n,Pr,+i,+o)}var a=jr.exec(e);if(a){if(a[2]&&0===a[2].indexOf("eval")){var s=Hr.exec(a[2]);s&&(a[2]=s[1],a[3]=s[2],a[4]=s[3])}var[u,l]=Dr(a[1]||Pr,a[2]);return qr(t,l,u,a[3]?+a[3]:void 0,a[4]?+a[4]:void 0)}},Br=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Vr=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Wr=(e,t)=>{var r=Br.exec(e);if(r){if(r[3]&&r[3].indexOf(" > eval")>-1){var n=Vr.exec(r[3]);n&&(r[1]=r[1]||"eval",r[3]=n[1],r[4]=n[2],r[5]="")}var i=r[3],o=r[1]||Pr;return[o,i]=Dr(o,i),qr(t,i,o,r[4]?+r[4]:void 0,r[5]?+r[5]:void 0)}},zr=/\(error: (.*)\)/;var Zr=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;var $r=["fatal","error","warning","log","info","debug"];function Qr(e,t){void 0===t&&(t=40);var r=Object.keys(e);if(r.sort(),!r.length)return"[object has no keys]";for(var n=r.length;n>0;n--){var i=r.slice(0,n).join(", ");if(t>=i.length)return n===r.length?i:i.length>t?i.slice(0,t)+"...":i}return""}var Gr="undefined"!=typeof window?window:void 0,Jr="undefined"!=typeof globalThis?globalThis:Gr;"undefined"==typeof self&&(Jr.self=Jr),"undefined"==typeof File&&(Jr.File=function(){});var Xr=null==Jr?void 0:Jr.navigator,Yr=null==Jr?void 0:Jr.document;null!=Jr&&Jr.XMLHttpRequest&&new Jr.XMLHttpRequest;var Kr=null==Xr?void 0:Xr.userAgent,en=null!=Gr?Gr:{},tn=e=>e instanceof Document,rn=function(e,t){var{debugEnabled:r}=void 0===t?{}:t,n={k(t){if(Gr&&(en.POSTHOG_DEBUG||r)&&!er(Gr.console)&&Gr.console){for(var n=("__rrweb_original__"in Gr.console[t]?Gr.console[t].__rrweb_original__:Gr.console[t]),i=arguments.length,o=new Array(i>1?i-1:0),a=1;i>a;a++)o[a-1]=arguments[a];n(e,...o)}},debug(){for(var e=arguments.length,t=new Array(e),r=0;e>r;r++)t[r]=arguments[r];n.k("debug",...t)},info(){for(var e=arguments.length,t=new Array(e),r=0;e>r;r++)t[r]=arguments[r];n.k("log",...t)},warn(){for(var e=arguments.length,t=new Array(e),r=0;e>r;r++)t[r]=arguments[r];n.k("warn",...t)},error(){for(var e=arguments.length,t=new Array(e),r=0;e>r;r++)t[r]=arguments[r];n.k("error",...t)},critical(){for(var t=arguments.length,r=new Array(t),n=0;t>n;n++)r[n]=arguments[n];console.error(e,...r)},uninitializedWarning(e){n.error("You must initialize PostHog before calling "+e)},createLogger:(t,r)=>rn(e+" "+t,r)};return n},nn=rn("[PostHog.js]"),on=nn.createLogger;function an(e,t){if(!nr(e))if(Xt(e))e.forEach(t);else if(ar(e))e.forEach(((e,r)=>t(e,r)));else for(var r in e)Gt.call(e,r)&&t(e[r],r)}var sn=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;t>n;n++)r[n-1]=arguments[n];for(var i of r)for(var o in i)void 0!==i[o]&&(e[o]=i[o]);return e};function un(e){for(var t=Object.keys(e),r=t.length,n=new Array(r);r--;)n[r]=[t[r],e[t[r]]];return n}function ln(e,t,r,n){var{capture:i=!1,passive:o=!0}=null!=n?n:{};null==e||e.addEventListener(t,r,{capture:i,passive:o})}var cn=function(e,t){var r,n;void 0===t&&(t="&");var i=[];return an(e,(function(e,t){er(e)||er(t)||"undefined"===t||(r=encodeURIComponent(e instanceof File?e.name:e.toString()),n=encodeURIComponent(t),i[i.length]=n+"="+r)})),i.join(t)};function dn(e,t,r){try{if(!(t in e))return()=>{};var n=e[t],i=r(n);return Yt(i)&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=i,()=>{e[t]=n}}catch(e){return()=>{}}}function hn(e,t){var r,n=function(e){try{return"string"==typeof e?new URL(e).hostname:"url"in e?new URL(e.url).hostname:e.hostname}catch(e){return null}}(e),i={hostname:n,isHostDenied:!1};if(null==(r=t.payloadHostDenyList)||!r.length||null==n||!n.trim().length)return i;for(var o of t.payloadHostDenyList)if(n.endsWith(o))return{hostname:n,isHostDenied:!0};return i}var vn=1,fn=3,pn=11;function mn(e){return!!e&&e.nodeType===vn}function yn(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function gn(e){return!!e&&e.nodeType===pn&&mn(e.host)}function bn(e){return e?$t(e).split(/\s+/):[]}function wn(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 bn(t)}function kn(e){var t="";return Mn(e)&&!_n(e)&&e.childNodes&&e.childNodes.length&&an(e.childNodes,(function(e){var r;(function(e){return!!e&&e.nodeType===fn})(e)&&e.textContent&&(t+=null!==(r=function(e){return nr(e)?null:$t(e).split(/(\s+)/).filter((e=>Pn(e))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}(e.textContent))&&void 0!==r?r:"")})),$t(t)}var xn=["a","button","form","input","select","textarea","label"];function Sn(e){var t=e.parentNode;return!(!t||!mn(t))&&t}var Cn=[".ph-no-deadclick",".ph-no-capture"];var In=e=>!e||yn(e,"html")||!mn(e),Tn=(e,t)=>{if(!Gr||In(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var r=!1,n=[e],i=e;i.parentNode&&!yn(i,"body");)if(gn(i.parentNode))n.push(i.parentNode.host),i=i.parentNode.host;else{var o=Sn(i);if(!o)break;if(xn.indexOf(o.tagName.toLowerCase())>-1)r=!0;else{var a=Gr.getComputedStyle(o);a&&"pointer"===a.getPropertyValue("cursor")&&(r=!0)}n.push(o),i=o}return{parentIsUsefulElement:r,targetElementList:n}};function Mn(e){for(var t=e;t.parentNode&&!yn(t,"body");t=t.parentNode){var r=wn(t);if(Zt(r,"ph-sensitive")||Zt(r,"ph-no-capture"))return!1}if(Zt(wn(e),"ph-include"))return!0;var n=e.type||"";if(tr(n))switch(n.toLowerCase()){case"hidden":case"password":return!1}var i=e.name||e.id||"";return!tr(i)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(i.replace(/[^a-zA-Z0-9]/g,""))}function _n(e){return!!(yn(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||yn(e,"select")||yn(e,"textarea")||"true"===e.getAttribute("contenteditable"))}var Ln="(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})",On=new RegExp("^(?:"+Ln+")$"),En=new RegExp(Ln),Rn="\\d{3}-?\\d{2}-?\\d{4}",Nn=new RegExp("^("+Rn+")$"),An=new RegExp("("+Rn+")");function Pn(e,t){if(void 0===t&&(t=!0),nr(e))return!1;if(tr(e)){if(e=$t(e),(t?On:En).test((e||"").replace(/[- ]/g,"")))return!1;if((t?Nn:An).test(e))return!1}return!0}function qn(e){var t=kn(e);return Pn(t=(t+" "+Dn(e)).trim())?t:""}function Dn(e){var t="";return e&&e.childNodes&&e.childNodes.length&&an(e.childNodes,(function(e){var r;if(e&&"span"===(null==(r=e.tagName)?void 0:r.toLowerCase()))try{var n=kn(e);t=(t+" "+n).trim(),e.childNodes&&e.childNodes.length&&(t=(t+" "+Dn(e)).trim())}catch(e){nn.error("[AutoCapture]",e)}})),t}function Fn(e){return e.replace(/"|\\"/g,'\\"')}function jn(e){var t=e.attr__class;return t?Xt(t)?t:bn(t):void 0}var Hn={initiatorTypes:["audio","beacon","body","css","early-hint","embed","fetch","frame","iframe","icon","image","img","input","link","navigation","object","ping","script","track","video","xmlhttprequest"],maskRequestFn:e=>e,recordHeaders:!1,recordBody:!1,recordInitialRequests:!1,recordPerformance:!1,performanceEntryTypeToObserve:["first-input","navigation","paint","resource"],payloadSizeLimitBytes:1e6,payloadHostDenyList:[".lr-ingest.io",".ingest.sentry.io",".clarity.ms","analytics.google.com","bam.nr-data.net"]},Un=on("[Recorder]"),Bn=e=>"navigation"===e.entryType,Vn=e=>"resource"===e.entryType;function Wn(e,t){return!!t&&(or(t)||t[e])}function zn(e){var{type:t,recordBody:r,headers:n,url:i}=e;function o(e){var t=Object.keys(n).find((e=>"content-type"===e.toLowerCase())),r=t&&n[t];return e.some((e=>null==r?void 0:r.includes(e)))}if(!r)return!1;if(function e(t){try{return"string"==typeof t?t.startsWith("blob:"):t instanceof URL?"blob:"===t.protocol:t instanceof Request&&e(t.url)}catch(e){return!1}}(i))return!1;if(or(r))return!0;if(Xt(r))return o(r);var a=r[t];return or(a)?a:o(a)}function Zn(e,t,r,n,i,o){return $n.apply(this,arguments)}function $n(){return $n=t((function*(e,t,r,n,i,o){if(void 0===o&&(o=0),o>10)return Un.warn("Failed to get performance entry for request",{url:r,initiatorType:t}),null;var a=function(e,r){for(var o=e.length-1;o>=0;o-=1)if(Vn(a=e[o])&&a.initiatorType===t&&(er(n)||a.startTime>=n)&&(er(i)||i>=a.startTime))return e[o];var a}(e.performance.getEntriesByName(r));return a||(yield new Promise((e=>setTimeout(e,50*o))),Zn(e,t,r,n,i,o+1))})),$n.apply(this,arguments)}function Qn(e){var{body:t,options:r,url:n}=e;if(nr(t))return null;var{hostname:i,isHostDenied:o}=hn(n,r);if(o)return i+" is in deny list";if(tr(t))return t;if(tn(t))return t.textContent;if(ar(t))return cn(t);if(Kt(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 Gn=e=>!rr(e)&&("navigation"===e.entryType||"resource"===e.entryType);function Jn(e){var{entry:t,method:n,status:i,networkRequest:o,isInitial:a,start:s,end:u,url:l,initiatorType:c}=e;s=t?t.startTime:s,u=t?t.responseEnd:u;var d=Math.floor(Date.now()-performance.now()),h=Math.floor(d+(s||0)),v=[r({},t?t.toJSON():{name:l},{startTime:er(s)?void 0:Math.round(s),endTime:er(u)?void 0:Math.round(u),timeOrigin:d,timestamp:h,method:n,initiatorType:c||(t?t.initiatorType:void 0),status:i,requestHeaders:o.requestHeaders,requestBody:o.requestBody,responseHeaders:o.responseHeaders,responseBody:o.responseBody,isInitial:a})];if(Gn(t))for(var f of t.serverTiming||[])v.push({timeOrigin:d,timestamp:h,startTime:Math.round(t.startTime),name:f.name,duration:f.duration,entryType:"serverTiming"});return v}var Xn=["video/","audio/"];function Yn(e){return new Promise((t=>{var r=setTimeout((()=>t("[SessionReplay] Timeout while trying to read body")),500);try{e.clone().text().then((e=>t(e)),(e=>t("[SessionReplay] Failed to read body: "+e))).finally((()=>clearTimeout(r)))}catch(e){clearTimeout(r),t("[SessionReplay] Failed to read body")}}))}function Kn(){return Kn=t((function*(e){var{r:t,options:r,url:n}=e,{hostname:i,isHostDenied:o}=hn(n,r);return o?Promise.resolve(i+" is in deny list"):Yn(t)})),Kn.apply(this,arguments)}function ei(){return ei=t((function*(e){var{r:t,options:r,url:n}=e,i=function(e){var t,{r:r,options:n,url:i}=e;if("chunked"===r.headers.get("Transfer-Encoding"))return"Chunked Transfer-Encoding is not supported";var o=null==(t=r.headers.get("Content-Type"))?void 0:t.toLowerCase(),a=Xn.some((e=>null==o?void 0:o.startsWith(e)));if(o&&a)return"Content-Type "+o+" is not supported";var{hostname:s,isHostDenied:u}=hn(i,n);return u?s+" is in deny list":null}({r:t,options:r,url:n});return rr(i)?Yn(t):Promise.resolve(i)})),ei.apply(this,arguments)}var ti=null;function ri(e,n,i){if(!("performance"in n))return()=>{};if(ti)return Un.warn("Network observer already initialised, doing nothing"),()=>{};var o=i?Object.assign({},Hn,i):Hn,a=t=>{var n=[];t.requests.forEach((e=>{var t=o.maskRequestFn(e);t&&n.push(t)})),n.length>0&&e(r({},t,{requests:n}))},s=function(e,t,r){if(r.recordInitialRequests){var n=t.performance.getEntries().filter((e=>Bn(e)||Vn(e)&&r.initiatorTypes.includes(e.initiatorType)));e({requests:n.flatMap((e=>Jn({entry:e,method:void 0,status:void 0,networkRequest:{},isInitial:!0}))),isInitial:!0})}var i=new t.PerformanceObserver((t=>{var n=t.getEntries().filter((e=>Bn(e)||Vn(e)&&r.initiatorTypes.includes(e.initiatorType)&&(e=>!r.recordBody&&!r.recordHeaders||"xmlhttprequest"!==e.initiatorType&&"fetch"!==e.initiatorType)(e)));e({requests:n.flatMap((e=>Jn({entry:e,method:void 0,status:void 0,networkRequest:{}})))})})),o=PerformanceObserver.supportedEntryTypes.filter((e=>r.performanceEntryTypeToObserve.includes(e)));return i.observe({entryTypes:o}),()=>{i.disconnect()}}(a,n,o),u=()=>{},l=()=>{};return(o.recordHeaders||o.recordBody)&&(u=function(e,t,r){if(!r.initiatorTypes.includes("xmlhttprequest"))return()=>{};var n=Wn("request",r.recordHeaders),i=Wn("response",r.recordHeaders),o=dn(t.XMLHttpRequest.prototype,"open",(o=>function(a,s,u,l,c){void 0===u&&(u=!0);var d,h,v=this,f=new Request(s),p={},m={},y=v.setRequestHeader.bind(v);v.setRequestHeader=(e,t)=>(m[e]=t,y(e,t)),n&&(p.requestHeaders=m);var g=v.send.bind(v);v.send=e=>(zn({type:"request",headers:m,url:s,recordBody:r.recordBody})&&(p.requestBody=Qn({body:e,options:r,url:s})),d=t.performance.now(),g(e));var b=()=>{v.removeEventListener("readystatechange",w),v.removeEventListener("error",b),v.removeEventListener("abort",b),v.removeEventListener("timeout",b)},w=()=>{if(v.readyState===v.DONE){b(),h=t.performance.now();var n={};v.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((e=>{var t=e.split(": "),r=t.shift(),i=t.join(": ");r&&(n[r]=i)})),i&&(p.responseHeaders=n),zn({type:"response",headers:n,url:s,recordBody:r.recordBody})&&(p.responseBody=Qn({body:v.response,options:r,url:s})),Zn(t,"xmlhttprequest",f.url,d,h).then((t=>{var r=Jn({entry:t,method:a,status:null==v?void 0:v.status,networkRequest:p,start:d,end:h,url:s.toString(),initiatorType:"xmlhttprequest"});e({requests:r})})).catch((()=>{}))}};v.addEventListener("readystatechange",w),v.addEventListener("error",b),v.addEventListener("abort",b),v.addEventListener("timeout",b),o.call(v,a,s.toString(),u,l,c)}));return()=>{o()}}(a,n,o),l=function(e,r,n){if(!n.initiatorTypes.includes("fetch"))return()=>{};var i=Wn("request",n.recordHeaders),o=Wn("response",n.recordHeaders),a=dn(r,"fetch",(a=>function(){var s=t((function*(t,s){var u,l,c,d=new Request(t,s),h={};try{var v={};d.headers.forEach(((e,t)=>{v[t]=e})),i&&(h.requestHeaders=v),zn({type:"request",headers:v,url:t,recordBody:n.recordBody})&&(h.requestBody=yield function(e){return Kn.apply(this,arguments)}({r:d,options:n,url:t})),l=r.performance.now(),u=yield a(d),c=r.performance.now();var f={};return u.headers.forEach(((e,t)=>{f[t]=e})),o&&(h.responseHeaders=f),zn({type:"response",headers:f,url:t,recordBody:n.recordBody})&&(h.responseBody=yield function(e){return ei.apply(this,arguments)}({r:u,options:n,url:t})),u}finally{Zn(r,"fetch",d.url,l,c).then((t=>{var r,n=Jn({entry:t,method:d.method,status:null==(r=u)?void 0:r.status,networkRequest:h,start:l,end:c,url:d.url,initiatorType:"fetch"});e({requests:n})})).catch((()=>{}))}}));return function(e,t){return s.apply(this,arguments)}}()));return()=>{a()}}(a,n,o)),ti=()=>{s(),u(),l(),ti=null}}var ni=e=>({name:"rrweb/network@1",observer:ri,options:e});en.__PosthogExtensions__=en.__PosthogExtensions__||{},en.__PosthogExtensions__.rrwebPlugins={getRecordConsolePlugin:Wt,getRecordNetworkPlugin:ni},en.__PosthogExtensions__.rrweb={record:Lt,version:"v2",wasMaxDepthReached:()=>le,resetMaxDepthState(){le=!1,ue=!1}},en.rrweb={record:Lt,version:"v2"},en.rrwebConsoleRecord={getRecordConsolePlugin:Wt},en.getRecordNetworkPlugin=ni;var ii,oi,ai,si,ui,li,ci,di,hi,vi,fi,pi,mi={},yi=[],gi=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,bi=Array.isArray;function wi(e,t){for(var r in t)e[r]=t[r];return e}function ki(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function xi(e,t,r){var n,i,o,a={};for(o in t)"key"==o?n=t[o]:"ref"==o?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?ii.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===a[o]&&(a[o]=e.defaultProps[o]);return Si(e,a,n,i,null)}function Si(e,t,r,n,i){var o={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==i?++ai:i,__i:-1,__u:0};return null==i&&null!=oi.vnode&&oi.vnode(o),o}function Ci(e){return e.children}function Ii(e,t){this.props=e,this.context=t}function Ti(e,t){if(null==t)return e.__?Ti(e.__,e.__i+1):null;for(var r;e.__k.length>t;t++)if(null!=(r=e.__k[t])&&null!=r.__e)return r.__e;return"function"==typeof e.type?Ti(e):null}function Mi(e){var t,r;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;e.__k.length>t;t++)if(null!=(r=e.__k[t])&&null!=r.__e){e.__e=e.__c.base=r.__e;break}return Mi(e)}}function _i(e){(!e.__d&&(e.__d=!0)&&si.push(e)&&!$.__r++||ui!=oi.debounceRendering)&&((ui=oi.debounceRendering)||li)($)}function $(){for(var e,t,r,n,i,o,a,s=1;si.length;)si.length>s&&si.sort(ci),e=si.shift(),s=si.length,e.__d&&(r=void 0,n=void 0,i=(n=(t=e).__v).__e,o=[],a=[],t.__P&&((r=wi({},n)).__v=n.__v+1,oi.vnode&&oi.vnode(r),Pi(t.__P,r,n,t.__n,t.__P.namespaceURI,32&n.__u?[i]:null,o,null==i?Ti(n):i,!!(32&n.__u),a),r.__v=n.__v,r.__.__k[r.__i]=r,Di(o,r,a),n.__e=n.__=null,r.__e!=i&&Mi(r)));$.__r=0}function Li(e,t,r,n,i,o,a,s,u,l,c){var d,h,v,f,p,m,y,g=n&&n.__k||yi,b=t.length;for(u=function(e,t,r,n,i){var o,a,s,u,l,c=r.length,d=c,h=0;for(e.__k=new Array(i),o=0;i>o;o++)null!=(a=t[o])&&"boolean"!=typeof a&&"function"!=typeof a?("string"==typeof a||"number"==typeof a||"bigint"==typeof a||a.constructor==String?a=e.__k[o]=Si(null,a,null,null,null):bi(a)?a=e.__k[o]=Si(Ci,{children:a},null,null,null):void 0===a.constructor&&a.__b>0?a=e.__k[o]=Si(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):e.__k[o]=a,u=o+h,a.__=e,a.__b=e.__b+1,s=null,-1!=(l=a.__i=Ei(a,r,u,d))&&(d--,(s=r[l])&&(s.__u|=2)),null==s||null==s.__v?(-1==l&&(i>c?h--:c>i&&h++),"function"!=typeof a.type&&(a.__u|=4)):l!=u&&(l==u-1?h--:l==u+1?h++:(l>u?h--:h++,a.__u|=4))):e.__k[o]=null;if(d)for(o=0;c>o;o++)null!=(s=r[o])&&0==(2&s.__u)&&(s.__e==n&&(n=Ti(s)),Hi(s,s));return n}(r,t,g,u,b),d=0;b>d;d++)null!=(v=r.__k[d])&&(h=-1==v.__i?mi:g[v.__i]||mi,v.__i=d,m=Pi(e,v,h,i,o,a,s,u,l,c),f=v.__e,v.ref&&h.ref!=v.ref&&(h.ref&&ji(h.ref,null,v),c.push(v.ref,v.__c||f,v)),null==p&&null!=f&&(p=f),(y=!!(4&v.__u))||h.__k===v.__k?u=Oi(v,u,e,y):"function"==typeof v.type&&void 0!==m?u=m:f&&(u=f.nextSibling),v.__u&=-7);return r.__e=p,u}function Oi(e,t,r,n){var i,o;if("function"==typeof e.type){for(i=e.__k,o=0;i&&i.length>o;o++)i[o]&&(i[o].__=e,t=Oi(i[o],t,r,n));return t}e.__e!=t&&(n&&(t&&e.type&&!t.parentNode&&(t=Ti(e)),r.insertBefore(e.__e,t||null)),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8==t.nodeType);return t}function Ei(e,t,r,n){var i,o,a,s=e.key,u=e.type,l=t[r],c=null!=l&&0==(2&l.__u);if(null===l&&null==s||c&&s==l.key&&u==l.type)return r;if(n>(c?1:0))for(i=r-1,o=r+1;i>=0||t.length>o;)if(null!=(l=t[a=0>i?o++:i--])&&0==(2&l.__u)&&s==l.key&&u==l.type)return a;return-1}function Ri(e,t,r){"-"==t[0]?e.setProperty(t,null==r?"":r):e[t]=null==r?"":"number"!=typeof r||gi.test(t)?r:r+"px"}function Ni(e,t,r,n,i){var o,a;e:if("style"==t)if("string"==typeof r)e.style.cssText=r;else{if("string"==typeof n&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||Ri(e.style,t,"");if(r)for(t in r)n&&r[t]==n[t]||Ri(e.style,t,r[t])}else if("o"==t[0]&&"n"==t[1])o=t!=(t=t.replace(di,"$1")),a=t.toLowerCase(),t=a in e||"onFocusOut"==t||"onFocusIn"==t?a.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=r,r?n?r.u=n.u:(r.u=hi,e.addEventListener(t,o?fi:vi,o)):e.removeEventListener(t,o?fi:vi,o);else{if("http://www.w3.org/2000/svg"==i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==r?"":r;break e}catch(e){}"function"==typeof r||(null==r||!1===r&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==r?"":r))}}function Ai(e){return function(t){if(this.l){var r=this.l[t.type+e];if(null==t.t)t.t=hi++;else if(r.u>t.t)return;return r(oi.event?oi.event(t):t)}}}function Pi(e,t,r,n,i,o,a,s,u,l){var c,d,h,v,f,p,m,y,g,b,w,$,k,x,S,C,I,T=t.type;if(void 0!==t.constructor)return null;128&r.__u&&(u=!!(32&r.__u),o=[s=t.__e=r.__e]),(c=oi.__b)&&c(t);e:if("function"==typeof T)try{if(y=t.props,g="prototype"in T&&T.prototype.render,b=(c=T.contextType)&&n[c.__c],w=c?b?b.props.value:c.__:n,r.__c?m=(d=t.__c=r.__c).__=d.__E:(g?t.__c=d=new T(y,w):(t.__c=d=new Ii(y,w),d.constructor=T,d.render=Ui),b&&b.sub(d),d.state||(d.state={}),d.__n=n,h=d.__d=!0,d.__h=[],d._sb=[]),g&&null==d.__s&&(d.__s=d.state),g&&null!=T.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=wi({},d.__s)),wi(d.__s,T.getDerivedStateFromProps(y,d.__s))),v=d.props,f=d.state,d.__v=t,h)g&&null==T.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),g&&null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(g&&null==T.getDerivedStateFromProps&&y!==v&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(y,w),t.__v==r.__v||!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(y,d.__s,w)){for(t.__v!=r.__v&&(d.props=y,d.state=d.__s,d.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some((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(y,d.__s,w),g&&null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(v,f,p)}))}if(d.context=w,d.props=y,d.__P=e,d.__e=!1,k=oi.__r,x=0,g){for(d.state=d.__s,d.__d=!1,k&&k(t),c=d.render(d.props,d.state,d.context),S=0;d._sb.length>S;S++)d.__h.push(d._sb[S]);d._sb=[]}else do{d.__d=!1,k&&k(t),c=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&25>++x);d.state=d.__s,null!=d.getChildContext&&(n=wi(wi({},n),d.getChildContext())),g&&!h&&null!=d.getSnapshotBeforeUpdate&&(p=d.getSnapshotBeforeUpdate(v,f)),C=c,null!=c&&c.type===Ci&&null==c.key&&(C=Fi(c.props.children)),s=Li(e,bi(C)?C:[C],t,r,n,i,o,a,s,u,l),d.base=t.__e,t.__u&=-161,d.__h.length&&a.push(d),m&&(d.__E=d.__=null)}catch(e){if(t.__v=null,u||null!=o)if(e.then){for(t.__u|=u?160:128;s&&8==s.nodeType&&s.nextSibling;)s=s.nextSibling;o[o.indexOf(s)]=null,t.__e=s}else{for(I=o.length;I--;)ki(o[I]);qi(t)}else t.__e=r.__e,t.__k=r.__k,e.then||qi(t);oi.__e(e,t,r)}else null==o&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):s=t.__e=function(e,t,r,n,i,o,a,s,u){var l,c,d,h,v,f,p,m=r.props||mi,y=t.props,g=t.type;if("svg"==g?i="http://www.w3.org/2000/svg":"math"==g?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),null!=o)for(l=0;o.length>l;l++)if((v=o[l])&&"setAttribute"in v==!!g&&(g?v.localName==g:3==v.nodeType)){e=v,o[l]=null;break}if(null==e){if(null==g)return document.createTextNode(y);e=document.createElementNS(i,g,y.is&&y),s&&(oi.__m&&oi.__m(t,o),s=!1),o=null}if(null==g)m===y||s&&e.data==y||(e.data=y);else{if(o=o&&ii.call(e.childNodes),!s&&null!=o)for(m={},l=0;e.attributes.length>l;l++)m[(v=e.attributes[l]).name]=v.value;for(l in m)if(v=m[l],"children"==l);else if("dangerouslySetInnerHTML"==l)d=v;else if(!(l in y)){if("value"==l&&"defaultValue"in y||"checked"==l&&"defaultChecked"in y)continue;Ni(e,l,null,v,i)}for(l in y)v=y[l],"children"==l?h=v:"dangerouslySetInnerHTML"==l?c=v:"value"==l?f=v:"checked"==l?p=v:s&&"function"!=typeof v||m[l]===v||Ni(e,l,v,m[l],i);if(c)s||d&&(c.__html==d.__html||c.__html==e.innerHTML)||(e.innerHTML=c.__html),t.__k=[];else if(d&&(e.innerHTML=""),Li("template"==t.type?e.content:e,bi(h)?h:[h],t,r,n,"foreignObject"==g?"http://www.w3.org/1999/xhtml":i,o,a,o?o[0]:r.__k&&Ti(r,0),s,u),null!=o)for(l=o.length;l--;)ki(o[l]);s||(l="value","progress"==g&&null==f?e.removeAttribute("value"):null!=f&&(f!==e[l]||"progress"==g&&!f||"option"==g&&f!=m[l])&&Ni(e,l,f,m[l],i),l="checked",null!=p&&p!=e[l]&&Ni(e,l,p,m[l],i))}return e}(r.__e,t,r,n,i,o,a,u,l);return(c=oi.diffed)&&c(t),128&t.__u?void 0:s}function qi(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(qi)}function Di(e,t,r){for(var n=0;r.length>n;n++)ji(r[n],r[++n],r[++n]);oi.__c&&oi.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){oi.__e(e,t.__v)}}))}function Fi(e){return"object"!=typeof e||null==e||e.__b&&e.__b>0?e:bi(e)?e.map(Fi):wi({},e)}function ji(e,t,r){try{if("function"==typeof e){var n="function"==typeof e.__u;n&&e.__u(),n&&null==t||(e.__u=e(t))}else e.current=t}catch(e){oi.__e(e,r)}}function Hi(e,t,r){var n,i;if(oi.unmount&&oi.unmount(e),(n=e.ref)&&(n.current&&n.current!=e.__e||ji(n,null,t)),null!=(n=e.__c)){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(e){oi.__e(e,t)}n.base=n.__P=null}if(n=e.__k)for(i=0;n.length>i;i++)n[i]&&Hi(n[i],t,r||"function"!=typeof e.type);r||ki(e.__e),e.__c=e.__=e.__e=void 0}function Ui(e,t,r){return this.constructor(e,r)}function Bi(e,t,r){var n,i,o;t==document&&(t=document.documentElement),oi.__&&oi.__(e,t),n=t.__k,i=[],o=[],Pi(t,e=t.__k=xi(Ci,null,[e]),n||mi,mi,t.namespaceURI,n?null:t.firstChild?ii.call(t.childNodes):null,i,n?n.__e:t.firstChild,!1,o),Di(i,e,o)}ii=yi.slice,oi={__e(e,t,r,n){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,n||{}),a=i.__d),a)return i.__E=i}catch(t){e=t}throw e}},ai=0,Ii.prototype.setState=function(e,t){var r;r=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=wi({},this.state),"function"==typeof e&&(e=e(wi({},r),this.props)),e&&wi(r,e),null!=e&&this.__v&&(t&&this._sb.push(t),_i(this))},Ii.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),_i(this))},Ii.prototype.render=Ci,si=[],li="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ci=function(e,t){return e.__v.__b-t.__v.__b},$.__r=0,di=/(PointerCapture)$|Capture$/i,hi=0,vi=Ai(!1),fi=Ai(!0),pi=0;var Vi,Wi,zi,Zi,$i=0,Qi=[],Gi=oi,Ji=Gi.__b,Xi=Gi.__r,Yi=Gi.diffed,Ki=Gi.__c,eo=Gi.unmount,to=Gi.__;function ro(e,t){Gi.__h&&Gi.__h(Wi,e,$i||t),$i=0;var r=Wi.__H||(Wi.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function no(e){return $i=1,function(e,t,r){var n=ro(Vi++,2);if(n.t=e,!n.__c&&(n.__=[po(void 0,t),function(e){var t=n.__N?n.__N[0]:n.__[0],r=n.t(t,e);t!==r&&(n.__N=[r,n.__[1]],n.__c.setState({}))}],n.__c=Wi,!Wi.__f)){var i=function(e,t,r){if(!n.__c.__H)return!0;var i=n.__c.__H.__.filter((function(e){return!!e.__c}));if(i.every((function(e){return!e.__N})))return!o||o.call(this,e,t,r);var a=n.__c.props!==e;return i.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}})),o&&o.call(this,e,t,r)||a};Wi.__f=!0;var o=Wi.shouldComponentUpdate,a=Wi.componentWillUpdate;Wi.componentWillUpdate=function(e,t,r){if(this.__e){var n=o;o=void 0,i(e,t,r),o=n}a&&a.call(this,e,t,r)},Wi.shouldComponentUpdate=i}return n.__N||n.__}(po,e)}function io(e,t){var r=ro(Vi++,3);!Gi.__s&&fo(r.__H,t)&&(r.__=e,r.u=t,Wi.__H.__h.push(r))}function oo(e){return $i=5,ao((function(){return{current:e}}),[])}function ao(e,t){var r=ro(Vi++,7);return fo(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function so(e){var t=Wi.context[e.__c],r=ro(Vi++,9);return r.c=e,t?(null==r.__&&(r.__=!0,t.sub(Wi)),t.props.value):e.__}function uo(){for(var e;e=Qi.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ho),e.__H.__h.forEach(vo),e.__H.__h=[]}catch(t){e.__H.__h=[],Gi.__e(t,e.__v)}}Gi.__b=function(e){Wi=null,Ji&&Ji(e)},Gi.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),to&&to(e,t)},Gi.__r=function(e){Xi&&Xi(e),Vi=0;var t=(Wi=e.__c).__H;t&&(zi===Wi?(t.__h=[],Wi.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0}))):(t.__h.forEach(ho),t.__h.forEach(vo),t.__h=[],Vi=0)),zi=Wi},Gi.diffed=function(e){Yi&&Yi(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==Qi.push(t)&&Zi===Gi.requestAnimationFrame||((Zi=Gi.requestAnimationFrame)||co)(uo)),t.__H.__.forEach((function(e){e.u&&(e.__H=e.u),e.u=void 0}))),zi=Wi=null},Gi.__c=function(e,t){t.some((function(e){try{e.__h.forEach(ho),e.__h=e.__h.filter((function(e){return!e.__||vo(e)}))}catch(r){t.some((function(e){e.__h&&(e.__h=[])})),t=[],Gi.__e(r,e.__v)}})),Ki&&Ki(e,t)},Gi.unmount=function(e){eo&&eo(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach((function(e){try{ho(e)}catch(e){t=e}})),r.__H=void 0,t&&Gi.__e(t,r.__v))};var lo="function"==typeof requestAnimationFrame;function co(e){var t,r=function(){clearTimeout(n),lo&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,35);lo&&(t=requestAnimationFrame(r))}function ho(e){var t=Wi,r=e.__c;"function"==typeof r&&(e.__c=void 0,r()),Wi=t}function vo(e){var t=Wi;e.__c=e.__(),Wi=t}function fo(e,t){return!e||e.length!==t.length||t.some((function(t,r){return t!==e[r]}))}function po(e,t){return"function"==typeof t?t(e):t}var mo={Tab:"tab",Selector:"selector"},yo={TopLeft:"top_left",TopRight:"top_right",TopCenter:"top_center",MiddleLeft:"middle_left",MiddleRight:"middle_right",MiddleCenter:"middle_center",Left:"left",Center:"center",Right:"right",NextToTrigger:"next_to_trigger"},go={Top:"top",Left:"left",Right:"right",Bottom:"bottom"},bo={Popover:"popover",API:"api",Widget:"widget",ExternalSurvey:"external_survey"},wo={Open:"open",MultipleChoice:"multiple_choice",SingleChoice:"single_choice",Rating:"rating",Link:"link"},ko={End:"end",ResponseBased:"response_based",SpecificQuestion:"specific_question"},xo="always",So={SHOWN:"survey shown",DISMISSED:"survey dismissed",SENT:"survey sent",ABANDONED:"survey abandoned"},Co={SURVEY_ID:"$survey_id",SURVEY_NAME:"$survey_name",SURVEY_ITERATION:"$survey_iteration",SURVEY_ITERATION_START_DATE:"$survey_iteration_start_date",SURVEY_PARTIALLY_COMPLETED:"$survey_partially_completed",SURVEY_SUBMISSION_ID:"$survey_submission_id",SURVEY_COMPLETED:"$survey_completed",SURVEY_LANGUAGE:"$survey_language"};function Io(e){return"$survey_response_"+e}function To(e,t){if(!t)return null;var r=e[Io(t)];return Xt(r)?[...r]:r}function Mo(e,t){void 0===e&&(e={});var n={};return t.questions.forEach((t=>{if(!er(t.originalQuestionIndex)){var r,i=0===(r=t.originalQuestionIndex)?"$survey_response":"$survey_response_"+r,o=To(e,t.id);er(o)||(n[i]=o)}})),r({$survey_questions:t.questions.map((t=>({id:t.id,question:t.question,response:To(e,t.id)})))},e,n)}function _o(e,t){var r="$survey_"+t+"/"+e.id;return e.current_iteration&&e.current_iteration>0&&(r="$survey_"+t+"/"+e.id+"/"+e.current_iteration),r}function Lo(e){return"string"==typeof e&&e.trim()?e.trim():null}function Oo(e){return e.toLowerCase()}function Eo(e,t,r){if(!e||!t)return null;var n=Oo(t),i=Object.keys(e).find((e=>Oo(e)===n));if(i)return null==r||r.debug("Found exact translation match: "+i),i;if(n.includes("-")){var o=n.split("-")[0],a=Object.keys(e).find((e=>Oo(e)===o));if(a)return null==r||r.debug("Found base language translation match: "+a+" (from "+t+")"),a}return null}function Ro(e,t,n){var i,o=Eo(e.translations,t,n),a=r({},e),s=!1;if(o){var u,l=null==(u=e.translations)?void 0:u[o];l&&(null==n||n.info("Applying survey-level translation for language: "+o),er(l.name)||(a.name=l.name,s=!0),a.appearance?(a.appearance=r({},a.appearance),er(l.thankYouMessageHeader)||(a.appearance.thankYouMessageHeader=l.thankYouMessageHeader,s=!0),er(l.thankYouMessageDescription)||(a.appearance.thankYouMessageDescription=l.thankYouMessageDescription,s=!0),er(l.thankYouMessageCloseButtonText)||(a.appearance.thankYouMessageCloseButtonText=l.thankYouMessageCloseButtonText,s=!0)):function(e){return!er(e.thankYouMessageHeader)||!er(e.thankYouMessageDescription)||!er(e.thankYouMessageCloseButtonText)}(l)&&(s=!0))}var c=e.questions.map((e=>function(e,t,n){var i,o=Eo(e.translations,t,n);if(!o)return{question:e,matchedKey:null,hasChanges:!1};var a=null==(i=e.translations)?void 0:i[o];if(!a)return{question:e,matchedKey:null,hasChanges:!1};var s=r({},e),u=!1;return er(a.question)||(s.question=a.question,u=!0),er(a.description)||(s.description=a.description,u=!0),er(a.buttonText)||(s.buttonText=a.buttonText,u=!0),"link"in s&&!er(a.link)&&(s.link=a.link,u=!0),"lowerBoundLabel"in s&&!er(a.lowerBoundLabel)&&(s.lowerBoundLabel=a.lowerBoundLabel,u=!0),"upperBoundLabel"in s&&!er(a.upperBoundLabel)&&(s.upperBoundLabel=a.upperBoundLabel,u=!0),"choices"in s&&function(e){return Xt(e.choices)}(a)&&(s.choices=a.choices,u=!0),{question:u?s:e,matchedKey:u?o:null,hasChanges:u}}(e,t,n))),d=c.map((e=>e.question)),h=c.some((e=>e.hasChanges)),v=null;return o||(v=(null==(i=c.find((e=>e.matchedKey)))?void 0:i.matchedKey)||null),h&&(a.questions=d,s=!0,null==n||n.info("Applied question-level translations for language: "+t)),{survey:a,matchedKey:s?o||v:null}}var No=on("[Surveys]"),Ao="inProgressSurvey_",Po=(e,t)=>{var r=""+e+t.id;return t.current_iteration&&t.current_iteration>0&&(r=""+e+t.id+"_"+t.current_iteration),r},qo=e=>Po("seenSurvey_",e),Do=e=>{try{var t=qo(e);if(localStorage.getItem(t))return;localStorage.setItem(t,"true")}catch(e){No.error("Failed to persist survey seen state",e)}},Fo=[bo.Popover,bo.Widget,bo.API];Math.trunc||(Math.trunc=function(e){return 0>e?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return ir(e)&&isFinite(e)&&Math.floor(e)===e});class jo{constructor(e){if(this.bytes=e,16!==e.length)throw new TypeError("not 128-bit length")}static fromFieldsV7(e,t,r,n){if(!Number.isInteger(e)||!Number.isInteger(t)||!Number.isInteger(r)||!Number.isInteger(n)||0>e||0>t||0>r||0>n||e>0xffffffffffff||t>4095||r>1073741823||n>4294967295)throw new RangeError("invalid field value");var i=new Uint8Array(16);return i[0]=e/Math.pow(2,40),i[1]=e/Math.pow(2,32),i[2]=e/Math.pow(2,24),i[3]=e/Math.pow(2,16),i[4]=e/Math.pow(2,8),i[5]=e,i[6]=112|t>>>8,i[7]=t,i[8]=128|r>>>24,i[9]=r>>>16,i[10]=r>>>8,i[11]=r,i[12]=n>>>24,i[13]=n>>>16,i[14]=n>>>8,i[15]=n,new jo(i)}toString(){for(var e="",t=0;this.bytes.length>t;t++)e=e+(this.bytes[t]>>>4).toString(16)+(15&this.bytes[t]).toString(16),3!==t&&5!==t&&7!==t&&9!==t||(e+="-");if(36!==e.length)throw new Error("Invalid UUIDv7 was generated");return e}clone(){return new jo(this.bytes.slice(0))}equals(e){return 0===this.compareTo(e)}compareTo(e){for(var t=0;16>t;t++){var r=this.bytes[t]-e.bytes[t];if(0!==r)return Math.sign(r)}return 0}}class Ho{constructor(){this.S=0,this.C=0,this.I=new Vo}generate(){var e=this.generateOrAbort();if(er(e)){this.S=0;var t=this.generateOrAbort();if(er(t))throw new Error("Could not generate UUID after timestamp reset");return t}return e}generateOrAbort(){var e=Date.now();if(e>this.S)this.S=e,this.T();else{if(this.S>=e+1e4)return;this.C++,this.C>4398046511103&&(this.S++,this.T())}return jo.fromFieldsV7(this.S,Math.trunc(this.C/Math.pow(2,30)),this.C&Math.pow(2,30)-1,this.I.nextUint32())}T(){this.C=1024*this.I.nextUint32()+(1023&this.I.nextUint32())}}var Uo,Bo=e=>{if("undefined"!=typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var t=0;e.length>t;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};Gr&&!er(Gr.crypto)&&crypto.getRandomValues&&(Bo=e=>crypto.getRandomValues(e));class Vo{constructor(){this.M=new Uint32Array(8),this.O=1/0}nextUint32(){return this.M.length>this.O||(Bo(this.M),this.O=0),this.M[this.O++]}}var Wo=()=>zo().toString(),zo=()=>(Uo||(Uo=new Ho)).generate(),Zo=function(e,t){if(!function(e){try{new RegExp(e)}catch(e){return!1}return!0}(t))return!1;try{return new RegExp(t).test(e)}catch(e){return!1}},$o={exact:(e,t)=>t.some((t=>e.some((e=>t===e)))),is_not:(e,t)=>t.every((t=>e.every((e=>t!==e)))),regex:(e,t)=>t.some((t=>e.some((e=>Zo(t,e))))),not_regex:(e,t)=>t.every((t=>e.every((e=>!Zo(t,e))))),icontains:(e,t)=>t.map(Qo).some((t=>e.map(Qo).some((e=>t.includes(e))))),not_icontains:(e,t)=>t.map(Qo).every((t=>e.map(Qo).every((e=>!t.includes(e))))),gt:(e,t)=>t.some((t=>{var r=parseFloat(t);return!isNaN(r)&&e.some((e=>r>parseFloat(e)))})),lt:(e,t)=>t.some((t=>{var r=parseFloat(t);return!isNaN(r)&&e.some((e=>r<parseFloat(e)))}))},Qo=e=>e.toLowerCase(),Go=null,Jo={R(){if(!rr(Go))return Go;var e=!0;if(er(Gr))e=!1;else try{var t="__mplssupport__";Jo.N(t,"xyz"),'"xyz"'!==Jo.A(t)&&(e=!1),Jo.q(t)}catch(t){e=!1}return e||nn.error("localStorage unsupported; falling back to cookie store"),Go=e,e},D(e){nn.error("localStorage error: "+e)},A(e){try{return null==Gr?void 0:Gr.localStorage.getItem(e)}catch(e){Jo.D(e)}return null},F(e){try{return JSON.parse(Jo.A(e))||{}}catch(e){}return null},N(e,t){try{null==Gr||Gr.localStorage.setItem(e,JSON.stringify(t))}catch(e){Jo.D(e)}},q(e){try{null==Gr||Gr.localStorage.removeItem(e)}catch(e){Jo.D(e)}}},Xo=on("[Stylesheet Loader]"),Yo=Gr,Ko=Yr,ea="#020617",ta={fontFamily:"inherit",backgroundColor:"#eeeded",submitButtonColor:"black",submitButtonTextColor:"white",ratingButtonColor:"white",ratingButtonActiveColor:"black",borderColor:"#c9c6c6",placeholder:"Start typing...",whiteLabel:!1,displayThankYouMessage:!0,thankYouMessageHeader:"Thank you for your feedback!",position:yo.Right,widgetType:mo.Tab,widgetLabel:"Feedback",widgetColor:"black",zIndex:String(2147483645),disabledButtonOpacity:"0.6",maxWidth:"300px",textSubtleColor:"#939393",boxPadding:"20px 24px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",borderRadius:"10px",shuffleQuestions:!1,surveyPopupDelaySeconds:void 0,outlineColor:"rgba(59, 130, 246, 0.8)",inputBackground:"white",inputTextColor:ea,scrollbarThumbColor:"var(--ph-survey-border-color)",scrollbarTrackColor:"var(--ph-survey-background-color)"},ra=[yo.Center,yo.Left,yo.Right];function na(e){if(e.startsWith("#")){var t=e.replace(/^#/,"");return/^[0-9A-Fa-f]{3}$/.test(t)&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),/^[0-9A-Fa-f]{6}$/.test(t)?"rgb("+parseInt(t.slice(0,2),16)+","+parseInt(t.slice(2,4),16)+","+parseInt(t.slice(4,6),16)+")":"rgb(255, 255, 255)"}return"rgb(255, 255, 255)"}function ia(e){var t;void 0===e&&(e=ta.backgroundColor),"#"===e[0]&&(t=na(e)),e.startsWith("rgb")&&(t=e);var r={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}[e.toLowerCase()];if(r&&(t=na(r)),!t)return ea;var n=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(n){var i=parseInt(n[1]),o=parseInt(n[2]),a=parseInt(n[3]);return Math.sqrt(i*i*.299+o*o*.587+a*a*.114)>127.5?ea:"white"}return ea}var oa=(e,t,n)=>{var i=Ca(e),o=Ko.querySelector("."+i);if(o&&o.shadowRoot)return{shadow:o.shadowRoot,isNewlyCreated:!1};var a=Ko.createElement("div");((e,t,n)=>{var i=r({},ta,n),o=e.style,a=!ra.includes(i.position)||t===bo.Widget&&(null==n?void 0:n.widgetType)===mo.Tab;o.setProperty("--ph-survey-font-family",function(e){if("inherit"===e)return"inherit";var t='BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"';return e?e+", "+t:"-apple-system, "+t}(i.fontFamily)),o.setProperty("--ph-survey-box-padding",i.boxPadding),o.setProperty("--ph-survey-max-width",i.maxWidth),o.setProperty("--ph-survey-z-index",i.zIndex),o.setProperty("--ph-survey-border-color",i.borderColor),a?(o.setProperty("--ph-survey-border-radius",i.borderRadius),o.setProperty("--ph-survey-border-bottom","1.5px solid var(--ph-survey-border-color)")):(o.setProperty("--ph-survey-border-bottom","none"),o.setProperty("--ph-survey-border-radius",i.borderRadius+" "+i.borderRadius+" 0 0")),o.setProperty("--ph-survey-background-color",i.backgroundColor),o.setProperty("--ph-survey-box-shadow",i.boxShadow),o.setProperty("--ph-survey-disabled-button-opacity",i.disabledButtonOpacity),o.setProperty("--ph-survey-submit-button-color",i.submitButtonColor),o.setProperty("--ph-survey-submit-button-text-color",(null==n?void 0:n.submitButtonTextColor)||ia(i.submitButtonColor)),o.setProperty("--ph-survey-rating-bg-color",i.ratingButtonColor),o.setProperty("--ph-survey-rating-active-bg-color",i.ratingButtonActiveColor),o.setProperty("--ph-survey-rating-active-text-color",ia(i.ratingButtonActiveColor)),o.setProperty("--ph-survey-text-primary-color",(null==n?void 0:n.textColor)||ia(i.backgroundColor)),o.setProperty("--ph-survey-text-subtle-color",i.textSubtleColor),o.setProperty("--ph-widget-color",i.widgetColor),o.setProperty("--ph-widget-text-color",ia(i.widgetColor)),o.setProperty("--ph-widget-z-index",i.zIndex);var s=(null==n?void 0:n.inputBackground)||(null==n?void 0:n.inputBackgroundColor),u=s||i.inputBackground;s||"white"!==i.backgroundColor||(u="#f8f8f8"),o.setProperty("--ph-survey-input-background",u);var l=(null==n?void 0:n.inputTextColor)||ia(u);o.setProperty("--ph-survey-input-text-color",l),o.setProperty("--ph-survey-rating-text-color",l),o.setProperty("--ph-survey-scrollbar-thumb-color",i.scrollbarThumbColor),o.setProperty("--ph-survey-scrollbar-track-color",i.scrollbarTrackColor),o.setProperty("--ph-survey-outline-color",i.outlineColor)})(a,e.type,e.appearance),a.className=i;var s=a.attachShadow({mode:"open"}),u=function(e){var t=((e,t,r)=>{var n,i=e.createElement("style");return i.innerText=':host{--ph-survey-font-family:-apple-system,BlinkMacSystemFont,"Inter","Segoe UI","Roboto",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--ph-survey-box-padding:20px 24px;--ph-survey-max-width:300px;--ph-survey-z-index:2147483645;--ph-survey-border-color:#dcdcdc;--ph-survey-border-bottom:1.5px solid var(--ph-survey-border-color);--ph-survey-border-radius:10px;--ph-survey-background-color:#eeeded;--ph-survey-box-shadow:0 4px 12px rgba(0,0,0,.15);--ph-survey-submit-button-color:#000;--ph-survey-submit-button-text-color:#fff;--ph-survey-rating-bg-color:#fff;--ph-survey-rating-text-color:#020617;--ph-survey-rating-active-bg-color:#000;--ph-survey-rating-active-text-color:#fff;--ph-survey-text-primary-color:#020617;--ph-survey-text-subtle-color:#939393;--ph-widget-color:#e0a045;--ph-widget-text-color:#fff;--ph-survey-scrollbar-thumb-color:var(--ph-survey-border-color);--ph-survey-scrollbar-track-color:var(--ph-survey-background-color);--ph-survey-outline-color:rgba(59,130,246,.8);--ph-survey-input-background:#fff;--ph-survey-input-text-color:#020617;--ph-survey-disabled-button-opacity:0.6}.ph-survey{bottom:0;height:fit-content;margin:0;max-width:85%;min-width:300px;position:fixed;width:var(--ph-survey-max-width);z-index:var(--ph-survey-z-index)}.ph-survey h3,.ph-survey p{margin:0}.ph-survey *{box-sizing:border-box;color:var(--ph-survey-text-primary-color);font-family:var(--ph-survey-font-family)}.ph-survey .multiple-choice-options label,.ph-survey input[type=text],.ph-survey textarea{background:var(--ph-survey-input-background);border:1.5px solid var(--ph-survey-border-color);border-radius:4px;color:var(--ph-survey-input-text-color);padding:10px;transition:border-color .2s ease-out,box-shadow .2s ease-out,transform .15s ease-out}.ph-survey input[type=text],.ph-survey textarea{transition:border-color .2s ease-out,box-shadow .2s ease-out,transform .15s ease-out}.ph-survey input{margin:0}.ph-survey .form-submit:focus,.ph-survey .form-submit:focus-visible,.ph-survey input[type=checkbox]:focus,.ph-survey input[type=checkbox]:focus-visible,.ph-survey input[type=radio]:focus,.ph-survey input[type=radio]:focus-visible,.ph-survey input[type=text]:focus,.ph-survey input[type=text]:focus-visible,.ph-survey textarea:focus,.ph-survey textarea:focus-visible{border-color:var(--ph-survey-rating-active-bg-color);outline:1.5px solid var(--ph-survey-outline-color);outline-offset:2px}.ph-survey button:focus:not(:focus-visible),.ph-survey input[type=checkbox]:focus:not(:focus-visible),.ph-survey input[type=radio]:focus:not(:focus-visible),.ph-survey input[type=text]:focus:not(:focus-visible),.ph-survey textarea:focus:not(:focus-visible){outline:none}.ph-survey input[type=text]:hover:not(:focus),.ph-survey textarea:hover:not(:focus){border-color:var(--ph-survey-rating-active-bg-color)}@media (max-width:768px){.ph-survey input[type=text],.ph-survey textarea{font-size:1rem}}.ph-survey .form-cancel,.ph-survey .multiple-choice-options label,.ph-survey .rating-options-number,.ph-survey input[type=checkbox],.ph-survey input[type=radio]{border:1.5px solid var(--ph-survey-border-color)}.ph-survey .footer-branding,.ph-survey .form-cancel,.ph-survey .form-submit,.ph-survey .ratings-emoji,.ph-survey .ratings-number,.ph-survey input[type=checkbox],.ph-survey input[type=radio],.ph-survey label{transition:all .2s ease-out}@media (prefers-reduced-motion:no-preference){.ph-survey button:active,.ph-survey input[type=checkbox]:active,.ph-survey input[type=radio]:active,.ph-survey label:active{transition-duration:.1s}}.ph-survey-widget-tab{background:var(--ph-widget-color);border:none;border-radius:3px 3px 0 0;color:var(--ph-widget-text-color);cursor:pointer;padding:10px 12px;position:fixed;text-align:center;transition:padding .2s ease-out;z-index:var(--ph-survey-z-index)}.ph-survey-widget-tab:hover:not(.widget-tab-top){padding-bottom:16px}.ph-survey-widget-tab.widget-tab-top{border-radius:0 0 3px 3px}.ph-survey-widget-tab.widget-tab-top:hover{padding-top:16px}@keyframes ph-survey-fade-in{0%{opacity:0}to{opacity:1}}.survey-box{gap:16px}.bottom-section,.survey-box{display:flex;flex-direction:column}.bottom-section{gap:8px}.thank-you-message-header~.bottom-section{padding-top:16px}.question-container,.thank-you-message{display:flex;flex-direction:column;gap:8px}.survey-question{font-size:14px;font-weight:500}.survey-question-description{font-size:13px;opacity:.8;padding-top:4px}.survey-question-description,.thank-you-message-body{word-wrap:break-word;overflow-wrap:break-word}:is(.survey-question-description,.thank-you-message-body) embed,:is(.survey-question-description,.thank-you-message-body) iframe,:is(.survey-question-description,.thank-you-message-body) img,:is(.survey-question-description,.thank-you-message-body) object,:is(.survey-question-description,.thank-you-message-body) video{height:auto;max-width:100%}:is(.survey-question-description,.thank-you-message-body) svg{height:auto;max-width:100%}.question-textarea-wrapper{display:flex;flex-direction:column}.survey-form{animation:ph-survey-fade-in .3s ease-out forwards}.survey-form,.thank-you-message{background:var(--ph-survey-background-color);border:1.5px solid var(--ph-survey-border-color);border-bottom:var(--ph-survey-border-bottom);border-radius:var(--ph-survey-border-radius);box-shadow:var(--ph-survey-box-shadow);margin:0;padding:var(--ph-survey-box-padding);position:relative;text-align:left;width:100%;z-index:var(--ph-survey-z-index)}.survey-form input[type=text],.survey-form textarea{min-width:100%}:is(.survey-form textarea):focus,:is(.survey-form textarea):focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.08)}:is(.survey-form textarea):focus:not(:focus-visible){box-shadow:none}.survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) .multiple-choice-options,.survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) textarea{margin-top:0}.multiple-choice-options{border:none;display:flex;flex-direction:column;font-size:14px;gap:8px;margin:0;padding:1px 0}.multiple-choice-options .response-choice,.multiple-choice-options label{align-items:center;color:inherit;display:flex;gap:8px}.multiple-choice-options label{cursor:pointer;font-size:13px}:is(.multiple-choice-options label):hover:not(:has(input:checked)){border-color:var(--ph-survey-text-subtle-color);box-shadow:0 2px 8px rgba(0,0,0,.08)}:is(.multiple-choice-options label):has(input:checked){border-color:var(--ph-survey-rating-active-bg-color);box-shadow:0 1px 4px rgba(0,0,0,.05)}.choice-option-open:is(.multiple-choice-options label){flex-wrap:wrap}:is(.multiple-choice-options label) span{color:inherit}.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]{appearance:none;-webkit-appearance:none;-moz-appearance:none;background:var(--ph-survey-input-background);border-radius:3px;cursor:pointer;flex-shrink:0;height:1rem;position:relative;transition:all .2s cubic-bezier(.4,0,.2,1),transform .15s ease-out;width:1rem;z-index:1}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):focus{transform:scale(1.05)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):hover{border-color:var(--ph-survey-rating-active-bg-color);transform:scale(1.05)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):active{transform:scale(.95)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):checked{background:var(--ph-survey-rating-active-bg-color);border-color:var(--ph-survey-rating-active-bg-color);transform:scale(1)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):checked:hover{transform:scale(1.05)}.multiple-choice-options input[type=checkbox]:checked:after{animation:ph-survey-checkmark-reveal .2s ease-out .1s forwards;border:solid var(--ph-survey-rating-active-text-color);border-width:0 2px 2px 0;height:8px;left:4px;transform:rotate(45deg) scale(0);width:4px}.multiple-choice-options input[type=radio]:checked:after{animation:ph-survey-radio-reveal .15s ease-out .05s forwards;background:var(--ph-survey-rating-active-text-color);border-radius:50%;height:6px;left:5px;top:5px;transform:scale(0);width:6px}.multiple-choice-options input[type=checkbox]:checked:after,.multiple-choice-options input[type=radio]:checked:after{box-sizing:content-box;content:"";position:absolute}.multiple-choice-options input[type=radio]{border-radius:50%}.multiple-choice-options input[type=radio]:checked{border:none}:is(.multiple-choice-options input[type=checkbox]:checked,.multiple-choice-options input[type=radio]:checked)~*{font-weight:700}:is(:is(.multiple-choice-options .choice-option-open) input[type=text])::placeholder{color:var(--ph-survey-text-subtle-color);font-weight:400}.rating-options-emoji{display:flex;justify-content:space-between}.rating-options-emoji-2{justify-content:space-around}.ratings-emoji{background-color:transparent;border:none;font-size:16px;opacity:.5;padding:0}.ratings-emoji:hover{cursor:pointer;opacity:1;transform:scale(1.15)}.ratings-emoji.rating-active{opacity:1}.ratings-emoji svg{fill:var(--ph-survey-text-primary-color);transition:fill .2s ease-out}.rating-options-number{border-radius:6px;display:grid;grid-auto-columns:1fr;grid-auto-flow:column;overflow:hidden}.rating-options-number .ratings-number{border:none;border-right:1px solid var(--ph-survey-border-color);color:var(--ph-survey-rating-text-color);cursor:pointer;font-weight:700;text-align:center}:is(.rating-options-number .ratings-number):last-of-type{border-right:0}.rating-active:is(.rating-options-number .ratings-number){background:var(--ph-survey-rating-active-bg-color);color:var(--ph-survey-rating-active-text-color)}.ratings-number{background-color:var(--ph-survey-rating-bg-color);border:none;padding:8px 0}.ratings-number .rating-active{background-color:var(--ph-survey-rating-active-bg-color)}.ratings-number{cursor:pointer}@media (hover:hover) and (pointer:fine){.ratings-number:hover:not(.rating-active){background-color:color-mix(in srgb,var(--ph-survey-rating-active-bg-color) 14%,var(--ph-survey-rating-bg-color))}}.rating-text{display:flex;flex-direction:row;font-size:11px;justify-content:space-between;opacity:.7}.form-submit{background:var(--ph-survey-submit-button-color);border:none;border-radius:6px;box-shadow:0 2px 0 rgba(0,0,0,.045);color:var(--ph-survey-submit-button-text-color);cursor:pointer;font-weight:700;min-width:100%;padding:12px;text-align:center;user-select:none}.form-submit:not([disabled]):hover{box-shadow:0 4px 8px rgba(0,0,0,.1);transform:scale(1.02)}.form-submit:not([disabled]):active{box-shadow:0 1px 2px rgba(0,0,0,.05);transform:scale(.98)}.form-submit[disabled]{cursor:not-allowed;opacity:var(--ph-survey-disabled-button-opacity)}.validation-hint{font-size:12px;margin-top:4px;opacity:.7}.form-cancel{background:#fff;border-radius:100%;cursor:pointer;line-height:0;padding:12px;position:absolute;right:0;top:0;transform:translate(50%,-50%)}.form-cancel:hover{opacity:.7;transform:translate(50%,-50%) scale(1.1)}.footer-branding{align-items:center;display:flex;font-size:11px;font-weight:500;gap:4px;justify-content:center;opacity:.6;text-decoration:none}.footer-branding:hover{opacity:1}.footer-branding a{text-decoration:none}.thank-you-message{text-align:center}.thank-you-message-header{margin:10px 0 0}.thank-you-message-body{font-size:14px;opacity:.8}.limit-height{max-height:256px;overflow-x:hidden;overflow-y:auto;scrollbar-color:var(--ph-survey-scrollbar-thumb-color) var(--ph-survey-scrollbar-track-color);scrollbar-width:thin}.limit-height::-webkit-scrollbar{width:8px}.limit-height::-webkit-scrollbar-track{background:var(--ph-survey-scrollbar-track-color);border-radius:4px}.limit-height::-webkit-scrollbar-thumb{background-color:var(--ph-survey-scrollbar-thumb-color);border:2px solid var(--ph-survey-scrollbar-track-color);border-radius:4px}:is(.limit-height::-webkit-scrollbar-thumb):hover{background-color:var(--ph-survey-text-subtle-color)}.sr-only{clip:rect(0,0,0,0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}@media (prefers-reduced-motion:reduce){.ph-survey *{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}@keyframes ph-survey-checkmark-reveal{0%{opacity:0;transform:rotate(45deg) scale(0)}50%{opacity:1;transform:rotate(45deg) scale(1.2)}to{opacity:1;transform:rotate(45deg) scale(1)}}@keyframes ph-survey-radio-reveal{0%{opacity:0;transform:scale(0)}50%{opacity:1;transform:scale(1.3)}to{opacity:1;transform:scale(1)}}',null!=r&&null!=(n=r.config)&&n.prepare_external_dependency_stylesheet&&(i=r.config.prepare_external_dependency_stylesheet(i)),i||(Xo.error("prepare_external_dependency_stylesheet returned null"),null)})(Ko,0,e);return null==t||t.setAttribute("data-ph-survey-style","true"),t}(t);if(u){var l=s.querySelector("style");l&&s.removeChild(l),s.appendChild(u)}return Ko.body.appendChild(a),{shadow:s,isNewlyCreated:!0}},aa=e=>{var{responses:t,survey:n,surveySubmissionId:i,posthog:o,isSurveyCompleted:a,properties:s,surveyLanguage:u}=e;o?(Do(n),o.capture(So.SENT,r({[Co.SURVEY_NAME]:n.name,[Co.SURVEY_ID]:n.id,[Co.SURVEY_ITERATION]:n.current_iteration,[Co.SURVEY_ITERATION_START_DATE]:n.current_iteration_start_date,[Co.SURVEY_SUBMISSION_ID]:i,[Co.SURVEY_COMPLETED]:a},u&&{[Co.SURVEY_LANGUAGE]:u},{sessionRecordingUrl:null==o.get_session_replay_url?void 0:o.get_session_replay_url()},Mo(t,n),s,{$set:{[_o(n,"responded")]:!0}})),a&&(Yo.dispatchEvent(new CustomEvent("PHSurveySent",{detail:{surveyId:n.id}})),Sa(n))):No.error("[survey sent] event not captured, PostHog instance not found.")},sa=(e,t,n)=>{return r({[Co.SURVEY_NAME]:e.name,[Co.SURVEY_ID]:e.id,[Co.SURVEY_ITERATION]:e.current_iteration,[Co.SURVEY_ITERATION_START_DATE]:e.current_iteration_start_date,[Co.SURVEY_PARTIALLY_COMPLETED]:(i=null==t?void 0:t.responses,void 0===i&&(i={}),Object.values(i).some((e=>!nr(e))))},(null==t?void 0:t.surveyLanguage)&&{[Co.SURVEY_LANGUAGE]:t.surveyLanguage},{sessionRecordingUrl:null==n.get_session_replay_url?void 0:n.get_session_replay_url(),[Co.SURVEY_SUBMISSION_ID]:null==t?void 0:t.surveySubmissionId},Mo(null==t?void 0:t.responses,e));var i},ua=(e,t,n,i)=>{if(t){if(!n){var o=ka(e);t.capture(So.DISMISSED,r({},sa(e,o,t),i&&{[Co.SURVEY_LANGUAGE]:i},{$set:{[_o(e,"dismissed")]:!0}})),Sa(e),Do(e),Yo.dispatchEvent(new CustomEvent("PHSurveyClosed",{detail:{surveyId:e.id}}))}}else No.error("[survey dismissed] event not captured, PostHog instance not found.")},la=(e,t)=>{if(t){var r=(e=>Po("abandonedSurvey_",e))(e);try{if("true"===localStorage.getItem(r))return}catch(e){return}var n=ka(e);if(n){try{localStorage.setItem(r,"true")}catch(e){}t.capture(So.ABANDONED,sa(e,n,t),{transport:"sendBeacon"})}}else No.error("[survey abandoned] event not captured, PostHog instance not found.")},ca=e=>e.map((e=>({sort:Math.floor(10*Math.random()),value:e}))).sort(((e,t)=>e.sort-t.sort)).map((e=>e.value)),da=(e,t)=>e.length===t.length&&e.every(((e,r)=>e===t[r]))?t.reverse():t,ha=e=>e.appearance&&e.appearance.shuffleQuestions&&!e.enable_partial_responses?da(e.questions,ca(e.questions)):e.questions,va=e=>{var t;return!(null==(t=e.conditions)||null==(t=t.events)||!t.repeatedActivation||!(e=>{var t,r;return null!=(null==(t=e.conditions)||null==(t=t.events)||null==(t=t.values)?void 0:t.length)&&(null==(r=e.conditions)||null==(r=r.events)||null==(r=r.values)?void 0:r.length)>0})(e))||e.schedule===xo||xa(e)},fa=function(e){function t(e){var r,n;return this.getChildContext||(r=new Set,(n={})[t.__c]=this,this.getChildContext=function(){return n},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&r.forEach((function(e){e.__e=!0,_i(e)}))},this.sub=function(e){r.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r&&r.delete(e),t&&t.call(e)}}),e.children}return t.__c="__cC"+pi++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}({isPreviewMode:!1,previewPageIndex:0,onPopupSurveyDismissed(){},isPopup:!0,onPreviewSubmit(){},surveySubmissionId:"",properties:void 0,surveyLanguage:null}),pa=()=>so(fa),ma=e=>{var{component:t,children:r,renderAsHtml:n,style:i}=e;return function(e,t,r){var n,i,o,a,s=wi({},e.props);for(o in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)"key"==o?n=t[o]:"ref"==o?i=t[o]:s[o]=void 0===t[o]&&null!=a?a[o]:t[o];return arguments.length>2&&(s.children=arguments.length>3?ii.call(arguments,2):r),Si(e.type,s,n||e.key,i||e.ref,null)}(t,n?{dangerouslySetInnerHTML:{__html:r},style:i}:{children:r,style:i})};function ya(e){var t,r,n;if(null==(t=e.conditions)||!t.url)return!0;var i=null==Yo||null==(r=Yo.location)?void 0:r.href;if(!i)return!1;var o=[e.conditions.url],a=function(e){return null!=e?e:"icontains"}(null==(n=e.conditions)?void 0:n.urlMatchType);return $o[a](o,[i])}function ga(e){var t,r;return function(e,t){var r,n,i;if(!e||0===e.length)return!0;if(!Kr)return!1;var o,a,s,u,l,c,d=(o={userAgentDataPlatform:null==Xr||null==(r=Xr.userAgentData)?void 0:r.platform,maxTouchPoints:null==Xr?void 0:Xr.maxTouchPoints,screenWidth:null==Gr||null==(n=Gr.screen)?void 0:n.width,screenHeight:null==Gr||null==(i=Gr.screen)?void 0:i.height,devicePixelRatio:null==Gr?void 0:Gr.devicePixelRatio},(c=function(e){return Er.test(e)?wr:Or.test(e)?kr:Lr.test(e)?xr:new RegExp(Ir,"i").test(e)?Ir:new RegExp("("+Sr+"|WPDesktop)","i").test(e)?Sr:/iPad/.test(e)?yr:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?gr:Rr.test(e)?br:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(Cr,"i").test(e)?Cr:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?new RegExp(vr).test(e)&&!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)||/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?fr:mr:new RegExp("(pda|"+vr+")","i").test(e)?Mr:new RegExp(pr,"i").test(e)&&!new RegExp(pr+" pc","i").test(e)?_r:""}(Kr))===yr||c===mr||"Kobo"===c||"Kindle Fire"===c||c===_r?pr:c===wr||c===xr||c===kr||c===Ir?"Console":c===gr?"Wearable":c?vr:"Android"===(null==o?void 0:o.userAgentDataPlatform)&&(null!==(a=null==o?void 0:o.maxTouchPoints)&&void 0!==a?a:0)>0?600>Math.min(null!==(s=null==o?void 0:o.screenWidth)&&void 0!==s?s:0,null!==(u=null==o?void 0:o.screenHeight)&&void 0!==u?u:0)/(null!==(l=null==o?void 0:o.devicePixelRatio)&&void 0!==l?l:1)?vr:pr:"Desktop");return $o[null!=t?t:"icontains"](e,[d])}(null==(t=e.conditions)?void 0:t.deviceTypes,null==(r=e.conditions)?void 0:r.deviceTypesMatchType)}var ba=e=>{var t=""+Ao+e.id;return e.current_iteration&&e.current_iteration>0&&(t=""+Ao+e.id+"_"+e.current_iteration),t},wa=(e,t)=>{try{localStorage.setItem(ba(e),JSON.stringify(t))}catch(e){No.error("Error setting in-progress survey state in localStorage",e)}},ka=e=>{try{var t=localStorage.getItem(ba(e));if(t)return JSON.parse(t)}catch(e){No.error("Error getting in-progress survey state from localStorage",e)}return null},xa=e=>{var t=ka(e);return!nr(null==t?void 0:t.surveySubmissionId)},Sa=e=>{try{localStorage.removeItem(ba(e))}catch(e){No.error("Error clearing in-progress survey state from localStorage",e)}};function Ca(e,t){void 0===t&&(t=!1);var r="PostHogSurvey-"+e.id;return t?"."+r:r}function Ia(e,t,r){if(void 0===t&&(t=yo.Right),e===bo.ExternalSurvey)return{};switch(t){case yo.TopLeft:return{top:"0",left:"0",transform:"translate(30px, 30px)"};case yo.TopRight:return{top:"0",right:"0",transform:"translate(-30px, 30px)"};case yo.TopCenter:return{top:"0",left:"50%",transform:"translate(-50%, 30px)"};case yo.MiddleLeft:return{top:"50%",left:"0",transform:"translate(30px, -50%)"};case yo.MiddleRight:return{top:"50%",right:"0",transform:"translate(-30px, -50%)"};case yo.MiddleCenter:return{top:"50%",left:"50%",transform:"translate(-50%, -50%)"};case yo.Left:return{left:"30px"};case yo.Center:return{left:"50%",transform:"translateX(-50%)"};default:return{right:e===bo.Widget&&r===mo.Tab?"60px":"30px"}}}var Ta=0;function Ma(e,t,r,n,i,o){t||(t={});var a,s,u=t;if("ref"in u)for(s in u={},t)"ref"==s?a=t[s]:u[s]=t[s];var l={type:e,props:u,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Ta,__i:-1,__u:0,__source:i,__self:o};if("function"==typeof e&&(a=e.defaultProps))for(s in a)void 0===u[s]&&(u[s]=a[s]);return oi.vnode&&oi.vnode(l),l}var _a=Ma("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Ma("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"})}),La=Ma("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Ma("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"})}),Oa=Ma("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Ma("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"})}),Ea=Ma("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Ma("path",{d:"M480-417q-67 0-121.5 37.5T278-280h404q-25-63-80-100t-122-37Zm-183-72 50-45 45 45 31-36-45-45 45-45-31-36-45 45-50-45-31 36 45 45-45 45 31 36Zm272 0 44-45 51 45 31-36-45-45 45-45-31-36-51 45-44-45-31 36 44 45-44 45 31 36ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142 0 241-99t99-241q0-142-99-241t-241-99q-142 0-241 99t-99 241q0 142 99 241t241 99Z"})}),Ra=Ma("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Ma("path",{d:"M479.504-261Q537-261 585.5-287q48.5-26 78.5-72.4 6-11.6-.75-22.6-6.75-11-20.25-11H316.918Q303-393 296.5-382t-.5 22.6q30 46.4 78.5 72.4 48.5 26 105.004 26ZM347-578l27 27q7.636 8 17.818 8Q402-543 410-551q8-8 8-18t-8-18l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.636-8 17.818Q276-559 284-551q8 8 18 8t18-8l27-27Zm267 0 27 27q7.714 8 18 8t18-8q8-7.636 8-17.818Q685-579 677-587l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.714-8 18t8 18q7.636 8 17.818 8Q579-543 587-551l27-27ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Na=Ma("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 0 24 24",width:"48",children:Ma("path",{d:"M2 20h2c.55 0 1-.45 1-1v-9c0-.55-.45-1-1-1H2v11zm19.83-7.12c.11-.25.17-.52.17-.8V11c0-1.1-.9-2-2-2h-5.5l.92-4.65c.05-.22.02-.46-.08-.66-.23-.45-.52-.86-.88-1.22L14 2 7.59 8.41C7.21 8.79 7 9.3 7 9.83v7.84C7 18.95 8.05 20 9.34 20h8.11c.7 0 1.36-.37 1.72-.97l2.66-6.15z"})}),Aa=Ma("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 0 24 24",width:"48",children:Ma("path",{d:"M22 4h-2c-.55 0-1 .45-1 1v9c0 .55.45 1 1 1h2V4zM2.17 11.12c-.11.25-.17.52-.17.8V13c0 1.1.9 2 2 2h5.5l-.92 4.65c-.05.22-.02.46.08.66.23.45.52.86.88 1.22L10 22l6.41-6.41c.38-.38.59-.89.59-1.42V6.34C17 5.05 15.95 4 14.66 4H6.55c-.7 0-1.36.37-1.72.97l-2.66 6.15z"})}),Pa=function(e){var{fill:t="currentColor"}=void 0===e?{}:e;return Ma("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:t,xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"close-survey-title-adam",children:[Ma("title",{id:"close-survey-title",className:"adam-testing",children:"Close survey"}),Ma("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:t})]})},qa=Ma("svg",{width:"77",height:"14",viewBox:"0 0 77 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Ma("g",{"clip-path":"url(#clip0_2415_6911)",children:[Ma("mask",{id:"mask0_2415_6911",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"77",height:"14",children:Ma("path",{d:"M0.5 0H76.5V14H0.5V0Z",fill:"white"})}),Ma("g",{mask:"url(#mask0_2415_6911)",children:[Ma("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"}),Ma("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"}),Ma("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"}),Ma("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"}),Ma("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"}),Ma("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"})]})]}),Ma("defs",{children:Ma("clipPath",{id:"clip0_2415_6911",children:Ma("rect",{width:"76",height:"14",fill:"white",transform:"translate(0.5)"})})})]});function Da(e){var{urlParams:t}=e,r=t?Object.entries(t).map((e=>{var[t,r]=e;return encodeURIComponent(t)+"="+encodeURIComponent(r)})).join("&"):"";return Ma("a",{href:"https://posthog.com/surveys"+(r?"?"+r:""),target:"_blank",rel:"noopener",className:"footer-branding",children:["Survey by ",qa]})}function Fa(e){var{text:t,submitDisabled:r,appearance:n,onSubmit:i,link:o,onPreviewSubmit:a,skipSubmitButton:s}=e,{isPreviewMode:u}=so(fa);return Ma("div",{className:"bottom-section",children:[!s&&Ma("button",{className:"form-submit",disabled:r,"aria-label":"Submit survey",type:"button",onClick(){o&&(null==Gr||Gr.open(o)),u?null==a||a():i()},children:t}),!n.whiteLabel&&Ma(Da,{urlParams:{utm_source:"survey-footer"}})]})}function ja(e){var{question:t,forceDisableHtml:r,htmlFor:n}=e;return Ma("div",{class:"question-header",children:[Ma(t.type===wo.Open?"label":"h3",{className:"survey-question",htmlFor:n,children:t.question}),t.description&&ma({component:xi("p",{className:"survey-question-description"}),children:t.description,renderAsHtml:!r&&"text"!==t.descriptionContentType})]})}function Ha(e){var{onClick:t}=e,{isPreviewMode:r}=so(fa);return Ma("button",{className:"form-cancel",onClick:t,disabled:r,"aria-label":"Close survey",type:"button",children:Pa({fill:"black"})})}Ma("svg",{width:"16",height:"12",viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Ma("path",{d:"M5.30769 10.6923L4.77736 11.2226C4.91801 11.3633 5.10878 11.4423 5.30769 11.4423C5.5066 11.4423 5.69737 11.3633 5.83802 11.2226L5.30769 10.6923ZM15.5303 1.53033C15.8232 1.23744 15.8232 0.762563 15.5303 0.46967C15.2374 0.176777 14.7626 0.176777 14.4697 0.46967L15.5303 1.53033ZM1.53033 5.85429C1.23744 5.56139 0.762563 5.56139 0.46967 5.85429C0.176777 6.14718 0.176777 6.62205 0.46967 6.91495L1.53033 5.85429ZM5.83802 11.2226L15.5303 1.53033L14.4697 0.46967L4.77736 10.162L5.83802 11.2226ZM0.46967 6.91495L4.77736 11.2226L5.83802 10.162L1.53033 5.85429L0.46967 6.91495Z",fill:"currentColor"})});var Ua=Gr;function Ba(e){var{header:t,description:r,contentType:n,forceDisableHtml:i,appearance:o,onClose:a}=e,{isPopup:s}=so(fa);return io((()=>{var e=e=>{"Enter"!==e.key&&"Escape"!==e.key||(e.preventDefault(),a())};return ln(Ua,"keydown",e),()=>{Ua.removeEventListener("keydown",e)}}),[a]),Ma("div",{className:"thank-you-message",role:"status",tabIndex:0,"aria-atomic":"true",children:[s&&!0!==o.hideCancelButton&&Ma(Ha,{onClick:()=>a()}),Ma("h3",{className:"thank-you-message-header",children:t}),r&&ma({component:xi("p",{className:"thank-you-message-body"}),children:r,renderAsHtml:!i&&"text"!==n}),s&&Ma(Fa,{text:o.thankYouMessageCloseButtonText||"Close",submitDisabled:!1,appearance:o,onSubmit:()=>a()})]})}var Va=e=>Xt(e)&&e.every((e=>tr(e)));function Wa(e){var{question:t,forceDisableHtml:r,appearance:n,onSubmit:i,onPreviewSubmit:o,displayQuestionIndex:a,initialValue:s}=e,{isPreviewMode:u}=pa(),l=oo(null),[c,d]=no((()=>tr(s)?s:""));io((()=>{setTimeout((()=>{var e;u||null==(e=l.current)||e.focus()}),100)}),[u]);var h="surveyQuestion"+a,v=ao((()=>function(e,t,r){var n,i,o=e.trim();if(!r&&""===o)return"This field is required";if(""===o)return!1;if(t&&t.length>0)for(var a of t)switch(a.type){case zt.MinLength:if(void 0!==a.value&&a.value>o.length)return null!==(n=a.errorMessage)&&void 0!==n?n:"Please enter at least "+a.value+" characters";break;case zt.MaxLength:if(void 0!==a.value&&o.length>a.value)return null!==(i=a.errorMessage)&&void 0!==i?i:"Please enter no more than "+a.value+" characters"}return!1}(c,t.validation,t.optional)),[c,t.validation,t.optional]),f=Nr(t.validation,zt.MinLength),p=Nr(t.validation,zt.MaxLength),m=ao((()=>function(e,t){var r=1===e?void 0:e;return r&&t?"Enter "+r+"-"+t+" characters":r?"Enter at least "+r+" "+(1===r?"character":"characters"):t?"Maximum "+t+" "+(1===t?"character":"characters"):void 0}(f,p)),[f,p]),y=()=>{v||i(c.trim())},g=()=>{v||o(c.trim())};return Ma(Ci,{children:[Ma("div",{className:"question-container",children:[Ma(ja,{question:t,forceDisableHtml:r,htmlFor:h}),Ma("textarea",{ref:l,id:h,rows:4,placeholder:null==n?void 0:n.placeholder,minLength:f,maxLength:p,onInput(e){d(e.currentTarget.value),e.stopPropagation()},onKeyDown(e){e.stopPropagation(),"Enter"!==e.key||!e.metaKey&&!e.ctrlKey||v||(e.preventDefault(),u?g():y())},value:c}),m&&Ma("div",{className:"validation-hint",children:m})]}),Ma(Fa,{text:t.buttonText||"Submit",submitDisabled:!!v,appearance:n,onSubmit:y,onPreviewSubmit:g})]})}function za(e){var{question:t,forceDisableHtml:r,appearance:n,onSubmit:i,onPreviewSubmit:o}=e;return Ma(Ci,{children:[Ma("div",{className:"question-container",children:Ma(ja,{question:t,forceDisableHtml:r})}),Ma(Fa,{text:t.buttonText||"Submit",submitDisabled:!1,link:t.link,appearance:n,onSubmit:()=>i("link clicked"),onPreviewSubmit:()=>o("link clicked")})]})}function Za(e){var t,{question:r,forceDisableHtml:n,displayQuestionIndex:i,appearance:o,onSubmit:a,onPreviewSubmit:s,initialValue:u}=e,l=r.scale,c=10===r.scale?0:1,[d,h]=no((()=>ir(u)?u:Xt(u)&&u.length>0&&ir(parseInt(u[0]))?parseInt(u[0]):tr(u)&&ir(parseInt(u))?parseInt(u):null)),v="emoji"===r.display&&2===r.scale,{isPreviewMode:f}=pa(),p=e=>f?s(e):a(e);return Ma(Ci,{children:[Ma("div",{className:"question-container",children:[Ma(ja,{question:r,forceDisableHtml:n}),Ma("div",{className:"rating-section",children:[Ma("div",{className:"rating-options",children:["emoji"===r.display&&Ma("div",{className:"rating-options-emoji"+(v?" rating-options-emoji-2":""),children:null==(t=Ya[r.scale])?void 0:t.map(((e,t)=>Ma("button",{"aria-label":"Rate "+(t+1),className:"ratings-emoji question-"+i+"-rating-"+t+" "+(t+1===d?"rating-active":""),value:t+1,type:"button",onClick(){var e=t+1;h(e),r.skipSubmitButton&&p(e)},children:e},t)))}),"number"===r.display&&Ma("div",{className:"rating-options-number",style:{gridTemplateColumns:"repeat("+(l-c+1)+", minmax(0, 1fr))"},children:Ka(r.scale).map(((e,t)=>Ma($a,{displayQuestionIndex:i,active:d===e,appearance:o,num:e,setActiveNumber(e){h(e),r.skipSubmitButton&&p(e)}},t)))})]}),!v&&Ma("div",{className:"rating-text",children:[Ma("div",{children:r.lowerBoundLabel}),Ma("div",{children:r.upperBoundLabel})]})]})]}),Ma(Fa,{text:r.buttonText||(null==o?void 0:o.submitButtonText)||"Submit",submitDisabled:rr(d)&&!r.optional,appearance:o,onSubmit:()=>a(d),onPreviewSubmit:()=>s(d),skipSubmitButton:r.skipSubmitButton})]})}function $a(e){var{num:t,active:r,displayQuestionIndex:n,setActiveNumber:i}=e;return Ma("button",{"aria-label":"Rate "+t,className:"ratings-number question-"+n+"-rating-"+t+" "+(r?"rating-active":""),type:"button",onClick(){i(t)},children:t})}function Qa(e){var{question:t,forceDisableHtml:n,displayQuestionIndex:i,appearance:o,onSubmit:a,onPreviewSubmit:s,initialValue:u}=e,l=oo(null),c=ao((()=>(e=>{if(!e.shuffleOptions)return e.choices;var t=e.choices,r="";e.hasOpenChoice&&(r=t.pop());var n=da(t,ca(t));return e.hasOpenChoice&&(e.choices.push(r),n.push(r)),n})(t)),[t]),[d,h]=no((()=>((e,t)=>tr(e)||Va(e)?e:t===wo.SingleChoice?null:[])(u,t.type))),[v,f]=no((()=>((e,t)=>{if(tr(e)&&!t.includes(e))return{isSelected:!0,inputValue:e};if(Va(e)){var r=e.find((e=>!t.includes(e)));if(r)return{isSelected:!0,inputValue:r}}return{isSelected:!1,inputValue:""}})(u,c))),{isPreviewMode:p}=pa(),m=t.type===wo.SingleChoice,y=t.type===wo.MultipleChoice,g=t.skipSubmitButton&&m&&!t.hasOpenChoice,b=(e,t)=>{if(t){var n=!v.isSelected;return f((e=>r({},e,{isSelected:n,inputValue:n?e.inputValue:""}))),m&&h(""),void(n&&setTimeout((()=>{var e;return null==(e=l.current)?void 0:e.focus()}),75))}if(m)return h(e),f((e=>r({},e,{isSelected:!1,inputValue:""}))),void(g&&(a(e),p&&s(e)));y&&Xt(d)&&(d.includes(e)?h(d.filter((t=>t!==e))):h([...d,e]))},w=e=>{e.stopPropagation();var t=e.currentTarget.value;f((e=>r({},e,{inputValue:t}))),m&&h(t)},k=e=>{e.stopPropagation(),"Enter"!==e.key||x()||(e.preventDefault(),S()),"Escape"===e.key&&(e.preventDefault(),f((e=>r({},e,{isSelected:!1,inputValue:""}))),m&&h(null))},x=()=>!(t.optional||!rr(d)&&(!Xt(d)||v.isSelected||0!==d.length)&&(!v.isSelected||""!==v.inputValue.trim())),S=()=>{v.isSelected&&y?Xt(d)&&(p?s([...d,v.inputValue]):a([...d,v.inputValue])):p?s(d):a(d)};return Ma(Ci,{children:[Ma("div",{className:"question-container",children:[Ma(ja,{question:t,forceDisableHtml:n}),Ma("fieldset",{className:"multiple-choice-options limit-height",children:[Ma("legend",{className:"sr-only",children:y?" Select all that apply":" Select one"}),c.map(((e,r)=>{var n=!!t.hasOpenChoice&&r===t.choices.length-1,o="surveyQuestion"+i+"Choice"+r,a=o+"Open",s=n?v.isSelected:m?d===e:Xt(d)&&d.includes(e);return Ma("label",{className:n?"choice-option-open":"",children:[Ma("div",{className:"response-choice",children:[Ma("input",{type:m?"radio":"checkbox",name:o,checked:s,onChange:()=>b(e,n),id:o,"aria-controls":a}),Ma("span",{children:n?e+":":e})]}),n&&Ma("input",{type:"text",ref:l,id:a,name:"question"+i+"Open",value:v.inputValue,onKeyDown:k,onInput:w,onClick(t){v.isSelected||b(e,!0),t.stopPropagation()},"aria-label":e+" - please specify"})]},r)}))]})]}),Ma(Fa,{text:t.buttonText||"Submit",submitDisabled:x(),appearance:o,onSubmit:S,onPreviewSubmit:S,skipSubmitButton:g})]})}var Ga=[1,2,3,4,5],Ja=[1,2,3,4,5,6,7],Xa=[0,1,2,3,4,5,6,7,8,9,10],Ya={2:[Na,Aa],3:[Oa,La,_a],5:[Ea,Oa,La,_a,Ra]};function Ka(e){switch(e){case 5:default:return Ga;case 7:return Ja;case 10:return Xa}}var es=on("[Surveys]");function ts(e,t,r){var n,i=e.questions[t],o=t+1;if(null==(n=i.branching)||!n.type)return t===e.questions.length-1?ko.End:o;if(i.branching.type===ko.End)return ko.End;if(i.branching.type===ko.SpecificQuestion){if(Number.isInteger(i.branching.index))return i.branching.index}else if(i.branching.type===ko.ResponseBased){if(i.type===wo.SingleChoice){var a,s=i.choices.indexOf(""+r);if(-1===s&&i.hasOpenChoice&&(s=i.choices.length-1),null!=(a=i.branching)&&null!=(a=a.responseValues)&&a.hasOwnProperty(s)){var u=i.branching.responseValues[s];return Number.isInteger(u)?u:u===ko.End?ko.End:o}}else if(i.type===wo.Rating){var l;if("number"!=typeof r||!Number.isInteger(r))throw new Error("The response type must be an integer");var c=function(e,t){if(2===t){if(1>e||e>2)throw new Error("The response must be in range 1-2");return 1===e?"positive":"negative"}if(3===t){if(1>e||e>3)throw new Error("The response must be in range 1-3");return 1===e?"negative":2===e?"neutral":"positive"}if(5===t){if(1>e||e>5)throw new Error("The response must be in range 1-5");return e>2?3===e?"neutral":"positive":"negative"}if(7===t){if(1>e||e>7)throw new Error("The response must be in range 1-7");return e>3?4===e?"neutral":"positive":"negative"}if(10===t){if(0>e||e>10)throw new Error("The response must be in range 0-10");return e>6?e>8?"promoters":"passives":"detractors"}throw new Error("The scale must be one of: 2, 3, 5, 7, 10")}(r,i.scale);if(null!=(l=i.branching)&&null!=(l=l.responseValues)&&l.hasOwnProperty(c)){var d=i.branching.responseValues[c];return Number.isInteger(d)?d:d===ko.End?ko.End:o}}return o}return es.warn("Falling back to next question index due to unexpected branching type"),o}var rs=on("[SurveyTranslations]");function ns(e,t){var r=function(e){return function(e,t){var{overrideLanguage:r,storedPersonProperties:n,locale:i}=e,o=Lo(r);if(o)return null==t||t.info("Using override display language: "+o),o;var a=function(e){return e&&"object"==typeof e&&"language"in e?Lo(e.language):null}(n);if(a)return null==t||t.info("Using person property language: "+a),a;var s=Lo(i);return s?(null==t||t.info("Using detected locale: "+s),s):(null==t||t.info("No user language detected"),null)}({overrideLanguage:e.config.override_display_language,storedPersonProperties:Yt(e.get_property)?e.get_property("$stored_person_properties"):void 0,locale:navigator.language||navigator.userLanguage},rs)}(t);if(!r)return rs.info("No user language detected"),{survey:e,language:null};var n=Ro(e,r,rs);return{survey:n.survey,language:n.matchedKey}}var is=Gr,os=Yr,as="ph:show_survey_widget",ss="PHWidgetSurveyClickListener";function us(e,t){try{var r=e.getBoundingClientRect(),n=is.innerHeight,i=is.innerWidth,o=r.left+r.width/2-t/2;o+t>i-20&&(o=i-t-20),20>o&&(o=20);var a=n-r.bottom,s=250>a&&r.top>a;return{position:"fixed",top:s?"auto":r.bottom+12+"px",left:o+"px",right:"auto",bottom:s?n-r.top+12+"px":"auto",zIndex:ta.zIndex}}catch(e){return No.warn("Failed to calculate trigger position:",e),null}}class ls{constructor(e){var t=this;this.j=new Map,this.H=new Map,this.U=new Set,this.handlePageUnload=()=>{var e=this._posthog.get_property("$surveys");if(e)for(var t of e)xa(t)&&la(t,this._posthog)},this.handlePopoverSurvey=(e,t)=>{var n,i,o,a,{survey:s,language:u}=this.B(e),l=null!=t&&t.position||null!=t&&t.selector?r({},s,{appearance:r({},s.appearance,t.position&&{position:t.position},t.selector&&{widgetSelector:t.selector})}):s;this.V(l.id);var{properties:c,initialResponses:d}=null!=t?t:{},h=!(!d||0>=Object.keys(d).length)&&this.W(l,d,c,u);if(!h||null!=(n=l.appearance)&&n.displayThankYouMessage){this.Z(l);var v={};if((null==(i=l.appearance)?void 0:i.position)===yo.NextToTrigger&&null!=(o=l.appearance)&&o.widgetSelector){var f,p=os.querySelector(l.appearance.widgetSelector);p&&(v=us(p,parseInt((null==(f=l.appearance)?void 0:f.maxWidth)||ta.maxWidth))||{})}var m=(null==(a=l.appearance)?void 0:a.surveyPopupDelaySeconds)||0,{shadow:y}=oa(l,this._posthog),g={posthog:this._posthog,survey:l,removeSurveyFromFocus:this.$,properties:c,style:v,isSurveyCompleted:h,skipShownEvent:null==t?void 0:t.skipShownEvent,surveyLanguage:u};if(0>=m)return Bi(Ma(vs,r({},g)),y);var b=setTimeout((()=>{if(this.j.delete(l.id),!ya(l))return this.$(l);Bi(Ma(vs,r({},g,{survey:r({},l,{appearance:r({},l.appearance,{surveyPopupDelaySeconds:0})})})),y)}),1e3*m);this.j.set(l.id,b)}},this.G=e=>{var{survey:t,language:r}=this.B(e),{shadow:n,isNewlyCreated:i}=oa(t,this._posthog);i&&Bi(Ma(ps,{posthog:this._posthog,survey:t,surveyLanguage:r},e.id),n)},this.J=e=>{this.X(e);var t=this.H.get(e.id);t&&(t.element.removeEventListener("click",t.listener),t.element.removeAttribute(ss),this.H.delete(e.id),No.info("Removed click listener for survey "+e.id))},this.Y=(e,t)=>{var r=os.querySelector(t),n=this.H.get(e.id);if(r){if(this.G(e),n){if(r===n.element)return;No.info("Selector element changed for survey "+e.id+". Re-attaching listener."),this.J(e)}if(!r.hasAttribute(ss)){var i=t=>{var r,n;t.stopPropagation();var i=(null==(r=e.appearance)?void 0:r.position)===yo.NextToTrigger?us(t.currentTarget,parseInt((null==(n=e.appearance)?void 0:n.maxWidth)||ta.maxWidth)):{};is.dispatchEvent(new CustomEvent(as,{detail:{surveyId:e.id,position:i}}))};ln(r,"click",i),r.setAttribute(ss,"true"),this.H.set(e.id,{element:r,listener:i,survey:e}),No.info("Attached click listener for feedback button survey "+e.id)}}else n&&this.J(e)},this.renderPopover=e=>{var{survey:t,language:r}=this.B(e),{shadow:n}=oa(t,this._posthog);Bi(Ma(vs,{posthog:this._posthog,survey:t,removeSurveyFromFocus:this.$,surveyLanguage:r}),n)},this.renderSurvey=(e,t,r)=>{var n,{survey:i,language:o}=this.B(e),a=!1;null!=(n=this._posthog.config)&&null!=(n=n.surveys)&&n.prefillFromUrl&&(a=this.K(i,o)),Bi(Ma(vs,{posthog:this._posthog,survey:i,removeSurveyFromFocus:this.$,isPopup:!1,properties:r,isSurveyCompleted:a,surveyLanguage:o}),t)},this.getActiveMatchingSurveys=function(e,r){var n;void 0===r&&(r=!1),null==(n=t._posthog)||null==(n=n.surveys)||n.getSurveys((r=>{var n=r.filter((e=>t.checkSurveyEligibility(e).eligible&&t.ee(e)&&t.te(e)&&t.re(e)));e(n)}),r)},this.callSurveysAndEvaluateDisplayLogic=function(e){void 0===e&&(e=!1),t.getActiveMatchingSurveys((e=>{var r=e.filter((e=>e.type===bo.Popover||e.type===bo.Widget)),n=t.ne(r),i=new Set;n.forEach((e=>{if(e.type===bo.Widget){var r,n,o,a;if((null==(r=e.appearance)?void 0:r.widgetType)===mo.Tab)return void t.G(e);(null==(n=e.appearance)?void 0:n.widgetType)===mo.Selector&&null!=(o=e.appearance)&&o.widgetSelector&&(i.add(e.id),t.Y(e,null==(a=e.appearance)?void 0:a.widgetSelector))}rr(t.ie)&&e.type===bo.Popover&&t.handlePopoverSurvey(e)})),t.H.forEach((e=>{var{survey:r}=e;i.has(r.id)||t.J(r)}))}),e)},this.Z=e=>{rr(this.ie)||No.error("Survey "+this.ie+" already in focus. Cannot add survey "+e.id+"."),this.ie=e.id},this.$=e=>{this.ie!==e.id&&No.error("Survey "+e.id+" is not in focus. Cannot remove survey "+e.id+"."),this.V(e.id),this.ie=null,this.X(e)},this._posthog=e,this.ie=null}V(e){var t=this.j.get(e);t&&(clearTimeout(t),this.j.delete(e))}cancelSurvey(e){this.j.has(e)&&(No.info("Cancelled pending survey "+e),this.V(e),this.ie===e&&(this.ie=null))}ne(e){return e.sort(((e,t)=>{var r,n,i=xa(e),o=xa(t);if(i&&!o)return-1;if(!i&&o)return 1;var a=e.schedule===xo,s=t.schedule===xo;return a&&!s?1:!a&&s?-1:((null==(r=e.appearance)?void 0:r.surveyPopupDelaySeconds)||0)-((null==(n=t.appearance)?void 0:n.surveyPopupDelaySeconds)||0)}))}B(e){return ns(e,this._posthog)}K(e,t){if(this.U.has(e.id))return!1;var{params:r}=function(e){var t={},r=!1,n=e.replace(/^\?/,"");if(!n)return{params:t,autoSubmit:r};var i=n.split("&");for(var o of i){var[a,s]=o.split("=");if(a&&!er(s)){var u=decodeURIComponent(a),l=decodeURIComponent(s);if("auto_submit"!==u||"true"!==l){var c=u.match(/^q(\d+)$/);if(c){var d=parseInt(c[1],10);t[d]||(t[d]=[]),t[d].push(l)}}else r=!0}}return{params:t,autoSubmit:r}}(is.location.search);if(0===Object.keys(r).length)return!1;No.info("[Survey Prefill] Detected URL prefill parameters");var n=this.oe(e,r,t);if(!n)return!1;var{responses:i,submissionId:o,isSurveyCompleted:a,skippedResponses:s}=n;return(Object.keys(s).length>0&&e.enable_partial_responses||a)&&aa({responses:a?i:s,survey:e,surveySubmissionId:o,posthog:this._posthog,isSurveyCompleted:a,surveyLanguage:t}),this.U.add(e.id),a}W(e,t,r,n){var i={};for(var[o,a]of Object.entries(t))i[parseInt(o)]=Xt(a)?a.map(String):[String(a)];No.info("[Survey] Processing initial responses");var s=this.oe(e,i,n);if(!s)return!1;var{responses:u,submissionId:l,isSurveyCompleted:c}=s;return aa({responses:u,survey:e,surveySubmissionId:l,posthog:this._posthog,isSurveyCompleted:c,properties:r,surveyLanguage:n}),c}oe(e,t,r){try{var n=function(e,t){var r={};return e.questions.forEach(((e,n)=>{if(t[n]&&e.id){var i=t[n],o=Io(e.id);try{switch(e.type){case wo.SingleChoice:if(!e.choices||0===e.choices.length)return void nn.warn("[Survey Prefill] Question "+n+" has no choices");var a=parseInt(i[0],10);if(isNaN(a)||0>a||a>=e.choices.length)return void nn.warn("[Survey Prefill] Invalid choice index for q"+n+": "+i[0]);r[o]=e.choices[a];break;case wo.MultipleChoice:if(!e.choices||0===e.choices.length)return void nn.warn("[Survey Prefill] Question "+n+" has no choices");var s=i.map((e=>parseInt(e,10))).filter((t=>!isNaN(t)&&t>=0&&e.choices.length>t));if(0===s.length)return void nn.warn("[Survey Prefill] No valid choices for q"+n);var u=[...new Set(s.map((t=>e.choices[t])))];s.length>u.length&&nn.warn("[Survey Prefill] Removed duplicate choices for q"+n),r[o]=u;break;case wo.Rating:var l=parseInt(i[0],10),c=e.scale||10;if(isNaN(l)||0>l||l>c)return void nn.warn("[Survey Prefill] Invalid rating for q"+n+": "+i[0]+" (scale: 0-"+c+")");r[o]=l;break;default:nn.info("[Survey Prefill] Question type "+e.type+" does not support prefill")}}catch(e){nn.error("[Survey Prefill] Error converting q"+n+":",e)}}})),r}(e,t);if(0===Object.keys(n).length)return No.warn("[Survey Prefill] No valid responses after conversion"),null;var i=Wo(),o=Object.keys(t).map((e=>parseInt(e,10))),{startQuestionIndex:a,skippedResponses:s}=function(e,t,r){for(var n=0,i={},o=e.questions.length+1;e.questions.length>n&&o>0&&t.includes(n);){var a=e.questions[n];if(!a||!("skipSubmitButton"in a)||!a.skipSubmitButton)break;if(a.id){var s=Io(a.id);er(r[s])||(i[s]=r[s])}var u=ts(e,n,a.id?r[Io(a.id)]:null);if(u===ko.End)return{startQuestionIndex:e.questions.length,skippedResponses:i};n=u}return{startQuestionIndex:n,skippedResponses:i}}(e,o,n),u=a>=e.questions.length;return wa(e,{surveySubmissionId:i,responses:n,lastQuestionIndex:a,surveyLanguage:r}),No.info("[Survey Prefill] Stored prefilled responses in localStorage"),{responses:n,submissionId:i,startQuestionIndex:a,isSurveyCompleted:u,skippedResponses:s}}catch(e){return No.error("[Survey Prefill] Error handling prefill:",e),null}}ae(e,t){var r;if(void 0===t&&(t=void 0),!e)return!0;var n,i=!(null==(r=this._posthog.featureFlags)||!r.isFeatureEnabled(e,{send_event:!e.startsWith("survey-targeting-")})),o=!0;return t&&(o=(null==(n=this._posthog.featureFlags)?void 0:n.getFeatureFlag(e,{send_event:!1}))===t||"any"===t),i&&o}ee(e){return!e.conditions||ya(e)&&ga(e)&&function(e){var t;return null==(t=e.conditions)||!t.selector||!(null==Ko||!Ko.querySelector(e.conditions.selector))}(e)}se(e){return va(e)||this.ae(e.internal_targeting_flag_key)||xa(e)}checkSurveyEligibility(e){var t,r,n={eligible:!0,reason:void 0};if(!function(e){return!(!e.start_date||e.end_date)}(e))return n.eligible=!1,n.reason="Survey is not running. It was completed on "+e.end_date,n;if(!Fo.includes(e.type))return n.eligible=!1,n.reason="Surveys of type "+e.type+" are never eligible to be shown in the app",n;var i=null==(t=e.conditions)?void 0:t.linkedFlagVariant;return this.ae(e.linked_flag_key,i)?this.ae(e.targeting_flag_key)?this.se(e)?function(e,t){if(!e||!t)return!0;var r="string"==typeof t?new Date(t):t,n=new Date,i=Math.abs(n.getTime()-r.getTime());return Math.ceil(i/864e5)>e}(null==(r=e.conditions)?void 0:r.seenSurveyWaitPeriodInDays,Jo.A("lastSeenSurveyDate"))?(e=>!!Jo.A(qo(e))&&!va(e))(e)?(n.eligible=!1,n.reason="Survey has already been seen and it can't be activated again",n):n:(n.eligible=!1,n.reason="Survey wait period has not passed",n):(n.eligible=!1,n.reason="Survey internal targeting flag is not enabled and survey cannot activate repeatedly and survey is not in progress",n):(n.eligible=!1,n.reason="Survey targeting feature flag is not enabled",n):(n.eligible=!1,n.reason=i?"Survey linked feature flag is not enabled for variant "+i:"Survey linked feature flag is not enabled",n)}te(e){var t;if(!function(e){var t;return!(null==(t=e.conditions)||null==(t=t.events)||null==(t=t.values)||!t.length)}(e)&&!function(e){var t;return!(null==(t=e.conditions)||null==(t=t.actions)||null==(t=t.values)||!t.length)}(e))return!0;var r=null==(t=this._posthog.surveys)||null==(t=t._surveyEventReceiver)?void 0:t.getSurveys();return!(null==r||!r.includes(e.id))}re(e){var t;return null==(t=e.feature_flag_keys)||!t.length||e.feature_flag_keys.every((e=>{var{key:t,value:r}=e;return!t||!r||this.ae(r)}))}X(e){try{var t=os.querySelector(Ca(e,!0));null!=t&&t.shadowRoot&&Bi(null,t.shadowRoot),null==t||t.remove()}catch(t){No.warn("Failed to remove survey "+e.id+" from DOM:",t)}}getTestAPI(){return{addSurveyToFocus:this.Z,removeSurveyFromFocus:this.$,surveyInFocus:this.ie,surveyTimeouts:this.j,handleWidget:this.G,handlePopoverSurvey:this.handlePopoverSurvey,manageWidgetSelectorListener:this.Y,sortSurveysByAppearanceDelay:this.ne,checkFlags:this.re.bind(this),isSurveyFeatureFlagEnabled:this.ae.bind(this)}}}function cs(e,t){if(os&&is){var r,n=new ls(e);if(e.config.disable_surveys_automatic_display)return No.info("Surveys automatic display is disabled. Skipping call surveys and evaluate display logic."),n;if(!1===t)return No.info("There are no surveys to load or Surveys is disabled in the project settings."),n;n.callSurveysAndEvaluateDisplayLogic(!0);var i=()=>{er(r)&&(r=setInterval((()=>{n.callSurveysAndEvaluateDisplayLogic(!1)}),1e3))};return i(),ln(os,"visibilitychange",(()=>{os.hidden?er(r)||(clearInterval(r),r=void 0):(n.callSurveysAndEvaluateDisplayLogic(!1),i())})),n}}function ds(e){var{survey:t,removeSurveyFromFocus:r=(()=>{}),setSurveyVisible:n,isPreviewMode:i=!1}=e;io((()=>{var e;if(!i&&null!=(e=t.conditions)&&e.url){var o=()=>{var e,i=t.type===bo.Widget,o=ya(t),a=(null==(e=t.appearance)?void 0:e.widgetType)===mo.Tab&&i;if(!o)return No.info("Hiding survey "+t.id+" because URL does not match"),n(!1),r(t);a&&(No.info("Showing survey "+t.id+" because it is a feedback button tab and URL matches"),n(!0))};ln(is,"popstate",o),ln(is,"hashchange",o);var a=is.history.pushState,s=is.history.replaceState;return is.history.pushState=function(){for(var e=arguments.length,t=new Array(e),r=0;e>r;r++)t[r]=arguments[r];a.apply(this,t),o()},is.history.replaceState=function(){for(var e=arguments.length,t=new Array(e),r=0;e>r;r++)t[r]=arguments[r];s.apply(this,t),o()},()=>{is.removeEventListener("popstate",o),is.removeEventListener("hashchange",o),is.history.pushState=a,is.history.replaceState=s}}}),[i,t,r,n])}function hs(e){switch(void 0===e&&(e=go.Right),e){case go.Top:return{top:"0",left:"50%",transform:"translateX(-50%)"};case go.Left:return{top:"50%",left:"0",transform:"rotate(90deg) translateY(-100%)",transformOrigin:"left top"};case go.Bottom:return{bottom:"0",left:"50%",transform:"translateX(-50%)"};default:return{top:"50%",right:"0",transform:"rotate(-90deg) translateY(-100%)",transformOrigin:"right top"}}}function vs(e){var t,n,i,o,a,s,{survey:u,forceDisableHtml:l,posthog:c,style:d={},previewPageIndex:h,removeSurveyFromFocus:v=(()=>{}),isPopup:f=!0,onPreviewSubmit:p=(()=>{}),onPopupSurveyDismissed:m=(()=>{}),onCloseConfirmationMessage:y=(()=>{}),properties:g,isSurveyCompleted:b,skipShownEvent:w,surveyLanguage:k}=e,x=oo(null),S=Number.isInteger(h),C=null!=(t=u.appearance)&&t.surveyPopupDelaySeconds?1e3*u.appearance.surveyPopupDelaySeconds:0,{isPopupVisible:I,isSurveySent:T,hidePopupWithViewTransition:M}=function(e,t,n,i,o,a,s,u,l){var[c,d]=no(i||0===n||e.type===bo.ExternalSurvey),[h,v]=no(!1),f=()=>{var t=()=>{a&&o(e),d(!1)};os.startViewTransition?os.startViewTransition((()=>{var e;null==s||null==(e=s.current)||e.remove()})).finished.then((()=>{setTimeout((()=>{t()}),100)})):t()},p=t=>{t.detail.surveyId===e.id&&f()};return io((()=>{if(t){if(!i){var o=t=>{var r,n;if(t.detail.surveyId===e.id){if(null==(r=e.appearance)||!r.displayThankYouMessage)return f();v(!0),null!=(n=e.appearance)&&n.autoDisappear&&setTimeout((()=>{f()}),5e3)}},a=()=>{ya(e)&&(d(!0),is.dispatchEvent(new Event("PHSurveyShown")),u||t.capture(So.SHOWN,r({[Co.SURVEY_NAME]:e.name,[Co.SURVEY_ID]:e.id,[Co.SURVEY_ITERATION]:e.current_iteration,[Co.SURVEY_ITERATION_START_DATE]:e.current_iteration_start_date},l&&{[Co.SURVEY_LANGUAGE]:l},{sessionRecordingUrl:null==t.get_session_replay_url?void 0:t.get_session_replay_url()})),localStorage.setItem("lastSeenSurveyDate",(new Date).toISOString()))};if(ln(is,"PHSurveyClosed",p),ln(is,"PHSurveySent",o),n>0){var s=setTimeout(a,n);return()=>{clearTimeout(s),is.removeEventListener("PHSurveyClosed",p),is.removeEventListener("PHSurveySent",o)}}return a(),()=>{is.removeEventListener("PHSurveyClosed",p),is.removeEventListener("PHSurveySent",o)}}}else No.error("usePopupVisibility hook called without a PostHog instance.")}),[]),ds({survey:e,removeSurveyFromFocus:o,setSurveyVisible:d,isPreviewMode:i}),{isPopupVisible:c,isSurveySent:h,setIsPopupVisible:d,hidePopupWithViewTransition:f}}(u,c,C,S,v,f,x,w,k),_=T||h===u.questions.length||!0===b,L=ao((()=>{var e=ka(u),t=(null==e?void 0:e.surveySubmissionId)||Wo();return{isPreviewMode:S,previewPageIndex:h,onPopupSurveyDismissed(){k?ua(u,c,S,k):ua(u,c,S),m()},isPopup:f||!1,surveySubmissionId:t,onPreviewSubmit:p,posthog:c,properties:g,surveyLanguage:k}}),[S,h,f,c,u,m,p,g,k]);return I?Ma(fa.Provider,{value:L,children:Ma("div",{className:"ph-survey",style:r({},Ia(u.type,null==(n=u.appearance)?void 0:n.position,null==(i=u.appearance)?void 0:i.widgetType),d),ref:x,children:_?Ma(Ba,{header:(null==(o=u.appearance)?void 0:o.thankYouMessageHeader)||"Thank you!",description:(null==(a=u.appearance)?void 0:a.thankYouMessageDescription)||"",forceDisableHtml:!!l,contentType:null==(s=u.appearance)?void 0:s.thankYouMessageDescriptionContentType,appearance:u.appearance||ta,onClose(){M(),y()}}):Ma(fs,{survey:u,forceDisableHtml:!!l,posthog:c})})}):null}function fs(e){var t,{survey:n,forceDisableHtml:i,posthog:o}=e,[a,s]=no((()=>{var e=ka(n);return null!=e&&e.responses&&No.info("Survey is already in progress, filling in initial responses"),(null==e?void 0:e.responses)||{}})),{previewPageIndex:u,onPopupSurveyDismissed:l,isPopup:c,onPreviewSubmit:d,surveySubmissionId:h,isPreviewMode:v,properties:f,surveyLanguage:p}=so(fa),[m,y]=no((()=>{var e=ka(n);return u||(null==e?void 0:e.lastQuestionIndex)||0})),g=ao((()=>ha(n)),[n]);io((()=>{v&&!er(u)&&y(u)}),[u,v]);var b=g.at(m);return b?Ma("form",{className:"survey-form",name:"surveyForm",children:[c&&!0!==(null==(t=n.appearance)?void 0:t.hideCancelButton)&&Ma(Ha,{onClick(){l()}}),Ma("div",{className:"survey-box","data-question-index":m,children:ms({question:b,forceDisableHtml:i,displayQuestionIndex:m,appearance:n.appearance||ta,onSubmit:e=>(e=>{var{res:t,displayQuestionIndex:i,questionId:u}=e;if(o)if(u){var l=Io(u),c=r({},a,{[l]:t});s(c);var d=ts(n,i,t),v=d===ko.End;v||(y(d),wa(n,{surveySubmissionId:h,responses:c,lastQuestionIndex:d,surveyLanguage:p})),(n.enable_partial_responses||v)&&aa({responses:c,survey:n,surveySubmissionId:h,isSurveyCompleted:v,posthog:o,properties:f,surveyLanguage:p})}else No.error("onNextButtonClick called without a questionId.");else No.error("onNextButtonClick called without a PostHog instance.")})({res:e,displayQuestionIndex:m,questionId:b.id}),onPreviewSubmit:d,initialValue:b.id?a[Io(b.id)]:void 0})})]}):null}function ps(e){var t,r,n,i,o,a,s,{survey:u,forceDisableHtml:l,posthog:c,readOnly:d,surveyLanguage:h}=e,[v,f]=no(!0),[p,m]=no(!1),[y,g]=no({}),b=()=>{m(!p)};if(io((()=>{var e;if(c){if(!d){"tab"===(null==(e=u.appearance)?void 0:e.widgetType)&&g({top:"50%",bottom:"auto"});var t=e=>{var t,r=e;(null==(t=r.detail)?void 0:t.surveyId)===u.id&&(No.info("Received show event for feedback button survey "+u.id),g(r.detail.position||{}),b())};return ln(is,as,t),()=>{is.removeEventListener(as,t)}}}else No.error("FeedbackWidget called without a PostHog instance.")}),[c,d,u.id,null==(t=u.appearance)?void 0:t.widgetType,null==(r=u.appearance)?void 0:r.widgetSelector,null==(n=u.appearance)?void 0:n.borderColor]),ds({survey:u,setSurveyVisible:f}),!v)return null;var w=()=>{u.schedule!==xo&&f(!1),setTimeout((()=>{m(!1)}),200)};return Ma(Ci,{children:["tab"===(null==(i=u.appearance)?void 0:i.widgetType)&&Ma("button",{className:"ph-survey-widget-tab "+((null==(o=u.appearance)?void 0:o.tabPosition)===go.Top?"widget-tab-top":""),onClick:b,disabled:d,style:hs(null==(a=u.appearance)?void 0:a.tabPosition),children:(null==(s=u.appearance)?void 0:s.widgetLabel)||""}),p&&Ma(vs,{posthog:c,survey:u,forceDisableHtml:l,style:y,onPopupSurveyDismissed:w,onCloseConfirmationMessage:w,surveyLanguage:h})]})}var ms=e=>{var{question:t,forceDisableHtml:n,displayQuestionIndex:i,appearance:o,onSubmit:a,onPreviewSubmit:s,initialValue:u}=e,l={forceDisableHtml:n,appearance:o,onPreviewSubmit(e){s(e)},onSubmit(e){a(e)},initialValue:u,displayQuestionIndex:i};switch(t.type){case wo.Open:return xi(Wa,r({},l,{question:t,key:t.id}));case wo.Link:return xi(za,r({},l,{question:t,key:t.id}));case wo.Rating:return xi(Za,r({},l,{question:t,key:t.id}));case wo.SingleChoice:case wo.MultipleChoice:return xi(Qa,r({},l,{question:t,key:t.id}));default:return No.error("Unsupported question type: "+t.type),null}};en.__PosthogExtensions__=en.__PosthogExtensions__||{},en.__PosthogExtensions__.generateSurveys=cs,en.extendPostHogWithSurveys=cs;class ys{emit(e){}}var gs=new ys,bs=new class{getLogger(e,t,r){return new ys}};class ws{constructor(e,t,r,n){this.ue=e,this.name=t,this.version=r,this.options=n}emit(e){this.le().emit(e)}le(){if(this.ce)return this.ce;var e=this.ue.de(this.name,this.version,this.options);return e?(this.ce=e,this.ce):gs}}class ks{getLogger(e,t,r){var n;return null!==(n=this.de(e,t,r))&&void 0!==n?n:new ws(this,e,t,r)}he(){var e;return null!==(e=this.ce)&&void 0!==e?e:bs}ve(e){this.ce=e}de(e,t,r){var n;return null===(n=this.ce)||void 0===n?void 0:n.getLogger(e,t,r)}}var xs="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{},Ss=Symbol.for("io.opentelemetry.js.api.logs"),Cs=xs;class Is{constructor(){this.fe=new ks}static getInstance(){return this._instance||(this._instance=new Is),this._instance}setGlobalLoggerProvider(e){return Cs[Ss]?this.getLoggerProvider():(Cs[Ss]=(1,t=e,r=bs,e=>1===e?t:r),this.fe.ve(e),e);var t,r}getLoggerProvider(){var e,t;return null!==(t=null===(e=Cs[Ss])||void 0===e?void 0:e.call(Cs,1))&&void 0!==t?t:this.fe}getLogger(e,t,r){return this.getLoggerProvider().getLogger(e,t,r)}disable(){delete Cs[Ss],this.fe=new ks}}var Ts=Is.getInstance();class Ms{constructor(e){this.ce=void 0,this.ce=e}export(e,t){this.ce.export(e,t)}forceFlush(){return this.ce.forceFlush()}shutdown(){return this.ce.shutdown()}}class _s extends Error{constructor(e,t,r){super(e),this.code=void 0,this.name="OTLPExporterError",this.data=void 0,this.data=r,this.code=t}}function Ls(e){if(Number.isFinite(e)&&e>0)return e;throw new Error("Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '"+e+"')")}class Os{constructor(e){this.pe=void 0,this.me=[],this.pe=e}pushPromise(e){if(this.hasReachedLimit())throw new Error("Concurrency Limit reached");this.me.push(e);var t=()=>{var t=this.me.indexOf(e);this.me.splice(t,1)};e.then(t,t)}hasReachedLimit(){return this.me.length>=this.pe}awaitAll(){var e=this;return t((function*(){yield Promise.all(e.me)}))()}}function Es(e){return new Os(e.concurrencyLimit)}var Rs="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{},Ns="1.9.0",As=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/,Ps=function(e){var t=new Set([e]),r=new Set,n=e.match(As);if(!n)return function(){return!1};var i=+n[1],o=+n[2],a=+n[3];if(null!=n[4])return function(t){return t===e};function s(e){return r.add(e),!1}function u(e){return t.add(e),!0}return function(e){if(t.has(e))return!0;if(r.has(e))return!1;var n=e.match(As);if(!n)return s(e);var l=+n[2],c=+n[3];return null!=n[4]||i!==+n[1]?s(e):0===i?o!==l||a>c?s(e):u(e):o>l?s(e):u(e)}}(Ns),qs=Ns.split(".")[0],Ds=Symbol.for("opentelemetry.js.api."+qs),Fs=Rs;function js(e,t,r,n){var i;void 0===n&&(n=!1);var o=Fs[Ds]=null!==(i=Fs[Ds])&&void 0!==i?i:{version:Ns};if(!n&&o[e]){var a=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+e);return r.error(a.stack||a.message),!1}return o.version!==Ns?(a=new Error("@opentelemetry/api: Registration of version v"+o.version+" for "+e+" does not match previously registered API v"+Ns),r.error(a.stack||a.message),!1):(o[e]=t,r.debug("@opentelemetry/api: Registered a global for "+e+" v"+Ns+"."),!0)}function Hs(e){var t,r,n=null===(t=Fs[Ds])||void 0===t?void 0:t.version;if(n&&Ps(n))return null===(r=Fs[Ds])||void 0===r?void 0:r[e]}function Us(e,t){t.debug("@opentelemetry/api: Unregistering a global for "+e+" v"+Ns+".");var r=Fs[Ds];r&&delete r[e]}var Bs,Vs=function(){function e(e){this.ye=e.namespace||"DiagComponentLogger"}return e.prototype.debug=function(){for(var e=[],t=0;arguments.length>t;t++)e[t]=arguments[t];return Ws("debug",this.ye,e)},e.prototype.error=function(){for(var e=[],t=0;arguments.length>t;t++)e[t]=arguments[t];return Ws("error",this.ye,e)},e.prototype.info=function(){for(var e=[],t=0;arguments.length>t;t++)e[t]=arguments[t];return Ws("info",this.ye,e)},e.prototype.warn=function(){for(var e=[],t=0;arguments.length>t;t++)e[t]=arguments[t];return Ws("warn",this.ye,e)},e.prototype.verbose=function(){for(var e=[],t=0;arguments.length>t;t++)e[t]=arguments[t];return Ws("verbose",this.ye,e)},e}();function Ws(e,t,r){var n=Hs("diag");if(n)return r.unshift(t),n[e].apply(n,function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;o>i;i++)!n&&i in t||(n||(n=[].slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||[].slice.call(t))}([],function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}(r),!1))}!function(e){e[e.NONE=0]="NONE",e[e.ERROR=30]="ERROR",e[e.WARN=50]="WARN",e[e.INFO=60]="INFO",e[e.DEBUG=70]="DEBUG",e[e.VERBOSE=80]="VERBOSE",e[e.ALL=9999]="ALL"}(Bs||(Bs={}));var zs=function(){function e(){function e(e){return function(){for(var t=[],r=0;arguments.length>r;r++)t[r]=arguments[r];var n=Hs("diag");if(n)return n[e].apply(n,function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;o>i;i++)!n&&i in t||(n||(n=[].slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||[].slice.call(t))}([],function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}(t),!1))}}var t=this;t.setLogger=function(e,r){var n,i,o;if(void 0===r&&(r={logLevel:Bs.INFO}),e===t){var a=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return t.error(null!==(n=a.stack)&&void 0!==n?n:a.message),!1}"number"==typeof r&&(r={logLevel:r});var s=Hs("diag"),u=function(e,t){function r(r,n){var i=t[r];return"function"!=typeof i||n>e?function(){}:i.bind(t)}return Bs.NONE>e?e=Bs.NONE:e>Bs.ALL&&(e=Bs.ALL),t=t||{},{error:r("error",Bs.ERROR),warn:r("warn",Bs.WARN),info:r("info",Bs.INFO),debug:r("debug",Bs.DEBUG),verbose:r("verbose",Bs.VERBOSE)}}(null!==(i=r.logLevel)&&void 0!==i?i:Bs.INFO,e);if(s&&!r.suppressOverrideMessage){var l=null!==(o=(new Error).stack)&&void 0!==o?o:"<failed to generate stacktrace>";s.warn("Current logger will be overwritten from "+l),u.warn("Current logger will overwrite one already registered from "+l)}return js("diag",u,t,!0)},t.disable=function(){Us("diag",t)},t.createComponentLogger=function(e){return new Vs(e)},t.verbose=e("verbose"),t.debug=e("debug"),t.info=e("info"),t.warn=e("warn"),t.error=e("error")}return e.instance=function(){return this._instance||(this._instance=new e),this._instance},e}();function Zs(e){return Symbol.for(e)}var $s,Qs=new function e(t){var r=this;r.ge=t?new Map(t):new Map,r.getValue=function(e){return r.ge.get(e)},r.setValue=function(t,n){var i=new e(r.ge);return i.ge.set(t,n),i},r.deleteValue=function(t){var n=new e(r.ge);return n.ge.delete(t),n}},Gs=function(){function e(){}return e.prototype.active=function(){return Qs},e.prototype.with=function(e,t,r){for(var n=[],i=3;arguments.length>i;i++)n[i-3]=arguments[i];return t.call.apply(t,function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;o>i;i++)!n&&i in t||(n||(n=[].slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||[].slice.call(t))}([r],function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}(n),!1))},e.prototype.bind=function(e,t){return t},e.prototype.enable=function(){return this},e.prototype.disable=function(){return this},e}(),Js="context",Xs=new Gs,Ys=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalContextManager=function(e){return js(Js,e,zs.instance())},e.prototype.active=function(){return this.be().active()},e.prototype.with=function(e,t,r){for(var n,i=[],o=3;arguments.length>o;o++)i[o-3]=arguments[o];return(n=this.be()).with.apply(n,function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;o>i;i++)!n&&i in t||(n||(n=[].slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||[].slice.call(t))}([e,t,r],function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}(i),!1))},e.prototype.bind=function(e,t){return this.be().bind(e,t)},e.prototype.be=function(){return Hs(Js)||Xs},e.prototype.disable=function(){this.be().disable(),Us(Js,zs.instance())},e}();!function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"}($s||($s={}));var Ks="0000000000000000",eu="00000000000000000000000000000000",tu={traceId:eu,spanId:Ks,traceFlags:$s.NONE},ru=function(){function e(e){void 0===e&&(e=tu),this.we=e}return e.prototype.spanContext=function(){return this.we},e.prototype.setAttribute=function(e,t){return this},e.prototype.setAttributes=function(e){return this},e.prototype.addEvent=function(e,t){return this},e.prototype.addLink=function(e){return this},e.prototype.addLinks=function(e){return this},e.prototype.setStatus=function(e){return this},e.prototype.updateName=function(e){return this},e.prototype.end=function(e){},e.prototype.isRecording=function(){return!1},e.prototype.recordException=function(e,t){},e}(),nu=Zs("OpenTelemetry Context Key SPAN");function iu(e){return e.getValue(nu)||void 0}function ou(){return iu(Ys.getInstance().active())}function au(e,t){return e.setValue(nu,t)}function su(e){return e.deleteValue(nu)}function uu(e,t){return au(e,new ru(t))}function lu(e){var t;return null===(t=iu(e))||void 0===t?void 0:t.spanContext()}var cu=/^([0-9a-f]{32})$/i,du=/^[0-9a-f]{16}$/i;function hu(e){return cu.test(r=e.traceId)&&r!==eu&&du.test(t=e.spanId)&&t!==Ks;var t,r}function vu(e){return new ru(e)}var fu=Ys.getInstance(),pu=function(){function e(){}return e.prototype.startSpan=function(e,t,r){if(void 0===r&&(r=fu.active()),Boolean(null==t?void 0:t.root))return new ru;var n,i=r&&lu(r);return"object"==typeof(n=i)&&"string"==typeof n.spanId&&"string"==typeof n.traceId&&"number"==typeof n.traceFlags&&hu(i)?new ru(i):new ru},e.prototype.startActiveSpan=function(e,t,r,n){var i,o,a;if(arguments.length>=2){2===arguments.length?a=t:3===arguments.length?(i=t,a=r):(i=t,o=r,a=n);var s=null!=o?o:fu.active(),u=this.startSpan(e,i,s),l=au(s,u);return fu.with(l,a,void 0,u)}},e}(),mu=new pu,yu=function(){function e(e,t,r,n){this.ue=e,this.name=t,this.version=r,this.options=n}return e.prototype.startSpan=function(e,t,r){return this.ke().startSpan(e,t,r)},e.prototype.startActiveSpan=function(e,t,r,n){var i=this.ke();return Reflect.apply(i.startActiveSpan,i,arguments)},e.prototype.ke=function(){if(this.ce)return this.ce;var e=this.ue.getDelegateTracer(this.name,this.version,this.options);return e?(this.ce=e,this.ce):mu},e}(),gu=new(function(){function e(){}return e.prototype.getTracer=function(e,t,r){return new pu},e}()),bu=function(){function e(){}return e.prototype.getTracer=function(e,t,r){var n;return null!==(n=this.getDelegateTracer(e,t,r))&&void 0!==n?n:new yu(this,e,t,r)},e.prototype.getDelegate=function(){var e;return null!==(e=this.ce)&&void 0!==e?e:gu},e.prototype.setDelegate=function(e){this.ce=e},e.prototype.getDelegateTracer=function(e,t,r){var n;return null===(n=this.ce)||void 0===n?void 0:n.getTracer(e,t,r)},e}(),wu=Ys.getInstance(),ku=zs.instance(),xu="trace",Su=function(){function e(){this.xe=new bu,this.wrapSpanContext=vu,this.isSpanContextValid=hu,this.deleteSpan=su,this.getSpan=iu,this.getActiveSpan=ou,this.getSpanContext=lu,this.setSpan=au,this.setSpanContext=uu}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalTracerProvider=function(e){var t=js(xu,this.xe,zs.instance());return t&&this.xe.setDelegate(e),t},e.prototype.getTracerProvider=function(){return Hs(xu)||this.xe},e.prototype.getTracer=function(e,t){return this.getTracerProvider().getTracer(e,t)},e.prototype.disable=function(){Us(xu,zs.instance()),this.xe=new bu},e}().getInstance(),Cu=Zs("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Iu(e){return null==e||(Array.isArray(e)?function(e){var t;for(var r of e)if(null!=r){var n=typeof r;if(n!==t){if(!t){if(Tu(n)){t=n;continue}return!1}return!1}}return!0}(e):Tu(typeof e))}function Tu(e){switch(e){case"number":case"boolean":case"string":return!0}return!1}function Mu(e){try{(e=>{ku.error(function(e){return"string"==typeof e?e:JSON.stringify(function(e){for(var t={},r=e;null!==r;)Object.getOwnPropertyNames(r).forEach((e=>{if(!t[e]){var n=r[e];n&&(t[e]=String(n))}})),r=Object.getPrototypeOf(r);return t}(e))}(e))})(e)}catch(e){}}var _u,Lu=performance,Ou="telemetry.sdk.language",Eu="telemetry.sdk.name",Ru="telemetry.sdk.version",Nu={[Eu]:"opentelemetry","process.runtime.name":"browser",[Ou]:"webjs",[Ru]:"2.2.0"},Au=Math.pow(10,6),Pu=Math.pow(10,9);function qu(e){return[Math.trunc(e/1e3),Math.round(e%1e3*Au)]}function Du(){var e=Lu.timeOrigin;return"number"!=typeof e&&(e=Lu.timing&&Lu.timing.fetchStart),e}function Fu(e){if(o=e,Array.isArray(o)&&2===o.length&&"number"==typeof o[0]&&"number"==typeof o[1])return e;if("number"==typeof e)return e<Du()?(t=e,r=qu(Du()),n=qu("number"==typeof t?t:Lu.now()),Pu>(i=[r[0]+n[0],r[1]+n[1]])[1]||(i[1]-=Pu,i[0]+=1),i):qu(e);var t,r,n,i,o;if(e instanceof Date)return qu(e.getTime());throw TypeError("Invalid input type")}!function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"}(_u||(_u={}));var ju="[object Object]",Hu="[object Null]",Uu="[object Undefined]",Bu=function(){}.toString,Vu=Bu.call(Object),Wu=Object.getPrototypeOf,zu=Object.prototype,Zu=zu.hasOwnProperty,$u=Symbol?Symbol.toStringTag:void 0,Qu=zu.toString;function Gu(e){if(!function(e){return null!=e&&"object"==typeof e}(e)||function(e){return null==e?void 0===e?Uu:Hu:$u&&$u in Object(e)?function(e){var t=Zu.call(e,$u),r=e[$u],n=!1;try{e[$u]=void 0,n=!0}catch(e){}var i=Qu.call(e);return n&&(t?e[$u]=r:delete e[$u]),i}(e):function(e){return Qu.call(e)}(e)}(e)!==ju)return!1;var t=Wu(e);if(null===t)return!0;var r=Zu.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Bu.call(r)===Vu}function Ju(e){return Ku(e)?e.slice():e}function Xu(e,t,r,n){var i;if(void 0===r&&(r=0),20>=r){if(r++,rl(e)||rl(t)||el(t))i=Ju(t);else if(Ku(e)){if(i=e.slice(),Ku(t))for(var o=0,a=t.length;a>o;o++)i.push(Ju(t[o]));else if(tl(t))for(var s=Object.keys(t),u=0,l=s.length;l>u;u++){var c=s[u];i[c]=Ju(t[c])}}else if(tl(e))if(tl(t)){if(!function(e,t){return!(!Gu(e)||!Gu(t))}(e,t))return t;i=Object.assign({},e);for(var d=Object.keys(t),h=0,v=d.length;v>h;h++){var f=d[h],p=t[f];if(rl(p))void 0===p?delete i[f]:i[f]=p;else{var m=i[f],y=p;if(Yu(e,f,n)||Yu(t,f,n))delete i[f];else{if(tl(m)&&tl(y)){var g=n.get(m)||[],b=n.get(y)||[];g.push({obj:e,key:f}),b.push({obj:t,key:f}),n.set(m,g),n.set(y,b)}i[f]=Xu(i[f],p,r,n)}}}}else i=t;return i}}function Yu(e,t,r){for(var n=r.get(e[t])||[],i=0,o=n.length;o>i;i++){var a=n[i];if(a.key===t&&a.obj===e)return!0}return!1}function Ku(e){return Array.isArray(e)}function el(e){return"function"==typeof e}function tl(e){return!rl(e)&&!Ku(e)&&!el(e)&&"object"==typeof e}function rl(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||void 0===e||e instanceof Date||e instanceof RegExp||null===e}class nl extends Error{constructor(e){super(e),Object.setPrototypeOf(this,nl.prototype)}}function il(e,t){var r,n=new Promise((function(e,n){r=setTimeout((function(){n(new nl("Operation timed out."))}),t)}));return Promise.race([e,n]).then((e=>(clearTimeout(r),e)),(e=>{throw clearTimeout(r),e}))}class ol{constructor(){this.Se=void 0,this.Ce=void 0,this.Ie=void 0,this.Se=new Promise(((e,t)=>{this.Ce=e,this.Ie=t}))}get promise(){return this.Se}resolve(e){this.Ce(e)}reject(e){this.Ie(e)}}class al{constructor(e,t){this.Te=void 0,this.Me=void 0,this._e=!1,this.Le=new ol,this.Te=e,this.Me=t}get isCalled(){return this._e}get promise(){return this.Le.promise}call(){if(!this._e){this._e=!0;try{for(var e=arguments.length,t=new Array(e),r=0;e>r;r++)t[r]=arguments[r];Promise.resolve(this.Te.call(this.Me,...t)).then((e=>this.Le.resolve(e)),(e=>this.Le.reject(e)))}catch(e){this.Le.reject(e)}}return this.Le.promise}}var sl={Oe:(e,t)=>new Promise((r=>{wu.with(function(e){return e.setValue(Cu,!0)}(wu.active()),(()=>{e.export(t,(e=>{r(e)}))}))}))};class ul{constructor(e,t,r,n,i){this.Ee=void 0,this.Re=void 0,this.Ne=void 0,this.Ae=void 0,this.Pe=void 0,this.qe=void 0,this.Ee=e,this.Re=t,this.Ne=r,this.Ae=n,this.Pe=i,this.qe=ku.createComponentLogger({namespace:"OTLPExportDelegate"})}export(e,t){if(this.qe.debug("items to be sent",e),this.Ae.hasReachedLimit())t({code:_u.FAILED,error:new Error("Concurrent export limit reached")});else{var r=this.Re.serializeRequest(e);null!=r?this.Ae.pushPromise(this.Ee.send(r,this.Pe).then((e=>{if("success"!==e.status)t("failure"===e.status&&e.error?{code:_u.FAILED,error:e.error}:"retryable"===e.status?{code:_u.FAILED,error:new _s("Export failed with retryable status")}:{code:_u.FAILED,error:new _s("Export failed with unknown error")});else{if(null!=e.data)try{this.Ne.handleResponse(this.Re.deserializeResponse(e.data))}catch(t){this.qe.warn("Export succeeded but could not deserialize response - is the response specification compliant?",t,e.data)}t({code:_u.SUCCESS})}}),(e=>t({code:_u.FAILED,error:e})))):t({code:_u.FAILED,error:new Error("Nothing to send")})}}forceFlush(){return this.Ae.awaitAll()}shutdown(){var e=this;return t((function*(){e.qe.debug("shutdown started"),yield e.forceFlush(),e.Ee.shutdown()}))()}}function ll(e,t,r){return n={transport:r,serializer:t,promiseHandler:Es(e)},new ul(n.transport,n.serializer,{handleResponse(e){null!=e&&function(e){return{}.hasOwnProperty.call(e,"partialSuccess")}(e)&&null!=e.partialSuccess&&0!==Object.keys(e.partialSuccess).length&&ku.warn("Received Partial Success response:",JSON.stringify(e.partialSuccess))}},n.promiseHandler,{timeout:e.timeoutMillis}.timeout);var n}function cl(e){return 48>e||e>57?97>e||e>102?e-55:e-87:e-48}function dl(e){for(var t=new Uint8Array(e.length/2),r=0,n=0;e.length>n;n+=2){var i=cl(e.charCodeAt(n)),o=cl(e.charCodeAt(n+1));t[r++]=i<<4|o}return t}function hl(e){var t=BigInt(1e9);return BigInt(Math.trunc(e[0]))*t+BigInt(Math.trunc(e[1]))}function vl(e){var t;return t=hl(e),{low:Number(BigInt.asUintN(32,t)),high:Number(BigInt.asUintN(32,t>>BigInt(32)))}}var fl="undefined"!=typeof BigInt?function(e){return hl(e).toString()}:function(e){return e[0]*Pu+e[1]};function pl(e){return e}function ml(e){if(void 0!==e)return dl(e)}var yl={encodeHrTime:vl,encodeSpanContext:dl,encodeOptionalSpanContext:ml};function gl(e,t){return{key:e,value:bl(t)}}function bl(e){var t=typeof e;return"string"===t?{stringValue:e}:"number"===t?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:"boolean"===t?{boolValue:e}:e instanceof Uint8Array?{bytesValue:e}:Array.isArray(e)?{arrayValue:{values:e.map(bl)}}:"object"===t&&null!=e?{kvlistValue:{values:Object.entries(e).map((e=>{var[t,r]=e;return gl(t,r)}))}}:{}}function wl(e,t){var r=function(e){var t=new Map;for(var r of e){var{resource:n,instrumentationScope:{name:i,version:o="",schemaUrl:a=""}}=r,s=t.get(n);s||(s=new Map,t.set(n,s));var u=i+"@"+o+":"+a,l=s.get(u);l||s.set(u,l=[]),l.push(r)}return t}(e);return Array.from(r,(e=>{var[r,n]=e,i=function(e){var t,r={attributes:(t=e.attributes,Object.keys(t).map((e=>gl(e,t[e])))),droppedAttributesCount:0},n=e.schemaUrl;return n&&""!==n&&(r.schemaUrl=n),r}(r);return{resource:i,scopeLogs:Array.from(n,(e=>{var r,[,n]=e;return{scope:(r=n[0].instrumentationScope,{name:r.name,version:r.version}),logRecords:n.map((e=>function(e,t){var r,n,i,o;return{timeUnixNano:t.encodeHrTime(e.hrTime),observedTimeUnixNano:t.encodeHrTime(e.hrTimeObserved),severityNumber:e.severityNumber,severityText:e.severityText,body:bl(e.body),eventName:e.eventName,attributes:(o=e.attributes,Object.keys(o).map((e=>gl(e,o[e])))),droppedAttributesCount:e.droppedAttributesCount,flags:null==(r=e.spanContext)?void 0:r.traceFlags,traceId:t.encodeOptionalSpanContext(null==(n=e.spanContext)?void 0:n.traceId),spanId:t.encodeOptionalSpanContext(null==(i=e.spanContext)?void 0:i.spanId)}}(e,t))),schemaUrl:n[0].instrumentationScope.schemaUrl}})),schemaUrl:i.schemaUrl}}))}var kl=e=>null!==e&&"object"==typeof e&&"function"==typeof e.then;class xl{static FromAttributeList(e,t){var r=new xl({},t);return r.De=Cl(e),r.Fe=e.filter((e=>{var[t,r]=e;return kl(r)})).length>0,r}constructor(e,t){var r;this.De=void 0,this.Fe=!1,this.je=void 0,this.He=void 0;var n=null!==(r=e.attributes)&&void 0!==r?r:{};this.De=Object.entries(n).map((e=>{var[t,r]=e;return kl(r)&&(this.Fe=!0),[t,r]})),this.De=Cl(this.De),this.je=function(e){if("string"==typeof e||void 0===e)return e;ku.warn("Schema URL must be string or undefined, got %s. Schema URL will be ignored.",e)}(null==t?void 0:t.schemaUrl)}get asyncAttributesPending(){return this.Fe}waitForAsyncAttributes(){var e=this;return t((function*(){if(e.asyncAttributesPending){for(var t=0;e.De.length>t;t++){var[r,n]=e.De[t];e.De[t]=[r,kl(n)?yield n:n]}e.Fe=!1}}))()}get attributes(){if(this.asyncAttributesPending&&ku.error("Accessing resource attributes before async attributes settled"),this.He)return this.He;var e={};for(var[t,r]of this.De){var n;kl(r)?ku.debug("Unsettled resource attribute "+t+" skipped"):null!=r&&(null!==(n=e[t])&&void 0!==n||(e[t]=r))}return this.Fe||(this.He=e),e}getRawAttributes(){return this.De}get schemaUrl(){return this.je}merge(e){if(null==e)return this;var t,r,n,i,o=(i=null==(r=e)?void 0:r.schemaUrl,void 0===(n=null==(t=this)?void 0:t.schemaUrl)||""===n?i:void 0===i||""===i||n===i?n:void ku.warn('Schema URL merge conflict: old resource has "%s", updating resource has "%s". Resulting resource will have undefined Schema URL.',n,i)),a=o?{schemaUrl:o}:void 0;return xl.FromAttributeList([...e.getRawAttributes(),...this.getRawAttributes()],a)}}function Sl(e,t){return xl.FromAttributeList(Object.entries(e),t)}function Cl(e){return e.map((e=>{var[t,r]=e;return kl(r)?[t,r.catch((e=>{ku.debug("promise rejection for resource attribute: %s - %s",t,e)}))]:[t,r]}))}var Il={serializeRequest(e){var t,r,n=(t=e,r=function(e){var t,r;if(void 0===e)return yl;var n=null===(t=e.useLongBits)||void 0===t||t,i=null!==(r=e.useHex)&&void 0!==r&&r;return{encodeHrTime:n?vl:fl,encodeSpanContext:i?pl:dl,encodeOptionalSpanContext:i?pl:ml}}({useHex:!0,useLongBits:!1}),{resourceLogs:wl(t,r)});return(new TextEncoder).encode(JSON.stringify(n))},deserializeResponse(e){if(0===e.length)return{};var t=new TextDecoder;return JSON.parse(t.decode(e))}};class Tl{constructor(e){this.Ee=void 0,this.Ee=e}retry(e,t,r){return new Promise(((n,i)=>{setTimeout((()=>{this.Ee.send(e,t).then(n,i)}),r)}))}send(e,r){var n=this;return t((function*(){for(var t=Date.now()+r,i=yield n.Ee.send(e,r),o=5,a=1e3;"retryable"===i.status&&o>0;){var s;o--;var u=Math.max(Math.min(a,5e3)+(.4*Math.random()-.2),0);a*=1.5;var l=null!==(s=i.retryInMillis)&&void 0!==s?s:u,c=t-Date.now();if(l>c)return i;i=yield n.retry(e,c,l)}return i}))()}shutdown(){return this.Ee.shutdown()}}function Ml(e){return new Tl(e.transport)}function _l(e){return[429,502,503,504].includes(e)}function Ll(e){if(null!=e){var t=Number.parseInt(e,10);if(Number.isInteger(t))return t>0?1e3*t:-1;var r=new Date(e).getTime()-Date.now();return 0>r?0:r}}class Ol{constructor(e){this.Ue=void 0,this.Ue=e}send(e,r){var n=this;return t((function*(){var t=yield n.Ue.headers(),i=yield new Promise((i=>{var o=new XMLHttpRequest;o.timeout=r,o.open("POST",n.Ue.url),Object.entries(t).forEach((e=>{var[t,r]=e;o.setRequestHeader(t,r)})),o.ontimeout=e=>{i({status:"failure",error:new Error("XHR request timed out")})},o.onreadystatechange=()=>{200>o.status||o.status>299?o.status&&_l(o.status)?i({status:"retryable",retryInMillis:Ll(o.getResponseHeader("Retry-After"))}):0!==o.status&&i({status:"failure",error:new Error("XHR request failed with non-retryable status")}):(ku.debug("XHR success"),i({status:"success"}))},o.onabort=()=>{i({status:"failure",error:new Error("XHR request aborted")})},o.onerror=()=>{i({status:"failure",error:new Error("XHR request errored")})},o.send(e)}));return i}))()}shutdown(){}}class El{constructor(e){this.Be=void 0,this.Be=e}send(e){var r=this;return t((function*(){var t=(yield r.Be.headers())["Content-Type"];return new Promise((n=>{navigator.sendBeacon(r.Be.url,new Blob([e],{type:t}))?(ku.debug("SendBeacon success"),n({status:"success"})):n({status:"failure",error:new Error("SendBeacon failed")})}))}))()}shutdown(){}}class Rl{constructor(e){this.Ue=void 0,this.Ue=e}send(e,r){var n=this;return t((function*(){var t=new AbortController,i=setTimeout((()=>t.abort()),r);try{var o,a=!!globalThis.location,s=new URL(n.Ue.url),u=yield fetch(s.href,{method:"POST",headers:yield n.Ue.headers(),body:e,signal:t.signal,keepalive:a,mode:a?(null==(o=globalThis.location)?void 0:o.origin)===s.origin?"same-origin":"cors":"no-cors"});return 200>u.status||u.status>299?_l(u.status)?{status:"retryable",retryInMillis:Ll(u.headers.get("Retry-After"))}:{status:"failure",error:new Error("Fetch request failed with non-retryable status")}:(ku.debug("response success"),{status:"success"})}catch(e){return"AbortError"===(null==e?void 0:e.name)?{status:"failure",error:new Error("Fetch request timed out",{cause:e})}:{status:"failure",error:new Error("Fetch request errored",{cause:e})}}finally{clearTimeout(i)}}))()}shutdown(){}}function Nl(e,t){return ll(e,t,Ml({transport:(r=e,new Ol(r))}));var r}function Al(e,t){return ll(e,t,Ml({transport:(r=e,new Rl(r))}));var r}function Pl(e,t){return ll(e,t,Ml({transport:(r={url:e.url,headers:e.headers},new El(r))}));var r}function ql(e){if(null!=e)try{var t,r=null==(t=globalThis.location)?void 0:t.href;return new URL(e,r).href}catch(t){throw new Error("Configuration: Could not parse user-provided export URL: '"+e+"'")}}function Dl(e){return"function"==typeof e.headers?e.headers:function(e){if(null!=e)return t((function*(){return e}))}(e.headers)}function Fl(e,n,i){return o={url:e.url,timeoutMillis:e.timeoutMillis,headers:Dl(e),concurrencyLimit:e.concurrencyLimit},a={},s=function(e,n){return r({},{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"},{headers:(i=t((function*(){return e})),function(){return i.apply(this,arguments)}),url:"http://localhost:4318/"+n});var i}(i,n),r({},function(e,t,r){var n,i,o,a,s,u;return{timeoutMillis:Ls(null!==(n=null!==(i=e.timeoutMillis)&&void 0!==i?i:t.timeoutMillis)&&void 0!==n?n:r.timeoutMillis),concurrencyLimit:null!==(o=null!==(a=e.concurrencyLimit)&&void 0!==a?a:t.concurrencyLimit)&&void 0!==o?o:r.concurrencyLimit,compression:null!==(s=null!==(u=e.compression)&&void 0!==u?u:t.compression)&&void 0!==s?s:r.compression}}(o,a,s),{headers:(c=o.headers,d=a.headers,h=s.headers,t((function*(){var e=r({},yield h()),t={};return null!=d&&Object.assign(t,yield d()),null!=c&&Object.assign(t,function(e){var t={};return Object.entries(null!=e?e:{}).forEach((e=>{var[r,n]=e;void 0!==n?t[r]=String(n):ku.warn('Header "'+r+'" has invalid value ('+n+") and will be ignored")})),t}(yield c())),Object.assign(t,e)}))),url:null!==(u=null!==(l=ql(o.url))&&void 0!==l?l:a.url)&&void 0!==u?u:s.url});var o,a,s,u,l,c,d,h}function jl(e,t,r,n){return(e.headers||"function"!=typeof navigator.sendBeacon?void 0!==globalThis.fetch?Al:Nl:Pl)(Fl(e,r,n),t)}class Hl extends Ms{constructor(e){void 0===e&&(e={}),super(jl(e,Il,"v1/logs",{"Content-Type":"application/json"}))}}class Ul{set severityText(e){this.Ve()||(this.We=e)}get severityText(){return this.We}set severityNumber(e){this.Ve()||(this.ze=e)}get severityNumber(){return this.ze}set body(e){this.Ve()||(this.Ze=e)}get body(){return this.Ze}get eventName(){return this.$e}set eventName(e){this.Ve()||(this.$e=e)}get droppedAttributesCount(){return this.totalAttributesCount-Object.keys(this.attributes).length}constructor(e,t,r){this.hrTime=void 0,this.hrTimeObserved=void 0,this.spanContext=void 0,this.resource=void 0,this.instrumentationScope=void 0,this.attributes={},this.We=void 0,this.ze=void 0,this.Ze=void 0,this.$e=void 0,this.totalAttributesCount=0,this.Qe=!1,this.Ge=void 0;var{timestamp:n,observedTimestamp:i,eventName:o,severityNumber:a,severityText:s,body:u,attributes:l={},context:c}=r,d=Date.now();if(this.hrTime=Fu(null!=n?n:d),this.hrTimeObserved=Fu(null!=i?i:d),c){var h=Su.getSpanContext(c);h&&hu(h)&&(this.spanContext=h)}this.severityNumber=a,this.severityText=s,this.body=u,this.resource=e.resource,this.instrumentationScope=t,this.Ge=e.logRecordLimits,this.$e=o,this.setAttributes(l)}setAttribute(e,t){return this.Ve()||null===t?this:0===e.length?(ku.warn("Invalid attribute key: "+e),this):Iu(t)||"object"==typeof t&&!Array.isArray(t)&&Object.keys(t).length>0?(this.totalAttributesCount+=1,Object.keys(this.attributes).length<this.Ge.attributeCountLimit||{}.hasOwnProperty.call(this.attributes,e)?(this.attributes[e]=Iu(t)?this.Je(t):t,this):(1===this.droppedAttributesCount&&ku.warn("Dropping extra attributes."),this)):(ku.warn("Invalid attribute value set for key: "+e),this)}setAttributes(e){for(var[t,r]of Object.entries(e))this.setAttribute(t,r);return this}setBody(e){return this.body=e,this}setEventName(e){return this.eventName=e,this}setSeverityNumber(e){return this.severityNumber=e,this}setSeverityText(e){return this.severityText=e,this}Xe(){this.Qe=!0}Je(e){var t=this.Ge.attributeValueLengthLimit;return t>0?"string"==typeof e?this.Ye(e,t):Array.isArray(e)?e.map((e=>"string"==typeof e?this.Ye(e,t):e)):e:(ku.warn("Attribute value limit must be positive, got "+t),e)}Ye(e,t){return e.length>t?e.substring(0,t):e}Ve(){return this.Qe&&ku.warn("Can not execute the operation on emitted log record"),this.Qe}}class Bl{constructor(e,t){this.instrumentationScope=void 0,this.Ke=void 0,this.instrumentationScope=e,this.Ke=t}emit(e){var t=e.context||wu.active(),n=new Ul(this.Ke,this.instrumentationScope,r({context:t},e));this.Ke.activeProcessor.onEmit(n,t),n.Xe()}}class Vl{forceFlush(){return Promise.resolve()}onEmit(e,t){}shutdown(){return Promise.resolve()}}class Wl{constructor(e,t){this.processors=void 0,this.forceFlushTimeoutMillis=void 0,this.processors=e,this.forceFlushTimeoutMillis=t}forceFlush(){var e=this;return t((function*(){var t=e.forceFlushTimeoutMillis;yield Promise.all(e.processors.map((e=>il(e.forceFlush(),t))))}))()}onEmit(e,t){this.processors.forEach((r=>r.onEmit(e,t)))}shutdown(){var e=this;return t((function*(){yield Promise.all(e.processors.map((e=>e.shutdown())))}))()}}class zl{constructor(e,t,r,n){this.resource=void 0,this.forceFlushTimeoutMillis=void 0,this.logRecordLimits=void 0,this.processors=void 0,this.loggers=new Map,this.activeProcessor=void 0,this.registeredLogRecordProcessors=[],this.resource=e,this.forceFlushTimeoutMillis=t,this.logRecordLimits=r,this.processors=n,n.length>0?(this.registeredLogRecordProcessors=n,this.activeProcessor=new Wl(this.registeredLogRecordProcessors,this.forceFlushTimeoutMillis)):this.activeProcessor=new Vl}}class Zl{constructor(e){var t,r,n;void 0===e&&(e={}),this.et=void 0,this.Ke=void 0;var i,o,a,s,u,l,c,d=function(){for(var e=arguments.length,t=new Array(e),r=0;e>r;r++)t[r]=arguments[r];for(var n=t.shift(),i=new WeakMap;t.length>0;)n=Xu(n,t.shift(),0,i);return n}({},{forceFlushTimeoutMillis:3e4,logRecordLimits:{attributeValueLengthLimit:1/0,attributeCountLimit:128},includeTraceContext:!0},e),h=null!==(t=e.resource)&&void 0!==t?t:Sl({"service.name":"unknown_service",[Ou]:Nu[Ou],[Eu]:Nu[Eu],[Ru]:Nu[Ru]});this.Ke=new zl(h,d.forceFlushTimeoutMillis,{attributeCountLimit:null!==(o=null!==(a=null!==(s=(i=d.logRecordLimits).attributeCountLimit)&&void 0!==s?s:void 0)&&void 0!==a?a:void 0)&&void 0!==o?o:128,attributeValueLengthLimit:null!==(u=null!==(l=null!==(c=i.attributeValueLengthLimit)&&void 0!==c?c:void 0)&&void 0!==l?l:void 0)&&void 0!==u?u:1/0},null!==(r=null==(n=e)?void 0:n.processors)&&void 0!==r?r:[]),this.et=new al(this.tt,this)}getLogger(e,t,r){if(this.et.isCalled)return ku.warn("A shutdown LoggerProvider cannot provide a Logger"),gs;e||ku.warn("Logger requested without instrumentation scope name.");var n=e||"unknown",i=n+"@"+(t||"")+":"+((null==r?void 0:r.schemaUrl)||"");return this.Ke.loggers.has(i)||this.Ke.loggers.set(i,new Bl({name:n,version:t,schemaUrl:null==r?void 0:r.schemaUrl},this.Ke)),this.Ke.loggers.get(i)}forceFlush(){return this.et.isCalled?(ku.warn("invalid attempt to force flush after LoggerProvider shutdown"),this.et.promise):this.Ke.activeProcessor.forceFlush()}shutdown(){return this.et.isCalled?(ku.warn("shutdown may only be called once per LoggerProvider"),this.et.promise):this.et.call()}tt(){return this.Ke.activeProcessor.shutdown()}}class $l{constructor(e,t){var r,n,i,o,a,s,u,l;this.rt=void 0,this.nt=void 0,this.it=void 0,this.ot=void 0,this.st=void 0,this.ut=!1,this.ct=[],this.dt=void 0,this.et=void 0,this.rt=e,this.nt=null!==(r=null!==(n=null==t?void 0:t.maxExportBatchSize)&&void 0!==n?n:void 0)&&void 0!==r?r:512,this.it=null!==(i=null!==(o=null==t?void 0:t.maxQueueSize)&&void 0!==o?o:void 0)&&void 0!==i?i:2048,this.ot=null!==(a=null!==(s=null==t?void 0:t.scheduledDelayMillis)&&void 0!==s?s:void 0)&&void 0!==a?a:5e3,this.st=null!==(u=null!==(l=null==t?void 0:t.exportTimeoutMillis)&&void 0!==l?l:void 0)&&void 0!==u?u:3e4,this.et=new al(this.tt,this),this.nt>this.it&&(ku.warn("BatchLogRecordProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this.nt=this.it)}onEmit(e){this.et.isCalled||this.ht(e)}forceFlush(){return this.et.isCalled?this.et.promise:this.vt()}shutdown(){return this.et.call()}tt(){var e=this;return t((function*(){e.onShutdown(),yield e.vt(),yield e.rt.shutdown()}))()}ht(e){this.it>this.ct.length&&(this.ct.push(e),this.ft())}vt(){return new Promise(((e,t)=>{for(var r=[],n=Math.ceil(this.ct.length/this.nt),i=0;n>i;i++)r.push(this.yt());Promise.all(r).then((()=>{e()})).catch(t)}))}yt(){return this.bt(),0===this.ct.length?Promise.resolve():new Promise(((e,t)=>{il(this.Oe(this.ct.splice(0,this.nt)),this.st).then((()=>e())).catch(t)}))}ft(){if(!this.ut){var e=()=>{this.ut=!0,this.yt().then((()=>{this.ut=!1,this.ct.length>0&&(this.bt(),this.ft())})).catch((e=>{this.ut=!1,Mu(e)}))};if(this.ct.length>=this.nt)return e();void 0===this.dt&&(this.dt=setTimeout((()=>e()),this.ot),"number"!=typeof this.dt&&this.dt.unref())}}bt(){void 0!==this.dt&&(clearTimeout(this.dt),this.dt=void 0)}Oe(e){var t=()=>sl.Oe(this.rt,e).then((e=>{var t;e.code!==_u.SUCCESS&&Mu(null!==(t=e.error)&&void 0!==t?t:new Error("BatchLogRecordProcessor: log record export failed (status "+e+")"))})).catch(Mu),r=e.map((e=>e.resource)).filter((e=>e.asyncAttributesPending));return 0===r.length?t():Promise.all(r.map((e=>null==e.waitForAsyncAttributes?void 0:e.waitForAsyncAttributes()))).then(t,Mu)}}class Ql extends $l{constructor(e,t){super(e,t),this.wt=void 0,this.kt=void 0,this.xt(t)}onShutdown(){"undefined"!=typeof document&&(this.wt&&document.removeEventListener("visibilitychange",this.wt),this.kt&&document.removeEventListener("pagehide",this.kt))}xt(e){!0!==(null==e?void 0:e.disableAutoFlushOnDocumentHide)&&"undefined"!=typeof document&&(this.wt=()=>{"hidden"===document.visibilityState&&this.forceFlush()},this.kt=()=>{this.forceFlush()},document.addEventListener("visibilitychange",this.wt),document.addEventListener("pagehide",this.kt))}}var Gl=(e,t,r)=>r.remaining>0?t.length>r.remaining?(e.push(t.slice(0,r.remaining)),r.remaining=0,r.truncated=!0,!1):(e.push(t),r.remaining-=t.length,!0):(r.truncated=!0,!1),Jl=(e,t,r)=>{var n=JSON.stringify(e);if(r.remaining>=n.length)return Gl(t,n,r);if(r.truncated=!0,2>r.remaining)return!1;for(var i=0,o=Math.min(e.length,r.remaining-2);o>i;){var a=Math.ceil((i+o)/2);JSON.stringify(e.slice(0,a)).length>r.remaining?o=a-1:i=a}return Gl(t,JSON.stringify(e.slice(0,i)),r)},Xl=e=>void 0!==e&&"function"!=typeof e&&"symbol"!=typeof e&&"bigint"!=typeof e,Yl=function(e,t,r,n,i){if(void 0===i&&(i=!1),!Xl(e))return!i||Gl(t,"null",r);if(rr(e)||(e=>{try{return ir(e)||or(e)}catch(e){return!1}})(e))return Gl(t,JSON.stringify(e),r);if("string"==typeof e)return Jl(e,t,r);if(!Kt(e)&&!Xt(e))return Gl(t,JSON.stringify(e),r);if(n.has(e))return Jl("[Circular]",t,r);n.add(e);try{var o=e.toJSON;if(Yt(o))return Yl(o.call(e),t,r,n,i)}catch(e){}try{var a={}.toString.call(e);if("[object String]"===a)return Jl(String(e.valueOf()),t,r);if("[object Number]"===a||"[object Boolean]"===a)return Gl(t,JSON.stringify(e.valueOf()),r)}catch(e){}if(e instanceof Error){var s={};try{for(var u in e)({}).hasOwnProperty.call(e,u)&&(s[u]=e[u])}catch(e){}try{s.name=e.name}catch(e){}try{s.message=e.message}catch(e){}try{s.stack=e.stack}catch(e){}return Yl(s,t,r,n,i)}if(Xt(e)){if(!Gl(t,"[",r))return!1;for(var l=0;e.length>l;l++){if(l>0&&!Gl(t,",",r))return!1;var c=void 0;try{c=e[l]}catch(e){c=void 0}if(!Yl(c,t,r,n,!0))return!1}return Gl(t,"]",r)}if(!Gl(t,"{",r))return!1;var d=!0;try{for(var h in e)if({}.hasOwnProperty.call(e,h)){if(0>=r.remaining)return r.truncated=!0,!1;var v=void 0;try{v=e[h]}catch(e){continue}if(Xl(v)){var f=(d?"":",")+JSON.stringify(h)+":";if(f.length>=r.remaining)return r.truncated=!0,!1;var p=t.length,m=r.remaining,y=r.truncated;if(!Gl(t,f,r))return!1;var g=t.length,b=Yl(v,t,r,n,!1),w=r.truncated;if(t.length!==g){if(d=!1,!b)return!1}else if(t.length=p,r.remaining=m,r.truncated=b?y:w,!b)return!1}}}catch(e){}return Gl(t,"}",r)},Kl=function(e,t,r,n,i,o){if(void 0===t&&(t=""),void 0===r&&(r={}),void 0===n&&(n=50),void 0===i&&(i=1e4),void 0===o&&(o=new WeakSet),o.has(e))return r[t||"circular"]="[Circular]",r;o.add(e);try{for(var a in e)try{if(!{}.hasOwnProperty.call(e,a))continue;var s=e[a],u=t?t+"."+a:a;if(Kt(s))Kl(s,u,r,n,i,o);else{if(n-=1,i-=String(s).length,i-=u.length,0>=n||0>=i)return void(r.attributes_truncated=!0);r[u]=s}}catch(e){continue}}catch(e){}return r},ec={log:"INFO",warn:"WARNING",error:"ERROR",debug:"DEBUG",info:"INFO"};en.__PosthogExtensions__=en.__PosthogExtensions__||{},en.__PosthogExtensions__.logs={initializeLogs(e){(e=>{var t,n={"service.name":(null==(t=e.config.logs)?void 0:t.serviceName)||"posthog-browser-logs",host:en.location.host};if(e.sessionManager){var{sessionId:i,windowId:o}=e.sessionManager.checkAndGetSessionAndWindowId(!0);n=r({},n,{"session.id":i,"window.id":o})}Ts.setGlobalLoggerProvider(new Zl({resource:Sl(n),processors:[new Ql(new Hl({url:e.config.api_host+"/i/v1/logs?token="+e.config.token,headers:{"Content-Type":"text/plain"}}))]}))})(e);var t=Ts.getLogger("console"),n={};if(e.sessionManager){var{sessionStartTimestamp:i,lastActivityTimestamp:o}=e.sessionManager.checkAndGetSessionAndWindowId(!0);n={sessionStartTimestamp:i.toString(),lastActivityTimestamp:o.toString()}}var a=function(i){var o;en.console[i]=(o=en.console[i],function(){for(var a=arguments.length,s=new Array(a),u=0;a>u;u++)s[u]=arguments[u];if(s.length>0){var{body:l,truncated:c}=((e,t)=>{for(var r=[],n={remaining:1e4,truncated:!1},i=0;e.length>i&&(0>=i||Gl(r," ",n))&&Yl(e[i],r,n,new WeakSet);i++);return{body:r.join("")+(n.truncated?"...":""),truncated:n.truncated}})(s),d=r({},n,c?{body_truncated:"true"}:{});t.emit({severityText:ec[i],body:l,attributes:r({"log.source":"console."+i,distinct_id:e.get_distinct_id(),"location.href":en.location.href},d,Kt(s[0])?Kl(s[0]):{})}),o.apply(en.console,s)}})};for(var s of["debug","log","warn","error","info"])a(s)}},on("[Error tracking]");var tc=on("[ExceptionAutocapture]"),rc=new class{constructor(e,t,r){void 0===r&&(r=[]),this.coercers=e,this.stackParser=t,this.modifiers=r}buildFromUnknown(e,t){void 0===t&&(t={});var r=t&&t.mechanism||{handled:!0,type:"generic"},n=this.buildCoercingContext(r,t,0).apply(e),i=this.buildParsingContext(t),o=this.parseStacktrace(n,i);return{$exception_list:this.convertToExceptionList(o,r),$exception_level:"error"}}modifyFrames(e){var r=this;return t((function*(){for(var t of e)t.stacktrace&&t.stacktrace.frames&&Xt(t.stacktrace.frames)&&(t.stacktrace.frames=yield r.applyModifiers(t.stacktrace.frames));return e}))()}coerceFallback(e){var t;return{type:"Error",value:"Unknown error",stack:null==(t=e.syntheticException)?void 0:t.stack,synthetic:!0}}parseStacktrace(e,t){var n,i;return null!=e.cause&&(n=this.parseStacktrace(e.cause,t)),""!=e.stack&&null!=e.stack&&(i=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?t.skipFirstLines:0),t.chunkIdMap)),r({},e,{cause:n,stack:i})}applyChunkIds(e,t){return e.map((e=>(e.filename&&t&&(e.chunk_id=t[e.filename]),e)))}applyCoercers(e,t){for(var r of this.coercers)if(r.match(e))return r.coerce(e,t);return this.coerceFallback(t)}applyModifiers(e){var r=this;return t((function*(){var t=e;for(var n of r.modifiers)t=yield n(t);return t}))()}convertToExceptionList(e,t){var n,i,o,a={type:e.type,value:e.value,mechanism:{type:null!==(n=t.type)&&void 0!==n?n:"generic",handled:null===(i=t.handled)||void 0===i||i,synthetic:null!==(o=e.synthetic)&&void 0!==o&&o}};e.stack&&(a.stacktrace={type:"raw",frames:e.stack});var s=[a];return null!=e.cause&&s.push(...this.convertToExceptionList(e.cause,r({},t,{handled:!0}))),s}buildParsingContext(e){var t;return{chunkIdMap:Ar(this.stackParser),skipFirstLines:null!==(t=e.skipFirstLines)&&void 0!==t?t:1}}buildCoercingContext(e,t,n){void 0===n&&(n=0);var i=(r,n)=>{if(4>=n){var i=this.buildCoercingContext(e,t,n);return this.applyCoercers(r,i)}};return r({},t,{syntheticException:0==n?t.syntheticException:void 0,mechanism:e,apply:e=>i(e,n),next:e=>i(e,n+1)})}}([new class{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,t){var r=tr(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:r?e.stack:void 0,cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return this.isDOMError(e)?"DOMError":"DOMException"}getValue(e){var t=e.name||(this.isDOMError(e)?"DOMError":"DOMException");return e.message?t+": "+e.message:t}isDOMException(e){return ur(e,"DOMException")}isDOMError(e){return ur(e,"DOMError")}},new class{match(e){return ur(e,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(e)}isCustomEventWrappingRejection(e){if(!lr(e))return!1;try{var t=e.detail;return null!=t&&"object"==typeof t&&"reason"in t}catch(e){return!1}}coerce(e,t){var r,n=this.getUnhandledRejectionReason(e);return sr(n)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(n),stack:null==(r=t.syntheticException)?void 0:r.stack,synthetic:!0}:t.apply(n)}getUnhandledRejectionReason(e){try{if("reason"in e)return e.reason;if("detail"in e&&null!=e.detail&&"object"==typeof e.detail&&"reason"in e.detail)return e.detail.reason}catch(e){}return e}},new class{constructor(){}match(e){return ur(e,"ErrorEvent")&&null!=e.error}coerce(e,t){var r;return t.apply(e.error)||{type:"ErrorEvent",value:e.message,stack:null==(r=t.syntheticException)?void 0:r.stack,synthetic:!0}}},new class{match(e){return e instanceof Error}coerce(e,t){return{type:this.getType(e),value:this.getMessage(e,t),stack:this.getStack(e),cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return e.name||e.constructor.name}getMessage(e,t){var r=e.message;return String(r.error&&"string"==typeof r.error.message?r.error.message:r)}getStack(e){return e.stacktrace||e.stack||void 0}},new class{match(e){return lr(e)}coerce(e,t){var r,n=e.constructor.name;return{type:n,value:n+" captured as exception with keys: "+Qr(e),stack:null==(r=t.syntheticException)?void 0:r.stack,synthetic:!0}}},new class{match(e){return"object"==typeof e&&null!==e}coerce(e,t){var r,n=this.getErrorPropertyFromObject(e);return n?t.apply(n):{type:this.getType(e),value:this.getValue(e),stack:null==(r=t.syntheticException)?void 0:r.stack,level:this.isSeverityLevel(e.level)?e.level:"error",synthetic:!0}}getType(e){return lr(e)?e.constructor.name:"Error"}getValue(e){if("name"in e&&"string"==typeof e.name){var t="'"+e.name+"' captured as exception";return"message"in e&&"string"==typeof e.message&&(t+=" with message: '"+e.message+"'"),t}if("message"in e&&"string"==typeof e.message)return e.message;var r=this.getObjectClassName(e);return(r&&"Object"!==r?"'"+r+"'":"Object")+" captured as exception with keys: "+Qr(e)}isSeverityLevel(e){return tr(e)&&!(e=>tr(e)&&0===e.trim().length)(e)&&$r.indexOf(e)>=0}getErrorPropertyFromObject(e){for(var t in e)if({}.hasOwnProperty.call(e,t)){var r=e[t];if(r instanceof Error)return r}}getObjectClassName(e){try{var t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){return}}},new class{match(e){return"string"==typeof e}coerce(e,t){var r,[n,i]=this.getInfos(e);return{type:null!=n?n:"Error",value:null!=i?i:e,stack:null==(r=t.syntheticException)?void 0:r.stack,synthetic:!0}}getInfos(e){var t="Error",r=e,n=e.match(Zr);return n&&(t=n[1],r=n[2]),[t,r]}},new class{match(e){return sr(e)}coerce(e,t){var r;return{type:"Error",value:"Primitive value captured as exception: "+String(e),stack:null==(r=t.syntheticException)?void 0:r.stack,synthetic:!0}}}],function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;t>i;i++)n[i-1]=arguments[i];return function(t,i){void 0===i&&(i=0);for(var o=[],a=t.split("\n"),s=i;a.length>s;s++){var u=a[s];if(1024>=u.length){var l=zr.test(u)?u.replace(zr,"$1"):u;if(!l.match(/\S*Error: /)){for(var c of n){var d=c(l,e);if(d){o.push(d);break}}if(o.length>=50)break}}}return function(e){if(!e.length)return[];var t=Array.from(e);return t.reverse(),t.slice(0,50).map((e=>{return r({},e,{filename:e.filename||(n=t,n[n.length-1]||{}).filename,function:e.function||Pr});var n}))}(o)}}("web:javascript",Ur,Wr)),nc={wrapOnError(e){var t=Gr;t||tc.info("window not available, cannot wrap onerror");var r=t.onerror;return t.onerror=function(){for(var t,n=arguments.length,i=new Array(n),o=0;n>o;o++)i[o]=arguments[o];var a=rc.buildFromUnknown(i[4]||i[0],{mechanism:{handled:!1}});return e(a),null!==(t=null==r?void 0:r(...i))&&void 0!==t&&t},t.onerror.__POSTHOG_INSTRUMENTED__=!0,()=>{var e;null==(e=t.onerror)||delete e.__POSTHOG_INSTRUMENTED__,t.onerror=r}},wrapUnhandledRejection(e){var t=Gr;t||tc.info("window not available, cannot wrap onUnhandledRejection");var r=t.onunhandledrejection;return t.onunhandledrejection=function(t){var n,i=rc.buildFromUnknown(t,{mechanism:{handled:!1}});return e(i),null!==(n=null==r?void 0:r(t))&&void 0!==n&&n},t.onunhandledrejection.__POSTHOG_INSTRUMENTED__=!0,()=>{var e;null==(e=t.onunhandledrejection)||delete e.__POSTHOG_INSTRUMENTED__,t.onunhandledrejection=r}},wrapConsoleError(e){var t=console;t||tc.info("console not available, cannot wrap console.error");var r=t.error;return t.error=function(){for(var t,n=arguments.length,i=new Array(n),o=0;n>o;o++)i[o]=arguments[o];t=1==i.length?i[0]:i.join(" ");var a=i.find((e=>e instanceof Error)),s=rc.buildFromUnknown(a||t,{mechanism:{handled:!1},syntheticException:new Error("PostHog syntheticException"),skipFirstLines:2});return e(s),null==r?void 0:r(...i)},t.error.__POSTHOG_INSTRUMENTED__=!0,()=>{var e;null==(e=t.error)||delete e.__POSTHOG_INSTRUMENTED__,t.error=r}}};en.__PosthogExtensions__=en.__PosthogExtensions__||{},en.__PosthogExtensions__.errorWrappingFunctions=nc,en.posthogErrorWrappingFunctions=nc;var ic="X-POSTHOG-SESSION-ID",oc="X-POSTHOG-WINDOW-ID",ac="X-POSTHOG-DISTINCT-ID",sc=[ic,oc,ac],uc=(e,t,r,n)=>{var i;try{i=new URL(n.url).hostname}catch(e){return}if(!Xt(e)||e.includes(i)){if(r){var{sessionId:o,windowId:a}=r.checkAndGetSessionAndWindowId(!0);n.headers.set(ic,o),n.headers.set(oc,a)}"$posthog_cookieless"!==t&&n.headers.set(ac,t)}};en.__PosthogExtensions__=en.__PosthogExtensions__||{};var lc={_patchFetch:(e,r,n)=>dn(Gr,"fetch",(i=>function(){var o=t((function*(t,o){var a=new Request(t,o);return uc(e,r,n,a),i(a)}));return function(e,t){return o.apply(this,arguments)}}())),_patchXHR:(e,t,r)=>dn(Gr.XMLHttpRequest.prototype,"open",(n=>function(i,o,a,s,u){void 0===a&&(a=!0);var l=this,c=new Request(o);uc(e,t,r,c);var d=n.call(l,i,c.url,a,s,u);return sc.forEach((e=>{var t=c.headers.get(e);t&&l.setRequestHeader(e,t)})),d}))};en.__PosthogExtensions__.tracingHeadersPatchFns=lc,en.postHogTracingHeadersPatchFns=lc;var cc=-1,dc=e=>{addEventListener("pageshow",(t=>{t.persisted&&(cc=t.timeStamp,e(t))}),!0)},hc=(e,t,r,n)=>{var i,o;return a=>{t.value>=0&&(a||n)&&((o=t.value-(null!=i?i:0))||void 0===i)&&(i=t.value,t.delta=o,t.rating=((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good")(t.value,r),e(t))}},vc=e=>{requestAnimationFrame((()=>requestAnimationFrame((()=>e()))))},fc=()=>{var e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},pc=()=>{var e,t=fc();return null!==(e=null==t?void 0:t.activationStart)&&void 0!==e?e:0},mc=function(e,t){void 0===t&&(t=-1);var r=fc(),n="navigate";return 0>cc?r&&(document.prerendering||pc()>0?n="prerender":document.wasDiscarded?n="restore":r.type&&(n=r.type.replace(/_/g,"-"))):n="back-forward-cache",{name:e,value:t,rating:"good",delta:0,entries:[],id:"v5-"+Date.now()+"-"+(Math.floor(8999999999999*Math.random())+1e12),navigationType:n}},yc=new WeakMap;function gc(e,t){return yc.get(e)||yc.set(e,new t),yc.get(e)}class bc{constructor(){this.t=void 0,this.i=0,this.o=[]}h(e){var t;if(!e.hadRecentInput){var r=this.o[0],n=this.o.at(-1);this.i&&r&&n&&1e3>e.startTime-n.startTime&&5e3>e.startTime-r.startTime?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),null==(t=this.t)||t.call(this,e)}}}var wc,kc=function(e,t,n){void 0===n&&(n={});try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var i=new PerformanceObserver((e=>{Promise.resolve().then((()=>{t(e.getEntries())}))}));return i.observe(r({type:e,buffered:!0},n)),i}}catch(e){}},xc=e=>{var t=!1;return()=>{t||(e(),t=!0)}},Sc=-1,Cc=new Set,Ic=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,Tc=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(var t of Cc)t();isFinite(Sc)||(Sc="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",Tc,!0))}},Mc=()=>{if(0>Sc){var e,t=pc(),r=document.prerendering||null==(e=globalThis.performance.getEntriesByType("visibility-state").filter((e=>"hidden"===e.name&&e.startTime>t))[0])?void 0:e.startTime;Sc=null!=r?r:Ic(),addEventListener("visibilitychange",Tc,!0),addEventListener("prerenderingchange",Tc,!0),dc((()=>{setTimeout((()=>{Sc=Ic()}))}))}return{get firstHiddenTime(){return Sc},onHidden(e){Cc.add(e)}}},_c=e=>{document.prerendering?addEventListener("prerenderingchange",(()=>e()),!0):e()},Lc=[1800,3e3],Oc=function(e,t){void 0===t&&(t={}),_c((()=>{var r,n=Mc(),i=mc("FCP"),o=kc("paint",(e=>{for(var t of e)"first-contentful-paint"===t.name&&(o.disconnect(),n.firstHiddenTime>t.startTime&&(i.value=Math.max(t.startTime-pc(),0),i.entries.push(t),r(!0)))}));o&&(r=hc(e,i,Lc,t.reportAllChanges),dc((n=>{i=mc("FCP"),r=hc(e,i,Lc,t.reportAllChanges),vc((()=>{i.value=performance.now()-n.timeStamp,r(!0)}))})))}))},Ec=[.1,.25],Rc=0,Nc=1/0,Ac=0,Pc=e=>{for(var t of e)t.interactionId&&(Nc=Math.min(Nc,t.interactionId),Ac=Math.max(Ac,t.interactionId),Rc=Ac?(Ac-Nc)/7+1:0)},qc=()=>{var e;return wc?Rc:null!==(e=performance.interactionCount)&&void 0!==e?e:0},Dc=0;class Fc{constructor(){this.u=[],this.l=new Map,this.m=void 0,this.p=void 0}v(){Dc=qc(),this.u.length=0,this.l.clear()}L(){var e=Math.min(this.u.length-1,Math.floor((qc()-Dc)/50));return this.u[e]}h(e){var t;if(null!=(t=this.m)&&t.call(this,e),e.interactionId||"first-input"===e.entryType){var r=this.u.at(-1),n=this.l.get(e.interactionId);if(n||10>this.u.length||e.duration>r.P){var i;if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(this.l.set((n={id:e.interactionId,entries:[e],P:e.duration}).id,n),this.u.push(n)),this.u.sort(((e,t)=>t.P-e.P)),this.u.length>10){var o=this.u.splice(10);for(var a of o)this.l.delete(a.id)}null==(i=this.p)||i.call(this,n)}}}}var jc=e=>{var t=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?e():(e=xc(e),addEventListener("visibilitychange",e,{once:!0,capture:!0}),t((()=>{e(),removeEventListener("visibilitychange",e,{capture:!0})})))},Hc=[200,500];class Uc{constructor(){this.m=void 0}h(e){var t;null==(t=this.m)||t.call(this,e)}}var Bc=[2500,4e3],Vc={onLCP(e,t){void 0===t&&(t={}),_c((()=>{var r,n=Mc(),i=mc("LCP"),o=gc(t,Uc),a=e=>{for(var a of(t.reportAllChanges||(e=e.slice(-1)),e))o.h(a),n.firstHiddenTime>a.startTime&&(i.value=Math.max(a.startTime-pc(),0),i.entries=[a],r())},s=kc("largest-contentful-paint",a);if(s){r=hc(e,i,Bc,t.reportAllChanges);var u=xc((()=>{a(s.takeRecords()),s.disconnect(),r(!0)})),l=e=>{e.isTrusted&&(jc(u),removeEventListener(e.type,l,{capture:!0}))};for(var c of["keydown","click","visibilitychange"])addEventListener(c,l,{capture:!0});dc((n=>{i=mc("LCP"),r=hc(e,i,Bc,t.reportAllChanges),vc((()=>{i.value=performance.now()-n.timeStamp,r(!0)}))}))}}))},onCLS(e,t){void 0===t&&(t={});var r=Mc();Oc(xc((()=>{var n,i=mc("CLS",0),o=gc(t,bc),a=e=>{for(var t of e)o.h(t);o.i>i.value&&(i.value=o.i,i.entries=o.o,n())},s=kc("layout-shift",a);s&&(n=hc(e,i,Ec,t.reportAllChanges),r.onHidden((()=>{a(s.takeRecords()),n(!0)})),dc((()=>{o.i=0,i=mc("CLS",0),n=hc(e,i,Ec,t.reportAllChanges),vc((()=>n()))})),setTimeout(n))})))},onFCP:Oc,onINP(e,t){if(void 0===t&&(t={}),globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype){var r=Mc();_c((()=>{var n;"interactionCount"in performance||wc||(wc=kc("event",Pc,{type:"event",buffered:!0,durationThreshold:0}));var i,o=mc("INP"),a=gc(t,Fc),s=e=>{jc((()=>{for(var t of e)a.h(t);var r=a.L();r&&r.P!==o.value&&(o.value=r.P,o.entries=r.entries,i())}))},u=kc("event",s,{durationThreshold:null!==(n=t.durationThreshold)&&void 0!==n?n:40});i=hc(e,o,Hc,t.reportAllChanges),u&&(u.observe({type:"first-input",buffered:!0}),r.onHidden((()=>{s(u.takeRecords()),i(!0)})),dc((()=>{a.v(),o=mc("INP"),i=hc(e,o,Hc,t.reportAllChanges)})))}))}}};function Wc(e,t){return t.length>e?t.slice(0,e)+"...":t}function zc(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do{t=t.previousSibling}while(t&&!mn(t));return t}function Zc(e,t){var n,i,{e:o,maskAllElementAttributes:a,maskAllText:s,elementAttributeIgnoreList:u}=t;if(!mn(e))return{props:{}};for(var l=[e],c=e;c.parentNode&&!yn(c,"body");)if(gn(c.parentNode))l.push(c.parentNode.host),c=c.parentNode.host;else{if(!mn(c.parentNode))break;l.push(c.parentNode),c=c.parentNode}var d,h,v,f,p=[],m={},y=!1,g=!1;if(an(l,(e=>{var t=Mn(e);if(yn(e,"a")){var r=e.getAttribute("href");y=t&&!!r&&Pn(r)&&r}Zt(wn(e),"ph-no-capture")&&(g=!0),p.push(function(e,t,r,n){var i=e.tagName.toLowerCase(),o={tag_name:i};xn.indexOf(i)>-1&&!r&&(o.$el_text="a"===i.toLowerCase()||"button"===i.toLowerCase()?Wc(1024,qn(e)):Wc(1024,kn(e)));var a=wn(e);a.length>0&&(o.classes=a.filter((function(e){return""!==e}))),an(e.attributes,(function(r){var i;if((!_n(e)||-1!==["name","id","class","aria-label"].indexOf(r.name))&&(null==n||!n.includes(r.name))&&!t&&Pn(r.value)&&(!tr(i=r.name)||"_ngcontent"!==i.substring(0,10)&&"_nghost"!==i.substring(0,7))){var a=r.value;"class"===r.name&&(a=bn(a).join(" ")),o["attr__"+r.name]=Wc(1024,a)}}));for(var s=1,u=1,l=e;l=zc(l);)s++,l.tagName===e.tagName&&u++;return o.nth_child=s,o.nth_of_type=u,o}(e,a,s,u));var n=function(e){if(!Mn(e))return{};var t={};return an(e.attributes,(function(e){if(e.name&&0===e.name.indexOf("data-ph-capture-attribute")){var r=e.name.replace("data-ph-capture-attribute-",""),n=e.value;r&&n&&Pn(n)&&(t[r]=n)}})),t}(e);sn(m,n)})),g)return{props:{},explicitNoCapture:g};if(s||(p[0].$el_text=yn(e,"a")||yn(e,"button")?qn(e):kn(e)),y){var b,w;p[0].attr__href=y;var k=null==(h=y,v=null==Yr?void 0:Yr.createElement("a"),b=er(v)?null:(v.href=h,v))?void 0:b.host,x=null==Gr||null==(w=Gr.location)?void 0:w.host;k&&x&&k!==x&&(d=y)}return{props:sn({$event_type:o.type,$ce_version:1},{$elements:p},{$elements_chain:(f=p,function(e){var t=e.map((e=>{var t,n,i="";if(e.tag_name&&(i+=e.tag_name),e.attr_class)for(var o of(e.attr_class.sort(),e.attr_class))i+="."+o.replace(/"/g,"");var a=r({},e.text?{text:e.text}:{},{"nth-child":null!==(t=e.nth_child)&&void 0!==t?t:0,"nth-of-type":null!==(n=e.nth_of_type)&&void 0!==n?n:0},e.href?{href:e.href}:{},e.attr_id?{attr_id:e.attr_id}:{},e.attributes),s={};return un(a).sort(((e,t)=>{var[r]=e,[n]=t;return r.localeCompare(n)})).forEach((e=>{var[t,r]=e;return s[Fn(t.toString())]=Fn(r.toString())})),(i+=":")+un(s).map((e=>{var[t,r]=e;return t+'="'+r+'"'})).join("")}));return t.join(";")}(function(e){return e.map((e=>{var t,r,n={text:null==(t=e.$el_text)?void 0:t.slice(0,400),tag_name:e.tag_name,href:null==(r=e.attr__href)?void 0:r.slice(0,2048),attr_class:jn(e),attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return un(e).filter((e=>{var[t]=e;return 0===t.indexOf("attr__")})).forEach((e=>{var[t,r]=e;return n.attributes[t]=r})),n}))}(f)))},null!=(n=p[0])&&n.$el_text?{$el_text:null==(i=p[0])?void 0:i.$el_text}:{},d&&"click"===o.type?{$external_click_url:d}:{},m)}}en.__PosthogExtensions__=en.__PosthogExtensions__||{},en.__PosthogExtensions__.postHogWebVitalsCallbacks=Vc,en.postHogWebVitalsCallbacks=Vc,en.__PosthogExtensions__.loadWebVitalsCallbacks=()=>Vc,on("[AutoCapture]");var $c={};function Qc(e){return function(e,t){var r=$c[e];if(r)return r;var n,i=t[e];if(Yt(n=i)&&-1!==n.toString().indexOf("[native code]")&&!Gr.Zone)return $c[e]=i.bind(t);var o=t.document;if(o&&Yt(o.createElement))try{var a=o.createElement("iframe");a.hidden=!0,o.head.appendChild(a);var s=a.contentWindow;s&&s[e]&&(i=s[e]),o.head.removeChild(a)}catch(t){nn.warn("Could not create sandbox iframe for "+e+" check, bailing to assignableWindow."+e+": ",t)}return i&&Yt(i)?$c[e]=i.bind(t):i}("MutationObserver",e)}function Gc(e,t){return ir(e)&&e>=t}class Jc{St(e){var t,r,n,i,o,a=this.Ct((null==e?void 0:e.__onCapture)||this.It.bind(this));return{element_attribute_ignorelist:null!==(t=null==e?void 0:e.element_attribute_ignorelist)&&void 0!==t?t:a.element_attribute_ignorelist,scroll_threshold_ms:null!==(r=null==e?void 0:e.scroll_threshold_ms)&&void 0!==r?r:a.scroll_threshold_ms,selection_change_threshold_ms:null!==(n=null==e?void 0:e.selection_change_threshold_ms)&&void 0!==n?n:a.selection_change_threshold_ms,mutation_threshold_ms:null!==(i=null==e?void 0:e.mutation_threshold_ms)&&void 0!==i?i:a.mutation_threshold_ms,capture_clicks_with_modifier_keys:null!==(o=null==e?void 0:e.capture_clicks_with_modifier_keys)&&void 0!==o?o:a.capture_clicks_with_modifier_keys,css_selector_ignorelist:null==e?void 0:e.css_selector_ignorelist,__onCapture:a.__onCapture}}constructor(e,t){this.Tt=[],this.Ct=e=>({element_attribute_ignorelist:[],scroll_threshold_ms:100,selection_change_threshold_ms:100,mutation_threshold_ms:2500,capture_clicks_with_modifier_keys:!1,__onCapture:e}),this.Mt=e=>{var t=function(e){var t=function(e){return er(e.target)?e.srcElement||null:null!=(t=e.target)&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t}(e);return t?{node:t,originalEvent:e,timestamp:Date.now()}:null}(e);rr(t)||this._t(t)||this.Tt.push(t),this.Tt.length&&er(this.Lt)&&(this.Lt=en.setTimeout((()=>{this.Ot()}),1e3))},this.Et=()=>{var e=Date.now();e%50==0&&this.Tt.forEach((t=>{er(t.scrollDelayMs)&&(t.scrollDelayMs=e-t.timestamp)}))},this.Rt=()=>{this.Nt=Date.now()},this.At=()=>{"visible"===(null==Yr?void 0:Yr.visibilityState)&&(this.Pt=Date.now())},this.instance=e,this.qt=this.St(t),this._onCapture=this.qt.__onCapture}start(e){this.Dt(),this.Ft(),this.jt(),this.Ht(),this.Ut(e)}Ut(e){if(!this.Bt){var t=Qc(en);this.Bt=new t((e=>{this.Vt(e)})),this.Bt.observe(e,{attributes:!0,characterData:!0,childList:!0,subtree:!0})}}stop(){var e;null==(e=this.Bt)||e.disconnect(),this.Bt=void 0,en.removeEventListener("click",this.Mt),en.removeEventListener("scroll",this.Et,{capture:!0}),en.removeEventListener("selectionchange",this.Rt),null==Yr||Yr.removeEventListener("visibilitychange",this.At)}Vt(e){this.Wt=Date.now()}Dt(){ln(en,"click",this.Mt)}Ft(){ln(en,"scroll",this.Et,{capture:!0})}jt(){ln(en,"selectionchange",this.Rt)}Ht(){ln(Yr,"visibilitychange",this.At)}_t(e){if(!e)return!0;if(!this.qt.capture_clicks_with_modifier_keys&&((t=e.originalEvent).ctrlKey||t.metaKey||t.altKey||t.shiftKey))return!0;var t,r;if((r=e.node)instanceof Element&&("__POSTHOG_TOOLBAR__"===r.id||null!=r.closest&&r.closest(".toolbar-global-fade-container")))return!0;var n=this.Tt.some((t=>t.node===e.node&&1e3>Math.abs(t.timestamp-e.timestamp)));return!(!n&&!yn(e.node,"html")&&mn(e.node)&&!function(e){if(!Gr||In(e))return!1;var{targetElementList:t}=Tn(e);return t.some((e=>yn(e,"a")))}(e.node)&&function(e,t){var r;if(!Gr||In(e))return!1;var n=or(t)?Cn:null!==(r=null==t?void 0:t.css_selector_ignorelist)&&void 0!==r?r:Cn,{targetElementList:i}=Tn(e);return!function(e,t){if(er(t))return!0;var r,n=function(e){if(t.some((t=>e.matches(t))))return{v:!0}};for(var i of e)if(r=n(i))return r.v;return!1}(i,n)}(e.node,{css_selector_ignorelist:this.qt.css_selector_ignorelist}))}Ot(){if(this.Tt.length){clearTimeout(this.Lt),this.Lt=void 0;var e=this.Tt;for(var t of(this.Tt=[],e)){var r;t.mutationDelayMs=null!==(r=t.mutationDelayMs)&&void 0!==r?r:this.Wt&&this.Wt>=t.timestamp?this.Wt-t.timestamp:void 0,t.absoluteDelayMs=Date.now()-t.timestamp,t.selectionChangedDelayMs=this.Nt&&this.Nt>=t.timestamp?this.Nt-t.timestamp:void 0,t.visibilityChangedDelayMs=this.Pt?Math.abs(t.timestamp-this.Pt):void 0;var n=Gc(t.scrollDelayMs,this.qt.scroll_threshold_ms),i=Gc(t.selectionChangedDelayMs,this.qt.selection_change_threshold_ms),o=Gc(t.mutationDelayMs,this.qt.mutation_threshold_ms),a=Gc(t.absoluteDelayMs,1.1*this.qt.mutation_threshold_ms),s=ir(t.scrollDelayMs)&&this.qt.scroll_threshold_ms>t.scrollDelayMs,u=ir(t.mutationDelayMs)&&this.qt.mutation_threshold_ms>t.mutationDelayMs,l=ir(t.selectionChangedDelayMs)&&this.qt.selection_change_threshold_ms>t.selectionChangedDelayMs,c=ir(t.visibilityChangedDelayMs)&&this.qt.selection_change_threshold_ms>t.visibilityChangedDelayMs;if(!(s||u||l||c)){var d=Gc(t.visibilityChangedDelayMs,this.qt.selection_change_threshold_ms);n||o||a||i||d?this._onCapture(t,{$dead_click_last_mutation_timestamp:this.Wt,$dead_click_event_timestamp:t.timestamp,$dead_click_scroll_timeout:n,$dead_click_mutation_timeout:o,$dead_click_absolute_timeout:a,$dead_click_selection_changed_timeout:i,$dead_click_visibility_changed_timeout:d}):this.qt.mutation_threshold_ms>t.absoluteDelayMs&&this.Tt.push(t)}}this.Tt.length&&er(this.Lt)&&(this.Lt=en.setTimeout((()=>{this.Ot()}),1e3))}}It(e,t){this.instance.capture("$dead_click",r({},t,Zc(e.node,{e:e.originalEvent,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.qt.element_attribute_ignorelist}).props,{$dead_click_scroll_delay_ms:e.scrollDelayMs,$dead_click_mutation_delay_ms:e.mutationDelayMs,$dead_click_absolute_delay_ms:e.absoluteDelayMs,$dead_click_selection_changed_delay_ms:e.selectionChangedDelayMs,$dead_click_visibility_changed_delay_ms:e.visibilityChangedDelayMs}),{timestamp:new Date(e.timestamp)})}}en.__PosthogExtensions__=en.__PosthogExtensions__||{},en.__PosthogExtensions__.initDeadClicksAutocapture=(e,t)=>new Jc(e,t)}();
|
|
2
2
|
//# sourceMappingURL=all-external-dependencies.js.map
|