@appsurify-testmap/rrweb-snapshot 3.1.1-alpha.2 → 3.2.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  (function (g, f) {if ("object" == typeof exports && "object" == typeof module) {module.exports = f();} else if ("function" == typeof define && define.amd) {define("rrwebSnapshot", [], f);} else if ("object" == typeof exports) {exports["rrwebSnapshot"] = f();} else {g["rrwebSnapshot"] = f();}}(typeof self !== 'undefined' ? self : typeof globalThis !== 'undefined' ? globalThis : this, () => {var exports = {};var module = { exports };
2
- "use strict";var Ms=Object.defineProperty,Ts=Object.defineProperties;var ks=Object.getOwnPropertyDescriptors;var be=Object.getOwnPropertySymbols;var Ft=Object.prototype.hasOwnProperty,Ut=Object.prototype.propertyIsEnumerable;var zt=(s,e,t)=>e in s?Ms(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,$=(s,e)=>{for(var t in e||(e={}))Ft.call(e,t)&&zt(s,t,e[t]);if(be)for(var t of be(e))Ut.call(e,t)&&zt(s,t,e[t]);return s},Z=(s,e)=>Ts(s,ks(e));var Ye=(s,e)=>{var t={};for(var r in s)Ft.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&be)for(var r of be(s))e.indexOf(r)<0&&Ut.call(s,r)&&(t[r]=s[r]);return t};var $s=Object.defineProperty,Ls=(s,e,t)=>e in s?$s(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Je=(s,e,t)=>Ls(s,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var w=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(w||{});const Bt={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Wt={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},xe={},_s=()=>!!globalThis.Zone;function Ct(s){if(xe[s])return xe[s];const e=globalThis[s],t=e.prototype,r=s in Bt?Bt[s]:void 0,i=!!(r&&r.every(l=>{var a,c;return!!((c=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&c.toString().includes("[native code]"))})),n=s in Wt?Wt[s]:void 0,o=!!(n&&n.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(i&&o&&!_s())return xe[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const a=l.contentWindow;if(!a)return e.prototype;const c=a[s].prototype;return document.body.removeChild(l),c?xe[s]=c:t}catch(l){return t}}const Qe={};function Y(s,e,t){var r;const i=`${s}.${String(t)}`;if(Qe[i])return Qe[i].call(e);const n=Ct(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(Qe[i]=o,o.call(e)):e[t]}const Ke={};function br(s,e,t){const r=`${s}.${String(t)}`;if(Ke[r])return Ke[r].bind(e);const n=Ct(s)[t];return typeof n!="function"?e[t]:(Ke[r]=n,n.bind(e))}function Ps(s){return Y("Node",s,"childNodes")}function Ds(s){return Y("Node",s,"parentNode")}function Is(s){return Y("Node",s,"parentElement")}function zs(s){return Y("Node",s,"textContent")}function Fs(s,e){return br("Node",s,"contains")(e)}function Us(s){return br("Node",s,"getRootNode")()}function Bs(s){return!s||!("host"in s)?null:Y("ShadowRoot",s,"host")}function Ws(s){return s.styleSheets}function Hs(s){return!s||!("shadowRoot"in s)?null:Y("Element",s,"shadowRoot")}function js(s,e){return Y("Element",s,"querySelector")(e)}function Vs(s,e){return Y("Element",s,"querySelectorAll")(e)}function Gs(){return Ct("MutationObserver").constructor}function qs(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch(r){return()=>{}}}function Ys(s){const e=s.tagName.toLowerCase(),t=s.id?`#${s.id}`:"",r=s.classList.length?"."+Array.from(s.classList).join("."):"";return`${e}${t}${r}`}function Js(s){var f;var e,t;const r=(f=(e=s.ownerDocument)==null?void 0:e.defaultView)!=null?f:window,i=s.getBoundingClientRect(),n=r.innerWidth||r.document.documentElement.clientWidth||0,o=r.innerHeight||r.document.documentElement.clientHeight||0,l=i.width>0&&i.height>0&&i.bottom>0&&i.right>0&&i.top<o&&i.left<n,a=(t=r.getComputedStyle)==null?void 0:t.call(r,s),u=!!a&&a.display!=="none"&&a.visibility!=="hidden"&&(parseFloat(a.opacity)||0)>0&&l;let h=0;if(u){const d=Math.max(0,Math.min(i.right,n)-Math.max(i.left,0)),m=Math.max(0,Math.min(i.bottom,o)-Math.max(i.top,0)),x=d*m,p=i.width*i.height;h=p>0?x/p:0}return{isVisible:u,ratio:h}}const M={childNodes:Ps,parentNode:Ds,parentElement:Is,textContent:zs,contains:Fs,getRootNode:Us,host:Bs,styleSheets:Ws,shadowRoot:Hs,querySelector:js,querySelectorAll:Vs,mutationObserver:Gs,patch:qs,describeNode:Ys,getElementVisibility:Js};function re(s){return s.nodeType===s.ELEMENT_NODE}function xr(s){const e=s&&"host"in s&&"mode"in s&&M.host(s)||null;return!!(e&&"shadowRoot"in e&&M.shadowRoot(e)===s)}function Te(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function Qs(s){return s.includes(" background-clip: text;")&&!s.includes(" -webkit-background-clip: text;")&&(s=s.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),s}function Cr(s){const{cssText:e}=s;if(e.split('"').length<3)return e;const t=["@import",`url(${JSON.stringify(s.href)})`];return s.layerName===""?t.push("layer"):s.layerName&&t.push(`layer(${s.layerName})`),s.supportsText&&t.push(`supports(${s.supportsText})`),s.media.length&&t.push(s.media.mediaText),t.join(" ")+";"}function Le(s){try{const e=s.rules||s.cssRules;if(!e)return null;let t=s.href;!t&&s.ownerNode&&s.ownerNode.ownerDocument&&(t=s.ownerNode.ownerDocument.location.href);const r=Array.from(e,i=>Sr(i,t)).join("");return Qs(r)}catch(e){return null}}function Sr(s,e){if(Er(s)){let t;try{t=Le(s.styleSheet)||Cr(s)}catch(r){t=s.cssText}return s.styleSheet.href?ue(t,s.styleSheet.href):t}else{let t=s.cssText;return s.type===CSSRule.KEYFRAMES_RULE||(s.type,CSSRule.KEYFRAME_RULE),Ar(s)&&s.selectorText.includes(":")&&(t=vr(t)),e?ue(t,e):t}}function vr(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function Er(s){return"styleSheet"in s}function Ar(s){return"selectorText"in s}class Fe{constructor(){Je(this,"idNodeMap",new Map),Je(this,"nodeMetaMap",new WeakMap),Je(this,"selectorNodeMap",new Map)}getId(e){var t;if(!e)return-1;const r=(t=this.getMeta(e))==null?void 0:t.id;return r!=null?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){const t=this.getId(e);this.idNodeMap.delete(t);const r=this.getMeta(e);if(r!=null&&r.selector){const i=this.selectorNodeMap.get(r.selector);i&&(i.delete(e),i.size===0&&this.selectorNodeMap.delete(r.selector))}e.childNodes&&e.childNodes.forEach(i=>this.removeNodeFromMap(i))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;if(this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t),t.selector){let i=this.selectorNodeMap.get(t.selector);i||(i=new Set,this.selectorNodeMap.set(t.selector,i)),i.add(e)}}replace(e,t){const r=this.getNode(e);if(r){const i=this.nodeMetaMap.get(r);if(i&&(this.nodeMetaMap.set(t,i),i.selector)){const n=this.selectorNodeMap.get(i.selector);n&&(n.delete(r),n.add(t))}}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap,this.selectorNodeMap=new Map}getNodeBySelector(e){const t=this.selectorNodeMap.get(e);return!t||t.size===0?null:t.values().next().value||null}getNodesBySelector(e){const t=this.selectorNodeMap.get(e);return t?Array.from(t):[]}hasSelector(e){const t=this.selectorNodeMap.get(e);return t!==void 0&&t.size>0}}function Ks(){return new Fe}function Rr({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:n}){let o=i||"";const l=r&&ge(r);return(e[t.toLowerCase()]||l&&e[l])&&(n?o=n(o,s):o="*".repeat(o.length)),o}function ge(s){return s.toLowerCase()}const Ht="__rrweb_original__";function Nr(s){const e=s.getContext("2d");if(!e)return!0;const t=50;for(let r=0;r<s.width;r+=t)for(let i=0;i<s.height;i+=t){const n=e.getImageData,o=Ht in n?n[Ht]:n;if(new Uint32Array(o.call(e,r,i,Math.min(t,s.width-r),Math.min(t,s.height-i)).data.buffer).some(a=>a!==0))return!1}return!0}function Or(s,e){return!s||!e||s.type!==e.type?!1:s.type===w.Document?s.compatMode===e.compatMode:s.type===w.DocumentType?s.name===e.name&&s.publicId===e.publicId&&s.systemId===e.systemId:s.type===w.Comment||s.type===w.Text||s.type===w.CDATA?s.textContent===e.textContent:s.type===w.Element?s.tagName===e.tagName&&JSON.stringify(s.attributes)===JSON.stringify(e.attributes)&&s.isSVG===e.isSVG&&s.needBlock===e.needBlock:!1}function Mr(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?ge(e):null}function Ue(s,e){var n;let t;try{t=new URL(s,e!=null?e:window.location.href)}catch(o){return null}const r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return(n=i==null?void 0:i[1])!=null?n:null}function Zs(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const Xs=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ei=/^(?:[a-z+]+:)?\/\//i,ti=/^www\..*/i,ri=/^(data:)([^,]*),(.*)/i;function ue(s,e){return(s||"").replace(Xs,(t,r,i,n,o,l)=>{const a=i||o||l,c=r||n||"";if(!a)return t;if(ei.test(a)||ti.test(a))return`url(${c}${a}${c})`;if(ri.test(a))return`url(${c}${a}${c})`;if(a[0]==="/")return`url(${c}${Zs(e)+a}${c})`;const u=e.split("/"),h=a.split("/");u.pop();for(const f of h)f!=="."&&(f===".."?u.pop():u.push(f));return`url(${c}${u.join("/")}${c})`})}function ce(s,e=!1){return e?s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Tr(s,e,t=!1){const r=Array.from(e.childNodes),i=[];let n=0;if(r.length>1&&s&&typeof s=="string"){let o=ce(s,t);const l=o.length/s.length;for(let a=1;a<r.length;a++)if(r[a].textContent&&typeof r[a].textContent=="string"){const c=ce(r[a].textContent,t),u=100;let h=3;for(;h<c.length&&(c[h].match(/[a-zA-Z0-9]/)||c.indexOf(c.substring(0,h),1)!==-1);h++);for(;h<c.length;h++){let f=c.substring(0,h),d=o.split(f),m=-1;if(d.length===2)m=d[0].length;else if(d.length>2&&d[0]===""&&r[a-1].textContent!=="")m=o.indexOf(f,1);else if(d.length===1){if(f=f.substring(0,f.length-1),d=o.split(f),d.length<=1)return i.push(s),i;h=u+1}else h===c.length-1&&(m=o.indexOf(f));if(d.length>=2&&h>u){const x=r[a-1].textContent;if(x&&typeof x=="string"){const p=ce(x).length;m=o.indexOf(f,p)}m===-1&&(m=d[0].length)}if(m!==-1){let x=Math.floor(m/l);for(;x>0&&x<s.length;){if(n+=1,n>50*r.length)return i.push(s),i;const p=ce(s.substring(0,x),t);if(p.length===m){i.push(s.substring(0,x)),s=s.substring(x),o=o.substring(m);break}else p.length<m?x+=Math.max(1,Math.floor((m-p.length)/l)):x-=Math.max(1,Math.floor((p.length-m)*l))}break}}}}return i.push(s),i}function kr(s,e){return Tr(s,e).join("/* rr_split */")}function $r(s){var e;const t=M.parentNode(s),r=t&&t;return!r||!St(r)?!1:((e=s.textContent)==null?void 0:e.trim())!==""}function St(s){return M.getElementVisibility(s).isVisible}const Lr=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],_r=["a","button","input","select","textarea","label","details","summary","dialog","video","audio"],si=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],vt=new WeakSet,ii=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(s,e,t){if(ii.call(this,s,e,t),this instanceof Element){const r=s.toLowerCase();Lr.includes(r)&&vt.add(this)}};const ni=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(s,e,t){ni.call(this,s,e,t)};function oi(s){return s instanceof Element&&vt.has(s)}function Pr(s){if(s.nodeType===Node.ELEMENT_NODE){const e=s,t=e.tagName.toLowerCase();if(_r.includes(t))return!0;const r=e.hasAttribute("tabindex")&&e.getAttribute("tabindex")!=="-1",i=["button","link","checkbox","switch","menuitem"].includes(e.getAttribute("role")||"");return oi(e)||r||i||e instanceof HTMLAnchorElement&&e.hasAttribute("href")||e instanceof HTMLButtonElement&&!e.disabled}return!1}function jt(){document.querySelectorAll("*").forEach(e=>{si.forEach(t=>{e.hasAttribute(t)&&vt.add(e)})})}try{document.readyState==="complete"||document.readyState==="interactive"?jt():document.addEventListener("DOMContentLoaded",jt)}catch(s){}const Ce={ANCHOR:.4,PATH:.3,TARGET:.2,UNIQUENESS:.1},B={SEMANTIC_TAG:.5,ROLE:.3,ARIA_LABEL:.1,STABLE_ID:.25,TEST_MARKER:.05,DEPTH_PENALTY_THRESHOLD:5,DEPTH_PENALTY_FACTOR:.05,DEGRADED_SCORE:.3},ai={MIN_CONFIDENCE_FOR_SKIP:.7},Vt=["form","main","nav","section","article","footer","header"],Gt=["form","navigation","main","region","contentinfo","complementary","banner","search"],li=["article","aside","details","figcaption","figure","footer","header","main","mark","nav","section","summary","time","button","datalist","fieldset","form","input","label","legend","meter","optgroup","option","output","progress","select","textarea","a","audio","video","canvas","dialog","menu","blockquote","dd","dl","dt","hr","li","ol","ul","p","pre","h1","h2","h3","h4","h5","h6","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr","svg","path","circle","rect","line","polyline","polygon","ellipse","g","text","use"],q={"data-testid":100,"data-qa":99,"data-cy":98,"data-test":97,"data-test-id":96,"aria-label":90,"aria-labelledby":85,"aria-describedby":80,name:75,href:70,src:70,type:65,role:60,alt:55,title:50,for:45,placeholder:40,"data-*":30,"aria-*":25},Dr=new Set(["id","class","style","xmlns","tabindex","contenteditable"]),ci={maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:0,fallbackToBody:!0,includeUtilityClasses:!1,source:"dom-dsl"};function he(s){return!!(/^[a-z]+-\d+$/i.test(s)||/^[a-z]+(-[a-z]+)+-\d+$/i.test(s)||/^[a-z]+(_[a-z]+)*_\d+$/i.test(s)||/^\d+$/.test(s)||/^:[a-z0-9]+:$/i.test(s)||/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i.test(s)||/^[a-z]{1,3}[A-Za-z0-9]{8,}$/.test(s)&&(/\d/.test(s)||/[A-Z]/.test(s))||/^radix-/.test(s)||/^mui-\d+$/.test(s))}const Ir=new Set(["aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-activedescendant","for","form","list","headers","aria-details","aria-errormessage","aria-flowto"]);function zr(s){return s.trim().split(/\s+/).some(e=>he(e))}class ui{constructor(e,t){var r;this.maxDepth=(r=e.maxPathDepth)!=null?r:10,this.cache=t}findAnchor(e){if(this.cache){const a=this.cache.getAnchor(e);if(a!==void 0)return a}const t=e.tagName.toLowerCase(),r=e.ownerDocument;if(t==="html"){const a={element:e,score:1,tier:"A",depth:0};return this.cacheResult(e,a),a}if(t==="head"||this.isInsideHead(e)){const a=r==null?void 0:r.documentElement;if(a){const c={element:a,score:1,tier:"A",depth:0};return this.cacheResult(e,c),c}}if(t==="body"){const a=r==null?void 0:r.documentElement;if(a){const c={element:a,score:1,tier:"A",depth:0};return this.cacheResult(e,c),c}}let i=e.parentElement,n=0,o=null;for(;i&&n<this.maxDepth;){if(i.tagName.toLowerCase()==="body")return o||{element:i,score:B.DEGRADED_SCORE,tier:"C",depth:n};const a=this.scoreAnchor(i);if(a>0){const c=this.applyDepthPenalty(a,n),u=this.getTier(i),h={element:i,score:c,tier:u,depth:n};if(u==="A")return h;(!o||c>o.score)&&(o=h)}i=i.parentElement,n++}const l=o;return this.cache&&this.cache.setAnchor(e,l),l}scoreAnchor(e){let t=0;const r=e.tagName.toLowerCase();Vt.includes(r)&&(t+=B.SEMANTIC_TAG);const i=e.getAttribute("role");i&&Gt.includes(i)&&(t+=B.ROLE),(e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby"))&&(t+=B.ARIA_LABEL);const n=e.id;return n&&!he(n)&&(t+=B.STABLE_ID),(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))&&(t+=B.TEST_MARKER),Math.min(t,1)}applyDepthPenalty(e,t){if(t<=B.DEPTH_PENALTY_THRESHOLD)return e;const r=(t-B.DEPTH_PENALTY_THRESHOLD)*B.DEPTH_PENALTY_FACTOR;return Math.max(0,e-r)}getTier(e){const t=e.tagName.toLowerCase();if(Vt.includes(t))return"A";const r=e.getAttribute("role");return r&&Gt.includes(r)?"B":"C"}isInsideHead(e){let t=e.parentElement;for(;t;){const r=t.tagName.toLowerCase();if(r==="head")return!0;if(r==="body")return!1;t=t.parentElement}return!1}cacheResult(e,t){this.cache&&this.cache.setAnchor(e,t)}}const hi=[/^css-[a-z0-9]+$/i,/^sc-[a-z0-9]+-\d+$/i,/^[a-z]{5,8}$/i,/^Mui[A-Z]\w+-\w+-\w+/,/^makeStyles-\w+-\d+$/,/^jss\d+$/,/^(emotion|linaria)-[a-z0-9]+/i,/^(chakra|tw-|ant-)[a-z0-9]+-\w+/i,/-[a-f0-9]{6,}$/i,/^_[a-z0-9]{5,}$/i,/\d{5,}/],fi=[/^\[/,/^(first|last|odd|even|only|first-of-type|last-of-type|only-of-type):/,/^(hover|focus|active|disabled|enabled|checked|indeterminate|default|required|valid|invalid|in-range|out-of-range|placeholder-shown|autofill|read-only):/,/^(focus-within|focus-visible|visited|target|open):/,/^(sm|md|lg|xl|2xl|3xl|4xl|5xl|6xl|7xl):/,/^dark:/,/^(rtl|ltr):/,/^(group|peer)(-hover|-focus|-active)?:/,/\/([\d.]+|full|auto|screen)$/,/^(inset|top|right|bottom|left)(-|$)/,/^(flex|inline-flex|grid|block|inline|inline-block|hidden|visible)$/,/^(absolute|relative|fixed|sticky|static)$/,/^(items|justify|content|self|place)-/,/^flex-(row|col|wrap|nowrap|1|auto|initial|none)/,/^grid-(cols|rows|flow)/,/^(gap|space)-/,/^[mp][trblxy]?-(\d+|auto|px)$/,/^-[mp][trblxy]?-\d+$/,/^-(top|right|bottom|left|inset)-\d+$/,/^-z-\d+$/,/^-space-[xy]-\d+$/,/^-translate-[xy]-\d+$/,/^-rotate-\d+$/,/^-scale-\d+$/,/^-skew-[xy]-\d+$/,/^(w|h|min-w|min-h|max-w|max-h|size)-/,/^text-(center|left|right|justify|start|end|xs|sm|base|lg|xl|2xl|3xl|4xl|5xl|6xl|7xl|8xl|9xl)$/,/^text-(uppercase|lowercase|capitalize|normal-case|underline|line-through|no-underline)$/,/^text-(truncate|ellipsis|clip)$/,/^(bg|border|ring|shadow|outline)-/,/^rounded(-|$)/,/^(font|leading|tracking|whitespace|break|truncate)-/,/^(uppercase|lowercase|capitalize|normal-case)$/,/^(transform|transition|duration|delay|ease|animate)-/,/^(scale|rotate|translate|skew)-/,/^transform$/,/^backdrop-blur-/,/^motion-/,/^(fade|slide|zoom|bounce|pulse|spin|ping)-/,/^(overflow|overscroll|scroll)-/,/^object-(contain|cover|fill|none|scale-down)$/,/^(cursor|pointer-events|select|resize)-/,/^(opacity|z)-/,/^(visible|invisible|collapse)$/,/^d-(none|inline|inline-block|block|grid|table|flex)$/,/^(float|clearfix|text)-(left|right|center|justify|start|end)$/,/^(m|p)[trblxy]?-[0-5]$/,/^(w|h)-(25|50|75|100|auto)$/,/^btn-(sm|lg|block)$/,/^text-(muted|primary|success|danger|warning|info|light|dark|white)$/,/^bg-(primary|secondary|success|danger|warning|info|light|dark|white|transparent)$/,/^border(-top|-bottom|-left|-right)?(-0)?$/,/^rounded(-top|-bottom|-left|-right|-circle|-pill|-0)?$/,/^shadow(-sm|-lg|-none)?$/,/^(align|justify|order|flex)-(start|end|center|between|around|fill|grow|shrink)$/,/^col(-sm|-md|-lg|-xl)?(-\d+|-auto)?$/,/^row(-cols)?(-\d+)?$/,/^g[xy]?-[0-5]$/,/^(show|hide|invisible|visible)$/,/^(position|top|bottom|start|end)-(static|relative|absolute|fixed|sticky|-\d+)$/,/^(row|col)$/,/^clearfix$/,/^pull-(left|right)$/,/^float-(left|right|none)$/];function Et(s){return hi.some(e=>e.test(s))}function At(s){return s.length<=2||/^\d/.test(s)?!0:fi.some(e=>e.test(s))}function di(s){return!Et(s)&&!At(s)}function pi(s){return s.filter(e=>di(e))}function mi(s){const e=[],t=[];for(const r of s)At(r)||Et(r)?t.push(r):e.push(r);return{semantic:e,utility:t}}function qt(s){return At(s)||Et(s)}const Yt=s=>s.replace(/([#:.[\]@])/g,"\\$1");class gi{constructor(e,t){var r;this.maxDepth=(r=e.maxPathDepth)!=null?r:10,this.cache=t}buildPath(e,t,r){const i=e.tagName.toLowerCase(),n=t.tagName.toLowerCase();if(i==="html"&&(n==="head"||n==="body"))return{path:[],degraded:!1};if(i==="html"&&this.isInsideHead(t))return this.buildHeadPath(e,t,r);const o=[];let l=t.parentElement;for(;l&&l!==e&&o.length<this.maxDepth;)o.unshift(l),l=l.parentElement;const a=o.length>=this.maxDepth&&l!==e;if(!a&&l!==e)return console.warn("[PathBuilder] Target is not a descendant of anchor"),{path:[],degraded:!0,degradationReason:"target-not-descendant-of-anchor"};let c=this.filterNoise(o);return c=this.ensureUniqueness(o,c,e,t,r),{path:c.map(u=>{const h=u.parentElement;let f;if(h){const d=Array.from(h.children).indexOf(u);d!==-1&&(f=d+1)}return{tag:u.tagName.toLowerCase(),semantics:r.extract(u),score:r.scoreElement(u),nthChild:f}}),degraded:a,degradationReason:a?"path-depth-overflow":void 0}}buildPathNodes(e,t,r){return this.buildPath(e,t,r).path}ensureUniqueness(e,t,r,i,n){const o=this.buildTestSelector(r,t,i);try{const l=i.ownerDocument;if(!l)return t;let a;if(this.cache){const u=this.cache.getSelectorResults(o);u!==void 0?a=u:(a=Array.from(l.querySelectorAll(o)),this.cache.setSelectorResults(o,a))}else a=l.querySelectorAll(o);if(a.length<=1)return t;const c=e.filter(u=>!t.includes(u));for(const u of c){if(n.scoreElement(u)<ai.MIN_CONFIDENCE_FOR_SKIP)continue;const h=this.insertNodeInOrder(t,u,e),f=this.buildTestSelector(r,h,i);try{let d;if(this.cache){const m=this.cache.getSelectorResults(f);m!==void 0?d=m:(d=Array.from(l.querySelectorAll(f)),this.cache.setSelectorResults(f,d))}else d=l.querySelectorAll(f);if(d.length===1)return h;d.length<a.length&&(t=h)}catch(d){}}return t}catch(l){return t}}insertNodeInOrder(e,t,r){const i=r.indexOf(t),n=[...e];let o=0;for(let l=0;l<n.length&&!(r.indexOf(n[l])>i);l++)o=l+1;return n.splice(o,0,t),n}buildTestSelector(e,t,r){const i=[];i.push(this.elementToSelector(e));for(const n of t)i.push(this.elementToSelector(n));return i.push(this.elementToSelector(r)),i.join(" ")}elementToSelector(e){let t=e.tagName.toLowerCase();e.id&&!he(e.id)&&(t+=`#${Yt(e.id)}`);for(const r of Array.from(e.classList))qt(r)||(t+=`.${Yt(r)}`);return t}filterNoise(e){return e.filter(t=>this.shouldInclude(t))}shouldInclude(e){const t=e.tagName.toLowerCase();return li.includes(t)?!0:t==="div"||t==="span"?this.hasSemanticFeatures(e):!1}hasSemanticFeatures(e){if(e.hasAttribute("role"))return!0;for(const r of Array.from(e.attributes))if(r.name.startsWith("aria-"))return!0;if(e.classList.length>0){for(const r of Array.from(e.classList))if(!qt(r))return!0}if(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))return!0;const t=e.id;return!!(t&&!he(t))}isInsideHead(e){let t=e.parentElement;for(;t;){const r=t.tagName.toLowerCase();if(r==="head")return!0;if(r==="body")return!1;t=t.parentElement}return!1}buildHeadPath(e,t,r){const i=[];let n=t.parentElement;for(;n&&n!==e;)i.unshift(n),n=n.parentElement;return n!==e?{path:[],degraded:!0,degradationReason:"target-not-descendant-of-html"}:i.findIndex(o=>o.tagName.toLowerCase()==="head")===-1?{path:[],degraded:!0,degradationReason:"head-not-found-in-path"}:{path:i.map(o=>{const l=o.parentElement;let a;if(l){const c=Array.from(l.children).indexOf(o);c!==-1&&(a=c+1)}return{tag:o.tagName.toLowerCase(),semantics:r.extract(o),score:r.scoreElement(o),nthChild:a}}),degraded:!1}}}function yi(s){return s?s.trim().replace(/[\n\t\r]/g," ").replace(/\s+/g," "):""}const wi={preserveQueryForAbsolute:!0,removeDynamicHashes:!0};function bi(s){return s?[/\d{5,}/,/[a-f0-9]{8,}/i,/(session|token|temp|random|timestamp|nonce|cache)/i,/^\d+$/,/^[a-f0-9-]{32,}$/i].some(e=>e.test(s)):!1}function xi(s,e){if(!s)return s;const t=s.startsWith("http://")||s.startsWith("https://"),[r,i]=s.split("#"),[n,o]=r.split("?");let l=n;return t&&e.preserveQueryForAbsolute&&o&&(l+=`?${o}`),i&&(e.removeDynamicHashes&&bi(i)||(l+=`#${i}`)),l}function Fr(s,e,t={}){if(!e)return e;const r=$($({},wi),t);return s==="href"||s==="src"?xi(e,r):e}const Ci=["role","aria-label","aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-level","aria-posinset","aria-setsize","aria-haspopup"],Si=["aria-selected","aria-checked","aria-pressed","aria-expanded","aria-hidden","aria-disabled","aria-current","aria-busy","aria-invalid","aria-grabbed","aria-live","aria-atomic"],vi=["data-state","data-active","data-inactive","data-selected","data-open","data-closed","data-visible","data-hidden","data-disabled","data-enabled","data-loading","data-error","data-success","data-highlighted","data-focused","data-hover","data-orientation","data-theme"],Ei=["data-radix-","data-headlessui-","data-reach-","data-mui-","data-chakra-","data-mantine-","data-tw-"],Ai=["data-testid","data-test-id","data-test","data-cy","data-qa","data-automation-id","data-id","data-component","data-entity-id","data-product-id","data-user-id"],Ri=["data-ga","data-gtm","data-google","data-layer","data-event","data-yandex","data-ym","data-metrika","data-optimizely","data-vwo","data-optimize","data-hj","data-hotjar","data-fs","data-mouseflow","data-mf","data-smartlook","data-sl","data-fb","data-facebook","data-tt","data-li","data-track","data-tracking","data-click","data-impression","data-conversion","data-segment","data-analytics"],Ni=["data-category","data-action","data-label","data-value"],Oi=["id","name","type","placeholder","title","for","alt","href"],Mi=["disabled","checked","selected","hidden","readonly","required","value"],Ti=[/^radix-/,/^headlessui-/,/^mui-/,/:\w+:/];function ki(s,e){return Ci.includes(s)?!0:Si.includes(s)||vi.includes(s)||Ei.some(t=>s.startsWith(t))?!1:Ai.includes(s)?!0:Ri.some(t=>s.startsWith(t))||Ni.includes(s)?!1:s.startsWith("data-")&&s.endsWith("-id")?!0:s==="id"?!Ti.some(t=>t.test(e)):Oi.includes(s)?!0:Mi.includes(s)?!1:!!s.startsWith("data-")}class Jt{constructor(e,t){var r;this.includeUtilityClasses=(r=e.includeUtilityClasses)!=null?r:!1,this.cache=t}extract(e){if(this.cache){const o=this.cache.getSemantics(e);if(o!==void 0)return o}const t={},r=e.id;if(r&&!he(r)&&(t.id=r),e.classList.length>0){const o=Array.from(e.classList);if(this.includeUtilityClasses)t.classes=o;else{const{semantic:l}=mi(o);l.length>0&&(t.classes=l)}}const i=this.extractAttributes(e);Object.keys(i).length>0&&(t.attributes=i);const n=e.getAttribute("role");if(n&&(t.role=n),this.shouldExtractText(e)){const o=this.extractText(e);o&&(t.text=o)}return this.cache&&this.cache.setSemantics(e,t),t}scoreElement(e){let t=.5;const r=this.extract(e);return r.id&&(t+=.15),r.classes&&r.classes.length>0&&(t+=.1),r.attributes&&Object.keys(r.attributes).length>0&&(t+=.1),r.role&&(t+=.1),r.text&&(t+=.05),Math.min(t,1)}shouldIgnoreAttribute(e){return!!(Dr.has(e)||e.startsWith("on")||e.startsWith("ng-")||e.startsWith("_ng")||e.startsWith("data-reactid")||e.startsWith("data-react")||e.startsWith("data-v-"))}getAttributePriority(e){return q[e]!==void 0?q[e]:e.startsWith("data-")?q["data-*"]:e.startsWith("aria-")?q["aria-*"]:0}isDynamicValue(e){return[/^[a-f0-9]{32,}$/i,/^\d{10,}$/,/^(undefined|null|\[object)/,/^{{.*}}$/].some(t=>t.test(e))}extractAttributes(e){const t={};for(const r of Array.from(e.attributes)){const i=r.name;if(this.shouldIgnoreAttribute(i)||!ki(i,r.value)||Ir.has(i)&&zr(r.value)||this.getAttributePriority(i)===0)continue;const n=i==="href"||i==="src"?Fr(i,r.value):r.value;!n||n.trim()===""||this.isDynamicValue(n)||(t[i]=n)}return t}extractText(e){const t=this.getDirectTextContent(e);if(!t)return null;const r=yi(t);if(!r)return null;const i=100,n=t.length>i?t.slice(0,i)+"...":t,o=r.length>i?r.slice(0,i)+"...":r;return{raw:n,normalized:o}}getDirectTextContent(e){var r;const t=[];for(const i of Array.from(e.childNodes))if(i.nodeType===Node.TEXT_NODE&&i.textContent){const n=i.textContent.trim();n&&t.push(n)}return t.length>0?t.join(" "):(r=e.textContent)!=null?r:null}shouldExtractText(e){const t=e.tagName.toLowerCase();return["button","a","label","h1","h2","h3","h4","h5","h6","p","span","li","th","td","dt","dd","legend","figcaption","summary"].includes(t)}}class $i{fingerprint(e){const t=e.tagName.toLowerCase(),r=this.getShape(t),i={shape:r,hasAnimation:this.hasAnimation(e)};if(r==="path"){const l=e.getAttribute("d");l&&(i.dHash=this.computePathHash(l))}else["circle","rect","ellipse","line"].includes(r)&&(i.geomHash=this.computeGeomHash(e,r));const n=e.getAttribute("role");n&&(i.role=n);const o=e.querySelector("title");return o!=null&&o.textContent&&(i.titleText=o.textContent.trim()),i}computePathHash(e){const t=this.normalizePathData(e);return this.simpleHash(t)}getShape(e){var t;return(t=["path","circle","rect","line","polyline","polygon","ellipse","g","text","use","svg"].find(r=>r===e))!=null?t:"path"}normalizePathData(e){var t;return((t=e.match(/[MLHVCSQTAZ][^MLHVCSQTAZ]*/gi))!=null?t:[]).slice(0,5).map(r=>r.trim().replace(/(-?\d+\.?\d*)/g,i=>parseFloat(i).toFixed(1))).join(" ")}computeGeomHash(e,t){var i,n,o,l,a,c,u,h,f;const r=[];switch(t){case"circle":r.push(`r=${(i=e.getAttribute("r"))!=null?i:"0"}`);break;case"rect":{const d=parseFloat((n=e.getAttribute("width"))!=null?n:"0"),m=parseFloat((o=e.getAttribute("height"))!=null?o:"0");d>0&&m>0&&r.push(`ratio=${(d/m).toFixed(2)}`)}break;case"ellipse":{const d=parseFloat((l=e.getAttribute("rx"))!=null?l:"0"),m=parseFloat((a=e.getAttribute("ry"))!=null?a:"0");d>0&&m>0&&r.push(`ratio=${(d/m).toFixed(2)}`)}break;case"line":{const d=parseFloat((c=e.getAttribute("x1"))!=null?c:"0"),m=parseFloat((u=e.getAttribute("y1"))!=null?u:"0"),x=parseFloat((h=e.getAttribute("x2"))!=null?h:"0"),p=parseFloat((f=e.getAttribute("y2"))!=null?f:"0"),y=Math.atan2(p-m,x-d);r.push(`angle=${y.toFixed(2)}`)}break}return this.simpleHash(r.join(";"))}hasAnimation(e){if(e.querySelector("animate, animateTransform, animateMotion"))return!0;const t=e.ownerDocument;if(t!=null&&t.defaultView)try{const r=t.defaultView.getComputedStyle(e);if(r.animationName!=="none"||r.transitionProperty!=="all"&&r.transitionProperty!=="none")return!0}catch(r){}return!1}simpleHash(e){let t=0;for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);t=(t<<5)-t+i,t=t&t}return Math.abs(t).toString(16).padStart(8,"0")}}function Li(s,e=0){const t=s.anchor.score,r=s.path.length>0?s.path.reduce((l,a)=>l+a.score,0)/s.path.length:.5,i=s.target.score,n=t*Ce.ANCHOR+r*Ce.PATH+i*Ce.TARGET+e*Ce.UNIQUENESS,o=s.anchor.degraded?.2:0;return Math.max(0,Math.min(1,n-o))}class _i{constructor(e){this.cache=new Map,this.maxSize=e}get(e){const t=this.cache.get(e);if(t!==void 0)return this.cache.delete(e),this.cache.set(e,t),t}set(e,t){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.maxSize){const r=this.cache.keys().next().value;r!==void 0&&this.cache.delete(r)}this.cache.set(e,t)}has(e){return this.cache.has(e)}delete(e){this.cache.delete(e)}clear(){this.cache.clear()}get size(){return this.cache.size}}class Pi{constructor(e={}){var t,r;this.eidCache=new WeakMap,this.selectorResultCache=new _i((t=e.maxSelectorCacheSize)!=null?t:1e3),this.anchorCache=new WeakMap,this.semanticsCache=new WeakMap,this.stats={eidHits:0,eidMisses:0,selectorHits:0,selectorMisses:0,anchorHits:0,anchorMisses:0,semanticsHits:0,semanticsMisses:0,selectorCacheSize:0,maxSelectorCacheSize:(r=e.maxSelectorCacheSize)!=null?r:1e3}}getEID(e){const t=this.eidCache.get(e);if(t!==void 0)return this.stats.eidHits++,t;this.stats.eidMisses++}setEID(e,t){this.eidCache.set(e,t)}getSelectorResults(e){const t=this.selectorResultCache.get(e);if(t!==void 0)return this.stats.selectorHits++,this.stats.selectorCacheSize=this.selectorResultCache.size,t;this.stats.selectorMisses++,this.stats.selectorCacheSize=this.selectorResultCache.size}setSelectorResults(e,t){this.selectorResultCache.set(e,t),this.stats.selectorCacheSize=this.selectorResultCache.size}getAnchor(e){if(this.anchorCache.has(e))return this.stats.anchorHits++,this.anchorCache.get(e);this.stats.anchorMisses++}setAnchor(e,t){this.anchorCache.set(e,t)}getSemantics(e){const t=this.semanticsCache.get(e);if(t!==void 0)return this.stats.semanticsHits++,t;this.stats.semanticsMisses++}setSemantics(e,t){this.semanticsCache.set(e,t)}clear(){this.selectorResultCache.clear(),this.stats.selectorCacheSize=0,this.stats={eidHits:0,eidMisses:0,selectorHits:0,selectorMisses:0,anchorHits:0,anchorMisses:0,semanticsHits:0,semanticsMisses:0,selectorCacheSize:0,maxSelectorCacheSize:this.stats.maxSelectorCacheSize}}invalidateElement(e){}invalidateSelector(e){this.selectorResultCache.delete(e),this.stats.selectorCacheSize=this.selectorResultCache.size}getStats(){return Z($({},this.stats),{selectorCacheSize:this.selectorResultCache.size})}getEIDHitRate(){const e=this.stats.eidHits+this.stats.eidMisses;return e>0?this.stats.eidHits/e:0}getSelectorHitRate(){const e=this.stats.selectorHits+this.stats.selectorMisses;return e>0?this.stats.selectorHits/e:0}getAnchorHitRate(){const e=this.stats.anchorHits+this.stats.anchorMisses;return e>0?this.stats.anchorHits/e:0}getSemanticsHitRate(){const e=this.stats.semanticsHits+this.stats.semanticsMisses;return e>0?this.stats.semanticsHits/e:0}getOverallHitRate(){const e=this.stats.eidHits+this.stats.selectorHits+this.stats.anchorHits+this.stats.semanticsHits,t=this.stats.eidMisses+this.stats.selectorMisses+this.stats.anchorMisses+this.stats.semanticsMisses,r=e+t;return r>0?e/r:0}}function Di(s){return new Pi(s)}let Ze=null;function Ii(){return Ze||(Ze=Di()),Ze}function Qt(s){if(s.ownerDocument)return s.ownerDocument;let e=s;for(;e;){if(e.nodeType===9)return e;e=e.parentNode}throw new Error(`Element does not have an ownerDocument. This typically means:
2
+ "use strict";var Ms=Object.defineProperty,Ts=Object.defineProperties;var ks=Object.getOwnPropertyDescriptors;var be=Object.getOwnPropertySymbols;var Ft=Object.prototype.hasOwnProperty,Ut=Object.prototype.propertyIsEnumerable;var zt=(s,e,t)=>e in s?Ms(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,$=(s,e)=>{for(var t in e||(e={}))Ft.call(e,t)&&zt(s,t,e[t]);if(be)for(var t of be(e))Ut.call(e,t)&&zt(s,t,e[t]);return s},Z=(s,e)=>Ts(s,ks(e));var Ye=(s,e)=>{var t={};for(var r in s)Ft.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&be)for(var r of be(s))e.indexOf(r)<0&&Ut.call(s,r)&&(t[r]=s[r]);return t};var $s=Object.defineProperty,Ls=(s,e,t)=>e in s?$s(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Je=(s,e,t)=>Ls(s,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var w=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(w||{});const Bt={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Wt={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},xe={},_s=()=>!!globalThis.Zone;function Ct(s){if(xe[s])return xe[s];const e=globalThis[s],t=e.prototype,r=s in Bt?Bt[s]:void 0,i=!!(r&&r.every(l=>{var a,c;return!!((c=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&c.toString().includes("[native code]"))})),n=s in Wt?Wt[s]:void 0,o=!!(n&&n.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(i&&o&&!_s())return xe[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const a=l.contentWindow;if(!a)return e.prototype;const c=a[s].prototype;return document.body.removeChild(l),c?xe[s]=c:t}catch(l){return t}}const Qe={};function Y(s,e,t){var r;const i=`${s}.${String(t)}`;if(Qe[i])return Qe[i].call(e);const n=Ct(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(Qe[i]=o,o.call(e)):e[t]}const Ke={};function br(s,e,t){const r=`${s}.${String(t)}`;if(Ke[r])return Ke[r].bind(e);const n=Ct(s)[t];return typeof n!="function"?e[t]:(Ke[r]=n,n.bind(e))}function Ps(s){return Y("Node",s,"childNodes")}function Ds(s){return Y("Node",s,"parentNode")}function Is(s){return Y("Node",s,"parentElement")}function zs(s){return Y("Node",s,"textContent")}function Fs(s,e){return br("Node",s,"contains")(e)}function Us(s){return br("Node",s,"getRootNode")()}function Bs(s){return!s||!("host"in s)?null:Y("ShadowRoot",s,"host")}function Ws(s){return s.styleSheets}function Hs(s){return!s||!("shadowRoot"in s)?null:Y("Element",s,"shadowRoot")}function js(s,e){return Y("Element",s,"querySelector")(e)}function Vs(s,e){return Y("Element",s,"querySelectorAll")(e)}function Gs(){return Ct("MutationObserver").constructor}function qs(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch(r){return()=>{}}}function Ys(s){const e=s.tagName.toLowerCase(),t=s.id?`#${s.id}`:"",r=s.classList.length?"."+Array.from(s.classList).join("."):"";return`${e}${t}${r}`}function Js(s){var f;var e,t;const r=(f=(e=s.ownerDocument)==null?void 0:e.defaultView)!=null?f:window,i=s.getBoundingClientRect(),n=r.innerWidth||r.document.documentElement.clientWidth||0,o=r.innerHeight||r.document.documentElement.clientHeight||0,l=i.width>0&&i.height>0&&i.bottom>0&&i.right>0&&i.top<o&&i.left<n,a=(t=r.getComputedStyle)==null?void 0:t.call(r,s),u=!!a&&a.display!=="none"&&a.visibility!=="hidden"&&(parseFloat(a.opacity)||0)>0&&l;let h=0;if(u){const d=Math.max(0,Math.min(i.right,n)-Math.max(i.left,0)),m=Math.max(0,Math.min(i.bottom,o)-Math.max(i.top,0)),x=d*m,p=i.width*i.height;h=p>0?x/p:0}return{isVisible:u,ratio:h}}const M={childNodes:Ps,parentNode:Ds,parentElement:Is,textContent:zs,contains:Fs,getRootNode:Us,host:Bs,styleSheets:Ws,shadowRoot:Hs,querySelector:js,querySelectorAll:Vs,mutationObserver:Gs,patch:qs,describeNode:Ys,getElementVisibility:Js};function re(s){return s.nodeType===s.ELEMENT_NODE}function xr(s){const e=s&&"host"in s&&"mode"in s&&M.host(s)||null;return!!(e&&"shadowRoot"in e&&M.shadowRoot(e)===s)}function Te(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function Qs(s){return s.includes(" background-clip: text;")&&!s.includes(" -webkit-background-clip: text;")&&(s=s.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),s}function Cr(s){const{cssText:e}=s;if(e.split('"').length<3)return e;const t=["@import",`url(${JSON.stringify(s.href)})`];return s.layerName===""?t.push("layer"):s.layerName&&t.push(`layer(${s.layerName})`),s.supportsText&&t.push(`supports(${s.supportsText})`),s.media.length&&t.push(s.media.mediaText),t.join(" ")+";"}function Le(s){try{const e=s.rules||s.cssRules;if(!e)return null;let t=s.href;!t&&s.ownerNode&&s.ownerNode.ownerDocument&&(t=s.ownerNode.ownerDocument.location.href);const r=Array.from(e,i=>Sr(i,t)).join("");return Qs(r)}catch(e){return null}}function Sr(s,e){if(Er(s)){let t;try{t=Le(s.styleSheet)||Cr(s)}catch(r){t=s.cssText}return s.styleSheet.href?ue(t,s.styleSheet.href):t}else{let t=s.cssText;return s.type===CSSRule.KEYFRAMES_RULE||(s.type,CSSRule.KEYFRAME_RULE),Ar(s)&&s.selectorText.includes(":")&&(t=vr(t)),e?ue(t,e):t}}function vr(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function Er(s){return"styleSheet"in s}function Ar(s){return"selectorText"in s}class Fe{constructor(){Je(this,"idNodeMap",new Map),Je(this,"nodeMetaMap",new WeakMap),Je(this,"selectorNodeMap",new Map)}getId(e){var t;if(!e)return-1;const r=(t=this.getMeta(e))==null?void 0:t.id;return r!=null?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){const t=this.getId(e);this.idNodeMap.delete(t);const r=this.getMeta(e);if(r!=null&&r.selector){const i=this.selectorNodeMap.get(r.selector);i&&(i.delete(e),i.size===0&&this.selectorNodeMap.delete(r.selector))}e.childNodes&&e.childNodes.forEach(i=>this.removeNodeFromMap(i))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;if(this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t),t.selector){let i=this.selectorNodeMap.get(t.selector);i||(i=new Set,this.selectorNodeMap.set(t.selector,i)),i.add(e)}}replace(e,t){const r=this.getNode(e);if(r){const i=this.nodeMetaMap.get(r);if(i&&(this.nodeMetaMap.set(t,i),i.selector)){const n=this.selectorNodeMap.get(i.selector);n&&(n.delete(r),n.add(t))}}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap,this.selectorNodeMap=new Map}getNodeBySelector(e){const t=this.selectorNodeMap.get(e);return!t||t.size===0?null:t.values().next().value||null}getNodesBySelector(e){const t=this.selectorNodeMap.get(e);return t?Array.from(t):[]}hasSelector(e){const t=this.selectorNodeMap.get(e);return t!==void 0&&t.size>0}}function Ks(){return new Fe}function Rr({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:n}){let o=i||"";const l=r&&ge(r);return(e[t.toLowerCase()]||l&&e[l])&&(n?o=n(o,s):o="*".repeat(o.length)),o}function ge(s){return s.toLowerCase()}const Ht="__rrweb_original__";function Nr(s){const e=s.getContext("2d");if(!e)return!0;const t=50;for(let r=0;r<s.width;r+=t)for(let i=0;i<s.height;i+=t){const n=e.getImageData,o=Ht in n?n[Ht]:n;if(new Uint32Array(o.call(e,r,i,Math.min(t,s.width-r),Math.min(t,s.height-i)).data.buffer).some(a=>a!==0))return!1}return!0}function Or(s,e){return!s||!e||s.type!==e.type?!1:s.type===w.Document?s.compatMode===e.compatMode:s.type===w.DocumentType?s.name===e.name&&s.publicId===e.publicId&&s.systemId===e.systemId:s.type===w.Comment||s.type===w.Text||s.type===w.CDATA?s.textContent===e.textContent:s.type===w.Element?s.tagName===e.tagName&&JSON.stringify(s.attributes)===JSON.stringify(e.attributes)&&s.isSVG===e.isSVG&&s.needBlock===e.needBlock:!1}function Mr(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?ge(e):null}function Ue(s,e){var n;let t;try{t=new URL(s,e!=null?e:window.location.href)}catch(o){return null}const r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return(n=i==null?void 0:i[1])!=null?n:null}function Zs(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const Xs=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ei=/^(?:[a-z+]+:)?\/\//i,ti=/^www\..*/i,ri=/^(data:)([^,]*),(.*)/i;function ue(s,e){return(s||"").replace(Xs,(t,r,i,n,o,l)=>{const a=i||o||l,c=r||n||"";if(!a)return t;if(ei.test(a)||ti.test(a))return`url(${c}${a}${c})`;if(ri.test(a))return`url(${c}${a}${c})`;if(a[0]==="/")return`url(${c}${Zs(e)+a}${c})`;const u=e.split("/"),h=a.split("/");u.pop();for(const f of h)f!=="."&&(f===".."?u.pop():u.push(f));return`url(${c}${u.join("/")}${c})`})}function ce(s,e=!1){return e?s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Tr(s,e,t=!1){const r=Array.from(e.childNodes),i=[];let n=0;if(r.length>1&&s&&typeof s=="string"){let o=ce(s,t);const l=o.length/s.length;for(let a=1;a<r.length;a++)if(r[a].textContent&&typeof r[a].textContent=="string"){const c=ce(r[a].textContent,t),u=100;let h=3;for(;h<c.length&&(c[h].match(/[a-zA-Z0-9]/)||c.indexOf(c.substring(0,h),1)!==-1);h++);for(;h<c.length;h++){let f=c.substring(0,h),d=o.split(f),m=-1;if(d.length===2)m=d[0].length;else if(d.length>2&&d[0]===""&&r[a-1].textContent!=="")m=o.indexOf(f,1);else if(d.length===1){if(f=f.substring(0,f.length-1),d=o.split(f),d.length<=1)return i.push(s),i;h=u+1}else h===c.length-1&&(m=o.indexOf(f));if(d.length>=2&&h>u){const x=r[a-1].textContent;if(x&&typeof x=="string"){const p=ce(x).length;m=o.indexOf(f,p)}m===-1&&(m=d[0].length)}if(m!==-1){let x=Math.floor(m/l);for(;x>0&&x<s.length;){if(n+=1,n>50*r.length)return i.push(s),i;const p=ce(s.substring(0,x),t);if(p.length===m){i.push(s.substring(0,x)),s=s.substring(x),o=o.substring(m);break}else p.length<m?x+=Math.max(1,Math.floor((m-p.length)/l)):x-=Math.max(1,Math.floor((p.length-m)*l))}break}}}}return i.push(s),i}function kr(s,e){return Tr(s,e).join("/* rr_split */")}function $r(s){var e;const t=M.parentNode(s),r=t&&t;return!r||!St(r)?!1:((e=s.textContent)==null?void 0:e.trim())!==""}function St(s){return M.getElementVisibility(s).isVisible}const Lr=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],_r=["a","button","input","select","textarea","label","details","summary","dialog","video","audio"],si=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],vt=new WeakSet,ii=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(s,e,t){if(ii.call(this,s,e,t),this instanceof Element){const r=s.toLowerCase();Lr.includes(r)&&vt.add(this)}};const ni=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(s,e,t){ni.call(this,s,e,t)};function oi(s){return s instanceof Element&&vt.has(s)}function Pr(s){if(s.nodeType===Node.ELEMENT_NODE){const e=s,t=e.tagName.toLowerCase();if(_r.includes(t))return!0;const r=e.hasAttribute("tabindex")&&e.getAttribute("tabindex")!=="-1",i=["button","link","checkbox","switch","menuitem"].includes(e.getAttribute("role")||"");return oi(e)||r||i||e instanceof HTMLAnchorElement&&e.hasAttribute("href")||e instanceof HTMLButtonElement&&!e.disabled}return!1}function jt(){document.querySelectorAll("*").forEach(e=>{si.forEach(t=>{e.hasAttribute(t)&&vt.add(e)})})}try{document.readyState==="complete"||document.readyState==="interactive"?jt():document.addEventListener("DOMContentLoaded",jt)}catch(s){}const Ce={ANCHOR:.4,PATH:.3,TARGET:.2,UNIQUENESS:.1},B={SEMANTIC_TAG:.5,ROLE:.3,ARIA_LABEL:.1,STABLE_ID:.25,TEST_MARKER:.05,DEPTH_PENALTY_THRESHOLD:5,DEPTH_PENALTY_FACTOR:.05,DEGRADED_SCORE:.3},ai={MIN_CONFIDENCE_FOR_SKIP:.7},Vt=["form","main","nav","section","article","footer","header"],Gt=["form","navigation","main","region","contentinfo","complementary","banner","search"],li=["article","aside","details","figcaption","figure","footer","header","main","mark","nav","section","summary","time","button","datalist","fieldset","form","input","label","legend","meter","optgroup","option","output","progress","select","textarea","a","audio","video","canvas","dialog","menu","blockquote","dd","dl","dt","hr","li","ol","ul","p","pre","h1","h2","h3","h4","h5","h6","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr","svg","path","circle","rect","line","polyline","polygon","ellipse","g","text","use"],q={"data-testid":100,"data-qa":99,"data-cy":98,"data-test":97,"data-test-id":96,"aria-label":90,"aria-labelledby":85,"aria-describedby":80,name:75,href:70,src:70,type:65,role:60,alt:55,title:50,for:45,placeholder:40,"data-*":30,"aria-*":25},Dr=new Set(["id","class","style","xmlns","tabindex","contenteditable"]),ci={maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:0,fallbackToBody:!0,includeUtilityClasses:!1,source:"dom-dsl"};function he(s){if(/^[a-z]+-\d+$/i.test(s)||/^[a-z]+(-[a-z]+)+-\d+$/i.test(s)||/^[a-z]+(_[a-z]+)*_\d+$/i.test(s)||/^\d+$/.test(s)||/^:[a-z0-9]+:$/i.test(s)||/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i.test(s))return!0;if(/^[a-z]{1,3}[A-Za-z0-9]{8,}$/.test(s)){const e=/\d/.test(s),t=/[A-Z]/.test(s),r=s.length>=20;if(e&&t||r)return!0}return!!(/^radix-/.test(s)||/^mui-\d+$/.test(s))}const Ir=new Set(["aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-activedescendant","for","form","list","headers","aria-details","aria-errormessage","aria-flowto"]);function zr(s){return s.trim().split(/\s+/).some(e=>he(e))}class ui{constructor(e,t){var r;this.maxDepth=(r=e.maxPathDepth)!=null?r:10,this.cache=t}findAnchor(e){if(this.cache){const a=this.cache.getAnchor(e);if(a!==void 0)return a}const t=e.tagName.toLowerCase(),r=e.ownerDocument;if(t==="html"){const a={element:e,score:1,tier:"A",depth:0};return this.cacheResult(e,a),a}if(t==="head"||this.isInsideHead(e)){const a=r==null?void 0:r.documentElement;if(a){const c={element:a,score:1,tier:"A",depth:0};return this.cacheResult(e,c),c}}if(t==="body"){const a=r==null?void 0:r.documentElement;if(a){const c={element:a,score:1,tier:"A",depth:0};return this.cacheResult(e,c),c}}let i=e.parentElement,n=0,o=null;for(;i&&n<this.maxDepth;){if(i.tagName.toLowerCase()==="body")return o||{element:i,score:B.DEGRADED_SCORE,tier:"C",depth:n};const a=this.scoreAnchor(i);if(a>0){const c=this.applyDepthPenalty(a,n),u=this.getTier(i),h={element:i,score:c,tier:u,depth:n};if(u==="A")return h;(!o||c>o.score)&&(o=h)}i=i.parentElement,n++}const l=o;return this.cache&&this.cache.setAnchor(e,l),l}scoreAnchor(e){let t=0;const r=e.tagName.toLowerCase();Vt.includes(r)&&(t+=B.SEMANTIC_TAG);const i=e.getAttribute("role");i&&Gt.includes(i)&&(t+=B.ROLE),(e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby"))&&(t+=B.ARIA_LABEL);const n=e.id;return n&&!he(n)&&(t+=B.STABLE_ID),(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))&&(t+=B.TEST_MARKER),Math.min(t,1)}applyDepthPenalty(e,t){if(t<=B.DEPTH_PENALTY_THRESHOLD)return e;const r=(t-B.DEPTH_PENALTY_THRESHOLD)*B.DEPTH_PENALTY_FACTOR;return Math.max(0,e-r)}getTier(e){const t=e.tagName.toLowerCase();if(Vt.includes(t))return"A";const r=e.getAttribute("role");return r&&Gt.includes(r)?"B":"C"}isInsideHead(e){let t=e.parentElement;for(;t;){const r=t.tagName.toLowerCase();if(r==="head")return!0;if(r==="body")return!1;t=t.parentElement}return!1}cacheResult(e,t){this.cache&&this.cache.setAnchor(e,t)}}const hi=[/^css-[a-z0-9]+$/i,/^sc-[a-z0-9]+-\d+$/i,/^[a-z]{5,8}$/i,/^Mui[A-Z]\w+-\w+-\w+/,/^makeStyles-\w+-\d+$/,/^jss\d+$/,/^(emotion|linaria)-[a-z0-9]+/i,/^(chakra|tw-|ant-)[a-z0-9]+-\w+/i,/-[a-f0-9]{6,}$/i,/^_[a-z0-9]{5,}$/i,/\d{5,}/],fi=[/^\[/,/^(first|last|odd|even|only|first-of-type|last-of-type|only-of-type):/,/^(hover|focus|active|disabled|enabled|checked|indeterminate|default|required|valid|invalid|in-range|out-of-range|placeholder-shown|autofill|read-only):/,/^(focus-within|focus-visible|visited|target|open):/,/^(sm|md|lg|xl|2xl|3xl|4xl|5xl|6xl|7xl):/,/^dark:/,/^(rtl|ltr):/,/^(group|peer)(-hover|-focus|-active)?:/,/^[a-z][a-z-]*:/,/\/([\d.]+|full|auto|screen)$/,/^(inset|top|right|bottom|left)(-|$)/,/^(flex|inline-flex|grid|block|inline|inline-block|hidden|visible)$/,/^(absolute|relative|fixed|sticky|static)$/,/^(items|justify|content|self|place)-/,/^flex-(row|col|wrap|nowrap|1|auto|initial|none)/,/^grid-(cols|rows|flow)/,/^(gap|space)-/,/^[mp][trblxy]?-(\d+|auto|px)$/,/^-[mp][trblxy]?-\d+$/,/^-(top|right|bottom|left|inset)-\d+$/,/^-z-\d+$/,/^-space-[xy]-\d+$/,/^-translate-[xy]-\d+$/,/^-rotate-\d+$/,/^-scale-\d+$/,/^-skew-[xy]-\d+$/,/^(w|h|min-w|min-h|max-w|max-h|size)-/,/^text-(center|left|right|justify|start|end|xs|sm|base|lg|xl|2xl|3xl|4xl|5xl|6xl|7xl|8xl|9xl)$/,/^text-(uppercase|lowercase|capitalize|normal-case|underline|line-through|no-underline)$/,/^text-(truncate|ellipsis|clip)$/,/^(bg|border|ring|shadow|outline)-/,/^rounded(-|$)/,/^(font|leading|tracking|whitespace|break|truncate)-/,/^(uppercase|lowercase|capitalize|normal-case)$/,/^(transform|transition|duration|delay|ease|animate)-/,/^(scale|rotate|translate|skew)-/,/^transform$/,/^backdrop-blur-/,/^motion-/,/^(fade|slide|zoom|bounce|pulse|spin|ping)-/,/^(overflow|overscroll|scroll)-/,/^object-(contain|cover|fill|none|scale-down)$/,/^(cursor|pointer-events|select|resize)-/,/^(opacity|z)-/,/^(visible|invisible|collapse)$/,/^d-(none|inline|inline-block|block|grid|table|flex)$/,/^(float|clearfix|text)-(left|right|center|justify|start|end)$/,/^(m|p)[trblxy]?-[0-5]$/,/^(w|h)-(25|50|75|100|auto)$/,/^btn-(sm|lg|block)$/,/^text-(muted|primary|success|danger|warning|info|light|dark|white)$/,/^bg-(primary|secondary|success|danger|warning|info|light|dark|white|transparent)$/,/^border(-top|-bottom|-left|-right)?(-0)?$/,/^rounded(-top|-bottom|-left|-right|-circle|-pill|-0)?$/,/^shadow(-sm|-lg|-none)?$/,/^(align|justify|order|flex)-(start|end|center|between|around|fill|grow|shrink)$/,/^col(-sm|-md|-lg|-xl)?(-\d+|-auto)?$/,/^row(-cols)?(-\d+)?$/,/^g[xy]?-[0-5]$/,/^(show|hide|invisible|visible)$/,/^(position|top|bottom|start|end)-(static|relative|absolute|fixed|sticky|-\d+)$/,/^(row|col)$/,/^clearfix$/,/^pull-(left|right)$/,/^float-(left|right|none)$/];function Et(s){return hi.some(e=>e.test(s))}function At(s){return s.length<=2||/^\d/.test(s)?!0:fi.some(e=>e.test(s))}function di(s){return!Et(s)&&!At(s)}function pi(s){return s.filter(e=>di(e))}function mi(s){const e=[],t=[];for(const r of s)At(r)||Et(r)?t.push(r):e.push(r);return{semantic:e,utility:t}}function qt(s){return At(s)||Et(s)}const Yt=s=>s.replace(/([#:.[\]@])/g,"\\$1");class gi{constructor(e,t){var r;this.maxDepth=(r=e.maxPathDepth)!=null?r:10,this.cache=t}buildPath(e,t,r){const i=e.tagName.toLowerCase(),n=t.tagName.toLowerCase();if(i==="html"&&(n==="head"||n==="body"))return{path:[],degraded:!1};if(i==="html"&&this.isInsideHead(t))return this.buildHeadPath(e,t,r);const o=[];let l=t.parentElement;for(;l&&l!==e&&o.length<this.maxDepth;)o.unshift(l),l=l.parentElement;const a=o.length>=this.maxDepth&&l!==e;if(!a&&l!==e)return console.warn("[PathBuilder] Target is not a descendant of anchor"),{path:[],degraded:!0,degradationReason:"target-not-descendant-of-anchor"};let c=this.filterNoise(o);return c=this.ensureUniqueness(o,c,e,t,r),{path:c.map(u=>{const h=u.parentElement;let f;if(h){const d=Array.from(h.children).indexOf(u);d!==-1&&(f=d+1)}return{tag:u.tagName.toLowerCase(),semantics:r.extract(u),score:r.scoreElement(u),nthChild:f}}),degraded:a,degradationReason:a?"path-depth-overflow":void 0}}buildPathNodes(e,t,r){return this.buildPath(e,t,r).path}ensureUniqueness(e,t,r,i,n){const o=this.buildTestSelector(r,t,i);try{const l=i.ownerDocument;if(!l)return t;let a;if(this.cache){const u=this.cache.getSelectorResults(o);u!==void 0?a=u:(a=Array.from(l.querySelectorAll(o)),this.cache.setSelectorResults(o,a))}else a=l.querySelectorAll(o);if(a.length<=1)return t;const c=e.filter(u=>!t.includes(u));for(const u of c){if(n.scoreElement(u)<ai.MIN_CONFIDENCE_FOR_SKIP)continue;const h=this.insertNodeInOrder(t,u,e),f=this.buildTestSelector(r,h,i);try{let d;if(this.cache){const m=this.cache.getSelectorResults(f);m!==void 0?d=m:(d=Array.from(l.querySelectorAll(f)),this.cache.setSelectorResults(f,d))}else d=l.querySelectorAll(f);if(d.length===1)return h;d.length<a.length&&(t=h)}catch(d){}}return t}catch(l){return t}}insertNodeInOrder(e,t,r){const i=r.indexOf(t),n=[...e];let o=0;for(let l=0;l<n.length&&!(r.indexOf(n[l])>i);l++)o=l+1;return n.splice(o,0,t),n}buildTestSelector(e,t,r){const i=[];i.push(this.elementToSelector(e));for(const n of t)i.push(this.elementToSelector(n));return i.push(this.elementToSelector(r)),i.join(" ")}elementToSelector(e){let t=e.tagName.toLowerCase();e.id&&!he(e.id)&&(t+=`#${Yt(e.id)}`);for(const r of Array.from(e.classList))qt(r)||(t+=`.${Yt(r)}`);return t}filterNoise(e){return e.filter(t=>this.shouldInclude(t))}shouldInclude(e){const t=e.tagName.toLowerCase();return li.includes(t)?!0:t==="div"||t==="span"?this.hasSemanticFeatures(e):!1}hasSemanticFeatures(e){if(e.hasAttribute("role"))return!0;for(const r of Array.from(e.attributes))if(r.name.startsWith("aria-"))return!0;if(e.classList.length>0){for(const r of Array.from(e.classList))if(!qt(r))return!0}if(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))return!0;const t=e.id;return!!(t&&!he(t))}isInsideHead(e){let t=e.parentElement;for(;t;){const r=t.tagName.toLowerCase();if(r==="head")return!0;if(r==="body")return!1;t=t.parentElement}return!1}buildHeadPath(e,t,r){const i=[];let n=t.parentElement;for(;n&&n!==e;)i.unshift(n),n=n.parentElement;return n!==e?{path:[],degraded:!0,degradationReason:"target-not-descendant-of-html"}:i.findIndex(o=>o.tagName.toLowerCase()==="head")===-1?{path:[],degraded:!0,degradationReason:"head-not-found-in-path"}:{path:i.map(o=>{const l=o.parentElement;let a;if(l){const c=Array.from(l.children).indexOf(o);c!==-1&&(a=c+1)}return{tag:o.tagName.toLowerCase(),semantics:r.extract(o),score:r.scoreElement(o),nthChild:a}}),degraded:!1}}}function yi(s){return s?s.trim().replace(/[\n\t\r]/g," ").replace(/\s+/g," "):""}const wi={preserveQueryForAbsolute:!0,removeDynamicHashes:!0};function bi(s){return s?[/\d{5,}/,/[a-f0-9]{8,}/i,/(session|token|temp|random|timestamp|nonce|cache)/i,/^\d+$/,/^[a-f0-9-]{32,}$/i].some(e=>e.test(s)):!1}function xi(s,e){if(!s)return s;const t=s.startsWith("http://")||s.startsWith("https://"),[r,i]=s.split("#"),[n,o]=r.split("?");let l=n;return t&&e.preserveQueryForAbsolute&&o&&(l+=`?${o}`),i&&(e.removeDynamicHashes&&bi(i)||(l+=`#${i}`)),l}function Fr(s,e,t={}){if(!e)return e;const r=$($({},wi),t);return s==="href"||s==="src"?xi(e,r):e}const Ci=["role","aria-label","aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-level","aria-posinset","aria-setsize","aria-haspopup"],Si=["aria-selected","aria-checked","aria-pressed","aria-expanded","aria-hidden","aria-disabled","aria-current","aria-busy","aria-invalid","aria-grabbed","aria-live","aria-atomic"],vi=["data-state","data-active","data-inactive","data-selected","data-open","data-closed","data-visible","data-hidden","data-disabled","data-enabled","data-loading","data-error","data-success","data-highlighted","data-focused","data-hover","data-orientation","data-theme"],Ei=["data-radix-","data-headlessui-","data-reach-","data-mui-","data-chakra-","data-mantine-","data-tw-"],Ai=["data-testid","data-test-id","data-test","data-cy","data-qa","data-automation-id","data-id","data-component","data-entity-id","data-product-id","data-user-id"],Ri=["data-ga","data-gtm","data-google","data-layer","data-event","data-yandex","data-ym","data-metrika","data-optimizely","data-vwo","data-optimize","data-hj","data-hotjar","data-fs","data-mouseflow","data-mf","data-smartlook","data-sl","data-fb","data-facebook","data-tt","data-li","data-track","data-tracking","data-click","data-impression","data-conversion","data-segment","data-analytics"],Ni=["data-category","data-action","data-label","data-value"],Oi=["id","name","type","placeholder","title","for","alt","href"],Mi=["disabled","checked","selected","hidden","readonly","required","value"],Ti=[/^radix-/,/^headlessui-/,/^mui-/,/:\w+:/];function ki(s,e){return Ci.includes(s)?!0:Si.includes(s)||vi.includes(s)||Ei.some(t=>s.startsWith(t))?!1:Ai.includes(s)?!0:Ri.some(t=>s.startsWith(t))||Ni.includes(s)?!1:s.startsWith("data-")&&s.endsWith("-id")?!0:s==="id"?!Ti.some(t=>t.test(e)):Oi.includes(s)?!0:Mi.includes(s)?!1:!!s.startsWith("data-")}class Jt{constructor(e,t){var r;this.includeUtilityClasses=(r=e.includeUtilityClasses)!=null?r:!1,this.cache=t}extract(e){if(this.cache){const o=this.cache.getSemantics(e);if(o!==void 0)return o}const t={},r=e.id;if(r&&!he(r)&&(t.id=r),e.classList.length>0){const o=Array.from(e.classList);if(this.includeUtilityClasses)t.classes=o;else{const{semantic:l}=mi(o);l.length>0&&(t.classes=l)}}const i=this.extractAttributes(e);Object.keys(i).length>0&&(t.attributes=i);const n=e.getAttribute("role");if(n&&(t.role=n),this.shouldExtractText(e)){const o=this.extractText(e);o&&(t.text=o)}return this.cache&&this.cache.setSemantics(e,t),t}scoreElement(e){let t=.5;const r=this.extract(e);return r.id&&(t+=.15),r.classes&&r.classes.length>0&&(t+=.1),r.attributes&&Object.keys(r.attributes).length>0&&(t+=.1),r.role&&(t+=.1),r.text&&(t+=.05),Math.min(t,1)}shouldIgnoreAttribute(e){return!!(Dr.has(e)||e.startsWith("on")||e.startsWith("ng-")||e.startsWith("_ng")||e.startsWith("data-reactid")||e.startsWith("data-react")||e.startsWith("data-v-"))}getAttributePriority(e){return q[e]!==void 0?q[e]:e.startsWith("data-")?q["data-*"]:e.startsWith("aria-")?q["aria-*"]:0}isDynamicValue(e){return[/^[a-f0-9]{32,}$/i,/^\d{10,}$/,/^(undefined|null|\[object)/,/^{{.*}}$/].some(t=>t.test(e))}extractAttributes(e){const t={};for(const r of Array.from(e.attributes)){const i=r.name;if(this.shouldIgnoreAttribute(i)||!ki(i,r.value)||Ir.has(i)&&zr(r.value)||this.getAttributePriority(i)===0)continue;const n=i==="href"||i==="src"?Fr(i,r.value):r.value;!n||n.trim()===""||this.isDynamicValue(n)||(t[i]=n)}return t}extractText(e){const t=this.getDirectTextContent(e);if(!t)return null;const r=yi(t);if(!r)return null;const i=100,n=t.length>i?t.slice(0,i)+"...":t,o=r.length>i?r.slice(0,i)+"...":r;return{raw:n,normalized:o}}getDirectTextContent(e){var r;const t=[];for(const i of Array.from(e.childNodes))if(i.nodeType===Node.TEXT_NODE&&i.textContent){const n=i.textContent.trim();n&&t.push(n)}return t.length>0?t.join(" "):(r=e.textContent)!=null?r:null}shouldExtractText(e){const t=e.tagName.toLowerCase();return["button","a","label","h1","h2","h3","h4","h5","h6","p","span","li","th","td","dt","dd","legend","figcaption","summary"].includes(t)}}class $i{fingerprint(e){const t=e.tagName.toLowerCase(),r=this.getShape(t),i={shape:r,hasAnimation:this.hasAnimation(e)};if(r==="path"){const l=e.getAttribute("d");l&&(i.dHash=this.computePathHash(l))}else["circle","rect","ellipse","line"].includes(r)&&(i.geomHash=this.computeGeomHash(e,r));const n=e.getAttribute("role");n&&(i.role=n);const o=e.querySelector("title");return o!=null&&o.textContent&&(i.titleText=o.textContent.trim()),i}computePathHash(e){const t=this.normalizePathData(e);return this.simpleHash(t)}getShape(e){var t;return(t=["path","circle","rect","line","polyline","polygon","ellipse","g","text","use","svg"].find(r=>r===e))!=null?t:"path"}normalizePathData(e){var t;return((t=e.match(/[MLHVCSQTAZ][^MLHVCSQTAZ]*/gi))!=null?t:[]).slice(0,5).map(r=>r.trim().replace(/(-?\d+\.?\d*)/g,i=>parseFloat(i).toFixed(1))).join(" ")}computeGeomHash(e,t){var i,n,o,l,a,c,u,h,f;const r=[];switch(t){case"circle":r.push(`r=${(i=e.getAttribute("r"))!=null?i:"0"}`);break;case"rect":{const d=parseFloat((n=e.getAttribute("width"))!=null?n:"0"),m=parseFloat((o=e.getAttribute("height"))!=null?o:"0");d>0&&m>0&&r.push(`ratio=${(d/m).toFixed(2)}`)}break;case"ellipse":{const d=parseFloat((l=e.getAttribute("rx"))!=null?l:"0"),m=parseFloat((a=e.getAttribute("ry"))!=null?a:"0");d>0&&m>0&&r.push(`ratio=${(d/m).toFixed(2)}`)}break;case"line":{const d=parseFloat((c=e.getAttribute("x1"))!=null?c:"0"),m=parseFloat((u=e.getAttribute("y1"))!=null?u:"0"),x=parseFloat((h=e.getAttribute("x2"))!=null?h:"0"),p=parseFloat((f=e.getAttribute("y2"))!=null?f:"0"),y=Math.atan2(p-m,x-d);r.push(`angle=${y.toFixed(2)}`)}break}return this.simpleHash(r.join(";"))}hasAnimation(e){if(e.querySelector("animate, animateTransform, animateMotion"))return!0;const t=e.ownerDocument;if(t!=null&&t.defaultView)try{const r=t.defaultView.getComputedStyle(e);if(r.animationName!=="none"||r.transitionProperty!=="all"&&r.transitionProperty!=="none")return!0}catch(r){}return!1}simpleHash(e){let t=0;for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);t=(t<<5)-t+i,t=t&t}return Math.abs(t).toString(16).padStart(8,"0")}}function Li(s,e=0){const t=s.anchor.score,r=s.path.length>0?s.path.reduce((l,a)=>l+a.score,0)/s.path.length:.5,i=s.target.score,n=t*Ce.ANCHOR+r*Ce.PATH+i*Ce.TARGET+e*Ce.UNIQUENESS,o=s.anchor.degraded?.2:0;return Math.max(0,Math.min(1,n-o))}class _i{constructor(e){this.cache=new Map,this.maxSize=e}get(e){const t=this.cache.get(e);if(t!==void 0)return this.cache.delete(e),this.cache.set(e,t),t}set(e,t){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.maxSize){const r=this.cache.keys().next().value;r!==void 0&&this.cache.delete(r)}this.cache.set(e,t)}has(e){return this.cache.has(e)}delete(e){this.cache.delete(e)}clear(){this.cache.clear()}get size(){return this.cache.size}}class Pi{constructor(e={}){var t,r;this.eidCache=new WeakMap,this.selectorResultCache=new _i((t=e.maxSelectorCacheSize)!=null?t:1e3),this.anchorCache=new WeakMap,this.semanticsCache=new WeakMap,this.stats={eidHits:0,eidMisses:0,selectorHits:0,selectorMisses:0,anchorHits:0,anchorMisses:0,semanticsHits:0,semanticsMisses:0,selectorCacheSize:0,maxSelectorCacheSize:(r=e.maxSelectorCacheSize)!=null?r:1e3}}getEID(e){const t=this.eidCache.get(e);if(t!==void 0)return this.stats.eidHits++,t;this.stats.eidMisses++}setEID(e,t){this.eidCache.set(e,t)}getSelectorResults(e){const t=this.selectorResultCache.get(e);if(t!==void 0)return this.stats.selectorHits++,this.stats.selectorCacheSize=this.selectorResultCache.size,t;this.stats.selectorMisses++,this.stats.selectorCacheSize=this.selectorResultCache.size}setSelectorResults(e,t){this.selectorResultCache.set(e,t),this.stats.selectorCacheSize=this.selectorResultCache.size}getAnchor(e){if(this.anchorCache.has(e))return this.stats.anchorHits++,this.anchorCache.get(e);this.stats.anchorMisses++}setAnchor(e,t){this.anchorCache.set(e,t)}getSemantics(e){const t=this.semanticsCache.get(e);if(t!==void 0)return this.stats.semanticsHits++,t;this.stats.semanticsMisses++}setSemantics(e,t){this.semanticsCache.set(e,t)}clear(){this.selectorResultCache.clear(),this.stats.selectorCacheSize=0,this.stats={eidHits:0,eidMisses:0,selectorHits:0,selectorMisses:0,anchorHits:0,anchorMisses:0,semanticsHits:0,semanticsMisses:0,selectorCacheSize:0,maxSelectorCacheSize:this.stats.maxSelectorCacheSize}}invalidateElement(e){}invalidateSelector(e){this.selectorResultCache.delete(e),this.stats.selectorCacheSize=this.selectorResultCache.size}getStats(){return Z($({},this.stats),{selectorCacheSize:this.selectorResultCache.size})}getEIDHitRate(){const e=this.stats.eidHits+this.stats.eidMisses;return e>0?this.stats.eidHits/e:0}getSelectorHitRate(){const e=this.stats.selectorHits+this.stats.selectorMisses;return e>0?this.stats.selectorHits/e:0}getAnchorHitRate(){const e=this.stats.anchorHits+this.stats.anchorMisses;return e>0?this.stats.anchorHits/e:0}getSemanticsHitRate(){const e=this.stats.semanticsHits+this.stats.semanticsMisses;return e>0?this.stats.semanticsHits/e:0}getOverallHitRate(){const e=this.stats.eidHits+this.stats.selectorHits+this.stats.anchorHits+this.stats.semanticsHits,t=this.stats.eidMisses+this.stats.selectorMisses+this.stats.anchorMisses+this.stats.semanticsMisses,r=e+t;return r>0?e/r:0}}function Di(s){return new Pi(s)}let Ze=null;function Ii(){return Ze||(Ze=Di()),Ze}function Qt(s){if(s.ownerDocument)return s.ownerDocument;let e=s;for(;e;){if(e.nodeType===9)return e;e=e.parentNode}throw new Error(`Element does not have an ownerDocument. This typically means:
3
3
  1. The element is detached from the DOM
4
4
  2. The element was created but never attached
5
5
  3. You are working with a document node instead of an element`)}function zi(s,e){if(!e)return;const t=Qt(s),r=e instanceof Document?e:Qt(e);if(t!==r)throw new Error(`Cross-document operation detected: element and root are from different documents.