@appsurify-testmap/rrweb 3.3.0-alpha.1 → 3.4.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.
- package/dist/rrweb.cjs +7 -9
- package/dist/rrweb.cjs.map +1 -1
- package/dist/rrweb.js +7 -9
- package/dist/rrweb.js.map +1 -1
- package/dist/rrweb.umd.cjs +7 -9
- package/dist/rrweb.umd.cjs.map +2 -2
- package/dist/rrweb.umd.min.cjs +18 -18
- package/dist/rrweb.umd.min.cjs.map +3 -3
- package/package.json +5 -5
package/dist/rrweb.umd.min.cjs
CHANGED
|
@@ -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("rrweb", [], f);} else if ("object" == typeof exports) {exports["rrweb"] = f();} else {g["rrweb"] = f();}}(typeof self !== 'undefined' ? self : typeof globalThis !== 'undefined' ? globalThis : this, () => {var exports = {};var module = { exports };
|
|
2
|
-
"use strict";var vc=Object.defineProperty,Sc=Object.defineProperties;var Cc=Object.getOwnPropertyDescriptors;var ss=Object.getOwnPropertySymbols;var An=Object.prototype.hasOwnProperty,Mn=Object.prototype.propertyIsEnumerable;var En=(i,e,t)=>e in i?vc(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,M=(i,e)=>{for(var t in e||(e={}))An.call(e,t)&&En(i,t,e[t]);if(ss)for(var t of ss(e))Mn.call(e,t)&&En(i,t,e[t]);return i},re=(i,e)=>Sc(i,Cc(e));var Qe=(i,e)=>{var t={};for(var s in i)An.call(i,s)&&e.indexOf(s)<0&&(t[s]=i[s]);if(i!=null&&ss)for(var s of ss(i))e.indexOf(s)<0&&Mn.call(i,s)&&(t[s]=i[s]);return t};var xc=Object.defineProperty,Ec=(i,e,t)=>e in i?xc(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,b=(i,e,t)=>Ec(i,typeof e!="symbol"?e+"":e,t),In;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Ac=Object.defineProperty,Mc=(i,e,t)=>e in i?Ac(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,bi=(i,e,t)=>Mc(i,typeof e!="symbol"?e+"":e,t),_=(i=>(i[i.Document=0]="Document",i[i.DocumentType=1]="DocumentType",i[i.Element=2]="Element",i[i.Text=3]="Text",i[i.CDATA=4]="CDATA",i[i.Comment=5]="Comment",i))(_||{});const Nn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Rn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},is={},Ic=()=>!!globalThis.Zone;function Ar(i){if(is[i])return is[i];const e=globalThis[i],t=e.prototype,s=i in Nn?Nn[i]:void 0,r=!!(s&&s.every(l=>{var a,c;return!!((c=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&c.toString().includes("[native code]"))})),n=i in Rn?Rn[i]: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(r&&o&&!Ic())return is[i]=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[i].prototype;return document.body.removeChild(l),c?is[i]=c:t}catch(l){return t}}const wi={};function je(i,e,t){var s;const r=`${i}.${String(t)}`;if(wi[r])return wi[r].call(e);const n=Ar(i),o=(s=Object.getOwnPropertyDescriptor(n,t))==null?void 0:s.get;return o?(wi[r]=o,o.call(e)):e[t]}const vi={};function ra(i,e,t){const s=`${i}.${String(t)}`;if(vi[s])return vi[s].bind(e);const n=Ar(i)[t];return typeof n!="function"?e[t]:(vi[s]=n,n.bind(e))}function Nc(i){return je("Node",i,"childNodes")}function Rc(i){return je("Node",i,"parentNode")}function Tc(i){return je("Node",i,"parentElement")}function Oc(i){return je("Node",i,"textContent")}function Dc(i,e){return ra("Node",i,"contains")(e)}function $c(i){return ra("Node",i,"getRootNode")()}function kc(i){return!i||!("host"in i)?null:je("ShadowRoot",i,"host")}function _c(i){return i.styleSheets}function Lc(i){return!i||!("shadowRoot"in i)?null:je("Element",i,"shadowRoot")}function Pc(i,e){return je("Element",i,"querySelector")(e)}function Fc(i,e){return je("Element",i,"querySelectorAll")(e)}function zc(){return Ar("MutationObserver").constructor}function Bc(i,e,t){try{if(!(e in i))return()=>{};const s=i[e],r=t(s);return typeof r=="function"&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__rrweb_original__:{enumerable:!1,value:s}})),i[e]=r,()=>{i[e]=s}}catch(s){return()=>{}}}function Wc(i){const e=i.tagName.toLowerCase(),t=i.id?`#${i.id}`:"",s=i.classList.length?"."+Array.from(i.classList).join("."):"";return`${e}${t}${s}`}function Uc(i){var d;var e,t;const s=(d=(e=i.ownerDocument)==null?void 0:e.defaultView)!=null?d:window,r=i.getBoundingClientRect(),n=s.innerWidth||s.document.documentElement.clientWidth||0,o=s.innerHeight||s.document.documentElement.clientHeight||0,l=r.width>0&&r.height>0&&r.bottom>0&&r.right>0&&r.top<o&&r.left<n,a=(t=s.getComputedStyle)==null?void 0:t.call(s,i),u=!!a&&a.display!=="none"&&a.visibility!=="hidden"&&(parseFloat(a.opacity)||0)>0&&l;let h=0;if(u){const f=Math.max(0,Math.min(r.right,n)-Math.max(r.left,0)),m=Math.max(0,Math.min(r.bottom,o)-Math.max(r.top,0)),y=f*m,p=r.width*r.height;h=p>0?y/p:0}return{isVisible:u,ratio:h}}const oe={childNodes:Nc,parentNode:Rc,parentElement:Tc,textContent:Oc,contains:Dc,getRootNode:$c,host:kc,styleSheets:_c,shadowRoot:Lc,querySelector:Pc,querySelectorAll:Fc,mutationObserver:zc,patch:Bc,describeNode:Wc,getElementVisibility:Uc};function Tt(i){return i.nodeType===i.ELEMENT_NODE}function Ot(i){const e=i&&"host"in i&&"mode"in i&&oe.host(i)||null;return!!(e&&"shadowRoot"in e&&oe.shadowRoot(e)===i)}function Dt(i){return Object.prototype.toString.call(i)==="[object ShadowRoot]"}function Vc(i){return i.includes(" background-clip: text;")&&!i.includes(" -webkit-background-clip: text;")&&(i=i.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),i}function Hc(i){const{cssText:e}=i;if(e.split('"').length<3)return e;const t=["@import",`url(${JSON.stringify(i.href)})`];return i.layerName===""?t.push("layer"):i.layerName&&t.push(`layer(${i.layerName})`),i.supportsText&&t.push(`supports(${i.supportsText})`),i.media.length&&t.push(i.media.mediaText),t.join(" ")+";"}function Bi(i){try{const e=i.rules||i.cssRules;if(!e)return null;let t=i.href;!t&&i.ownerNode&&i.ownerNode.ownerDocument&&(t=i.ownerNode.ownerDocument.location.href);const s=Array.from(e,r=>na(r,t)).join("");return Vc(s)}catch(e){return null}}function na(i,e){if(jc(i)){let t;try{t=Bi(i.styleSheet)||Hc(i)}catch(s){t=i.cssText}return i.styleSheet.href?Ls(t,i.styleSheet.href):t}else{let t=i.cssText;return i.type===CSSRule.KEYFRAMES_RULE||(i.type,CSSRule.KEYFRAME_RULE),Yc(i)&&i.selectorText.includes(":")&&(t=Gc(t)),e?Ls(t,e):t}}function Gc(i){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return i.replace(e,"$1\\$2")}function jc(i){return"styleSheet"in i}function Yc(i){return"selectorText"in i}class Mr{constructor(){bi(this,"idNodeMap",new Map),bi(this,"nodeMetaMap",new WeakMap),bi(this,"selectorNodeMap",new Map)}getId(e){var t;if(!e)return-1;const s=(t=this.getMeta(e))==null?void 0:t.id;return s!=null?s:-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 s=this.getMeta(e);if(s!=null&&s.selector){const r=this.selectorNodeMap.get(s.selector);r&&(r.delete(e),r.size===0&&this.selectorNodeMap.delete(s.selector))}e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const s=t.id;if(this.idNodeMap.set(s,e),this.nodeMetaMap.set(e,t),t.selector){let r=this.selectorNodeMap.get(t.selector);r||(r=new Set,this.selectorNodeMap.set(t.selector,r)),r.add(e)}}replace(e,t){const s=this.getNode(e);if(s){const r=this.nodeMetaMap.get(s);if(r&&(this.nodeMetaMap.set(t,r),r.selector)){const n=this.selectorNodeMap.get(r.selector);n&&(n.delete(s),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 oa(){return new Mr}function ks({element:i,maskInputOptions:e,tagName:t,type:s,value:r,maskInputFn:n}){let o=r||"";const l=s&&Ge(s);return(e[t.toLowerCase()]||l&&e[l])&&(n?o=n(o,i):o="*".repeat(o.length)),o}function Ge(i){return i.toLowerCase()}const Tn="__rrweb_original__";function Zc(i){const e=i.getContext("2d");if(!e)return!0;const t=50;for(let s=0;s<i.width;s+=t)for(let r=0;r<i.height;r+=t){const n=e.getImageData,o=Tn in n?n[Tn]:n;if(new Uint32Array(o.call(e,s,r,Math.min(t,i.width-s),Math.min(t,i.height-r)).data.buffer).some(a=>a!==0))return!1}return!0}function Xc(i,e){return!i||!e||i.type!==e.type?!1:i.type===_.Document?i.compatMode===e.compatMode:i.type===_.DocumentType?i.name===e.name&&i.publicId===e.publicId&&i.systemId===e.systemId:i.type===_.Comment||i.type===_.Text||i.type===_.CDATA?i.textContent===e.textContent:i.type===_.Element?i.tagName===e.tagName&&JSON.stringify(i.attributes)===JSON.stringify(e.attributes)&&i.isSVG===e.isSVG&&i.needBlock===e.needBlock:!1}function _s(i){const e=i.type;return i.hasAttribute("data-rr-is-password")?"password":e?Ge(e):null}function Ir(i,e){var n;let t;try{t=new URL(i,e!=null?e:window.location.href)}catch(o){return null}const s=/\.([0-9a-z]+)(?:$)/i,r=t.pathname.match(s);return(n=r==null?void 0:r[1])!=null?n:null}function Jc(i){let e="";return i.indexOf("//")>-1?e=i.split("/").slice(0,3).join("/"):e=i.split("/")[0],e=e.split("?")[0],e}const qc=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Kc=/^(?:[a-z+]+:)?\/\//i,Qc=/^www\..*/i,eu=/^(data:)([^,]*),(.*)/i;function Ls(i,e){return(i||"").replace(qc,(t,s,r,n,o,l)=>{const a=r||o||l,c=s||n||"";if(!a)return t;if(Kc.test(a)||Qc.test(a))return`url(${c}${a}${c})`;if(eu.test(a))return`url(${c}${a}${c})`;if(a[0]==="/")return`url(${c}${Jc(e)+a}${c})`;const u=e.split("/"),h=a.split("/");u.pop();for(const d of h)d!=="."&&(d===".."?u.pop():u.push(d));return`url(${c}${u.join("/")}${c})`})}function rs(i,e=!1){return e?i.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):i.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function tu(i,e,t=!1){const s=Array.from(e.childNodes),r=[];let n=0;if(s.length>1&&i&&typeof i=="string"){let o=rs(i,t);const l=o.length/i.length;for(let a=1;a<s.length;a++)if(s[a].textContent&&typeof s[a].textContent=="string"){const c=rs(s[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 d=c.substring(0,h),f=o.split(d),m=-1;if(f.length===2)m=f[0].length;else if(f.length>2&&f[0]===""&&s[a-1].textContent!=="")m=o.indexOf(d,1);else if(f.length===1){if(d=d.substring(0,d.length-1),f=o.split(d),f.length<=1)return r.push(i),r;h=u+1}else h===c.length-1&&(m=o.indexOf(d));if(f.length>=2&&h>u){const y=s[a-1].textContent;if(y&&typeof y=="string"){const p=rs(y).length;m=o.indexOf(d,p)}m===-1&&(m=f[0].length)}if(m!==-1){let y=Math.floor(m/l);for(;y>0&&y<i.length;){if(n+=1,n>50*s.length)return r.push(i),r;const p=rs(i.substring(0,y),t);if(p.length===m){r.push(i.substring(0,y)),i=i.substring(y),o=o.substring(m);break}else p.length<m?y+=Math.max(1,Math.floor((m-p.length)/l)):y-=Math.max(1,Math.floor((p.length-m)*l))}break}}}}return r.push(i),r}function su(i,e){return tu(i,e).join("/* rr_split */")}function iu(i){var e;const t=oe.parentNode(i),s=t&&t;return!s||!Nr(s)?!1:((e=i.textContent)==null?void 0:e.trim())!==""}function Nr(i){return oe.getElementVisibility(i).isVisible}const ru=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],nu=["a","button","input","select","textarea","label","details","summary","dialog","video","audio"],ou=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],Rr=new WeakSet,au=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(i,e,t){if(au.call(this,i,e,t),this instanceof Element){const s=i.toLowerCase();ru.includes(s)&&Rr.add(this)}};const lu=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(i,e,t){lu.call(this,i,e,t)};function cu(i){return i instanceof Element&&Rr.has(i)}function uu(i){if(i.nodeType===Node.ELEMENT_NODE){const e=i,t=e.tagName.toLowerCase();if(nu.includes(t))return!0;const s=e.hasAttribute("tabindex")&&e.getAttribute("tabindex")!=="-1",r=["button","link","checkbox","switch","menuitem"].includes(e.getAttribute("role")||"");return cu(e)||s||r||e instanceof HTMLAnchorElement&&e.hasAttribute("href")||e instanceof HTMLButtonElement&&!e.disabled}return!1}function On(){document.querySelectorAll("*").forEach(e=>{ou.forEach(t=>{e.hasAttribute(t)&&Rr.add(e)})})}try{document.readyState==="complete"||document.readyState==="interactive"?On():document.addEventListener("DOMContentLoaded",On)}catch(i){}const ns={ANCHOR:.4,PATH:.3,TARGET:.2,UNIQUENESS:.1},xe={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},hu={MIN_CONFIDENCE_FOR_SKIP:.7},Dn=["form","main","nav","section","article","footer","header"],$n=["form","navigation","main","region","contentinfo","complementary","banner","search"],du=["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"],We={"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},aa=new Set(["id","class","style","xmlns","tabindex","contenteditable"]),fu={maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:0,fallbackToBody:!0,includeUtilityClasses:!1,source:"dom-dsl"};function _t(i){if(/^[a-z]+-\d+$/i.test(i)||/^[a-z]+(-[a-z]+)+-\d+$/i.test(i)||/^[a-z]+(_[a-z]+)*_\d+$/i.test(i)||/^\d+$/.test(i)||/^:[a-z0-9]+:$/i.test(i)||/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i.test(i))return!0;if(/^[a-z]{1,3}[A-Za-z0-9]{8,}$/.test(i)){const e=/\d/.test(i),t=/[A-Z]/.test(i),s=i.length>=20;if(e&&t||s)return!0}return!!(/^radix-/.test(i)||/^mui-\d+$/.test(i))}const la=new Set(["aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-activedescendant","for","form","list","headers","aria-details","aria-errormessage","aria-flowto"]);function ca(i){return i.trim().split(/\s+/).some(e=>_t(e))}let pu=class{constructor(e,t){var s;this.maxDepth=(s=e.maxPathDepth)!=null?s: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(),s=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=s==null?void 0:s.documentElement;if(a){const c={element:a,score:1,tier:"A",depth:0};return this.cacheResult(e,c),c}}if(t==="body"){const a=s==null?void 0:s.documentElement;if(a){const c={element:a,score:1,tier:"A",depth:0};return this.cacheResult(e,c),c}}let r=e.parentElement,n=0,o=null;for(;r&&n<this.maxDepth;){if(r.tagName.toLowerCase()==="body")return o||{element:r,score:xe.DEGRADED_SCORE,tier:"C",depth:n};const a=this.scoreAnchor(r);if(a>0){const c=this.applyDepthPenalty(a,n),u=this.getTier(r),h={element:r,score:c,tier:u,depth:n};if(u==="A")return h;(!o||c>o.score)&&(o=h)}r=r.parentElement,n++}const l=o;return this.cache&&this.cache.setAnchor(e,l),l}scoreAnchor(e){let t=0;const s=e.tagName.toLowerCase();Dn.includes(s)&&(t+=xe.SEMANTIC_TAG);const r=e.getAttribute("role");r&&$n.includes(r)&&(t+=xe.ROLE),(e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby"))&&(t+=xe.ARIA_LABEL);const n=e.id;return n&&!_t(n)&&(t+=xe.STABLE_ID),(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))&&(t+=xe.TEST_MARKER),Math.min(t,1)}applyDepthPenalty(e,t){if(t<=xe.DEPTH_PENALTY_THRESHOLD)return e;const s=(t-xe.DEPTH_PENALTY_THRESHOLD)*xe.DEPTH_PENALTY_FACTOR;return Math.max(0,e-s)}getTier(e){const t=e.tagName.toLowerCase();if(Dn.includes(t))return"A";const s=e.getAttribute("role");return s&&$n.includes(s)?"B":"C"}isInsideHead(e){let t=e.parentElement;for(;t;){const s=t.tagName.toLowerCase();if(s==="head")return!0;if(s==="body")return!1;t=t.parentElement}return!1}cacheResult(e,t){this.cache&&this.cache.setAnchor(e,t)}};const mu=[/^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,}/],gu=[/^\[/,/^(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 Tr(i){return mu.some(e=>e.test(i))}function Or(i){return i.length<=2||/^\d/.test(i)?!0:gu.some(e=>e.test(i))}function yu(i){return!Tr(i)&&!Or(i)}function bu(i){return i.filter(e=>yu(e))}function wu(i){const e=[],t=[];for(const s of i)Or(s)||Tr(s)?t.push(s):e.push(s);return{semantic:e,utility:t}}function kn(i){return Or(i)||Tr(i)}const _n=i=>i.replace(/([#:.[\]@])/g,"\\$1");let vu=class{constructor(e,t){var s;this.maxDepth=(s=e.maxPathDepth)!=null?s:10,this.cache=t}buildPath(e,t,s){const r=e.tagName.toLowerCase(),n=t.tagName.toLowerCase();if(r==="html"&&(n==="head"||n==="body"))return{path:[],degraded:!1};if(r==="html"&&this.isInsideHead(t))return this.buildHeadPath(e,t,s);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,s),{path:c.map(u=>{const h=u.parentElement;let d;if(h){const f=Array.from(h.children).indexOf(u);f!==-1&&(d=f+1)}return{tag:u.tagName.toLowerCase(),semantics:s.extract(u),score:s.scoreElement(u),nthChild:d}}),degraded:a,degradationReason:a?"path-depth-overflow":void 0}}buildPathNodes(e,t,s){return this.buildPath(e,t,s).path}ensureUniqueness(e,t,s,r,n){const o=this.buildTestSelector(s,t,r);try{const l=r.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)<hu.MIN_CONFIDENCE_FOR_SKIP)continue;const h=this.insertNodeInOrder(t,u,e),d=this.buildTestSelector(s,h,r);try{let f;if(this.cache){const m=this.cache.getSelectorResults(d);m!==void 0?f=m:(f=Array.from(l.querySelectorAll(d)),this.cache.setSelectorResults(d,f))}else f=l.querySelectorAll(d);if(f.length===1)return h;f.length<a.length&&(t=h)}catch(f){}}return t}catch(l){return t}}insertNodeInOrder(e,t,s){const r=s.indexOf(t),n=[...e];let o=0;for(let l=0;l<n.length&&!(s.indexOf(n[l])>r);l++)o=l+1;return n.splice(o,0,t),n}buildTestSelector(e,t,s){const r=[];r.push(this.elementToSelector(e));for(const n of t)r.push(this.elementToSelector(n));return r.push(this.elementToSelector(s)),r.join(" ")}elementToSelector(e){let t=e.tagName.toLowerCase();e.id&&!_t(e.id)&&(t+=`#${_n(e.id)}`);for(const s of Array.from(e.classList))kn(s)||(t+=`.${_n(s)}`);return t}filterNoise(e){return e.filter(t=>this.shouldInclude(t))}shouldInclude(e){const t=e.tagName.toLowerCase();return du.includes(t)?!0:t==="div"||t==="span"?this.hasSemanticFeatures(e):!1}hasSemanticFeatures(e){if(e.hasAttribute("role"))return!0;for(const s of Array.from(e.attributes))if(s.name.startsWith("aria-"))return!0;if(e.classList.length>0){for(const s of Array.from(e.classList))if(!kn(s))return!0}if(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))return!0;const t=e.id;return!!(t&&!_t(t))}isInsideHead(e){let t=e.parentElement;for(;t;){const s=t.tagName.toLowerCase();if(s==="head")return!0;if(s==="body")return!1;t=t.parentElement}return!1}buildHeadPath(e,t,s){const r=[];let n=t.parentElement;for(;n&&n!==e;)r.unshift(n),n=n.parentElement;return n!==e?{path:[],degraded:!0,degradationReason:"target-not-descendant-of-html"}:r.findIndex(o=>o.tagName.toLowerCase()==="head")===-1?{path:[],degraded:!0,degradationReason:"head-not-found-in-path"}:{path:r.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:s.extract(o),score:s.scoreElement(o),nthChild:a}}),degraded:!1}}};function Su(i){return i?i.trim().replace(/[\n\t\r]/g," ").replace(/\s+/g," "):""}const Cu={preserveQueryForAbsolute:!0,removeDynamicHashes:!0};function xu(i){return i?[/\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(i)):!1}function Eu(i,e){if(!i)return i;const t=i.startsWith("http://")||i.startsWith("https://"),[s,r]=i.split("#"),[n,o]=s.split("?");let l=n;return t&&e.preserveQueryForAbsolute&&o&&(l+=`?${o}`),r&&(e.removeDynamicHashes&&xu(r)||(l+=`#${r}`)),l}function ua(i,e,t={}){if(!e)return e;const s=M(M({},Cu),t);return i==="href"||i==="src"?Eu(e,s):e}const Au=["role","aria-label","aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-level","aria-posinset","aria-setsize","aria-haspopup"],Mu=["aria-selected","aria-checked","aria-pressed","aria-expanded","aria-hidden","aria-disabled","aria-current","aria-busy","aria-invalid","aria-grabbed","aria-live","aria-atomic"],Iu=["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"],Nu=["data-radix-","data-headlessui-","data-reach-","data-mui-","data-chakra-","data-mantine-","data-tw-"],Ru=["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"],Tu=["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"],Ou=["data-category","data-action","data-label","data-value"],Du=["id","name","type","placeholder","title","for","alt","href"],$u=["disabled","checked","selected","hidden","readonly","required","value"],ku=[/^radix-/,/^headlessui-/,/^mui-/,/:\w+:/];function _u(i,e){return Au.includes(i)?!0:Mu.includes(i)||Iu.includes(i)||Nu.some(t=>i.startsWith(t))?!1:Ru.includes(i)?!0:Tu.some(t=>i.startsWith(t))||Ou.includes(i)?!1:i.startsWith("data-")&&i.endsWith("-id")?!0:i==="id"?!ku.some(t=>t.test(e)):Du.includes(i)?!0:$u.includes(i)?!1:!!i.startsWith("data-")}let Ln=class{constructor(e,t){var s;this.includeUtilityClasses=(s=e.includeUtilityClasses)!=null?s:!1,this.cache=t}extract(e){if(this.cache){const o=this.cache.getSemantics(e);if(o!==void 0)return o}const t={},s=e.id;if(s&&!_t(s)&&(t.id=s),e.classList.length>0){const o=Array.from(e.classList);if(this.includeUtilityClasses)t.classes=o;else{const{semantic:l}=wu(o);l.length>0&&(t.classes=l)}}const r=this.extractAttributes(e);Object.keys(r).length>0&&(t.attributes=r);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 s=this.extract(e);return s.id&&(t+=.15),s.classes&&s.classes.length>0&&(t+=.1),s.attributes&&Object.keys(s.attributes).length>0&&(t+=.1),s.role&&(t+=.1),s.text&&(t+=.05),Math.min(t,1)}shouldIgnoreAttribute(e){return!!(aa.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 We[e]!==void 0?We[e]:e.startsWith("data-")?We["data-*"]:e.startsWith("aria-")?We["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 s of Array.from(e.attributes)){const r=s.name;if(this.shouldIgnoreAttribute(r)||!_u(r,s.value)||la.has(r)&&ca(s.value)||this.getAttributePriority(r)===0)continue;const n=r==="href"||r==="src"?ua(r,s.value):s.value;!n||n.trim()===""||this.isDynamicValue(n)||(t[r]=n)}return t}extractText(e){const t=this.getDirectTextContent(e);if(!t)return null;const s=Su(t);if(!s)return null;const r=100,n=t.length>r?t.slice(0,r)+"...":t,o=s.length>r?s.slice(0,r)+"...":s;return{raw:n,normalized:o}}getDirectTextContent(e){var s;const t=[];for(const r of Array.from(e.childNodes))if(r.nodeType===Node.TEXT_NODE&&r.textContent){const n=r.textContent.trim();n&&t.push(n)}return t.length>0?t.join(" "):(s=e.textContent)!=null?s: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)}},Lu=class{fingerprint(e){const t=e.tagName.toLowerCase(),s=this.getShape(t),r={shape:s,hasAnimation:this.hasAnimation(e)};if(s==="path"){const l=e.getAttribute("d");l&&(r.dHash=this.computePathHash(l))}else["circle","rect","ellipse","line"].includes(s)&&(r.geomHash=this.computeGeomHash(e,s));const n=e.getAttribute("role");n&&(r.role=n);const o=e.querySelector("title");return o!=null&&o.textContent&&(r.titleText=o.textContent.trim()),r}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(s=>s===e))!=null?t:"path"}normalizePathData(e){var t;return((t=e.match(/[MLHVCSQTAZ][^MLHVCSQTAZ]*/gi))!=null?t:[]).slice(0,5).map(s=>s.trim().replace(/(-?\d+\.?\d*)/g,r=>parseFloat(r).toFixed(1))).join(" ")}computeGeomHash(e,t){var r,n,o,l,a,c,u,h,d;const s=[];switch(t){case"circle":s.push(`r=${(r=e.getAttribute("r"))!=null?r:"0"}`);break;case"rect":{const f=parseFloat((n=e.getAttribute("width"))!=null?n:"0"),m=parseFloat((o=e.getAttribute("height"))!=null?o:"0");f>0&&m>0&&s.push(`ratio=${(f/m).toFixed(2)}`)}break;case"ellipse":{const f=parseFloat((l=e.getAttribute("rx"))!=null?l:"0"),m=parseFloat((a=e.getAttribute("ry"))!=null?a:"0");f>0&&m>0&&s.push(`ratio=${(f/m).toFixed(2)}`)}break;case"line":{const f=parseFloat((c=e.getAttribute("x1"))!=null?c:"0"),m=parseFloat((u=e.getAttribute("y1"))!=null?u:"0"),y=parseFloat((h=e.getAttribute("x2"))!=null?h:"0"),p=parseFloat((d=e.getAttribute("y2"))!=null?d:"0"),g=Math.atan2(p-m,y-f);s.push(`angle=${g.toFixed(2)}`)}break}return this.simpleHash(s.join(";"))}hasAnimation(e){if(e.querySelector("animate, animateTransform, animateMotion"))return!0;const t=e.ownerDocument;if(t!=null&&t.defaultView)try{const s=t.defaultView.getComputedStyle(e);if(s.animationName!=="none"||s.transitionProperty!=="all"&&s.transitionProperty!=="none")return!0}catch(s){}return!1}simpleHash(e){let t=0;for(let s=0;s<e.length;s++){const r=e.charCodeAt(s);t=(t<<5)-t+r,t=t&t}return Math.abs(t).toString(16).padStart(8,"0")}};function Pu(i,e=0){const t=i.anchor.score,s=i.path.length>0?i.path.reduce((l,a)=>l+a.score,0)/i.path.length:.5,r=i.target.score,n=t*ns.ANCHOR+s*ns.PATH+r*ns.TARGET+e*ns.UNIQUENESS,o=i.anchor.degraded?.2:0;return Math.max(0,Math.min(1,n-o))}let Fu=class{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 s=this.cache.keys().next().value;s!==void 0&&this.cache.delete(s)}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}},zu=class{constructor(e={}){var t,s;this.eidCache=new WeakMap,this.selectorResultCache=new Fu((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:(s=e.maxSelectorCacheSize)!=null?s: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 re(M({},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,s=e+t;return s>0?e/s:0}};function Bu(i){return new zu(i)}let Si=null;function Wu(){return Si||(Si=Bu()),Si}function Pn(i){if(i.ownerDocument)return i.ownerDocument;let e=i;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 vc=Object.defineProperty,Sc=Object.defineProperties;var Cc=Object.getOwnPropertyDescriptors;var ss=Object.getOwnPropertySymbols;var Mn=Object.prototype.hasOwnProperty,An=Object.prototype.propertyIsEnumerable;var En=(i,e,t)=>e in i?vc(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,A=(i,e)=>{for(var t in e||(e={}))Mn.call(e,t)&&En(i,t,e[t]);if(ss)for(var t of ss(e))An.call(e,t)&&En(i,t,e[t]);return i},re=(i,e)=>Sc(i,Cc(e));var Qe=(i,e)=>{var t={};for(var s in i)Mn.call(i,s)&&e.indexOf(s)<0&&(t[s]=i[s]);if(i!=null&&ss)for(var s of ss(i))e.indexOf(s)<0&&An.call(i,s)&&(t[s]=i[s]);return t};var xc=Object.defineProperty,Ec=(i,e,t)=>e in i?xc(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,b=(i,e,t)=>Ec(i,typeof e!="symbol"?e+"":e,t),In;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Mc=Object.defineProperty,Ac=(i,e,t)=>e in i?Mc(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,bi=(i,e,t)=>Ac(i,typeof e!="symbol"?e+"":e,t),_=(i=>(i[i.Document=0]="Document",i[i.DocumentType=1]="DocumentType",i[i.Element=2]="Element",i[i.Text=3]="Text",i[i.CDATA=4]="CDATA",i[i.Comment=5]="Comment",i))(_||{});const Nn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Rn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},is={},Ic=()=>!!globalThis.Zone;function Mr(i){if(is[i])return is[i];const e=globalThis[i],t=e.prototype,s=i in Nn?Nn[i]:void 0,r=!!(s&&s.every(l=>{var a,c;return!!((c=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&c.toString().includes("[native code]"))})),n=i in Rn?Rn[i]: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(r&&o&&!Ic())return is[i]=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[i].prototype;return document.body.removeChild(l),c?is[i]=c:t}catch(l){return t}}const wi={};function je(i,e,t){var s;const r=`${i}.${String(t)}`;if(wi[r])return wi[r].call(e);const n=Mr(i),o=(s=Object.getOwnPropertyDescriptor(n,t))==null?void 0:s.get;return o?(wi[r]=o,o.call(e)):e[t]}const vi={};function ra(i,e,t){const s=`${i}.${String(t)}`;if(vi[s])return vi[s].bind(e);const n=Mr(i)[t];return typeof n!="function"?e[t]:(vi[s]=n,n.bind(e))}function Nc(i){return je("Node",i,"childNodes")}function Rc(i){return je("Node",i,"parentNode")}function Tc(i){return je("Node",i,"parentElement")}function Oc(i){return je("Node",i,"textContent")}function Dc(i,e){return ra("Node",i,"contains")(e)}function $c(i){return ra("Node",i,"getRootNode")()}function kc(i){return!i||!("host"in i)?null:je("ShadowRoot",i,"host")}function _c(i){return i.styleSheets}function Lc(i){return!i||!("shadowRoot"in i)?null:je("Element",i,"shadowRoot")}function Pc(i,e){return je("Element",i,"querySelector")(e)}function Fc(i,e){return je("Element",i,"querySelectorAll")(e)}function zc(){return Mr("MutationObserver").constructor}function Bc(i,e,t){try{if(!(e in i))return()=>{};const s=i[e],r=t(s);return typeof r=="function"&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__rrweb_original__:{enumerable:!1,value:s}})),i[e]=r,()=>{i[e]=s}}catch(s){return()=>{}}}function Wc(i){const e=i.tagName.toLowerCase(),t=i.id?`#${i.id}`:"",s=i.classList.length?"."+Array.from(i.classList).join("."):"";return`${e}${t}${s}`}function Uc(i){var d;var e,t;const s=(d=(e=i.ownerDocument)==null?void 0:e.defaultView)!=null?d:window,r=i.getBoundingClientRect(),n=s.innerWidth||s.document.documentElement.clientWidth||0,o=s.innerHeight||s.document.documentElement.clientHeight||0,l=r.width>0&&r.height>0&&r.bottom>0&&r.right>0&&r.top<o&&r.left<n,a=(t=s.getComputedStyle)==null?void 0:t.call(s,i),u=!!a&&a.display!=="none"&&a.visibility!=="hidden"&&(parseFloat(a.opacity)||0)>0&&l;let h=0;if(u){const f=Math.max(0,Math.min(r.right,n)-Math.max(r.left,0)),m=Math.max(0,Math.min(r.bottom,o)-Math.max(r.top,0)),y=f*m,p=r.width*r.height;h=p>0?y/p:0}return{isVisible:u,ratio:h}}const oe={childNodes:Nc,parentNode:Rc,parentElement:Tc,textContent:Oc,contains:Dc,getRootNode:$c,host:kc,styleSheets:_c,shadowRoot:Lc,querySelector:Pc,querySelectorAll:Fc,mutationObserver:zc,patch:Bc,describeNode:Wc,getElementVisibility:Uc};function Tt(i){return i.nodeType===i.ELEMENT_NODE}function Ot(i){const e=i&&"host"in i&&"mode"in i&&oe.host(i)||null;return!!(e&&"shadowRoot"in e&&oe.shadowRoot(e)===i)}function Dt(i){return Object.prototype.toString.call(i)==="[object ShadowRoot]"}function Vc(i){return i.includes(" background-clip: text;")&&!i.includes(" -webkit-background-clip: text;")&&(i=i.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),i}function Hc(i){const{cssText:e}=i;if(e.split('"').length<3)return e;const t=["@import",`url(${JSON.stringify(i.href)})`];return i.layerName===""?t.push("layer"):i.layerName&&t.push(`layer(${i.layerName})`),i.supportsText&&t.push(`supports(${i.supportsText})`),i.media.length&&t.push(i.media.mediaText),t.join(" ")+";"}function Bi(i){try{const e=i.rules||i.cssRules;if(!e)return null;let t=i.href;!t&&i.ownerNode&&i.ownerNode.ownerDocument&&(t=i.ownerNode.ownerDocument.location.href);const s=Array.from(e,r=>na(r,t)).join("");return Vc(s)}catch(e){return null}}function na(i,e){if(jc(i)){let t;try{t=Bi(i.styleSheet)||Hc(i)}catch(s){t=i.cssText}return i.styleSheet.href?Ls(t,i.styleSheet.href):t}else{let t=i.cssText;return i.type===CSSRule.KEYFRAMES_RULE||(i.type,CSSRule.KEYFRAME_RULE),Yc(i)&&i.selectorText.includes(":")&&(t=Gc(t)),e?Ls(t,e):t}}function Gc(i){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return i.replace(e,"$1\\$2")}function jc(i){return"styleSheet"in i}function Yc(i){return"selectorText"in i}class Ar{constructor(){bi(this,"idNodeMap",new Map),bi(this,"nodeMetaMap",new WeakMap),bi(this,"selectorNodeMap",new Map)}getId(e){var t;if(!e)return-1;const s=(t=this.getMeta(e))==null?void 0:t.id;return s!=null?s:-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 s=this.getMeta(e);if(s!=null&&s.selector){const r=this.selectorNodeMap.get(s.selector);r&&(r.delete(e),r.size===0&&this.selectorNodeMap.delete(s.selector))}e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const s=t.id;if(this.idNodeMap.set(s,e),this.nodeMetaMap.set(e,t),t.selector){let r=this.selectorNodeMap.get(t.selector);r||(r=new Set,this.selectorNodeMap.set(t.selector,r)),r.add(e)}}replace(e,t){const s=this.getNode(e);if(s){const r=this.nodeMetaMap.get(s);if(r&&(this.nodeMetaMap.set(t,r),r.selector)){const n=this.selectorNodeMap.get(r.selector);n&&(n.delete(s),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 oa(){return new Ar}function ks({element:i,maskInputOptions:e,tagName:t,type:s,value:r,maskInputFn:n}){let o=r||"";const l=s&&Ge(s);return(e[t.toLowerCase()]||l&&e[l])&&(n?o=n(o,i):o="*".repeat(o.length)),o}function Ge(i){return i.toLowerCase()}const Tn="__rrweb_original__";function Zc(i){const e=i.getContext("2d");if(!e)return!0;const t=50;for(let s=0;s<i.width;s+=t)for(let r=0;r<i.height;r+=t){const n=e.getImageData,o=Tn in n?n[Tn]:n;if(new Uint32Array(o.call(e,s,r,Math.min(t,i.width-s),Math.min(t,i.height-r)).data.buffer).some(a=>a!==0))return!1}return!0}function Xc(i,e){return!i||!e||i.type!==e.type?!1:i.type===_.Document?i.compatMode===e.compatMode:i.type===_.DocumentType?i.name===e.name&&i.publicId===e.publicId&&i.systemId===e.systemId:i.type===_.Comment||i.type===_.Text||i.type===_.CDATA?i.textContent===e.textContent:i.type===_.Element?i.tagName===e.tagName&&JSON.stringify(i.attributes)===JSON.stringify(e.attributes)&&i.isSVG===e.isSVG&&i.needBlock===e.needBlock:!1}function _s(i){const e=i.type;return i.hasAttribute("data-rr-is-password")?"password":e?Ge(e):null}function Ir(i,e){var n;let t;try{t=new URL(i,e!=null?e:window.location.href)}catch(o){return null}const s=/\.([0-9a-z]+)(?:$)/i,r=t.pathname.match(s);return(n=r==null?void 0:r[1])!=null?n:null}function Jc(i){let e="";return i.indexOf("//")>-1?e=i.split("/").slice(0,3).join("/"):e=i.split("/")[0],e=e.split("?")[0],e}const qc=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Kc=/^(?:[a-z+]+:)?\/\//i,Qc=/^www\..*/i,eu=/^(data:)([^,]*),(.*)/i;function Ls(i,e){return(i||"").replace(qc,(t,s,r,n,o,l)=>{const a=r||o||l,c=s||n||"";if(!a)return t;if(Kc.test(a)||Qc.test(a))return`url(${c}${a}${c})`;if(eu.test(a))return`url(${c}${a}${c})`;if(a[0]==="/")return`url(${c}${Jc(e)+a}${c})`;const u=e.split("/"),h=a.split("/");u.pop();for(const d of h)d!=="."&&(d===".."?u.pop():u.push(d));return`url(${c}${u.join("/")}${c})`})}function rs(i,e=!1){return e?i.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):i.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function tu(i,e,t=!1){const s=Array.from(e.childNodes),r=[];let n=0;if(s.length>1&&i&&typeof i=="string"){let o=rs(i,t);const l=o.length/i.length;for(let a=1;a<s.length;a++)if(s[a].textContent&&typeof s[a].textContent=="string"){const c=rs(s[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 d=c.substring(0,h),f=o.split(d),m=-1;if(f.length===2)m=f[0].length;else if(f.length>2&&f[0]===""&&s[a-1].textContent!=="")m=o.indexOf(d,1);else if(f.length===1){if(d=d.substring(0,d.length-1),f=o.split(d),f.length<=1)return r.push(i),r;h=u+1}else h===c.length-1&&(m=o.indexOf(d));if(f.length>=2&&h>u){const y=s[a-1].textContent;if(y&&typeof y=="string"){const p=rs(y).length;m=o.indexOf(d,p)}m===-1&&(m=f[0].length)}if(m!==-1){let y=Math.floor(m/l);for(;y>0&&y<i.length;){if(n+=1,n>50*s.length)return r.push(i),r;const p=rs(i.substring(0,y),t);if(p.length===m){r.push(i.substring(0,y)),i=i.substring(y),o=o.substring(m);break}else p.length<m?y+=Math.max(1,Math.floor((m-p.length)/l)):y-=Math.max(1,Math.floor((p.length-m)*l))}break}}}}return r.push(i),r}function su(i,e){return tu(i,e).join("/* rr_split */")}function iu(i){var e;const t=oe.parentNode(i),s=t&&t;return!s||!Nr(s)?!1:((e=i.textContent)==null?void 0:e.trim())!==""}function Nr(i){return oe.getElementVisibility(i).isVisible}const ru=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],nu=["a","button","input","select","textarea","label","details","summary","dialog","video","audio"],ou=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],Rr=new WeakSet,au=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(i,e,t){if(au.call(this,i,e,t),this instanceof Element){const s=i.toLowerCase();ru.includes(s)&&Rr.add(this)}};const lu=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(i,e,t){lu.call(this,i,e,t)};function cu(i){return i instanceof Element&&Rr.has(i)}function uu(i){if(i.nodeType===Node.ELEMENT_NODE){const e=i,t=e.tagName.toLowerCase();if(nu.includes(t))return!0;const s=e.hasAttribute("tabindex")&&e.getAttribute("tabindex")!=="-1",r=["button","link","checkbox","switch","menuitem"].includes(e.getAttribute("role")||"");return cu(e)||s||r||e instanceof HTMLAnchorElement&&e.hasAttribute("href")||e instanceof HTMLButtonElement&&!e.disabled}return!1}function On(){document.querySelectorAll("*").forEach(e=>{ou.forEach(t=>{e.hasAttribute(t)&&Rr.add(e)})})}try{document.readyState==="complete"||document.readyState==="interactive"?On():document.addEventListener("DOMContentLoaded",On)}catch(i){}const ns={ANCHOR:.4,PATH:.3,TARGET:.2,UNIQUENESS:.1},xe={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},hu={MIN_CONFIDENCE_FOR_SKIP:.7},Dn=["form","main","nav","section","article","footer","header"],$n=["form","navigation","main","region","contentinfo","complementary","banner","search"],du=["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"],We={"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},aa=new Set(["id","class","style","xmlns","tabindex","contenteditable"]),fu={maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:0,fallbackToBody:!0,includeUtilityClasses:!1,source:"dom-dsl"};function _t(i){if(/^[a-z]+-\d+$/i.test(i)||/^[a-z]+(-[a-z]+)+-\d+$/i.test(i)||/^[a-z]+(_[a-z]+)*_\d+$/i.test(i)||/^\d+$/.test(i)||/^:[a-z0-9]+:$/i.test(i)||/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i.test(i))return!0;if(/^[a-z]{1,3}[A-Za-z0-9]{8,}$/.test(i)){const e=/\d/.test(i),t=/[A-Z]/.test(i),s=i.length>=20;if(e&&t||s)return!0}return!!(/^radix-/.test(i)||/^mui-\d+$/.test(i))}const la=new Set(["aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-activedescendant","for","form","list","headers","aria-details","aria-errormessage","aria-flowto"]);function ca(i){return i.trim().split(/\s+/).some(e=>_t(e))}let pu=class{constructor(e,t){var s;this.maxDepth=(s=e.maxPathDepth)!=null?s: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(),s=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=s==null?void 0:s.documentElement;if(a){const c={element:a,score:1,tier:"A",depth:0};return this.cacheResult(e,c),c}}if(t==="body"){const a=s==null?void 0:s.documentElement;if(a){const c={element:a,score:1,tier:"A",depth:0};return this.cacheResult(e,c),c}}let r=e.parentElement,n=0,o=null;for(;r&&n<this.maxDepth;){if(r.tagName.toLowerCase()==="body")return o||{element:r,score:xe.DEGRADED_SCORE,tier:"C",depth:n};const a=this.scoreAnchor(r);if(a>0){const c=this.applyDepthPenalty(a,n),u=this.getTier(r),h={element:r,score:c,tier:u,depth:n};if(u==="A")return h;(!o||c>o.score)&&(o=h)}r=r.parentElement,n++}const l=o;return this.cache&&this.cache.setAnchor(e,l),l}scoreAnchor(e){let t=0;const s=e.tagName.toLowerCase();Dn.includes(s)&&(t+=xe.SEMANTIC_TAG);const r=e.getAttribute("role");r&&$n.includes(r)&&(t+=xe.ROLE),(e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby"))&&(t+=xe.ARIA_LABEL);const n=e.id;return n&&!_t(n)&&(t+=xe.STABLE_ID),(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))&&(t+=xe.TEST_MARKER),Math.min(t,1)}applyDepthPenalty(e,t){if(t<=xe.DEPTH_PENALTY_THRESHOLD)return e;const s=(t-xe.DEPTH_PENALTY_THRESHOLD)*xe.DEPTH_PENALTY_FACTOR;return Math.max(0,e-s)}getTier(e){const t=e.tagName.toLowerCase();if(Dn.includes(t))return"A";const s=e.getAttribute("role");return s&&$n.includes(s)?"B":"C"}isInsideHead(e){let t=e.parentElement;for(;t;){const s=t.tagName.toLowerCase();if(s==="head")return!0;if(s==="body")return!1;t=t.parentElement}return!1}cacheResult(e,t){this.cache&&this.cache.setAnchor(e,t)}};const mu=[/^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,}/],gu=[/^\[/,/^(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 Tr(i){return mu.some(e=>e.test(i))}function Or(i){return i.length<=2||/^\d/.test(i)?!0:gu.some(e=>e.test(i))}function yu(i){return!Tr(i)&&!Or(i)}function bu(i){return i.filter(e=>yu(e))}function wu(i){const e=[],t=[];for(const s of i)Or(s)||Tr(s)?t.push(s):e.push(s);return{semantic:e,utility:t}}function kn(i){return Or(i)||Tr(i)}const _n=i=>i.replace(/([#:.[\]@])/g,"\\$1");let vu=class{constructor(e,t){var s;this.maxDepth=(s=e.maxPathDepth)!=null?s:10,this.cache=t}buildPath(e,t,s){const r=e.tagName.toLowerCase(),n=t.tagName.toLowerCase();if(r==="html"&&(n==="head"||n==="body"))return{path:[],degraded:!1};if(r==="html"&&this.isInsideHead(t))return this.buildHeadPath(e,t,s);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,s),{path:c.map(u=>{const h=u.parentElement;let d;if(h){const f=Array.from(h.children).indexOf(u);f!==-1&&(d=f+1)}return{tag:u.tagName.toLowerCase(),semantics:s.extract(u),score:s.scoreElement(u),nthChild:d}}),degraded:a,degradationReason:a?"path-depth-overflow":void 0}}buildPathNodes(e,t,s){return this.buildPath(e,t,s).path}ensureUniqueness(e,t,s,r,n){const o=this.buildTestSelector(s,t,r);try{const l=r.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)<hu.MIN_CONFIDENCE_FOR_SKIP)continue;const h=this.insertNodeInOrder(t,u,e),d=this.buildTestSelector(s,h,r);try{let f;if(this.cache){const m=this.cache.getSelectorResults(d);m!==void 0?f=m:(f=Array.from(l.querySelectorAll(d)),this.cache.setSelectorResults(d,f))}else f=l.querySelectorAll(d);if(f.length===1)return h;f.length<a.length&&(t=h)}catch(f){}}return t}catch(l){return t}}insertNodeInOrder(e,t,s){const r=s.indexOf(t),n=[...e];let o=0;for(let l=0;l<n.length&&!(s.indexOf(n[l])>r);l++)o=l+1;return n.splice(o,0,t),n}buildTestSelector(e,t,s){const r=[];r.push(this.elementToSelector(e));for(const n of t)r.push(this.elementToSelector(n));return r.push(this.elementToSelector(s)),r.join(" ")}elementToSelector(e){let t=e.tagName.toLowerCase();e.id&&!_t(e.id)&&(t+=`#${_n(e.id)}`);for(const s of Array.from(e.classList))kn(s)||(t+=`.${_n(s)}`);return t}filterNoise(e){return e.filter(t=>this.shouldInclude(t))}shouldInclude(e){const t=e.tagName.toLowerCase();return du.includes(t)?!0:t==="div"||t==="span"?this.hasSemanticFeatures(e):!1}hasSemanticFeatures(e){if(e.hasAttribute("role"))return!0;for(const s of Array.from(e.attributes))if(s.name.startsWith("aria-"))return!0;if(e.classList.length>0){for(const s of Array.from(e.classList))if(!kn(s))return!0}if(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))return!0;const t=e.id;return!!(t&&!_t(t))}isInsideHead(e){let t=e.parentElement;for(;t;){const s=t.tagName.toLowerCase();if(s==="head")return!0;if(s==="body")return!1;t=t.parentElement}return!1}buildHeadPath(e,t,s){const r=[];let n=t.parentElement;for(;n&&n!==e;)r.unshift(n),n=n.parentElement;return n!==e?{path:[],degraded:!0,degradationReason:"target-not-descendant-of-html"}:r.findIndex(o=>o.tagName.toLowerCase()==="head")===-1?{path:[],degraded:!0,degradationReason:"head-not-found-in-path"}:{path:r.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:s.extract(o),score:s.scoreElement(o),nthChild:a}}),degraded:!1}}};function Su(i){return i?i.trim().replace(/[\n\t\r]/g," ").replace(/\s+/g," "):""}const Cu={preserveQueryForAbsolute:!0,removeDynamicHashes:!0};function xu(i){return i?[/\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(i)):!1}function Eu(i,e){if(!i)return i;const t=i.startsWith("http://")||i.startsWith("https://"),[s,r]=i.split("#"),[n,o]=s.split("?");let l=n;return t&&e.preserveQueryForAbsolute&&o&&(l+=`?${o}`),r&&(e.removeDynamicHashes&&xu(r)||(l+=`#${r}`)),l}function ua(i,e,t={}){if(!e)return e;const s=A(A({},Cu),t);return i==="href"||i==="src"?Eu(e,s):e}const Mu=["role","aria-label","aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-level","aria-posinset","aria-setsize","aria-haspopup"],Au=["aria-selected","aria-checked","aria-pressed","aria-expanded","aria-hidden","aria-disabled","aria-current","aria-busy","aria-invalid","aria-grabbed","aria-live","aria-atomic"],Iu=["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"],Nu=["data-radix-","data-headlessui-","data-reach-","data-mui-","data-chakra-","data-mantine-","data-tw-"],Ru=["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"],Tu=["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"],Ou=["data-category","data-action","data-label","data-value"],Du=["id","name","type","placeholder","title","for","alt","href"],$u=["disabled","checked","selected","hidden","readonly","required","value"],ku=[/^radix-/,/^headlessui-/,/^mui-/,/:\w+:/];function _u(i,e){return Mu.includes(i)?!0:Au.includes(i)||Iu.includes(i)||Nu.some(t=>i.startsWith(t))?!1:Ru.includes(i)?!0:Tu.some(t=>i.startsWith(t))||Ou.includes(i)?!1:i.startsWith("data-")&&i.endsWith("-id")?!0:i==="id"?!ku.some(t=>t.test(e)):Du.includes(i)?!0:$u.includes(i)?!1:!!i.startsWith("data-")}let Ln=class{constructor(e,t){var s;this.includeUtilityClasses=(s=e.includeUtilityClasses)!=null?s:!1,this.cache=t}extract(e){if(this.cache){const o=this.cache.getSemantics(e);if(o!==void 0)return o}const t={},s=e.id;if(s&&!_t(s)&&(t.id=s),e.classList.length>0){const o=Array.from(e.classList);if(this.includeUtilityClasses)t.classes=o;else{const{semantic:l}=wu(o);l.length>0&&(t.classes=l)}}const r=this.extractAttributes(e);Object.keys(r).length>0&&(t.attributes=r);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 s=this.extract(e);return s.id&&(t+=.15),s.classes&&s.classes.length>0&&(t+=.1),s.attributes&&Object.keys(s.attributes).length>0&&(t+=.1),s.role&&(t+=.1),s.text&&(t+=.05),Math.min(t,1)}shouldIgnoreAttribute(e){return!!(aa.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 We[e]!==void 0?We[e]:e.startsWith("data-")?We["data-*"]:e.startsWith("aria-")?We["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 s of Array.from(e.attributes)){const r=s.name;if(this.shouldIgnoreAttribute(r)||!_u(r,s.value)||la.has(r)&&ca(s.value)||this.getAttributePriority(r)===0)continue;const n=r==="href"||r==="src"?ua(r,s.value):s.value;!n||n.trim()===""||this.isDynamicValue(n)||(t[r]=n)}return t}extractText(e){const t=this.getDirectTextContent(e);if(!t)return null;const s=Su(t);if(!s)return null;const r=100,n=t.length>r?t.slice(0,r)+"...":t,o=s.length>r?s.slice(0,r)+"...":s;return{raw:n,normalized:o}}getDirectTextContent(e){var s;const t=[];for(const r of Array.from(e.childNodes))if(r.nodeType===Node.TEXT_NODE&&r.textContent){const n=r.textContent.trim();n&&t.push(n)}return t.length>0?t.join(" "):(s=e.textContent)!=null?s: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)}},Lu=class{fingerprint(e){const t=e.tagName.toLowerCase(),s=this.getShape(t),r={shape:s,hasAnimation:this.hasAnimation(e)};if(s==="path"){const l=e.getAttribute("d");l&&(r.dHash=this.computePathHash(l))}else["circle","rect","ellipse","line"].includes(s)&&(r.geomHash=this.computeGeomHash(e,s));const n=e.getAttribute("role");n&&(r.role=n);const o=e.querySelector("title");return o!=null&&o.textContent&&(r.titleText=o.textContent.trim()),r}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(s=>s===e))!=null?t:"path"}normalizePathData(e){var t;return((t=e.match(/[MLHVCSQTAZ][^MLHVCSQTAZ]*/gi))!=null?t:[]).slice(0,5).map(s=>s.trim().replace(/(-?\d+\.?\d*)/g,r=>parseFloat(r).toFixed(1))).join(" ")}computeGeomHash(e,t){var r,n,o,l,a,c,u,h,d;const s=[];switch(t){case"circle":s.push(`r=${(r=e.getAttribute("r"))!=null?r:"0"}`);break;case"rect":{const f=parseFloat((n=e.getAttribute("width"))!=null?n:"0"),m=parseFloat((o=e.getAttribute("height"))!=null?o:"0");f>0&&m>0&&s.push(`ratio=${(f/m).toFixed(2)}`)}break;case"ellipse":{const f=parseFloat((l=e.getAttribute("rx"))!=null?l:"0"),m=parseFloat((a=e.getAttribute("ry"))!=null?a:"0");f>0&&m>0&&s.push(`ratio=${(f/m).toFixed(2)}`)}break;case"line":{const f=parseFloat((c=e.getAttribute("x1"))!=null?c:"0"),m=parseFloat((u=e.getAttribute("y1"))!=null?u:"0"),y=parseFloat((h=e.getAttribute("x2"))!=null?h:"0"),p=parseFloat((d=e.getAttribute("y2"))!=null?d:"0"),g=Math.atan2(p-m,y-f);s.push(`angle=${g.toFixed(2)}`)}break}return this.simpleHash(s.join(";"))}hasAnimation(e){if(e.querySelector("animate, animateTransform, animateMotion"))return!0;const t=e.ownerDocument;if(t!=null&&t.defaultView)try{const s=t.defaultView.getComputedStyle(e);if(s.animationName!=="none"||s.transitionProperty!=="all"&&s.transitionProperty!=="none")return!0}catch(s){}return!1}simpleHash(e){let t=0;for(let s=0;s<e.length;s++){const r=e.charCodeAt(s);t=(t<<5)-t+r,t=t&t}return Math.abs(t).toString(16).padStart(8,"0")}};function Pu(i,e=0){const t=i.anchor.score,s=i.path.length>0?i.path.reduce((l,a)=>l+a.score,0)/i.path.length:.5,r=i.target.score,n=t*ns.ANCHOR+s*ns.PATH+r*ns.TARGET+e*ns.UNIQUENESS,o=i.anchor.degraded?.2:0;return Math.max(0,Math.min(1,n-o))}let Fu=class{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 s=this.cache.keys().next().value;s!==void 0&&this.cache.delete(s)}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}},zu=class{constructor(e={}){var t,s;this.eidCache=new WeakMap,this.selectorResultCache=new Fu((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:(s=e.maxSelectorCacheSize)!=null?s: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 re(A({},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,s=e+t;return s>0?e/s:0}};function Bu(i){return new zu(i)}let Si=null;function Wu(){return Si||(Si=Bu()),Si}function Pn(i){if(i.ownerDocument)return i.ownerDocument;let e=i;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 Uu(i,e){if(!e)return;const t=Pn(i),s=e instanceof Document?e:Pn(e);if(t!==s)throw new Error(`Cross-document operation detected: element and root are from different documents.
|
|
@@ -8,7 +8,7 @@ Common causes:
|
|
|
8
8
|
2. Element from one iframe, root from another
|
|
9
9
|
3. Element from main document, root from iframe (or vice versa)
|
|
10
10
|
|
|
11
|
-
Solution: Ensure element and root parameter are from the same document context.`)}function Vu(i,e={}){var j,J,ie,N;var t;if(!i||!i.ownerDocument||!i.isConnected)return null;const s=M(M({},fu),e);if(s.root)try{Uu(i,s.root)}catch(F){return console.error("Cross-document generation detected:",F),null}const r=(j=s.cache)!=null?j:Wu(),n=r.getEID(i);if(n!==void 0)return n;if(i.tagName.toLowerCase()==="html"){const F=new Ln(s,r),W=ju(i,s,F);return r.setEID(i,W),W}const o=new pu(s,r),l=new vu(s,r),a=new Ln(s,r),c=new Lu,u=o.findAnchor(i);if(!u&&!s.fallbackToBody)return null;const h=(ie=(J=u==null?void 0:u.element)!=null?J:(t=i.ownerDocument)==null?void 0:t.body)!=null?ie:null;if(!h)return null;const d=!u||u.tier==="C",f=h.tagName.toLowerCase(),m=h.parentElement;let y;if(m&&f!=="body"&&f!=="html"){const F=Array.from(m.children).indexOf(h);F!==-1&&(y=F+1)}const p=a.extract(h),g={tag:h.tagName.toLowerCase(),semantics:p,score:(N=u==null?void 0:u.score)!=null?N:xe.DEGRADED_SCORE,degraded:d,nthChild:y},S=l.buildPath(h,i,a),v=a.extract(i);s.enableSvgFingerprint&&Hu(i)&&(v.svg=c.fingerprint(i));const w=i.parentElement;let C;if(w){const F=Array.from(w.children).indexOf(i);F!==-1&&(C=F+1)}const x={tag:i.tagName.toLowerCase(),semantics:v,score:a.scoreElement(i),nthChild:C},R=[],T={onMultiple:"best-score",onMissing:"anchor-only",maxDepth:3},z=g.degraded||S.degraded,U=Gu(g.degraded,S),P={version:"1.0",anchor:g,path:S.path,target:x,constraints:R,fallback:T,meta:{confidence:0,generatedAt:new Date().toISOString(),generator:"dom-eid@1.0",source:s.source,degraded:z,degradationReason:U}};return P.meta.confidence=Pu(P),P.meta.confidence<s.confidenceThreshold?null:(r.setEID(i,P),P)}function Hu(i){return i.namespaceURI==="http://www.w3.org/2000/svg"||i.tagName.toLowerCase()==="svg"||i instanceof SVGElement}function Gu(i,e){if(i&&e.degraded)return"anchor-and-path-degraded";if(i)return"no-semantic-anchor";if(e.degraded)return e.degradationReason}function ju(i,e,t,s){const r={tag:"html",semantics:t.extract(i),score:1,degraded:!1,nthChild:void 0};return{version:"1.0",anchor:r,path:[],target:r,constraints:[],fallback:{onMultiple:"best-score",onMissing:"anchor-only",maxDepth:3},meta:{confidence:1,generatedAt:new Date().toISOString(),generator:"dom-eid@1.0",source:e.source,degraded:!1,degradationReason:void 0}}}const ha={maxClasses:2,maxAttributes:5,includeText:!0,maxTextLength:50,simplifyTarget:!0,includeConstraints:!0};function Fn(i){return i==="id"?101:We[i]!==void 0?We[i]:i.startsWith("data-")?We["data-*"]:i.startsWith("aria-")?We["aria-*"]:0}function Yu(i){return["id","data-testid","data-qa","data-cy","href","text","role"].includes(i)}function Zu(i){return!!(/@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/.test(i)||/(\+?\d{1,3}[-.\s]?)?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}/.test(i)||/\d{4}[-\s]?\d{4}[-\s]?\d{4}[-\s]?\d{4}/.test(i))}function Xu(i,e){const t=M(M({},ha),e),s=`v${i.version}`,r=Ci(i.anchor,!1,t),n=i.path.length>0?i.path.map(a=>Ci(a,!1,t)).join(" > ")+" > ":"",o=Ci(i.target,!0,t),l=t.includeConstraints?Ju(i):"";return`${s}: ${r} :: ${n}${o}${l}`}function Ci(i,e=!1,t=ha){const{tag:s,semantics:r}=i;let n=s;const o=[],l=M({},r.attributes);r.id&&(l.id=r.id),r.role&&!l.role&&(l.role=r.role);const a=Object.entries(l).map(([h,d])=>{const f=Fn(h),m=h==="href"||h==="src"?ua(h,d):d;return{name:h,value:m,priority:f}}).filter(h=>h.name!=="id"&&h.name!=="class"&&aa.has(h.name)||la.has(h.name)&&ca(h.value)?!1:h.priority>0||h.name==="role"||h.name==="id");a.sort((h,d)=>d.priority-h.priority);const c=a.slice(0,t.maxAttributes);c.sort((h,d)=>h.name.localeCompare(d.name));for(const{name:h,value:d}of c)o.push(`${h}="${Wi(d)}"`);if(t.includeText&&r.text&&!Zu(r.text.normalized)){const h=r.text.normalized;h.length>0&&h.length<=t.maxTextLength&&o.push(`text="${Wi(h)}"`)}let u=o;if(o.length>0&&(e&&t.simplifyTarget&&r.id&&(u=o.filter(h=>{const d=h.split("=")[0];return Fn(d)>=60||d==="text"||d==="id"||d==="role"})),u.length>0&&u.sort((h,d)=>h.localeCompare(d))),r.classes&&r.classes.length>0){const h=bu(r.classes),d=!!r.id||o.some(f=>f.startsWith("href=")||f.startsWith("data-testid=")||f.startsWith("text=")||f.startsWith("role="));if(!(e&&t.simplifyTarget&&d)&&h.length>0){const f=h.sort().slice(0,t.maxClasses);n+=f.map(m=>`.${m}`).join("")}}if(u.length>0&&(n+=`[${u.join(",")}]`),"nthChild"in i&&i.nthChild){const h=!!r.id||r.attributes&&Object.keys(r.attributes).some(Yu);e&&t.simplifyTarget&&h||(n+=`#${i.nthChild}`)}return n}function Ju(i){if(!i.constraints||i.constraints.length===0)return"";const e=[];for(const t of i.constraints)switch(t.type){case"uniqueness":e.push("unique=true");break;case"position":t.params&&t.params.strategy&&e.push(`pos=${t.params.strategy}`);break;case"text-proximity":if(t.params&&t.params.reference){const s=Wi(String(t.params.reference));e.push(`text="${s}"`)}break}return e.length===0?"":` {${e.join(",")}}`}function Wi(i){return i.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/>/g,"\\>").replace(/:/g,"\\:")}function qu(i,e,t){const s=Vu(i,e);return s?Xu(s,t):null}let Ku=1;const Qu=new RegExp("[^a-z0-9-_:]"),Lt=-2;function da(){return Ku++}function eh(i){if(i instanceof HTMLFormElement)return"form";const e=Ge(i.tagName);return Qu.test(e)?"div":e}let et,zn;const th=/^[^ \t\n\r\u000c]+/,sh=/^[, \t\n\r\u000c]+/;function ih(i,e){if(e.trim()==="")return e;let t=0;function s(n){let o;const l=n.exec(e.substring(t));return l?(o=l[0],t+=o.length,o):""}const r=[];for(;s(sh),!(t>=e.length);){let n=s(th);if(n.slice(-1)===",")n=rt(i,n.substring(0,n.length-1)),r.push(n);else{let o="";n=rt(i,n);let l=!1;for(;;){const a=e.charAt(t);if(a===""){r.push((n+o).trim());break}else if(l)a===")"&&(l=!1);else if(a===","){t+=1,r.push((n+o).trim());break}else a==="("&&(l=!0);o+=a,t+=1}}}return r.join(", ")}const Bn=new WeakMap;function rt(i,e){return!e||e.trim()===""?e:Dr(i,e)}function rh(i){return!!(i.tagName==="svg"||i.ownerSVGElement)}function Dr(i,e){let t=Bn.get(i);if(t||(t=i.createElement("a"),Bn.set(i,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function fa(i,e,t,s){return s&&(t==="src"||t==="href"&&!(e==="use"&&s[0]==="#")||t==="xlink:href"&&s[0]!=="#"||t==="background"&&(e==="table"||e==="td"||e==="th")?rt(i,s):t==="srcset"?ih(i,s):t==="style"?Ls(s,Dr(i)):e==="object"&&t==="data"?rt(i,s):s)}function pa(i,e,t){return(i==="video"||i==="audio")&&e==="autoplay"}function Ui(i,e){return e?typeof e=="string"?i.includes(e):e.test(i):!1}function nh(i,e,t){try{if(typeof e=="string"){if(i.classList.contains(e))return!0}else for(let s=i.classList.length;s--;){const r=i.classList[s];if(e.test(r))return!0}if(t)return i.matches(t)}catch(s){}return!1}function Ps(i,e,t){if(!i)return!1;if(i.nodeType!==i.ELEMENT_NODE)return t?Ps(oe.parentNode(i),e,t):!1;for(let s=i.classList.length;s--;){const r=i.classList[s];if(e.test(r))return!0}return t?Ps(oe.parentNode(i),e,t):!1}function ma(i,e,t,s){let r;if(Tt(i)){if(r=i,!oe.childNodes(r).length)return!1}else{if(oe.parentElement(i)===null)return!1;r=oe.parentElement(i)}try{if(typeof e=="string"){if(s){if(r.closest(`.${e}`))return!0}else if(r.classList.contains(e))return!0}else if(Ps(r,e,s))return!0;if(t){if(s){if(r.closest(t))return!0}else if(r.matches(t))return!0}}catch(n){}return!1}function oh(i,e,t){const s=i.contentWindow;if(!s)return;let r=!1,n;try{n=s.document.readyState}catch(l){return}if(n!=="complete"){const l=setTimeout(()=>{r||(e(),r=!0)},t);i.addEventListener("load",()=>{clearTimeout(l),r=!0,e()});return}const o="about:blank";if(s.location.href!==o||i.src===o||i.src==="")return setTimeout(e,0),i.addEventListener("load",e);i.addEventListener("load",e)}function ah(i,e,t){let s=!1,r;try{r=i.sheet}catch(o){return}if(r)return;const n=setTimeout(()=>{s||(e(),s=!0)},t);i.addEventListener("load",()=>{clearTimeout(n),s=!0,e()})}function lh(i,e){const{doc:t,mirror:s,blockClass:r,blockSelector:n,excludeAttribute:o,needsMask:l,inlineStylesheet:a,maskInputOptions:c={},maskTextFn:u,maskInputFn:h,dataURLOptions:d={},inlineImages:f,recordCanvas:m,keepIframeSrcFn:y,newlyAddedElement:p=!1,cssCaptured:g=!1}=e,S=ch(t,s);switch(i.nodeType){case i.DOCUMENT_NODE:return i.compatMode!=="CSS1Compat"?{type:_.Document,childNodes:[],compatMode:i.compatMode}:{type:_.Document,childNodes:[]};case i.DOCUMENT_TYPE_NODE:return{type:_.DocumentType,name:i.name,publicId:i.publicId,systemId:i.systemId,rootId:S};case i.ELEMENT_NODE:return hh(i,{doc:t,blockClass:r,blockSelector:n,excludeAttribute:o,inlineStylesheet:a,maskInputOptions:c,maskInputFn:h,dataURLOptions:d,inlineImages:f,recordCanvas:m,keepIframeSrcFn:y,newlyAddedElement:p,rootId:S});case i.TEXT_NODE:return uh(i,{doc:t,needsMask:l,maskTextFn:u,rootId:S,cssCaptured:g});case i.CDATA_SECTION_NODE:return{type:_.CDATA,textContent:"",rootId:S};case i.COMMENT_NODE:return{type:_.Comment,textContent:oe.textContent(i)||"",rootId:S};default:return!1}}function ch(i,e){if(!e.hasNode(i))return;const t=e.getId(i);return t===1?void 0:t}function uh(i,e){const{needsMask:t,maskTextFn:s,rootId:r,cssCaptured:n}=e,o=oe.parentNode(i),l=o&&o.tagName;let a="";const c=l==="STYLE"?!0:void 0,u=l==="SCRIPT"?!0:void 0;return u?a="SCRIPT_PLACEHOLDER":n||(a=oe.textContent(i),c&&a&&(a=Ls(a,Dr(e.doc)))),!c&&!u&&a&&t&&(a=s?s(a,oe.parentElement(i)):a.replace(/[\S]/g,"*")),{type:_.Text,textContent:a||"",rootId:r}}function hh(i,e){const{doc:t,blockClass:s,blockSelector:r,excludeAttribute:n,inlineStylesheet:o,maskInputOptions:l={},maskInputFn:a,dataURLOptions:c={},inlineImages:u,recordCanvas:h,keepIframeSrcFn:d,newlyAddedElement:f=!1,rootId:m}=e,y=nh(i,s,r),p=eh(i);let g={};const S=i.attributes.length;for(let w=0;w<S;w++){const C=i.attributes[w];Ui(C.name,n)||pa(p,C.name,C.value)||(g[C.name]=fa(t,p,Ge(C.name),C.value))}if(p==="link"&&o){const w=Array.from(t.styleSheets).find(x=>x.href===i.href);let C=null;w&&(C=Bi(w)),C&&(delete g.rel,delete g.href,g._cssText=C)}if(p==="style"&&i.sheet){let w=Bi(i.sheet);w&&(i.childNodes.length>1&&(w=su(w,i)),g._cssText=w)}if(p==="input"||p==="textarea"||p==="select"){const w=i.value,C=i.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&w?g.value=ks({element:i,type:_s(i),tagName:p,value:w,maskInputOptions:l,maskInputFn:a}):C&&(g.checked=C)}if(p==="option"&&(i.selected&&!l.select?g.selected=!0:delete g.selected),p==="dialog"&&i.open&&(g.rr_open_mode=i.matches("dialog:modal")?"modal":"non-modal"),p==="canvas"&&h){if(i.__context==="2d")Zc(i)||(g.rr_dataURL=i.toDataURL(c.type,c.quality));else if(!("__context"in i)){const w=i.toDataURL(c.type,c.quality),C=t.createElement("canvas");C.width=i.width,C.height=i.height;const x=C.toDataURL(c.type,c.quality);w!==x&&(g.rr_dataURL=w)}}if(p==="img"&&u){et||(et=t.createElement("canvas"),zn=et.getContext("2d"));const w=i,C=w.currentSrc||w.getAttribute("src")||"<unknown-src>",x=w.crossOrigin,R=()=>{w.removeEventListener("load",R);try{et.width=w.naturalWidth,et.height=w.naturalHeight,zn.drawImage(w,0,0),g.rr_dataURL=et.toDataURL(c.type,c.quality)}catch(T){if(w.crossOrigin!=="anonymous"){w.crossOrigin="anonymous",w.complete&&w.naturalWidth!==0?R():w.addEventListener("load",R);return}else console.warn(`Cannot inline img src=${C}! Error: ${T}`)}w.crossOrigin==="anonymous"&&(x?g.crossOrigin=x:w.removeAttribute("crossorigin"))};w.complete&&w.naturalWidth!==0?R():w.addEventListener("load",R)}if(p==="audio"||p==="video"){const w=g;w.rr_mediaState=i.paused?"paused":"played",w.rr_mediaCurrentTime=i.currentTime,w.rr_mediaPlaybackRate=i.playbackRate,w.rr_mediaMuted=i.muted,w.rr_mediaLoop=i.loop,w.rr_mediaVolume=i.volume}if(f||(i.scrollLeft&&(g.rr_scrollLeft=i.scrollLeft),i.scrollTop&&(g.rr_scrollTop=i.scrollTop)),y){const{width:w,height:C}=i.getBoundingClientRect();g={class:g.class,rr_width:`${w}px`,rr_height:`${C}px`}}p==="iframe"&&!d(g.src)&&(i.contentDocument||(g.rr_src=g.src),delete g.src);let v;try{customElements.get(p)&&(v=!0)}catch(w){}return{type:_.Element,tagName:p,attributes:g,childNodes:[],isSVG:rh(i)||void 0,needBlock:y,rootId:m,isCustom:v}}function Q(i){return i==null?"":i.toLowerCase()}function dh(i,e){if(e.comment&&i.type===_.Comment)return!0;if(i.type===_.Element){if(e.script&&(i.tagName==="script"||i.tagName==="link"&&(i.attributes.rel==="preload"&&i.attributes.as==="script"||i.attributes.rel==="modulepreload")||i.tagName==="link"&&i.attributes.rel==="prefetch"&&typeof i.attributes.href=="string"&&Ir(i.attributes.href)==="js"))return!0;if(e.headFavicon&&(i.tagName==="link"&&i.attributes.rel==="shortcut icon"||i.tagName==="meta"&&(Q(i.attributes.name).match(/^msapplication-tile(image|color)$/)||Q(i.attributes.name)==="application-name"||Q(i.attributes.rel)==="icon"||Q(i.attributes.rel)==="apple-touch-icon"||Q(i.attributes.rel)==="shortcut icon")))return!0;if(i.tagName==="meta"){if(e.headMetaDescKeywords&&Q(i.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(Q(i.attributes.property).match(/^(og|twitter|fb):/)||Q(i.attributes.name).match(/^(og|twitter):/)||Q(i.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(Q(i.attributes.name)==="robots"||Q(i.attributes.name)==="googlebot"||Q(i.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&i.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(Q(i.attributes.name)==="author"||Q(i.attributes.name)==="generator"||Q(i.attributes.name)==="framework"||Q(i.attributes.name)==="publisher"||Q(i.attributes.name)==="progid"||Q(i.attributes.property).match(/^article:/)||Q(i.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(Q(i.attributes.name)==="google-site-verification"||Q(i.attributes.name)==="yandex-verification"||Q(i.attributes.name)==="csrf-token"||Q(i.attributes.name)==="p:domain_verify"||Q(i.attributes.name)==="verify-v1"||Q(i.attributes.name)==="verification"||Q(i.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function nt(i,e){const{doc:t,mirror:s,blockClass:r,blockSelector:n,maskTextClass:o,maskTextSelector:l,excludeAttribute:a,skipChild:c=!1,inlineStylesheet:u=!0,maskInputOptions:h={},maskTextFn:d,maskInputFn:f,slimDOMOptions:m,dataURLOptions:y={},inlineImages:p=!1,recordCanvas:g=!1,onSerialize:S,onIframeLoad:v,iframeLoadTimeout:w=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:R=()=>!1,newlyAddedElement:T=!1,cssCaptured:z=!1,selectorOptions:U}=e;let{needsMask:P}=e,{preserveWhiteSpace:j=!0}=e;P||(P=ma(i,o,l,P===void 0));const J=lh(i,{doc:t,mirror:s,blockClass:r,blockSelector:n,excludeAttribute:a,needsMask:P,inlineStylesheet:u,maskInputOptions:h,maskTextFn:d,maskInputFn:f,dataURLOptions:y,inlineImages:p,recordCanvas:g,keepIframeSrcFn:R,newlyAddedElement:T,cssCaptured:z});if(!J)return console.warn(i,"not serialized"),null;let ie;s.hasNode(i)?ie=s.getId(i):dh(J,m)||!j&&J.type===_.Text&&!J.textContent.replace(/^\s+|\s+$/gm,"").length?ie=Lt:ie=da();const N=Object.assign(J,{id:ie});if(Tt(i)||i.nodeType===Node.TEXT_NODE){if(Tt(i)&&U!==null&&U!==void 0)try{const q={maxPathDepth:U.maxPathDepth,enableSvgFingerprint:U.enableSvgFingerprint,fallbackToBody:U.fallbackToBody},ce=qu(i,q);ce&&(N.selector=ce)}catch(q){console.warn("Failed to generate SEQL selector:",q)}i.nodeType===Node.TEXT_NODE&&(N.isVisible=iu(i)),i.nodeType===Node.ELEMENT_NODE&&(N.isVisible=Nr(i),N.isInteractive=uu(i))}if(s.add(i,N),ie===Lt)return null;S&&S(i);let F=!c;if(N.type===_.Element){F=F&&!N.needBlock,delete N.needBlock;const q=oe.shadowRoot(i);q&&Dt(q)&&(N.isShadowHost=!0)}if((N.type===_.Document||N.type===_.Element)&&F){m.headWhitespace&&N.type===_.Element&&N.tagName==="head"&&(j=!1);const q={doc:t,mirror:s,blockClass:r,blockSelector:n,needsMask:P,maskTextClass:o,maskTextSelector:l,excludeAttribute:a,skipChild:c,inlineStylesheet:u,maskInputOptions:h,maskTextFn:d,maskInputFn:f,slimDOMOptions:m,dataURLOptions:y,inlineImages:p,recordCanvas:g,preserveWhiteSpace:j,onSerialize:S,onIframeLoad:v,iframeLoadTimeout:w,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:R,cssCaptured:!1,selectorOptions:U};if(!(N.type===_.Element&&N.tagName==="textarea"&&N.attributes.value!==void 0)){N.type===_.Element&&N.attributes._cssText!==void 0&&typeof N.attributes._cssText=="string"&&(q.cssCaptured=!0);for(const Le of Array.from(oe.childNodes(i))){const be=nt(Le,q);be&&N.childNodes.push(be)}}let ce=null;if(Tt(i)&&(ce=oe.shadowRoot(i)))for(const Le of Array.from(oe.childNodes(ce))){const be=nt(Le,q);be&&(Dt(ce)&&(be.isShadow=!0),N.childNodes.push(be))}}const W=oe.parentNode(i);return W&&Ot(W)&&Dt(W)&&(N.isShadow=!0),N.type===_.Element&&N.tagName==="iframe"&&oh(i,()=>{const q=i.contentDocument;if(q&&v){const ce=nt(q,{doc:q,mirror:s,blockClass:r,blockSelector:n,needsMask:P,maskTextClass:o,maskTextSelector:l,excludeAttribute:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:h,maskTextFn:d,maskInputFn:f,slimDOMOptions:m,dataURLOptions:y,inlineImages:p,recordCanvas:g,preserveWhiteSpace:j,onSerialize:S,onIframeLoad:v,iframeLoadTimeout:w,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:R,selectorOptions:U});ce&&v(i,ce)}},w),N.type===_.Element&&N.tagName==="link"&&typeof N.attributes.rel=="string"&&(N.attributes.rel==="stylesheet"||N.attributes.rel==="preload"&&typeof N.attributes.href=="string"&&Ir(N.attributes.href)==="css")&&ah(i,()=>{if(C){const q=nt(i,{doc:t,mirror:s,blockClass:r,blockSelector:n,needsMask:P,maskTextClass:o,maskTextSelector:l,excludeAttribute:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:h,maskTextFn:d,maskInputFn:f,slimDOMOptions:m,dataURLOptions:y,inlineImages:p,recordCanvas:g,preserveWhiteSpace:j,onSerialize:S,onIframeLoad:v,iframeLoadTimeout:w,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:R,selectorOptions:U});q&&C(i,q)}},x),N}function fh(i,e){var P,j,J,ie;const{mirror:t=new Mr,blockClass:s="rr-block",blockSelector:r=null,maskTextClass:n="rr-mask",maskTextSelector:o=null,excludeAttribute:l=/.^/,inlineStylesheet:a=!0,inlineImages:c=!1,recordCanvas:u=!1,maskAllInputs:h=!1,maskTextFn:d,maskInputFn:f,slimDOM:m=!1,dataURLOptions:y,preserveWhiteSpace:p,onSerialize:g,onIframeLoad:S,iframeLoadTimeout:v,onStylesheetLoad:w,stylesheetLoadTimeout:C,keepIframeSrcFn:x=()=>!1,selector:R}=e||{},T=h===!0?{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}:h===!1?{password:!0}:h,z=m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:m==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:m===!1?{}:m,U=R===!1?null:R===!0?{maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:.3,fallbackToBody:!0}:R===void 0?{maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:.3,fallbackToBody:!0}:{maxPathDepth:(P=R.maxPathDepth)!=null?P:10,enableSvgFingerprint:(j=R.enableSvgFingerprint)!=null?j:!0,confidenceThreshold:(J=R.confidenceThreshold)!=null?J:.3,fallbackToBody:(ie=R.fallbackToBody)!=null?ie:!0};return nt(i,{doc:i,mirror:t,blockClass:s,blockSelector:r,maskTextClass:n,maskTextSelector:o,excludeAttribute:l,skipChild:!1,inlineStylesheet:a,maskInputOptions:T,maskTextFn:d,maskInputFn:f,slimDOMOptions:z,dataURLOptions:y,inlineImages:c,recordCanvas:u,preserveWhiteSpace:p,onSerialize:g,onIframeLoad:S,iframeLoadTimeout:v,onStylesheetLoad:w,stylesheetLoadTimeout:C,keepIframeSrcFn:x,newlyAddedElement:!1,selectorOptions:U})}const ph=/(max|min)-device-(width|height)/,Wn=new RegExp(ph.source,"g"),mh={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(i){i.params.match(Wn)&&(i.params=i.params.replace(Wn,"$1-$2"))}}}},gh={postcssPlugin:"postcss-hover-classes",prepare:function(){const i=[];return{Rule:function(e){i.indexOf(e)===-1&&(i.push(e),e.selectors.forEach(function(t){t.includes(":hover")&&(e.selector+=`,
|
|
11
|
+
Solution: Ensure element and root parameter are from the same document context.`)}function Vu(i,e={}){var j,J,ie,N;var t;if(!i||!i.ownerDocument||!i.isConnected)return null;const s=A(A({},fu),e);if(s.root)try{Uu(i,s.root)}catch(F){return console.error("Cross-document generation detected:",F),null}const r=(j=s.cache)!=null?j:Wu(),n=r.getEID(i);if(n!==void 0)return n;if(i.tagName.toLowerCase()==="html"){const F=new Ln(s,r),W=ju(i,s,F);return r.setEID(i,W),W}const o=new pu(s,r),l=new vu(s,r),a=new Ln(s,r),c=new Lu,u=o.findAnchor(i);if(!u&&!s.fallbackToBody)return null;const h=(ie=(J=u==null?void 0:u.element)!=null?J:(t=i.ownerDocument)==null?void 0:t.body)!=null?ie:null;if(!h)return null;const d=!u||u.tier==="C",f=h.tagName.toLowerCase(),m=h.parentElement;let y;if(m&&f!=="body"&&f!=="html"){const F=Array.from(m.children).indexOf(h);F!==-1&&(y=F+1)}const p=a.extract(h),g={tag:h.tagName.toLowerCase(),semantics:p,score:(N=u==null?void 0:u.score)!=null?N:xe.DEGRADED_SCORE,degraded:d,nthChild:y},S=l.buildPath(h,i,a),v=a.extract(i);s.enableSvgFingerprint&&Hu(i)&&(v.svg=c.fingerprint(i));const w=i.parentElement;let C;if(w){const F=Array.from(w.children).indexOf(i);F!==-1&&(C=F+1)}const x={tag:i.tagName.toLowerCase(),semantics:v,score:a.scoreElement(i),nthChild:C},R=[],T={onMultiple:"best-score",onMissing:"anchor-only",maxDepth:3},z=g.degraded||S.degraded,U=Gu(g.degraded,S),P={version:"1.0",anchor:g,path:S.path,target:x,constraints:R,fallback:T,meta:{confidence:0,generatedAt:new Date().toISOString(),generator:"dom-eid@1.0",source:s.source,degraded:z,degradationReason:U}};return P.meta.confidence=Pu(P),P.meta.confidence<s.confidenceThreshold?null:(r.setEID(i,P),P)}function Hu(i){return i.namespaceURI==="http://www.w3.org/2000/svg"||i.tagName.toLowerCase()==="svg"||i instanceof SVGElement}function Gu(i,e){if(i&&e.degraded)return"anchor-and-path-degraded";if(i)return"no-semantic-anchor";if(e.degraded)return e.degradationReason}function ju(i,e,t,s){const r={tag:"html",semantics:t.extract(i),score:1,degraded:!1,nthChild:void 0};return{version:"1.0",anchor:r,path:[],target:r,constraints:[],fallback:{onMultiple:"best-score",onMissing:"anchor-only",maxDepth:3},meta:{confidence:1,generatedAt:new Date().toISOString(),generator:"dom-eid@1.0",source:e.source,degraded:!1,degradationReason:void 0}}}const ha={maxClasses:2,maxAttributes:5,includeText:!0,maxTextLength:50,simplifyTarget:!0,includeConstraints:!0};function Fn(i){return i==="id"?101:We[i]!==void 0?We[i]:i.startsWith("data-")?We["data-*"]:i.startsWith("aria-")?We["aria-*"]:0}function Yu(i){return["id","data-testid","data-qa","data-cy","href","text","role"].includes(i)}function Zu(i){return!!(/@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/.test(i)||/(\+?\d{1,3}[-.\s]?)?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}/.test(i)||/\d{4}[-\s]?\d{4}[-\s]?\d{4}[-\s]?\d{4}/.test(i))}function Xu(i,e){const t=A(A({},ha),e),s=`v${i.version}`,r=Ci(i.anchor,!1,t),n=i.path.length>0?i.path.map(a=>Ci(a,!1,t)).join(" > ")+" > ":"",o=Ci(i.target,!0,t),l=t.includeConstraints?Ju(i):"";return`${s}: ${r} :: ${n}${o}${l}`}function Ci(i,e=!1,t=ha){const{tag:s,semantics:r}=i;let n=s;const o=[],l=A({},r.attributes);r.id&&(l.id=r.id),r.role&&!l.role&&(l.role=r.role);const a=Object.entries(l).map(([h,d])=>{const f=Fn(h),m=h==="href"||h==="src"?ua(h,d):d;return{name:h,value:m,priority:f}}).filter(h=>h.name!=="id"&&h.name!=="class"&&aa.has(h.name)||la.has(h.name)&&ca(h.value)?!1:h.priority>0||h.name==="role"||h.name==="id");a.sort((h,d)=>d.priority-h.priority);const c=a.slice(0,t.maxAttributes);c.sort((h,d)=>h.name.localeCompare(d.name));for(const{name:h,value:d}of c)o.push(`${h}="${Wi(d)}"`);if(t.includeText&&r.text&&!Zu(r.text.normalized)){const h=r.text.normalized;h.length>0&&h.length<=t.maxTextLength&&o.push(`text="${Wi(h)}"`)}let u=o;if(o.length>0&&(e&&t.simplifyTarget&&r.id&&(u=o.filter(h=>{const d=h.split("=")[0];return Fn(d)>=60||d==="text"||d==="id"||d==="role"})),u.length>0&&u.sort((h,d)=>h.localeCompare(d))),r.classes&&r.classes.length>0){const h=bu(r.classes),d=!!r.id||o.some(f=>f.startsWith("href=")||f.startsWith("data-testid=")||f.startsWith("text=")||f.startsWith("role="));if(!(e&&t.simplifyTarget&&d)&&h.length>0){const f=h.sort().slice(0,t.maxClasses);n+=f.map(m=>`.${m}`).join("")}}if(u.length>0&&(n+=`[${u.join(",")}]`),"nthChild"in i&&i.nthChild){const h=!!r.id||r.attributes&&Object.keys(r.attributes).some(Yu);e&&t.simplifyTarget&&h||(n+=`#${i.nthChild}`)}return n}function Ju(i){if(!i.constraints||i.constraints.length===0)return"";const e=[];for(const t of i.constraints)switch(t.type){case"uniqueness":e.push("unique=true");break;case"position":t.params&&t.params.strategy&&e.push(`pos=${t.params.strategy}`);break;case"text-proximity":if(t.params&&t.params.reference){const s=Wi(String(t.params.reference));e.push(`text="${s}"`)}break}return e.length===0?"":` {${e.join(",")}}`}function Wi(i){return i.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/>/g,"\\>").replace(/:/g,"\\:")}function qu(i,e,t){const s=Vu(i,e);return s?Xu(s,t):null}let Ku=1;const Qu=new RegExp("[^a-z0-9-_:]"),Lt=-2;function da(){return Ku++}function eh(i){if(i instanceof HTMLFormElement)return"form";const e=Ge(i.tagName);return Qu.test(e)?"div":e}let et,zn;const th=/^[^ \t\n\r\u000c]+/,sh=/^[, \t\n\r\u000c]+/;function ih(i,e){if(e.trim()==="")return e;let t=0;function s(n){let o;const l=n.exec(e.substring(t));return l?(o=l[0],t+=o.length,o):""}const r=[];for(;s(sh),!(t>=e.length);){let n=s(th);if(n.slice(-1)===",")n=rt(i,n.substring(0,n.length-1)),r.push(n);else{let o="";n=rt(i,n);let l=!1;for(;;){const a=e.charAt(t);if(a===""){r.push((n+o).trim());break}else if(l)a===")"&&(l=!1);else if(a===","){t+=1,r.push((n+o).trim());break}else a==="("&&(l=!0);o+=a,t+=1}}}return r.join(", ")}const Bn=new WeakMap;function rt(i,e){return!e||e.trim()===""?e:Dr(i,e)}function rh(i){return!!(i.tagName==="svg"||i.ownerSVGElement)}function Dr(i,e){let t=Bn.get(i);if(t||(t=i.createElement("a"),Bn.set(i,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function fa(i,e,t,s){return s&&(t==="src"||t==="href"&&!(e==="use"&&s[0]==="#")||t==="xlink:href"&&s[0]!=="#"||t==="background"&&(e==="table"||e==="td"||e==="th")?rt(i,s):t==="srcset"?ih(i,s):t==="style"?Ls(s,Dr(i)):e==="object"&&t==="data"?rt(i,s):s)}function pa(i,e,t){return(i==="video"||i==="audio")&&e==="autoplay"}function Ui(i,e){return e?typeof e=="string"?i.includes(e):e.test(i):!1}function nh(i,e,t){try{if(typeof e=="string"){if(i.classList.contains(e))return!0}else for(let s=i.classList.length;s--;){const r=i.classList[s];if(e.test(r))return!0}if(t)return i.matches(t)}catch(s){}return!1}function Ps(i,e,t){if(!i)return!1;if(i.nodeType!==i.ELEMENT_NODE)return t?Ps(oe.parentNode(i),e,t):!1;for(let s=i.classList.length;s--;){const r=i.classList[s];if(e.test(r))return!0}return t?Ps(oe.parentNode(i),e,t):!1}function ma(i,e,t,s){let r;if(Tt(i)){if(r=i,!oe.childNodes(r).length)return!1}else{if(oe.parentElement(i)===null)return!1;r=oe.parentElement(i)}try{if(typeof e=="string"){if(s){if(r.closest(`.${e}`))return!0}else if(r.classList.contains(e))return!0}else if(Ps(r,e,s))return!0;if(t){if(s){if(r.closest(t))return!0}else if(r.matches(t))return!0}}catch(n){}return!1}function oh(i,e,t){const s=i.contentWindow;if(!s)return;let r=!1,n;try{n=s.document.readyState}catch(l){return}if(n!=="complete"){const l=setTimeout(()=>{r||(e(),r=!0)},t);i.addEventListener("load",()=>{clearTimeout(l),r=!0,e()});return}const o="about:blank";if(s.location.href!==o||i.src===o||i.src==="")return setTimeout(e,0),i.addEventListener("load",e);i.addEventListener("load",e)}function ah(i,e,t){let s=!1,r;try{r=i.sheet}catch(o){return}if(r)return;const n=setTimeout(()=>{s||(e(),s=!0)},t);i.addEventListener("load",()=>{clearTimeout(n),s=!0,e()})}function lh(i,e){const{doc:t,mirror:s,blockClass:r,blockSelector:n,excludeAttribute:o,needsMask:l,inlineStylesheet:a,maskInputOptions:c={},maskTextFn:u,maskInputFn:h,dataURLOptions:d={},inlineImages:f,recordCanvas:m,keepIframeSrcFn:y,newlyAddedElement:p=!1,cssCaptured:g=!1}=e,S=ch(t,s);switch(i.nodeType){case i.DOCUMENT_NODE:return i.compatMode!=="CSS1Compat"?{type:_.Document,childNodes:[],compatMode:i.compatMode}:{type:_.Document,childNodes:[]};case i.DOCUMENT_TYPE_NODE:return{type:_.DocumentType,name:i.name,publicId:i.publicId,systemId:i.systemId,rootId:S};case i.ELEMENT_NODE:return hh(i,{doc:t,blockClass:r,blockSelector:n,excludeAttribute:o,inlineStylesheet:a,maskInputOptions:c,maskInputFn:h,dataURLOptions:d,inlineImages:f,recordCanvas:m,keepIframeSrcFn:y,newlyAddedElement:p,rootId:S});case i.TEXT_NODE:return uh(i,{doc:t,needsMask:l,maskTextFn:u,rootId:S,cssCaptured:g});case i.CDATA_SECTION_NODE:return{type:_.CDATA,textContent:"",rootId:S};case i.COMMENT_NODE:return{type:_.Comment,textContent:oe.textContent(i)||"",rootId:S};default:return!1}}function ch(i,e){if(!e.hasNode(i))return;const t=e.getId(i);return t===1?void 0:t}function uh(i,e){const{needsMask:t,maskTextFn:s,rootId:r,cssCaptured:n}=e,o=oe.parentNode(i),l=o&&o.tagName;let a="";const c=l==="STYLE"?!0:void 0,u=l==="SCRIPT"?!0:void 0;return u?a="SCRIPT_PLACEHOLDER":n||(a=oe.textContent(i),c&&a&&(a=Ls(a,Dr(e.doc)))),!c&&!u&&a&&t&&(a=s?s(a,oe.parentElement(i)):a.replace(/[\S]/g,"*")),{type:_.Text,textContent:a||"",rootId:r}}function hh(i,e){const{doc:t,blockClass:s,blockSelector:r,excludeAttribute:n,inlineStylesheet:o,maskInputOptions:l={},maskInputFn:a,dataURLOptions:c={},inlineImages:u,recordCanvas:h,keepIframeSrcFn:d,newlyAddedElement:f=!1,rootId:m}=e,y=nh(i,s,r),p=eh(i);let g={};const S=i.attributes.length;for(let w=0;w<S;w++){const C=i.attributes[w];Ui(C.name,n)||pa(p,C.name,C.value)||(g[C.name]=fa(t,p,Ge(C.name),C.value))}if(p==="link"&&o){const w=Array.from(t.styleSheets).find(x=>x.href===i.href);let C=null;w&&(C=Bi(w)),C&&(delete g.rel,delete g.href,g._cssText=C)}if(p==="style"&&i.sheet){let w=Bi(i.sheet);w&&(i.childNodes.length>1&&(w=su(w,i)),g._cssText=w)}if(p==="input"||p==="textarea"||p==="select"){const w=i.value,C=i.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&w?g.value=ks({element:i,type:_s(i),tagName:p,value:w,maskInputOptions:l,maskInputFn:a}):C&&(g.checked=C)}if(p==="option"&&(i.selected&&!l.select?g.selected=!0:delete g.selected),p==="dialog"&&i.open&&(g.rr_open_mode=i.matches("dialog:modal")?"modal":"non-modal"),p==="canvas"&&h){if(i.__context==="2d")Zc(i)||(g.rr_dataURL=i.toDataURL(c.type,c.quality));else if(!("__context"in i)){const w=i.toDataURL(c.type,c.quality),C=t.createElement("canvas");C.width=i.width,C.height=i.height;const x=C.toDataURL(c.type,c.quality);w!==x&&(g.rr_dataURL=w)}}if(p==="img"&&u){et||(et=t.createElement("canvas"),zn=et.getContext("2d"));const w=i,C=w.currentSrc||w.getAttribute("src")||"<unknown-src>",x=w.crossOrigin,R=()=>{w.removeEventListener("load",R);try{et.width=w.naturalWidth,et.height=w.naturalHeight,zn.drawImage(w,0,0),g.rr_dataURL=et.toDataURL(c.type,c.quality)}catch(T){if(w.crossOrigin!=="anonymous"){w.crossOrigin="anonymous",w.complete&&w.naturalWidth!==0?R():w.addEventListener("load",R);return}else console.warn(`Cannot inline img src=${C}! Error: ${T}`)}w.crossOrigin==="anonymous"&&(x?g.crossOrigin=x:w.removeAttribute("crossorigin"))};w.complete&&w.naturalWidth!==0?R():w.addEventListener("load",R)}if(p==="audio"||p==="video"){const w=g;w.rr_mediaState=i.paused?"paused":"played",w.rr_mediaCurrentTime=i.currentTime,w.rr_mediaPlaybackRate=i.playbackRate,w.rr_mediaMuted=i.muted,w.rr_mediaLoop=i.loop,w.rr_mediaVolume=i.volume}if(f||(i.scrollLeft&&(g.rr_scrollLeft=i.scrollLeft),i.scrollTop&&(g.rr_scrollTop=i.scrollTop)),y){const{width:w,height:C}=i.getBoundingClientRect();g={class:g.class,rr_width:`${w}px`,rr_height:`${C}px`}}p==="iframe"&&!d(g.src)&&(i.contentDocument||(g.rr_src=g.src),delete g.src);let v;try{customElements.get(p)&&(v=!0)}catch(w){}return{type:_.Element,tagName:p,attributes:g,childNodes:[],isSVG:rh(i)||void 0,needBlock:y,rootId:m,isCustom:v}}function Q(i){return i==null?"":i.toLowerCase()}function dh(i,e){if(e.comment&&i.type===_.Comment)return!0;if(i.type===_.Element){if(e.script&&(i.tagName==="script"||i.tagName==="link"&&(i.attributes.rel==="preload"&&i.attributes.as==="script"||i.attributes.rel==="modulepreload")||i.tagName==="link"&&i.attributes.rel==="prefetch"&&typeof i.attributes.href=="string"&&Ir(i.attributes.href)==="js"))return!0;if(e.headFavicon&&(i.tagName==="link"&&i.attributes.rel==="shortcut icon"||i.tagName==="meta"&&(Q(i.attributes.name).match(/^msapplication-tile(image|color)$/)||Q(i.attributes.name)==="application-name"||Q(i.attributes.rel)==="icon"||Q(i.attributes.rel)==="apple-touch-icon"||Q(i.attributes.rel)==="shortcut icon")))return!0;if(i.tagName==="meta"){if(e.headMetaDescKeywords&&Q(i.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(Q(i.attributes.property).match(/^(og|twitter|fb):/)||Q(i.attributes.name).match(/^(og|twitter):/)||Q(i.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(Q(i.attributes.name)==="robots"||Q(i.attributes.name)==="googlebot"||Q(i.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&i.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(Q(i.attributes.name)==="author"||Q(i.attributes.name)==="generator"||Q(i.attributes.name)==="framework"||Q(i.attributes.name)==="publisher"||Q(i.attributes.name)==="progid"||Q(i.attributes.property).match(/^article:/)||Q(i.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(Q(i.attributes.name)==="google-site-verification"||Q(i.attributes.name)==="yandex-verification"||Q(i.attributes.name)==="csrf-token"||Q(i.attributes.name)==="p:domain_verify"||Q(i.attributes.name)==="verify-v1"||Q(i.attributes.name)==="verification"||Q(i.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function nt(i,e){const{doc:t,mirror:s,blockClass:r,blockSelector:n,maskTextClass:o,maskTextSelector:l,excludeAttribute:a,skipChild:c=!1,inlineStylesheet:u=!0,maskInputOptions:h={},maskTextFn:d,maskInputFn:f,slimDOMOptions:m,dataURLOptions:y={},inlineImages:p=!1,recordCanvas:g=!1,onSerialize:S,onIframeLoad:v,iframeLoadTimeout:w=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:R=()=>!1,newlyAddedElement:T=!1,cssCaptured:z=!1,selectorOptions:U}=e;let{needsMask:P}=e,{preserveWhiteSpace:j=!0}=e;P||(P=ma(i,o,l,P===void 0));const J=lh(i,{doc:t,mirror:s,blockClass:r,blockSelector:n,excludeAttribute:a,needsMask:P,inlineStylesheet:u,maskInputOptions:h,maskTextFn:d,maskInputFn:f,dataURLOptions:y,inlineImages:p,recordCanvas:g,keepIframeSrcFn:R,newlyAddedElement:T,cssCaptured:z});if(!J)return console.warn(i,"not serialized"),null;let ie;s.hasNode(i)?ie=s.getId(i):dh(J,m)||!j&&J.type===_.Text&&!J.textContent.replace(/^\s+|\s+$/gm,"").length?ie=Lt:ie=da();const N=Object.assign(J,{id:ie});if(Tt(i)||i.nodeType===Node.TEXT_NODE){if(Tt(i)&&U!==null&&U!==void 0)try{const q={maxPathDepth:U.maxPathDepth,enableSvgFingerprint:U.enableSvgFingerprint,fallbackToBody:U.fallbackToBody},ce=qu(i,q);ce&&(N.selector=ce)}catch(q){console.warn("Failed to generate SEQL selector:",q)}i.nodeType===Node.TEXT_NODE&&(N.isVisible=iu(i)),i.nodeType===Node.ELEMENT_NODE&&(N.isVisible=Nr(i),N.isInteractive=uu(i))}if(s.add(i,N),ie===Lt)return null;S&&S(i);let F=!c;if(N.type===_.Element){F=F&&!N.needBlock,delete N.needBlock;const q=oe.shadowRoot(i);q&&Dt(q)&&(N.isShadowHost=!0)}if((N.type===_.Document||N.type===_.Element)&&F){m.headWhitespace&&N.type===_.Element&&N.tagName==="head"&&(j=!1);const q={doc:t,mirror:s,blockClass:r,blockSelector:n,needsMask:P,maskTextClass:o,maskTextSelector:l,excludeAttribute:a,skipChild:c,inlineStylesheet:u,maskInputOptions:h,maskTextFn:d,maskInputFn:f,slimDOMOptions:m,dataURLOptions:y,inlineImages:p,recordCanvas:g,preserveWhiteSpace:j,onSerialize:S,onIframeLoad:v,iframeLoadTimeout:w,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:R,cssCaptured:!1,selectorOptions:U};if(!(N.type===_.Element&&N.tagName==="textarea"&&N.attributes.value!==void 0)){N.type===_.Element&&N.attributes._cssText!==void 0&&typeof N.attributes._cssText=="string"&&(q.cssCaptured=!0);for(const Le of Array.from(oe.childNodes(i))){const be=nt(Le,q);be&&N.childNodes.push(be)}}let ce=null;if(Tt(i)&&(ce=oe.shadowRoot(i)))for(const Le of Array.from(oe.childNodes(ce))){const be=nt(Le,q);be&&(Dt(ce)&&(be.isShadow=!0),N.childNodes.push(be))}}const W=oe.parentNode(i);return W&&Ot(W)&&Dt(W)&&(N.isShadow=!0),N.type===_.Element&&N.tagName==="iframe"&&oh(i,()=>{const q=i.contentDocument;if(q&&v){const ce=nt(q,{doc:q,mirror:s,blockClass:r,blockSelector:n,needsMask:P,maskTextClass:o,maskTextSelector:l,excludeAttribute:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:h,maskTextFn:d,maskInputFn:f,slimDOMOptions:m,dataURLOptions:y,inlineImages:p,recordCanvas:g,preserveWhiteSpace:j,onSerialize:S,onIframeLoad:v,iframeLoadTimeout:w,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:R,selectorOptions:U});ce&&v(i,ce)}},w),N.type===_.Element&&N.tagName==="link"&&typeof N.attributes.rel=="string"&&(N.attributes.rel==="stylesheet"||N.attributes.rel==="preload"&&typeof N.attributes.href=="string"&&Ir(N.attributes.href)==="css")&&ah(i,()=>{if(C){const q=nt(i,{doc:t,mirror:s,blockClass:r,blockSelector:n,needsMask:P,maskTextClass:o,maskTextSelector:l,excludeAttribute:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:h,maskTextFn:d,maskInputFn:f,slimDOMOptions:m,dataURLOptions:y,inlineImages:p,recordCanvas:g,preserveWhiteSpace:j,onSerialize:S,onIframeLoad:v,iframeLoadTimeout:w,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:R,selectorOptions:U});q&&C(i,q)}},x),N}function fh(i,e){var P,j,J,ie;const{mirror:t=new Ar,blockClass:s="rr-block",blockSelector:r=null,maskTextClass:n="rr-mask",maskTextSelector:o=null,excludeAttribute:l=/.^/,inlineStylesheet:a=!0,inlineImages:c=!1,recordCanvas:u=!1,maskAllInputs:h=!1,maskTextFn:d,maskInputFn:f,slimDOM:m=!1,dataURLOptions:y,preserveWhiteSpace:p,onSerialize:g,onIframeLoad:S,iframeLoadTimeout:v,onStylesheetLoad:w,stylesheetLoadTimeout:C,keepIframeSrcFn:x=()=>!1,selector:R}=e||{},T=h===!0?{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}:h===!1?{password:!0}:h,z=m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:m==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:m===!1?{}:m,U=R===!1?null:R===!0?{maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:.3,fallbackToBody:!0}:R===void 0?{maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:.3,fallbackToBody:!0}:{maxPathDepth:(P=R.maxPathDepth)!=null?P:10,enableSvgFingerprint:(j=R.enableSvgFingerprint)!=null?j:!0,confidenceThreshold:(J=R.confidenceThreshold)!=null?J:.3,fallbackToBody:(ie=R.fallbackToBody)!=null?ie:!0};return nt(i,{doc:i,mirror:t,blockClass:s,blockSelector:r,maskTextClass:n,maskTextSelector:o,excludeAttribute:l,skipChild:!1,inlineStylesheet:a,maskInputOptions:T,maskTextFn:d,maskInputFn:f,slimDOMOptions:z,dataURLOptions:y,inlineImages:c,recordCanvas:u,preserveWhiteSpace:p,onSerialize:g,onIframeLoad:S,iframeLoadTimeout:v,onStylesheetLoad:w,stylesheetLoadTimeout:C,keepIframeSrcFn:x,newlyAddedElement:!1,selectorOptions:U})}const ph=/(max|min)-device-(width|height)/,Wn=new RegExp(ph.source,"g"),mh={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(i){i.params.match(Wn)&&(i.params=i.params.replace(Wn,"$1-$2"))}}}},gh={postcssPlugin:"postcss-hover-classes",prepare:function(){const i=[];return{Rule:function(e){i.indexOf(e)===-1&&(i.push(e),e.selectors.forEach(function(t){t.includes(":hover")&&(e.selector+=`,
|
|
12
12
|
`+t.replace(/:hover/g,".\\:hover"))}))}}}},yh={postcssPlugin:"postcss-animation-fill-mode",prepare:function(){return{Rule:function(i){let e=!1,t=!1,s=null;i.walkDecls(r=>{r.prop==="animation"&&(e=!0,s=r),r.prop==="animation-fill-mode"&&(t=!0)}),e&&!t&&s&&i.insertAfter(s,{prop:"animation-fill-mode",value:"forwards"})}}}};function bh(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function wh(i){if(i.__esModule)return i;var e=i.default;if(typeof e=="function"){var t=function s(){return this instanceof s?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(i).forEach(function(s){var r=Object.getOwnPropertyDescriptor(i,s);Object.defineProperty(t,s,r.get?r:{enumerable:!0,get:function(){return i[s]}})}),t}var $r={exports:{}},D=String,ga=function(){return{isColorSupported:!1,reset:D,bold:D,dim:D,italic:D,underline:D,inverse:D,hidden:D,strikethrough:D,black:D,red:D,green:D,yellow:D,blue:D,magenta:D,cyan:D,white:D,gray:D,bgBlack:D,bgRed:D,bgGreen:D,bgYellow:D,bgBlue:D,bgMagenta:D,bgCyan:D,bgWhite:D,blackBright:D,redBright:D,greenBright:D,yellowBright:D,blueBright:D,magentaBright:D,cyanBright:D,whiteBright:D,bgBlackBright:D,bgRedBright:D,bgGreenBright:D,bgYellowBright:D,bgBlueBright:D,bgMagentaBright:D,bgCyanBright:D,bgWhiteBright:D}};$r.exports=ga();$r.exports.createColors=ga;var vh=$r.exports;const Sh={},Ch=Object.freeze(Object.defineProperty({__proto__:null,default:Sh},Symbol.toStringTag,{value:"Module"})),ve=wh(Ch);let Un=vh,Vn=ve,Vi=class ya extends Error{constructor(e,t,s,r,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),r&&(this.source=r),o&&(this.plugin=o),typeof t!="undefined"&&typeof s!="undefined"&&(typeof t=="number"?(this.line=t,this.column=s):(this.line=t.line,this.column=t.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,ya)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=Un.isColorSupported);let s=u=>u,r=u=>u,n=u=>u;if(e){let{bold:u,gray:h,red:d}=Un.createColors(!0);r=f=>u(d(f)),s=f=>h(f),Vn&&(n=f=>Vn(f))}let o=t.split(/\r?\n/),l=Math.max(this.line-3,0),a=Math.min(this.line+2,o.length),c=String(a).length;return o.slice(l,a).map((u,h)=>{let d=l+1+h,f=" "+(" "+d).slice(-c)+" | ";if(d===this.line){if(u.length>160){let y=20,p=Math.max(0,this.column-y),g=Math.max(this.column+y,this.endColumn+y),S=u.slice(p,g),v=s(f.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return r(">")+s(f)+n(S)+`
|
|
13
13
|
`+v+r("^")}let m=s(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+s(f)+n(u)+`
|
|
14
14
|
`+m+r("^")}return" "+s(f)+n(u)}).join(`
|
|
@@ -26,18 +26,18 @@ Solution: Ensure element and root parameter are from the same document context.`
|
|
|
26
26
|
`)&&(s=s.replace(/[^\n]+$/,"")),!1}),typeof s=="undefined"?s=this.raw(t,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(e,t){let s;return e.walkDecls(r=>{if(typeof r.raws.before!="undefined")return s=r.raws.before,s.includes(`
|
|
27
27
|
`)&&(s=s.replace(/[^\n]+$/,"")),!1}),typeof s=="undefined"?s=this.raw(t,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeOpen(e){let t;return e.walk(s=>{if(s.type!=="decl"&&(t=s.raws.between,typeof t!="undefined"))return!1}),t}rawBeforeRule(e){let t;return e.walk(s=>{if(s.nodes&&(s.parent!==e||e.first!==s)&&typeof s.raws.before!="undefined")return t=s.raws.before,t.includes(`
|
|
28
28
|
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(s=>{if(typeof s.raws.between!="undefined")return t=s.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(s=>{if(s.nodes&&s.nodes.length===0&&(t=s.raws.after,typeof t!="undefined"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(s=>{let r=s.parent;if(r&&r!==e&&r.parent&&r.parent===e&&typeof s.raws.before!="undefined"){let n=s.raws.before.split(`
|
|
29
|
-
`);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(s=>{if(s.nodes&&s.nodes.length&&s.last.type==="decl"&&(t=s.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let s=e[t],r=e.raws[t];return r&&r.value===s?r.raw:s}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var ba=Hi;Hi.default=Hi;let Eh=ba;function Gi(i,e){new Eh(e).stringify(i)}var Ks=Gi;Gi.default=Gi;var Yt={};Yt.isClean=Symbol("isClean");Yt.my=Symbol("my");let
|
|
30
|
-
`?(t=1,s+=1):t+=1}return r}let Yi=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[St]=!1,this[Nh]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let s of e[t])typeof s.clone=="function"?this.append(s.clone()):this.append(s)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=ji(this);for(let s in e)t[s]=e[s];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:s,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:s.column,line:s.line},t)}return new
|
|
31
|
-
`?(t=1,s+=1):t+=1;return{column:t,line:s,offset:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let t="document"in this.source.input?this.source.input.document:this.source.input.css,s={column:this.source.start.column,line:this.source.start.line,offset:Ne(t,this.source.start)},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:Ne(t,this.source.end)+1}:{column:s.column+1,line:s.line,offset:s.offset+1};if(e.word){let o=t.slice(Ne(t,this.source.start),Ne(t,this.source.end)).indexOf(e.word);o!==-1&&(s=this.positionInside(o),r=this.positionInside(o+e.word.length))}else e.start?s={column:e.start.column,line:e.start.line,offset:Ne(t,e.start)}:e.index&&(s=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line,offset:Ne(t,e.end)}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<s.line||r.line===s.line&&r.column<=s.column)&&(r={column:s.column+1,line:s.line,offset:s.offset+1}),{end:r,start:s}}raw(e,t){return new Mh().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,s=!1;for(let r of e)r===this?s=!0:s?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);s||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let s={},r=t==null;t=t||new Map;let n=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let l=this[o];if(Array.isArray(l))s[o]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)s[o]=l.toJSON(null,t);else if(o==="source"){if(l==null)continue;let a=t.get(l.input);a==null&&(a=n,t.set(l.input,n),n++),s[o]={end:l.end,inputId:a,start:l.start}}else s[o]=l}return r&&(s.inputs=[...t.keys()].map(o=>o.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Ih){e.stringify&&(e=e.stringify);let t="";return e(this,s=>{t+=s}),t}warn(e,t,s={}){let r={node:this};for(let n in s)r[n]=s[n];return e.warn(t,r)}};var Qs=Yi;Yi.default=Yi;let Rh=Qs,Zi=class extends Rh{constructor(e){super(e),this.type="comment"}};var ei=Zi;Zi.default=Zi;let Th=Qs,Xi=class extends Th{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=re(M({},e),{value:String(e.value)})),super(e),this.type="decl"}};var ti=Xi;Xi.default=Xi;let wa=ei,va=ti,Oh=Qs,{isClean:Sa,my:Ca}=Yt,_r,xa,Ea,Lr;function Aa(i){return i.map(e=>(e.nodes&&(e.nodes=Aa(e.nodes)),delete e.source,e))}function Ma(i){if(i[Sa]=!1,i.proxyOf.nodes)for(let e of i.proxyOf.nodes)Ma(e)}let De=class Ia extends Oh{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...e){for(let t of e){let s=this.normalize(t,this.last);for(let r of s)this.proxyOf.nodes.push(r)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),s,r;for(;this.indexes[t]<this.proxyOf.nodes.length&&(s=this.indexes[t],r=e(this.proxyOf.nodes[s],s),r!==!1);)this.indexes[t]+=1;return delete this.indexes[t],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...s)=>e[t](...s.map(r=>typeof r=="function"?(n,o)=>r(n.toProxy(),o):r)):t==="every"||t==="some"?s=>e[t]((r,...n)=>s(r.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(s=>s.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,s){return e[t]===s||(e[t]=s,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let s=this.index(e),r=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let o of r)this.proxyOf.nodes.splice(s+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],s<n&&(this.indexes[o]=n+r.length);return this.markDirty(),this}insertBefore(e,t){let s=this.index(e),r=s===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[s],r).reverse();s=this.index(e);for(let l of n)this.proxyOf.nodes.splice(s,0,l);let o;for(let l in this.indexes)o=this.indexes[l],s<=o&&(this.indexes[l]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Aa(xa(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new va(e)]}else if(e.selector||e.selectors)e=[new Lr(e)];else if(e.name)e=[new _r(e)];else if(e.text)e=[new wa(e)];else throw new Error("Unknown node type in node creation");return e.map(r=>(r[Ca]||Ia.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[Sa]&&Ma(r),r.raws||(r.raws={}),typeof r.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(r.raws.before=t.raws.before.replace(/\S/g,"")),r.parent=this.proxyOf,r))}prepend(...e){e=e.reverse();for(let t of e){let s=this.normalize(t,this.first,"prepend").reverse();for(let r of s)this.proxyOf.nodes.unshift(r);for(let r in this.indexes)this.indexes[r]=this.indexes[r]+s.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let s in this.indexes)t=this.indexes[s],t>=e&&(this.indexes[s]=t-1);return this.markDirty(),this}replaceValues(e,t,s){return s||(s=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,s))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,s)=>{let r;try{r=e(t,s)}catch(n){throw t.addToError(n)}return r!==!1&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if(s.type==="atrule"&&e.test(s.name))return t(s,r)}):this.walk((s,r)=>{if(s.type==="atrule"&&s.name===e)return t(s,r)}):(t=e,this.walk((s,r)=>{if(s.type==="atrule")return t(s,r)}))}walkComments(e){return this.walk((t,s)=>{if(t.type==="comment")return e(t,s)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if(s.type==="decl"&&e.test(s.prop))return t(s,r)}):this.walk((s,r)=>{if(s.type==="decl"&&s.prop===e)return t(s,r)}):(t=e,this.walk((s,r)=>{if(s.type==="decl")return t(s,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if(s.type==="rule"&&e.test(s.selector))return t(s,r)}):this.walk((s,r)=>{if(s.type==="rule"&&s.selector===e)return t(s,r)}):(t=e,this.walk((s,r)=>{if(s.type==="rule")return t(s,r)}))}};De.registerParse=i=>{xa=i};De.registerRule=i=>{Lr=i};De.registerAtRule=i=>{_r=i};De.registerRoot=i=>{Ea=i};var Je=De;De.default=De;De.rebuild=i=>{i.type==="atrule"?Object.setPrototypeOf(i,_r.prototype):i.type==="rule"?Object.setPrototypeOf(i,Lr.prototype):i.type==="decl"?Object.setPrototypeOf(i,va.prototype):i.type==="comment"?Object.setPrototypeOf(i,wa.prototype):i.type==="root"&&Object.setPrototypeOf(i,Ea.prototype),i[Ca]=!0,i.nodes&&i.nodes.forEach(e=>{De.rebuild(e)})};let Na=Je,Fs=class extends Na{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Pr=Fs;Fs.default=Fs;Na.registerAtRule(Fs);let Dh=Je,Ra,Ta,Pt=class extends Dh{constructor(e){super(M({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new Ra(new Ta,this,e).stringify()}};Pt.registerLazyResult=i=>{Ra=i};Pt.registerProcessor=i=>{Ta=i};var Fr=Pt;Pt.default=Pt;let $h="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",kh=(i=21)=>{let e="",t=i|0;for(;t--;)e+=$h[Math.random()*64|0];return e};var _h={nanoid:kh};let{existsSync:Lh,readFileSync:Ph}=ve,{dirname:xi,join:Fh}=ve,{SourceMapConsumer:Gn,SourceMapGenerator:jn}=ve;function zh(i){return Buffer?Buffer.from(i,"base64").toString():window.atob(i)}let Ji=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let s=t.map?t.map.prev:void 0,r=this.loadMap(t.from,s);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=xi(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new Gn(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,s=/^data:application\/json;base64,/,r=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,o=e.match(r)||e.match(n);if(o)return decodeURIComponent(e.substr(o[0].length));let l=e.match(t)||e.match(s);if(l)return zh(e.substr(l[0].length));let a=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+a)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let s=e.lastIndexOf(t.pop()),r=e.indexOf("*/",s);s>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,r)))}loadFile(e){if(this.root=xi(e),Lh(e))return this.mapFile=e,Ph(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let s=t(e);if(s){let r=this.loadFile(s);if(!r)throw new Error("Unable to load previous source map: "+s.toString());return r}}else{if(t instanceof Gn)return jn.fromSourceMap(t).toString();if(t instanceof jn)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let s=this.annotation;return e&&(s=Fh(xi(e),s)),this.loadFile(s)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Oa=Ji;Ji.default=Ji;let{nanoid:Bh}=_h,{isAbsolute:qi,resolve:Ki}=ve,{SourceMapConsumer:Wh,SourceMapGenerator:Uh}=ve,{fileURLToPath:Yn,pathToFileURL:os}=ve,Zn=kr,Vh=Oa,Ei=ve,Ai=Symbol("lineToIndexCache"),Hh=!!(Wh&&Uh),Xn=!!(Ki&&qi);function Jn(i){if(i[Ai])return i[Ai];let e=i.css.split(`
|
|
32
|
-
`),t=new Array(e.length),s=0;for(let r=0,n=e.length;r<n;r++)t[r]=s,s+=e[r].length+1;return i[
|
|
33
|
-
`," "];return Ft.split(i,e)},split(i,e,t){let s=[],r="",n=!1,o=0,l=!1,a="",c=!1;for(let u of i)c?c=!1:u==="\\"?c=!0:l?u===a&&(l=!1):u==='"'||u==="'"?(l=!0,a=u):u==="("?o+=1:u===")"?o>0&&(o-=1):o===0&&e.includes(u)&&(n=!0),n?(r!==""&&s.push(r.trim()),r="",n=!1):r+=u;return(t||r!=="")&&s.push(r.trim()),s}};var _a=Ft;Ft.default=Ft;let La=Je,Gh=_a,Bs=class extends La{get selectors(){return Gh.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};var zr=Bs;Bs.default=Bs;La.registerRule(Bs);let jh=Pr,Yh=ei,Zh=ti,Xh=si,Jh=Oa,qh=Zt,Kh=zr;function zt(i,e){if(Array.isArray(i))return i.map(o=>zt(o));let r=i,{inputs:t}=r,s=Qe(r,["inputs"]);if(t){e=[];for(let o of t){let l=re(
|
|
29
|
+
`);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(s=>{if(s.nodes&&s.nodes.length&&s.last.type==="decl"&&(t=s.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let s=e[t],r=e.raws[t];return r&&r.value===s?r.raw:s}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var ba=Hi;Hi.default=Hi;let Eh=ba;function Gi(i,e){new Eh(e).stringify(i)}var Ks=Gi;Gi.default=Gi;var Yt={};Yt.isClean=Symbol("isClean");Yt.my=Symbol("my");let Mh=kr,Ah=ba,Ih=Ks,{isClean:St,my:Nh}=Yt;function ji(i,e){let t=new i.constructor;for(let s in i){if(!Object.prototype.hasOwnProperty.call(i,s)||s==="proxyCache")continue;let r=i[s],n=typeof r;s==="parent"&&n==="object"?e&&(t[s]=e):s==="source"?t[s]=r:Array.isArray(r)?t[s]=r.map(o=>ji(o,t)):(n==="object"&&r!==null&&(r=ji(r)),t[s]=r)}return t}function Ne(i,e){if(e&&typeof e.offset!="undefined")return e.offset;let t=1,s=1,r=0;for(let n=0;n<i.length;n++){if(s===e.line&&t===e.column){r=n;break}i[n]===`
|
|
30
|
+
`?(t=1,s+=1):t+=1}return r}let Yi=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[St]=!1,this[Nh]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let s of e[t])typeof s.clone=="function"?this.append(s.clone()):this.append(s)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=ji(this);for(let s in e)t[s]=e[s];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:s,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:s.column,line:s.line},t)}return new Mh(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,s){return e[t]===s||(e[t]=s,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markClean(){this[St]=!0}markDirty(){if(this[St]){this[St]=!1;let e=this;for(;e=e.parent;)e[St]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let s="document"in this.source.input?this.source.input.document:this.source.input.css,n=s.slice(Ne(s,this.source.start),Ne(s,this.source.end)).indexOf(e.word);n!==-1&&(t=this.positionInside(n))}return t}positionInside(e){let t=this.source.start.column,s=this.source.start.line,r="document"in this.source.input?this.source.input.document:this.source.input.css,n=Ne(r,this.source.start),o=n+e;for(let l=n;l<o;l++)r[l]===`
|
|
31
|
+
`?(t=1,s+=1):t+=1;return{column:t,line:s,offset:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let t="document"in this.source.input?this.source.input.document:this.source.input.css,s={column:this.source.start.column,line:this.source.start.line,offset:Ne(t,this.source.start)},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:Ne(t,this.source.end)+1}:{column:s.column+1,line:s.line,offset:s.offset+1};if(e.word){let o=t.slice(Ne(t,this.source.start),Ne(t,this.source.end)).indexOf(e.word);o!==-1&&(s=this.positionInside(o),r=this.positionInside(o+e.word.length))}else e.start?s={column:e.start.column,line:e.start.line,offset:Ne(t,e.start)}:e.index&&(s=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line,offset:Ne(t,e.end)}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<s.line||r.line===s.line&&r.column<=s.column)&&(r={column:s.column+1,line:s.line,offset:s.offset+1}),{end:r,start:s}}raw(e,t){return new Ah().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,s=!1;for(let r of e)r===this?s=!0:s?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);s||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let s={},r=t==null;t=t||new Map;let n=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let l=this[o];if(Array.isArray(l))s[o]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)s[o]=l.toJSON(null,t);else if(o==="source"){if(l==null)continue;let a=t.get(l.input);a==null&&(a=n,t.set(l.input,n),n++),s[o]={end:l.end,inputId:a,start:l.start}}else s[o]=l}return r&&(s.inputs=[...t.keys()].map(o=>o.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Ih){e.stringify&&(e=e.stringify);let t="";return e(this,s=>{t+=s}),t}warn(e,t,s={}){let r={node:this};for(let n in s)r[n]=s[n];return e.warn(t,r)}};var Qs=Yi;Yi.default=Yi;let Rh=Qs,Zi=class extends Rh{constructor(e){super(e),this.type="comment"}};var ei=Zi;Zi.default=Zi;let Th=Qs,Xi=class extends Th{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=re(A({},e),{value:String(e.value)})),super(e),this.type="decl"}};var ti=Xi;Xi.default=Xi;let wa=ei,va=ti,Oh=Qs,{isClean:Sa,my:Ca}=Yt,_r,xa,Ea,Lr;function Ma(i){return i.map(e=>(e.nodes&&(e.nodes=Ma(e.nodes)),delete e.source,e))}function Aa(i){if(i[Sa]=!1,i.proxyOf.nodes)for(let e of i.proxyOf.nodes)Aa(e)}let De=class Ia extends Oh{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...e){for(let t of e){let s=this.normalize(t,this.last);for(let r of s)this.proxyOf.nodes.push(r)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),s,r;for(;this.indexes[t]<this.proxyOf.nodes.length&&(s=this.indexes[t],r=e(this.proxyOf.nodes[s],s),r!==!1);)this.indexes[t]+=1;return delete this.indexes[t],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...s)=>e[t](...s.map(r=>typeof r=="function"?(n,o)=>r(n.toProxy(),o):r)):t==="every"||t==="some"?s=>e[t]((r,...n)=>s(r.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(s=>s.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,s){return e[t]===s||(e[t]=s,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let s=this.index(e),r=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let o of r)this.proxyOf.nodes.splice(s+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],s<n&&(this.indexes[o]=n+r.length);return this.markDirty(),this}insertBefore(e,t){let s=this.index(e),r=s===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[s],r).reverse();s=this.index(e);for(let l of n)this.proxyOf.nodes.splice(s,0,l);let o;for(let l in this.indexes)o=this.indexes[l],s<=o&&(this.indexes[l]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Ma(xa(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new va(e)]}else if(e.selector||e.selectors)e=[new Lr(e)];else if(e.name)e=[new _r(e)];else if(e.text)e=[new wa(e)];else throw new Error("Unknown node type in node creation");return e.map(r=>(r[Ca]||Ia.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[Sa]&&Aa(r),r.raws||(r.raws={}),typeof r.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(r.raws.before=t.raws.before.replace(/\S/g,"")),r.parent=this.proxyOf,r))}prepend(...e){e=e.reverse();for(let t of e){let s=this.normalize(t,this.first,"prepend").reverse();for(let r of s)this.proxyOf.nodes.unshift(r);for(let r in this.indexes)this.indexes[r]=this.indexes[r]+s.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let s in this.indexes)t=this.indexes[s],t>=e&&(this.indexes[s]=t-1);return this.markDirty(),this}replaceValues(e,t,s){return s||(s=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,s))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,s)=>{let r;try{r=e(t,s)}catch(n){throw t.addToError(n)}return r!==!1&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if(s.type==="atrule"&&e.test(s.name))return t(s,r)}):this.walk((s,r)=>{if(s.type==="atrule"&&s.name===e)return t(s,r)}):(t=e,this.walk((s,r)=>{if(s.type==="atrule")return t(s,r)}))}walkComments(e){return this.walk((t,s)=>{if(t.type==="comment")return e(t,s)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if(s.type==="decl"&&e.test(s.prop))return t(s,r)}):this.walk((s,r)=>{if(s.type==="decl"&&s.prop===e)return t(s,r)}):(t=e,this.walk((s,r)=>{if(s.type==="decl")return t(s,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if(s.type==="rule"&&e.test(s.selector))return t(s,r)}):this.walk((s,r)=>{if(s.type==="rule"&&s.selector===e)return t(s,r)}):(t=e,this.walk((s,r)=>{if(s.type==="rule")return t(s,r)}))}};De.registerParse=i=>{xa=i};De.registerRule=i=>{Lr=i};De.registerAtRule=i=>{_r=i};De.registerRoot=i=>{Ea=i};var Je=De;De.default=De;De.rebuild=i=>{i.type==="atrule"?Object.setPrototypeOf(i,_r.prototype):i.type==="rule"?Object.setPrototypeOf(i,Lr.prototype):i.type==="decl"?Object.setPrototypeOf(i,va.prototype):i.type==="comment"?Object.setPrototypeOf(i,wa.prototype):i.type==="root"&&Object.setPrototypeOf(i,Ea.prototype),i[Ca]=!0,i.nodes&&i.nodes.forEach(e=>{De.rebuild(e)})};let Na=Je,Fs=class extends Na{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Pr=Fs;Fs.default=Fs;Na.registerAtRule(Fs);let Dh=Je,Ra,Ta,Pt=class extends Dh{constructor(e){super(A({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new Ra(new Ta,this,e).stringify()}};Pt.registerLazyResult=i=>{Ra=i};Pt.registerProcessor=i=>{Ta=i};var Fr=Pt;Pt.default=Pt;let $h="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",kh=(i=21)=>{let e="",t=i|0;for(;t--;)e+=$h[Math.random()*64|0];return e};var _h={nanoid:kh};let{existsSync:Lh,readFileSync:Ph}=ve,{dirname:xi,join:Fh}=ve,{SourceMapConsumer:Gn,SourceMapGenerator:jn}=ve;function zh(i){return Buffer?Buffer.from(i,"base64").toString():window.atob(i)}let Ji=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let s=t.map?t.map.prev:void 0,r=this.loadMap(t.from,s);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=xi(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new Gn(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,s=/^data:application\/json;base64,/,r=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,o=e.match(r)||e.match(n);if(o)return decodeURIComponent(e.substr(o[0].length));let l=e.match(t)||e.match(s);if(l)return zh(e.substr(l[0].length));let a=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+a)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let s=e.lastIndexOf(t.pop()),r=e.indexOf("*/",s);s>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,r)))}loadFile(e){if(this.root=xi(e),Lh(e))return this.mapFile=e,Ph(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let s=t(e);if(s){let r=this.loadFile(s);if(!r)throw new Error("Unable to load previous source map: "+s.toString());return r}}else{if(t instanceof Gn)return jn.fromSourceMap(t).toString();if(t instanceof jn)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let s=this.annotation;return e&&(s=Fh(xi(e),s)),this.loadFile(s)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Oa=Ji;Ji.default=Ji;let{nanoid:Bh}=_h,{isAbsolute:qi,resolve:Ki}=ve,{SourceMapConsumer:Wh,SourceMapGenerator:Uh}=ve,{fileURLToPath:Yn,pathToFileURL:os}=ve,Zn=kr,Vh=Oa,Ei=ve,Mi=Symbol("lineToIndexCache"),Hh=!!(Wh&&Uh),Xn=!!(Ki&&qi);function Jn(i){if(i[Mi])return i[Mi];let e=i.css.split(`
|
|
32
|
+
`),t=new Array(e.length),s=0;for(let r=0,n=e.length;r<n;r++)t[r]=s,s+=e[r].length+1;return i[Mi]=t,t}let zs=class{get from(){return this.file||this.id}constructor(e,t={}){if(e===null||typeof e=="undefined"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,t.document&&(this.document=t.document.toString()),t.from&&(!Xn||/^\w+:\/\//.test(t.from)||qi(t.from)?this.file=t.from:this.file=Ki(t.from)),Xn&&Hh){let s=new Vh(this.css,t);if(s.text){this.map=s;let r=s.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id="<input css "+Bh(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,s,r={}){let n,o,l,a,c;if(t&&typeof t=="object"){let h=t,d=s;if(typeof h.offset=="number"){a=h.offset;let f=this.fromOffset(a);t=f.line,s=f.col}else t=h.line,s=h.column,a=this.fromLineAndColumn(t,s);if(typeof d.offset=="number"){l=d.offset;let f=this.fromOffset(l);o=f.line,n=f.col}else o=d.line,n=d.column,l=this.fromLineAndColumn(d.line,d.column)}else if(s)a=this.fromLineAndColumn(t,s);else{a=t;let h=this.fromOffset(a);t=h.line,s=h.col}let u=this.origin(t,s,o,n);return u?c=new Zn(e,u.endLine===void 0?u.line:{column:u.column,line:u.line},u.endLine===void 0?u.column:{column:u.endColumn,line:u.endLine},u.source,u.file,r.plugin):c=new Zn(e,o===void 0?t:{column:s,line:t},o===void 0?s:{column:n,line:o},this.css,this.file,r.plugin),c.input={column:s,endColumn:n,endLine:o,endOffset:l,line:t,offset:a,source:this.css},this.file&&(os&&(c.input.url=os(this.file).toString()),c.input.file=this.file),c}fromLineAndColumn(e,t){return Jn(this)[e-1]+t-1}fromOffset(e){let t=Jn(this),s=t[t.length-1],r=0;if(e>=s)r=t.length-1;else{let n=t.length-2,o;for(;r<n;)if(o=r+(n-r>>1),e<t[o])n=o-1;else if(e>=t[o+1])r=o+1;else{r=o;break}}return{col:e-t[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Ki(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,s,r){if(!this.map)return!1;let n=this.map.consumer(),o=n.originalPositionFor({column:t,line:e});if(!o.source)return!1;let l;typeof s=="number"&&(l=n.originalPositionFor({column:r,line:s}));let a;qi(o.source)?a=os(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||os(this.map.mapFile));let c={column:o.column,endColumn:l&&l.column,endLine:l&&l.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(Yn)c.file=Yn(a);else throw new Error("file: protocol is not available in this PostCSS build");let u=n.sourceContentFor(o.source);return u&&(c.source=u),c}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=A({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};var si=zs;zs.default=zs;Ei&&Ei.registerInput&&Ei.registerInput(zs);let Da=Je,$a,ka,ut=class extends Da{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,s){let r=super.normalize(e);if(t){if(s==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of r)n.raws.before=t.raws.before}return r}removeChild(e,t){let s=this.index(e);return!t&&s===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),super.removeChild(e)}toResult(e={}){return new $a(new ka,this,e).stringify()}};ut.registerLazyResult=i=>{$a=i};ut.registerProcessor=i=>{ka=i};var Zt=ut;ut.default=ut;Da.registerRoot(ut);let Ft={comma(i){return Ft.split(i,[","],!0)},space(i){let e=[" ",`
|
|
33
|
+
`," "];return Ft.split(i,e)},split(i,e,t){let s=[],r="",n=!1,o=0,l=!1,a="",c=!1;for(let u of i)c?c=!1:u==="\\"?c=!0:l?u===a&&(l=!1):u==='"'||u==="'"?(l=!0,a=u):u==="("?o+=1:u===")"?o>0&&(o-=1):o===0&&e.includes(u)&&(n=!0),n?(r!==""&&s.push(r.trim()),r="",n=!1):r+=u;return(t||r!=="")&&s.push(r.trim()),s}};var _a=Ft;Ft.default=Ft;let La=Je,Gh=_a,Bs=class extends La{get selectors(){return Gh.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};var zr=Bs;Bs.default=Bs;La.registerRule(Bs);let jh=Pr,Yh=ei,Zh=ti,Xh=si,Jh=Oa,qh=Zt,Kh=zr;function zt(i,e){if(Array.isArray(i))return i.map(o=>zt(o));let r=i,{inputs:t}=r,s=Qe(r,["inputs"]);if(t){e=[];for(let o of t){let l=re(A({},o),{__proto__:Xh.prototype});l.map&&(l.map=re(A({},l.map),{__proto__:Jh.prototype})),e.push(l)}}if(s.nodes&&(s.nodes=i.nodes.map(o=>zt(o,e))),s.source){let n=s.source,{inputId:o}=n,l=Qe(n,["inputId"]);s.source=l,o!=null&&(s.source.input=e[o])}if(s.type==="root")return new qh(s);if(s.type==="decl")return new Zh(s);if(s.type==="rule")return new Kh(s);if(s.type==="comment")return new Yh(s);if(s.type==="atrule")return new jh(s);throw new Error("Unknown node type: "+i.type)}var Qh=zt;zt.default=zt;let{dirname:Ns,relative:Pa,resolve:Fa,sep:za}=ve,{SourceMapConsumer:Ba,SourceMapGenerator:Rs}=ve,{pathToFileURL:qn}=ve,ed=si,td=!!(Ba&&Rs),sd=!!(Ns&&Fa&&Pa&&za),id=class{constructor(e,t,s,r){this.stringify=e,this.mapOpts=s.map||{},this.root=t,this.opts=s,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
|
|
34
34
|
`;this.css.includes(`\r
|
|
35
35
|
`)&&(t=`\r
|
|
36
36
|
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),s=e.root||Ns(e.file),r;this.mapOpts.sourcesContent===!1?(r=new Ba(e.text),r.sourcesContent&&(r.sourcesContent=null)):r=e.consumer(),this.map.applySourceMap(r,t,this.toUrl(this.path(s)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),sd&&td&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Rs.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Rs({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Rs({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,s="<no source>",r={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,o;this.stringify(this.root,(l,a,c)=>{if(this.css+=l,a&&c!=="end"&&(r.generated.line=e,r.generated.column=t-1,a.source&&a.source.start?(r.source=this.sourcePath(a),r.original.line=a.source.start.line,r.original.column=a.source.start.column-1,this.map.addMapping(r)):(r.source=s,r.original.line=1,r.original.column=0,this.map.addMapping(r))),o=l.match(/\n/g),o?(e+=o.length,n=l.lastIndexOf(`
|
|
37
|
-
`),t=l.length-n):t+=l.length,a&&c!=="start"){let u=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==u.last||u.raws.semicolon)&&(a.source&&a.source.end?(r.source=this.sourcePath(a),r.original.line=a.source.end.line,r.original.column=a.source.end.column-1,r.generated.line=e,r.generated.column=t-2,this.map.addMapping(r)):(r.source=s,r.original.line=1,r.original.column=0,r.generated.line=e,r.generated.column=t-1,this.map.addMapping(r)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let s=this.opts.to?Ns(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(s=Ns(Fa(s,this.mapOpts.annotation)));let r=Pa(s,e);return this.memoizedPaths.set(e,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new ed(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let s=t.source.input.from;if(s&&!e[s]){e[s]=!0;let r=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(qn){let s=qn(e).toString();return this.memoizedFileURLs.set(e,s),s}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;za==="\\"&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}};var Wa=id;const
|
|
38
|
-
`.charCodeAt(0),Ct=" ".charCodeAt(0),cs="\f".charCodeAt(0),us=" ".charCodeAt(0),hs="\r".charCodeAt(0),rd="[".charCodeAt(0),nd="]".charCodeAt(0),od="(".charCodeAt(0),ad=")".charCodeAt(0),ld="{".charCodeAt(0),cd="}".charCodeAt(0),ud=";".charCodeAt(0),hd="*".charCodeAt(0),dd=":".charCodeAt(0),fd="@".charCodeAt(0),ds=/[\t\n\f\r "#'()/;[\\\]{}]/g,fs=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,pd=/.[\r\n"'(/\\]/,eo=/[\da-f]/i;var md=function(e,t={}){let s=e.css.valueOf(),r=t.ignoreErrors,n,o,l,a,c,u,h,d,f,m,y=s.length,p=0,g=[],S=[];function v(){return p}function w(T){throw e.error("Unclosed "+T,p)}function C(){return S.length===0&&p>=y}function x(T){if(S.length)return S.pop();if(p>=y)return;let z=T?T.ignoreUnclosed:!1;switch(n=s.charCodeAt(p),n){case ls:case Ct:case us:case hs:case cs:{a=p;do a+=1,n=s.charCodeAt(a);while(n===Ct||n===ls||n===us||n===hs||n===cs);u=["space",s.slice(p,a)],p=a-1;break}case rd:case nd:case ld:case cd:case dd:case ud:case ad:{let U=String.fromCharCode(n);u=[U,U,p];break}case od:{if(m=g.length?g.pop()[1]:"",f=s.charCodeAt(p+1),m==="url"&&f!==Mi&&f!==Kn&&f!==Ct&&f!==ls&&f!==us&&f!==cs&&f!==hs){a=p;do{if(h=!1,a=s.indexOf(")",a+1),a===-1)if(r||z){a=p;break}else w("bracket");for(d=a;s.charCodeAt(d-1)===as;)d-=1,h=!h}while(h);u=["brackets",s.slice(p,a+1),p,a],p=a}else a=s.indexOf(")",p+1),o=s.slice(p,a+1),a===-1||pd.test(o)?u=["(","(",p]:(u=["brackets",o,p,a],p=a);break}case Mi:case Kn:{c=n===Mi?"'":'"',a=p;do{if(h=!1,a=s.indexOf(c,a+1),a===-1)if(r||z){a=p+1;break}else w("string");for(d=a;s.charCodeAt(d-1)===as;)d-=1,h=!h}while(h);u=["string",s.slice(p,a+1),p,a],p=a;break}case fd:{ds.lastIndex=p+1,ds.test(s),ds.lastIndex===0?a=s.length-1:a=ds.lastIndex-2,u=["at-word",s.slice(p,a+1),p,a],p=a;break}case as:{for(a=p,l=!0;s.charCodeAt(a+1)===as;)a+=1,l=!l;if(n=s.charCodeAt(a+1),l&&n!==Qn&&n!==Ct&&n!==ls&&n!==us&&n!==hs&&n!==cs&&(a+=1,eo.test(s.charAt(a)))){for(;eo.test(s.charAt(a+1));)a+=1;s.charCodeAt(a+1)===Ct&&(a+=1)}u=["word",s.slice(p,a+1),p,a],p=a;break}default:{n===Qn&&s.charCodeAt(p+1)===hd?(a=s.indexOf("*/",p+2)+1,a===0&&(r||z?a=s.length:w("comment")),u=["comment",s.slice(p,a+1),p,a],p=a):(fs.lastIndex=p+1,fs.test(s),fs.lastIndex===0?a=s.length-1:a=fs.lastIndex-2,u=["word",s.slice(p,a+1),p,a],g.push(u),p=a);break}}return p++,u}function R(T){S.push(T)}return{back:R,endOfFile:C,nextToken:x,position:v}};let gd=Pr,yd=ei,bd=ti,wd=Zt,to=zr,vd=md;const so={empty:!0,space:!0};function Sd(i){for(let e=i.length-1;e>=0;e--){let t=i[e],s=t[3]||t[2];if(s)return s}}let Cd=class{constructor(e){this.input=e,this.root=new wd,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new gd;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let s,r,n,o=!1,l=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),s=e[0],s==="("||s==="["?c.push(s==="("?")":"]"):s==="{"&&c.length>0?c.push("}"):s===c[c.length-1]&&c.pop(),c.length===0)if(s===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(s==="{"){l=!0;break}else if(s==="}"){if(a.length>0){for(n=a.length-1,r=a[n];r&&r[0]==="space";)r=a[--n];r&&(t.source.end=this.getPosition(r[3]||r[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let s=0,r;for(let n=t-1;n>=0&&(r=e[n],!(r[0]!=="space"&&(s+=1,s===2)));n--);throw this.input.error("Missed semicolon",r[0]==="word"?r[3]+1:r[2])}colon(e){let t=0,s,r,n;for(let[o,l]of e.entries()){if(r=l,n=r[0],n==="("&&(t+=1),n===")"&&(t-=1),t===0&&n===":")if(!s)this.doubleColon(r);else{if(s[0]==="word"&&s[1]==="progid")continue;return o}s=r}return!1}comment(e){let t=new yd;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let r=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=r[2],t.raws.left=r[1],t.raws.right=r[3]}}createTokenizer(){this.tokenizer=vd(this.input)}decl(e,t){let s=new bd;this.init(s,e[0][2]);let r=e[e.length-1];for(r[0]===";"&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(r[3]||r[2]||Sd(e)),s.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;s.prop+=e.shift()[1]}s.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){s.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),s.raws.between+=n[1];(s.prop[0]==="_"||s.prop[0]==="*")&&(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let o=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(n=e[c],n[1].toLowerCase()==="!important"){s.important=!0;let u=this.stringFrom(e,c);u=this.spacesFromEnd(e)+u,u!==" !important"&&(s.raws.important=u);break}else if(n[1].toLowerCase()==="important"){let u=e.slice(0),h="";for(let d=c;d>0;d--){let f=u[d][0];if(h.trim().startsWith("!")&&f!=="space")break;h=u.pop()[1]+h}h.trim().startsWith("!")&&(s.important=!0,s.raws.important=h,e=u)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(s.raws.between+=o.map(c=>c[1]).join(""),o=[]),this.raw(s,"value",o.concat(e),t),s.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new to;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,s=null,r=!1,n=null,o=[],l=e[1].startsWith("--"),a=[],c=e;for(;c;){if(s=c[0],a.push(c),s==="("||s==="[")n||(n=c),o.push(s==="("?")":"]");else if(l&&r&&s==="{")n||(n=c),o.push("}");else if(o.length===0)if(s===";")if(r){this.decl(a,l);return}else break;else if(s==="{"){this.rule(a);return}else if(s==="}"){this.tokenizer.back(a.pop()),t=!0;break}else s===":"&&(r=!0);else s===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&r){if(!l)for(;a.length&&(c=a[a.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,s,r){let n,o,l=s.length,a="",c=!0,u,h;for(let d=0;d<l;d+=1)n=s[d],o=n[0],o==="space"&&d===l-1&&!r?c=!1:o==="comment"?(h=s[d-1]?s[d-1][0]:"empty",u=s[d+1]?s[d+1][0]:"empty",!so[h]&&!so[u]?a.slice(-1)===","?c=!1:a+=n[1]:c=!1):a+=n[1];if(!c){let d=s.reduce((f,m)=>f+m[1],"");e.raws[t]={raw:d,value:a}}e[t]=a}rule(e){e.pop();let t=new to;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],t==="space");)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let r=t;r<e.length;r++)s+=e[r][1];return e.splice(t,e.length-t),s}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word "+e[0][1],{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var xd=Cd;let Ed=Je,Ad=si,Md=xd;function Ws(i,e){let t=new Ad(i,e),s=new Md(t);try{s.parse()}catch(r){throw r}return s.root}var Br=Ws;Ws.default=Ws;Ed.registerParse(Ws);let Qi=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let s=t.node.rangeBy(t);this.line=s.start.line,this.column=s.start.column,this.endLine=s.end.line,this.endColumn=s.end.column}for(let s in t)this[s]=t[s]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Ua=Qi;Qi.default=Qi;let Id=Ua,er=class{get content(){return this.css}constructor(e,t,s){this.processor=e,this.messages=[],this.root=t,this.opts=s,this.css="",this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let s=new Id(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>e.type==="warning")}};var Wr=er;er.default=er;let Nd=Je,Rd=Fr,Td=Wa,Od=Br,io=Wr,Dd=Zt,$d=Ks,{isClean:Ee,my:kd}=Yt;const _d={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Ld={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Pd={Once:!0,postcssPlugin:!0,prepare:!0},ht=0;function xt(i){return typeof i=="object"&&typeof i.then=="function"}function Va(i){let e=!1,t=_d[i.type];return i.type==="decl"?e=i.prop.toLowerCase():i.type==="atrule"&&(e=i.name.toLowerCase()),e&&i.append?[t,t+"-"+e,ht,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:i.append?[t,ht,t+"Exit"]:[t,t+"Exit"]}function ro(i){let e;return i.type==="document"?e=["Document",ht,"DocumentExit"]:i.type==="root"?e=["Root",ht,"RootExit"]:e=Va(i),{eventIndex:0,events:e,iterator:0,node:i,visitorIndex:0,visitors:[]}}function tr(i){return i[Ee]=!1,i.nodes&&i.nodes.forEach(e=>tr(e)),i}let sr={},dt=class Ha{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(e,t,s){this.stringified=!1,this.processed=!1;let r;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))r=tr(t);else if(t instanceof Ha||t instanceof io)r=tr(t.root),t.map&&(typeof s.map=="undefined"&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=t.map);else{let n=Od;s.syntax&&(n=s.syntax.parse),s.parser&&(n=s.parser),n.parse&&(n=n.parse);try{r=n(t,s)}catch(o){this.processed=!0,this.error=o}r&&!r[kd]&&Nd.rebuild(r)}this.result=new io(e,r,s),this.helpers=re(M({},sr),{postcss:sr,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?M(M({},n),n.prepare(this.result)):n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let s=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=s.postcssPlugin,e.setMessage()):s.postcssVersion}catch(r){console&&console.error&&console.error(r)}return e}prepareVisitors(){this.listeners={};let e=(t,s,r)=>{this.listeners[s]||(this.listeners[s]=[]),this.listeners[s].push([t,r])};for(let t of this.plugins)if(typeof t=="object")for(let s in t){if(!Ld[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Pd[s])if(typeof t[s]=="object")for(let r in t[s])r==="*"?e(t,s,t[s][r]):e(t,s+"-"+r.toLowerCase(),t[s][r]);else typeof t[s]=="function"&&e(t,s,t[s])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],s=this.runOnRoot(t);if(xt(s))try{await s}catch(r){throw this.handleError(r)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ee];){e[Ee]=!0;let t=[ro(e)];for(;t.length>0;){let s=this.visitTick(t);if(xt(s))try{await s}catch(r){let n=t[t.length-1].node;throw this.handleError(r,n)}}}if(this.listeners.OnceExit)for(let[t,s]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let r=e.nodes.map(n=>s(n,this.helpers));await Promise.all(r)}else await s(e,this.helpers)}catch(r){throw this.handleError(r)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(s=>e.Once(s,this.helpers));return xt(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=$d;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new Td(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(xt(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ee];)e[Ee]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[s,r]of e){this.result.lastPlugin=s;let n;try{n=r(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(xt(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:s,visitors:r}=t;if(s.type!=="root"&&s.type!=="document"&&!s.parent){e.pop();return}if(r.length>0&&t.visitorIndex<r.length){let[o,l]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(s.toProxy(),this.helpers)}catch(a){throw this.handleError(a,s)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=s.nodes[s.indexes[o]];)if(s.indexes[o]+=1,!l[Ee]){l[Ee]=!0,e.push(ro(l));return}t.iterator=0,delete s.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===ht){s.nodes&&s.nodes.length&&(s[Ee]=!0,t.iterator=s.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[Ee]=!0;let t=Va(e);for(let s of t)if(s===ht)e.nodes&&e.each(r=>{r[Ee]||this.walkSync(r)});else{let r=this.listeners[s];if(r&&this.visitSync(r,e.toProxy()))return}}warnings(){return this.sync().warnings()}};dt.registerPostcss=i=>{sr=i};var Ga=dt;dt.default=dt;Dd.registerLazyResult(dt);Rd.registerLazyResult(dt);let Fd=Wa,zd=Br;const Bd=Wr;let Wd=Ks;let ir=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=zd;try{e=t(this._css,this._opts)}catch(s){this.error=s}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,s){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=s,this._map=void 0;let r,n=Wd;this.result=new Bd(this._processor,r,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new Fd(n,r,this._opts,t);if(l.isMap()){let[a,c]=l.generate();a&&(this.result.css=a),c&&(this.result.map=c)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}};var Ud=ir;ir.default=ir;let Vd=Fr,Hd=Ga,Gd=Ud,jd=Zt,Bt=class{constructor(e=[]){this.version="8.5.6",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(s.postcss===!0?s=s():s.postcss&&(s=s.postcss),typeof s=="object"&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if(typeof s=="object"&&s.postcssPlugin)t.push(s);else if(typeof s=="function")t.push(s);else if(!(typeof s=="object"&&(s.parse||s.stringify)))throw new Error(s+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Gd(this,e,t):new Hd(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Yd=Bt;Bt.default=Bt;jd.registerProcessor(Bt);Vd.registerProcessor(Bt);let ja=Pr,Ya=ei,Zd=Je,Xd=kr,Za=ti,Xa=Fr,Jd=Qh,qd=si,Kd=Ga,Qd=_a,ef=Qs,tf=Br,Ur=Yd,sf=Wr,Ja=Zt,qa=zr,rf=Ks,nf=Ua;function Y(...i){return i.length===1&&Array.isArray(i[0])&&(i=i[0]),new Ur(i)}Y.plugin=function(e,t){let s=!1;function r(...o){console&&console.warn&&!s&&(s=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
37
|
+
`),t=l.length-n):t+=l.length,a&&c!=="start"){let u=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==u.last||u.raws.semicolon)&&(a.source&&a.source.end?(r.source=this.sourcePath(a),r.original.line=a.source.end.line,r.original.column=a.source.end.column-1,r.generated.line=e,r.generated.column=t-2,this.map.addMapping(r)):(r.source=s,r.original.line=1,r.original.column=0,r.generated.line=e,r.generated.column=t-1,this.map.addMapping(r)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let s=this.opts.to?Ns(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(s=Ns(Fa(s,this.mapOpts.annotation)));let r=Pa(s,e);return this.memoizedPaths.set(e,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new ed(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let s=t.source.input.from;if(s&&!e[s]){e[s]=!0;let r=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(qn){let s=qn(e).toString();return this.memoizedFileURLs.set(e,s),s}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;za==="\\"&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}};var Wa=id;const Ai="'".charCodeAt(0),Kn='"'.charCodeAt(0),as="\\".charCodeAt(0),Qn="/".charCodeAt(0),ls=`
|
|
38
|
+
`.charCodeAt(0),Ct=" ".charCodeAt(0),cs="\f".charCodeAt(0),us=" ".charCodeAt(0),hs="\r".charCodeAt(0),rd="[".charCodeAt(0),nd="]".charCodeAt(0),od="(".charCodeAt(0),ad=")".charCodeAt(0),ld="{".charCodeAt(0),cd="}".charCodeAt(0),ud=";".charCodeAt(0),hd="*".charCodeAt(0),dd=":".charCodeAt(0),fd="@".charCodeAt(0),ds=/[\t\n\f\r "#'()/;[\\\]{}]/g,fs=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,pd=/.[\r\n"'(/\\]/,eo=/[\da-f]/i;var md=function(e,t={}){let s=e.css.valueOf(),r=t.ignoreErrors,n,o,l,a,c,u,h,d,f,m,y=s.length,p=0,g=[],S=[];function v(){return p}function w(T){throw e.error("Unclosed "+T,p)}function C(){return S.length===0&&p>=y}function x(T){if(S.length)return S.pop();if(p>=y)return;let z=T?T.ignoreUnclosed:!1;switch(n=s.charCodeAt(p),n){case ls:case Ct:case us:case hs:case cs:{a=p;do a+=1,n=s.charCodeAt(a);while(n===Ct||n===ls||n===us||n===hs||n===cs);u=["space",s.slice(p,a)],p=a-1;break}case rd:case nd:case ld:case cd:case dd:case ud:case ad:{let U=String.fromCharCode(n);u=[U,U,p];break}case od:{if(m=g.length?g.pop()[1]:"",f=s.charCodeAt(p+1),m==="url"&&f!==Ai&&f!==Kn&&f!==Ct&&f!==ls&&f!==us&&f!==cs&&f!==hs){a=p;do{if(h=!1,a=s.indexOf(")",a+1),a===-1)if(r||z){a=p;break}else w("bracket");for(d=a;s.charCodeAt(d-1)===as;)d-=1,h=!h}while(h);u=["brackets",s.slice(p,a+1),p,a],p=a}else a=s.indexOf(")",p+1),o=s.slice(p,a+1),a===-1||pd.test(o)?u=["(","(",p]:(u=["brackets",o,p,a],p=a);break}case Ai:case Kn:{c=n===Ai?"'":'"',a=p;do{if(h=!1,a=s.indexOf(c,a+1),a===-1)if(r||z){a=p+1;break}else w("string");for(d=a;s.charCodeAt(d-1)===as;)d-=1,h=!h}while(h);u=["string",s.slice(p,a+1),p,a],p=a;break}case fd:{ds.lastIndex=p+1,ds.test(s),ds.lastIndex===0?a=s.length-1:a=ds.lastIndex-2,u=["at-word",s.slice(p,a+1),p,a],p=a;break}case as:{for(a=p,l=!0;s.charCodeAt(a+1)===as;)a+=1,l=!l;if(n=s.charCodeAt(a+1),l&&n!==Qn&&n!==Ct&&n!==ls&&n!==us&&n!==hs&&n!==cs&&(a+=1,eo.test(s.charAt(a)))){for(;eo.test(s.charAt(a+1));)a+=1;s.charCodeAt(a+1)===Ct&&(a+=1)}u=["word",s.slice(p,a+1),p,a],p=a;break}default:{n===Qn&&s.charCodeAt(p+1)===hd?(a=s.indexOf("*/",p+2)+1,a===0&&(r||z?a=s.length:w("comment")),u=["comment",s.slice(p,a+1),p,a],p=a):(fs.lastIndex=p+1,fs.test(s),fs.lastIndex===0?a=s.length-1:a=fs.lastIndex-2,u=["word",s.slice(p,a+1),p,a],g.push(u),p=a);break}}return p++,u}function R(T){S.push(T)}return{back:R,endOfFile:C,nextToken:x,position:v}};let gd=Pr,yd=ei,bd=ti,wd=Zt,to=zr,vd=md;const so={empty:!0,space:!0};function Sd(i){for(let e=i.length-1;e>=0;e--){let t=i[e],s=t[3]||t[2];if(s)return s}}let Cd=class{constructor(e){this.input=e,this.root=new wd,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new gd;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let s,r,n,o=!1,l=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),s=e[0],s==="("||s==="["?c.push(s==="("?")":"]"):s==="{"&&c.length>0?c.push("}"):s===c[c.length-1]&&c.pop(),c.length===0)if(s===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(s==="{"){l=!0;break}else if(s==="}"){if(a.length>0){for(n=a.length-1,r=a[n];r&&r[0]==="space";)r=a[--n];r&&(t.source.end=this.getPosition(r[3]||r[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let s=0,r;for(let n=t-1;n>=0&&(r=e[n],!(r[0]!=="space"&&(s+=1,s===2)));n--);throw this.input.error("Missed semicolon",r[0]==="word"?r[3]+1:r[2])}colon(e){let t=0,s,r,n;for(let[o,l]of e.entries()){if(r=l,n=r[0],n==="("&&(t+=1),n===")"&&(t-=1),t===0&&n===":")if(!s)this.doubleColon(r);else{if(s[0]==="word"&&s[1]==="progid")continue;return o}s=r}return!1}comment(e){let t=new yd;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let r=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=r[2],t.raws.left=r[1],t.raws.right=r[3]}}createTokenizer(){this.tokenizer=vd(this.input)}decl(e,t){let s=new bd;this.init(s,e[0][2]);let r=e[e.length-1];for(r[0]===";"&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(r[3]||r[2]||Sd(e)),s.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;s.prop+=e.shift()[1]}s.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){s.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),s.raws.between+=n[1];(s.prop[0]==="_"||s.prop[0]==="*")&&(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let o=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(n=e[c],n[1].toLowerCase()==="!important"){s.important=!0;let u=this.stringFrom(e,c);u=this.spacesFromEnd(e)+u,u!==" !important"&&(s.raws.important=u);break}else if(n[1].toLowerCase()==="important"){let u=e.slice(0),h="";for(let d=c;d>0;d--){let f=u[d][0];if(h.trim().startsWith("!")&&f!=="space")break;h=u.pop()[1]+h}h.trim().startsWith("!")&&(s.important=!0,s.raws.important=h,e=u)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(s.raws.between+=o.map(c=>c[1]).join(""),o=[]),this.raw(s,"value",o.concat(e),t),s.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new to;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,s=null,r=!1,n=null,o=[],l=e[1].startsWith("--"),a=[],c=e;for(;c;){if(s=c[0],a.push(c),s==="("||s==="[")n||(n=c),o.push(s==="("?")":"]");else if(l&&r&&s==="{")n||(n=c),o.push("}");else if(o.length===0)if(s===";")if(r){this.decl(a,l);return}else break;else if(s==="{"){this.rule(a);return}else if(s==="}"){this.tokenizer.back(a.pop()),t=!0;break}else s===":"&&(r=!0);else s===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&r){if(!l)for(;a.length&&(c=a[a.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,s,r){let n,o,l=s.length,a="",c=!0,u,h;for(let d=0;d<l;d+=1)n=s[d],o=n[0],o==="space"&&d===l-1&&!r?c=!1:o==="comment"?(h=s[d-1]?s[d-1][0]:"empty",u=s[d+1]?s[d+1][0]:"empty",!so[h]&&!so[u]?a.slice(-1)===","?c=!1:a+=n[1]:c=!1):a+=n[1];if(!c){let d=s.reduce((f,m)=>f+m[1],"");e.raws[t]={raw:d,value:a}}e[t]=a}rule(e){e.pop();let t=new to;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],t==="space");)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let r=t;r<e.length;r++)s+=e[r][1];return e.splice(t,e.length-t),s}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word "+e[0][1],{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var xd=Cd;let Ed=Je,Md=si,Ad=xd;function Ws(i,e){let t=new Md(i,e),s=new Ad(t);try{s.parse()}catch(r){throw r}return s.root}var Br=Ws;Ws.default=Ws;Ed.registerParse(Ws);let Qi=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let s=t.node.rangeBy(t);this.line=s.start.line,this.column=s.start.column,this.endLine=s.end.line,this.endColumn=s.end.column}for(let s in t)this[s]=t[s]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Ua=Qi;Qi.default=Qi;let Id=Ua,er=class{get content(){return this.css}constructor(e,t,s){this.processor=e,this.messages=[],this.root=t,this.opts=s,this.css="",this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let s=new Id(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>e.type==="warning")}};var Wr=er;er.default=er;let Nd=Je,Rd=Fr,Td=Wa,Od=Br,io=Wr,Dd=Zt,$d=Ks,{isClean:Ee,my:kd}=Yt;const _d={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Ld={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Pd={Once:!0,postcssPlugin:!0,prepare:!0},ht=0;function xt(i){return typeof i=="object"&&typeof i.then=="function"}function Va(i){let e=!1,t=_d[i.type];return i.type==="decl"?e=i.prop.toLowerCase():i.type==="atrule"&&(e=i.name.toLowerCase()),e&&i.append?[t,t+"-"+e,ht,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:i.append?[t,ht,t+"Exit"]:[t,t+"Exit"]}function ro(i){let e;return i.type==="document"?e=["Document",ht,"DocumentExit"]:i.type==="root"?e=["Root",ht,"RootExit"]:e=Va(i),{eventIndex:0,events:e,iterator:0,node:i,visitorIndex:0,visitors:[]}}function tr(i){return i[Ee]=!1,i.nodes&&i.nodes.forEach(e=>tr(e)),i}let sr={},dt=class Ha{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(e,t,s){this.stringified=!1,this.processed=!1;let r;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))r=tr(t);else if(t instanceof Ha||t instanceof io)r=tr(t.root),t.map&&(typeof s.map=="undefined"&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=t.map);else{let n=Od;s.syntax&&(n=s.syntax.parse),s.parser&&(n=s.parser),n.parse&&(n=n.parse);try{r=n(t,s)}catch(o){this.processed=!0,this.error=o}r&&!r[kd]&&Nd.rebuild(r)}this.result=new io(e,r,s),this.helpers=re(A({},sr),{postcss:sr,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?A(A({},n),n.prepare(this.result)):n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let s=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=s.postcssPlugin,e.setMessage()):s.postcssVersion}catch(r){console&&console.error&&console.error(r)}return e}prepareVisitors(){this.listeners={};let e=(t,s,r)=>{this.listeners[s]||(this.listeners[s]=[]),this.listeners[s].push([t,r])};for(let t of this.plugins)if(typeof t=="object")for(let s in t){if(!Ld[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Pd[s])if(typeof t[s]=="object")for(let r in t[s])r==="*"?e(t,s,t[s][r]):e(t,s+"-"+r.toLowerCase(),t[s][r]);else typeof t[s]=="function"&&e(t,s,t[s])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],s=this.runOnRoot(t);if(xt(s))try{await s}catch(r){throw this.handleError(r)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ee];){e[Ee]=!0;let t=[ro(e)];for(;t.length>0;){let s=this.visitTick(t);if(xt(s))try{await s}catch(r){let n=t[t.length-1].node;throw this.handleError(r,n)}}}if(this.listeners.OnceExit)for(let[t,s]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let r=e.nodes.map(n=>s(n,this.helpers));await Promise.all(r)}else await s(e,this.helpers)}catch(r){throw this.handleError(r)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(s=>e.Once(s,this.helpers));return xt(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=$d;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new Td(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(xt(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ee];)e[Ee]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[s,r]of e){this.result.lastPlugin=s;let n;try{n=r(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(xt(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:s,visitors:r}=t;if(s.type!=="root"&&s.type!=="document"&&!s.parent){e.pop();return}if(r.length>0&&t.visitorIndex<r.length){let[o,l]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(s.toProxy(),this.helpers)}catch(a){throw this.handleError(a,s)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=s.nodes[s.indexes[o]];)if(s.indexes[o]+=1,!l[Ee]){l[Ee]=!0,e.push(ro(l));return}t.iterator=0,delete s.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===ht){s.nodes&&s.nodes.length&&(s[Ee]=!0,t.iterator=s.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[Ee]=!0;let t=Va(e);for(let s of t)if(s===ht)e.nodes&&e.each(r=>{r[Ee]||this.walkSync(r)});else{let r=this.listeners[s];if(r&&this.visitSync(r,e.toProxy()))return}}warnings(){return this.sync().warnings()}};dt.registerPostcss=i=>{sr=i};var Ga=dt;dt.default=dt;Dd.registerLazyResult(dt);Rd.registerLazyResult(dt);let Fd=Wa,zd=Br;const Bd=Wr;let Wd=Ks;let ir=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=zd;try{e=t(this._css,this._opts)}catch(s){this.error=s}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,s){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=s,this._map=void 0;let r,n=Wd;this.result=new Bd(this._processor,r,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new Fd(n,r,this._opts,t);if(l.isMap()){let[a,c]=l.generate();a&&(this.result.css=a),c&&(this.result.map=c)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}};var Ud=ir;ir.default=ir;let Vd=Fr,Hd=Ga,Gd=Ud,jd=Zt,Bt=class{constructor(e=[]){this.version="8.5.6",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(s.postcss===!0?s=s():s.postcss&&(s=s.postcss),typeof s=="object"&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if(typeof s=="object"&&s.postcssPlugin)t.push(s);else if(typeof s=="function")t.push(s);else if(!(typeof s=="object"&&(s.parse||s.stringify)))throw new Error(s+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Gd(this,e,t):new Hd(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Yd=Bt;Bt.default=Bt;jd.registerProcessor(Bt);Vd.registerProcessor(Bt);let ja=Pr,Ya=ei,Zd=Je,Xd=kr,Za=ti,Xa=Fr,Jd=Qh,qd=si,Kd=Ga,Qd=_a,ef=Qs,tf=Br,Ur=Yd,sf=Wr,Ja=Zt,qa=zr,rf=Ks,nf=Ua;function Y(...i){return i.length===1&&Array.isArray(i[0])&&(i=i[0]),new Ur(i)}Y.plugin=function(e,t){let s=!1;function r(...o){console&&console.warn&&!s&&(s=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
39
39
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
40
|
-
https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new Ur().version,l}let n;return Object.defineProperty(r,"postcss",{get(){return n||(n=r()),n}}),r.process=function(o,l,a){return Y([r(a)]).process(o,l)},r};Y.stringify=rf;Y.parse=tf;Y.fromJSON=Jd;Y.list=Qd;Y.comment=i=>new Ya(i);Y.atRule=i=>new ja(i);Y.decl=i=>new Za(i);Y.rule=i=>new qa(i);Y.root=i=>new Ja(i);Y.document=i=>new Xa(i);Y.CssSyntaxError=Xd;Y.Declaration=Za;Y.Container=Zd;Y.Processor=Ur;Y.Document=Xa;Y.Comment=Ya;Y.Warning=nf;Y.AtRule=ja;Y.Result=sf;Y.Input=qd;Y.Rule=qa;Y.Root=Ja;Y.Node=ef;Kd.registerPostcss(Y);var of=Y;Y.default=Y;const ee=bh(of);ee.stringify;ee.fromJSON;ee.plugin;ee.parse;ee.list;ee.document;ee.comment;ee.atRule;ee.rule;ee.decl;ee.root;ee.CssSyntaxError;ee.Declaration;ee.Container;ee.Processor;ee.Document;ee.Comment;ee.Warning;ee.AtRule;ee.Result;ee.Input;ee.Rule;ee.Root;ee.Node;const no={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function af(i){let e=no[i.tagName]?no[i.tagName]:i.tagName;return e==="link"&&i.attributes._cssText&&(e="style"),e}function ii(i,e){const t=e==null?void 0:e.stylesWithHoverClass.get(i);if(t)return t;let s=i;try{s=ee([mh,gh,yh]).process(i).css}catch(r){console.warn("Failed to adapt css for replay",r)}return e==null||e.stylesWithHoverClass.set(i,s),s}function oo(){return{stylesWithHoverClass:new Map}}function lf(i,e,t,s){const r=[];for(const a of i.childNodes)a.type===_.Text&&r.push(a);const n=e.split("/* rr_split */");for(;n.length>1&&n.length>r.length;)n.splice(-2,2,n.slice(-2).join(""));let o="";t&&(o=ii(n.join(""),s));let l=0;for(let a=0;a<r.length&&a!==n.length;a++){const c=r[a];if(!t)c.textContent=n[a];else if(a<n.length-1){let u=l,h=n[a+1].length;h=Math.min(h,30);let d=!1;for(;h>2;h--){const f=n[a+1].substring(0,h),m=o.substring(l).indexOf(f);if(d=m!==-1,d){u+=m;break}}d||(u+=n[a].length),c.textContent=o.substring(l,u),l=u}else c.textContent=o.substring(l)}}function cf(i,e,t,s){const{doc:r,hackCss:n,cache:o}=s;i.childNodes.length?lf(i,t,n,o):(n&&(t=ii(t,o)),e.appendChild(r.createTextNode(t)))}function uf(i,e){var t;const{doc:s,hackCss:r,cache:n}=e;switch(i.type){case _.Document:return s.implementation.createDocument(null,"",null);case _.DocumentType:return s.implementation.createDocumentType(i.name||"html",i.publicId,i.systemId);case _.Element:{const o=af(i);let l;i.isSVG?l=s.createElementNS("http://www.w3.org/2000/svg",o):(i.isCustom&&((t=s.defaultView)!=null&&t.customElements)&&!s.defaultView.customElements.get(i.tagName)&&s.defaultView.customElements.define(i.tagName,class extends s.defaultView.HTMLElement{}),l=s.createElement(o));const a={};for(const c in i.attributes){if(!Object.prototype.hasOwnProperty.call(i.attributes,c))continue;let u=i.attributes[c];if(!(o==="option"&&c==="selected"&&u===!1)&&u!==null){if(u===!0&&(u=""),c.startsWith("rr_")){a[c]=u;continue}if(typeof u=="string"){if(o==="style"&&c==="_cssText"){cf(i,l,u,e);continue}else if(o==="textarea"&&c==="value"){l.appendChild(s.createTextNode(u)),i.childNodes=[];continue}}try{if(i.isSVG&&c==="xlink:href")l.setAttributeNS("http://www.w3.org/1999/xlink",c,u.toString());else if(c==="onload"||c==="onclick"||c.substring(0,7)==="onmouse")l.setAttribute("_"+c,u.toString());else if(o==="meta"&&i.attributes["http-equiv"]==="Content-Security-Policy"&&c==="content"){l.setAttribute("csp-content",u.toString());continue}else o==="link"&&(i.attributes.rel==="preload"&&i.attributes.as==="script"||i.attributes.rel==="modulepreload")||o==="link"&&i.attributes.rel==="prefetch"&&typeof i.attributes.href=="string"&&Ir(i.attributes.href)==="js"||(o==="img"&&i.attributes.srcset&&i.attributes.rr_dataURL?l.setAttribute("rrweb-original-srcset",i.attributes.srcset):l.setAttribute(c,u.toString()))}catch(h){}}}for(const c in a){const u=a[c];if(o==="canvas"&&c==="rr_dataURL"){const h=s.createElement("img");h.onload=()=>{const d=l.getContext("2d");d&&d.drawImage(h,0,0,h.width,h.height)},h.src=u.toString(),l.RRNodeType&&(l.rr_dataURL=u.toString())}else if(o==="img"&&c==="rr_dataURL"){const h=l;h.currentSrc.startsWith("data:")||(h.setAttribute("rrweb-original-src",i.attributes.src),h.src=u.toString())}if(c==="rr_width")l.style.setProperty("width",u.toString());else if(c==="rr_height")l.style.setProperty("height",u.toString());else if(c==="rr_mediaCurrentTime"&&typeof u=="number")l.currentTime=u;else if(c==="rr_mediaState")switch(u){case"played":l.play().catch(h=>console.warn("media playback error",h));break;case"paused":l.pause();break}else c==="rr_mediaPlaybackRate"&&typeof u=="number"?l.playbackRate=u:c==="rr_mediaMuted"&&typeof u=="boolean"?l.muted=u:c==="rr_mediaLoop"&&typeof u=="boolean"?l.loop=u:c==="rr_mediaVolume"&&typeof u=="number"?l.volume=u:c==="rr_open_mode"&&l.setAttribute("rr_open_mode",u)}if(i.isShadowHost)if(!l.shadowRoot)l.attachShadow({mode:"open"});else for(;l.shadowRoot.firstChild;)l.shadowRoot.removeChild(l.shadowRoot.firstChild);return l}case _.Text:return i.isStyle&&r?s.createTextNode(ii(i.textContent,n)):s.createTextNode(i.textContent);case _.CDATA:return s.createCDATASection(i.textContent);case _.Comment:return s.createComment(i.textContent);default:return null}}function $t(i,e){const{doc:t,mirror:s,skipChild:r=!1,hackCss:n=!0,afterAppend:o,cache:l}=e;if(s.has(i.id)){const c=s.getNode(i.id),u=s.getMeta(c);if(Xc(u,i))return s.getNode(i.id)}let a=uf(i,{doc:t,hackCss:n,cache:l});if(!a)return null;if(i.rootId&&s.getNode(i.rootId)!==t&&s.replace(i.rootId,t),i.type===_.Document&&(t.close(),t.open(),i.compatMode==="BackCompat"&&i.childNodes&&i.childNodes[0].type!==_.DocumentType&&(i.childNodes[0].type===_.Element&&"xmlns"in i.childNodes[0].attributes&&i.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),a=t),s.add(a,i),(i.type===_.Document||i.type===_.Element)&&!r)for(const c of i.childNodes){const u=$t(c,{doc:t,mirror:s,skipChild:!1,hackCss:n,afterAppend:o,cache:l});if(!u){console.warn("Failed to rebuild",c);continue}if(c.isShadow&&Tt(a)&&a.shadowRoot)a.shadowRoot.appendChild(u);else if(i.type===_.Document&&c.type==_.Element){const h=u;let d=null;h.childNodes.forEach(f=>{f.nodeName==="BODY"&&(d=f)}),d?(h.removeChild(d),a.appendChild(u),h.appendChild(d)):a.appendChild(u)}else a.appendChild(u);o&&o(u,c.id)}return a}function hf(i,e){function t(s){e(s)}for(const s of i.getIds())i.has(s)&&t(i.getNode(s))}function df(i,e){const t=e.getMeta(i);if((t==null?void 0:t.type)!==_.Element)return;const s=i;for(const r in t.attributes){if(!(Object.prototype.hasOwnProperty.call(t.attributes,r)&&r.startsWith("rr_")))continue;const n=t.attributes[r];r==="rr_scrollLeft"&&(s.scrollLeft=n),r==="rr_scrollTop"&&(s.scrollTop=n)}}function ff(i,e){const{doc:t,onVisit:s,hackCss:r=!0,afterAppend:n,cache:o,mirror:l=new Mr}=e,a=$t(i,{doc:t,mirror:l,skipChild:!1,hackCss:r,afterAppend:n,cache:o});return hf(l,c=>{s&&s(c),df(c,l)}),a}var pf=Object.defineProperty,mf=(i,e,t)=>e in i?pf(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,A=(i,e,t)=>mf(i,typeof e!="symbol"?e+"":e,t),gf=Object.defineProperty,yf=(i,e,t)=>e in i?gf(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Ii=(i,e,t)=>yf(i,typeof e!="symbol"?e+"":e,t);let bf=class{constructor(){Ii(this,"idNodeMap",new Map),Ii(this,"nodeMetaMap",new WeakMap),Ii(this,"selectorNodeMap",new Map)}getId(e){var t;if(!e)return-1;const s=(t=this.getMeta(e))==null?void 0:t.id;return s!=null?s:-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 s=this.getMeta(e);if(s!=null&&s.selector){const r=this.selectorNodeMap.get(s.selector);r&&(r.delete(e),r.size===0&&this.selectorNodeMap.delete(s.selector))}e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const s=t.id;if(this.idNodeMap.set(s,e),this.nodeMetaMap.set(e,t),t.selector){let r=this.selectorNodeMap.get(t.selector);r||(r=new Set,this.selectorNodeMap.set(t.selector,r)),r.add(e)}}replace(e,t){const s=this.getNode(e);if(s){const r=this.nodeMetaMap.get(s);if(r&&(this.nodeMetaMap.set(t,r),r.selector)){const n=this.selectorNodeMap.get(r.selector);n&&(n.delete(s),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 wf(){return new bf}const vf=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],Sf=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],Ka=new WeakSet,Cf=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(i,e,t){if(Cf.call(this,i,e,t),this instanceof Element){const s=i.toLowerCase();vf.includes(s)&&Ka.add(this)}};const xf=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(i,e,t){xf.call(this,i,e,t)};function ao(){document.querySelectorAll("*").forEach(e=>{Sf.forEach(t=>{e.hasAttribute(t)&&Ka.add(e)})})}try{document.readyState==="complete"||document.readyState==="interactive"?ao():document.addEventListener("DOMContentLoaded",ao)}catch(i){}function Ef(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function Af(i){if(i.__esModule)return i;var e=i.default;if(typeof e=="function"){var t=function s(){return this instanceof s?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(i).forEach(function(s){var r=Object.getOwnPropertyDescriptor(i,s);Object.defineProperty(t,s,r.get?r:{enumerable:!0,get:function(){return i[s]}})}),t}var Vr={exports:{}},$=String,Qa=function(){return{isColorSupported:!1,reset:$,bold:$,dim:$,italic:$,underline:$,inverse:$,hidden:$,strikethrough:$,black:$,red:$,green:$,yellow:$,blue:$,magenta:$,cyan:$,white:$,gray:$,bgBlack:$,bgRed:$,bgGreen:$,bgYellow:$,bgBlue:$,bgMagenta:$,bgCyan:$,bgWhite:$,blackBright:$,redBright:$,greenBright:$,yellowBright:$,blueBright:$,magentaBright:$,cyanBright:$,whiteBright:$,bgBlackBright:$,bgRedBright:$,bgGreenBright:$,bgYellowBright:$,bgBlueBright:$,bgMagentaBright:$,bgCyanBright:$,bgWhiteBright:$}};Vr.exports=Qa();Vr.exports.createColors=Qa;var Mf=Vr.exports;const If={},Nf=Object.freeze(Object.defineProperty({__proto__:null,default:If},Symbol.toStringTag,{value:"Module"})),Se=Af(Nf);let lo=Mf,co=Se,rr=class el extends Error{constructor(e,t,s,r,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),r&&(this.source=r),o&&(this.plugin=o),typeof t!="undefined"&&typeof s!="undefined"&&(typeof t=="number"?(this.line=t,this.column=s):(this.line=t.line,this.column=t.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,el)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=lo.isColorSupported);let s=u=>u,r=u=>u,n=u=>u;if(e){let{bold:u,gray:h,red:d}=lo.createColors(!0);r=f=>u(d(f)),s=f=>h(f),co&&(n=f=>co(f))}let o=t.split(/\r?\n/),l=Math.max(this.line-3,0),a=Math.min(this.line+2,o.length),c=String(a).length;return o.slice(l,a).map((u,h)=>{let d=l+1+h,f=" "+(" "+d).slice(-c)+" | ";if(d===this.line){if(u.length>160){let y=20,p=Math.max(0,this.column-y),g=Math.max(this.column+y,this.endColumn+y),S=u.slice(p,g),v=s(f.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return r(">")+s(f)+n(S)+`
|
|
40
|
+
https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new Ur().version,l}let n;return Object.defineProperty(r,"postcss",{get(){return n||(n=r()),n}}),r.process=function(o,l,a){return Y([r(a)]).process(o,l)},r};Y.stringify=rf;Y.parse=tf;Y.fromJSON=Jd;Y.list=Qd;Y.comment=i=>new Ya(i);Y.atRule=i=>new ja(i);Y.decl=i=>new Za(i);Y.rule=i=>new qa(i);Y.root=i=>new Ja(i);Y.document=i=>new Xa(i);Y.CssSyntaxError=Xd;Y.Declaration=Za;Y.Container=Zd;Y.Processor=Ur;Y.Document=Xa;Y.Comment=Ya;Y.Warning=nf;Y.AtRule=ja;Y.Result=sf;Y.Input=qd;Y.Rule=qa;Y.Root=Ja;Y.Node=ef;Kd.registerPostcss(Y);var of=Y;Y.default=Y;const ee=bh(of);ee.stringify;ee.fromJSON;ee.plugin;ee.parse;ee.list;ee.document;ee.comment;ee.atRule;ee.rule;ee.decl;ee.root;ee.CssSyntaxError;ee.Declaration;ee.Container;ee.Processor;ee.Document;ee.Comment;ee.Warning;ee.AtRule;ee.Result;ee.Input;ee.Rule;ee.Root;ee.Node;const no={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function af(i){let e=no[i.tagName]?no[i.tagName]:i.tagName;return e==="link"&&i.attributes._cssText&&(e="style"),e}function ii(i,e){const t=e==null?void 0:e.stylesWithHoverClass.get(i);if(t)return t;let s=i;try{s=ee([mh,gh,yh]).process(i).css}catch(r){console.warn("Failed to adapt css for replay",r)}return e==null||e.stylesWithHoverClass.set(i,s),s}function oo(){return{stylesWithHoverClass:new Map}}function lf(i,e,t,s){const r=[];for(const a of i.childNodes)a.type===_.Text&&r.push(a);const n=e.split("/* rr_split */");for(;n.length>1&&n.length>r.length;)n.splice(-2,2,n.slice(-2).join(""));let o="";t&&(o=ii(n.join(""),s));let l=0;for(let a=0;a<r.length&&a!==n.length;a++){const c=r[a];if(!t)c.textContent=n[a];else if(a<n.length-1){let u=l,h=n[a+1].length;h=Math.min(h,30);let d=!1;for(;h>2;h--){const f=n[a+1].substring(0,h),m=o.substring(l).indexOf(f);if(d=m!==-1,d){u+=m;break}}d||(u+=n[a].length),c.textContent=o.substring(l,u),l=u}else c.textContent=o.substring(l)}}function cf(i,e,t,s){const{doc:r,hackCss:n,cache:o}=s;i.childNodes.length?lf(i,t,n,o):(n&&(t=ii(t,o)),e.appendChild(r.createTextNode(t)))}function uf(i,e){var t;const{doc:s,hackCss:r,cache:n}=e;switch(i.type){case _.Document:return s.implementation.createDocument(null,"",null);case _.DocumentType:return s.implementation.createDocumentType(i.name||"html",i.publicId,i.systemId);case _.Element:{const o=af(i);let l;i.isSVG?l=s.createElementNS("http://www.w3.org/2000/svg",o):(i.isCustom&&((t=s.defaultView)!=null&&t.customElements)&&!s.defaultView.customElements.get(i.tagName)&&s.defaultView.customElements.define(i.tagName,class extends s.defaultView.HTMLElement{}),l=s.createElement(o));const a={};for(const c in i.attributes){if(!Object.prototype.hasOwnProperty.call(i.attributes,c))continue;let u=i.attributes[c];if(!(o==="option"&&c==="selected"&&u===!1)&&u!==null){if(u===!0&&(u=""),c.startsWith("rr_")){a[c]=u;continue}if(typeof u=="string"){if(o==="style"&&c==="_cssText"){cf(i,l,u,e);continue}else if(o==="textarea"&&c==="value"){l.appendChild(s.createTextNode(u)),i.childNodes=[];continue}}try{if(i.isSVG&&c==="xlink:href")l.setAttributeNS("http://www.w3.org/1999/xlink",c,u.toString());else if(c==="onload"||c==="onclick"||c.substring(0,7)==="onmouse")l.setAttribute("_"+c,u.toString());else if(o==="meta"&&i.attributes["http-equiv"]==="Content-Security-Policy"&&c==="content"){l.setAttribute("csp-content",u.toString());continue}else o==="link"&&(i.attributes.rel==="preload"&&i.attributes.as==="script"||i.attributes.rel==="modulepreload")||o==="link"&&i.attributes.rel==="prefetch"&&typeof i.attributes.href=="string"&&Ir(i.attributes.href)==="js"||(o==="img"&&i.attributes.srcset&&i.attributes.rr_dataURL?l.setAttribute("rrweb-original-srcset",i.attributes.srcset):l.setAttribute(c,u.toString()))}catch(h){}}}for(const c in a){const u=a[c];if(o==="canvas"&&c==="rr_dataURL"){const h=s.createElement("img");h.onload=()=>{const d=l.getContext("2d");d&&d.drawImage(h,0,0,h.width,h.height)},h.src=u.toString(),l.RRNodeType&&(l.rr_dataURL=u.toString())}else if(o==="img"&&c==="rr_dataURL"){const h=l;h.currentSrc.startsWith("data:")||(h.setAttribute("rrweb-original-src",i.attributes.src),h.src=u.toString())}if(c==="rr_width")l.style.setProperty("width",u.toString());else if(c==="rr_height")l.style.setProperty("height",u.toString());else if(c==="rr_mediaCurrentTime"&&typeof u=="number")l.currentTime=u;else if(c==="rr_mediaState")switch(u){case"played":l.play().catch(h=>console.warn("media playback error",h));break;case"paused":l.pause();break}else c==="rr_mediaPlaybackRate"&&typeof u=="number"?l.playbackRate=u:c==="rr_mediaMuted"&&typeof u=="boolean"?l.muted=u:c==="rr_mediaLoop"&&typeof u=="boolean"?l.loop=u:c==="rr_mediaVolume"&&typeof u=="number"?l.volume=u:c==="rr_open_mode"&&l.setAttribute("rr_open_mode",u)}if(i.isShadowHost)if(!l.shadowRoot)l.attachShadow({mode:"open"});else for(;l.shadowRoot.firstChild;)l.shadowRoot.removeChild(l.shadowRoot.firstChild);return l}case _.Text:return i.isStyle&&r?s.createTextNode(ii(i.textContent,n)):s.createTextNode(i.textContent);case _.CDATA:return s.createCDATASection(i.textContent);case _.Comment:return s.createComment(i.textContent);default:return null}}function $t(i,e){const{doc:t,mirror:s,skipChild:r=!1,hackCss:n=!0,afterAppend:o,cache:l}=e;if(s.has(i.id)){const c=s.getNode(i.id),u=s.getMeta(c);if(Xc(u,i))return s.getNode(i.id)}let a=uf(i,{doc:t,hackCss:n,cache:l});if(!a)return null;if(i.rootId&&s.getNode(i.rootId)!==t&&s.replace(i.rootId,t),i.type===_.Document&&(t.close(),t.open(),i.compatMode==="BackCompat"&&i.childNodes&&i.childNodes[0].type!==_.DocumentType&&(i.childNodes[0].type===_.Element&&"xmlns"in i.childNodes[0].attributes&&i.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),a=t),s.add(a,i),(i.type===_.Document||i.type===_.Element)&&!r)for(const c of i.childNodes){const u=$t(c,{doc:t,mirror:s,skipChild:!1,hackCss:n,afterAppend:o,cache:l});if(!u){console.warn("Failed to rebuild",c);continue}if(c.isShadow&&Tt(a)&&a.shadowRoot)a.shadowRoot.appendChild(u);else if(i.type===_.Document&&c.type==_.Element){const h=u;let d=null;h.childNodes.forEach(f=>{f.nodeName==="BODY"&&(d=f)}),d?(h.removeChild(d),a.appendChild(u),h.appendChild(d)):a.appendChild(u)}else a.appendChild(u);o&&o(u,c.id)}return a}function hf(i,e){function t(s){e(s)}for(const s of i.getIds())i.has(s)&&t(i.getNode(s))}function df(i,e){const t=e.getMeta(i);if((t==null?void 0:t.type)!==_.Element)return;const s=i;for(const r in t.attributes){if(!(Object.prototype.hasOwnProperty.call(t.attributes,r)&&r.startsWith("rr_")))continue;const n=t.attributes[r];r==="rr_scrollLeft"&&(s.scrollLeft=n),r==="rr_scrollTop"&&(s.scrollTop=n)}}function ff(i,e){const{doc:t,onVisit:s,hackCss:r=!0,afterAppend:n,cache:o,mirror:l=new Ar}=e,a=$t(i,{doc:t,mirror:l,skipChild:!1,hackCss:r,afterAppend:n,cache:o});return hf(l,c=>{s&&s(c),df(c,l)}),a}var pf=Object.defineProperty,mf=(i,e,t)=>e in i?pf(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,M=(i,e,t)=>mf(i,typeof e!="symbol"?e+"":e,t),gf=Object.defineProperty,yf=(i,e,t)=>e in i?gf(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Ii=(i,e,t)=>yf(i,typeof e!="symbol"?e+"":e,t);let bf=class{constructor(){Ii(this,"idNodeMap",new Map),Ii(this,"nodeMetaMap",new WeakMap),Ii(this,"selectorNodeMap",new Map)}getId(e){var t;if(!e)return-1;const s=(t=this.getMeta(e))==null?void 0:t.id;return s!=null?s:-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 s=this.getMeta(e);if(s!=null&&s.selector){const r=this.selectorNodeMap.get(s.selector);r&&(r.delete(e),r.size===0&&this.selectorNodeMap.delete(s.selector))}e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const s=t.id;if(this.idNodeMap.set(s,e),this.nodeMetaMap.set(e,t),t.selector){let r=this.selectorNodeMap.get(t.selector);r||(r=new Set,this.selectorNodeMap.set(t.selector,r)),r.add(e)}}replace(e,t){const s=this.getNode(e);if(s){const r=this.nodeMetaMap.get(s);if(r&&(this.nodeMetaMap.set(t,r),r.selector)){const n=this.selectorNodeMap.get(r.selector);n&&(n.delete(s),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 wf(){return new bf}const vf=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],Sf=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],Ka=new WeakSet,Cf=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(i,e,t){if(Cf.call(this,i,e,t),this instanceof Element){const s=i.toLowerCase();vf.includes(s)&&Ka.add(this)}};const xf=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(i,e,t){xf.call(this,i,e,t)};function ao(){document.querySelectorAll("*").forEach(e=>{Sf.forEach(t=>{e.hasAttribute(t)&&Ka.add(e)})})}try{document.readyState==="complete"||document.readyState==="interactive"?ao():document.addEventListener("DOMContentLoaded",ao)}catch(i){}function Ef(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function Mf(i){if(i.__esModule)return i;var e=i.default;if(typeof e=="function"){var t=function s(){return this instanceof s?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(i).forEach(function(s){var r=Object.getOwnPropertyDescriptor(i,s);Object.defineProperty(t,s,r.get?r:{enumerable:!0,get:function(){return i[s]}})}),t}var Vr={exports:{}},$=String,Qa=function(){return{isColorSupported:!1,reset:$,bold:$,dim:$,italic:$,underline:$,inverse:$,hidden:$,strikethrough:$,black:$,red:$,green:$,yellow:$,blue:$,magenta:$,cyan:$,white:$,gray:$,bgBlack:$,bgRed:$,bgGreen:$,bgYellow:$,bgBlue:$,bgMagenta:$,bgCyan:$,bgWhite:$,blackBright:$,redBright:$,greenBright:$,yellowBright:$,blueBright:$,magentaBright:$,cyanBright:$,whiteBright:$,bgBlackBright:$,bgRedBright:$,bgGreenBright:$,bgYellowBright:$,bgBlueBright:$,bgMagentaBright:$,bgCyanBright:$,bgWhiteBright:$}};Vr.exports=Qa();Vr.exports.createColors=Qa;var Af=Vr.exports;const If={},Nf=Object.freeze(Object.defineProperty({__proto__:null,default:If},Symbol.toStringTag,{value:"Module"})),Se=Mf(Nf);let lo=Af,co=Se,rr=class el extends Error{constructor(e,t,s,r,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),r&&(this.source=r),o&&(this.plugin=o),typeof t!="undefined"&&typeof s!="undefined"&&(typeof t=="number"?(this.line=t,this.column=s):(this.line=t.line,this.column=t.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,el)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=lo.isColorSupported);let s=u=>u,r=u=>u,n=u=>u;if(e){let{bold:u,gray:h,red:d}=lo.createColors(!0);r=f=>u(d(f)),s=f=>h(f),co&&(n=f=>co(f))}let o=t.split(/\r?\n/),l=Math.max(this.line-3,0),a=Math.min(this.line+2,o.length),c=String(a).length;return o.slice(l,a).map((u,h)=>{let d=l+1+h,f=" "+(" "+d).slice(-c)+" | ";if(d===this.line){if(u.length>160){let y=20,p=Math.max(0,this.column-y),g=Math.max(this.column+y,this.endColumn+y),S=u.slice(p,g),v=s(f.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return r(">")+s(f)+n(S)+`
|
|
41
41
|
`+v+r("^")}let m=s(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+s(f)+n(u)+`
|
|
42
42
|
`+m+r("^")}return" "+s(f)+n(u)}).join(`
|
|
43
43
|
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
@@ -56,18 +56,18 @@ https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.p
|
|
|
56
56
|
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(s=>{if(typeof s.raws.between!="undefined")return t=s.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(s=>{if(s.nodes&&s.nodes.length===0&&(t=s.raws.after,typeof t!="undefined"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(s=>{let r=s.parent;if(r&&r!==e&&r.parent&&r.parent===e&&typeof s.raws.before!="undefined"){let n=s.raws.before.split(`
|
|
57
57
|
`);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(s=>{if(s.nodes&&s.nodes.length&&s.last.type==="decl"&&(t=s.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let s=e[t],r=e.raws[t];return r&&r.value===s?r.raw:s}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var tl=nr;nr.default=nr;let Tf=tl;function or(i,e){new Tf(e).stringify(i)}var ri=or;or.default=or;var Xt={};Xt.isClean=Symbol("isClean");Xt.my=Symbol("my");let Of=Hr,Df=tl,$f=ri,{isClean:Et,my:kf}=Xt;function ar(i,e){let t=new i.constructor;for(let s in i){if(!Object.prototype.hasOwnProperty.call(i,s)||s==="proxyCache")continue;let r=i[s],n=typeof r;s==="parent"&&n==="object"?e&&(t[s]=e):s==="source"?t[s]=r:Array.isArray(r)?t[s]=r.map(o=>ar(o,t)):(n==="object"&&r!==null&&(r=ar(r)),t[s]=r)}return t}function Re(i,e){if(e&&typeof e.offset!="undefined")return e.offset;let t=1,s=1,r=0;for(let n=0;n<i.length;n++){if(s===e.line&&t===e.column){r=n;break}i[n]===`
|
|
58
58
|
`?(t=1,s+=1):t+=1}return r}let lr=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[Et]=!1,this[kf]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let s of e[t])typeof s.clone=="function"?this.append(s.clone()):this.append(s)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=ar(this);for(let s in e)t[s]=e[s];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:s,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:s.column,line:s.line},t)}return new Of(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,s){return e[t]===s||(e[t]=s,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markClean(){this[Et]=!0}markDirty(){if(this[Et]){this[Et]=!1;let e=this;for(;e=e.parent;)e[Et]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let s="document"in this.source.input?this.source.input.document:this.source.input.css,n=s.slice(Re(s,this.source.start),Re(s,this.source.end)).indexOf(e.word);n!==-1&&(t=this.positionInside(n))}return t}positionInside(e){let t=this.source.start.column,s=this.source.start.line,r="document"in this.source.input?this.source.input.document:this.source.input.css,n=Re(r,this.source.start),o=n+e;for(let l=n;l<o;l++)r[l]===`
|
|
59
|
-
`?(t=1,s+=1):t+=1;return{column:t,line:s,offset:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let t="document"in this.source.input?this.source.input.document:this.source.input.css,s={column:this.source.start.column,line:this.source.start.line,offset:Re(t,this.source.start)},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:Re(t,this.source.end)+1}:{column:s.column+1,line:s.line,offset:s.offset+1};if(e.word){let o=t.slice(Re(t,this.source.start),Re(t,this.source.end)).indexOf(e.word);o!==-1&&(s=this.positionInside(o),r=this.positionInside(o+e.word.length))}else e.start?s={column:e.start.column,line:e.start.line,offset:Re(t,e.start)}:e.index&&(s=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line,offset:Re(t,e.end)}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<s.line||r.line===s.line&&r.column<=s.column)&&(r={column:s.column+1,line:s.line,offset:s.offset+1}),{end:r,start:s}}raw(e,t){return new Df().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,s=!1;for(let r of e)r===this?s=!0:s?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);s||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let s={},r=t==null;t=t||new Map;let n=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let l=this[o];if(Array.isArray(l))s[o]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)s[o]=l.toJSON(null,t);else if(o==="source"){if(l==null)continue;let a=t.get(l.input);a==null&&(a=n,t.set(l.input,n),n++),s[o]={end:l.end,inputId:a,start:l.start}}else s[o]=l}return r&&(s.inputs=[...t.keys()].map(o=>o.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=$f){e.stringify&&(e=e.stringify);let t="";return e(this,s=>{t+=s}),t}warn(e,t,s={}){let r={node:this};for(let n in s)r[n]=s[n];return e.warn(t,r)}};var ni=lr;lr.default=lr;let _f=ni,cr=class extends _f{constructor(e){super(e),this.type="comment"}};var oi=cr;cr.default=cr;let Lf=ni,ur=class extends Lf{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=re(M({},e),{value:String(e.value)})),super(e),this.type="decl"}};var ai=ur;ur.default=ur;let sl=oi,il=ai,Pf=ni,{isClean:rl,my:nl}=Xt,Gr,ol,al,jr;function ll(i){return i.map(e=>(e.nodes&&(e.nodes=ll(e.nodes)),delete e.source,e))}function cl(i){if(i[rl]=!1,i.proxyOf.nodes)for(let e of i.proxyOf.nodes)cl(e)}let $e=class ul extends Pf{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...e){for(let t of e){let s=this.normalize(t,this.last);for(let r of s)this.proxyOf.nodes.push(r)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),s,r;for(;this.indexes[t]<this.proxyOf.nodes.length&&(s=this.indexes[t],r=e(this.proxyOf.nodes[s],s),r!==!1);)this.indexes[t]+=1;return delete this.indexes[t],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...s)=>e[t](...s.map(r=>typeof r=="function"?(n,o)=>r(n.toProxy(),o):r)):t==="every"||t==="some"?s=>e[t]((r,...n)=>s(r.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(s=>s.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,s){return e[t]===s||(e[t]=s,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let s=this.index(e),r=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let o of r)this.proxyOf.nodes.splice(s+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],s<n&&(this.indexes[o]=n+r.length);return this.markDirty(),this}insertBefore(e,t){let s=this.index(e),r=s===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[s],r).reverse();s=this.index(e);for(let l of n)this.proxyOf.nodes.splice(s,0,l);let o;for(let l in this.indexes)o=this.indexes[l],s<=o&&(this.indexes[l]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=ll(ol(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new il(e)]}else if(e.selector||e.selectors)e=[new jr(e)];else if(e.name)e=[new Gr(e)];else if(e.text)e=[new sl(e)];else throw new Error("Unknown node type in node creation");return e.map(r=>(r[nl]||ul.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[rl]&&cl(r),r.raws||(r.raws={}),typeof r.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(r.raws.before=t.raws.before.replace(/\S/g,"")),r.parent=this.proxyOf,r))}prepend(...e){e=e.reverse();for(let t of e){let s=this.normalize(t,this.first,"prepend").reverse();for(let r of s)this.proxyOf.nodes.unshift(r);for(let r in this.indexes)this.indexes[r]=this.indexes[r]+s.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let s in this.indexes)t=this.indexes[s],t>=e&&(this.indexes[s]=t-1);return this.markDirty(),this}replaceValues(e,t,s){return s||(s=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,s))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,s)=>{let r;try{r=e(t,s)}catch(n){throw t.addToError(n)}return r!==!1&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if(s.type==="atrule"&&e.test(s.name))return t(s,r)}):this.walk((s,r)=>{if(s.type==="atrule"&&s.name===e)return t(s,r)}):(t=e,this.walk((s,r)=>{if(s.type==="atrule")return t(s,r)}))}walkComments(e){return this.walk((t,s)=>{if(t.type==="comment")return e(t,s)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if(s.type==="decl"&&e.test(s.prop))return t(s,r)}):this.walk((s,r)=>{if(s.type==="decl"&&s.prop===e)return t(s,r)}):(t=e,this.walk((s,r)=>{if(s.type==="decl")return t(s,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if(s.type==="rule"&&e.test(s.selector))return t(s,r)}):this.walk((s,r)=>{if(s.type==="rule"&&s.selector===e)return t(s,r)}):(t=e,this.walk((s,r)=>{if(s.type==="rule")return t(s,r)}))}};$e.registerParse=i=>{ol=i};$e.registerRule=i=>{jr=i};$e.registerAtRule=i=>{Gr=i};$e.registerRoot=i=>{al=i};var qe=$e;$e.default=$e;$e.rebuild=i=>{i.type==="atrule"?Object.setPrototypeOf(i,Gr.prototype):i.type==="rule"?Object.setPrototypeOf(i,jr.prototype):i.type==="decl"?Object.setPrototypeOf(i,il.prototype):i.type==="comment"?Object.setPrototypeOf(i,sl.prototype):i.type==="root"&&Object.setPrototypeOf(i,al.prototype),i[nl]=!0,i.nodes&&i.nodes.forEach(e=>{$e.rebuild(e)})};let hl=qe,Us=class extends hl{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Yr=Us;Us.default=Us;hl.registerAtRule(Us);let Ff=qe,dl,fl,Wt=class extends Ff{constructor(e){super(M({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new dl(new fl,this,e).stringify()}};Wt.registerLazyResult=i=>{dl=i};Wt.registerProcessor=i=>{fl=i};var Zr=Wt;Wt.default=Wt;let zf="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Bf=(i=21)=>{let e="",t=i|0;for(;t--;)e+=zf[Math.random()*64|0];return e};var Wf={nanoid:Bf};let{existsSync:Uf,readFileSync:Vf}=Se,{dirname:Ni,join:Hf}=Se,{SourceMapConsumer:ho,SourceMapGenerator:fo}=Se;function Gf(i){return Buffer?Buffer.from(i,"base64").toString():window.atob(i)}let hr=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let s=t.map?t.map.prev:void 0,r=this.loadMap(t.from,s);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Ni(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new ho(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,s=/^data:application\/json;base64,/,r=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,o=e.match(r)||e.match(n);if(o)return decodeURIComponent(e.substr(o[0].length));let l=e.match(t)||e.match(s);if(l)return Gf(e.substr(l[0].length));let a=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+a)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let s=e.lastIndexOf(t.pop()),r=e.indexOf("*/",s);s>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,r)))}loadFile(e){if(this.root=Ni(e),Uf(e))return this.mapFile=e,Vf(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let s=t(e);if(s){let r=this.loadFile(s);if(!r)throw new Error("Unable to load previous source map: "+s.toString());return r}}else{if(t instanceof ho)return fo.fromSourceMap(t).toString();if(t instanceof fo)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let s=this.annotation;return e&&(s=Hf(Ni(e),s)),this.loadFile(s)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var pl=hr;hr.default=hr;let{nanoid:jf}=Wf,{isAbsolute:dr,resolve:fr}=Se,{SourceMapConsumer:Yf,SourceMapGenerator:Zf}=Se,{fileURLToPath:po,pathToFileURL:ps}=Se,mo=Hr,Xf=pl,Ri=Se,Ti=Symbol("lineToIndexCache"),Jf=!!(Yf&&Zf),go=!!(fr&&dr);function yo(i){if(i[Ti])return i[Ti];let e=i.css.split(`
|
|
60
|
-
`),t=new Array(e.length),s=0;for(let r=0,n=e.length;r<n;r++)t[r]=s,s+=e[r].length+1;return i[Ti]=t,t}let Vs=class{get from(){return this.file||this.id}constructor(e,t={}){if(e===null||typeof e=="undefined"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,t.document&&(this.document=t.document.toString()),t.from&&(!go||/^\w+:\/\//.test(t.from)||dr(t.from)?this.file=t.from:this.file=fr(t.from)),go&&Jf){let s=new Xf(this.css,t);if(s.text){this.map=s;let r=s.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id="<input css "+jf(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,s,r={}){let n,o,l,a,c;if(t&&typeof t=="object"){let h=t,d=s;if(typeof h.offset=="number"){a=h.offset;let f=this.fromOffset(a);t=f.line,s=f.col}else t=h.line,s=h.column,a=this.fromLineAndColumn(t,s);if(typeof d.offset=="number"){l=d.offset;let f=this.fromOffset(l);o=f.line,n=f.col}else o=d.line,n=d.column,l=this.fromLineAndColumn(d.line,d.column)}else if(s)a=this.fromLineAndColumn(t,s);else{a=t;let h=this.fromOffset(a);t=h.line,s=h.col}let u=this.origin(t,s,o,n);return u?c=new mo(e,u.endLine===void 0?u.line:{column:u.column,line:u.line},u.endLine===void 0?u.column:{column:u.endColumn,line:u.endLine},u.source,u.file,r.plugin):c=new mo(e,o===void 0?t:{column:s,line:t},o===void 0?s:{column:n,line:o},this.css,this.file,r.plugin),c.input={column:s,endColumn:n,endLine:o,endOffset:l,line:t,offset:a,source:this.css},this.file&&(ps&&(c.input.url=ps(this.file).toString()),c.input.file=this.file),c}fromLineAndColumn(e,t){return yo(this)[e-1]+t-1}fromOffset(e){let t=yo(this),s=t[t.length-1],r=0;if(e>=s)r=t.length-1;else{let n=t.length-2,o;for(;r<n;)if(o=r+(n-r>>1),e<t[o])n=o-1;else if(e>=t[o+1])r=o+1;else{r=o;break}}return{col:e-t[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:fr(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,s,r){if(!this.map)return!1;let n=this.map.consumer(),o=n.originalPositionFor({column:t,line:e});if(!o.source)return!1;let l;typeof s=="number"&&(l=n.originalPositionFor({column:r,line:s}));let a;dr(o.source)?a=ps(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||ps(this.map.mapFile));let c={column:o.column,endColumn:l&&l.column,endLine:l&&l.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(po)c.file=po(a);else throw new Error("file: protocol is not available in this PostCSS build");let u=n.sourceContentFor(o.source);return u&&(c.source=u),c}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=
|
|
61
|
-
`," "];return Ut.split(i,e)},split(i,e,t){let s=[],r="",n=!1,o=0,l=!1,a="",c=!1;for(let u of i)c?c=!1:u==="\\"?c=!0:l?u===a&&(l=!1):u==='"'||u==="'"?(l=!0,a=u):u==="("?o+=1:u===")"?o>0&&(o-=1):o===0&&e.includes(u)&&(n=!0),n?(r!==""&&s.push(r.trim()),r="",n=!1):r+=u;return(t||r!=="")&&s.push(r.trim()),s}};var bl=Ut;Ut.default=Ut;let wl=qe,qf=bl,Hs=class extends wl{get selectors(){return qf.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};var Xr=Hs;Hs.default=Hs;wl.registerRule(Hs);let Kf=Yr,Qf=oi,ep=ai,tp=li,sp=pl,ip=Jt,rp=Xr;function Vt(i,e){if(Array.isArray(i))return i.map(o=>Vt(o));let r=i,{inputs:t}=r,s=Qe(r,["inputs"]);if(t){e=[];for(let o of t){let l=re(
|
|
59
|
+
`?(t=1,s+=1):t+=1;return{column:t,line:s,offset:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let t="document"in this.source.input?this.source.input.document:this.source.input.css,s={column:this.source.start.column,line:this.source.start.line,offset:Re(t,this.source.start)},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:Re(t,this.source.end)+1}:{column:s.column+1,line:s.line,offset:s.offset+1};if(e.word){let o=t.slice(Re(t,this.source.start),Re(t,this.source.end)).indexOf(e.word);o!==-1&&(s=this.positionInside(o),r=this.positionInside(o+e.word.length))}else e.start?s={column:e.start.column,line:e.start.line,offset:Re(t,e.start)}:e.index&&(s=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line,offset:Re(t,e.end)}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<s.line||r.line===s.line&&r.column<=s.column)&&(r={column:s.column+1,line:s.line,offset:s.offset+1}),{end:r,start:s}}raw(e,t){return new Df().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,s=!1;for(let r of e)r===this?s=!0:s?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);s||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let s={},r=t==null;t=t||new Map;let n=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let l=this[o];if(Array.isArray(l))s[o]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)s[o]=l.toJSON(null,t);else if(o==="source"){if(l==null)continue;let a=t.get(l.input);a==null&&(a=n,t.set(l.input,n),n++),s[o]={end:l.end,inputId:a,start:l.start}}else s[o]=l}return r&&(s.inputs=[...t.keys()].map(o=>o.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=$f){e.stringify&&(e=e.stringify);let t="";return e(this,s=>{t+=s}),t}warn(e,t,s={}){let r={node:this};for(let n in s)r[n]=s[n];return e.warn(t,r)}};var ni=lr;lr.default=lr;let _f=ni,cr=class extends _f{constructor(e){super(e),this.type="comment"}};var oi=cr;cr.default=cr;let Lf=ni,ur=class extends Lf{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=re(A({},e),{value:String(e.value)})),super(e),this.type="decl"}};var ai=ur;ur.default=ur;let sl=oi,il=ai,Pf=ni,{isClean:rl,my:nl}=Xt,Gr,ol,al,jr;function ll(i){return i.map(e=>(e.nodes&&(e.nodes=ll(e.nodes)),delete e.source,e))}function cl(i){if(i[rl]=!1,i.proxyOf.nodes)for(let e of i.proxyOf.nodes)cl(e)}let $e=class ul extends Pf{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...e){for(let t of e){let s=this.normalize(t,this.last);for(let r of s)this.proxyOf.nodes.push(r)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),s,r;for(;this.indexes[t]<this.proxyOf.nodes.length&&(s=this.indexes[t],r=e(this.proxyOf.nodes[s],s),r!==!1);)this.indexes[t]+=1;return delete this.indexes[t],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...s)=>e[t](...s.map(r=>typeof r=="function"?(n,o)=>r(n.toProxy(),o):r)):t==="every"||t==="some"?s=>e[t]((r,...n)=>s(r.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(s=>s.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,s){return e[t]===s||(e[t]=s,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let s=this.index(e),r=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let o of r)this.proxyOf.nodes.splice(s+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],s<n&&(this.indexes[o]=n+r.length);return this.markDirty(),this}insertBefore(e,t){let s=this.index(e),r=s===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[s],r).reverse();s=this.index(e);for(let l of n)this.proxyOf.nodes.splice(s,0,l);let o;for(let l in this.indexes)o=this.indexes[l],s<=o&&(this.indexes[l]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=ll(ol(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new il(e)]}else if(e.selector||e.selectors)e=[new jr(e)];else if(e.name)e=[new Gr(e)];else if(e.text)e=[new sl(e)];else throw new Error("Unknown node type in node creation");return e.map(r=>(r[nl]||ul.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[rl]&&cl(r),r.raws||(r.raws={}),typeof r.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(r.raws.before=t.raws.before.replace(/\S/g,"")),r.parent=this.proxyOf,r))}prepend(...e){e=e.reverse();for(let t of e){let s=this.normalize(t,this.first,"prepend").reverse();for(let r of s)this.proxyOf.nodes.unshift(r);for(let r in this.indexes)this.indexes[r]=this.indexes[r]+s.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let s in this.indexes)t=this.indexes[s],t>=e&&(this.indexes[s]=t-1);return this.markDirty(),this}replaceValues(e,t,s){return s||(s=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,s))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,s)=>{let r;try{r=e(t,s)}catch(n){throw t.addToError(n)}return r!==!1&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if(s.type==="atrule"&&e.test(s.name))return t(s,r)}):this.walk((s,r)=>{if(s.type==="atrule"&&s.name===e)return t(s,r)}):(t=e,this.walk((s,r)=>{if(s.type==="atrule")return t(s,r)}))}walkComments(e){return this.walk((t,s)=>{if(t.type==="comment")return e(t,s)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if(s.type==="decl"&&e.test(s.prop))return t(s,r)}):this.walk((s,r)=>{if(s.type==="decl"&&s.prop===e)return t(s,r)}):(t=e,this.walk((s,r)=>{if(s.type==="decl")return t(s,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if(s.type==="rule"&&e.test(s.selector))return t(s,r)}):this.walk((s,r)=>{if(s.type==="rule"&&s.selector===e)return t(s,r)}):(t=e,this.walk((s,r)=>{if(s.type==="rule")return t(s,r)}))}};$e.registerParse=i=>{ol=i};$e.registerRule=i=>{jr=i};$e.registerAtRule=i=>{Gr=i};$e.registerRoot=i=>{al=i};var qe=$e;$e.default=$e;$e.rebuild=i=>{i.type==="atrule"?Object.setPrototypeOf(i,Gr.prototype):i.type==="rule"?Object.setPrototypeOf(i,jr.prototype):i.type==="decl"?Object.setPrototypeOf(i,il.prototype):i.type==="comment"?Object.setPrototypeOf(i,sl.prototype):i.type==="root"&&Object.setPrototypeOf(i,al.prototype),i[nl]=!0,i.nodes&&i.nodes.forEach(e=>{$e.rebuild(e)})};let hl=qe,Us=class extends hl{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Yr=Us;Us.default=Us;hl.registerAtRule(Us);let Ff=qe,dl,fl,Wt=class extends Ff{constructor(e){super(A({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new dl(new fl,this,e).stringify()}};Wt.registerLazyResult=i=>{dl=i};Wt.registerProcessor=i=>{fl=i};var Zr=Wt;Wt.default=Wt;let zf="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Bf=(i=21)=>{let e="",t=i|0;for(;t--;)e+=zf[Math.random()*64|0];return e};var Wf={nanoid:Bf};let{existsSync:Uf,readFileSync:Vf}=Se,{dirname:Ni,join:Hf}=Se,{SourceMapConsumer:ho,SourceMapGenerator:fo}=Se;function Gf(i){return Buffer?Buffer.from(i,"base64").toString():window.atob(i)}let hr=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let s=t.map?t.map.prev:void 0,r=this.loadMap(t.from,s);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Ni(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new ho(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,s=/^data:application\/json;base64,/,r=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,o=e.match(r)||e.match(n);if(o)return decodeURIComponent(e.substr(o[0].length));let l=e.match(t)||e.match(s);if(l)return Gf(e.substr(l[0].length));let a=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+a)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let s=e.lastIndexOf(t.pop()),r=e.indexOf("*/",s);s>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,r)))}loadFile(e){if(this.root=Ni(e),Uf(e))return this.mapFile=e,Vf(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let s=t(e);if(s){let r=this.loadFile(s);if(!r)throw new Error("Unable to load previous source map: "+s.toString());return r}}else{if(t instanceof ho)return fo.fromSourceMap(t).toString();if(t instanceof fo)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let s=this.annotation;return e&&(s=Hf(Ni(e),s)),this.loadFile(s)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var pl=hr;hr.default=hr;let{nanoid:jf}=Wf,{isAbsolute:dr,resolve:fr}=Se,{SourceMapConsumer:Yf,SourceMapGenerator:Zf}=Se,{fileURLToPath:po,pathToFileURL:ps}=Se,mo=Hr,Xf=pl,Ri=Se,Ti=Symbol("lineToIndexCache"),Jf=!!(Yf&&Zf),go=!!(fr&&dr);function yo(i){if(i[Ti])return i[Ti];let e=i.css.split(`
|
|
60
|
+
`),t=new Array(e.length),s=0;for(let r=0,n=e.length;r<n;r++)t[r]=s,s+=e[r].length+1;return i[Ti]=t,t}let Vs=class{get from(){return this.file||this.id}constructor(e,t={}){if(e===null||typeof e=="undefined"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,t.document&&(this.document=t.document.toString()),t.from&&(!go||/^\w+:\/\//.test(t.from)||dr(t.from)?this.file=t.from:this.file=fr(t.from)),go&&Jf){let s=new Xf(this.css,t);if(s.text){this.map=s;let r=s.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id="<input css "+jf(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,s,r={}){let n,o,l,a,c;if(t&&typeof t=="object"){let h=t,d=s;if(typeof h.offset=="number"){a=h.offset;let f=this.fromOffset(a);t=f.line,s=f.col}else t=h.line,s=h.column,a=this.fromLineAndColumn(t,s);if(typeof d.offset=="number"){l=d.offset;let f=this.fromOffset(l);o=f.line,n=f.col}else o=d.line,n=d.column,l=this.fromLineAndColumn(d.line,d.column)}else if(s)a=this.fromLineAndColumn(t,s);else{a=t;let h=this.fromOffset(a);t=h.line,s=h.col}let u=this.origin(t,s,o,n);return u?c=new mo(e,u.endLine===void 0?u.line:{column:u.column,line:u.line},u.endLine===void 0?u.column:{column:u.endColumn,line:u.endLine},u.source,u.file,r.plugin):c=new mo(e,o===void 0?t:{column:s,line:t},o===void 0?s:{column:n,line:o},this.css,this.file,r.plugin),c.input={column:s,endColumn:n,endLine:o,endOffset:l,line:t,offset:a,source:this.css},this.file&&(ps&&(c.input.url=ps(this.file).toString()),c.input.file=this.file),c}fromLineAndColumn(e,t){return yo(this)[e-1]+t-1}fromOffset(e){let t=yo(this),s=t[t.length-1],r=0;if(e>=s)r=t.length-1;else{let n=t.length-2,o;for(;r<n;)if(o=r+(n-r>>1),e<t[o])n=o-1;else if(e>=t[o+1])r=o+1;else{r=o;break}}return{col:e-t[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:fr(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,s,r){if(!this.map)return!1;let n=this.map.consumer(),o=n.originalPositionFor({column:t,line:e});if(!o.source)return!1;let l;typeof s=="number"&&(l=n.originalPositionFor({column:r,line:s}));let a;dr(o.source)?a=ps(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||ps(this.map.mapFile));let c={column:o.column,endColumn:l&&l.column,endLine:l&&l.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(po)c.file=po(a);else throw new Error("file: protocol is not available in this PostCSS build");let u=n.sourceContentFor(o.source);return u&&(c.source=u),c}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=A({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};var li=Vs;Vs.default=Vs;Ri&&Ri.registerInput&&Ri.registerInput(Vs);let ml=qe,gl,yl,ft=class extends ml{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,s){let r=super.normalize(e);if(t){if(s==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of r)n.raws.before=t.raws.before}return r}removeChild(e,t){let s=this.index(e);return!t&&s===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),super.removeChild(e)}toResult(e={}){return new gl(new yl,this,e).stringify()}};ft.registerLazyResult=i=>{gl=i};ft.registerProcessor=i=>{yl=i};var Jt=ft;ft.default=ft;ml.registerRoot(ft);let Ut={comma(i){return Ut.split(i,[","],!0)},space(i){let e=[" ",`
|
|
61
|
+
`," "];return Ut.split(i,e)},split(i,e,t){let s=[],r="",n=!1,o=0,l=!1,a="",c=!1;for(let u of i)c?c=!1:u==="\\"?c=!0:l?u===a&&(l=!1):u==='"'||u==="'"?(l=!0,a=u):u==="("?o+=1:u===")"?o>0&&(o-=1):o===0&&e.includes(u)&&(n=!0),n?(r!==""&&s.push(r.trim()),r="",n=!1):r+=u;return(t||r!=="")&&s.push(r.trim()),s}};var bl=Ut;Ut.default=Ut;let wl=qe,qf=bl,Hs=class extends wl{get selectors(){return qf.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};var Xr=Hs;Hs.default=Hs;wl.registerRule(Hs);let Kf=Yr,Qf=oi,ep=ai,tp=li,sp=pl,ip=Jt,rp=Xr;function Vt(i,e){if(Array.isArray(i))return i.map(o=>Vt(o));let r=i,{inputs:t}=r,s=Qe(r,["inputs"]);if(t){e=[];for(let o of t){let l=re(A({},o),{__proto__:tp.prototype});l.map&&(l.map=re(A({},l.map),{__proto__:sp.prototype})),e.push(l)}}if(s.nodes&&(s.nodes=i.nodes.map(o=>Vt(o,e))),s.source){let n=s.source,{inputId:o}=n,l=Qe(n,["inputId"]);s.source=l,o!=null&&(s.source.input=e[o])}if(s.type==="root")return new ip(s);if(s.type==="decl")return new ep(s);if(s.type==="rule")return new rp(s);if(s.type==="comment")return new Qf(s);if(s.type==="atrule")return new Kf(s);throw new Error("Unknown node type: "+i.type)}var np=Vt;Vt.default=Vt;let{dirname:Ts,relative:vl,resolve:Sl,sep:Cl}=Se,{SourceMapConsumer:xl,SourceMapGenerator:Os}=Se,{pathToFileURL:bo}=Se,op=li,ap=!!(xl&&Os),lp=!!(Ts&&Sl&&vl&&Cl),cp=class{constructor(e,t,s,r){this.stringify=e,this.mapOpts=s.map||{},this.root=t,this.opts=s,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
|
|
62
62
|
`;this.css.includes(`\r
|
|
63
63
|
`)&&(t=`\r
|
|
64
64
|
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),s=e.root||Ts(e.file),r;this.mapOpts.sourcesContent===!1?(r=new xl(e.text),r.sourcesContent&&(r.sourcesContent=null)):r=e.consumer(),this.map.applySourceMap(r,t,this.toUrl(this.path(s)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),lp&&ap&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Os.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Os({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Os({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,s="<no source>",r={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,o;this.stringify(this.root,(l,a,c)=>{if(this.css+=l,a&&c!=="end"&&(r.generated.line=e,r.generated.column=t-1,a.source&&a.source.start?(r.source=this.sourcePath(a),r.original.line=a.source.start.line,r.original.column=a.source.start.column-1,this.map.addMapping(r)):(r.source=s,r.original.line=1,r.original.column=0,this.map.addMapping(r))),o=l.match(/\n/g),o?(e+=o.length,n=l.lastIndexOf(`
|
|
65
65
|
`),t=l.length-n):t+=l.length,a&&c!=="start"){let u=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==u.last||u.raws.semicolon)&&(a.source&&a.source.end?(r.source=this.sourcePath(a),r.original.line=a.source.end.line,r.original.column=a.source.end.column-1,r.generated.line=e,r.generated.column=t-2,this.map.addMapping(r)):(r.source=s,r.original.line=1,r.original.column=0,r.generated.line=e,r.generated.column=t-1,this.map.addMapping(r)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let s=this.opts.to?Ts(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(s=Ts(Sl(s,this.mapOpts.annotation)));let r=vl(s,e);return this.memoizedPaths.set(e,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new op(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let s=t.source.input.from;if(s&&!e[s]){e[s]=!0;let r=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(bo){let s=bo(e).toString();return this.memoizedFileURLs.set(e,s),s}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;Cl==="\\"&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}};var El=cp;const Oi="'".charCodeAt(0),wo='"'.charCodeAt(0),ms="\\".charCodeAt(0),vo="/".charCodeAt(0),gs=`
|
|
66
|
-
`.charCodeAt(0),At=" ".charCodeAt(0),ys="\f".charCodeAt(0),bs=" ".charCodeAt(0),ws="\r".charCodeAt(0),up="[".charCodeAt(0),hp="]".charCodeAt(0),dp="(".charCodeAt(0),fp=")".charCodeAt(0),pp="{".charCodeAt(0),mp="}".charCodeAt(0),gp=";".charCodeAt(0),yp="*".charCodeAt(0),bp=":".charCodeAt(0),wp="@".charCodeAt(0),vs=/[\t\n\f\r "#'()/;[\\\]{}]/g,Ss=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,vp=/.[\r\n"'(/\\]/,So=/[\da-f]/i;var Sp=function(e,t={}){let s=e.css.valueOf(),r=t.ignoreErrors,n,o,l,a,c,u,h,d,f,m,y=s.length,p=0,g=[],S=[];function v(){return p}function w(T){throw e.error("Unclosed "+T,p)}function C(){return S.length===0&&p>=y}function x(T){if(S.length)return S.pop();if(p>=y)return;let z=T?T.ignoreUnclosed:!1;switch(n=s.charCodeAt(p),n){case gs:case At:case bs:case ws:case ys:{a=p;do a+=1,n=s.charCodeAt(a);while(n===At||n===gs||n===bs||n===ws||n===ys);u=["space",s.slice(p,a)],p=a-1;break}case up:case hp:case pp:case mp:case bp:case gp:case fp:{let U=String.fromCharCode(n);u=[U,U,p];break}case dp:{if(m=g.length?g.pop()[1]:"",f=s.charCodeAt(p+1),m==="url"&&f!==Oi&&f!==wo&&f!==At&&f!==gs&&f!==bs&&f!==ys&&f!==ws){a=p;do{if(h=!1,a=s.indexOf(")",a+1),a===-1)if(r||z){a=p;break}else w("bracket");for(d=a;s.charCodeAt(d-1)===ms;)d-=1,h=!h}while(h);u=["brackets",s.slice(p,a+1),p,a],p=a}else a=s.indexOf(")",p+1),o=s.slice(p,a+1),a===-1||vp.test(o)?u=["(","(",p]:(u=["brackets",o,p,a],p=a);break}case Oi:case wo:{c=n===Oi?"'":'"',a=p;do{if(h=!1,a=s.indexOf(c,a+1),a===-1)if(r||z){a=p+1;break}else w("string");for(d=a;s.charCodeAt(d-1)===ms;)d-=1,h=!h}while(h);u=["string",s.slice(p,a+1),p,a],p=a;break}case wp:{vs.lastIndex=p+1,vs.test(s),vs.lastIndex===0?a=s.length-1:a=vs.lastIndex-2,u=["at-word",s.slice(p,a+1),p,a],p=a;break}case ms:{for(a=p,l=!0;s.charCodeAt(a+1)===ms;)a+=1,l=!l;if(n=s.charCodeAt(a+1),l&&n!==vo&&n!==At&&n!==gs&&n!==bs&&n!==ws&&n!==ys&&(a+=1,So.test(s.charAt(a)))){for(;So.test(s.charAt(a+1));)a+=1;s.charCodeAt(a+1)===At&&(a+=1)}u=["word",s.slice(p,a+1),p,a],p=a;break}default:{n===vo&&s.charCodeAt(p+1)===yp?(a=s.indexOf("*/",p+2)+1,a===0&&(r||z?a=s.length:w("comment")),u=["comment",s.slice(p,a+1),p,a],p=a):(Ss.lastIndex=p+1,Ss.test(s),Ss.lastIndex===0?a=s.length-1:a=Ss.lastIndex-2,u=["word",s.slice(p,a+1),p,a],g.push(u),p=a);break}}return p++,u}function R(T){S.push(T)}return{back:R,endOfFile:C,nextToken:x,position:v}};let Cp=Yr,xp=oi,Ep=ai,Ap=Jt,Co=Xr,Mp=Sp;const xo={empty:!0,space:!0};function Ip(i){for(let e=i.length-1;e>=0;e--){let t=i[e],s=t[3]||t[2];if(s)return s}}let Np=class{constructor(e){this.input=e,this.root=new Ap,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new Cp;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let s,r,n,o=!1,l=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),s=e[0],s==="("||s==="["?c.push(s==="("?")":"]"):s==="{"&&c.length>0?c.push("}"):s===c[c.length-1]&&c.pop(),c.length===0)if(s===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(s==="{"){l=!0;break}else if(s==="}"){if(a.length>0){for(n=a.length-1,r=a[n];r&&r[0]==="space";)r=a[--n];r&&(t.source.end=this.getPosition(r[3]||r[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let s=0,r;for(let n=t-1;n>=0&&(r=e[n],!(r[0]!=="space"&&(s+=1,s===2)));n--);throw this.input.error("Missed semicolon",r[0]==="word"?r[3]+1:r[2])}colon(e){let t=0,s,r,n;for(let[o,l]of e.entries()){if(r=l,n=r[0],n==="("&&(t+=1),n===")"&&(t-=1),t===0&&n===":")if(!s)this.doubleColon(r);else{if(s[0]==="word"&&s[1]==="progid")continue;return o}s=r}return!1}comment(e){let t=new xp;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let r=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=r[2],t.raws.left=r[1],t.raws.right=r[3]}}createTokenizer(){this.tokenizer=Mp(this.input)}decl(e,t){let s=new Ep;this.init(s,e[0][2]);let r=e[e.length-1];for(r[0]===";"&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(r[3]||r[2]||Ip(e)),s.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;s.prop+=e.shift()[1]}s.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){s.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),s.raws.between+=n[1];(s.prop[0]==="_"||s.prop[0]==="*")&&(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let o=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(n=e[c],n[1].toLowerCase()==="!important"){s.important=!0;let u=this.stringFrom(e,c);u=this.spacesFromEnd(e)+u,u!==" !important"&&(s.raws.important=u);break}else if(n[1].toLowerCase()==="important"){let u=e.slice(0),h="";for(let d=c;d>0;d--){let f=u[d][0];if(h.trim().startsWith("!")&&f!=="space")break;h=u.pop()[1]+h}h.trim().startsWith("!")&&(s.important=!0,s.raws.important=h,e=u)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(s.raws.between+=o.map(c=>c[1]).join(""),o=[]),this.raw(s,"value",o.concat(e),t),s.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Co;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,s=null,r=!1,n=null,o=[],l=e[1].startsWith("--"),a=[],c=e;for(;c;){if(s=c[0],a.push(c),s==="("||s==="[")n||(n=c),o.push(s==="("?")":"]");else if(l&&r&&s==="{")n||(n=c),o.push("}");else if(o.length===0)if(s===";")if(r){this.decl(a,l);return}else break;else if(s==="{"){this.rule(a);return}else if(s==="}"){this.tokenizer.back(a.pop()),t=!0;break}else s===":"&&(r=!0);else s===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&r){if(!l)for(;a.length&&(c=a[a.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,s,r){let n,o,l=s.length,a="",c=!0,u,h;for(let d=0;d<l;d+=1)n=s[d],o=n[0],o==="space"&&d===l-1&&!r?c=!1:o==="comment"?(h=s[d-1]?s[d-1][0]:"empty",u=s[d+1]?s[d+1][0]:"empty",!xo[h]&&!xo[u]?a.slice(-1)===","?c=!1:a+=n[1]:c=!1):a+=n[1];if(!c){let d=s.reduce((f,m)=>f+m[1],"");e.raws[t]={raw:d,value:a}}e[t]=a}rule(e){e.pop();let t=new Co;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],t==="space");)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let r=t;r<e.length;r++)s+=e[r][1];return e.splice(t,e.length-t),s}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word "+e[0][1],{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var Rp=Np;let Tp=qe,Op=li,Dp=Rp;function Gs(i,e){let t=new Op(i,e),s=new Dp(t);try{s.parse()}catch(r){throw r}return s.root}var Jr=Gs;Gs.default=Gs;Tp.registerParse(Gs);let pr=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let s=t.node.rangeBy(t);this.line=s.start.line,this.column=s.start.column,this.endLine=s.end.line,this.endColumn=s.end.column}for(let s in t)this[s]=t[s]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Al=pr;pr.default=pr;let $p=Al,mr=class{get content(){return this.css}constructor(e,t,s){this.processor=e,this.messages=[],this.root=t,this.opts=s,this.css="",this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let s=new $p(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>e.type==="warning")}};var qr=mr;mr.default=mr;let kp=qe,_p=Zr,Lp=El,Pp=Jr,Eo=qr,Fp=Jt,zp=ri,{isClean:Ae,my:Bp}=Xt;const Wp={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Up={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Vp={Once:!0,postcssPlugin:!0,prepare:!0},pt=0;function Mt(i){return typeof i=="object"&&typeof i.then=="function"}function Ml(i){let e=!1,t=Wp[i.type];return i.type==="decl"?e=i.prop.toLowerCase():i.type==="atrule"&&(e=i.name.toLowerCase()),e&&i.append?[t,t+"-"+e,pt,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:i.append?[t,pt,t+"Exit"]:[t,t+"Exit"]}function Ao(i){let e;return i.type==="document"?e=["Document",pt,"DocumentExit"]:i.type==="root"?e=["Root",pt,"RootExit"]:e=Ml(i),{eventIndex:0,events:e,iterator:0,node:i,visitorIndex:0,visitors:[]}}function gr(i){return i[Ae]=!1,i.nodes&&i.nodes.forEach(e=>gr(e)),i}let yr={},mt=class Il{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(e,t,s){this.stringified=!1,this.processed=!1;let r;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))r=gr(t);else if(t instanceof Il||t instanceof Eo)r=gr(t.root),t.map&&(typeof s.map=="undefined"&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=t.map);else{let n=Pp;s.syntax&&(n=s.syntax.parse),s.parser&&(n=s.parser),n.parse&&(n=n.parse);try{r=n(t,s)}catch(o){this.processed=!0,this.error=o}r&&!r[Bp]&&kp.rebuild(r)}this.result=new Eo(e,r,s),this.helpers=re(M({},yr),{postcss:yr,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?M(M({},n),n.prepare(this.result)):n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let s=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=s.postcssPlugin,e.setMessage()):s.postcssVersion}catch(r){console&&console.error&&console.error(r)}return e}prepareVisitors(){this.listeners={};let e=(t,s,r)=>{this.listeners[s]||(this.listeners[s]=[]),this.listeners[s].push([t,r])};for(let t of this.plugins)if(typeof t=="object")for(let s in t){if(!Up[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Vp[s])if(typeof t[s]=="object")for(let r in t[s])r==="*"?e(t,s,t[s][r]):e(t,s+"-"+r.toLowerCase(),t[s][r]);else typeof t[s]=="function"&&e(t,s,t[s])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],s=this.runOnRoot(t);if(Mt(s))try{await s}catch(r){throw this.handleError(r)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ae];){e[Ae]=!0;let t=[Ao(e)];for(;t.length>0;){let s=this.visitTick(t);if(Mt(s))try{await s}catch(r){let n=t[t.length-1].node;throw this.handleError(r,n)}}}if(this.listeners.OnceExit)for(let[t,s]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let r=e.nodes.map(n=>s(n,this.helpers));await Promise.all(r)}else await s(e,this.helpers)}catch(r){throw this.handleError(r)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(s=>e.Once(s,this.helpers));return Mt(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=zp;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new Lp(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(Mt(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ae];)e[Ae]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[s,r]of e){this.result.lastPlugin=s;let n;try{n=r(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Mt(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:s,visitors:r}=t;if(s.type!=="root"&&s.type!=="document"&&!s.parent){e.pop();return}if(r.length>0&&t.visitorIndex<r.length){let[o,l]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(s.toProxy(),this.helpers)}catch(a){throw this.handleError(a,s)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=s.nodes[s.indexes[o]];)if(s.indexes[o]+=1,!l[Ae]){l[Ae]=!0,e.push(Ao(l));return}t.iterator=0,delete s.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===pt){s.nodes&&s.nodes.length&&(s[Ae]=!0,t.iterator=s.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[Ae]=!0;let t=Ml(e);for(let s of t)if(s===pt)e.nodes&&e.each(r=>{r[Ae]||this.walkSync(r)});else{let r=this.listeners[s];if(r&&this.visitSync(r,e.toProxy()))return}}warnings(){return this.sync().warnings()}};mt.registerPostcss=i=>{yr=i};var Nl=mt;mt.default=mt;Fp.registerLazyResult(mt);_p.registerLazyResult(mt);let Hp=El,Gp=Jr;const jp=qr;let Yp=ri;let br=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Gp;try{e=t(this._css,this._opts)}catch(s){this.error=s}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,s){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=s,this._map=void 0;let r,n=Yp;this.result=new jp(this._processor,r,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new Hp(n,r,this._opts,t);if(l.isMap()){let[a,c]=l.generate();a&&(this.result.css=a),c&&(this.result.map=c)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}};var Zp=br;br.default=br;let Xp=Zr,Jp=Nl,qp=Zp,Kp=Jt,Ht=class{constructor(e=[]){this.version="8.5.6",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(s.postcss===!0?s=s():s.postcss&&(s=s.postcss),typeof s=="object"&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if(typeof s=="object"&&s.postcssPlugin)t.push(s);else if(typeof s=="function")t.push(s);else if(!(typeof s=="object"&&(s.parse||s.stringify)))throw new Error(s+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new qp(this,e,t):new Jp(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Qp=Ht;Ht.default=Ht;Kp.registerProcessor(Ht);Xp.registerProcessor(Ht);let Rl=Yr,Tl=oi,em=qe,tm=Hr,Ol=ai,Dl=Zr,sm=np,im=li,rm=Nl,nm=bl,om=ni,am=Jr,Kr=Qp,lm=qr,$l=Jt,kl=Xr,cm=ri,um=Al;function Z(...i){return i.length===1&&Array.isArray(i[0])&&(i=i[0]),new Kr(i)}Z.plugin=function(e,t){let s=!1;function r(...o){console&&console.warn&&!s&&(s=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
66
|
+
`.charCodeAt(0),Mt=" ".charCodeAt(0),ys="\f".charCodeAt(0),bs=" ".charCodeAt(0),ws="\r".charCodeAt(0),up="[".charCodeAt(0),hp="]".charCodeAt(0),dp="(".charCodeAt(0),fp=")".charCodeAt(0),pp="{".charCodeAt(0),mp="}".charCodeAt(0),gp=";".charCodeAt(0),yp="*".charCodeAt(0),bp=":".charCodeAt(0),wp="@".charCodeAt(0),vs=/[\t\n\f\r "#'()/;[\\\]{}]/g,Ss=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,vp=/.[\r\n"'(/\\]/,So=/[\da-f]/i;var Sp=function(e,t={}){let s=e.css.valueOf(),r=t.ignoreErrors,n,o,l,a,c,u,h,d,f,m,y=s.length,p=0,g=[],S=[];function v(){return p}function w(T){throw e.error("Unclosed "+T,p)}function C(){return S.length===0&&p>=y}function x(T){if(S.length)return S.pop();if(p>=y)return;let z=T?T.ignoreUnclosed:!1;switch(n=s.charCodeAt(p),n){case gs:case Mt:case bs:case ws:case ys:{a=p;do a+=1,n=s.charCodeAt(a);while(n===Mt||n===gs||n===bs||n===ws||n===ys);u=["space",s.slice(p,a)],p=a-1;break}case up:case hp:case pp:case mp:case bp:case gp:case fp:{let U=String.fromCharCode(n);u=[U,U,p];break}case dp:{if(m=g.length?g.pop()[1]:"",f=s.charCodeAt(p+1),m==="url"&&f!==Oi&&f!==wo&&f!==Mt&&f!==gs&&f!==bs&&f!==ys&&f!==ws){a=p;do{if(h=!1,a=s.indexOf(")",a+1),a===-1)if(r||z){a=p;break}else w("bracket");for(d=a;s.charCodeAt(d-1)===ms;)d-=1,h=!h}while(h);u=["brackets",s.slice(p,a+1),p,a],p=a}else a=s.indexOf(")",p+1),o=s.slice(p,a+1),a===-1||vp.test(o)?u=["(","(",p]:(u=["brackets",o,p,a],p=a);break}case Oi:case wo:{c=n===Oi?"'":'"',a=p;do{if(h=!1,a=s.indexOf(c,a+1),a===-1)if(r||z){a=p+1;break}else w("string");for(d=a;s.charCodeAt(d-1)===ms;)d-=1,h=!h}while(h);u=["string",s.slice(p,a+1),p,a],p=a;break}case wp:{vs.lastIndex=p+1,vs.test(s),vs.lastIndex===0?a=s.length-1:a=vs.lastIndex-2,u=["at-word",s.slice(p,a+1),p,a],p=a;break}case ms:{for(a=p,l=!0;s.charCodeAt(a+1)===ms;)a+=1,l=!l;if(n=s.charCodeAt(a+1),l&&n!==vo&&n!==Mt&&n!==gs&&n!==bs&&n!==ws&&n!==ys&&(a+=1,So.test(s.charAt(a)))){for(;So.test(s.charAt(a+1));)a+=1;s.charCodeAt(a+1)===Mt&&(a+=1)}u=["word",s.slice(p,a+1),p,a],p=a;break}default:{n===vo&&s.charCodeAt(p+1)===yp?(a=s.indexOf("*/",p+2)+1,a===0&&(r||z?a=s.length:w("comment")),u=["comment",s.slice(p,a+1),p,a],p=a):(Ss.lastIndex=p+1,Ss.test(s),Ss.lastIndex===0?a=s.length-1:a=Ss.lastIndex-2,u=["word",s.slice(p,a+1),p,a],g.push(u),p=a);break}}return p++,u}function R(T){S.push(T)}return{back:R,endOfFile:C,nextToken:x,position:v}};let Cp=Yr,xp=oi,Ep=ai,Mp=Jt,Co=Xr,Ap=Sp;const xo={empty:!0,space:!0};function Ip(i){for(let e=i.length-1;e>=0;e--){let t=i[e],s=t[3]||t[2];if(s)return s}}let Np=class{constructor(e){this.input=e,this.root=new Mp,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new Cp;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let s,r,n,o=!1,l=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),s=e[0],s==="("||s==="["?c.push(s==="("?")":"]"):s==="{"&&c.length>0?c.push("}"):s===c[c.length-1]&&c.pop(),c.length===0)if(s===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(s==="{"){l=!0;break}else if(s==="}"){if(a.length>0){for(n=a.length-1,r=a[n];r&&r[0]==="space";)r=a[--n];r&&(t.source.end=this.getPosition(r[3]||r[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let s=0,r;for(let n=t-1;n>=0&&(r=e[n],!(r[0]!=="space"&&(s+=1,s===2)));n--);throw this.input.error("Missed semicolon",r[0]==="word"?r[3]+1:r[2])}colon(e){let t=0,s,r,n;for(let[o,l]of e.entries()){if(r=l,n=r[0],n==="("&&(t+=1),n===")"&&(t-=1),t===0&&n===":")if(!s)this.doubleColon(r);else{if(s[0]==="word"&&s[1]==="progid")continue;return o}s=r}return!1}comment(e){let t=new xp;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let r=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=r[2],t.raws.left=r[1],t.raws.right=r[3]}}createTokenizer(){this.tokenizer=Ap(this.input)}decl(e,t){let s=new Ep;this.init(s,e[0][2]);let r=e[e.length-1];for(r[0]===";"&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(r[3]||r[2]||Ip(e)),s.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;s.prop+=e.shift()[1]}s.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){s.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),s.raws.between+=n[1];(s.prop[0]==="_"||s.prop[0]==="*")&&(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let o=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(n=e[c],n[1].toLowerCase()==="!important"){s.important=!0;let u=this.stringFrom(e,c);u=this.spacesFromEnd(e)+u,u!==" !important"&&(s.raws.important=u);break}else if(n[1].toLowerCase()==="important"){let u=e.slice(0),h="";for(let d=c;d>0;d--){let f=u[d][0];if(h.trim().startsWith("!")&&f!=="space")break;h=u.pop()[1]+h}h.trim().startsWith("!")&&(s.important=!0,s.raws.important=h,e=u)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(s.raws.between+=o.map(c=>c[1]).join(""),o=[]),this.raw(s,"value",o.concat(e),t),s.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Co;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,s=null,r=!1,n=null,o=[],l=e[1].startsWith("--"),a=[],c=e;for(;c;){if(s=c[0],a.push(c),s==="("||s==="[")n||(n=c),o.push(s==="("?")":"]");else if(l&&r&&s==="{")n||(n=c),o.push("}");else if(o.length===0)if(s===";")if(r){this.decl(a,l);return}else break;else if(s==="{"){this.rule(a);return}else if(s==="}"){this.tokenizer.back(a.pop()),t=!0;break}else s===":"&&(r=!0);else s===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&r){if(!l)for(;a.length&&(c=a[a.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,s,r){let n,o,l=s.length,a="",c=!0,u,h;for(let d=0;d<l;d+=1)n=s[d],o=n[0],o==="space"&&d===l-1&&!r?c=!1:o==="comment"?(h=s[d-1]?s[d-1][0]:"empty",u=s[d+1]?s[d+1][0]:"empty",!xo[h]&&!xo[u]?a.slice(-1)===","?c=!1:a+=n[1]:c=!1):a+=n[1];if(!c){let d=s.reduce((f,m)=>f+m[1],"");e.raws[t]={raw:d,value:a}}e[t]=a}rule(e){e.pop();let t=new Co;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],t==="space");)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let r=t;r<e.length;r++)s+=e[r][1];return e.splice(t,e.length-t),s}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word "+e[0][1],{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var Rp=Np;let Tp=qe,Op=li,Dp=Rp;function Gs(i,e){let t=new Op(i,e),s=new Dp(t);try{s.parse()}catch(r){throw r}return s.root}var Jr=Gs;Gs.default=Gs;Tp.registerParse(Gs);let pr=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let s=t.node.rangeBy(t);this.line=s.start.line,this.column=s.start.column,this.endLine=s.end.line,this.endColumn=s.end.column}for(let s in t)this[s]=t[s]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Ml=pr;pr.default=pr;let $p=Ml,mr=class{get content(){return this.css}constructor(e,t,s){this.processor=e,this.messages=[],this.root=t,this.opts=s,this.css="",this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let s=new $p(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>e.type==="warning")}};var qr=mr;mr.default=mr;let kp=qe,_p=Zr,Lp=El,Pp=Jr,Eo=qr,Fp=Jt,zp=ri,{isClean:Me,my:Bp}=Xt;const Wp={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Up={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Vp={Once:!0,postcssPlugin:!0,prepare:!0},pt=0;function At(i){return typeof i=="object"&&typeof i.then=="function"}function Al(i){let e=!1,t=Wp[i.type];return i.type==="decl"?e=i.prop.toLowerCase():i.type==="atrule"&&(e=i.name.toLowerCase()),e&&i.append?[t,t+"-"+e,pt,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:i.append?[t,pt,t+"Exit"]:[t,t+"Exit"]}function Mo(i){let e;return i.type==="document"?e=["Document",pt,"DocumentExit"]:i.type==="root"?e=["Root",pt,"RootExit"]:e=Al(i),{eventIndex:0,events:e,iterator:0,node:i,visitorIndex:0,visitors:[]}}function gr(i){return i[Me]=!1,i.nodes&&i.nodes.forEach(e=>gr(e)),i}let yr={},mt=class Il{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(e,t,s){this.stringified=!1,this.processed=!1;let r;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))r=gr(t);else if(t instanceof Il||t instanceof Eo)r=gr(t.root),t.map&&(typeof s.map=="undefined"&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=t.map);else{let n=Pp;s.syntax&&(n=s.syntax.parse),s.parser&&(n=s.parser),n.parse&&(n=n.parse);try{r=n(t,s)}catch(o){this.processed=!0,this.error=o}r&&!r[Bp]&&kp.rebuild(r)}this.result=new Eo(e,r,s),this.helpers=re(A({},yr),{postcss:yr,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?A(A({},n),n.prepare(this.result)):n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let s=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=s.postcssPlugin,e.setMessage()):s.postcssVersion}catch(r){console&&console.error&&console.error(r)}return e}prepareVisitors(){this.listeners={};let e=(t,s,r)=>{this.listeners[s]||(this.listeners[s]=[]),this.listeners[s].push([t,r])};for(let t of this.plugins)if(typeof t=="object")for(let s in t){if(!Up[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Vp[s])if(typeof t[s]=="object")for(let r in t[s])r==="*"?e(t,s,t[s][r]):e(t,s+"-"+r.toLowerCase(),t[s][r]);else typeof t[s]=="function"&&e(t,s,t[s])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],s=this.runOnRoot(t);if(At(s))try{await s}catch(r){throw this.handleError(r)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Me];){e[Me]=!0;let t=[Mo(e)];for(;t.length>0;){let s=this.visitTick(t);if(At(s))try{await s}catch(r){let n=t[t.length-1].node;throw this.handleError(r,n)}}}if(this.listeners.OnceExit)for(let[t,s]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let r=e.nodes.map(n=>s(n,this.helpers));await Promise.all(r)}else await s(e,this.helpers)}catch(r){throw this.handleError(r)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(s=>e.Once(s,this.helpers));return At(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=zp;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new Lp(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(At(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Me];)e[Me]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[s,r]of e){this.result.lastPlugin=s;let n;try{n=r(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(At(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:s,visitors:r}=t;if(s.type!=="root"&&s.type!=="document"&&!s.parent){e.pop();return}if(r.length>0&&t.visitorIndex<r.length){let[o,l]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(s.toProxy(),this.helpers)}catch(a){throw this.handleError(a,s)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=s.nodes[s.indexes[o]];)if(s.indexes[o]+=1,!l[Me]){l[Me]=!0,e.push(Mo(l));return}t.iterator=0,delete s.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===pt){s.nodes&&s.nodes.length&&(s[Me]=!0,t.iterator=s.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[Me]=!0;let t=Al(e);for(let s of t)if(s===pt)e.nodes&&e.each(r=>{r[Me]||this.walkSync(r)});else{let r=this.listeners[s];if(r&&this.visitSync(r,e.toProxy()))return}}warnings(){return this.sync().warnings()}};mt.registerPostcss=i=>{yr=i};var Nl=mt;mt.default=mt;Fp.registerLazyResult(mt);_p.registerLazyResult(mt);let Hp=El,Gp=Jr;const jp=qr;let Yp=ri;let br=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Gp;try{e=t(this._css,this._opts)}catch(s){this.error=s}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,s){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=s,this._map=void 0;let r,n=Yp;this.result=new jp(this._processor,r,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new Hp(n,r,this._opts,t);if(l.isMap()){let[a,c]=l.generate();a&&(this.result.css=a),c&&(this.result.map=c)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}};var Zp=br;br.default=br;let Xp=Zr,Jp=Nl,qp=Zp,Kp=Jt,Ht=class{constructor(e=[]){this.version="8.5.6",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(s.postcss===!0?s=s():s.postcss&&(s=s.postcss),typeof s=="object"&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if(typeof s=="object"&&s.postcssPlugin)t.push(s);else if(typeof s=="function")t.push(s);else if(!(typeof s=="object"&&(s.parse||s.stringify)))throw new Error(s+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new qp(this,e,t):new Jp(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Qp=Ht;Ht.default=Ht;Kp.registerProcessor(Ht);Xp.registerProcessor(Ht);let Rl=Yr,Tl=oi,em=qe,tm=Hr,Ol=ai,Dl=Zr,sm=np,im=li,rm=Nl,nm=bl,om=ni,am=Jr,Kr=Qp,lm=qr,$l=Jt,kl=Xr,cm=ri,um=Ml;function Z(...i){return i.length===1&&Array.isArray(i[0])&&(i=i[0]),new Kr(i)}Z.plugin=function(e,t){let s=!1;function r(...o){console&&console.warn&&!s&&(s=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
67
67
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
68
|
-
https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new Kr().version,l}let n;return Object.defineProperty(r,"postcss",{get(){return n||(n=r()),n}}),r.process=function(o,l,a){return Z([r(a)]).process(o,l)},r};Z.stringify=cm;Z.parse=am;Z.fromJSON=sm;Z.list=nm;Z.comment=i=>new Tl(i);Z.atRule=i=>new Rl(i);Z.decl=i=>new Ol(i);Z.rule=i=>new kl(i);Z.root=i=>new $l(i);Z.document=i=>new Dl(i);Z.CssSyntaxError=tm;Z.Declaration=Ol;Z.Container=em;Z.Processor=Kr;Z.Document=Dl;Z.Comment=Tl;Z.Warning=um;Z.AtRule=Rl;Z.Result=lm;Z.Input=im;Z.Rule=kl;Z.Root=$l;Z.Node=om;rm.registerPostcss(Z);var hm=Z;Z.default=Z;const se=Ef(hm);se.stringify;se.fromJSON;se.plugin;se.parse;se.list;se.document;se.comment;se.atRule;se.rule;se.decl;se.root;se.CssSyntaxError;se.Declaration;se.Container;se.Processor;se.Document;se.Comment;se.Warning;se.AtRule;se.Result;se.Input;se.Rule;se.Root;se.Node;var B=(i=>(i[i.Document=0]="Document",i[i.DocumentType=1]="DocumentType",i[i.Element=2]="Element",i[i.Text=3]="Text",i[i.CDATA=4]="CDATA",i[i.Comment=5]="Comment",i))(B||{});function dm(i){const e={},t=/;(?![^(]*\))/g,s=/:(.+)/,r=/\/\*.*?\*\//g;return i.replace(r,"").split(t).forEach(function(n){if(n){const o=n.split(s);o.length>1&&(e[wr(o[0].trim())]=o[1].trim())}}),e}function Mo(i){const e=[];for(const t in i){const s=i[t];if(typeof s!="string")continue;const r=gm(t);e.push(`${r}: ${s};`)}return e.join(" ")}const fm=/-([a-z])/g,pm=/^--[a-zA-Z0-9-]+$/,wr=i=>pm.test(i)?i:i.replace(fm,(e,t)=>t?t.toUpperCase():""),mm=/\B([A-Z])/g,gm=i=>i.replace(mm,"-$1").toLowerCase();class Ce{constructor(...e){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(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof Ce){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;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"}}class Qr extends Ce{constructor(...e){super(e),A(this,"nodeType",9),A(this,"nodeName","#document"),A(this,"compatMode","CSS1Compat"),A(this,"RRNodeType",B.Document),A(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===B.Element&&e.tagName==="HTML")||null}get body(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===B.Element&&t.tagName==="BODY"))||null}get head(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===B.Element&&t.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){const t=e.RRNodeType;if((t===B.Element||t===B.DocumentType)&&this.childNodes.some(r=>r.RRNodeType===t))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===B.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const s=en(this,e);return s.parentElement=null,s}insertBefore(e,t){const s=e.RRNodeType;if((s===B.Element||s===B.DocumentType)&&this.childNodes.some(n=>n.RRNodeType===s))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${s===B.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const r=zl(this,e,t);return r.parentElement=null,r}removeChild(e){return Bl(this,e)}open(){this.firstChild=null,this.lastChild=null}close(){}write(e){let t;if(e==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?t="-//W3C//DTD XHTML 1.0 Transitional//EN":e==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(t="-//W3C//DTD HTML 4.0 Transitional//EN"),t){const s=this.createDocumentType("html",t,"");this.open(),this.appendChild(s)}}createDocument(e,t,s){return new Qr}createDocumentType(e,t,s){const r=new _l(e,t,s);return r.ownerDocument=this,r}createElement(e){const t=new ci(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){const t=new Ll(e);return t.ownerDocument=this,t}createComment(e){const t=new Pl(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new Fl(e);return t.ownerDocument=this,t}toString(){return"RRDocument"}}class _l extends Ce{constructor(e,t,s){super(),A(this,"nodeType",10),A(this,"RRNodeType",B.DocumentType),A(this,"name"),A(this,"publicId"),A(this,"systemId"),A(this,"textContent",null),this.name=e,this.publicId=t,this.systemId=s,this.nodeName=e}toString(){return"RRDocumentType"}}class ci extends Ce{constructor(e){super(),A(this,"nodeType",1),A(this,"RRNodeType",B.Element),A(this,"tagName"),A(this,"attributes",{}),A(this,"shadowRoot",null),A(this,"scrollLeft"),A(this,"scrollTop"),this.tagName=e.toUpperCase(),this.nodeName=e.toUpperCase()}get textContent(){let e="";return this.childNodes.forEach(t=>e+=t.textContent),e}set textContent(e){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(e))}get classList(){return new wm(this.attributes.class,e=>{this.attributes.class=e})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const e=this.attributes.style?dm(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(s,r,n)=>{if(t.test(s))return;const o=wr(s);r?e[o]=r:delete e[o],n==="important"&&(e[o]+=" !important"),this.attributes.style=Mo(e)},e.removeProperty=s=>{if(t.test(s))return"";const r=wr(s),n=e[r]||"";return delete e[r],this.attributes.style=Mo(e),n},e}getAttribute(e){return this.attributes[e]===void 0?null:this.attributes[e]}setAttribute(e,t){this.attributes[e]=t}setAttributeNS(e,t,s){this.setAttribute(t,s)}removeAttribute(e){delete this.attributes[e]}appendChild(e){return en(this,e)}insertBefore(e,t){return zl(this,e,t)}removeChild(e){return Bl(this,e)}attachShadow(e){const t=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=t,t}dispatchEvent(e){return!0}toString(){let e="";for(const t in this.attributes)e+=`${t}="${this.attributes[t]}" `;return`${this.tagName} ${e}`}}class ym extends ci{constructor(){super(...arguments),A(this,"currentTime"),A(this,"volume"),A(this,"paused"),A(this,"muted"),A(this,"playbackRate"),A(this,"loop")}attachShadow(e){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}class bm extends ci{constructor(){super(...arguments),A(this,"tagName","DIALOG"),A(this,"nodeName","DIALOG")}get isModal(){return this.getAttribute("rr_open_mode")==="modal"}get open(){return this.getAttribute("open")!==null}close(){this.removeAttribute("open"),this.removeAttribute("rr_open_mode")}show(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","non-modal")}showModal(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","modal")}}class Ll extends Ce{constructor(e){super(),A(this,"nodeType",3),A(this,"nodeName","#text"),A(this,"RRNodeType",B.Text),A(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRText text=${JSON.stringify(this.data)}`}}class Pl extends Ce{constructor(e){super(),A(this,"nodeType",8),A(this,"nodeName","#comment"),A(this,"RRNodeType",B.Comment),A(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}class Fl extends Ce{constructor(e){super(),A(this,"nodeName","#cdata-section"),A(this,"nodeType",4),A(this,"RRNodeType",B.CDATA),A(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}class wm{constructor(e,t){if(A(this,"onChange"),A(this,"classes",[]),A(this,"add",(...s)=>{for(const r of s){const n=String(r);this.classes.indexOf(n)>=0||this.classes.push(n)}this.onChange&&this.onChange(this.classes.join(" "))}),A(this,"remove",(...s)=>{this.classes=this.classes.filter(r=>s.indexOf(r)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),e){const s=e.trim().split(/\s+/);this.classes.push(...s)}this.onChange=t}}function en(i,e){return e.parentNode&&e.parentNode.removeChild(e),i.lastChild?(i.lastChild.nextSibling=e,e.previousSibling=i.lastChild):(i.firstChild=e,e.previousSibling=null),i.lastChild=e,e.nextSibling=null,e.parentNode=i,e.parentElement=i,e.ownerDocument=i.ownerDocument,e}function zl(i,e,t){if(!t)return en(i,e);if(t.parentNode!==i)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return e===t||(e.parentNode&&e.parentNode.removeChild(e),e.previousSibling=t.previousSibling,t.previousSibling=e,e.nextSibling=t,e.previousSibling?e.previousSibling.nextSibling=e:i.firstChild=e,e.parentElement=i,e.parentNode=i,e.ownerDocument=i.ownerDocument),e}function Bl(i,e){if(e.parentNode!==i)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return e.previousSibling?e.previousSibling.nextSibling=e.nextSibling:i.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:i.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}var pe=(i=>(i[i.PLACEHOLDER=0]="PLACEHOLDER",i[i.ELEMENT_NODE=1]="ELEMENT_NODE",i[i.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",i[i.TEXT_NODE=3]="TEXT_NODE",i[i.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",i[i.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",i[i.ENTITY_NODE=6]="ENTITY_NODE",i[i.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",i[i.COMMENT_NODE=8]="COMMENT_NODE",i[i.DOCUMENT_NODE=9]="DOCUMENT_NODE",i[i.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",i[i.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",i))(pe||{});const vr={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},vm={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};let Ie=null;function js(i,e,t,s=e.mirror||e.ownerDocument.mirror){i=Sm(i,e,t,s),Wl(i,e,t,s),Cm(i,e,t)}function Sm(i,e,t,s){var r;if(t.afterAppend&&!Ie&&(Ie=new WeakSet,setTimeout(()=>{Ie=null},0)),!tn(i,e)){const n=Ys(e,t.mirror,s);(r=i.parentNode)==null||r.replaceChild(n,i),i=n}switch(e.RRNodeType){case B.Document:{if(!tt(i,e,t.mirror,s)){const n=s.getMeta(e);n&&(t.mirror.removeNodeFromMap(i),i.close(),i.open(),t.mirror.add(i,n),Ie==null||Ie.add(i))}break}case B.Element:{const n=i,o=e;switch(o.tagName){case"IFRAME":{const l=i.contentDocument;if(!l)break;js(l,e.contentDocument,t,s);break}}o.shadowRoot&&(n.shadowRoot||n.attachShadow({mode:"open"}),Wl(n.shadowRoot,o.shadowRoot,t,s)),xm(n,o,s);break}}return i}function Cm(i,e,t){var s;switch(e.RRNodeType){case B.Document:{const r=e.scrollData;r&&t.applyScroll(r,!0);break}case B.Element:{const r=i,n=e;switch(n.scrollData&&t.applyScroll(n.scrollData,!0),n.inputData&&t.applyInput(n.inputData),n.tagName){case"AUDIO":case"VIDEO":{const o=i,l=n;l.paused!==void 0&&(l.paused?o.pause():o.play()),l.muted!==void 0&&(o.muted=l.muted),l.volume!==void 0&&(o.volume=l.volume),l.currentTime!==void 0&&(o.currentTime=l.currentTime),l.playbackRate!==void 0&&(o.playbackRate=l.playbackRate),l.loop!==void 0&&(o.loop=l.loop);break}case"CANVAS":{const o=e;if(o.rr_dataURL!==null){const l=document.createElement("img");l.onload=()=>{const a=r.getContext("2d");a&&a.drawImage(l,0,0,l.width,l.height)},l.src=o.rr_dataURL}o.canvasMutations.forEach(l=>t.applyCanvas(l.event,l.mutation,i));break}case"STYLE":{const o=r.sheet;o&&e.rules.forEach(l=>t.applyStyleSheetMutation(l,o));break}case"DIALOG":{const o=r,l=n,a=o.open,c=o.matches("dialog:modal"),u=l.open,h=l.isModal,d=c!==h,f=a!==u;if((d||a&&f)&&o.close(),u&&(f||d))try{h?o.showModal():o.show()}catch(m){console.warn(m)}break}}break}case B.Text:case B.Comment:case B.CDATA:{i.textContent!==e.data&&(i.textContent=e.data);break}}Ie!=null&&Ie.has(i)&&(Ie.delete(i),(s=t.afterAppend)==null||s.call(t,i,t.mirror.getId(i)))}function xm(i,e,t){const s=i.attributes,r=e.attributes;for(const n in r){const o=r[n],l=t.getMeta(e);if(l!=null&&l.isSVG&&vr[n])i.setAttributeNS(vr[n],n,o);else if(e.tagName==="CANVAS"&&n==="rr_dataURL"){const a=document.createElement("img");a.src=o,a.onload=()=>{const c=i.getContext("2d");c&&c.drawImage(a,0,0,a.width,a.height)}}else{if(e.tagName==="IFRAME"&&n==="srcdoc")continue;try{i.setAttribute(n,o)}catch(a){console.warn(a)}}}for(const{name:n}of Array.from(s))n in r||i.removeAttribute(n);e.scrollLeft&&(i.scrollLeft=e.scrollLeft),e.scrollTop&&(i.scrollTop=e.scrollTop)}function Wl(i,e,t,s){const r=Array.from(i.childNodes),n=e.childNodes;if(r.length===0&&n.length===0)return;let o=0,l=r.length-1,a=0,c=n.length-1,u=r[o],h=r[l],d=n[a],f=n[c],m,y;for(;o<=l&&a<=c;)if(u===void 0)u=r[++o];else if(h===void 0)h=r[--l];else if(tt(u,d,t.mirror,s))u=r[++o],d=n[++a];else if(tt(h,f,t.mirror,s))h=r[--l],f=n[--c];else if(tt(u,f,t.mirror,s)){try{i.insertBefore(u,h.nextSibling)}catch(S){console.warn(S)}u=r[++o],f=n[--c]}else if(tt(h,d,t.mirror,s)){try{i.insertBefore(h,u)}catch(S){console.warn(S)}h=r[--l],d=n[++a]}else{if(!m){m={};for(let v=o;v<=l;v++){const w=r[v];w&&t.mirror.hasNode(w)&&(m[t.mirror.getId(w)]=v)}}y=m[s.getId(d)];const S=r[y];if(y!==void 0&&S&&tt(S,d,t.mirror,s)){try{i.insertBefore(S,u)}catch(v){console.warn(v)}r[y]=void 0}else{const v=Ys(d,t.mirror,s);i.nodeName==="#document"&&u&&(v.nodeType===v.DOCUMENT_TYPE_NODE&&u.nodeType===u.DOCUMENT_TYPE_NODE||v.nodeType===v.ELEMENT_NODE&&u.nodeType===u.ELEMENT_NODE)&&(i.removeChild(u),t.mirror.removeNodeFromMap(u),u=r[++o]);try{i.insertBefore(v,u||null)}catch(w){console.warn(w)}}d=n[++a]}if(o>l){const S=n[c+1];let v=null;for(S&&(v=t.mirror.getNode(s.getId(S)));a<=c;++a){const w=Ys(n[a],t.mirror,s);try{i.insertBefore(w,v)}catch(C){console.warn(C)}}}else if(a>c)for(;o<=l;o++){const S=r[o];if(!(!S||S.parentNode!==i))try{i.removeChild(S),t.mirror.removeNodeFromMap(S)}catch(v){console.warn(v)}}let p=i.firstChild,g=e.firstChild;for(;p!==null&&g!==null;)js(p,g,t,s),p=p.nextSibling,g=g.nextSibling}function Ys(i,e,t){const s=t.getId(i),r=t.getMeta(i);let n=null;if(s>-1&&(n=e.getNode(s)),n!==null&&tn(n,i))return n;switch(i.RRNodeType){case B.Document:n=new Document;break;case B.DocumentType:n=document.implementation.createDocumentType(i.name,i.publicId,i.systemId);break;case B.Element:{let o=i.tagName.toLowerCase();o=vm[o]||o,r&&"isSVG"in r&&(r!=null&&r.isSVG)?n=document.createElementNS(vr.svg,o):n=document.createElement(i.tagName);break}case B.Text:n=document.createTextNode(i.data);break;case B.Comment:n=document.createComment(i.data);break;case B.CDATA:n=document.createCDATASection(i.data);break}r&&e.add(n,M({},r));try{Ie==null||Ie.add(n)}catch(o){}return n}function tn(i,e){return i.nodeType!==e.nodeType?!1:i.nodeType!==i.ELEMENT_NODE||i.tagName.toUpperCase()===e.tagName}function tt(i,e,t,s){const r=t.getId(i),n=s.getId(e);return r===-1||r!==n?!1:tn(i,e)}class bt extends Qr{constructor(e){super(),A(this,"UNSERIALIZED_STARTING_ID",-2),A(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),A(this,"mirror",_m()),A(this,"scrollData",null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(e,t,s){return new bt}createDocumentType(e,t,s){const r=new Em(e,t,s);return r.ownerDocument=this,r}createElement(e){const t=e.toUpperCase();let s;switch(t){case"AUDIO":case"VIDEO":s=new Am(t);break;case"IFRAME":s=new Rm(t,this.mirror);break;case"CANVAS":s=new Im(t);break;case"STYLE":s=new Nm(t);break;case"DIALOG":s=new Mm(t);break;default:s=new ui(t);break}return s.ownerDocument=this,s}createComment(e){const t=new Om(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new Dm(e);return t.ownerDocument=this,t}createTextNode(e){const t=new Tm(e);return t.ownerDocument=this,t}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}const Em=_l;class ui extends ci{constructor(){super(...arguments),A(this,"inputData",null),A(this,"scrollData",null)}}class Am extends ym{}class Mm extends bm{}class Im extends ui{constructor(){super(...arguments),A(this,"rr_dataURL",null),A(this,"canvasMutations",[])}getContext(){return null}}class Nm extends ui{constructor(){super(...arguments),A(this,"rules",[])}}class Rm extends ui{constructor(e,t){super(e),A(this,"contentDocument",new bt),this.contentDocument.mirror=t}}const Tm=Ll,Om=Pl,Dm=Fl;function $m(i){return i instanceof HTMLFormElement?"FORM":i.tagName.toUpperCase()}function Ul(i,e,t,s){let r;switch(i.nodeType){case pe.DOCUMENT_NODE:s&&s.nodeName==="IFRAME"?r=s.contentDocument:(r=e,r.compatMode=i.compatMode);break;case pe.DOCUMENT_TYPE_NODE:{const o=i;r=e.createDocumentType(o.name,o.publicId,o.systemId);break}case pe.ELEMENT_NODE:{const o=i,l=$m(o);r=e.createElement(l);const a=r;for(const{name:c,value:u}of Array.from(o.attributes))a.attributes[c]=u;o.scrollLeft&&(a.scrollLeft=o.scrollLeft),o.scrollTop&&(a.scrollTop=o.scrollTop);break}case pe.TEXT_NODE:r=e.createTextNode(i.textContent||"");break;case pe.CDATA_SECTION_NODE:r=e.createCDATASection(i.data);break;case pe.COMMENT_NODE:r=e.createComment(i.textContent||"");break;case pe.DOCUMENT_FRAGMENT_NODE:r=s.attachShadow({mode:"open"});break;default:return null}let n=t.getMeta(i);return e instanceof bt&&(n||(n=Vl(r,e.unserializedId),t.add(i,n)),e.mirror.add(r,M({},n))),r}function km(i,e=wf(),t=new bt){function s(r,n){const o=Ul(r,t,e,n);if(o!==null)if((n==null?void 0:n.nodeName)!=="IFRAME"&&r.nodeType!==pe.DOCUMENT_FRAGMENT_NODE&&(n==null||n.appendChild(o),o.parentNode=n,o.parentElement=n),r.nodeName==="IFRAME"){const l=r.contentDocument;l&&s(l,o)}else(r.nodeType===pe.DOCUMENT_NODE||r.nodeType===pe.ELEMENT_NODE||r.nodeType===pe.DOCUMENT_FRAGMENT_NODE)&&(r.nodeType===pe.ELEMENT_NODE&&r.shadowRoot&&s(r.shadowRoot,o),r.childNodes.forEach(l=>s(l,o)))}return s(i,null),t}function _m(){return new Lm}class Lm{constructor(){A(this,"idNodeMap",new Map),A(this,"nodeMetaMap",new WeakMap),A(this,"selectorNodeMap",new Map)}getId(e){var t;if(!e)return-1;const s=(t=this.getMeta(e))==null?void 0:t.id;return s!=null?s:-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 s=this.getMeta(e);if(s!=null&&s.selector){const r=this.selectorNodeMap.get(s.selector);r&&(r.delete(e),r.size===0&&this.selectorNodeMap.delete(s.selector))}e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const s=t.id;if(this.idNodeMap.set(s,e),this.nodeMetaMap.set(e,t),t.selector){let r=this.selectorNodeMap.get(t.selector);r||(r=new Set,this.selectorNodeMap.set(t.selector,r)),r.add(e)}}replace(e,t){const s=this.getNode(e);if(s){const r=this.nodeMetaMap.get(s);if(r&&(this.nodeMetaMap.set(t,r),r.selector)){const n=this.selectorNodeMap.get(r.selector);n&&(n.delete(s),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 Vl(i,e){switch(i.RRNodeType){case B.Document:return{id:e,type:i.RRNodeType,childNodes:[]};case B.DocumentType:{const t=i;return{id:e,type:i.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId}}case B.Element:return{id:e,type:i.RRNodeType,tagName:i.tagName.toLowerCase(),attributes:{},childNodes:[]};case B.Text:return{id:e,type:i.RRNodeType,textContent:i.textContent||""};case B.Comment:return{id:e,type:i.RRNodeType,textContent:i.textContent||""};case B.CDATA:return{id:e,type:i.RRNodeType,textContent:""}}}const Io={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},No={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Cs={},Pm=()=>!!globalThis.Zone;function sn(i){if(Cs[i])return Cs[i];const e=globalThis[i],t=e.prototype,s=i in Io?Io[i]:void 0,r=!!(s&&s.every(l=>{var a,c;return!!((c=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&c.toString().includes("[native code]"))})),n=i in No?No[i]: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(r&&o&&!Pm())return Cs[i]=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[i].prototype;return document.body.removeChild(l),c?Cs[i]=c:t}catch(l){return t}}const Di={};function Ye(i,e,t){var s;const r=`${i}.${String(t)}`;if(Di[r])return Di[r].call(e);const n=sn(i),o=(s=Object.getOwnPropertyDescriptor(n,t))==null?void 0:s.get;return o?(Di[r]=o,o.call(e)):e[t]}const $i={};function Hl(i,e,t){const s=`${i}.${String(t)}`;if($i[s])return $i[s].bind(e);const n=sn(i)[t];return typeof n!="function"?e[t]:($i[s]=n,n.bind(e))}function Fm(i){return Ye("Node",i,"childNodes")}function zm(i){return Ye("Node",i,"parentNode")}function Bm(i){return Ye("Node",i,"parentElement")}function Wm(i){return Ye("Node",i,"textContent")}function Um(i,e){return Hl("Node",i,"contains")(e)}function Vm(i){return Hl("Node",i,"getRootNode")()}function Hm(i){return!i||!("host"in i)?null:Ye("ShadowRoot",i,"host")}function Gm(i){return i.styleSheets}function jm(i){return!i||!("shadowRoot"in i)?null:Ye("Element",i,"shadowRoot")}function Ym(i,e){return Ye("Element",i,"querySelector")(e)}function Zm(i,e){return Ye("Element",i,"querySelectorAll")(e)}function rn(){return sn("MutationObserver").constructor}function ke(i,e,t){try{if(!(e in i))return()=>{};const s=i[e],r=t(s);return typeof r=="function"&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__rrweb_original__:{enumerable:!1,value:s}})),i[e]=r,()=>{i[e]=s}}catch(s){return()=>{}}}function Xm(i){const e=i.tagName.toLowerCase(),t=i.id?`#${i.id}`:"",s=i.classList.length?"."+Array.from(i.classList).join("."):"";return`${e}${t}${s}`}function Jm(i){var d;var e,t;const s=(d=(e=i.ownerDocument)==null?void 0:e.defaultView)!=null?d:window,r=i.getBoundingClientRect(),n=s.innerWidth||s.document.documentElement.clientWidth||0,o=s.innerHeight||s.document.documentElement.clientHeight||0,l=r.width>0&&r.height>0&&r.bottom>0&&r.right>0&&r.top<o&&r.left<n,a=(t=s.getComputedStyle)==null?void 0:t.call(s,i),u=!!a&&a.display!=="none"&&a.visibility!=="hidden"&&(parseFloat(a.opacity)||0)>0&&l;let h=0;if(u){const f=Math.max(0,Math.min(r.right,n)-Math.max(r.left,0)),m=Math.max(0,Math.min(r.bottom,o)-Math.max(r.top,0)),y=f*m,p=r.width*r.height;h=p>0?y/p:0}return{isVisible:u,ratio:h}}const k={childNodes:Fm,parentNode:zm,parentElement:Bm,textContent:Wm,contains:Um,getRootNode:Vm,host:Hm,styleSheets:Gm,shadowRoot:jm,querySelector:Ym,querySelectorAll:Zm,mutationObserver:rn,patch:ke,describeNode:Xm,getElementVisibility:Jm};function ne(i,e,t=document){const s={capture:!0,passive:!0};return t.addEventListener(i,e,s),()=>t.removeEventListener(i,e,s)}const st=`Please stop import mirror directly. Instead of that,\r
|
|
68
|
+
https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new Kr().version,l}let n;return Object.defineProperty(r,"postcss",{get(){return n||(n=r()),n}}),r.process=function(o,l,a){return Z([r(a)]).process(o,l)},r};Z.stringify=cm;Z.parse=am;Z.fromJSON=sm;Z.list=nm;Z.comment=i=>new Tl(i);Z.atRule=i=>new Rl(i);Z.decl=i=>new Ol(i);Z.rule=i=>new kl(i);Z.root=i=>new $l(i);Z.document=i=>new Dl(i);Z.CssSyntaxError=tm;Z.Declaration=Ol;Z.Container=em;Z.Processor=Kr;Z.Document=Dl;Z.Comment=Tl;Z.Warning=um;Z.AtRule=Rl;Z.Result=lm;Z.Input=im;Z.Rule=kl;Z.Root=$l;Z.Node=om;rm.registerPostcss(Z);var hm=Z;Z.default=Z;const se=Ef(hm);se.stringify;se.fromJSON;se.plugin;se.parse;se.list;se.document;se.comment;se.atRule;se.rule;se.decl;se.root;se.CssSyntaxError;se.Declaration;se.Container;se.Processor;se.Document;se.Comment;se.Warning;se.AtRule;se.Result;se.Input;se.Rule;se.Root;se.Node;var B=(i=>(i[i.Document=0]="Document",i[i.DocumentType=1]="DocumentType",i[i.Element=2]="Element",i[i.Text=3]="Text",i[i.CDATA=4]="CDATA",i[i.Comment=5]="Comment",i))(B||{});function dm(i){const e={},t=/;(?![^(]*\))/g,s=/:(.+)/,r=/\/\*.*?\*\//g;return i.replace(r,"").split(t).forEach(function(n){if(n){const o=n.split(s);o.length>1&&(e[wr(o[0].trim())]=o[1].trim())}}),e}function Ao(i){const e=[];for(const t in i){const s=i[t];if(typeof s!="string")continue;const r=gm(t);e.push(`${r}: ${s};`)}return e.join(" ")}const fm=/-([a-z])/g,pm=/^--[a-zA-Z0-9-]+$/,wr=i=>pm.test(i)?i:i.replace(fm,(e,t)=>t?t.toUpperCase():""),mm=/\B([A-Z])/g,gm=i=>i.replace(mm,"-$1").toLowerCase();class Ce{constructor(...e){M(this,"parentElement",null),M(this,"parentNode",null),M(this,"ownerDocument"),M(this,"firstChild",null),M(this,"lastChild",null),M(this,"previousSibling",null),M(this,"nextSibling",null),M(this,"ELEMENT_NODE",1),M(this,"TEXT_NODE",3),M(this,"nodeType"),M(this,"nodeName"),M(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof Ce){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;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"}}class Qr extends Ce{constructor(...e){super(e),M(this,"nodeType",9),M(this,"nodeName","#document"),M(this,"compatMode","CSS1Compat"),M(this,"RRNodeType",B.Document),M(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===B.Element&&e.tagName==="HTML")||null}get body(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===B.Element&&t.tagName==="BODY"))||null}get head(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===B.Element&&t.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){const t=e.RRNodeType;if((t===B.Element||t===B.DocumentType)&&this.childNodes.some(r=>r.RRNodeType===t))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===B.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const s=en(this,e);return s.parentElement=null,s}insertBefore(e,t){const s=e.RRNodeType;if((s===B.Element||s===B.DocumentType)&&this.childNodes.some(n=>n.RRNodeType===s))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${s===B.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const r=zl(this,e,t);return r.parentElement=null,r}removeChild(e){return Bl(this,e)}open(){this.firstChild=null,this.lastChild=null}close(){}write(e){let t;if(e==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?t="-//W3C//DTD XHTML 1.0 Transitional//EN":e==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(t="-//W3C//DTD HTML 4.0 Transitional//EN"),t){const s=this.createDocumentType("html",t,"");this.open(),this.appendChild(s)}}createDocument(e,t,s){return new Qr}createDocumentType(e,t,s){const r=new _l(e,t,s);return r.ownerDocument=this,r}createElement(e){const t=new ci(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){const t=new Ll(e);return t.ownerDocument=this,t}createComment(e){const t=new Pl(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new Fl(e);return t.ownerDocument=this,t}toString(){return"RRDocument"}}class _l extends Ce{constructor(e,t,s){super(),M(this,"nodeType",10),M(this,"RRNodeType",B.DocumentType),M(this,"name"),M(this,"publicId"),M(this,"systemId"),M(this,"textContent",null),this.name=e,this.publicId=t,this.systemId=s,this.nodeName=e}toString(){return"RRDocumentType"}}class ci extends Ce{constructor(e){super(),M(this,"nodeType",1),M(this,"RRNodeType",B.Element),M(this,"tagName"),M(this,"attributes",{}),M(this,"shadowRoot",null),M(this,"scrollLeft"),M(this,"scrollTop"),this.tagName=e.toUpperCase(),this.nodeName=e.toUpperCase()}get textContent(){let e="";return this.childNodes.forEach(t=>e+=t.textContent),e}set textContent(e){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(e))}get classList(){return new wm(this.attributes.class,e=>{this.attributes.class=e})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const e=this.attributes.style?dm(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(s,r,n)=>{if(t.test(s))return;const o=wr(s);r?e[o]=r:delete e[o],n==="important"&&(e[o]+=" !important"),this.attributes.style=Ao(e)},e.removeProperty=s=>{if(t.test(s))return"";const r=wr(s),n=e[r]||"";return delete e[r],this.attributes.style=Ao(e),n},e}getAttribute(e){return this.attributes[e]===void 0?null:this.attributes[e]}setAttribute(e,t){this.attributes[e]=t}setAttributeNS(e,t,s){this.setAttribute(t,s)}removeAttribute(e){delete this.attributes[e]}appendChild(e){return en(this,e)}insertBefore(e,t){return zl(this,e,t)}removeChild(e){return Bl(this,e)}attachShadow(e){const t=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=t,t}dispatchEvent(e){return!0}toString(){let e="";for(const t in this.attributes)e+=`${t}="${this.attributes[t]}" `;return`${this.tagName} ${e}`}}class ym extends ci{constructor(){super(...arguments),M(this,"currentTime"),M(this,"volume"),M(this,"paused"),M(this,"muted"),M(this,"playbackRate"),M(this,"loop")}attachShadow(e){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}class bm extends ci{constructor(){super(...arguments),M(this,"tagName","DIALOG"),M(this,"nodeName","DIALOG")}get isModal(){return this.getAttribute("rr_open_mode")==="modal"}get open(){return this.getAttribute("open")!==null}close(){this.removeAttribute("open"),this.removeAttribute("rr_open_mode")}show(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","non-modal")}showModal(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","modal")}}class Ll extends Ce{constructor(e){super(),M(this,"nodeType",3),M(this,"nodeName","#text"),M(this,"RRNodeType",B.Text),M(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRText text=${JSON.stringify(this.data)}`}}class Pl extends Ce{constructor(e){super(),M(this,"nodeType",8),M(this,"nodeName","#comment"),M(this,"RRNodeType",B.Comment),M(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}class Fl extends Ce{constructor(e){super(),M(this,"nodeName","#cdata-section"),M(this,"nodeType",4),M(this,"RRNodeType",B.CDATA),M(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}class wm{constructor(e,t){if(M(this,"onChange"),M(this,"classes",[]),M(this,"add",(...s)=>{for(const r of s){const n=String(r);this.classes.indexOf(n)>=0||this.classes.push(n)}this.onChange&&this.onChange(this.classes.join(" "))}),M(this,"remove",(...s)=>{this.classes=this.classes.filter(r=>s.indexOf(r)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),e){const s=e.trim().split(/\s+/);this.classes.push(...s)}this.onChange=t}}function en(i,e){return e.parentNode&&e.parentNode.removeChild(e),i.lastChild?(i.lastChild.nextSibling=e,e.previousSibling=i.lastChild):(i.firstChild=e,e.previousSibling=null),i.lastChild=e,e.nextSibling=null,e.parentNode=i,e.parentElement=i,e.ownerDocument=i.ownerDocument,e}function zl(i,e,t){if(!t)return en(i,e);if(t.parentNode!==i)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return e===t||(e.parentNode&&e.parentNode.removeChild(e),e.previousSibling=t.previousSibling,t.previousSibling=e,e.nextSibling=t,e.previousSibling?e.previousSibling.nextSibling=e:i.firstChild=e,e.parentElement=i,e.parentNode=i,e.ownerDocument=i.ownerDocument),e}function Bl(i,e){if(e.parentNode!==i)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return e.previousSibling?e.previousSibling.nextSibling=e.nextSibling:i.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:i.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}var pe=(i=>(i[i.PLACEHOLDER=0]="PLACEHOLDER",i[i.ELEMENT_NODE=1]="ELEMENT_NODE",i[i.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",i[i.TEXT_NODE=3]="TEXT_NODE",i[i.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",i[i.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",i[i.ENTITY_NODE=6]="ENTITY_NODE",i[i.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",i[i.COMMENT_NODE=8]="COMMENT_NODE",i[i.DOCUMENT_NODE=9]="DOCUMENT_NODE",i[i.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",i[i.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",i))(pe||{});const vr={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},vm={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};let Ie=null;function js(i,e,t,s=e.mirror||e.ownerDocument.mirror){i=Sm(i,e,t,s),Wl(i,e,t,s),Cm(i,e,t)}function Sm(i,e,t,s){var r;if(t.afterAppend&&!Ie&&(Ie=new WeakSet,setTimeout(()=>{Ie=null},0)),!tn(i,e)){const n=Ys(e,t.mirror,s);(r=i.parentNode)==null||r.replaceChild(n,i),i=n}switch(e.RRNodeType){case B.Document:{if(!tt(i,e,t.mirror,s)){const n=s.getMeta(e);n&&(t.mirror.removeNodeFromMap(i),i.close(),i.open(),t.mirror.add(i,n),Ie==null||Ie.add(i))}break}case B.Element:{const n=i,o=e;switch(o.tagName){case"IFRAME":{const l=i.contentDocument;if(!l)break;js(l,e.contentDocument,t,s);break}}o.shadowRoot&&(n.shadowRoot||n.attachShadow({mode:"open"}),Wl(n.shadowRoot,o.shadowRoot,t,s)),xm(n,o,s);break}}return i}function Cm(i,e,t){var s;switch(e.RRNodeType){case B.Document:{const r=e.scrollData;r&&t.applyScroll(r,!0);break}case B.Element:{const r=i,n=e;switch(n.scrollData&&t.applyScroll(n.scrollData,!0),n.inputData&&t.applyInput(n.inputData),n.tagName){case"AUDIO":case"VIDEO":{const o=i,l=n;l.paused!==void 0&&(l.paused?o.pause():o.play()),l.muted!==void 0&&(o.muted=l.muted),l.volume!==void 0&&(o.volume=l.volume),l.currentTime!==void 0&&(o.currentTime=l.currentTime),l.playbackRate!==void 0&&(o.playbackRate=l.playbackRate),l.loop!==void 0&&(o.loop=l.loop);break}case"CANVAS":{const o=e;if(o.rr_dataURL!==null){const l=document.createElement("img");l.onload=()=>{const a=r.getContext("2d");a&&a.drawImage(l,0,0,l.width,l.height)},l.src=o.rr_dataURL}o.canvasMutations.forEach(l=>t.applyCanvas(l.event,l.mutation,i));break}case"STYLE":{const o=r.sheet;o&&e.rules.forEach(l=>t.applyStyleSheetMutation(l,o));break}case"DIALOG":{const o=r,l=n,a=o.open,c=o.matches("dialog:modal"),u=l.open,h=l.isModal,d=c!==h,f=a!==u;if((d||a&&f)&&o.close(),u&&(f||d))try{h?o.showModal():o.show()}catch(m){console.warn(m)}break}}break}case B.Text:case B.Comment:case B.CDATA:{i.textContent!==e.data&&(i.textContent=e.data);break}}Ie!=null&&Ie.has(i)&&(Ie.delete(i),(s=t.afterAppend)==null||s.call(t,i,t.mirror.getId(i)))}function xm(i,e,t){const s=i.attributes,r=e.attributes;for(const n in r){const o=r[n],l=t.getMeta(e);if(l!=null&&l.isSVG&&vr[n])i.setAttributeNS(vr[n],n,o);else if(e.tagName==="CANVAS"&&n==="rr_dataURL"){const a=document.createElement("img");a.src=o,a.onload=()=>{const c=i.getContext("2d");c&&c.drawImage(a,0,0,a.width,a.height)}}else{if(e.tagName==="IFRAME"&&n==="srcdoc")continue;try{i.setAttribute(n,o)}catch(a){console.warn(a)}}}for(const{name:n}of Array.from(s))n in r||i.removeAttribute(n);e.scrollLeft&&(i.scrollLeft=e.scrollLeft),e.scrollTop&&(i.scrollTop=e.scrollTop)}function Wl(i,e,t,s){const r=Array.from(i.childNodes),n=e.childNodes;if(r.length===0&&n.length===0)return;let o=0,l=r.length-1,a=0,c=n.length-1,u=r[o],h=r[l],d=n[a],f=n[c],m,y;for(;o<=l&&a<=c;)if(u===void 0)u=r[++o];else if(h===void 0)h=r[--l];else if(tt(u,d,t.mirror,s))u=r[++o],d=n[++a];else if(tt(h,f,t.mirror,s))h=r[--l],f=n[--c];else if(tt(u,f,t.mirror,s)){try{i.insertBefore(u,h.nextSibling)}catch(S){console.warn(S)}u=r[++o],f=n[--c]}else if(tt(h,d,t.mirror,s)){try{i.insertBefore(h,u)}catch(S){console.warn(S)}h=r[--l],d=n[++a]}else{if(!m){m={};for(let v=o;v<=l;v++){const w=r[v];w&&t.mirror.hasNode(w)&&(m[t.mirror.getId(w)]=v)}}y=m[s.getId(d)];const S=r[y];if(y!==void 0&&S&&tt(S,d,t.mirror,s)){try{i.insertBefore(S,u)}catch(v){console.warn(v)}r[y]=void 0}else{const v=Ys(d,t.mirror,s);i.nodeName==="#document"&&u&&(v.nodeType===v.DOCUMENT_TYPE_NODE&&u.nodeType===u.DOCUMENT_TYPE_NODE||v.nodeType===v.ELEMENT_NODE&&u.nodeType===u.ELEMENT_NODE)&&(i.removeChild(u),t.mirror.removeNodeFromMap(u),u=r[++o]);try{i.insertBefore(v,u||null)}catch(w){console.warn(w)}}d=n[++a]}if(o>l){const S=n[c+1];let v=null;for(S&&(v=t.mirror.getNode(s.getId(S)));a<=c;++a){const w=Ys(n[a],t.mirror,s);try{i.insertBefore(w,v)}catch(C){console.warn(C)}}}else if(a>c)for(;o<=l;o++){const S=r[o];if(!(!S||S.parentNode!==i))try{i.removeChild(S),t.mirror.removeNodeFromMap(S)}catch(v){console.warn(v)}}let p=i.firstChild,g=e.firstChild;for(;p!==null&&g!==null;)js(p,g,t,s),p=p.nextSibling,g=g.nextSibling}function Ys(i,e,t){const s=t.getId(i),r=t.getMeta(i);let n=null;if(s>-1&&(n=e.getNode(s)),n!==null&&tn(n,i))return n;switch(i.RRNodeType){case B.Document:n=new Document;break;case B.DocumentType:n=document.implementation.createDocumentType(i.name,i.publicId,i.systemId);break;case B.Element:{let o=i.tagName.toLowerCase();o=vm[o]||o,r&&"isSVG"in r&&(r!=null&&r.isSVG)?n=document.createElementNS(vr.svg,o):n=document.createElement(i.tagName);break}case B.Text:n=document.createTextNode(i.data);break;case B.Comment:n=document.createComment(i.data);break;case B.CDATA:n=document.createCDATASection(i.data);break}r&&e.add(n,A({},r));try{Ie==null||Ie.add(n)}catch(o){}return n}function tn(i,e){return i.nodeType!==e.nodeType?!1:i.nodeType!==i.ELEMENT_NODE||i.tagName.toUpperCase()===e.tagName}function tt(i,e,t,s){const r=t.getId(i),n=s.getId(e);return r===-1||r!==n?!1:tn(i,e)}class bt extends Qr{constructor(e){super(),M(this,"UNSERIALIZED_STARTING_ID",-2),M(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),M(this,"mirror",_m()),M(this,"scrollData",null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(e,t,s){return new bt}createDocumentType(e,t,s){const r=new Em(e,t,s);return r.ownerDocument=this,r}createElement(e){const t=e.toUpperCase();let s;switch(t){case"AUDIO":case"VIDEO":s=new Mm(t);break;case"IFRAME":s=new Rm(t,this.mirror);break;case"CANVAS":s=new Im(t);break;case"STYLE":s=new Nm(t);break;case"DIALOG":s=new Am(t);break;default:s=new ui(t);break}return s.ownerDocument=this,s}createComment(e){const t=new Om(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new Dm(e);return t.ownerDocument=this,t}createTextNode(e){const t=new Tm(e);return t.ownerDocument=this,t}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}const Em=_l;class ui extends ci{constructor(){super(...arguments),M(this,"inputData",null),M(this,"scrollData",null)}}class Mm extends ym{}class Am extends bm{}class Im extends ui{constructor(){super(...arguments),M(this,"rr_dataURL",null),M(this,"canvasMutations",[])}getContext(){return null}}class Nm extends ui{constructor(){super(...arguments),M(this,"rules",[])}}class Rm extends ui{constructor(e,t){super(e),M(this,"contentDocument",new bt),this.contentDocument.mirror=t}}const Tm=Ll,Om=Pl,Dm=Fl;function $m(i){return i instanceof HTMLFormElement?"FORM":i.tagName.toUpperCase()}function Ul(i,e,t,s){let r;switch(i.nodeType){case pe.DOCUMENT_NODE:s&&s.nodeName==="IFRAME"?r=s.contentDocument:(r=e,r.compatMode=i.compatMode);break;case pe.DOCUMENT_TYPE_NODE:{const o=i;r=e.createDocumentType(o.name,o.publicId,o.systemId);break}case pe.ELEMENT_NODE:{const o=i,l=$m(o);r=e.createElement(l);const a=r;for(const{name:c,value:u}of Array.from(o.attributes))a.attributes[c]=u;o.scrollLeft&&(a.scrollLeft=o.scrollLeft),o.scrollTop&&(a.scrollTop=o.scrollTop);break}case pe.TEXT_NODE:r=e.createTextNode(i.textContent||"");break;case pe.CDATA_SECTION_NODE:r=e.createCDATASection(i.data);break;case pe.COMMENT_NODE:r=e.createComment(i.textContent||"");break;case pe.DOCUMENT_FRAGMENT_NODE:r=s.attachShadow({mode:"open"});break;default:return null}let n=t.getMeta(i);return e instanceof bt&&(n||(n=Vl(r,e.unserializedId),t.add(i,n)),e.mirror.add(r,A({},n))),r}function km(i,e=wf(),t=new bt){function s(r,n){const o=Ul(r,t,e,n);if(o!==null)if((n==null?void 0:n.nodeName)!=="IFRAME"&&r.nodeType!==pe.DOCUMENT_FRAGMENT_NODE&&(n==null||n.appendChild(o),o.parentNode=n,o.parentElement=n),r.nodeName==="IFRAME"){const l=r.contentDocument;l&&s(l,o)}else(r.nodeType===pe.DOCUMENT_NODE||r.nodeType===pe.ELEMENT_NODE||r.nodeType===pe.DOCUMENT_FRAGMENT_NODE)&&(r.nodeType===pe.ELEMENT_NODE&&r.shadowRoot&&s(r.shadowRoot,o),r.childNodes.forEach(l=>s(l,o)))}return s(i,null),t}function _m(){return new Lm}class Lm{constructor(){M(this,"idNodeMap",new Map),M(this,"nodeMetaMap",new WeakMap),M(this,"selectorNodeMap",new Map)}getId(e){var t;if(!e)return-1;const s=(t=this.getMeta(e))==null?void 0:t.id;return s!=null?s:-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 s=this.getMeta(e);if(s!=null&&s.selector){const r=this.selectorNodeMap.get(s.selector);r&&(r.delete(e),r.size===0&&this.selectorNodeMap.delete(s.selector))}e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const s=t.id;if(this.idNodeMap.set(s,e),this.nodeMetaMap.set(e,t),t.selector){let r=this.selectorNodeMap.get(t.selector);r||(r=new Set,this.selectorNodeMap.set(t.selector,r)),r.add(e)}}replace(e,t){const s=this.getNode(e);if(s){const r=this.nodeMetaMap.get(s);if(r&&(this.nodeMetaMap.set(t,r),r.selector)){const n=this.selectorNodeMap.get(r.selector);n&&(n.delete(s),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 Vl(i,e){switch(i.RRNodeType){case B.Document:return{id:e,type:i.RRNodeType,childNodes:[]};case B.DocumentType:{const t=i;return{id:e,type:i.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId}}case B.Element:return{id:e,type:i.RRNodeType,tagName:i.tagName.toLowerCase(),attributes:{},childNodes:[]};case B.Text:return{id:e,type:i.RRNodeType,textContent:i.textContent||""};case B.Comment:return{id:e,type:i.RRNodeType,textContent:i.textContent||""};case B.CDATA:return{id:e,type:i.RRNodeType,textContent:""}}}const Io={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},No={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Cs={},Pm=()=>!!globalThis.Zone;function sn(i){if(Cs[i])return Cs[i];const e=globalThis[i],t=e.prototype,s=i in Io?Io[i]:void 0,r=!!(s&&s.every(l=>{var a,c;return!!((c=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&c.toString().includes("[native code]"))})),n=i in No?No[i]: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(r&&o&&!Pm())return Cs[i]=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[i].prototype;return document.body.removeChild(l),c?Cs[i]=c:t}catch(l){return t}}const Di={};function Ye(i,e,t){var s;const r=`${i}.${String(t)}`;if(Di[r])return Di[r].call(e);const n=sn(i),o=(s=Object.getOwnPropertyDescriptor(n,t))==null?void 0:s.get;return o?(Di[r]=o,o.call(e)):e[t]}const $i={};function Hl(i,e,t){const s=`${i}.${String(t)}`;if($i[s])return $i[s].bind(e);const n=sn(i)[t];return typeof n!="function"?e[t]:($i[s]=n,n.bind(e))}function Fm(i){return Ye("Node",i,"childNodes")}function zm(i){return Ye("Node",i,"parentNode")}function Bm(i){return Ye("Node",i,"parentElement")}function Wm(i){return Ye("Node",i,"textContent")}function Um(i,e){return Hl("Node",i,"contains")(e)}function Vm(i){return Hl("Node",i,"getRootNode")()}function Hm(i){return!i||!("host"in i)?null:Ye("ShadowRoot",i,"host")}function Gm(i){return i.styleSheets}function jm(i){return!i||!("shadowRoot"in i)?null:Ye("Element",i,"shadowRoot")}function Ym(i,e){return Ye("Element",i,"querySelector")(e)}function Zm(i,e){return Ye("Element",i,"querySelectorAll")(e)}function rn(){return sn("MutationObserver").constructor}function ke(i,e,t){try{if(!(e in i))return()=>{};const s=i[e],r=t(s);return typeof r=="function"&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__rrweb_original__:{enumerable:!1,value:s}})),i[e]=r,()=>{i[e]=s}}catch(s){return()=>{}}}function Xm(i){const e=i.tagName.toLowerCase(),t=i.id?`#${i.id}`:"",s=i.classList.length?"."+Array.from(i.classList).join("."):"";return`${e}${t}${s}`}function Jm(i){var d;var e,t;const s=(d=(e=i.ownerDocument)==null?void 0:e.defaultView)!=null?d:window,r=i.getBoundingClientRect(),n=s.innerWidth||s.document.documentElement.clientWidth||0,o=s.innerHeight||s.document.documentElement.clientHeight||0,l=r.width>0&&r.height>0&&r.bottom>0&&r.right>0&&r.top<o&&r.left<n,a=(t=s.getComputedStyle)==null?void 0:t.call(s,i),u=!!a&&a.display!=="none"&&a.visibility!=="hidden"&&(parseFloat(a.opacity)||0)>0&&l;let h=0;if(u){const f=Math.max(0,Math.min(r.right,n)-Math.max(r.left,0)),m=Math.max(0,Math.min(r.bottom,o)-Math.max(r.top,0)),y=f*m,p=r.width*r.height;h=p>0?y/p:0}return{isVisible:u,ratio:h}}const k={childNodes:Fm,parentNode:zm,parentElement:Bm,textContent:Wm,contains:Um,getRootNode:Vm,host:Hm,styleSheets:Gm,shadowRoot:jm,querySelector:Ym,querySelectorAll:Zm,mutationObserver:rn,patch:ke,describeNode:Xm,getElementVisibility:Jm};function ne(i,e,t=document){const s={capture:!0,passive:!0};return t.addEventListener(i,e,s),()=>t.removeEventListener(i,e,s)}const st=`Please stop import mirror directly. Instead of that,\r
|
|
69
69
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
70
|
-
or you can use record.mirror to access the mirror instance during recording.`;exports.mirror={map:{},getId(){return console.error(st),-1},getNode(){return console.error(st),null},removeNodeFromMap(){console.error(st)},has(){return console.error(st),!1},reset(){console.error(st)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(exports.mirror=new Proxy(exports.mirror,{get(i,e,t){return e==="map"&&console.error(st),Reflect.get(i,e,t)}}));function gt(i,e,t={}){let s=null,r=0;return function(...n){const o=Date.now();!r&&t.leading===!1&&(r=o);const l=e-(o-r),a=this;l<=0||l>e?(s&&(clearTimeout(s),s=null),r=o,i.apply(a,n)):!s&&t.trailing!==!1&&(s=setTimeout(()=>{r=t.leading===!1?0:Date.now(),s=null,i.apply(a,n)},l))}}function qt(i,e,t,s,r=window){const n=r.Object.getOwnPropertyDescriptor(i,e);return r.Object.defineProperty(i,e,s?t:{set(o){setTimeout(()=>{t.set.call(this,o)},0),n&&n.set&&n.set.call(this,o)}}),()=>qt(i,e,n||{},!0)}function ye(){return Math.round(performance.timeOrigin+performance.now())}function nn(i=window){var e,t,s,r;const n=i.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:i.pageXOffset!==void 0?i.pageXOffset:n.documentElement.scrollLeft||(n==null?void 0:n.body)&&((e=k.parentElement(n.body))==null?void 0:e.scrollLeft)||((t=n==null?void 0:n.body)==null?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:i.pageYOffset!==void 0?i.pageYOffset:(n==null?void 0:n.documentElement.scrollTop)||(n==null?void 0:n.body)&&((s=k.parentElement(n.body))==null?void 0:s.scrollTop)||((r=n==null?void 0:n.body)==null?void 0:r.scrollTop)||0}}function on(i=window){const e=i.document;return i.innerHeight||e.documentElement&&e.documentElement.clientHeight||e.body&&e.body.clientHeight||0}function an(i=window){const e=i.document;return i.innerWidth||e.documentElement&&e.documentElement.clientWidth||e.body&&e.body.clientWidth||0}function hi(i){return i?i.nodeType===i.ELEMENT_NODE?i:k.parentElement(i):null}function le(i,e,t,s){if(!i)return!1;const r=hi(i);if(!r)return!1;try{if(typeof e=="string"){if(r.classList.contains(e)||s&&r.closest("."+e)!==null)return!0}else if(Ps(r,e,s))return!0}catch(n){}return!!(t&&(r.matches(t)||s&&r.closest(t)!==null))}function Gl(i,e){return e.getId(i)!==-1}function Ds(i,e,t){return i.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(i)===Lt}function ln(i,e){if(Ot(i))return!1;const t=e.getId(i);if(!e.has(t))return!0;const s=k.parentNode(i);return s&&s.nodeType===i.DOCUMENT_NODE?!1:s?ln(s,e):!0}function Zs(i){return!!i.changedTouches}function cn(i=window){"NodeList"in i&&!i.NodeList.prototype.forEach&&(i.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in i&&!i.DOMTokenList.prototype.forEach&&(i.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function jl(i){const e={},t=(r,n)=>{const o={value:r,parent:n,children:[]};return e[r.node.id]=o,o},s=[];for(const r of i){const{nextId:n,parentId:o}=r;if(n&&n in e){const l=e[n];if(l.parent){const a=l.parent.children.indexOf(l);l.parent.children.splice(a,0,t(r,l.parent))}else{const a=s.indexOf(l);s.splice(a,0,t(r,null))}continue}if(o in e){const l=e[o];l.children.push(t(r,l));continue}s.push(t(r,null))}return s}function un(i,e){e(i.value);for(let t=i.children.length-1;t>=0;t--)un(i.children[t],e)}function ct(i,e){return!!(i.nodeName==="IFRAME"&&e.getMeta(i))}function hn(i,e){return!!(i.nodeName==="LINK"&&i.nodeType===i.ELEMENT_NODE&&i.getAttribute&&i.getAttribute("rel")==="stylesheet"&&e.getMeta(i))}function dn(i,e){var t,s;const r=(s=(t=i.ownerDocument)==null?void 0:t.defaultView)==null?void 0:s.frameElement;if(!r||r===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};const n=r.getBoundingClientRect(),o=dn(r,e),l=n.height/r.clientHeight;return{x:n.x*o.relativeScale+o.x,y:n.y*o.relativeScale+o.y,relativeScale:l,absoluteScale:o.absoluteScale*l}}function Ue(i){return i?i instanceof Ce&&"shadowRoot"in i?!!i.shadowRoot:!!k.shadowRoot(i):!1}function ot(i,e){const t=i[e[0]];return e.length===1?t:ot(t.cssRules[e[1]].cssRules,e.slice(2))}function Sr(i){const e=[...i],t=e.pop();return{positions:e,index:t}}function Yl(i){const e=new Set,t=[];for(let s=i.length;s--;){const r=i[s];e.has(r.id)||(t.push(r),e.add(r.id))}return t}class fn{constructor(){b(this,"id",1),b(this,"styleIDMap",new WeakMap),b(this,"idStyleMap",new Map)}getId(e){var t;return(t=this.styleIDMap.get(e))!=null?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let s;return t===void 0?s=this.id++:s=t,this.styleIDMap.set(e,s),this.idStyleMap.set(s,e),s}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 pn(i){var e;let t=null;return"getRootNode"in i&&((e=k.getRootNode(i))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&k.host(k.getRootNode(i))&&(t=k.host(k.getRootNode(i))),t}function Zl(i){let e=i,t;for(;t=pn(e);)e=t;return e}function Xl(i){const e=i.ownerDocument;if(!e)return!1;const t=Zl(i);return k.contains(e,t)}function mn(i){const e=i.ownerDocument;return e?k.contains(e,i)||Xl(i):!1}const qm=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:fn,get _mirror(){return exports.mirror},closestElementOfNode:hi,getBaseDimension:dn,getNestedRule:ot,getPositionsAndIndex:Sr,getRootShadowHost:Zl,getShadowHost:pn,getWindowHeight:on,getWindowScroll:nn,getWindowWidth:an,hasShadowRoot:Ue,hookSetter:qt,inDom:mn,isAncestorRemoved:ln,isBlocked:le,isIgnored:Ds,isSerialized:Gl,isSerializedIframe:ct,isSerializedStylesheet:hn,iterateResolveTree:un,legacy_isTouchEvent:Zs,nowTimestamp:ye,on:ne,polyfill:cn,queueToResolveTrees:jl,shadowHostInDom:Xl,throttle:gt,uniqueTextMutations:Yl},Symbol.toStringTag,{value:"Module"}));var I=(i=>(i[i.DomContentLoaded=0]="DomContentLoaded",i[i.Load=1]="Load",i[i.FullSnapshot=2]="FullSnapshot",i[i.IncrementalSnapshot=3]="IncrementalSnapshot",i[i.Meta=4]="Meta",i[i.Custom=5]="Custom",i[i.Plugin=6]="Plugin",i))(I||{}),E=(i=>(i[i.Mutation=0]="Mutation",i[i.MouseMove=1]="MouseMove",i[i.MouseInteraction=2]="MouseInteraction",i[i.Scroll=3]="Scroll",i[i.ViewportResize=4]="ViewportResize",i[i.Input=5]="Input",i[i.TouchMove=6]="TouchMove",i[i.MediaInteraction=7]="MediaInteraction",i[i.StyleSheetRule=8]="StyleSheetRule",i[i.CanvasMutation=9]="CanvasMutation",i[i.Font=10]="Font",i[i.Log=11]="Log",i[i.Drag=12]="Drag",i[i.StyleDeclaration=13]="StyleDeclaration",i[i.Selection=14]="Selection",i[i.AdoptedStyleSheet=15]="AdoptedStyleSheet",i[i.CustomElement=16]="CustomElement",i[i.Visibility=17]="Visibility",i))(E||{}),H=(i=>(i[i.MouseUp=0]="MouseUp",i[i.MouseDown=1]="MouseDown",i[i.Click=2]="Click",i[i.ContextMenu=3]="ContextMenu",i[i.DblClick=4]="DblClick",i[i.Focus=5]="Focus",i[i.Blur=6]="Blur",i[i.TouchStart=7]="TouchStart",i[i.TouchMove_Departed=8]="TouchMove_Departed",i[i.TouchEnd=9]="TouchEnd",i[i.TouchCancel=10]="TouchCancel",i))(H||{}),Te=(i=>(i[i.Mouse=0]="Mouse",i[i.Pen=1]="Pen",i[i.Touch=2]="Touch",i))(Te||{}),_e=(i=>(i[i["2D"]=0]="2D",i[i.WebGL=1]="WebGL",i[i.WebGL2=2]="WebGL2",i))(_e||{}),Be=(i=>(i[i.Play=0]="Play",i[i.Pause=1]="Pause",i[i.Seeked=2]="Seeked",i[i.VolumeChange=3]="VolumeChange",i[i.RateChange=4]="RateChange",i))(Be||{}),V=(i=>(i.Start="start",i.Pause="pause",i.Resume="resume",i.Resize="resize",i.Finish="finish",i.FullsnapshotRebuilded="fullsnapshot-rebuilded",i.LoadStylesheetStart="load-stylesheet-start",i.LoadStylesheetEnd="load-stylesheet-end",i.SkipStart="skip-start",i.SkipEnd="skip-end",i.MouseInteraction="mouse-interaction",i.EventCast="event-cast",i.CustomEvent="custom-event",i.Flush="flush",i.StateChange="state-change",i.PlayBack="play-back",i.Destroy="destroy",i))(V||{}),Oe=(i=>(i[i.Document=0]="Document",i[i.DocumentType=1]="DocumentType",i[i.Element=2]="Element",i[i.Text=3]="Text",i[i.CDATA=4]="CDATA",i[i.Comment=5]="Comment",i))(Oe||{});const xs={ANCHOR:.4,PATH:.3,TARGET:.2,UNIQUENESS:.1},Me={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},Km={MIN_CONFIDENCE_FOR_SKIP:.7},Ro=["form","main","nav","section","article","footer","header"],To=["form","navigation","main","region","contentinfo","complementary","banner","search"],Qm=["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"],Ve={"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},Jl=new Set(["id","class","style","xmlns","tabindex","contenteditable"]),eg={maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:0,fallbackToBody:!0,includeUtilityClasses:!1,source:"dom-dsl"};function Gt(i){if(/^[a-z]+-\d+$/i.test(i)||/^[a-z]+(-[a-z]+)+-\d+$/i.test(i)||/^[a-z]+(_[a-z]+)*_\d+$/i.test(i)||/^\d+$/.test(i)||/^:[a-z0-9]+:$/i.test(i)||/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i.test(i))return!0;if(/^[a-z]{1,3}[A-Za-z0-9]{8,}$/.test(i)){const e=/\d/.test(i),t=/[A-Z]/.test(i),s=i.length>=20;if(e&&t||s)return!0}return!!(/^radix-/.test(i)||/^mui-\d+$/.test(i))}const ql=new Set(["aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-activedescendant","for","form","list","headers","aria-details","aria-errormessage","aria-flowto"]);function Kl(i){return i.trim().split(/\s+/).some(e=>Gt(e))}class tg{constructor(e,t){var s;this.maxDepth=(s=e.maxPathDepth)!=null?s: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(),s=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=s==null?void 0:s.documentElement;if(a){const c={element:a,score:1,tier:"A",depth:0};return this.cacheResult(e,c),c}}if(t==="body"){const a=s==null?void 0:s.documentElement;if(a){const c={element:a,score:1,tier:"A",depth:0};return this.cacheResult(e,c),c}}let r=e.parentElement,n=0,o=null;for(;r&&n<this.maxDepth;){if(r.tagName.toLowerCase()==="body")return o||{element:r,score:Me.DEGRADED_SCORE,tier:"C",depth:n};const a=this.scoreAnchor(r);if(a>0){const c=this.applyDepthPenalty(a,n),u=this.getTier(r),h={element:r,score:c,tier:u,depth:n};if(u==="A")return h;(!o||c>o.score)&&(o=h)}r=r.parentElement,n++}const l=o;return this.cache&&this.cache.setAnchor(e,l),l}scoreAnchor(e){let t=0;const s=e.tagName.toLowerCase();Ro.includes(s)&&(t+=Me.SEMANTIC_TAG);const r=e.getAttribute("role");r&&To.includes(r)&&(t+=Me.ROLE),(e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby"))&&(t+=Me.ARIA_LABEL);const n=e.id;return n&&!Gt(n)&&(t+=Me.STABLE_ID),(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))&&(t+=Me.TEST_MARKER),Math.min(t,1)}applyDepthPenalty(e,t){if(t<=Me.DEPTH_PENALTY_THRESHOLD)return e;const s=(t-Me.DEPTH_PENALTY_THRESHOLD)*Me.DEPTH_PENALTY_FACTOR;return Math.max(0,e-s)}getTier(e){const t=e.tagName.toLowerCase();if(Ro.includes(t))return"A";const s=e.getAttribute("role");return s&&To.includes(s)?"B":"C"}isInsideHead(e){let t=e.parentElement;for(;t;){const s=t.tagName.toLowerCase();if(s==="head")return!0;if(s==="body")return!1;t=t.parentElement}return!1}cacheResult(e,t){this.cache&&this.cache.setAnchor(e,t)}}const sg=[/^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,}/],ig=[/^\[/,/^(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 gn(i){return sg.some(e=>e.test(i))}function yn(i){return i.length<=2||/^\d/.test(i)?!0:ig.some(e=>e.test(i))}function rg(i){return!gn(i)&&!yn(i)}function ng(i){return i.filter(e=>rg(e))}function og(i){const e=[],t=[];for(const s of i)yn(s)||gn(s)?t.push(s):e.push(s);return{semantic:e,utility:t}}function Oo(i){return yn(i)||gn(i)}const Do=i=>i.replace(/([#:.[\]@])/g,"\\$1");class ag{constructor(e,t){var s;this.maxDepth=(s=e.maxPathDepth)!=null?s:10,this.cache=t}buildPath(e,t,s){const r=e.tagName.toLowerCase(),n=t.tagName.toLowerCase();if(r==="html"&&(n==="head"||n==="body"))return{path:[],degraded:!1};if(r==="html"&&this.isInsideHead(t))return this.buildHeadPath(e,t,s);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,s),{path:c.map(u=>{const h=u.parentElement;let d;if(h){const f=Array.from(h.children).indexOf(u);f!==-1&&(d=f+1)}return{tag:u.tagName.toLowerCase(),semantics:s.extract(u),score:s.scoreElement(u),nthChild:d}}),degraded:a,degradationReason:a?"path-depth-overflow":void 0}}buildPathNodes(e,t,s){return this.buildPath(e,t,s).path}ensureUniqueness(e,t,s,r,n){const o=this.buildTestSelector(s,t,r);try{const l=r.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)<Km.MIN_CONFIDENCE_FOR_SKIP)continue;const h=this.insertNodeInOrder(t,u,e),d=this.buildTestSelector(s,h,r);try{let f;if(this.cache){const m=this.cache.getSelectorResults(d);m!==void 0?f=m:(f=Array.from(l.querySelectorAll(d)),this.cache.setSelectorResults(d,f))}else f=l.querySelectorAll(d);if(f.length===1)return h;f.length<a.length&&(t=h)}catch(f){}}return t}catch(l){return t}}insertNodeInOrder(e,t,s){const r=s.indexOf(t),n=[...e];let o=0;for(let l=0;l<n.length&&!(s.indexOf(n[l])>r);l++)o=l+1;return n.splice(o,0,t),n}buildTestSelector(e,t,s){const r=[];r.push(this.elementToSelector(e));for(const n of t)r.push(this.elementToSelector(n));return r.push(this.elementToSelector(s)),r.join(" ")}elementToSelector(e){let t=e.tagName.toLowerCase();e.id&&!Gt(e.id)&&(t+=`#${Do(e.id)}`);for(const s of Array.from(e.classList))Oo(s)||(t+=`.${Do(s)}`);return t}filterNoise(e){return e.filter(t=>this.shouldInclude(t))}shouldInclude(e){const t=e.tagName.toLowerCase();return Qm.includes(t)?!0:t==="div"||t==="span"?this.hasSemanticFeatures(e):!1}hasSemanticFeatures(e){if(e.hasAttribute("role"))return!0;for(const s of Array.from(e.attributes))if(s.name.startsWith("aria-"))return!0;if(e.classList.length>0){for(const s of Array.from(e.classList))if(!Oo(s))return!0}if(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))return!0;const t=e.id;return!!(t&&!Gt(t))}isInsideHead(e){let t=e.parentElement;for(;t;){const s=t.tagName.toLowerCase();if(s==="head")return!0;if(s==="body")return!1;t=t.parentElement}return!1}buildHeadPath(e,t,s){const r=[];let n=t.parentElement;for(;n&&n!==e;)r.unshift(n),n=n.parentElement;return n!==e?{path:[],degraded:!0,degradationReason:"target-not-descendant-of-html"}:r.findIndex(o=>o.tagName.toLowerCase()==="head")===-1?{path:[],degraded:!0,degradationReason:"head-not-found-in-path"}:{path:r.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:s.extract(o),score:s.scoreElement(o),nthChild:a}}),degraded:!1}}}function lg(i){return i?i.trim().replace(/[\n\t\r]/g," ").replace(/\s+/g," "):""}const cg={preserveQueryForAbsolute:!0,removeDynamicHashes:!0};function ug(i){return i?[/\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(i)):!1}function hg(i,e){if(!i)return i;const t=i.startsWith("http://")||i.startsWith("https://"),[s,r]=i.split("#"),[n,o]=s.split("?");let l=n;return t&&e.preserveQueryForAbsolute&&o&&(l+=`?${o}`),r&&(e.removeDynamicHashes&&ug(r)||(l+=`#${r}`)),l}function Ql(i,e,t={}){if(!e)return e;const s=M(M({},cg),t);return i==="href"||i==="src"?hg(e,s):e}const dg=["role","aria-label","aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-level","aria-posinset","aria-setsize","aria-haspopup"],fg=["aria-selected","aria-checked","aria-pressed","aria-expanded","aria-hidden","aria-disabled","aria-current","aria-busy","aria-invalid","aria-grabbed","aria-live","aria-atomic"],pg=["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"],mg=["data-radix-","data-headlessui-","data-reach-","data-mui-","data-chakra-","data-mantine-","data-tw-"],gg=["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"],yg=["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"],bg=["data-category","data-action","data-label","data-value"],wg=["id","name","type","placeholder","title","for","alt","href"],vg=["disabled","checked","selected","hidden","readonly","required","value"],Sg=[/^radix-/,/^headlessui-/,/^mui-/,/:\w+:/];function Cg(i,e){return dg.includes(i)?!0:fg.includes(i)||pg.includes(i)||mg.some(t=>i.startsWith(t))?!1:gg.includes(i)?!0:yg.some(t=>i.startsWith(t))||bg.includes(i)?!1:i.startsWith("data-")&&i.endsWith("-id")?!0:i==="id"?!Sg.some(t=>t.test(e)):wg.includes(i)?!0:vg.includes(i)?!1:!!i.startsWith("data-")}class $o{constructor(e,t){var s;this.includeUtilityClasses=(s=e.includeUtilityClasses)!=null?s:!1,this.cache=t}extract(e){if(this.cache){const o=this.cache.getSemantics(e);if(o!==void 0)return o}const t={},s=e.id;if(s&&!Gt(s)&&(t.id=s),e.classList.length>0){const o=Array.from(e.classList);if(this.includeUtilityClasses)t.classes=o;else{const{semantic:l}=og(o);l.length>0&&(t.classes=l)}}const r=this.extractAttributes(e);Object.keys(r).length>0&&(t.attributes=r);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 s=this.extract(e);return s.id&&(t+=.15),s.classes&&s.classes.length>0&&(t+=.1),s.attributes&&Object.keys(s.attributes).length>0&&(t+=.1),s.role&&(t+=.1),s.text&&(t+=.05),Math.min(t,1)}shouldIgnoreAttribute(e){return!!(Jl.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 Ve[e]!==void 0?Ve[e]:e.startsWith("data-")?Ve["data-*"]:e.startsWith("aria-")?Ve["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 s of Array.from(e.attributes)){const r=s.name;if(this.shouldIgnoreAttribute(r)||!Cg(r,s.value)||ql.has(r)&&Kl(s.value)||this.getAttributePriority(r)===0)continue;const n=r==="href"||r==="src"?Ql(r,s.value):s.value;!n||n.trim()===""||this.isDynamicValue(n)||(t[r]=n)}return t}extractText(e){const t=this.getDirectTextContent(e);if(!t)return null;const s=lg(t);if(!s)return null;const r=100,n=t.length>r?t.slice(0,r)+"...":t,o=s.length>r?s.slice(0,r)+"...":s;return{raw:n,normalized:o}}getDirectTextContent(e){var s;const t=[];for(const r of Array.from(e.childNodes))if(r.nodeType===Node.TEXT_NODE&&r.textContent){const n=r.textContent.trim();n&&t.push(n)}return t.length>0?t.join(" "):(s=e.textContent)!=null?s: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 xg{fingerprint(e){const t=e.tagName.toLowerCase(),s=this.getShape(t),r={shape:s,hasAnimation:this.hasAnimation(e)};if(s==="path"){const l=e.getAttribute("d");l&&(r.dHash=this.computePathHash(l))}else["circle","rect","ellipse","line"].includes(s)&&(r.geomHash=this.computeGeomHash(e,s));const n=e.getAttribute("role");n&&(r.role=n);const o=e.querySelector("title");return o!=null&&o.textContent&&(r.titleText=o.textContent.trim()),r}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(s=>s===e))!=null?t:"path"}normalizePathData(e){var t;return((t=e.match(/[MLHVCSQTAZ][^MLHVCSQTAZ]*/gi))!=null?t:[]).slice(0,5).map(s=>s.trim().replace(/(-?\d+\.?\d*)/g,r=>parseFloat(r).toFixed(1))).join(" ")}computeGeomHash(e,t){var r,n,o,l,a,c,u,h,d;const s=[];switch(t){case"circle":s.push(`r=${(r=e.getAttribute("r"))!=null?r:"0"}`);break;case"rect":{const f=parseFloat((n=e.getAttribute("width"))!=null?n:"0"),m=parseFloat((o=e.getAttribute("height"))!=null?o:"0");f>0&&m>0&&s.push(`ratio=${(f/m).toFixed(2)}`)}break;case"ellipse":{const f=parseFloat((l=e.getAttribute("rx"))!=null?l:"0"),m=parseFloat((a=e.getAttribute("ry"))!=null?a:"0");f>0&&m>0&&s.push(`ratio=${(f/m).toFixed(2)}`)}break;case"line":{const f=parseFloat((c=e.getAttribute("x1"))!=null?c:"0"),m=parseFloat((u=e.getAttribute("y1"))!=null?u:"0"),y=parseFloat((h=e.getAttribute("x2"))!=null?h:"0"),p=parseFloat((d=e.getAttribute("y2"))!=null?d:"0"),g=Math.atan2(p-m,y-f);s.push(`angle=${g.toFixed(2)}`)}break}return this.simpleHash(s.join(";"))}hasAnimation(e){if(e.querySelector("animate, animateTransform, animateMotion"))return!0;const t=e.ownerDocument;if(t!=null&&t.defaultView)try{const s=t.defaultView.getComputedStyle(e);if(s.animationName!=="none"||s.transitionProperty!=="all"&&s.transitionProperty!=="none")return!0}catch(s){}return!1}simpleHash(e){let t=0;for(let s=0;s<e.length;s++){const r=e.charCodeAt(s);t=(t<<5)-t+r,t=t&t}return Math.abs(t).toString(16).padStart(8,"0")}}function Eg(i,e=0){const t=i.anchor.score,s=i.path.length>0?i.path.reduce((l,a)=>l+a.score,0)/i.path.length:.5,r=i.target.score,n=t*xs.ANCHOR+s*xs.PATH+r*xs.TARGET+e*xs.UNIQUENESS,o=i.anchor.degraded?.2:0;return Math.max(0,Math.min(1,n-o))}class Ag{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 s=this.cache.keys().next().value;s!==void 0&&this.cache.delete(s)}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 Mg{constructor(e={}){var t,s;this.eidCache=new WeakMap,this.selectorResultCache=new Ag((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:(s=e.maxSelectorCacheSize)!=null?s: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 re(M({},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,s=e+t;return s>0?e/s:0}}function Ig(i){return new Mg(i)}let ki=null;function Ng(){return ki||(ki=Ig()),ki}function ko(i){if(i.ownerDocument)return i.ownerDocument;let e=i;for(;e;){if(e.nodeType===9)return e;e=e.parentNode}throw new Error(`Element does not have an ownerDocument. This typically means:
|
|
70
|
+
or you can use record.mirror to access the mirror instance during recording.`;exports.mirror={map:{},getId(){return console.error(st),-1},getNode(){return console.error(st),null},removeNodeFromMap(){console.error(st)},has(){return console.error(st),!1},reset(){console.error(st)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(exports.mirror=new Proxy(exports.mirror,{get(i,e,t){return e==="map"&&console.error(st),Reflect.get(i,e,t)}}));function gt(i,e,t={}){let s=null,r=0;return function(...n){const o=Date.now();!r&&t.leading===!1&&(r=o);const l=e-(o-r),a=this;l<=0||l>e?(s&&(clearTimeout(s),s=null),r=o,i.apply(a,n)):!s&&t.trailing!==!1&&(s=setTimeout(()=>{r=t.leading===!1?0:Date.now(),s=null,i.apply(a,n)},l))}}function qt(i,e,t,s,r=window){const n=r.Object.getOwnPropertyDescriptor(i,e);return r.Object.defineProperty(i,e,s?t:{set(o){setTimeout(()=>{t.set.call(this,o)},0),n&&n.set&&n.set.call(this,o)}}),()=>qt(i,e,n||{},!0)}function ye(){return Math.round(performance.timeOrigin+performance.now())}function nn(i=window){var e,t,s,r;const n=i.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:i.pageXOffset!==void 0?i.pageXOffset:n.documentElement.scrollLeft||(n==null?void 0:n.body)&&((e=k.parentElement(n.body))==null?void 0:e.scrollLeft)||((t=n==null?void 0:n.body)==null?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:i.pageYOffset!==void 0?i.pageYOffset:(n==null?void 0:n.documentElement.scrollTop)||(n==null?void 0:n.body)&&((s=k.parentElement(n.body))==null?void 0:s.scrollTop)||((r=n==null?void 0:n.body)==null?void 0:r.scrollTop)||0}}function on(i=window){const e=i.document;return i.innerHeight||e.documentElement&&e.documentElement.clientHeight||e.body&&e.body.clientHeight||0}function an(i=window){const e=i.document;return i.innerWidth||e.documentElement&&e.documentElement.clientWidth||e.body&&e.body.clientWidth||0}function hi(i){return i?i.nodeType===i.ELEMENT_NODE?i:k.parentElement(i):null}function le(i,e,t,s){if(!i)return!1;const r=hi(i);if(!r)return!1;try{if(typeof e=="string"){if(r.classList.contains(e)||s&&r.closest("."+e)!==null)return!0}else if(Ps(r,e,s))return!0}catch(n){}return!!(t&&(r.matches(t)||s&&r.closest(t)!==null))}function Gl(i,e){return e.getId(i)!==-1}function Ds(i,e,t){return i.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(i)===Lt}function ln(i,e){if(Ot(i))return!1;const t=e.getId(i);if(!e.has(t))return!0;const s=k.parentNode(i);return s&&s.nodeType===i.DOCUMENT_NODE?!1:s?ln(s,e):!0}function Zs(i){return!!i.changedTouches}function cn(i=window){"NodeList"in i&&!i.NodeList.prototype.forEach&&(i.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in i&&!i.DOMTokenList.prototype.forEach&&(i.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function jl(i){const e={},t=(r,n)=>{const o={value:r,parent:n,children:[]};return e[r.node.id]=o,o},s=[];for(const r of i){const{nextId:n,parentId:o}=r;if(n&&n in e){const l=e[n];if(l.parent){const a=l.parent.children.indexOf(l);l.parent.children.splice(a,0,t(r,l.parent))}else{const a=s.indexOf(l);s.splice(a,0,t(r,null))}continue}if(o in e){const l=e[o];l.children.push(t(r,l));continue}s.push(t(r,null))}return s}function un(i,e){e(i.value);for(let t=i.children.length-1;t>=0;t--)un(i.children[t],e)}function ct(i,e){return!!(i.nodeName==="IFRAME"&&e.getMeta(i))}function hn(i,e){return!!(i.nodeName==="LINK"&&i.nodeType===i.ELEMENT_NODE&&i.getAttribute&&i.getAttribute("rel")==="stylesheet"&&e.getMeta(i))}function dn(i,e){var t,s;const r=(s=(t=i.ownerDocument)==null?void 0:t.defaultView)==null?void 0:s.frameElement;if(!r||r===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};const n=r.getBoundingClientRect(),o=dn(r,e),l=n.height/r.clientHeight;return{x:n.x*o.relativeScale+o.x,y:n.y*o.relativeScale+o.y,relativeScale:l,absoluteScale:o.absoluteScale*l}}function Ue(i){return i?i instanceof Ce&&"shadowRoot"in i?!!i.shadowRoot:!!k.shadowRoot(i):!1}function ot(i,e){const t=i[e[0]];return e.length===1?t:ot(t.cssRules[e[1]].cssRules,e.slice(2))}function Sr(i){const e=[...i],t=e.pop();return{positions:e,index:t}}function Yl(i){const e=new Set,t=[];for(let s=i.length;s--;){const r=i[s];e.has(r.id)||(t.push(r),e.add(r.id))}return t}class fn{constructor(){b(this,"id",1),b(this,"styleIDMap",new WeakMap),b(this,"idStyleMap",new Map)}getId(e){var t;return(t=this.styleIDMap.get(e))!=null?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let s;return t===void 0?s=this.id++:s=t,this.styleIDMap.set(e,s),this.idStyleMap.set(s,e),s}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 pn(i){var e;let t=null;return"getRootNode"in i&&((e=k.getRootNode(i))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&k.host(k.getRootNode(i))&&(t=k.host(k.getRootNode(i))),t}function Zl(i){let e=i,t;for(;t=pn(e);)e=t;return e}function Xl(i){const e=i.ownerDocument;if(!e)return!1;const t=Zl(i);return k.contains(e,t)}function mn(i){const e=i.ownerDocument;return e?k.contains(e,i)||Xl(i):!1}const qm=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:fn,get _mirror(){return exports.mirror},closestElementOfNode:hi,getBaseDimension:dn,getNestedRule:ot,getPositionsAndIndex:Sr,getRootShadowHost:Zl,getShadowHost:pn,getWindowHeight:on,getWindowScroll:nn,getWindowWidth:an,hasShadowRoot:Ue,hookSetter:qt,inDom:mn,isAncestorRemoved:ln,isBlocked:le,isIgnored:Ds,isSerialized:Gl,isSerializedIframe:ct,isSerializedStylesheet:hn,iterateResolveTree:un,legacy_isTouchEvent:Zs,nowTimestamp:ye,on:ne,polyfill:cn,queueToResolveTrees:jl,shadowHostInDom:Xl,throttle:gt,uniqueTextMutations:Yl},Symbol.toStringTag,{value:"Module"}));var I=(i=>(i[i.DomContentLoaded=0]="DomContentLoaded",i[i.Load=1]="Load",i[i.FullSnapshot=2]="FullSnapshot",i[i.IncrementalSnapshot=3]="IncrementalSnapshot",i[i.Meta=4]="Meta",i[i.Custom=5]="Custom",i[i.Plugin=6]="Plugin",i))(I||{}),E=(i=>(i[i.Mutation=0]="Mutation",i[i.MouseMove=1]="MouseMove",i[i.MouseInteraction=2]="MouseInteraction",i[i.Scroll=3]="Scroll",i[i.ViewportResize=4]="ViewportResize",i[i.Input=5]="Input",i[i.TouchMove=6]="TouchMove",i[i.MediaInteraction=7]="MediaInteraction",i[i.StyleSheetRule=8]="StyleSheetRule",i[i.CanvasMutation=9]="CanvasMutation",i[i.Font=10]="Font",i[i.Log=11]="Log",i[i.Drag=12]="Drag",i[i.StyleDeclaration=13]="StyleDeclaration",i[i.Selection=14]="Selection",i[i.AdoptedStyleSheet=15]="AdoptedStyleSheet",i[i.CustomElement=16]="CustomElement",i[i.Visibility=17]="Visibility",i))(E||{}),H=(i=>(i[i.MouseUp=0]="MouseUp",i[i.MouseDown=1]="MouseDown",i[i.Click=2]="Click",i[i.ContextMenu=3]="ContextMenu",i[i.DblClick=4]="DblClick",i[i.Focus=5]="Focus",i[i.Blur=6]="Blur",i[i.TouchStart=7]="TouchStart",i[i.TouchMove_Departed=8]="TouchMove_Departed",i[i.TouchEnd=9]="TouchEnd",i[i.TouchCancel=10]="TouchCancel",i))(H||{}),Te=(i=>(i[i.Mouse=0]="Mouse",i[i.Pen=1]="Pen",i[i.Touch=2]="Touch",i))(Te||{}),_e=(i=>(i[i["2D"]=0]="2D",i[i.WebGL=1]="WebGL",i[i.WebGL2=2]="WebGL2",i))(_e||{}),Be=(i=>(i[i.Play=0]="Play",i[i.Pause=1]="Pause",i[i.Seeked=2]="Seeked",i[i.VolumeChange=3]="VolumeChange",i[i.RateChange=4]="RateChange",i))(Be||{}),V=(i=>(i.Start="start",i.Pause="pause",i.Resume="resume",i.Resize="resize",i.Finish="finish",i.FullsnapshotRebuilded="fullsnapshot-rebuilded",i.LoadStylesheetStart="load-stylesheet-start",i.LoadStylesheetEnd="load-stylesheet-end",i.SkipStart="skip-start",i.SkipEnd="skip-end",i.MouseInteraction="mouse-interaction",i.EventCast="event-cast",i.CustomEvent="custom-event",i.Flush="flush",i.StateChange="state-change",i.PlayBack="play-back",i.Destroy="destroy",i))(V||{}),Oe=(i=>(i[i.Document=0]="Document",i[i.DocumentType=1]="DocumentType",i[i.Element=2]="Element",i[i.Text=3]="Text",i[i.CDATA=4]="CDATA",i[i.Comment=5]="Comment",i))(Oe||{});const xs={ANCHOR:.4,PATH:.3,TARGET:.2,UNIQUENESS:.1},Ae={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},Km={MIN_CONFIDENCE_FOR_SKIP:.7},Ro=["form","main","nav","section","article","footer","header"],To=["form","navigation","main","region","contentinfo","complementary","banner","search"],Qm=["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"],Ve={"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},Jl=new Set(["id","class","style","xmlns","tabindex","contenteditable"]),eg={maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:0,fallbackToBody:!0,includeUtilityClasses:!1,source:"dom-dsl"};function Gt(i){if(/^[a-z]+-\d+$/i.test(i)||/^[a-z]+(-[a-z]+)+-\d+$/i.test(i)||/^[a-z]+(_[a-z]+)*_\d+$/i.test(i)||/^\d+$/.test(i)||/^:[a-z0-9]+:$/i.test(i)||/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i.test(i))return!0;if(/^[a-z]{1,3}[A-Za-z0-9]{8,}$/.test(i)){const e=/\d/.test(i),t=/[A-Z]/.test(i),s=i.length>=20;if(e&&t||s)return!0}return!!(/^radix-/.test(i)||/^mui-\d+$/.test(i))}const ql=new Set(["aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-activedescendant","for","form","list","headers","aria-details","aria-errormessage","aria-flowto"]);function Kl(i){return i.trim().split(/\s+/).some(e=>Gt(e))}class tg{constructor(e,t){var s;this.maxDepth=(s=e.maxPathDepth)!=null?s: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(),s=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=s==null?void 0:s.documentElement;if(a){const c={element:a,score:1,tier:"A",depth:0};return this.cacheResult(e,c),c}}if(t==="body"){const a=s==null?void 0:s.documentElement;if(a){const c={element:a,score:1,tier:"A",depth:0};return this.cacheResult(e,c),c}}let r=e.parentElement,n=0,o=null;for(;r&&n<this.maxDepth;){if(r.tagName.toLowerCase()==="body")return o||{element:r,score:Ae.DEGRADED_SCORE,tier:"C",depth:n};const a=this.scoreAnchor(r);if(a>0){const c=this.applyDepthPenalty(a,n),u=this.getTier(r),h={element:r,score:c,tier:u,depth:n};if(u==="A")return h;(!o||c>o.score)&&(o=h)}r=r.parentElement,n++}const l=o;return this.cache&&this.cache.setAnchor(e,l),l}scoreAnchor(e){let t=0;const s=e.tagName.toLowerCase();Ro.includes(s)&&(t+=Ae.SEMANTIC_TAG);const r=e.getAttribute("role");r&&To.includes(r)&&(t+=Ae.ROLE),(e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby"))&&(t+=Ae.ARIA_LABEL);const n=e.id;return n&&!Gt(n)&&(t+=Ae.STABLE_ID),(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))&&(t+=Ae.TEST_MARKER),Math.min(t,1)}applyDepthPenalty(e,t){if(t<=Ae.DEPTH_PENALTY_THRESHOLD)return e;const s=(t-Ae.DEPTH_PENALTY_THRESHOLD)*Ae.DEPTH_PENALTY_FACTOR;return Math.max(0,e-s)}getTier(e){const t=e.tagName.toLowerCase();if(Ro.includes(t))return"A";const s=e.getAttribute("role");return s&&To.includes(s)?"B":"C"}isInsideHead(e){let t=e.parentElement;for(;t;){const s=t.tagName.toLowerCase();if(s==="head")return!0;if(s==="body")return!1;t=t.parentElement}return!1}cacheResult(e,t){this.cache&&this.cache.setAnchor(e,t)}}const sg=[/^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,}/],ig=[/^\[/,/^(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 gn(i){return sg.some(e=>e.test(i))}function yn(i){return i.length<=2||/^\d/.test(i)?!0:ig.some(e=>e.test(i))}function rg(i){return!gn(i)&&!yn(i)}function ng(i){return i.filter(e=>rg(e))}function og(i){const e=[],t=[];for(const s of i)yn(s)||gn(s)?t.push(s):e.push(s);return{semantic:e,utility:t}}function Oo(i){return yn(i)||gn(i)}const Do=i=>i.replace(/([#:.[\]@])/g,"\\$1");class ag{constructor(e,t){var s;this.maxDepth=(s=e.maxPathDepth)!=null?s:10,this.cache=t}buildPath(e,t,s){const r=e.tagName.toLowerCase(),n=t.tagName.toLowerCase();if(r==="html"&&(n==="head"||n==="body"))return{path:[],degraded:!1};if(r==="html"&&this.isInsideHead(t))return this.buildHeadPath(e,t,s);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,s),{path:c.map(u=>{const h=u.parentElement;let d;if(h){const f=Array.from(h.children).indexOf(u);f!==-1&&(d=f+1)}return{tag:u.tagName.toLowerCase(),semantics:s.extract(u),score:s.scoreElement(u),nthChild:d}}),degraded:a,degradationReason:a?"path-depth-overflow":void 0}}buildPathNodes(e,t,s){return this.buildPath(e,t,s).path}ensureUniqueness(e,t,s,r,n){const o=this.buildTestSelector(s,t,r);try{const l=r.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)<Km.MIN_CONFIDENCE_FOR_SKIP)continue;const h=this.insertNodeInOrder(t,u,e),d=this.buildTestSelector(s,h,r);try{let f;if(this.cache){const m=this.cache.getSelectorResults(d);m!==void 0?f=m:(f=Array.from(l.querySelectorAll(d)),this.cache.setSelectorResults(d,f))}else f=l.querySelectorAll(d);if(f.length===1)return h;f.length<a.length&&(t=h)}catch(f){}}return t}catch(l){return t}}insertNodeInOrder(e,t,s){const r=s.indexOf(t),n=[...e];let o=0;for(let l=0;l<n.length&&!(s.indexOf(n[l])>r);l++)o=l+1;return n.splice(o,0,t),n}buildTestSelector(e,t,s){const r=[];r.push(this.elementToSelector(e));for(const n of t)r.push(this.elementToSelector(n));return r.push(this.elementToSelector(s)),r.join(" ")}elementToSelector(e){let t=e.tagName.toLowerCase();e.id&&!Gt(e.id)&&(t+=`#${Do(e.id)}`);for(const s of Array.from(e.classList))Oo(s)||(t+=`.${Do(s)}`);return t}filterNoise(e){return e.filter(t=>this.shouldInclude(t))}shouldInclude(e){const t=e.tagName.toLowerCase();return Qm.includes(t)?!0:t==="div"||t==="span"?this.hasSemanticFeatures(e):!1}hasSemanticFeatures(e){if(e.hasAttribute("role"))return!0;for(const s of Array.from(e.attributes))if(s.name.startsWith("aria-"))return!0;if(e.classList.length>0){for(const s of Array.from(e.classList))if(!Oo(s))return!0}if(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))return!0;const t=e.id;return!!(t&&!Gt(t))}isInsideHead(e){let t=e.parentElement;for(;t;){const s=t.tagName.toLowerCase();if(s==="head")return!0;if(s==="body")return!1;t=t.parentElement}return!1}buildHeadPath(e,t,s){const r=[];let n=t.parentElement;for(;n&&n!==e;)r.unshift(n),n=n.parentElement;return n!==e?{path:[],degraded:!0,degradationReason:"target-not-descendant-of-html"}:r.findIndex(o=>o.tagName.toLowerCase()==="head")===-1?{path:[],degraded:!0,degradationReason:"head-not-found-in-path"}:{path:r.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:s.extract(o),score:s.scoreElement(o),nthChild:a}}),degraded:!1}}}function lg(i){return i?i.trim().replace(/[\n\t\r]/g," ").replace(/\s+/g," "):""}const cg={preserveQueryForAbsolute:!0,removeDynamicHashes:!0};function ug(i){return i?[/\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(i)):!1}function hg(i,e){if(!i)return i;const t=i.startsWith("http://")||i.startsWith("https://"),[s,r]=i.split("#"),[n,o]=s.split("?");let l=n;return t&&e.preserveQueryForAbsolute&&o&&(l+=`?${o}`),r&&(e.removeDynamicHashes&&ug(r)||(l+=`#${r}`)),l}function Ql(i,e,t={}){if(!e)return e;const s=A(A({},cg),t);return i==="href"||i==="src"?hg(e,s):e}const dg=["role","aria-label","aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-level","aria-posinset","aria-setsize","aria-haspopup"],fg=["aria-selected","aria-checked","aria-pressed","aria-expanded","aria-hidden","aria-disabled","aria-current","aria-busy","aria-invalid","aria-grabbed","aria-live","aria-atomic"],pg=["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"],mg=["data-radix-","data-headlessui-","data-reach-","data-mui-","data-chakra-","data-mantine-","data-tw-"],gg=["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"],yg=["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"],bg=["data-category","data-action","data-label","data-value"],wg=["id","name","type","placeholder","title","for","alt","href"],vg=["disabled","checked","selected","hidden","readonly","required","value"],Sg=[/^radix-/,/^headlessui-/,/^mui-/,/:\w+:/];function Cg(i,e){return dg.includes(i)?!0:fg.includes(i)||pg.includes(i)||mg.some(t=>i.startsWith(t))?!1:gg.includes(i)?!0:yg.some(t=>i.startsWith(t))||bg.includes(i)?!1:i.startsWith("data-")&&i.endsWith("-id")?!0:i==="id"?!Sg.some(t=>t.test(e)):wg.includes(i)?!0:vg.includes(i)?!1:!!i.startsWith("data-")}class $o{constructor(e,t){var s;this.includeUtilityClasses=(s=e.includeUtilityClasses)!=null?s:!1,this.cache=t}extract(e){if(this.cache){const o=this.cache.getSemantics(e);if(o!==void 0)return o}const t={},s=e.id;if(s&&!Gt(s)&&(t.id=s),e.classList.length>0){const o=Array.from(e.classList);if(this.includeUtilityClasses)t.classes=o;else{const{semantic:l}=og(o);l.length>0&&(t.classes=l)}}const r=this.extractAttributes(e);Object.keys(r).length>0&&(t.attributes=r);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 s=this.extract(e);return s.id&&(t+=.15),s.classes&&s.classes.length>0&&(t+=.1),s.attributes&&Object.keys(s.attributes).length>0&&(t+=.1),s.role&&(t+=.1),s.text&&(t+=.05),Math.min(t,1)}shouldIgnoreAttribute(e){return!!(Jl.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 Ve[e]!==void 0?Ve[e]:e.startsWith("data-")?Ve["data-*"]:e.startsWith("aria-")?Ve["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 s of Array.from(e.attributes)){const r=s.name;if(this.shouldIgnoreAttribute(r)||!Cg(r,s.value)||ql.has(r)&&Kl(s.value)||this.getAttributePriority(r)===0)continue;const n=r==="href"||r==="src"?Ql(r,s.value):s.value;!n||n.trim()===""||this.isDynamicValue(n)||(t[r]=n)}return t}extractText(e){const t=this.getDirectTextContent(e);if(!t)return null;const s=lg(t);if(!s)return null;const r=100,n=t.length>r?t.slice(0,r)+"...":t,o=s.length>r?s.slice(0,r)+"...":s;return{raw:n,normalized:o}}getDirectTextContent(e){var s;const t=[];for(const r of Array.from(e.childNodes))if(r.nodeType===Node.TEXT_NODE&&r.textContent){const n=r.textContent.trim();n&&t.push(n)}return t.length>0?t.join(" "):(s=e.textContent)!=null?s: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 xg{fingerprint(e){const t=e.tagName.toLowerCase(),s=this.getShape(t),r={shape:s,hasAnimation:this.hasAnimation(e)};if(s==="path"){const l=e.getAttribute("d");l&&(r.dHash=this.computePathHash(l))}else["circle","rect","ellipse","line"].includes(s)&&(r.geomHash=this.computeGeomHash(e,s));const n=e.getAttribute("role");n&&(r.role=n);const o=e.querySelector("title");return o!=null&&o.textContent&&(r.titleText=o.textContent.trim()),r}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(s=>s===e))!=null?t:"path"}normalizePathData(e){var t;return((t=e.match(/[MLHVCSQTAZ][^MLHVCSQTAZ]*/gi))!=null?t:[]).slice(0,5).map(s=>s.trim().replace(/(-?\d+\.?\d*)/g,r=>parseFloat(r).toFixed(1))).join(" ")}computeGeomHash(e,t){var r,n,o,l,a,c,u,h,d;const s=[];switch(t){case"circle":s.push(`r=${(r=e.getAttribute("r"))!=null?r:"0"}`);break;case"rect":{const f=parseFloat((n=e.getAttribute("width"))!=null?n:"0"),m=parseFloat((o=e.getAttribute("height"))!=null?o:"0");f>0&&m>0&&s.push(`ratio=${(f/m).toFixed(2)}`)}break;case"ellipse":{const f=parseFloat((l=e.getAttribute("rx"))!=null?l:"0"),m=parseFloat((a=e.getAttribute("ry"))!=null?a:"0");f>0&&m>0&&s.push(`ratio=${(f/m).toFixed(2)}`)}break;case"line":{const f=parseFloat((c=e.getAttribute("x1"))!=null?c:"0"),m=parseFloat((u=e.getAttribute("y1"))!=null?u:"0"),y=parseFloat((h=e.getAttribute("x2"))!=null?h:"0"),p=parseFloat((d=e.getAttribute("y2"))!=null?d:"0"),g=Math.atan2(p-m,y-f);s.push(`angle=${g.toFixed(2)}`)}break}return this.simpleHash(s.join(";"))}hasAnimation(e){if(e.querySelector("animate, animateTransform, animateMotion"))return!0;const t=e.ownerDocument;if(t!=null&&t.defaultView)try{const s=t.defaultView.getComputedStyle(e);if(s.animationName!=="none"||s.transitionProperty!=="all"&&s.transitionProperty!=="none")return!0}catch(s){}return!1}simpleHash(e){let t=0;for(let s=0;s<e.length;s++){const r=e.charCodeAt(s);t=(t<<5)-t+r,t=t&t}return Math.abs(t).toString(16).padStart(8,"0")}}function Eg(i,e=0){const t=i.anchor.score,s=i.path.length>0?i.path.reduce((l,a)=>l+a.score,0)/i.path.length:.5,r=i.target.score,n=t*xs.ANCHOR+s*xs.PATH+r*xs.TARGET+e*xs.UNIQUENESS,o=i.anchor.degraded?.2:0;return Math.max(0,Math.min(1,n-o))}class Mg{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 s=this.cache.keys().next().value;s!==void 0&&this.cache.delete(s)}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 Ag{constructor(e={}){var t,s;this.eidCache=new WeakMap,this.selectorResultCache=new Mg((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:(s=e.maxSelectorCacheSize)!=null?s: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 re(A({},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,s=e+t;return s>0?e/s:0}}function Ig(i){return new Ag(i)}let ki=null;function Ng(){return ki||(ki=Ig()),ki}function ko(i){if(i.ownerDocument)return i.ownerDocument;let e=i;for(;e;){if(e.nodeType===9)return e;e=e.parentNode}throw new Error(`Element does not have an ownerDocument. This typically means:
|
|
71
71
|
1. The element is detached from the DOM
|
|
72
72
|
2. The element was created but never attached
|
|
73
73
|
3. You are working with a document node instead of an element`)}function Rg(i,e){if(!e)return;const t=ko(i),s=e instanceof Document?e:ko(e);if(t!==s)throw new Error(`Cross-document operation detected: element and root are from different documents.
|
|
@@ -76,7 +76,7 @@ Common causes:
|
|
|
76
76
|
2. Element from one iframe, root from another
|
|
77
77
|
3. Element from main document, root from iframe (or vice versa)
|
|
78
78
|
|
|
79
|
-
Solution: Ensure element and root parameter are from the same document context.`)}function Tg(i,e={}){var j,J,ie,N;var t;if(!i||!i.ownerDocument||!i.isConnected)return null;const s=M(M({},eg),e);if(s.root)try{Rg(i,s.root)}catch(F){return console.error("Cross-document generation detected:",F),null}const r=(j=s.cache)!=null?j:Ng(),n=r.getEID(i);if(n!==void 0)return n;if(i.tagName.toLowerCase()==="html"){const F=new $o(s,r),W=$g(i,s,F);return r.setEID(i,W),W}const o=new tg(s,r),l=new ag(s,r),a=new $o(s,r),c=new xg,u=o.findAnchor(i);if(!u&&!s.fallbackToBody)return null;const h=(ie=(J=u==null?void 0:u.element)!=null?J:(t=i.ownerDocument)==null?void 0:t.body)!=null?ie:null;if(!h)return null;const d=!u||u.tier==="C",f=h.tagName.toLowerCase(),m=h.parentElement;let y;if(m&&f!=="body"&&f!=="html"){const F=Array.from(m.children).indexOf(h);F!==-1&&(y=F+1)}const p=a.extract(h),g={tag:h.tagName.toLowerCase(),semantics:p,score:(N=u==null?void 0:u.score)!=null?N:Me.DEGRADED_SCORE,degraded:d,nthChild:y},S=l.buildPath(h,i,a),v=a.extract(i);s.enableSvgFingerprint&&Og(i)&&(v.svg=c.fingerprint(i));const w=i.parentElement;let C;if(w){const F=Array.from(w.children).indexOf(i);F!==-1&&(C=F+1)}const x={tag:i.tagName.toLowerCase(),semantics:v,score:a.scoreElement(i),nthChild:C},R=[],T={onMultiple:"best-score",onMissing:"anchor-only",maxDepth:3},z=g.degraded||S.degraded,U=Dg(g.degraded,S),P={version:"1.0",anchor:g,path:S.path,target:x,constraints:R,fallback:T,meta:{confidence:0,generatedAt:new Date().toISOString(),generator:"dom-eid@1.0",source:s.source,degraded:z,degradationReason:U}};return P.meta.confidence=Eg(P),P.meta.confidence<s.confidenceThreshold?null:(r.setEID(i,P),P)}function Og(i){return i.namespaceURI==="http://www.w3.org/2000/svg"||i.tagName.toLowerCase()==="svg"||i instanceof SVGElement}function Dg(i,e){if(i&&e.degraded)return"anchor-and-path-degraded";if(i)return"no-semantic-anchor";if(e.degraded)return e.degradationReason}function $g(i,e,t,s){const r={tag:"html",semantics:t.extract(i),score:1,degraded:!1,nthChild:void 0};return{version:"1.0",anchor:r,path:[],target:r,constraints:[],fallback:{onMultiple:"best-score",onMissing:"anchor-only",maxDepth:3},meta:{confidence:1,generatedAt:new Date().toISOString(),generator:"dom-eid@1.0",source:e.source,degraded:!1,degradationReason:void 0}}}const ec={maxClasses:2,maxAttributes:5,includeText:!0,maxTextLength:50,simplifyTarget:!0,includeConstraints:!0};function _o(i){return i==="id"?101:Ve[i]!==void 0?Ve[i]:i.startsWith("data-")?Ve["data-*"]:i.startsWith("aria-")?Ve["aria-*"]:0}function kg(i){return["id","data-testid","data-qa","data-cy","href","text","role"].includes(i)}function _g(i){return!!(/@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/.test(i)||/(\+?\d{1,3}[-.\s]?)?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}/.test(i)||/\d{4}[-\s]?\d{4}[-\s]?\d{4}[-\s]?\d{4}/.test(i))}function Lg(i,e){const t=M(M({},ec),e),s=`v${i.version}`,r=_i(i.anchor,!1,t),n=i.path.length>0?i.path.map(a=>_i(a,!1,t)).join(" > ")+" > ":"",o=_i(i.target,!0,t),l=t.includeConstraints?Pg(i):"";return`${s}: ${r} :: ${n}${o}${l}`}function _i(i,e=!1,t=ec){const{tag:s,semantics:r}=i;let n=s;const o=[],l=M({},r.attributes);r.id&&(l.id=r.id),r.role&&!l.role&&(l.role=r.role);const a=Object.entries(l).map(([h,d])=>{const f=_o(h),m=h==="href"||h==="src"?Ql(h,d):d;return{name:h,value:m,priority:f}}).filter(h=>h.name!=="id"&&h.name!=="class"&&Jl.has(h.name)||ql.has(h.name)&&Kl(h.value)?!1:h.priority>0||h.name==="role"||h.name==="id");a.sort((h,d)=>d.priority-h.priority);const c=a.slice(0,t.maxAttributes);c.sort((h,d)=>h.name.localeCompare(d.name));for(const{name:h,value:d}of c)o.push(`${h}="${Cr(d)}"`);if(t.includeText&&r.text&&!_g(r.text.normalized)){const h=r.text.normalized;h.length>0&&h.length<=t.maxTextLength&&o.push(`text="${Cr(h)}"`)}let u=o;if(o.length>0&&(e&&t.simplifyTarget&&r.id&&(u=o.filter(h=>{const d=h.split("=")[0];return _o(d)>=60||d==="text"||d==="id"||d==="role"})),u.length>0&&u.sort((h,d)=>h.localeCompare(d))),r.classes&&r.classes.length>0){const h=ng(r.classes),d=!!r.id||o.some(f=>f.startsWith("href=")||f.startsWith("data-testid=")||f.startsWith("text=")||f.startsWith("role="));if(!(e&&t.simplifyTarget&&d)&&h.length>0){const f=h.sort().slice(0,t.maxClasses);n+=f.map(m=>`.${m}`).join("")}}if(u.length>0&&(n+=`[${u.join(",")}]`),"nthChild"in i&&i.nthChild){const h=!!r.id||r.attributes&&Object.keys(r.attributes).some(kg);e&&t.simplifyTarget&&h||(n+=`#${i.nthChild}`)}return n}function Pg(i){if(!i.constraints||i.constraints.length===0)return"";const e=[];for(const t of i.constraints)switch(t.type){case"uniqueness":e.push("unique=true");break;case"position":t.params&&t.params.strategy&&e.push(`pos=${t.params.strategy}`);break;case"text-proximity":if(t.params&&t.params.reference){const s=Cr(String(t.params.reference));e.push(`text="${s}"`)}break}return e.length===0?"":` {${e.join(",")}}`}function Cr(i){return i.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/>/g,"\\>").replace(/:/g,"\\:")}function Fg(i,e,t){const s=Tg(i,e);return s?Lg(s,t):null}const It={maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:0,fallbackToBody:!0};function zg(i){var e,t,s,r;return i===!1?null:i===!0||i===void 0?M({},It):{maxPathDepth:(e=i.maxPathDepth)!=null?e:It.maxPathDepth,enableSvgFingerprint:(t=i.enableSvgFingerprint)!=null?t:It.enableSvgFingerprint,confidenceThreshold:(s=i.confidenceThreshold)!=null?s:It.confidenceThreshold,fallbackToBody:(r=i.fallbackToBody)!=null?r:It.fallbackToBody}}function Lo(i,e,t,s){const r=e.getMeta(i),n=r==null?void 0:r.selector;if(n&&!(s!=null&&s.force))return n;const o=i.nodeType===Node.ELEMENT_NODE?i:hi(i);if(!o)return n;const l=e.getMeta(o),a=l==null?void 0:l.selector;if(a&&!(s!=null&&s.force))return a;if(!t)return a!=null?a:n;const c={maxPathDepth:t.maxPathDepth,enableSvgFingerprint:t.enableSvgFingerprint,fallbackToBody:t.fallbackToBody};try{const u=Fg(o,c);if(u)return l?l.selector=u:r&&(r.selector=u),u}catch(u){}return a!=null?a:n}function Po(i){return"__ln"in i}class Bg{constructor(){b(this,"length",0),b(this,"head",null),b(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let s=0;s<e;s++)t=(t==null?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Po(e.previousSibling)){const s=e.previousSibling.__ln.next;t.next=s,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,s&&(s.previous=t)}else if(e.nextSibling&&Po(e.nextSibling)&&e.nextSibling.__ln.previous){const s=e.nextSibling.__ln.previous;t.previous=s,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,s&&(s.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const Fo=(i,e)=>`${i}@${e}`,Wg=new Set(["id","class","name","role","title","alt","placeholder","for","type"]);function Ug(i){const e=i.toLowerCase();return Wg.has(e)||e.startsWith("data-")||e.startsWith("aria-")}class Vg{constructor(){b(this,"frozen",!1),b(this,"locked",!1),b(this,"texts",[]),b(this,"attributes",[]),b(this,"attributeMap",new WeakMap),b(this,"removes",[]),b(this,"mapRemoves",[]),b(this,"movedMap",{}),b(this,"addedSet",new Set),b(this,"movedSet",new Set),b(this,"droppedSet",new Set),b(this,"removesSubTreeCache",new Set),b(this,"mutationCb"),b(this,"blockClass"),b(this,"blockSelector"),b(this,"maskTextClass"),b(this,"maskTextSelector"),b(this,"excludeAttribute"),b(this,"inlineStylesheet"),b(this,"maskInputOptions"),b(this,"maskTextFn"),b(this,"maskInputFn"),b(this,"keepIframeSrcFn"),b(this,"recordCanvas"),b(this,"inlineImages"),b(this,"slimDOMOptions"),b(this,"dataURLOptions"),b(this,"selectorOptions",null),b(this,"doc"),b(this,"mirror"),b(this,"iframeManager"),b(this,"stylesheetManager"),b(this,"shadowDomManager"),b(this,"canvasManager"),b(this,"processedNodeManager"),b(this,"unattachedDoc"),b(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),b(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,s=new Bg,r=a=>{let c=a,u=Lt;for(;u===Lt;)c=c&&c.nextSibling,u=c&&this.mirror.getId(c);return u},n=a=>{const c=k.parentNode(a);if(!c||!mn(a))return;let u=!1;if(a.nodeType===Node.TEXT_NODE){const m=c.tagName;if(m==="TEXTAREA")return;m==="STYLE"&&this.addedSet.has(c)&&(u=!0)}const h=Ot(c)?this.mirror.getId(pn(a)):this.mirror.getId(c),d=r(a);if(h===-1||d===-1)return s.addNode(a);const f=nt(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,excludeAttribute:this.excludeAttribute,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:m=>{ct(m,this.mirror)&&this.iframeManager.addIframe(m),hn(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),Ue(a)&&this.shadowDomManager.addShadowRoot(k.shadowRoot(a),this.doc)},onIframeLoad:(m,y)=>{this.iframeManager.attachIframe(m,y),this.shadowDomManager.observeAttachShadow(m)},onStylesheetLoad:(m,y)=>{this.stylesheetManager.attachLinkElement(m,y)},cssCaptured:u,selectorOptions:this.selectorOptions});f&&(e.push({parentId:h,nextId:d,node:f}),t.add(f.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of this.movedSet)zo(this.removesSubTreeCache,a,this.mirror)&&!this.movedSet.has(k.parentNode(a))||n(a);for(const a of this.addedSet)!Bo(this.droppedSet,a)&&!zo(this.removesSubTreeCache,a,this.mirror)||Bo(this.movedSet,a)?n(a):this.droppedSet.add(a);let o=null;for(;s.length;){let a=null;if(o){const c=this.mirror.getId(k.parentNode(o.value)),u=r(o.value);c!==-1&&u!==-1&&(a=o)}if(!a){let c=s.tail;for(;c;){const u=c;if(c=c.previous,u){const h=this.mirror.getId(k.parentNode(u.value));if(r(u.value)===-1)continue;if(h!==-1){a=u;break}else{const f=u.value,m=k.parentNode(f);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const y=k.host(m);if(this.mirror.getId(y)!==-1){a=u;break}}}}}}if(!a){for(;s.head;)s.removeNode(s.head.value);break}o=a.previous,s.removeNode(a.value),n(a.value)}const l={texts:this.texts.map(a=>{const c=a.node,u=k.parentNode(c);return u&&u.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(u),{id:this.mirror.getId(c),value:a.value,selector:Lo(c,this.mirror,this.selectorOptions)}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>{const{attributes:c}=a;if(typeof c.style=="string"){const u=JSON.stringify(a.styleDiff),h=JSON.stringify(a._unchangedStyles);u.length<c.style.length&&(u+h).split("var(").length===c.style.split("var(").length&&(c.style=a.styleDiff)}return{id:this.mirror.getId(a.node),attributes:c,selector:Lo(a.node,this.mirror,this.selectorOptions,{force:Object.keys(c).some(Ug)})}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:e};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.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(l))}),b(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));const s=Array.from(k.childNodes(e),r=>k.textContent(r)||"").join("");t.attributes.value=ks({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:_s(e),value:s,maskInputFn:this.maskInputFn})}),b(this,"processMutation",e=>{if(!Ds(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=k.textContent(e.target);!le(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:ma(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,hi(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let s=e.attributeName,r=e.target.getAttribute(s);const o=t[s],l=typeof o=="boolean",a=document.contains(t),c=Nr(t),u=Ui(s,this.excludeAttribute);if(r===null&&!t.hasAttribute(s)&&e.oldValue!==null&&(o===""||o===null||typeof o=="undefined")){console.debug(`[${ye()}] [rrweb:record/mutation] \u26D4 phantom attribute mutation ignored`,{node:k.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:s,value:r,oldValue:e.oldValue,excludeAttribute:this.excludeAttribute,propValue:o,isBooleanAttr:l,inDOM:a,isVisible:c,isExcludeAttributeName:u});return}if(Ui(s,this.excludeAttribute)){console.debug(`[${ye()}] [rrweb:record/mutation] \u26D4 excluded attribute mutation ignored`,{node:k.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:s,value:r,oldValue:e.oldValue,excludeAttribute:this.excludeAttribute,propValue:o,isBooleanAttr:l,inDOM:a,isVisible:c,isExcludeAttributeName:u});return}if(s==="value"){const f=_s(t);r=ks({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:f,value:r,maskInputFn:this.maskInputFn})}if(le(e.target,this.blockClass,this.blockSelector,!1)||r===e.oldValue)return;let d=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&s==="src"&&!this.keepIframeSrcFn(r))if(!t.contentDocument)s="rr_src";else return;if(d||(d={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(d),this.attributeMap.set(e.target,d)),s==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!pa(t.tagName,s))if(d.attributes[s]=fa(this.doc,Ge(t.tagName),Ge(s),r),s!=="class"&&(e.oldValue===null||r===""||r!==e.oldValue)&&console.debug(`[${ye()}] [rrweb:record/mutation] \u26A0\uFE0F suspicious attribute mutation`,{reason:[r===e.oldValue?"no change in value":null,r===o?"mirrored in DOM property":null,r===d.attributes[s]?"redundant assignment":null].filter(Boolean).join(", ")||"uncategorized",node:k.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:s,value:r,oldValue:e.oldValue,transformedValue:d.attributes[s],excludeAttribute:this.excludeAttribute,propValue:o,isBooleanAttr:l,inDOM:a,isVisible:c,isExcludeAttributeName:u}),s==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(y){this.unattachedDoc=this.doc}const m=this.unattachedDoc.createElement("span");e.oldValue&&m.setAttribute("style",e.oldValue);for(const y of Array.from(t.style)){const p=t.style.getPropertyValue(y),g=t.style.getPropertyPriority(y);p!==m.style.getPropertyValue(y)||g!==m.style.getPropertyPriority(y)?g===""?d.styleDiff[y]=p:d.styleDiff[y]=[p,g]:d._unchangedStyles[y]=[p,g]}for(const y of Array.from(m.style))t.style.getPropertyValue(y)===""&&(d.styleDiff[y]=!1)}else s==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?d.attributes.rr_open_mode="modal":d.attributes.rr_open_mode="non-modal");break}case"childList":{if(le(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const s=this.mirror.getId(t),r=Ot(e.target)?this.mirror.getId(k.host(e.target)):this.mirror.getId(e.target);le(e.target,this.blockClass,this.blockSelector,!1)||Ds(t,this.mirror,this.slimDOMOptions)||!Gl(t,this.mirror)||(this.addedSet.has(t)?(xr(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&s===-1||ln(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Fo(s,r)]?xr(this.movedSet,t):(this.removes.push({parentId:r,id:s,isShadow:Ot(e.target)&&Dt(e.target)?!0:void 0}),Hg(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),b(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Ds(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let s=null;t&&this.mirror.hasNode(t)&&(s=this.mirror.getId(t)),s&&s!==-1&&(this.movedMap[Fo(this.mirror.getId(e),s)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);le(e,this.blockClass,this.blockSelector,!1)||(k.childNodes(e).forEach(s=>this.genAdds(s)),Ue(e)&&k.childNodes(k.shadowRoot(e)).forEach(s=>{this.processedNodeManager.add(s,this),this.genAdds(s,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","excludeAttribute","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","selectorOptions","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()}resetBuffers(){this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.mapRemoves=[],this.movedMap={},this.attributes=[],this.texts=[],this.attributeMap=new WeakMap,this.removes=[]}unsetFrozen(){this.frozen=!1,this.canvasManager.unfreeze()}}function xr(i,e){i.delete(e),k.childNodes(e).forEach(t=>xr(i,t))}function Hg(i,e){const t=[i];for(;t.length;){const s=t.pop();e.has(s)||(e.add(s),k.childNodes(s).forEach(r=>t.push(r)))}}function zo(i,e,t){return i.size===0?!1:Gg(i,e)}function Gg(i,e,t){const s=k.parentNode(e);return s?i.has(s):!1}function Bo(i,e){return i.size===0?!1:tc(i,e)}function tc(i,e){const t=k.parentNode(e);return t?i.has(t)?!0:tc(i,t):!1}let kt;function jg(i){kt=i}function Yg(){kt=void 0}const L=i=>kt?(...t)=>{try{return i(...t)}catch(s){if(kt&&kt(s)===!0)return;throw s}}:i,we=[];function yt(i){try{if("composedPath"in i){const e=i.composedPath();if(e.length)return e[0]}else if("path"in i&&i.path.length)return i.path[0]}catch(e){}return i&&i.target}function sc(i,e){const t=new Vg;we.push(t),t.init(i);const s=new(rn())(L(t.processMutations.bind(t)));return s.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function Zg({mousemoveCb:i,sampling:e,doc:t,mirror:s}){if(e.mousemove===!1)return()=>{};const r=typeof e.mousemove=="number"?e.mousemove:50,n=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let o=[],l;const a=gt(L(h=>{const d=Date.now()-l;i(o.map(f=>(f.timeOffset-=d,f)),h),o=[],l=null}),n),c=L(gt(L(h=>{const d=yt(h),{clientX:f,clientY:m}=Zs(h)?h.changedTouches[0]:h;l||(l=ye()),o.push({x:f,y:m,id:s.getId(d),timeOffset:ye()-l}),a(typeof DragEvent!="undefined"&&h instanceof DragEvent?E.Drag:h instanceof MouseEvent?E.MouseMove:E.TouchMove)}),r,{trailing:!1})),u=[ne("mousemove",c,t),ne("touchmove",c,t),ne("drag",c,t)];return L(()=>{u.forEach(h=>h())})}function Xg({mouseInteractionCb:i,doc:e,mirror:t,blockClass:s,blockSelector:r,sampling:n}){if(n.mouseInteraction===!1)return()=>{console.debug("MouseInteractionObserver: No operation needed")};const o=n.mouseInteraction===!0||n.mouseInteraction===void 0?{}:n.mouseInteraction,l=[];let a=null;const c=u=>h=>{const d=yt(h);if(le(d,s,r,!0))return;let f=null,m=u;if("pointerType"in h){switch(h.pointerType){case"mouse":f=Te.Mouse;break;case"touch":f=Te.Touch;break;case"pen":f=Te.Pen;break}f===Te.Touch?H[u]===H.MouseDown?m="TouchStart":H[u]===H.MouseUp&&(m="TouchEnd"):Te.Pen}else Zs(h)&&(f=Te.Touch);f!==null?(a=f,(m.startsWith("Touch")&&f===Te.Touch||m.startsWith("Mouse")&&f===Te.Mouse)&&(f=null)):H[u]===H.Click&&(f=a,a=null);const y=Zs(h)?h.changedTouches[0]:h;if(!y)return;const p=t.getId(d),{clientX:g,clientY:S}=y;L(i)(M({type:H[m],id:p,x:g,y:S},f!==null&&{pointerType:f}))};return Object.keys(H).filter(u=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&o[u]!==!1).forEach(u=>{let h=Ge(u);const d=c(u);if(window.PointerEvent)switch(H[u]){case H.MouseDown:case H.MouseUp:h=h.replace("mouse","pointer");break;case H.TouchStart:case H.TouchEnd:return}l.push(ne(h,d,e))}),L(()=>{l.forEach(u=>u())})}function ic({scrollCb:i,doc:e,mirror:t,blockClass:s,blockSelector:r,sampling:n}){const o=L(gt(L(l=>{const a=yt(l);if(!a||le(a,s,r,!0))return;const c=t.getId(a);if(a===e&&e.defaultView){const u=nn(e.defaultView);i({id:c,x:u.left,y:u.top})}else i({id:c,x:a.scrollLeft,y:a.scrollTop})}),n.scroll||100));return ne("scroll",o,e)}function Jg({viewportResizeCb:i},{win:e}){let t=-1,s=-1;const r=L(gt(L(()=>{const n=on(),o=an();(t!==n||s!==o)&&(i({width:Number(o),height:Number(n)}),t=n,s=o)}),200));return ne("resize",r,e)}function qg({navigationCb:i,doc:e,sampling:t}){var u;if(t.navigation===!1)return()=>{};const s=e.defaultView;if(!s)return()=>{};let r=s.location.href;const n=[],o=L(h=>{const d=s.location.href;d!==r&&(i({href:d,oldHref:r,navigationType:h}),r=d)}),l=ke(s.history,"pushState",function(h){return function(...d){const f=h.apply(this,d);return o("pushState"),f}});n.push(l);const a=ke(s.history,"replaceState",function(h){return function(...d){const f=h.apply(this,d);return o("replaceState"),f}});if(n.push(a),n.push(ne("popstate",()=>o("popstate"),s)),n.push(ne("hashchange",()=>o("hashchange"),s)),(typeof t.navigation=="object"&&(u=t.navigation.useNavigationAPI)!=null?u:!0)&&"navigation"in s)try{const h=s.navigation,d=f=>{var m;const y=f;if(y.navigationType==="push"||y.navigationType==="replace"){const p=(m=y.destination)==null?void 0:m.url;p&&p!==r&&(i({href:p,oldHref:r,navigationType:"navigate"}),r=p)}};h.addEventListener("navigate",d),n.push(()=>h.removeEventListener("navigate",d))}catch(h){}return L(()=>{n.forEach(h=>h())})}const Li=["INPUT","TEXTAREA","SELECT"],Wo=new WeakMap,Kg=["Enter","Tab","Escape","ArrowDown","ArrowUp","Delete"],Uo=new WeakMap;function Qg({inputCb:i,doc:e,mirror:t,blockClass:s,blockSelector:r,ignoreClass:n,ignoreSelector:o,maskInputOptions:l,maskInputFn:a,sampling:c,userTriggeredOnInput:u}){function h(v){let w=yt(v);const C=v.isTrusted,x=w&&w.tagName;if(w&&x==="OPTION"&&(w=k.parentElement(w)),!w||!x||Li.indexOf(x)<0||le(w,s,r,!0)||w.classList.contains(n)||o&&w.matches(o))return;let R=w.value,T=!1;const z=_s(w)||"";z==="radio"||z==="checkbox"?T=w.checked:(l[x.toLowerCase()]||l[z])&&(R=ks({element:w,maskInputOptions:l,tagName:x,type:z,value:R,maskInputFn:a})),d(w,u?{text:R,isChecked:T,userTriggered:C}:{text:R,isChecked:T});const U=w.name;z==="radio"&&U&&T&&e.querySelectorAll(`input[type="radio"][name="${U}"]`).forEach(P=>{if(P!==w){const j=P.value;d(P,u?{text:j,isChecked:!T,userTriggered:!1}:{text:j,isChecked:!T})}})}function d(v,w){const C=Wo.get(v),x=v,R=x.hasAttribute("placeholder"),T=x.value==="",z=typeof x.defaultValue=="string"?x.defaultValue==="":!0,U=!w.userTriggered,P=!C||C.text==="",j=R&&T&&z&&P&&U&&!w.isChecked&&x.type!=="hidden"&&Li.includes(x.tagName),J=x.tagName==="INPUT"&&x.type==="text"&&!w.userTriggered&&w.text===x.defaultValue&&!C&&x.hasAttribute("placeholder"),ie=!w.userTriggered&&x.value===x.defaultValue&&!C&&x.hasAttribute("placeholder")&&!w.isChecked&&x.type!=="hidden"&&Li.includes(x.tagName),N=x.type==="checkbox"&&!w.userTriggered&&!w.isChecked&&!C,F=x.type==="radio"&&!w.userTriggered&&!w.isChecked&&!C;if(j||J||ie||N||F){console.debug(`[${ye()}] [rrweb:record/observer] \u26D4 phantom input ignored`,{node:k.describeNode(x),tag:x.tagName,nodeType:x.nodeType,attribute:x.attributes,value:x.value,isLikelyPhantom:j,isRenderDrivenTextInput:J,isValueFromDefault:ie,isPhantomCheckbox:N,isPhantomRadio:F});return}if(!C||C.text!==w.text||C.isChecked!==w.isChecked){Wo.set(v,w);const W=t.getId(v);L(i)(re(M({},w),{id:W}))}}const m=(c.input==="last"?["change"]:["input","change"]).map(v=>ne(v,L(h),e)),y=v=>{const w=yt(v);if(!w||!w.tagName)return;if(c.input==="all"){h(v);return}const C=w.tagName,x=v.key,R=Kg.includes(x),T=C==="TEXTAREA",z=e.activeElement===w,U=w.value,P=Uo.get(w);if(Uo.set(w,U),!z){h(v);return}if(R){if(!T){h(v);return}let j=P!=null?P:"",J=0;const ie=2,N=()=>{const F=w.value,W=e.activeElement===w,q=F!==j;if(!W){h(v);return}if(q)J=0,j=F;else if(J++,J>=ie){h(v);return}requestAnimationFrame(N)};requestAnimationFrame(N);return}};m.push(ne("keydown",L(y),e));const p=e.defaultView;if(!p)return()=>{m.forEach(v=>v())};const g=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),S=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&m.push(...S.map(v=>qt(v[0],v[1],{set(){L(h)({target:this,isTrusted:!1})}},!1,p))),L(()=>{m.forEach(v=>v())})}function Xs(i){const e=[];function t(s,r){if(Es("CSSGroupingRule")&&s.parentRule instanceof CSSGroupingRule||Es("CSSMediaRule")&&s.parentRule instanceof CSSMediaRule||Es("CSSSupportsRule")&&s.parentRule instanceof CSSSupportsRule||Es("CSSConditionRule")&&s.parentRule instanceof CSSConditionRule){const o=Array.from(s.parentRule.cssRules).indexOf(s);r.unshift(o)}else if(s.parentStyleSheet){const o=Array.from(s.parentStyleSheet.cssRules).indexOf(s);r.unshift(o)}return r}return t(i,e)}function ze(i,e,t){let s,r;return i?(i.ownerNode?s=e.getId(i.ownerNode):r=t.getId(i),{styleId:r,id:s}):{}}function ey({styleSheetRuleCb:i,mirror:e,stylesheetManager:t},{win:s}){if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};const r=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(r,{apply:L((u,h,d)=>{const[f,m]=d,{id:y,styleId:p}=ze(h,e,t.styleMirror);return(y&&y!==-1||p&&p!==-1)&&i({id:y,styleId:p,adds:[{rule:f,index:m}]}),u.apply(h,d)})}),s.CSSStyleSheet.prototype.addRule=function(u,h,d=this.cssRules.length){const f=`${u} { ${h} }`;return s.CSSStyleSheet.prototype.insertRule.apply(this,[f,d])};const n=s.CSSStyleSheet.prototype.deleteRule;s.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:L((u,h,d)=>{const[f]=d,{id:m,styleId:y}=ze(h,e,t.styleMirror);return(m&&m!==-1||y&&y!==-1)&&i({id:m,styleId:y,removes:[{index:f}]}),u.apply(h,d)})}),s.CSSStyleSheet.prototype.removeRule=function(u){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[u])};let o;s.CSSStyleSheet.prototype.replace&&(o=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:L((u,h,d)=>{const[f]=d,{id:m,styleId:y}=ze(h,e,t.styleMirror);return(m&&m!==-1||y&&y!==-1)&&i({id:m,styleId:y,replace:f}),u.apply(h,d)})}));let l;s.CSSStyleSheet.prototype.replaceSync&&(l=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:L((u,h,d)=>{const[f]=d,{id:m,styleId:y}=ze(h,e,t.styleMirror);return(m&&m!==-1||y&&y!==-1)&&i({id:m,styleId:y,replaceSync:f}),u.apply(h,d)})}));const a={};As("CSSGroupingRule")?a.CSSGroupingRule=s.CSSGroupingRule:(As("CSSMediaRule")&&(a.CSSMediaRule=s.CSSMediaRule),As("CSSConditionRule")&&(a.CSSConditionRule=s.CSSConditionRule),As("CSSSupportsRule")&&(a.CSSSupportsRule=s.CSSSupportsRule));const c={};return Object.entries(a).forEach(([u,h])=>{c[u]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(c[u].insertRule,{apply:L((d,f,m)=>{const[y,p]=m,{id:g,styleId:S}=ze(f.parentStyleSheet,e,t.styleMirror);return(g&&g!==-1||S&&S!==-1)&&i({id:g,styleId:S,adds:[{rule:y,index:[...Xs(f),p||0]}]}),d.apply(f,m)})}),h.prototype.deleteRule=new Proxy(c[u].deleteRule,{apply:L((d,f,m)=>{const[y]=m,{id:p,styleId:g}=ze(f.parentStyleSheet,e,t.styleMirror);return(p&&p!==-1||g&&g!==-1)&&i({id:p,styleId:g,removes:[{index:[...Xs(f),y]}]}),d.apply(f,m)})})}),L(()=>{s.CSSStyleSheet.prototype.insertRule=r,s.CSSStyleSheet.prototype.deleteRule=n,o&&(s.CSSStyleSheet.prototype.replace=o),l&&(s.CSSStyleSheet.prototype.replaceSync=l),Object.entries(a).forEach(([u,h])=>{h.prototype.insertRule=c[u].insertRule,h.prototype.deleteRule=c[u].deleteRule})})}function rc({mirror:i,stylesheetManager:e},t){var s,r,n;let o=null;t.nodeName==="#document"?o=i.getId(t):o=i.getId(k.host(t));const l=t.nodeName==="#document"?(s=t.defaultView)==null?void 0:s.Document:(n=(r=t.ownerDocument)==null?void 0:r.defaultView)==null?void 0:n.ShadowRoot,a=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!l||!a?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){var c;return(c=a.get)==null?void 0:c.call(this)},set(c){var u;const h=(u=a.set)==null?void 0:u.call(this,c);if(o!==null&&o!==-1)try{e.adoptStyleSheets(c,o)}catch(d){}return h}}),L(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function ty({styleDeclarationCb:i,mirror:e,ignoreCSSAttributes:t,stylesheetManager:s},{win:r}){const n=r.CSSStyleDeclaration.prototype.setProperty;r.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:L((l,a,c)=>{var u;const[h,d,f]=c;if(t.has(h))return n.apply(a,[h,d,f]);const{id:m,styleId:y}=ze((u=a.parentRule)==null?void 0:u.parentStyleSheet,e,s.styleMirror);return(m&&m!==-1||y&&y!==-1)&&i({id:m,styleId:y,set:{property:h,value:d,priority:f},index:Xs(a.parentRule)}),l.apply(a,c)})});const o=r.CSSStyleDeclaration.prototype.removeProperty;return r.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:L((l,a,c)=>{var u;const[h]=c;if(t.has(h))return o.apply(a,[h]);const{id:d,styleId:f}=ze((u=a.parentRule)==null?void 0:u.parentStyleSheet,e,s.styleMirror);return(d&&d!==-1||f&&f!==-1)&&i({id:d,styleId:f,remove:{property:h},index:Xs(a.parentRule)}),l.apply(a,c)})}),L(()=>{r.CSSStyleDeclaration.prototype.setProperty=n,r.CSSStyleDeclaration.prototype.removeProperty=o})}function sy({mediaInteractionCb:i,blockClass:e,blockSelector:t,mirror:s,sampling:r,doc:n}){const o=L(a=>gt(L(c=>{const u=yt(c);if(!u||le(u,e,t,!0))return;const{currentTime:h,volume:d,muted:f,playbackRate:m,loop:y}=u;i({type:a,id:s.getId(u),currentTime:h,volume:d,muted:f,playbackRate:m,loop:y})}),r.media||500)),l=[ne("play",o(Be.Play),n),ne("pause",o(Be.Pause),n),ne("seeked",o(Be.Seeked),n),ne("volumechange",o(Be.VolumeChange),n),ne("ratechange",o(Be.RateChange),n)];return L(()=>{l.forEach(a=>a())})}function iy({fontCb:i,doc:e}){const t=e.defaultView;if(!t)return()=>{};const s=[],r=new WeakMap,n=t.FontFace;t.FontFace=function(a,c,u){const h=new n(a,c,u);return r.set(h,{family:a,buffer:typeof c!="string",descriptors:u,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(ArrayBuffer.isView(c)?new Uint8Array(c.buffer,c.byteOffset,c.byteLength):new Uint8Array(c)))}),h};const o=ke(e.fonts,"add",function(l){return function(a){return setTimeout(L(()=>{const c=r.get(a);c&&(i(c),r.delete(a))}),0),l.apply(this,[a])}});return s.push(()=>{t.FontFace=n}),s.push(o),L(()=>{s.forEach(l=>l())})}function ry(i){const{doc:e,mirror:t,blockClass:s,blockSelector:r,selectionCb:n}=i;let o=!0;const l=L(()=>{const a=e.getSelection();if(!a||o&&(a!=null&&a.isCollapsed))return;o=a.isCollapsed||!1;const c=[],u=a.rangeCount||0;for(let h=0;h<u;h++){const d=a.getRangeAt(h),{startContainer:f,startOffset:m,endContainer:y,endOffset:p}=d;le(f,s,r,!0)||le(y,s,r,!0)||c.push({start:t.getId(f),startOffset:m,end:t.getId(y),endOffset:p})}n({ranges:c})});return l(),ne("selectionchange",l)}function ny({doc:i,customElementCb:e}){const t=i.defaultView;return!t||!t.customElements?()=>{}:ke(t.customElements,"define",function(r){return function(n,o,l){try{e({define:{name:n}})}catch(a){console.warn(`Custom element callback failed for ${n}`)}return r.apply(this,[n,o,l])}})}function oy(i,e){const{mutationCb:t,mousemoveCb:s,mouseInteractionCb:r,scrollCb:n,viewportResizeCb:o,navigationCb:l,inputCb:a,mediaInteractionCb:c,styleSheetRuleCb:u,styleDeclarationCb:h,canvasMutationCb:d,fontCb:f,selectionCb:m,customElementCb:y}=i;i.mutationCb=(...p)=>{e.mutation&&e.mutation(...p),t(...p)},i.mousemoveCb=(...p)=>{e.mousemove&&e.mousemove(...p),s(...p)},i.mouseInteractionCb=(...p)=>{e.mouseInteraction&&e.mouseInteraction(...p),r(...p)},i.scrollCb=(...p)=>{e.scroll&&e.scroll(...p),n(...p)},i.viewportResizeCb=(...p)=>{e.viewportResize&&e.viewportResize(...p),o(...p)},i.navigationCb=(...p)=>{e.navigation&&e.navigation(...p),l(...p)},i.inputCb=(...p)=>{e.input&&e.input(...p),a(...p)},i.mediaInteractionCb=(...p)=>{e.mediaInteaction&&e.mediaInteaction(...p),c(...p)},i.styleSheetRuleCb=(...p)=>{e.styleSheetRule&&e.styleSheetRule(...p),u(...p)},i.styleDeclarationCb=(...p)=>{e.styleDeclaration&&e.styleDeclaration(...p),h(...p)},i.canvasMutationCb=(...p)=>{e.canvasMutation&&e.canvasMutation(...p),d(...p)},i.fontCb=(...p)=>{e.font&&e.font(...p),f(...p)},i.selectionCb=(...p)=>{e.selection&&e.selection(...p),m(...p)},i.customElementCb=(...p)=>{e.customElement&&e.customElement(...p),y(...p)}}function ay(i,e={}){const t=i.doc.defaultView;if(!t)return()=>{};oy(i,e);let s;i.recordDOM&&(s=sc(i,i.doc));const r=Zg(i),n=Xg(i),o=ic(i),l=Jg(i,{win:t}),a=qg(i),c=Qg(i),u=sy(i);let h=()=>{},d=()=>{},f=()=>{},m=()=>{};i.recordDOM&&(h=ey(i,{win:t}),d=rc(i,i.doc),f=ty(i,{win:t}),i.collectFonts&&(m=iy(i)));const y=ry(i),p=ny(i),g=[];for(const S of i.plugins)g.push(S.observer(S.callback,t,S.options));return L(()=>{var S;we.forEach(v=>v.reset()),(S=i.visibilityManager)==null||S.reset(),s==null||s.disconnect(),r(),n(),o(),l(),a(),c(),u(),h(),d(),f(),m(),y(),p(),g.forEach(v=>v())})}function Es(i){return typeof window[i]!="undefined"}function As(i){return!!(typeof window[i]!="undefined"&&window[i].prototype&&"insertRule"in window[i].prototype&&"deleteRule"in window[i].prototype)}class Vo{constructor(e){b(this,"iframeIdToRemoteIdMap",new WeakMap),b(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,s,r){const n=s||this.getIdToRemoteIdMap(e),o=r||this.getRemoteIdToIdMap(e);let l=n.get(t);return l||(l=this.generateIdFn(),n.set(t,l),o.set(l,t)),l}getIds(e,t){const s=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map(n=>this.getId(e,n,s,r))}getRemoteId(e,t,s){const r=s||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const n=r.get(t);return n||-1}getRemoteIds(e,t){const s=this.getRemoteIdToIdMap(e);return t.map(r=>this.getRemoteId(e,r,s))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class ly{constructor(e){b(this,"iframes",new WeakMap),b(this,"crossOriginIframeMap",new WeakMap),b(this,"crossOriginIframeMirror",new Vo(da)),b(this,"crossOriginIframeStyleMirror"),b(this,"crossOriginIframeRootIdMap",new WeakMap),b(this,"mirror"),b(this,"mutationCb"),b(this,"wrappedEmit"),b(this,"loadListener"),b(this,"stylesheetManager"),b(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Vo(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var s,r;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((s=e.contentWindow)==null||s.addEventListener("message",this.handleMessage.bind(this))),(r=this.loadListener)==null||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){const t=e;if(t.data.type!=="rrweb"||!e.source)return;const r=this.crossOriginIframeMap.get(e.source);if(!r)return;const n=this.transformCrossOriginEvent(r,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}transformCrossOriginEvent(e,t){var s;switch(t.type){case I.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const r=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,r),this.patchRootIdOnNode(t.data.node,r),{timestamp:t.timestamp,type:I.IncrementalSnapshot,data:{source:E.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case I.Meta:case I.Load:case I.DomContentLoaded:return!1;case I.Plugin:return t;case I.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case I.IncrementalSnapshot:switch(t.data.source){case E.Mutation:return t.data.adds.forEach(r=>{this.replaceIds(r,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(r.node,n)}),t.data.removes.forEach(r=>{this.replaceIds(r,e,["parentId","id"])}),t.data.attributes.forEach(r=>{this.replaceIds(r,e,["id"])}),t.data.texts.forEach(r=>{this.replaceIds(r,e,["id"])}),t;case E.Drag:case E.TouchMove:case E.MouseMove:return t.data.positions.forEach(r=>{this.replaceIds(r,e,["id"])}),t;case E.ViewportResize:return!1;case E.MediaInteraction:case E.MouseInteraction:case E.Scroll:case E.CanvasMutation:case E.Input:return this.replaceIds(t.data,e,["id"]),t;case E.StyleSheetRule:case E.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case E.Font:return t;case E.Selection:return t.data.ranges.forEach(r=>{this.replaceIds(r,e,["start","end"])}),t;case E.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(s=t.data.styles)==null||s.forEach(r=>{this.replaceStyleIds(r,e,["styleId"])}),t}}return!1}replace(e,t,s,r){for(const n of r)!Array.isArray(t[n])&&typeof t[n]!="number"||(Array.isArray(t[n])?t[n]=e.getIds(s,t[n]):t[n]=e.getId(s,t[n]));return t}replaceIds(e,t,s){return this.replace(this.crossOriginIframeMirror,e,t,s)}replaceStyleIds(e,t,s){return this.replace(this.crossOriginIframeStyleMirror,e,t,s)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(s=>{this.replaceIdOnNode(s,t)})}patchRootIdOnNode(e,t){e.type!==Oe.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(s=>{this.patchRootIdOnNode(s,t)})}}class cy{constructor(e){b(this,"shadowDoms",new WeakSet),b(this,"mutationCb"),b(this,"scrollCb"),b(this,"bypassOptions"),b(this,"mirror"),b(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(!Dt(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const s=sc(re(M({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>s.disconnect()),this.restoreHandlers.push(ic(re(M({},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(k.host(e))),this.restoreHandlers.push(rc({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const s=this;this.restoreHandlers.push(ke(e.prototype,"attachShadow",function(r){return function(n){const o=r.call(this,n),l=k.shadowRoot(this);return l&&mn(this)&&s.addShadowRoot(l,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var at="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Nt=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var Ms=0;Ms<at.length;Ms++)Nt[at.charCodeAt(Ms)]=Ms;var uy=function(i){var e=new Uint8Array(i),t,s=e.length,r="";for(t=0;t<s;t+=3)r+=at[e[t]>>2],r+=at[(e[t]&3)<<4|e[t+1]>>4],r+=at[(e[t+1]&15)<<2|e[t+2]>>6],r+=at[e[t+2]&63];return s%3===2?r=r.substring(0,r.length-1)+"=":s%3===1&&(r=r.substring(0,r.length-2)+"=="),r},hy=function(i){var e=i.length*.75,t=i.length,s,r=0,n,o,l,a;i[i.length-1]==="="&&(e--,i[i.length-2]==="="&&e--);var c=new ArrayBuffer(e),u=new Uint8Array(c);for(s=0;s<t;s+=4)n=Nt[i.charCodeAt(s)],o=Nt[i.charCodeAt(s+1)],l=Nt[i.charCodeAt(s+2)],a=Nt[i.charCodeAt(s+3)],u[r++]=n<<2|o>>4,u[r++]=(o&15)<<4|l>>2,u[r++]=(l&3)<<6|a&63;return c};const Ho=new Map;function dy(i,e){let t=Ho.get(i);return t||(t=new Map,Ho.set(i,t)),t.has(e)||t.set(e,[]),t.get(e)}const nc=(i,e,t)=>{if(!i||!(ac(i,e)||typeof i=="object"))return;const s=i.constructor.name,r=dy(t,s);let n=r.indexOf(i);return n===-1&&(n=r.length,r.push(i)),n};function $s(i,e,t){if(i instanceof Array)return i.map(s=>$s(s,e,t));if(i===null)return i;if(i instanceof Float32Array||i instanceof Float64Array||i instanceof Int32Array||i instanceof Uint32Array||i instanceof Uint8Array||i instanceof Uint16Array||i instanceof Int16Array||i instanceof Int8Array||i instanceof Uint8ClampedArray)return{rr_type:i.constructor.name,args:[Object.values(i)]};if(i instanceof ArrayBuffer){const s=i.constructor.name,r=uy(i);return{rr_type:s,base64:r}}else{if(i instanceof DataView)return{rr_type:i.constructor.name,args:[$s(i.buffer,e,t),i.byteOffset,i.byteLength]};if(i instanceof HTMLImageElement){const s=i.constructor.name,{src:r}=i;return{rr_type:s,src:r}}else if(i instanceof HTMLCanvasElement){const s="HTMLImageElement",r=i.toDataURL();return{rr_type:s,src:r}}else{if(i instanceof ImageData)return{rr_type:i.constructor.name,args:[$s(i.data,e,t),i.width,i.height]};if(ac(i,e)||typeof i=="object"){const s=i.constructor.name,r=nc(i,e,t);return{rr_type:s,index:r}}}}return i}const oc=(i,e,t)=>i.map(s=>$s(s,e,t)),ac=(i,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(r=>typeof e[r]=="function").find(r=>i instanceof e[r]);function fy(i,e,t,s){const r=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const o of n)try{if(typeof e.CanvasRenderingContext2D.prototype[o]!="function")continue;const l=ke(e.CanvasRenderingContext2D.prototype,o,function(a){return function(...c){return le(this.canvas,t,s,!0)||setTimeout(()=>{const u=oc(c,e,this);i(this.canvas,{type:_e["2D"],property:o,args:u})},0),a.apply(this,c)}});r.push(l)}catch(l){const a=qt(e.CanvasRenderingContext2D.prototype,o,{set(c){i(this.canvas,{type:_e["2D"],property:o,args:[c],setter:!0})}});r.push(a)}return()=>{r.forEach(o=>o())}}function py(i){return i==="experimental-webgl"?"webgl":i}function Go(i,e,t,s){const r=[];try{const n=ke(i.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...a){if(!le(this,e,t,!0)){const c=py(l);if("__context"in this||(this.__context=c),s&&["webgl","webgl2"].includes(c))if(a[0]&&typeof a[0]=="object"){const u=a[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[l,...a])}});r.push(n)}catch(n){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{r.forEach(n=>n())}}function jo(i,e,t,s,r,n){const o=[],l=Object.getOwnPropertyNames(i);for(const a of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if(typeof i[a]!="function")continue;const c=ke(i,a,function(u){return function(...h){const d=u.apply(this,h);if(nc(d,n,this),"tagName"in this.canvas&&!le(this.canvas,s,r,!0)){const f=oc(h,n,this),m={type:e,property:a,args:f};t(this.canvas,m)}return d}});o.push(c)}catch(c){const u=qt(i,a,{set(h){t(this.canvas,{type:e,property:a,args:[h],setter:!0})}});o.push(u)}return o}function my(i,e,t,s){const r=[];return r.push(...jo(e.WebGLRenderingContext.prototype,_e.WebGL,i,t,s,e)),typeof e.WebGL2RenderingContext!="undefined"&&r.push(...jo(e.WebGL2RenderingContext.prototype,_e.WebGL2,i,t,s,e)),()=>{r.forEach(n=>n())}}const lc="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",gy=i=>Uint8Array.from(atob(i),e=>e.charCodeAt(0)),Yo=typeof self!="undefined"&&self.Blob&&new Blob([gy(lc)],{type:"text/javascript;charset=utf-8"});function yy(i){let e;try{if(e=Yo&&(self.URL||self.webkitURL).createObjectURL(Yo),!e)throw"";const t=new Worker(e,{name:i==null?void 0:i.name});return t.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),t}catch(t){return new Worker("data:text/javascript;base64,"+lc,{name:i==null?void 0:i.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}class by{constructor(e){b(this,"pendingCanvasMutations",new Map),b(this,"rafStamps",{latestId:0,invokeId:null}),b(this,"mirror"),b(this,"mutationCb"),b(this,"resetObservers"),b(this,"frozen",!1),b(this,"locked",!1),b(this,"processMutation",(a,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(c)});const{sampling:t="all",win:s,blockClass:r,blockSelector:n,recordCanvas:o,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&t==="all"&&this.initCanvasMutationObserver(s,r,n),o&&typeof t=="number"&&this.initCanvasFPSObserver(t,s,r,n,{dataURLOptions:l})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,s,r,n){const o=Go(t,s,r,!0),l=new Map,a=new yy;a.onmessage=m=>{const{id:y}=m.data;if(l.set(y,!1),!("base64"in m.data))return;const{base64:p,type:g,width:S,height:v}=m.data;this.mutationCb({id:y,type:_e["2D"],commands:[{property:"clearRect",args:[0,0,S,v]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:p}],type:g}]},0,0]}]})};const c=1e3/e;let u=0,h;const d=()=>{const m=[];return t.document.querySelectorAll("canvas").forEach(y=>{le(y,s,r,!0)||m.push(y)}),m},f=m=>{if(u&&m-u<c){h=requestAnimationFrame(f);return}u=m,d().forEach(async y=>{var p;const g=this.mirror.getId(y);if(l.get(g)||y.width===0||y.height===0)return;if(l.set(g,!0),["webgl","webgl2"].includes(y.__context)){const v=y.getContext(y.__context);((p=v==null?void 0:v.getContextAttributes())==null?void 0:p.preserveDrawingBuffer)===!1&&v.clear(v.COLOR_BUFFER_BIT)}const S=await createImageBitmap(y);a.postMessage({id:g,bitmap:S,width:y.width,height:y.height,dataURLOptions:n.dataURLOptions},[S])}),h=requestAnimationFrame(f)};h=requestAnimationFrame(f),this.resetObservers=()=>{o(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,s){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const r=Go(e,t,s,!1),n=fy(this.processMutation.bind(this),e,t,s),o=my(this.processMutation.bind(this),e,t,s);this.resetObservers=()=>{r(),n(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const s=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,s)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const s=this.pendingCanvasMutations.get(e);if(!s||t===-1)return;const r=s.map(o=>{const c=o,{type:l}=c;return Qe(c,["type"])}),{type:n}=s[0];this.mutationCb({id:t,type:n,commands:r}),this.pendingCanvasMutations.delete(e)}}function Zo(i,e,t){var u,h,d,f,m,y;const s=(u=t==null?void 0:t.root)!=null?u:null,r=(h=t==null?void 0:t.threshold)!=null?h:.5,n=(d=t==null?void 0:t.sensitivity)!=null?d:.05,o=wy((f=t==null?void 0:t.rootMargin)!=null?f:"0px"),l=new Map,a=vy(s),c=Sy(a,o);for(const p of i){const g=p.getBoundingClientRect();let S=Ey(),v=0;g.width>0&&g.height>0&&(S=Cy(g,c),v=xy(g,S),v=Math.round(v*100)/100);const w=Ay(p),C=(m=e.get(p))!=null?m:null,x=(y=C==null?void 0:C.intersectionRatio)!=null?y:0,R=v,T=(C==null?void 0:C.isStyleVisible)&&x>r,z=w&&R>r;!C||T!==z||T!==z&&Math.abs(R-x)>n?l.set(p,{target:p,isVisible:z,isStyleVisible:w,intersectionRatio:R,intersectionRect:S,oldValue:C}):l.set(p,C)}return l}function wy(i){const e=i.trim().split(/\s+/),t=(s,r)=>s.endsWith("%")?parseFloat(s)/100*r:parseFloat(s)||0;return function(s){const r=t(e[0]||"0px",s.height),n=t(e[1]||e[0]||"0px",s.width),o=t(e[2]||e[0]||"0px",s.height),l=t(e[3]||e[1]||e[0]||"0px",s.width);return{top:r,right:n,bottom:o,left:l,width:0,height:0}}}function vy(i){return i?i.getBoundingClientRect():new DOMRect(0,0,window.innerWidth,window.innerHeight)}function Sy(i,e){const t=e(i);return new DOMRect(i.left-t.left,i.top-t.top,i.width+t.left+t.right,i.height+t.top+t.bottom)}function Cy(i,e){const t=Math.max(i.top,e.top),s=Math.max(i.left,e.left),r=Math.min(i.bottom,e.bottom),n=Math.min(i.right,e.right),o=Math.max(0,n-s),l=Math.max(0,r-t);return{top:t,left:s,bottom:r,right:n,width:o,height:l}}function xy(i,e){const t=i.width*i.height,s=e.width*e.height;return t>0?s/t:0}function Ey(){return{top:0,left:0,right:0,bottom:0,width:0,height:0}}function Ay(i){const e=getComputedStyle(i);return e&&e.display!=="none"&&e.visibility!=="hidden"&&parseFloat(e.opacity||"1")>0}class My{constructor(e){var c,u,h,d,f,m;b(this,"frozen",!1),b(this,"locked",!1),b(this,"pending",new Map),b(this,"mirror"),b(this,"mutationCb"),b(this,"rafId",null),b(this,"intervalId",null),b(this,"rafThrottle"),b(this,"lastFlushTime",0),b(this,"elements",new Set),b(this,"previousState",new Map),b(this,"root",null),b(this,"threshold"),b(this,"sensitivity"),b(this,"rootMargin"),b(this,"hasInitialized",!1),b(this,"mode","none"),b(this,"debounce",50),b(this,"throttle",100),b(this,"buffer",new Map),b(this,"debounceTimer",null),b(this,"lastThrottleTime",0),b(this,"disabled",!1),b(this,"notifyActivity");const{doc:t,mirror:s,sampling:r,mutationCb:n,notifyActivity:o}=e;if(this.mirror=s,this.mutationCb=n,this.notifyActivity=o,this.rootMargin="0px",r===!1){this.disabled=!0;return}const l=typeof r=="object"&&r!==null?r:{};this.mode=(c=l==null?void 0:l.mode)!=null?c:"none",this.debounce=Number((u=l==null?void 0:l.debounce)!=null?u:100),this.throttle=Number((h=l==null?void 0:l.throttle)!=null?h:100),this.threshold=Number((d=l==null?void 0:l.threshold)!=null?d:.5),this.sensitivity=Number((f=l==null?void 0:l.sensitivity)!=null?f:.05),this.rafThrottle=Number((m=l==null?void 0:l.rafThrottle)!=null?m:50),t.querySelectorAll("*").forEach(y=>this.observe(y)),new MutationObserver(y=>{y.forEach(p=>{p.addedNodes.forEach(g=>{g.nodeType===Node.ELEMENT_NODE&&(this.observe(g),g.querySelectorAll("*").forEach(S=>this.observe(S)))}),p.removedNodes.forEach(g=>{g.nodeType===Node.ELEMENT_NODE&&this.unobserve(g)})})}).observe(t.body,{childList:!0,subtree:!0}),this.startPendingFlushLoop()}startPendingFlushLoop(){if(!this.disabled)if(typeof requestAnimationFrame=="function"){const e=t=>{t-this.lastFlushTime>=this.rafThrottle&&(this.lastFlushTime=t,this.flushPendingVisibilityMutations()),this.rafId=requestAnimationFrame(e)};this.rafId=requestAnimationFrame(e)}else{const e=()=>{const t=performance.now();t-this.lastFlushTime>=this.rafThrottle&&(this.lastFlushTime=t,this.flushPendingVisibilityMutations())};this.intervalId=setInterval(e,this.rafThrottle)}}flushPendingVisibilityMutations(){if(this.disabled||this.frozen||this.locked||this.elements.size===0)return;const e=Zo(this.elements,this.previousState,{root:this.root,threshold:this.threshold,sensitivity:this.sensitivity,rootMargin:this.rootMargin});for(const[t,s]of e.entries()){const r=this.previousState.get(t);if(!r||r.isVisible!==s.isVisible||Math.abs(r.intersectionRatio-s.intersectionRatio)>this.sensitivity){const o=this.mirror.getId(t);o!==-1&&this.buffer.set(t,{id:o,isVisible:s.isVisible,ratio:s.intersectionRatio}),this.previousState.set(t,s)}}if(this.previousState=e,!this.hasInitialized){this.hasInitialized=!0,this.buffer.clear();return}this.scheduleEmit()}scheduleEmit(){if(this.mode==="debounce")clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this.flushBuffer(),this.debounce);else if(this.mode==="throttle"){const e=performance.now();e-this.lastThrottleTime>=this.throttle&&(this.lastThrottleTime=e,this.flushBuffer())}else this.flushBuffer()}flushBuffer(){var e;if(this.frozen||this.locked||this.buffer.size===0)return;const t=Array.from(this.buffer.values()),s=t.length;this.buffer.clear(),this.mutationCb({mutations:t}),(e=this.notifyActivity)==null||e.call(this,s)}observe(e){this.disabled||this.elements.add(e)}unobserve(e){this.disabled||(this.elements.delete(e),this.previousState.delete(e),this.pending.delete(e))}freeze(){this.frozen=!0,this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null)}unfreeze(){this.frozen=!1,this.flushPendingVisibilityMutations()}lock(){this.locked=!0,this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null)}unlock(){this.locked=!1,this.buffer.clear(),this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null),!this.disabled&&this.elements.size>0&&(this.previousState=Zo(this.elements,new Map,{root:this.root,threshold:this.threshold,sensitivity:this.sensitivity,rootMargin:this.rootMargin}))}unsetFrozen(){this.frozen=!1}reset(){this.elements.clear(),this.previousState.clear(),this.pending.clear(),this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=null),this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null)}}const Iy=150,Ny=5e3,Ry=100;class Ty{constructor(e){var n,o,l;b(this,"frozen",!1),b(this,"locked",!1),b(this,"disabled",!1),b(this,"settleTimeout"),b(this,"maxWait"),b(this,"debounceMs"),b(this,"settlingObserver",null),b(this,"debounceTimer",null),b(this,"settleCheckTimer",null),b(this,"maxWaitTimer",null),b(this,"lastMutationTime",0),b(this,"pendingNavigation",null),b(this,"doc"),b(this,"onSnapshot");const{doc:t,config:s,onSnapshot:r}=e;this.doc=t,this.onSnapshot=L(r),this.settleTimeout=(n=s.settleTimeout)!=null?n:Iy,this.maxWait=(o=s.maxWait)!=null?o:Ny,this.debounceMs=(l=s.debounce)!=null?l:Ry}handleNavigation(e){this.disabled||this.locked||(this.cancelTimers(),this.disconnectSettlingObserver(),this.pendingNavigation=e,!this.frozen&&this.startDebounce())}cancelPending(){this.cancelTimers(),this.disconnectSettlingObserver(),this.pendingNavigation=null}freeze(){this.frozen=!0,this.cancelTimers(),this.disconnectSettlingObserver()}unfreeze(){this.frozen=!1,this.pendingNavigation&&!this.locked&&!this.disabled&&this.startDebounce()}lock(){this.locked=!0,this.cancelTimers(),this.disconnectSettlingObserver()}unlock(){this.locked=!1,this.pendingNavigation=null}unsetFrozen(){this.frozen=!1}reset(){this.cancelTimers(),this.disconnectSettlingObserver(),this.pendingNavigation=null,this.frozen=!1,this.locked=!1}destroy(){this.reset(),this.disabled=!0}startDebounce(){this.debounceTimer=setTimeout(()=>{this.debounceTimer=null,this.startDOMSettling()},this.debounceMs)}startDOMSettling(){if(this.frozen||this.locked||this.disabled)return;this.lastMutationTime=performance.now();const e=rn();this.settlingObserver=new e(()=>{this.lastMutationTime=performance.now(),this.settleCheckTimer!==null&&clearTimeout(this.settleCheckTimer),this.settleCheckTimer=setTimeout(()=>this.checkSettled(),this.settleTimeout)}),this.settlingObserver.observe(this.doc,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),this.settleCheckTimer=setTimeout(()=>this.checkSettled(),this.settleTimeout),this.maxWaitTimer=setTimeout(()=>{this.maxWaitTimer=null,this.completeSettling()},this.maxWait)}checkSettled(){this.settleCheckTimer=null;const e=performance.now()-this.lastMutationTime;e>=this.settleTimeout?this.completeSettling():this.settleCheckTimer=setTimeout(()=>this.checkSettled(),this.settleTimeout-e)}completeSettling(){this.frozen||this.locked||this.disabled||this.pendingNavigation&&(this.cancelTimers(),this.disconnectSettlingObserver(),this.pendingNavigation=null,requestAnimationFrame(()=>{requestAnimationFrame(()=>{!this.frozen&&!this.locked&&!this.disabled&&this.onSnapshot(!0)})}))}cancelTimers(){this.debounceTimer!==null&&(clearTimeout(this.debounceTimer),this.debounceTimer=null),this.settleCheckTimer!==null&&(clearTimeout(this.settleCheckTimer),this.settleCheckTimer=null),this.maxWaitTimer!==null&&(clearTimeout(this.maxWaitTimer),this.maxWaitTimer=null)}disconnectSettlingObserver(){this.settlingObserver&&(this.settlingObserver.disconnect(),this.settlingObserver=null)}}class Oy{constructor(e){b(this,"trackedLinkElements",new WeakSet),b(this,"mutationCb"),b(this,"adoptedStyleSheetCb"),b(this,"styleMirror",new fn),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;const s={id:t,styleIds:[]},r=[];for(const n of e){let o;this.styleMirror.has(n)?o=this.styleMirror.getId(n):(o=this.styleMirror.add(n),r.push({styleId:o,rules:Array.from(n.rules||CSSRule,(l,a)=>({rule:na(l,n.href),index:a}))})),s.styleIds.push(o)}r.length>0&&(s.styles=r),this.adoptedStyleSheetCb(s)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Dy{constructor(){b(this,"nodeMap",new WeakMap),b(this,"active",!1)}inOtherBuffer(e,t){const s=this.nodeMap.get(e);return s&&Array.from(s).some(r=>r!==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(){}}const $y="3.3.0-alpha.1";let te,Fe,Pi,jt=!1;const Js=[];let Rt;try{if(Array.from([1],i=>i*2)[0]!==2){const i=document.createElement("iframe");document.body.appendChild(i),Array.from=((In=i.contentWindow)==null?void 0:In.Array.from)||Array.from,document.body.removeChild(i)}}catch(i){console.debug("Unable to override Array.from",i)}const ge=oa();function de(i={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:s,checkoutEveryNvm:r,checkoutDebounce:n,blockClass:o="rr-block",blockSelector:l=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,excludeAttribute:u,maskTextClass:h="rr-mask",maskTextSelector:d=null,inlineStylesheet:f=!0,maskAllInputs:m,maskInputOptions:y,slimDOMOptions:p,maskInputFn:g,maskTextFn:S,hooks:v,packFn:w,sampling:C={},dataURLOptions:x={},mousemoveWait:R,recordDOM:T=!0,recordCanvas:z=!1,recordCrossOriginIframes:U=!1,recordAfter:P=i.recordAfter==="DOMContentLoaded"?i.recordAfter:"load",flushCustomEvent:j=i.flushCustomEvent!==void 0?i.flushCustomEvent:"after",userTriggeredOnInput:J=!1,collectFonts:ie=!1,inlineImages:N=!1,plugins:F,keepIframeSrcFn:W=()=>!1,ignoreCSSAttributes:q=new Set([]),selector:ce,errorHandler:Le}=i;jg(Le);const be=U?window.parent===window:!0;let wt=!1;if(!be)try{window.parent.document&&(wt=!1)}catch(O){wt=!0}if(be&&!e)throw new Error("emit function is required");if(!be&&!wt)return()=>{};R!==void 0&&C.mousemove===void 0&&(C.mousemove=R),ge.reset();const di=u===void 0?/.^/:u,fi=m===!0?{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}:y!==void 0?y:{password:!0},pi=p===!0||p==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:p==="all",headMetaDescKeywords:p==="all",headTitleMutations:p==="all"}:p||{},bn=zg(ce);cn();let wn,mi=0,Kt=0,vn=0,Pe=!1,fe=null,Ke=null;const Sn=O=>{for(const he of F||[])he.eventProcessor&&(O=he.eventProcessor(O));return w&&!wt&&(O=w(O)),O},Qt=()=>{fe=null,Pe=!1,Ke=null,ue==null||ue.cancelPending(),Fe(!0),we.forEach(O=>{O.resetBuffers(),O.unsetFrozen()}),ae&&ae.unsetFrozen(),ue&&ue.unsetFrozen()};te=(O,he)=>{var X;const K=O;if(K.timestamp=ye(),K.checkoutId=vn,(X=we[0])!=null&&X.isFrozen()&&!Pe&&K.type!==I.FullSnapshot&&!(K.type===I.IncrementalSnapshot&&K.data.source===E.Mutation)&&(we.forEach(me=>me.unfreeze()),ae==null||ae.unfreeze(),ue==null||ue.unfreeze()),be)e==null||e(Sn(K),he);else if(wt){const me={type:"rrweb",event:Sn(K),isCheckout:he};window.parent.postMessage(me,"*")}if(K.type===I.FullSnapshot)wn=K,mi=0,Kt=0;else if(K.type===I.IncrementalSnapshot){if(K.data.source===E.Mutation&&K.data.isAttachIframe)return;if(K.data.source!==E.Visibility){mi++;const me=s&&mi>=s,G=t&&K.timestamp-wn.timestamp>t;if(me||G)if(n){Pe||(Pe=!0,Ke=ye(),we.forEach(wc=>wc.freeze()),ae==null||ae.freeze()),fe&&clearTimeout(fe);const vt=ye()-Ke,bc=n*3;vt>=bc?Qt():fe=setTimeout(()=>Qt(),n)}else Fe(!0)}}};const es=O=>{te({type:I.IncrementalSnapshot,data:M({source:E.Mutation},O)})},mc=O=>{te({type:I.IncrementalSnapshot,data:M({source:E.Visibility},O)})},Cn=O=>te({type:I.IncrementalSnapshot,data:M({source:E.Scroll},O)}),xn=O=>te({type:I.IncrementalSnapshot,data:M({source:E.CanvasMutation},O)}),gc=O=>te({type:I.IncrementalSnapshot,data:M({source:E.AdoptedStyleSheet},O)}),Ze=new Oy({mutationCb:es,adoptedStyleSheetCb:gc}),Xe=new ly({mirror:ge,mutationCb:es,stylesheetManager:Ze,recordCrossOriginIframes:U,wrappedEmit:te});for(const O of F||[])O.getMirror&&O.getMirror({nodeMirror:ge,crossOriginIframeMirror:Xe.crossOriginIframeMirror,crossOriginIframeStyleMirror:Xe.crossOriginIframeStyleMirror});const gi=new Dy;Pi=new by({recordCanvas:z,mutationCb:xn,win:window,blockClass:o,blockSelector:l,mirror:ge,sampling:C.canvas,dataURLOptions:x});const ts=new cy({mutationCb:es,scrollCb:Cn,bypassOptions:{blockClass:o,blockSelector:l,maskTextClass:h,maskTextSelector:d,excludeAttribute:di,inlineStylesheet:f,maskInputOptions:fi,dataURLOptions:x,maskTextFn:S,maskInputFn:g,recordCanvas:z,inlineImages:N,sampling:C,slimDOMOptions:pi,iframeManager:Xe,stylesheetManager:Ze,canvasManager:Pi,keepIframeSrcFn:W,processedNodeManager:gi,selectorOptions:bn},mirror:ge}),yc=T&&(r!=null||(C==null?void 0:C.visibility)!==void 0&&(C==null?void 0:C.visibility)!==!1);let ae;if(yc){const O=typeof(C==null?void 0:C.visibility)=="object"&&(C==null?void 0:C.visibility)!==null?C.visibility:{},he=O.recordVisibility===!0;ae=new My({doc:document,mirror:ge,sampling:O,mutationCb:he?mc:()=>{},notifyActivity:r!=null?X=>{if(Kt+=X,Kt>=r)if(Kt=0,n){Pe||(Pe=!0,Ke=ye(),we.forEach(G=>G.freeze()),ae==null||ae.freeze()),fe&&clearTimeout(fe);const K=ye()-Ke,me=n*3;K>=me?Qt():fe=setTimeout(()=>Qt(),n)}else Fe(!0)}:void 0})}Fe=(O=!1)=>{if(!T)return;vn++,te({type:I.Meta,data:{href:window.location.href,width:an(),height:on()}},O),Ze.reset(),ts.init(),we.forEach(X=>X.lock()),ae==null||ae.lock(),ue==null||ue.lock();const he=fh(document,{mirror:ge,blockClass:o,blockSelector:l,maskTextClass:h,maskTextSelector:d,excludeAttribute:di,inlineStylesheet:f,maskAllInputs:fi,maskTextFn:S,maskInputFn:g,slimDOM:pi,dataURLOptions:x,recordCanvas:z,inlineImages:N,onSerialize:X=>{ct(X,ge)&&Xe.addIframe(X),hn(X,ge)&&Ze.trackLinkElement(X),Ue(X)&&ts.addShadowRoot(k.shadowRoot(X),document)},onIframeLoad:(X,K)=>{Xe.attachIframe(X,K),ts.observeAttachShadow(X)},onStylesheetLoad:(X,K)=>{Ze.attachLinkElement(X,K)},keepIframeSrcFn:W,selector:ce});if(!he)return console.warn("Failed to snapshot the document");te({type:I.FullSnapshot,data:{node:he,initialOffset:nn(window)}},O),we.forEach(X=>X.unlock()),ae==null||ae.unlock(),ue==null||ue.unlock(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Ze.adoptStyleSheets(document.adoptedStyleSheets,ge.getId(document))},Rt=()=>{for(const O of Js)te(O);Js.length=0};let ue;const yi=C.navigation;if(yi!==!1){const O=typeof yi=="object"?yi:{};ue=new Ty({doc:document,config:O,onSnapshot:he=>{Pe&&(fe&&(clearTimeout(fe),fe=null),Pe=!1,Ke=null,we.forEach(X=>{X.resetBuffers(),X.unsetFrozen()}),ae==null||ae.unsetFrozen()),Fe(he)}})}try{const O=[],he=K=>{var me;return L(ay)({mutationCb:es,mousemoveCb:(G,vt)=>te({type:I.IncrementalSnapshot,data:{source:vt,positions:G}}),mouseInteractionCb:G=>te({type:I.IncrementalSnapshot,data:M({source:E.MouseInteraction},G)}),scrollCb:Cn,viewportResizeCb:G=>te({type:I.IncrementalSnapshot,data:M({source:E.ViewportResize},G)}),navigationCb:G=>{ue?ue.handleNavigation(G):Fe(!0)},inputCb:G=>te({type:I.IncrementalSnapshot,data:M({source:E.Input},G)}),mediaInteractionCb:G=>te({type:I.IncrementalSnapshot,data:M({source:E.MediaInteraction},G)}),styleSheetRuleCb:G=>te({type:I.IncrementalSnapshot,data:M({source:E.StyleSheetRule},G)}),styleDeclarationCb:G=>te({type:I.IncrementalSnapshot,data:M({source:E.StyleDeclaration},G)}),canvasMutationCb:xn,visibilityManager:ae,fontCb:G=>te({type:I.IncrementalSnapshot,data:M({source:E.Font},G)}),selectionCb:G=>{te({type:I.IncrementalSnapshot,data:M({source:E.Selection},G)})},customElementCb:G=>{te({type:I.IncrementalSnapshot,data:M({source:E.CustomElement},G)})},blockClass:o,ignoreClass:a,ignoreSelector:c,maskTextClass:h,maskTextSelector:d,excludeAttribute:di,maskInputOptions:fi,inlineStylesheet:f,sampling:C,recordDOM:T,recordCanvas:z,inlineImages:N,userTriggeredOnInput:J,collectFonts:ie,doc:K,maskInputFn:g,maskTextFn:S,keepIframeSrcFn:W,blockSelector:l,slimDOMOptions:pi,dataURLOptions:x,selectorOptions:bn,mirror:ge,iframeManager:Xe,stylesheetManager:Ze,shadowDomManager:ts,processedNodeManager:gi,canvasManager:Pi,ignoreCSSAttributes:q,plugins:((me=F==null?void 0:F.filter(G=>G.observer))==null?void 0:me.map(G=>({observer:G.observer,options:G.options,callback:vt=>te({type:I.Plugin,data:{plugin:G.name,payload:vt}})})))||[]},v)};Xe.addLoadListener(K=>{try{O.push(he(K.contentDocument))}catch(me){console.warn(me)}});const X=()=>{j==="before"&&Rt(),Fe(),O.push(he(document)),jt=!0,j==="after"&&Rt()};return document.readyState==="interactive"||document.readyState==="complete"?X():(O.push(ne("DOMContentLoaded",()=>{te({type:I.DomContentLoaded,data:{}}),P==="DOMContentLoaded"&&X()})),O.push(ne("load",()=>{te({type:I.Load,data:{}}),P==="load"&&X()},window))),()=>{fe&&(clearTimeout(fe),fe=null),Rt(),O.forEach(K=>K()),ue==null||ue.destroy(),gi.destroy(),jt=!1,Yg()}}catch(O){console.warn(O)}}de.getVersion=()=>$y;de.isRecording=()=>jt;de.flushCustomEventQueue=()=>{console.warn(`[rrweb] CustomEvent flushing: ${Js.length} events`),Rt()};de.addCustomEvent=(i,e)=>{const t={type:I.Custom,data:{tag:i,payload:e}};if(!jt){console.warn(`[rrweb] CustomEvent buffered before/after recording start: ${i}`),Js.push(t);return}te(t)};de.freezePage=()=>{we.forEach(i=>i.freeze())};de.takeFullSnapshot=i=>{if(!jt)throw new Error("please take full snapshot after start recording");Fe(i)};de.mirror=ge;function cc(i){return{all:i=i||new Map,on:function(e,t){var s=i.get(e);s?s.push(t):i.set(e,[t])},off:function(e,t){var s=i.get(e);s&&(t?s.splice(s.indexOf(t)>>>0,1):i.set(e,[]))},emit:function(e,t){var s=i.get(e);s&&s.slice().map(function(r){r(t)}),(s=i.get("*"))&&s.slice().map(function(r){r(e,t)})}}}const ky=Object.freeze(Object.defineProperty({__proto__:null,default:cc},Symbol.toStringTag,{value:"Module"}));function _y(i=window,e=document){if("scrollBehavior"in e.documentElement.style&&i.__forceSmoothScrollPolyfill__!==!0)return;const t=i.HTMLElement||i.Element,s=468,r={scroll:i.scroll||i.scrollTo,scrollBy:i.scrollBy,elementScroll:t.prototype.scroll||a,scrollIntoView:t.prototype.scrollIntoView},n=i.performance&&i.performance.now?i.performance.now.bind(i.performance):Date.now;function o(g){const S=["MSIE ","Trident/","Edge/"];return new RegExp(S.join("|")).test(g)}const l=o(i.navigator.userAgent)?1:0;function a(g,S){this.scrollLeft=g,this.scrollTop=S}function c(g){return .5*(1-Math.cos(Math.PI*g))}function u(g){if(g===null||typeof g!="object"||g.behavior===void 0||g.behavior==="auto"||g.behavior==="instant")return!0;if(typeof g=="object"&&g.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+g.behavior+" is not a valid value for enumeration ScrollBehavior.")}function h(g,S){if(S==="Y")return g.clientHeight+l<g.scrollHeight;if(S==="X")return g.clientWidth+l<g.scrollWidth}function d(g,S){const v=i.getComputedStyle(g,null)["overflow"+S];return v==="auto"||v==="scroll"}function f(g){const S=h(g,"Y")&&d(g,"Y"),v=h(g,"X")&&d(g,"X");return S||v}function m(g){for(;g!==e.body&&f(g)===!1;)g=g.parentNode||g.host;return g}function y(g){const S=n();let v,w,C,x=(S-g.startTime)/s;x=x>1?1:x,v=c(x),w=g.startX+(g.x-g.startX)*v,C=g.startY+(g.y-g.startY)*v,g.method.call(g.scrollable,w,C),(w!==g.x||C!==g.y)&&i.requestAnimationFrame(y.bind(i,g))}function p(g,S,v){let w,C,x,R;const T=n();g===e.body?(w=i,C=i.scrollX||i.pageXOffset,x=i.scrollY||i.pageYOffset,R=r.scroll):(w=g,C=g.scrollLeft,x=g.scrollTop,R=a),y({scrollable:w,method:R,startTime:T,startX:C,startY:x,x:S,y:v})}i.scroll=i.scrollTo=function(){if(arguments[0]!==void 0){if(u(arguments[0])===!0){r.scroll.call(i,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:i.scrollX||i.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:i.scrollY||i.pageYOffset);return}p.call(i,e.body,arguments[0].left!==void 0?~~arguments[0].left:i.scrollX||i.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:i.scrollY||i.pageYOffset)}},i.scrollBy=function(){if(arguments[0]!==void 0){if(u(arguments[0])){r.scrollBy.call(i,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}p.call(i,e.body,~~arguments[0].left+(i.scrollX||i.pageXOffset),~~arguments[0].top+(i.scrollY||i.pageYOffset))}},t.prototype.scroll=t.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(u(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");r.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}const g=arguments[0].left,S=arguments[0].top;p.call(this,this,typeof g=="undefined"?this.scrollLeft:~~g,typeof S=="undefined"?this.scrollTop:~~S)},t.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(u(arguments[0])===!0){r.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},t.prototype.scrollIntoView=function(){if(u(arguments[0])===!0){r.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const g=m(this),S=g.getBoundingClientRect(),v=this.getBoundingClientRect();g!==e.body?(p.call(this,g,g.scrollLeft+v.left-S.left,g.scrollTop+v.top-S.top),i.getComputedStyle(g).position!=="fixed"&&i.scrollBy({left:S.left,top:S.top,behavior:"smooth"})):i.scrollBy({left:v.left,top:v.top,behavior:"smooth"})}}class Ly{constructor(e=[],t){b(this,"timeOffset",0),b(this,"speed"),b(this,"actions"),b(this,"raf",null),b(this,"lastTimestamp"),this.actions=e,this.speed=t.speed}addAction(e){const t=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=e.delay)this.actions.push(e);else{const s=this.findActionIndex(e);this.actions.splice(s,0,e)}t&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){const e=performance.now();for(this.timeOffset+=(e-this.lastTimestamp)*this.speed,this.lastTimestamp=e;this.actions.length;){const t=this.actions[0];if(this.timeOffset>=t.delay)this.actions.shift(),t.doAction();else break}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}clear(){this.raf&&(this.raf!==!0&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(e){this.speed=e}isActive(){return this.raf!==null}findActionIndex(e){let t=0,s=this.actions.length-1;for(;t<=s;){const r=Math.floor((t+s)/2);if(this.actions[r].delay<e.delay)t=r+1;else if(this.actions[r].delay>e.delay)s=r-1;else return r+1}return t}}function Xo(i,e){if(i.type===I.IncrementalSnapshot&&i.data.source===E.MouseMove&&i.data.positions&&i.data.positions.length){const t=i.data.positions[0].timeOffset,s=i.timestamp+t;return i.delay=s-e,s-e}return i.delay=i.timestamp-e,i.delay}/*! *****************************************************************************
|
|
79
|
+
Solution: Ensure element and root parameter are from the same document context.`)}function Tg(i,e={}){var j,J,ie,N;var t;if(!i||!i.ownerDocument||!i.isConnected)return null;const s=A(A({},eg),e);if(s.root)try{Rg(i,s.root)}catch(F){return console.error("Cross-document generation detected:",F),null}const r=(j=s.cache)!=null?j:Ng(),n=r.getEID(i);if(n!==void 0)return n;if(i.tagName.toLowerCase()==="html"){const F=new $o(s,r),W=$g(i,s,F);return r.setEID(i,W),W}const o=new tg(s,r),l=new ag(s,r),a=new $o(s,r),c=new xg,u=o.findAnchor(i);if(!u&&!s.fallbackToBody)return null;const h=(ie=(J=u==null?void 0:u.element)!=null?J:(t=i.ownerDocument)==null?void 0:t.body)!=null?ie:null;if(!h)return null;const d=!u||u.tier==="C",f=h.tagName.toLowerCase(),m=h.parentElement;let y;if(m&&f!=="body"&&f!=="html"){const F=Array.from(m.children).indexOf(h);F!==-1&&(y=F+1)}const p=a.extract(h),g={tag:h.tagName.toLowerCase(),semantics:p,score:(N=u==null?void 0:u.score)!=null?N:Ae.DEGRADED_SCORE,degraded:d,nthChild:y},S=l.buildPath(h,i,a),v=a.extract(i);s.enableSvgFingerprint&&Og(i)&&(v.svg=c.fingerprint(i));const w=i.parentElement;let C;if(w){const F=Array.from(w.children).indexOf(i);F!==-1&&(C=F+1)}const x={tag:i.tagName.toLowerCase(),semantics:v,score:a.scoreElement(i),nthChild:C},R=[],T={onMultiple:"best-score",onMissing:"anchor-only",maxDepth:3},z=g.degraded||S.degraded,U=Dg(g.degraded,S),P={version:"1.0",anchor:g,path:S.path,target:x,constraints:R,fallback:T,meta:{confidence:0,generatedAt:new Date().toISOString(),generator:"dom-eid@1.0",source:s.source,degraded:z,degradationReason:U}};return P.meta.confidence=Eg(P),P.meta.confidence<s.confidenceThreshold?null:(r.setEID(i,P),P)}function Og(i){return i.namespaceURI==="http://www.w3.org/2000/svg"||i.tagName.toLowerCase()==="svg"||i instanceof SVGElement}function Dg(i,e){if(i&&e.degraded)return"anchor-and-path-degraded";if(i)return"no-semantic-anchor";if(e.degraded)return e.degradationReason}function $g(i,e,t,s){const r={tag:"html",semantics:t.extract(i),score:1,degraded:!1,nthChild:void 0};return{version:"1.0",anchor:r,path:[],target:r,constraints:[],fallback:{onMultiple:"best-score",onMissing:"anchor-only",maxDepth:3},meta:{confidence:1,generatedAt:new Date().toISOString(),generator:"dom-eid@1.0",source:e.source,degraded:!1,degradationReason:void 0}}}const ec={maxClasses:2,maxAttributes:5,includeText:!0,maxTextLength:50,simplifyTarget:!0,includeConstraints:!0};function _o(i){return i==="id"?101:Ve[i]!==void 0?Ve[i]:i.startsWith("data-")?Ve["data-*"]:i.startsWith("aria-")?Ve["aria-*"]:0}function kg(i){return["id","data-testid","data-qa","data-cy","href","text","role"].includes(i)}function _g(i){return!!(/@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/.test(i)||/(\+?\d{1,3}[-.\s]?)?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}/.test(i)||/\d{4}[-\s]?\d{4}[-\s]?\d{4}[-\s]?\d{4}/.test(i))}function Lg(i,e){const t=A(A({},ec),e),s=`v${i.version}`,r=_i(i.anchor,!1,t),n=i.path.length>0?i.path.map(a=>_i(a,!1,t)).join(" > ")+" > ":"",o=_i(i.target,!0,t),l=t.includeConstraints?Pg(i):"";return`${s}: ${r} :: ${n}${o}${l}`}function _i(i,e=!1,t=ec){const{tag:s,semantics:r}=i;let n=s;const o=[],l=A({},r.attributes);r.id&&(l.id=r.id),r.role&&!l.role&&(l.role=r.role);const a=Object.entries(l).map(([h,d])=>{const f=_o(h),m=h==="href"||h==="src"?Ql(h,d):d;return{name:h,value:m,priority:f}}).filter(h=>h.name!=="id"&&h.name!=="class"&&Jl.has(h.name)||ql.has(h.name)&&Kl(h.value)?!1:h.priority>0||h.name==="role"||h.name==="id");a.sort((h,d)=>d.priority-h.priority);const c=a.slice(0,t.maxAttributes);c.sort((h,d)=>h.name.localeCompare(d.name));for(const{name:h,value:d}of c)o.push(`${h}="${Cr(d)}"`);if(t.includeText&&r.text&&!_g(r.text.normalized)){const h=r.text.normalized;h.length>0&&h.length<=t.maxTextLength&&o.push(`text="${Cr(h)}"`)}let u=o;if(o.length>0&&(e&&t.simplifyTarget&&r.id&&(u=o.filter(h=>{const d=h.split("=")[0];return _o(d)>=60||d==="text"||d==="id"||d==="role"})),u.length>0&&u.sort((h,d)=>h.localeCompare(d))),r.classes&&r.classes.length>0){const h=ng(r.classes),d=!!r.id||o.some(f=>f.startsWith("href=")||f.startsWith("data-testid=")||f.startsWith("text=")||f.startsWith("role="));if(!(e&&t.simplifyTarget&&d)&&h.length>0){const f=h.sort().slice(0,t.maxClasses);n+=f.map(m=>`.${m}`).join("")}}if(u.length>0&&(n+=`[${u.join(",")}]`),"nthChild"in i&&i.nthChild){const h=!!r.id||r.attributes&&Object.keys(r.attributes).some(kg);e&&t.simplifyTarget&&h||(n+=`#${i.nthChild}`)}return n}function Pg(i){if(!i.constraints||i.constraints.length===0)return"";const e=[];for(const t of i.constraints)switch(t.type){case"uniqueness":e.push("unique=true");break;case"position":t.params&&t.params.strategy&&e.push(`pos=${t.params.strategy}`);break;case"text-proximity":if(t.params&&t.params.reference){const s=Cr(String(t.params.reference));e.push(`text="${s}"`)}break}return e.length===0?"":` {${e.join(",")}}`}function Cr(i){return i.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/>/g,"\\>").replace(/:/g,"\\:")}function Fg(i,e,t){const s=Tg(i,e);return s?Lg(s,t):null}const It={maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:0,fallbackToBody:!0};function zg(i){var e,t,s,r;return i===!1?null:i===!0||i===void 0?A({},It):{maxPathDepth:(e=i.maxPathDepth)!=null?e:It.maxPathDepth,enableSvgFingerprint:(t=i.enableSvgFingerprint)!=null?t:It.enableSvgFingerprint,confidenceThreshold:(s=i.confidenceThreshold)!=null?s:It.confidenceThreshold,fallbackToBody:(r=i.fallbackToBody)!=null?r:It.fallbackToBody}}function Lo(i,e,t,s){const r=e.getMeta(i),n=r==null?void 0:r.selector;if(n&&!(s!=null&&s.force))return n;const o=i.nodeType===Node.ELEMENT_NODE?i:hi(i);if(!o)return n;const l=e.getMeta(o),a=l==null?void 0:l.selector;if(a&&!(s!=null&&s.force))return a;if(!t)return a!=null?a:n;const c={maxPathDepth:t.maxPathDepth,enableSvgFingerprint:t.enableSvgFingerprint,fallbackToBody:t.fallbackToBody};try{const u=Fg(o,c);if(u)return l?l.selector=u:r&&(r.selector=u),u}catch(u){}return a!=null?a:n}function Po(i){return"__ln"in i}class Bg{constructor(){b(this,"length",0),b(this,"head",null),b(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let s=0;s<e;s++)t=(t==null?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Po(e.previousSibling)){const s=e.previousSibling.__ln.next;t.next=s,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,s&&(s.previous=t)}else if(e.nextSibling&&Po(e.nextSibling)&&e.nextSibling.__ln.previous){const s=e.nextSibling.__ln.previous;t.previous=s,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,s&&(s.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const Fo=(i,e)=>`${i}@${e}`,Wg=new Set(["id","class","name","role","title","alt","placeholder","for","type"]);function Ug(i){const e=i.toLowerCase();return Wg.has(e)||e.startsWith("data-")||e.startsWith("aria-")}class Vg{constructor(){b(this,"frozen",!1),b(this,"locked",!1),b(this,"texts",[]),b(this,"attributes",[]),b(this,"attributeMap",new WeakMap),b(this,"removes",[]),b(this,"mapRemoves",[]),b(this,"movedMap",{}),b(this,"addedSet",new Set),b(this,"movedSet",new Set),b(this,"droppedSet",new Set),b(this,"removesSubTreeCache",new Set),b(this,"mutationCb"),b(this,"blockClass"),b(this,"blockSelector"),b(this,"maskTextClass"),b(this,"maskTextSelector"),b(this,"excludeAttribute"),b(this,"inlineStylesheet"),b(this,"maskInputOptions"),b(this,"maskTextFn"),b(this,"maskInputFn"),b(this,"keepIframeSrcFn"),b(this,"recordCanvas"),b(this,"inlineImages"),b(this,"slimDOMOptions"),b(this,"dataURLOptions"),b(this,"selectorOptions",null),b(this,"doc"),b(this,"mirror"),b(this,"iframeManager"),b(this,"stylesheetManager"),b(this,"shadowDomManager"),b(this,"canvasManager"),b(this,"processedNodeManager"),b(this,"unattachedDoc"),b(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),b(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,s=new Bg,r=a=>{let c=a,u=Lt;for(;u===Lt;)c=c&&c.nextSibling,u=c&&this.mirror.getId(c);return u},n=a=>{const c=k.parentNode(a);if(!c||!mn(a))return;let u=!1;if(a.nodeType===Node.TEXT_NODE){const m=c.tagName;if(m==="TEXTAREA")return;m==="STYLE"&&this.addedSet.has(c)&&(u=!0)}const h=Ot(c)?this.mirror.getId(pn(a)):this.mirror.getId(c),d=r(a);if(h===-1||d===-1)return s.addNode(a);const f=nt(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,excludeAttribute:this.excludeAttribute,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:m=>{ct(m,this.mirror)&&this.iframeManager.addIframe(m),hn(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),Ue(a)&&this.shadowDomManager.addShadowRoot(k.shadowRoot(a),this.doc)},onIframeLoad:(m,y)=>{this.iframeManager.attachIframe(m,y),this.shadowDomManager.observeAttachShadow(m)},onStylesheetLoad:(m,y)=>{this.stylesheetManager.attachLinkElement(m,y)},cssCaptured:u,selectorOptions:this.selectorOptions});f&&(e.push({parentId:h,nextId:d,node:f}),t.add(f.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of this.movedSet)zo(this.removesSubTreeCache,a,this.mirror)&&!this.movedSet.has(k.parentNode(a))||n(a);for(const a of this.addedSet)!Bo(this.droppedSet,a)&&!zo(this.removesSubTreeCache,a,this.mirror)||Bo(this.movedSet,a)?n(a):this.droppedSet.add(a);let o=null;for(;s.length;){let a=null;if(o){const c=this.mirror.getId(k.parentNode(o.value)),u=r(o.value);c!==-1&&u!==-1&&(a=o)}if(!a){let c=s.tail;for(;c;){const u=c;if(c=c.previous,u){const h=this.mirror.getId(k.parentNode(u.value));if(r(u.value)===-1)continue;if(h!==-1){a=u;break}else{const f=u.value,m=k.parentNode(f);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const y=k.host(m);if(this.mirror.getId(y)!==-1){a=u;break}}}}}}if(!a){for(;s.head;)s.removeNode(s.head.value);break}o=a.previous,s.removeNode(a.value),n(a.value)}const l={texts:this.texts.map(a=>{const c=a.node,u=k.parentNode(c);return u&&u.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(u),{id:this.mirror.getId(c),value:a.value,selector:Lo(c,this.mirror,this.selectorOptions)}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>{const{attributes:c}=a;if(typeof c.style=="string"){const u=JSON.stringify(a.styleDiff),h=JSON.stringify(a._unchangedStyles);u.length<c.style.length&&(u+h).split("var(").length===c.style.split("var(").length&&(c.style=a.styleDiff)}return{id:this.mirror.getId(a.node),attributes:c,selector:Lo(a.node,this.mirror,this.selectorOptions,{force:Object.keys(c).some(Ug)})}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:e};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.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(l))}),b(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));const s=Array.from(k.childNodes(e),r=>k.textContent(r)||"").join("");t.attributes.value=ks({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:_s(e),value:s,maskInputFn:this.maskInputFn})}),b(this,"processMutation",e=>{if(!Ds(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=k.textContent(e.target);!le(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:ma(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,hi(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let s=e.attributeName,r=e.target.getAttribute(s);const o=t[s],l=typeof o=="boolean",a=document.contains(t),c=Nr(t),u=Ui(s,this.excludeAttribute);if(r===null&&!t.hasAttribute(s)&&e.oldValue!==null&&(o===""||o===null||typeof o=="undefined")){console.debug(`[${ye()}] [rrweb:record/mutation] \u26D4 phantom attribute mutation ignored`,{node:k.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:s,value:r,oldValue:e.oldValue,excludeAttribute:this.excludeAttribute,propValue:o,isBooleanAttr:l,inDOM:a,isVisible:c,isExcludeAttributeName:u});return}if(Ui(s,this.excludeAttribute)){console.debug(`[${ye()}] [rrweb:record/mutation] \u26D4 excluded attribute mutation ignored`,{node:k.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:s,value:r,oldValue:e.oldValue,excludeAttribute:this.excludeAttribute,propValue:o,isBooleanAttr:l,inDOM:a,isVisible:c,isExcludeAttributeName:u});return}if(s==="value"){const f=_s(t);r=ks({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:f,value:r,maskInputFn:this.maskInputFn})}if(le(e.target,this.blockClass,this.blockSelector,!1)||r===e.oldValue)return;let d=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&s==="src"&&!this.keepIframeSrcFn(r))if(!t.contentDocument)s="rr_src";else return;if(d||(d={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(d),this.attributeMap.set(e.target,d)),s==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!pa(t.tagName,s))if(d.attributes[s]=fa(this.doc,Ge(t.tagName),Ge(s),r),s!=="class"&&(e.oldValue===null||r===""||r!==e.oldValue)&&console.debug(`[${ye()}] [rrweb:record/mutation] \u26A0\uFE0F suspicious attribute mutation`,{reason:[r===e.oldValue?"no change in value":null,r===o?"mirrored in DOM property":null,r===d.attributes[s]?"redundant assignment":null].filter(Boolean).join(", ")||"uncategorized",node:k.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:s,value:r,oldValue:e.oldValue,transformedValue:d.attributes[s],excludeAttribute:this.excludeAttribute,propValue:o,isBooleanAttr:l,inDOM:a,isVisible:c,isExcludeAttributeName:u}),s==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(y){this.unattachedDoc=this.doc}const m=this.unattachedDoc.createElement("span");e.oldValue&&m.setAttribute("style",e.oldValue);for(const y of Array.from(t.style)){const p=t.style.getPropertyValue(y),g=t.style.getPropertyPriority(y);p!==m.style.getPropertyValue(y)||g!==m.style.getPropertyPriority(y)?g===""?d.styleDiff[y]=p:d.styleDiff[y]=[p,g]:d._unchangedStyles[y]=[p,g]}for(const y of Array.from(m.style))t.style.getPropertyValue(y)===""&&(d.styleDiff[y]=!1)}else s==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?d.attributes.rr_open_mode="modal":d.attributes.rr_open_mode="non-modal");break}case"childList":{if(le(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const s=this.mirror.getId(t),r=Ot(e.target)?this.mirror.getId(k.host(e.target)):this.mirror.getId(e.target);le(e.target,this.blockClass,this.blockSelector,!1)||Ds(t,this.mirror,this.slimDOMOptions)||!Gl(t,this.mirror)||(this.addedSet.has(t)?(xr(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&s===-1||ln(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Fo(s,r)]?xr(this.movedSet,t):(this.removes.push({parentId:r,id:s,isShadow:Ot(e.target)&&Dt(e.target)?!0:void 0}),Hg(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),b(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Ds(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let s=null;t&&this.mirror.hasNode(t)&&(s=this.mirror.getId(t)),s&&s!==-1&&(this.movedMap[Fo(this.mirror.getId(e),s)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);le(e,this.blockClass,this.blockSelector,!1)||(k.childNodes(e).forEach(s=>this.genAdds(s)),Ue(e)&&k.childNodes(k.shadowRoot(e)).forEach(s=>{this.processedNodeManager.add(s,this),this.genAdds(s,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","excludeAttribute","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","selectorOptions","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()}resetBuffers(){this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.mapRemoves=[],this.movedMap={},this.attributes=[],this.texts=[],this.attributeMap=new WeakMap,this.removes=[]}unsetFrozen(){this.frozen=!1,this.canvasManager.unfreeze()}}function xr(i,e){i.delete(e),k.childNodes(e).forEach(t=>xr(i,t))}function Hg(i,e){const t=[i];for(;t.length;){const s=t.pop();e.has(s)||(e.add(s),k.childNodes(s).forEach(r=>t.push(r)))}}function zo(i,e,t){return i.size===0?!1:Gg(i,e)}function Gg(i,e,t){const s=k.parentNode(e);return s?i.has(s):!1}function Bo(i,e){return i.size===0?!1:tc(i,e)}function tc(i,e){const t=k.parentNode(e);return t?i.has(t)?!0:tc(i,t):!1}let kt;function jg(i){kt=i}function Yg(){kt=void 0}const L=i=>kt?(...t)=>{try{return i(...t)}catch(s){if(kt&&kt(s)===!0)return;throw s}}:i,we=[];function yt(i){try{if("composedPath"in i){const e=i.composedPath();if(e.length)return e[0]}else if("path"in i&&i.path.length)return i.path[0]}catch(e){}return i&&i.target}function sc(i,e){const t=new Vg;we.push(t),t.init(i);const s=new(rn())(L(t.processMutations.bind(t)));return s.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function Zg({mousemoveCb:i,sampling:e,doc:t,mirror:s}){if(e.mousemove===!1)return()=>{};const r=typeof e.mousemove=="number"?e.mousemove:50,n=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let o=[],l;const a=gt(L(h=>{const d=Date.now()-l;i(o.map(f=>(f.timeOffset-=d,f)),h),o=[],l=null}),n),c=L(gt(L(h=>{const d=yt(h),{clientX:f,clientY:m}=Zs(h)?h.changedTouches[0]:h;l||(l=ye()),o.push({x:f,y:m,id:s.getId(d),timeOffset:ye()-l}),a(typeof DragEvent!="undefined"&&h instanceof DragEvent?E.Drag:h instanceof MouseEvent?E.MouseMove:E.TouchMove)}),r,{trailing:!1})),u=[ne("mousemove",c,t),ne("touchmove",c,t),ne("drag",c,t)];return L(()=>{u.forEach(h=>h())})}function Xg({mouseInteractionCb:i,doc:e,mirror:t,blockClass:s,blockSelector:r,sampling:n}){if(n.mouseInteraction===!1)return()=>{console.debug("MouseInteractionObserver: No operation needed")};const o=n.mouseInteraction===!0||n.mouseInteraction===void 0?{}:n.mouseInteraction,l=[];let a=null;const c=u=>h=>{const d=yt(h);if(le(d,s,r,!0))return;let f=null,m=u;if("pointerType"in h){switch(h.pointerType){case"mouse":f=Te.Mouse;break;case"touch":f=Te.Touch;break;case"pen":f=Te.Pen;break}f===Te.Touch?H[u]===H.MouseDown?m="TouchStart":H[u]===H.MouseUp&&(m="TouchEnd"):Te.Pen}else Zs(h)&&(f=Te.Touch);f!==null?(a=f,(m.startsWith("Touch")&&f===Te.Touch||m.startsWith("Mouse")&&f===Te.Mouse)&&(f=null)):H[u]===H.Click&&(f=a,a=null);const y=Zs(h)?h.changedTouches[0]:h;if(!y)return;const p=t.getId(d),{clientX:g,clientY:S}=y;L(i)(A({type:H[m],id:p,x:g,y:S},f!==null&&{pointerType:f}))};return Object.keys(H).filter(u=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&o[u]!==!1).forEach(u=>{let h=Ge(u);const d=c(u);if(window.PointerEvent)switch(H[u]){case H.MouseDown:case H.MouseUp:h=h.replace("mouse","pointer");break;case H.TouchStart:case H.TouchEnd:return}l.push(ne(h,d,e))}),L(()=>{l.forEach(u=>u())})}function ic({scrollCb:i,doc:e,mirror:t,blockClass:s,blockSelector:r,sampling:n}){const o=L(gt(L(l=>{const a=yt(l);if(!a||le(a,s,r,!0))return;const c=t.getId(a);if(a===e&&e.defaultView){const u=nn(e.defaultView);i({id:c,x:u.left,y:u.top})}else i({id:c,x:a.scrollLeft,y:a.scrollTop})}),n.scroll||100));return ne("scroll",o,e)}function Jg({viewportResizeCb:i},{win:e}){let t=-1,s=-1;const r=L(gt(L(()=>{const n=on(),o=an();(t!==n||s!==o)&&(i({width:Number(o),height:Number(n)}),t=n,s=o)}),200));return ne("resize",r,e)}function qg({navigationCb:i,doc:e,sampling:t}){var u;if(t.navigation===!1)return()=>{};const s=e.defaultView;if(!s)return()=>{};let r=s.location.href;const n=[],o=L(h=>{const d=s.location.href;d!==r&&(i({href:d,oldHref:r,navigationType:h}),r=d)}),l=ke(s.history,"pushState",function(h){return function(...d){const f=h.apply(this,d);return o("pushState"),f}});n.push(l);const a=ke(s.history,"replaceState",function(h){return function(...d){const f=h.apply(this,d);return o("replaceState"),f}});if(n.push(a),n.push(ne("popstate",()=>o("popstate"),s)),n.push(ne("hashchange",()=>o("hashchange"),s)),(typeof t.navigation=="object"&&(u=t.navigation.useNavigationAPI)!=null?u:!0)&&"navigation"in s)try{const h=s.navigation,d=f=>{var m;const y=f;if(y.navigationType==="push"||y.navigationType==="replace"){const p=(m=y.destination)==null?void 0:m.url;p&&p!==r&&(i({href:p,oldHref:r,navigationType:"navigate"}),r=p)}};h.addEventListener("navigate",d),n.push(()=>h.removeEventListener("navigate",d))}catch(h){}return L(()=>{n.forEach(h=>h())})}const Li=["INPUT","TEXTAREA","SELECT"],Wo=new WeakMap,Kg=["Enter","Tab","Escape","ArrowDown","ArrowUp","Delete"],Uo=new WeakMap;function Qg({inputCb:i,doc:e,mirror:t,blockClass:s,blockSelector:r,ignoreClass:n,ignoreSelector:o,maskInputOptions:l,maskInputFn:a,sampling:c,userTriggeredOnInput:u}){function h(v){let w=yt(v);const C=v.isTrusted,x=w&&w.tagName;if(w&&x==="OPTION"&&(w=k.parentElement(w)),!w||!x||Li.indexOf(x)<0||le(w,s,r,!0)||w.classList.contains(n)||o&&w.matches(o))return;let R=w.value,T=!1;const z=_s(w)||"";z==="radio"||z==="checkbox"?T=w.checked:(l[x.toLowerCase()]||l[z])&&(R=ks({element:w,maskInputOptions:l,tagName:x,type:z,value:R,maskInputFn:a})),d(w,u?{text:R,isChecked:T,userTriggered:C}:{text:R,isChecked:T});const U=w.name;z==="radio"&&U&&T&&e.querySelectorAll(`input[type="radio"][name="${U}"]`).forEach(P=>{if(P!==w){const j=P.value;d(P,u?{text:j,isChecked:!T,userTriggered:!1}:{text:j,isChecked:!T})}})}function d(v,w){const C=Wo.get(v),x=v,R=x.hasAttribute("placeholder"),T=x.value==="",z=typeof x.defaultValue=="string"?x.defaultValue==="":!0,U=!w.userTriggered,P=!C||C.text==="",j=R&&T&&z&&P&&U&&!w.isChecked&&x.type!=="hidden"&&Li.includes(x.tagName),J=x.tagName==="INPUT"&&x.type==="text"&&!w.userTriggered&&w.text===x.defaultValue&&!C&&x.hasAttribute("placeholder"),ie=!w.userTriggered&&x.value===x.defaultValue&&!C&&x.hasAttribute("placeholder")&&!w.isChecked&&x.type!=="hidden"&&Li.includes(x.tagName),N=x.type==="checkbox"&&!w.userTriggered&&!w.isChecked&&!C,F=x.type==="radio"&&!w.userTriggered&&!w.isChecked&&!C;if(j||J||ie||N||F){console.debug(`[${ye()}] [rrweb:record/observer] \u26D4 phantom input ignored`,{node:k.describeNode(x),tag:x.tagName,nodeType:x.nodeType,attribute:x.attributes,value:x.value,isLikelyPhantom:j,isRenderDrivenTextInput:J,isValueFromDefault:ie,isPhantomCheckbox:N,isPhantomRadio:F});return}if(!C||C.text!==w.text||C.isChecked!==w.isChecked){Wo.set(v,w);const W=t.getId(v);L(i)(re(A({},w),{id:W}))}}const m=(c.input==="last"?["change"]:["input","change"]).map(v=>ne(v,L(h),e)),y=v=>{const w=yt(v);if(!w||!w.tagName)return;if(c.input==="all"){h(v);return}const C=w.tagName,x=v.key,R=Kg.includes(x),T=C==="TEXTAREA",z=e.activeElement===w,U=w.value,P=Uo.get(w);if(Uo.set(w,U),!z){h(v);return}if(R){if(!T){h(v);return}let j=P!=null?P:"",J=0;const ie=2,N=()=>{const F=w.value,W=e.activeElement===w,q=F!==j;if(!W){h(v);return}if(q)J=0,j=F;else if(J++,J>=ie){h(v);return}requestAnimationFrame(N)};requestAnimationFrame(N);return}};m.push(ne("keydown",L(y),e));const p=e.defaultView;if(!p)return()=>{m.forEach(v=>v())};const g=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),S=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&m.push(...S.map(v=>qt(v[0],v[1],{set(){L(h)({target:this,isTrusted:!1})}},!1,p))),L(()=>{m.forEach(v=>v())})}function Xs(i){const e=[];function t(s,r){if(Es("CSSGroupingRule")&&s.parentRule instanceof CSSGroupingRule||Es("CSSMediaRule")&&s.parentRule instanceof CSSMediaRule||Es("CSSSupportsRule")&&s.parentRule instanceof CSSSupportsRule||Es("CSSConditionRule")&&s.parentRule instanceof CSSConditionRule){const o=Array.from(s.parentRule.cssRules).indexOf(s);r.unshift(o)}else if(s.parentStyleSheet){const o=Array.from(s.parentStyleSheet.cssRules).indexOf(s);r.unshift(o)}return r}return t(i,e)}function ze(i,e,t){let s,r;return i?(i.ownerNode?s=e.getId(i.ownerNode):r=t.getId(i),{styleId:r,id:s}):{}}function ey({styleSheetRuleCb:i,mirror:e,stylesheetManager:t},{win:s}){if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};const r=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(r,{apply:L((u,h,d)=>{const[f,m]=d,{id:y,styleId:p}=ze(h,e,t.styleMirror);return(y&&y!==-1||p&&p!==-1)&&i({id:y,styleId:p,adds:[{rule:f,index:m}]}),u.apply(h,d)})}),s.CSSStyleSheet.prototype.addRule=function(u,h,d=this.cssRules.length){const f=`${u} { ${h} }`;return s.CSSStyleSheet.prototype.insertRule.apply(this,[f,d])};const n=s.CSSStyleSheet.prototype.deleteRule;s.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:L((u,h,d)=>{const[f]=d,{id:m,styleId:y}=ze(h,e,t.styleMirror);return(m&&m!==-1||y&&y!==-1)&&i({id:m,styleId:y,removes:[{index:f}]}),u.apply(h,d)})}),s.CSSStyleSheet.prototype.removeRule=function(u){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[u])};let o;s.CSSStyleSheet.prototype.replace&&(o=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:L((u,h,d)=>{const[f]=d,{id:m,styleId:y}=ze(h,e,t.styleMirror);return(m&&m!==-1||y&&y!==-1)&&i({id:m,styleId:y,replace:f}),u.apply(h,d)})}));let l;s.CSSStyleSheet.prototype.replaceSync&&(l=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:L((u,h,d)=>{const[f]=d,{id:m,styleId:y}=ze(h,e,t.styleMirror);return(m&&m!==-1||y&&y!==-1)&&i({id:m,styleId:y,replaceSync:f}),u.apply(h,d)})}));const a={};Ms("CSSGroupingRule")?a.CSSGroupingRule=s.CSSGroupingRule:(Ms("CSSMediaRule")&&(a.CSSMediaRule=s.CSSMediaRule),Ms("CSSConditionRule")&&(a.CSSConditionRule=s.CSSConditionRule),Ms("CSSSupportsRule")&&(a.CSSSupportsRule=s.CSSSupportsRule));const c={};return Object.entries(a).forEach(([u,h])=>{c[u]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(c[u].insertRule,{apply:L((d,f,m)=>{const[y,p]=m,{id:g,styleId:S}=ze(f.parentStyleSheet,e,t.styleMirror);return(g&&g!==-1||S&&S!==-1)&&i({id:g,styleId:S,adds:[{rule:y,index:[...Xs(f),p||0]}]}),d.apply(f,m)})}),h.prototype.deleteRule=new Proxy(c[u].deleteRule,{apply:L((d,f,m)=>{const[y]=m,{id:p,styleId:g}=ze(f.parentStyleSheet,e,t.styleMirror);return(p&&p!==-1||g&&g!==-1)&&i({id:p,styleId:g,removes:[{index:[...Xs(f),y]}]}),d.apply(f,m)})})}),L(()=>{s.CSSStyleSheet.prototype.insertRule=r,s.CSSStyleSheet.prototype.deleteRule=n,o&&(s.CSSStyleSheet.prototype.replace=o),l&&(s.CSSStyleSheet.prototype.replaceSync=l),Object.entries(a).forEach(([u,h])=>{h.prototype.insertRule=c[u].insertRule,h.prototype.deleteRule=c[u].deleteRule})})}function rc({mirror:i,stylesheetManager:e},t){var s,r,n;let o=null;t.nodeName==="#document"?o=i.getId(t):o=i.getId(k.host(t));const l=t.nodeName==="#document"?(s=t.defaultView)==null?void 0:s.Document:(n=(r=t.ownerDocument)==null?void 0:r.defaultView)==null?void 0:n.ShadowRoot,a=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!l||!a?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){var c;return(c=a.get)==null?void 0:c.call(this)},set(c){var u;const h=(u=a.set)==null?void 0:u.call(this,c);if(o!==null&&o!==-1)try{e.adoptStyleSheets(c,o)}catch(d){}return h}}),L(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function ty({styleDeclarationCb:i,mirror:e,ignoreCSSAttributes:t,stylesheetManager:s},{win:r}){const n=r.CSSStyleDeclaration.prototype.setProperty;r.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:L((l,a,c)=>{var u;const[h,d,f]=c;if(t.has(h))return n.apply(a,[h,d,f]);const{id:m,styleId:y}=ze((u=a.parentRule)==null?void 0:u.parentStyleSheet,e,s.styleMirror);return(m&&m!==-1||y&&y!==-1)&&i({id:m,styleId:y,set:{property:h,value:d,priority:f},index:Xs(a.parentRule)}),l.apply(a,c)})});const o=r.CSSStyleDeclaration.prototype.removeProperty;return r.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:L((l,a,c)=>{var u;const[h]=c;if(t.has(h))return o.apply(a,[h]);const{id:d,styleId:f}=ze((u=a.parentRule)==null?void 0:u.parentStyleSheet,e,s.styleMirror);return(d&&d!==-1||f&&f!==-1)&&i({id:d,styleId:f,remove:{property:h},index:Xs(a.parentRule)}),l.apply(a,c)})}),L(()=>{r.CSSStyleDeclaration.prototype.setProperty=n,r.CSSStyleDeclaration.prototype.removeProperty=o})}function sy({mediaInteractionCb:i,blockClass:e,blockSelector:t,mirror:s,sampling:r,doc:n}){const o=L(a=>gt(L(c=>{const u=yt(c);if(!u||le(u,e,t,!0))return;const{currentTime:h,volume:d,muted:f,playbackRate:m,loop:y}=u;i({type:a,id:s.getId(u),currentTime:h,volume:d,muted:f,playbackRate:m,loop:y})}),r.media||500)),l=[ne("play",o(Be.Play),n),ne("pause",o(Be.Pause),n),ne("seeked",o(Be.Seeked),n),ne("volumechange",o(Be.VolumeChange),n),ne("ratechange",o(Be.RateChange),n)];return L(()=>{l.forEach(a=>a())})}function iy({fontCb:i,doc:e}){const t=e.defaultView;if(!t)return()=>{};const s=[],r=new WeakMap,n=t.FontFace;t.FontFace=function(a,c,u){const h=new n(a,c,u);return r.set(h,{family:a,buffer:typeof c!="string",descriptors:u,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(ArrayBuffer.isView(c)?new Uint8Array(c.buffer,c.byteOffset,c.byteLength):new Uint8Array(c)))}),h};const o=ke(e.fonts,"add",function(l){return function(a){return setTimeout(L(()=>{const c=r.get(a);c&&(i(c),r.delete(a))}),0),l.apply(this,[a])}});return s.push(()=>{t.FontFace=n}),s.push(o),L(()=>{s.forEach(l=>l())})}function ry(i){const{doc:e,mirror:t,blockClass:s,blockSelector:r,selectionCb:n}=i;let o=!0;const l=L(()=>{const a=e.getSelection();if(!a||o&&(a!=null&&a.isCollapsed))return;o=a.isCollapsed||!1;const c=[],u=a.rangeCount||0;for(let h=0;h<u;h++){const d=a.getRangeAt(h),{startContainer:f,startOffset:m,endContainer:y,endOffset:p}=d;le(f,s,r,!0)||le(y,s,r,!0)||c.push({start:t.getId(f),startOffset:m,end:t.getId(y),endOffset:p})}n({ranges:c})});return l(),ne("selectionchange",l)}function ny({doc:i,customElementCb:e}){const t=i.defaultView;return!t||!t.customElements?()=>{}:ke(t.customElements,"define",function(r){return function(n,o,l){try{e({define:{name:n}})}catch(a){console.warn(`Custom element callback failed for ${n}`)}return r.apply(this,[n,o,l])}})}function oy(i,e){const{mutationCb:t,mousemoveCb:s,mouseInteractionCb:r,scrollCb:n,viewportResizeCb:o,navigationCb:l,inputCb:a,mediaInteractionCb:c,styleSheetRuleCb:u,styleDeclarationCb:h,canvasMutationCb:d,fontCb:f,selectionCb:m,customElementCb:y}=i;i.mutationCb=(...p)=>{e.mutation&&e.mutation(...p),t(...p)},i.mousemoveCb=(...p)=>{e.mousemove&&e.mousemove(...p),s(...p)},i.mouseInteractionCb=(...p)=>{e.mouseInteraction&&e.mouseInteraction(...p),r(...p)},i.scrollCb=(...p)=>{e.scroll&&e.scroll(...p),n(...p)},i.viewportResizeCb=(...p)=>{e.viewportResize&&e.viewportResize(...p),o(...p)},i.navigationCb=(...p)=>{e.navigation&&e.navigation(...p),l(...p)},i.inputCb=(...p)=>{e.input&&e.input(...p),a(...p)},i.mediaInteractionCb=(...p)=>{e.mediaInteaction&&e.mediaInteaction(...p),c(...p)},i.styleSheetRuleCb=(...p)=>{e.styleSheetRule&&e.styleSheetRule(...p),u(...p)},i.styleDeclarationCb=(...p)=>{e.styleDeclaration&&e.styleDeclaration(...p),h(...p)},i.canvasMutationCb=(...p)=>{e.canvasMutation&&e.canvasMutation(...p),d(...p)},i.fontCb=(...p)=>{e.font&&e.font(...p),f(...p)},i.selectionCb=(...p)=>{e.selection&&e.selection(...p),m(...p)},i.customElementCb=(...p)=>{e.customElement&&e.customElement(...p),y(...p)}}function ay(i,e={}){const t=i.doc.defaultView;if(!t)return()=>{};oy(i,e);let s;i.recordDOM&&(s=sc(i,i.doc));const r=Zg(i),n=Xg(i),o=ic(i),l=Jg(i,{win:t}),a=qg(i),c=Qg(i),u=sy(i);let h=()=>{},d=()=>{},f=()=>{},m=()=>{};i.recordDOM&&(h=ey(i,{win:t}),d=rc(i,i.doc),f=ty(i,{win:t}),i.collectFonts&&(m=iy(i)));const y=ry(i),p=ny(i),g=[];for(const S of i.plugins)g.push(S.observer(S.callback,t,S.options));return L(()=>{var S;we.forEach(v=>v.reset()),(S=i.visibilityManager)==null||S.reset(),s==null||s.disconnect(),r(),n(),o(),l(),a(),c(),u(),h(),d(),f(),m(),y(),p(),g.forEach(v=>v())})}function Es(i){return typeof window[i]!="undefined"}function Ms(i){return!!(typeof window[i]!="undefined"&&window[i].prototype&&"insertRule"in window[i].prototype&&"deleteRule"in window[i].prototype)}class Vo{constructor(e){b(this,"iframeIdToRemoteIdMap",new WeakMap),b(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,s,r){const n=s||this.getIdToRemoteIdMap(e),o=r||this.getRemoteIdToIdMap(e);let l=n.get(t);return l||(l=this.generateIdFn(),n.set(t,l),o.set(l,t)),l}getIds(e,t){const s=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map(n=>this.getId(e,n,s,r))}getRemoteId(e,t,s){const r=s||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const n=r.get(t);return n||-1}getRemoteIds(e,t){const s=this.getRemoteIdToIdMap(e);return t.map(r=>this.getRemoteId(e,r,s))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class ly{constructor(e){b(this,"iframes",new WeakMap),b(this,"crossOriginIframeMap",new WeakMap),b(this,"crossOriginIframeMirror",new Vo(da)),b(this,"crossOriginIframeStyleMirror"),b(this,"crossOriginIframeRootIdMap",new WeakMap),b(this,"mirror"),b(this,"mutationCb"),b(this,"wrappedEmit"),b(this,"loadListener"),b(this,"stylesheetManager"),b(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Vo(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var s,r;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((s=e.contentWindow)==null||s.addEventListener("message",this.handleMessage.bind(this))),(r=this.loadListener)==null||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){const t=e;if(t.data.type!=="rrweb"||!e.source)return;const r=this.crossOriginIframeMap.get(e.source);if(!r)return;const n=this.transformCrossOriginEvent(r,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}transformCrossOriginEvent(e,t){var s;switch(t.type){case I.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const r=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,r),this.patchRootIdOnNode(t.data.node,r),{timestamp:t.timestamp,type:I.IncrementalSnapshot,data:{source:E.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case I.Meta:case I.Load:case I.DomContentLoaded:return!1;case I.Plugin:return t;case I.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case I.IncrementalSnapshot:switch(t.data.source){case E.Mutation:return t.data.adds.forEach(r=>{this.replaceIds(r,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(r.node,n)}),t.data.removes.forEach(r=>{this.replaceIds(r,e,["parentId","id"])}),t.data.attributes.forEach(r=>{this.replaceIds(r,e,["id"])}),t.data.texts.forEach(r=>{this.replaceIds(r,e,["id"])}),t;case E.Drag:case E.TouchMove:case E.MouseMove:return t.data.positions.forEach(r=>{this.replaceIds(r,e,["id"])}),t;case E.ViewportResize:return!1;case E.MediaInteraction:case E.MouseInteraction:case E.Scroll:case E.CanvasMutation:case E.Input:return this.replaceIds(t.data,e,["id"]),t;case E.StyleSheetRule:case E.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case E.Font:return t;case E.Selection:return t.data.ranges.forEach(r=>{this.replaceIds(r,e,["start","end"])}),t;case E.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(s=t.data.styles)==null||s.forEach(r=>{this.replaceStyleIds(r,e,["styleId"])}),t}}return!1}replace(e,t,s,r){for(const n of r)!Array.isArray(t[n])&&typeof t[n]!="number"||(Array.isArray(t[n])?t[n]=e.getIds(s,t[n]):t[n]=e.getId(s,t[n]));return t}replaceIds(e,t,s){return this.replace(this.crossOriginIframeMirror,e,t,s)}replaceStyleIds(e,t,s){return this.replace(this.crossOriginIframeStyleMirror,e,t,s)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(s=>{this.replaceIdOnNode(s,t)})}patchRootIdOnNode(e,t){e.type!==Oe.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(s=>{this.patchRootIdOnNode(s,t)})}}class cy{constructor(e){b(this,"shadowDoms",new WeakSet),b(this,"mutationCb"),b(this,"scrollCb"),b(this,"bypassOptions"),b(this,"mirror"),b(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(!Dt(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const s=sc(re(A({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>s.disconnect()),this.restoreHandlers.push(ic(re(A({},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(k.host(e))),this.restoreHandlers.push(rc({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const s=this;this.restoreHandlers.push(ke(e.prototype,"attachShadow",function(r){return function(n){const o=r.call(this,n),l=k.shadowRoot(this);return l&&mn(this)&&s.addShadowRoot(l,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var at="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Nt=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var As=0;As<at.length;As++)Nt[at.charCodeAt(As)]=As;var uy=function(i){var e=new Uint8Array(i),t,s=e.length,r="";for(t=0;t<s;t+=3)r+=at[e[t]>>2],r+=at[(e[t]&3)<<4|e[t+1]>>4],r+=at[(e[t+1]&15)<<2|e[t+2]>>6],r+=at[e[t+2]&63];return s%3===2?r=r.substring(0,r.length-1)+"=":s%3===1&&(r=r.substring(0,r.length-2)+"=="),r},hy=function(i){var e=i.length*.75,t=i.length,s,r=0,n,o,l,a;i[i.length-1]==="="&&(e--,i[i.length-2]==="="&&e--);var c=new ArrayBuffer(e),u=new Uint8Array(c);for(s=0;s<t;s+=4)n=Nt[i.charCodeAt(s)],o=Nt[i.charCodeAt(s+1)],l=Nt[i.charCodeAt(s+2)],a=Nt[i.charCodeAt(s+3)],u[r++]=n<<2|o>>4,u[r++]=(o&15)<<4|l>>2,u[r++]=(l&3)<<6|a&63;return c};const Ho=new Map;function dy(i,e){let t=Ho.get(i);return t||(t=new Map,Ho.set(i,t)),t.has(e)||t.set(e,[]),t.get(e)}const nc=(i,e,t)=>{if(!i||!(ac(i,e)||typeof i=="object"))return;const s=i.constructor.name,r=dy(t,s);let n=r.indexOf(i);return n===-1&&(n=r.length,r.push(i)),n};function $s(i,e,t){if(i instanceof Array)return i.map(s=>$s(s,e,t));if(i===null)return i;if(i instanceof Float32Array||i instanceof Float64Array||i instanceof Int32Array||i instanceof Uint32Array||i instanceof Uint8Array||i instanceof Uint16Array||i instanceof Int16Array||i instanceof Int8Array||i instanceof Uint8ClampedArray)return{rr_type:i.constructor.name,args:[Object.values(i)]};if(i instanceof ArrayBuffer){const s=i.constructor.name,r=uy(i);return{rr_type:s,base64:r}}else{if(i instanceof DataView)return{rr_type:i.constructor.name,args:[$s(i.buffer,e,t),i.byteOffset,i.byteLength]};if(i instanceof HTMLImageElement){const s=i.constructor.name,{src:r}=i;return{rr_type:s,src:r}}else if(i instanceof HTMLCanvasElement){const s="HTMLImageElement",r=i.toDataURL();return{rr_type:s,src:r}}else{if(i instanceof ImageData)return{rr_type:i.constructor.name,args:[$s(i.data,e,t),i.width,i.height]};if(ac(i,e)||typeof i=="object"){const s=i.constructor.name,r=nc(i,e,t);return{rr_type:s,index:r}}}}return i}const oc=(i,e,t)=>i.map(s=>$s(s,e,t)),ac=(i,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(r=>typeof e[r]=="function").find(r=>i instanceof e[r]);function fy(i,e,t,s){const r=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const o of n)try{if(typeof e.CanvasRenderingContext2D.prototype[o]!="function")continue;const l=ke(e.CanvasRenderingContext2D.prototype,o,function(a){return function(...c){return le(this.canvas,t,s,!0)||setTimeout(()=>{const u=oc(c,e,this);i(this.canvas,{type:_e["2D"],property:o,args:u})},0),a.apply(this,c)}});r.push(l)}catch(l){const a=qt(e.CanvasRenderingContext2D.prototype,o,{set(c){i(this.canvas,{type:_e["2D"],property:o,args:[c],setter:!0})}});r.push(a)}return()=>{r.forEach(o=>o())}}function py(i){return i==="experimental-webgl"?"webgl":i}function Go(i,e,t,s){const r=[];try{const n=ke(i.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...a){if(!le(this,e,t,!0)){const c=py(l);if("__context"in this||(this.__context=c),s&&["webgl","webgl2"].includes(c))if(a[0]&&typeof a[0]=="object"){const u=a[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[l,...a])}});r.push(n)}catch(n){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{r.forEach(n=>n())}}function jo(i,e,t,s,r,n){const o=[],l=Object.getOwnPropertyNames(i);for(const a of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if(typeof i[a]!="function")continue;const c=ke(i,a,function(u){return function(...h){const d=u.apply(this,h);if(nc(d,n,this),"tagName"in this.canvas&&!le(this.canvas,s,r,!0)){const f=oc(h,n,this),m={type:e,property:a,args:f};t(this.canvas,m)}return d}});o.push(c)}catch(c){const u=qt(i,a,{set(h){t(this.canvas,{type:e,property:a,args:[h],setter:!0})}});o.push(u)}return o}function my(i,e,t,s){const r=[];return r.push(...jo(e.WebGLRenderingContext.prototype,_e.WebGL,i,t,s,e)),typeof e.WebGL2RenderingContext!="undefined"&&r.push(...jo(e.WebGL2RenderingContext.prototype,_e.WebGL2,i,t,s,e)),()=>{r.forEach(n=>n())}}const lc="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",gy=i=>Uint8Array.from(atob(i),e=>e.charCodeAt(0)),Yo=typeof self!="undefined"&&self.Blob&&new Blob([gy(lc)],{type:"text/javascript;charset=utf-8"});function yy(i){let e;try{if(e=Yo&&(self.URL||self.webkitURL).createObjectURL(Yo),!e)throw"";const t=new Worker(e,{name:i==null?void 0:i.name});return t.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),t}catch(t){return new Worker("data:text/javascript;base64,"+lc,{name:i==null?void 0:i.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}class by{constructor(e){b(this,"pendingCanvasMutations",new Map),b(this,"rafStamps",{latestId:0,invokeId:null}),b(this,"mirror"),b(this,"mutationCb"),b(this,"resetObservers"),b(this,"frozen",!1),b(this,"locked",!1),b(this,"processMutation",(a,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(c)});const{sampling:t="all",win:s,blockClass:r,blockSelector:n,recordCanvas:o,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&t==="all"&&this.initCanvasMutationObserver(s,r,n),o&&typeof t=="number"&&this.initCanvasFPSObserver(t,s,r,n,{dataURLOptions:l})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,s,r,n){const o=Go(t,s,r,!0),l=new Map,a=new yy;a.onmessage=m=>{const{id:y}=m.data;if(l.set(y,!1),!("base64"in m.data))return;const{base64:p,type:g,width:S,height:v}=m.data;this.mutationCb({id:y,type:_e["2D"],commands:[{property:"clearRect",args:[0,0,S,v]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:p}],type:g}]},0,0]}]})};const c=1e3/e;let u=0,h;const d=()=>{const m=[];return t.document.querySelectorAll("canvas").forEach(y=>{le(y,s,r,!0)||m.push(y)}),m},f=m=>{if(u&&m-u<c){h=requestAnimationFrame(f);return}u=m,d().forEach(async y=>{var p;const g=this.mirror.getId(y);if(l.get(g)||y.width===0||y.height===0)return;if(l.set(g,!0),["webgl","webgl2"].includes(y.__context)){const v=y.getContext(y.__context);((p=v==null?void 0:v.getContextAttributes())==null?void 0:p.preserveDrawingBuffer)===!1&&v.clear(v.COLOR_BUFFER_BIT)}const S=await createImageBitmap(y);a.postMessage({id:g,bitmap:S,width:y.width,height:y.height,dataURLOptions:n.dataURLOptions},[S])}),h=requestAnimationFrame(f)};h=requestAnimationFrame(f),this.resetObservers=()=>{o(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,s){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const r=Go(e,t,s,!1),n=fy(this.processMutation.bind(this),e,t,s),o=my(this.processMutation.bind(this),e,t,s);this.resetObservers=()=>{r(),n(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const s=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,s)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const s=this.pendingCanvasMutations.get(e);if(!s||t===-1)return;const r=s.map(o=>{const c=o,{type:l}=c;return Qe(c,["type"])}),{type:n}=s[0];this.mutationCb({id:t,type:n,commands:r}),this.pendingCanvasMutations.delete(e)}}function Zo(i,e,t){var u,h,d,f,m,y;const s=(u=t==null?void 0:t.root)!=null?u:null,r=(h=t==null?void 0:t.threshold)!=null?h:.5,n=(d=t==null?void 0:t.sensitivity)!=null?d:.05,o=wy((f=t==null?void 0:t.rootMargin)!=null?f:"0px"),l=new Map,a=vy(s),c=Sy(a,o);for(const p of i){const g=p.getBoundingClientRect();let S=Ey(),v=0;g.width>0&&g.height>0&&(S=Cy(g,c),v=xy(g,S),v=Math.round(v*100)/100);const w=My(p),C=(m=e.get(p))!=null?m:null,x=(y=C==null?void 0:C.intersectionRatio)!=null?y:0,R=v,T=(C==null?void 0:C.isStyleVisible)&&x>r,z=w&&R>r;!C||T!==z||T!==z&&Math.abs(R-x)>n?l.set(p,{target:p,isVisible:z,isStyleVisible:w,intersectionRatio:R,intersectionRect:S,oldValue:C}):l.set(p,C)}return l}function wy(i){const e=i.trim().split(/\s+/),t=(s,r)=>s.endsWith("%")?parseFloat(s)/100*r:parseFloat(s)||0;return function(s){const r=t(e[0]||"0px",s.height),n=t(e[1]||e[0]||"0px",s.width),o=t(e[2]||e[0]||"0px",s.height),l=t(e[3]||e[1]||e[0]||"0px",s.width);return{top:r,right:n,bottom:o,left:l,width:0,height:0}}}function vy(i){return i?i.getBoundingClientRect():new DOMRect(0,0,window.innerWidth,window.innerHeight)}function Sy(i,e){const t=e(i);return new DOMRect(i.left-t.left,i.top-t.top,i.width+t.left+t.right,i.height+t.top+t.bottom)}function Cy(i,e){const t=Math.max(i.top,e.top),s=Math.max(i.left,e.left),r=Math.min(i.bottom,e.bottom),n=Math.min(i.right,e.right),o=Math.max(0,n-s),l=Math.max(0,r-t);return{top:t,left:s,bottom:r,right:n,width:o,height:l}}function xy(i,e){const t=i.width*i.height,s=e.width*e.height;return t>0?s/t:0}function Ey(){return{top:0,left:0,right:0,bottom:0,width:0,height:0}}function My(i){const e=getComputedStyle(i);return e&&e.display!=="none"&&e.visibility!=="hidden"&&parseFloat(e.opacity||"1")>0}class Ay{constructor(e){var c,u,h,d,f,m;b(this,"frozen",!1),b(this,"locked",!1),b(this,"pending",new Map),b(this,"mirror"),b(this,"mutationCb"),b(this,"rafId",null),b(this,"intervalId",null),b(this,"rafThrottle"),b(this,"lastFlushTime",0),b(this,"elements",new Set),b(this,"previousState",new Map),b(this,"root",null),b(this,"threshold"),b(this,"sensitivity"),b(this,"rootMargin"),b(this,"hasInitialized",!1),b(this,"mode","none"),b(this,"debounce",50),b(this,"throttle",100),b(this,"buffer",new Map),b(this,"debounceTimer",null),b(this,"lastThrottleTime",0),b(this,"disabled",!1),b(this,"notifyActivity");const{doc:t,mirror:s,sampling:r,mutationCb:n,notifyActivity:o}=e;if(this.mirror=s,this.mutationCb=n,this.notifyActivity=o,this.rootMargin="0px",r===!1){this.disabled=!0;return}const l=typeof r=="object"&&r!==null?r:{};this.mode=(c=l==null?void 0:l.mode)!=null?c:"none",this.debounce=Number((u=l==null?void 0:l.debounce)!=null?u:100),this.throttle=Number((h=l==null?void 0:l.throttle)!=null?h:100),this.threshold=Number((d=l==null?void 0:l.threshold)!=null?d:.5),this.sensitivity=Number((f=l==null?void 0:l.sensitivity)!=null?f:.05),this.rafThrottle=Number((m=l==null?void 0:l.rafThrottle)!=null?m:50),t.querySelectorAll("*").forEach(y=>this.observe(y)),new MutationObserver(y=>{y.forEach(p=>{p.addedNodes.forEach(g=>{g.nodeType===Node.ELEMENT_NODE&&(this.observe(g),g.querySelectorAll("*").forEach(S=>this.observe(S)))}),p.removedNodes.forEach(g=>{g.nodeType===Node.ELEMENT_NODE&&this.unobserve(g)})})}).observe(t.body,{childList:!0,subtree:!0}),this.startPendingFlushLoop()}startPendingFlushLoop(){if(!this.disabled)if(typeof requestAnimationFrame=="function"){const e=t=>{t-this.lastFlushTime>=this.rafThrottle&&(this.lastFlushTime=t,this.flushPendingVisibilityMutations()),this.rafId=requestAnimationFrame(e)};this.rafId=requestAnimationFrame(e)}else{const e=()=>{const t=performance.now();t-this.lastFlushTime>=this.rafThrottle&&(this.lastFlushTime=t,this.flushPendingVisibilityMutations())};this.intervalId=setInterval(e,this.rafThrottle)}}flushPendingVisibilityMutations(){if(this.disabled||this.frozen||this.locked||this.elements.size===0)return;const e=Zo(this.elements,this.previousState,{root:this.root,threshold:this.threshold,sensitivity:this.sensitivity,rootMargin:this.rootMargin});for(const[t,s]of e.entries()){const r=this.previousState.get(t);if(!r||r.isVisible!==s.isVisible||Math.abs(r.intersectionRatio-s.intersectionRatio)>this.sensitivity){const o=this.mirror.getId(t);o!==-1&&this.buffer.set(t,{id:o,isVisible:s.isVisible,ratio:s.intersectionRatio}),this.previousState.set(t,s)}}if(this.previousState=e,!this.hasInitialized){this.hasInitialized=!0,this.buffer.clear();return}this.scheduleEmit()}scheduleEmit(){if(this.mode==="debounce")clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this.flushBuffer(),this.debounce);else if(this.mode==="throttle"){const e=performance.now();e-this.lastThrottleTime>=this.throttle&&(this.lastThrottleTime=e,this.flushBuffer())}else this.flushBuffer()}flushBuffer(){var e;if(this.frozen||this.locked||this.buffer.size===0)return;const t=Array.from(this.buffer.values()),s=t.length;this.buffer.clear(),this.mutationCb({mutations:t}),(e=this.notifyActivity)==null||e.call(this,s)}observe(e){this.disabled||this.elements.add(e)}unobserve(e){this.disabled||(this.elements.delete(e),this.previousState.delete(e),this.pending.delete(e))}freeze(){this.frozen=!0,this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null)}unfreeze(){this.frozen=!1,this.flushPendingVisibilityMutations()}lock(){this.locked=!0,this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null)}unlock(){this.locked=!1,this.buffer.clear(),this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null),!this.disabled&&this.elements.size>0&&(this.previousState=Zo(this.elements,new Map,{root:this.root,threshold:this.threshold,sensitivity:this.sensitivity,rootMargin:this.rootMargin}))}unsetFrozen(){this.frozen=!1}reset(){this.elements.clear(),this.previousState.clear(),this.pending.clear(),this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=null),this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null)}}const Iy=150,Ny=5e3,Ry=100;class Ty{constructor(e){var n,o,l;b(this,"frozen",!1),b(this,"locked",!1),b(this,"disabled",!1),b(this,"settleTimeout"),b(this,"maxWait"),b(this,"debounceMs"),b(this,"settlingObserver",null),b(this,"debounceTimer",null),b(this,"settleCheckTimer",null),b(this,"maxWaitTimer",null),b(this,"lastMutationTime",0),b(this,"pendingNavigation",null),b(this,"doc"),b(this,"onSnapshot");const{doc:t,config:s,onSnapshot:r}=e;this.doc=t,this.onSnapshot=L(r),this.settleTimeout=(n=s.settleTimeout)!=null?n:Iy,this.maxWait=(o=s.maxWait)!=null?o:Ny,this.debounceMs=(l=s.debounce)!=null?l:Ry}handleNavigation(e){this.disabled||this.locked||(this.cancelTimers(),this.disconnectSettlingObserver(),this.pendingNavigation=e,!this.frozen&&this.startDebounce())}cancelPending(){this.cancelTimers(),this.disconnectSettlingObserver(),this.pendingNavigation=null}freeze(){this.frozen=!0,this.cancelTimers(),this.disconnectSettlingObserver()}unfreeze(){this.frozen=!1,this.pendingNavigation&&!this.locked&&!this.disabled&&this.startDebounce()}lock(){this.locked=!0,this.cancelTimers(),this.disconnectSettlingObserver()}unlock(){this.locked=!1,this.pendingNavigation=null}unsetFrozen(){this.frozen=!1}reset(){this.cancelTimers(),this.disconnectSettlingObserver(),this.pendingNavigation=null,this.frozen=!1,this.locked=!1}destroy(){const e=this.pendingNavigation!==null;this.reset(),this.disabled=!0,e&&this.onSnapshot(!0)}startDebounce(){this.debounceTimer=setTimeout(()=>{this.debounceTimer=null,this.startDOMSettling()},this.debounceMs)}startDOMSettling(){if(this.frozen||this.locked||this.disabled)return;this.lastMutationTime=performance.now();const e=rn();this.settlingObserver=new e(()=>{this.lastMutationTime=performance.now(),this.settleCheckTimer!==null&&clearTimeout(this.settleCheckTimer),this.settleCheckTimer=setTimeout(()=>this.checkSettled(),this.settleTimeout)}),this.settlingObserver.observe(this.doc,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),this.settleCheckTimer=setTimeout(()=>this.checkSettled(),this.settleTimeout),this.maxWaitTimer=setTimeout(()=>{this.maxWaitTimer=null,this.completeSettling()},this.maxWait)}checkSettled(){this.settleCheckTimer=null;const e=performance.now()-this.lastMutationTime;e>=this.settleTimeout?this.completeSettling():this.settleCheckTimer=setTimeout(()=>this.checkSettled(),this.settleTimeout-e)}completeSettling(){this.frozen||this.locked||this.disabled||this.pendingNavigation&&(this.cancelTimers(),this.disconnectSettlingObserver(),this.pendingNavigation=null,this.onSnapshot(!0))}cancelTimers(){this.debounceTimer!==null&&(clearTimeout(this.debounceTimer),this.debounceTimer=null),this.settleCheckTimer!==null&&(clearTimeout(this.settleCheckTimer),this.settleCheckTimer=null),this.maxWaitTimer!==null&&(clearTimeout(this.maxWaitTimer),this.maxWaitTimer=null)}disconnectSettlingObserver(){this.settlingObserver&&(this.settlingObserver.disconnect(),this.settlingObserver=null)}}class Oy{constructor(e){b(this,"trackedLinkElements",new WeakSet),b(this,"mutationCb"),b(this,"adoptedStyleSheetCb"),b(this,"styleMirror",new fn),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;const s={id:t,styleIds:[]},r=[];for(const n of e){let o;this.styleMirror.has(n)?o=this.styleMirror.getId(n):(o=this.styleMirror.add(n),r.push({styleId:o,rules:Array.from(n.rules||CSSRule,(l,a)=>({rule:na(l,n.href),index:a}))})),s.styleIds.push(o)}r.length>0&&(s.styles=r),this.adoptedStyleSheetCb(s)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Dy{constructor(){b(this,"nodeMap",new WeakMap),b(this,"active",!1)}inOtherBuffer(e,t){const s=this.nodeMap.get(e);return s&&Array.from(s).some(r=>r!==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(){}}const $y="3.4.0-alpha.1";let te,Fe,Pi,jt=!1;const Js=[];let Rt;try{if(Array.from([1],i=>i*2)[0]!==2){const i=document.createElement("iframe");document.body.appendChild(i),Array.from=((In=i.contentWindow)==null?void 0:In.Array.from)||Array.from,document.body.removeChild(i)}}catch(i){console.debug("Unable to override Array.from",i)}const ge=oa();function de(i={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:s,checkoutEveryNvm:r,checkoutDebounce:n,blockClass:o="rr-block",blockSelector:l=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,excludeAttribute:u,maskTextClass:h="rr-mask",maskTextSelector:d=null,inlineStylesheet:f=!0,maskAllInputs:m,maskInputOptions:y,slimDOMOptions:p,maskInputFn:g,maskTextFn:S,hooks:v,packFn:w,sampling:C={},dataURLOptions:x={},mousemoveWait:R,recordDOM:T=!0,recordCanvas:z=!1,recordCrossOriginIframes:U=!1,recordAfter:P=i.recordAfter==="DOMContentLoaded"?i.recordAfter:"load",flushCustomEvent:j=i.flushCustomEvent!==void 0?i.flushCustomEvent:"after",userTriggeredOnInput:J=!1,collectFonts:ie=!1,inlineImages:N=!1,plugins:F,keepIframeSrcFn:W=()=>!1,ignoreCSSAttributes:q=new Set([]),selector:ce,errorHandler:Le}=i;jg(Le);const be=U?window.parent===window:!0;let wt=!1;if(!be)try{window.parent.document&&(wt=!1)}catch(O){wt=!0}if(be&&!e)throw new Error("emit function is required");if(!be&&!wt)return()=>{};R!==void 0&&C.mousemove===void 0&&(C.mousemove=R),ge.reset();const di=u===void 0?/.^/:u,fi=m===!0?{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}:y!==void 0?y:{password:!0},pi=p===!0||p==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:p==="all",headMetaDescKeywords:p==="all",headTitleMutations:p==="all"}:p||{},bn=zg(ce);cn();let wn,mi=0,Kt=0,vn=0,Pe=!1,fe=null,Ke=null;const Sn=O=>{for(const he of F||[])he.eventProcessor&&(O=he.eventProcessor(O));return w&&!wt&&(O=w(O)),O},Qt=()=>{fe=null,Pe=!1,Ke=null,ue==null||ue.cancelPending(),Fe(!0),we.forEach(O=>{O.resetBuffers(),O.unsetFrozen()}),ae&&ae.unsetFrozen(),ue&&ue.unsetFrozen()};te=(O,he)=>{var X;const K=O;if(K.timestamp=ye(),K.checkoutId=vn,(X=we[0])!=null&&X.isFrozen()&&!Pe&&K.type!==I.FullSnapshot&&!(K.type===I.IncrementalSnapshot&&K.data.source===E.Mutation)&&(we.forEach(me=>me.unfreeze()),ae==null||ae.unfreeze(),ue==null||ue.unfreeze()),be)e==null||e(Sn(K),he);else if(wt){const me={type:"rrweb",event:Sn(K),isCheckout:he};window.parent.postMessage(me,"*")}if(K.type===I.FullSnapshot)wn=K,mi=0,Kt=0;else if(K.type===I.IncrementalSnapshot){if(K.data.source===E.Mutation&&K.data.isAttachIframe)return;if(K.data.source!==E.Visibility){mi++;const me=s&&mi>=s,G=t&&K.timestamp-wn.timestamp>t;if(me||G)if(n){Pe||(Pe=!0,Ke=ye(),we.forEach(wc=>wc.freeze()),ae==null||ae.freeze()),fe&&clearTimeout(fe);const vt=ye()-Ke,bc=n*3;vt>=bc?Qt():fe=setTimeout(()=>Qt(),n)}else Fe(!0)}}};const es=O=>{te({type:I.IncrementalSnapshot,data:A({source:E.Mutation},O)})},mc=O=>{te({type:I.IncrementalSnapshot,data:A({source:E.Visibility},O)})},Cn=O=>te({type:I.IncrementalSnapshot,data:A({source:E.Scroll},O)}),xn=O=>te({type:I.IncrementalSnapshot,data:A({source:E.CanvasMutation},O)}),gc=O=>te({type:I.IncrementalSnapshot,data:A({source:E.AdoptedStyleSheet},O)}),Ze=new Oy({mutationCb:es,adoptedStyleSheetCb:gc}),Xe=new ly({mirror:ge,mutationCb:es,stylesheetManager:Ze,recordCrossOriginIframes:U,wrappedEmit:te});for(const O of F||[])O.getMirror&&O.getMirror({nodeMirror:ge,crossOriginIframeMirror:Xe.crossOriginIframeMirror,crossOriginIframeStyleMirror:Xe.crossOriginIframeStyleMirror});const gi=new Dy;Pi=new by({recordCanvas:z,mutationCb:xn,win:window,blockClass:o,blockSelector:l,mirror:ge,sampling:C.canvas,dataURLOptions:x});const ts=new cy({mutationCb:es,scrollCb:Cn,bypassOptions:{blockClass:o,blockSelector:l,maskTextClass:h,maskTextSelector:d,excludeAttribute:di,inlineStylesheet:f,maskInputOptions:fi,dataURLOptions:x,maskTextFn:S,maskInputFn:g,recordCanvas:z,inlineImages:N,sampling:C,slimDOMOptions:pi,iframeManager:Xe,stylesheetManager:Ze,canvasManager:Pi,keepIframeSrcFn:W,processedNodeManager:gi,selectorOptions:bn},mirror:ge}),yc=T&&(r!=null||(C==null?void 0:C.visibility)!==void 0&&(C==null?void 0:C.visibility)!==!1);let ae;if(yc){const O=typeof(C==null?void 0:C.visibility)=="object"&&(C==null?void 0:C.visibility)!==null?C.visibility:{},he=O.recordVisibility===!0;ae=new Ay({doc:document,mirror:ge,sampling:O,mutationCb:he?mc:()=>{},notifyActivity:r!=null?X=>{if(Kt+=X,Kt>=r)if(Kt=0,n){Pe||(Pe=!0,Ke=ye(),we.forEach(G=>G.freeze()),ae==null||ae.freeze()),fe&&clearTimeout(fe);const K=ye()-Ke,me=n*3;K>=me?Qt():fe=setTimeout(()=>Qt(),n)}else Fe(!0)}:void 0})}Fe=(O=!1)=>{if(!T)return;vn++,te({type:I.Meta,data:{href:window.location.href,width:an(),height:on()}},O),Ze.reset(),ts.init(),we.forEach(X=>X.lock()),ae==null||ae.lock(),ue==null||ue.lock();const he=fh(document,{mirror:ge,blockClass:o,blockSelector:l,maskTextClass:h,maskTextSelector:d,excludeAttribute:di,inlineStylesheet:f,maskAllInputs:fi,maskTextFn:S,maskInputFn:g,slimDOM:pi,dataURLOptions:x,recordCanvas:z,inlineImages:N,onSerialize:X=>{ct(X,ge)&&Xe.addIframe(X),hn(X,ge)&&Ze.trackLinkElement(X),Ue(X)&&ts.addShadowRoot(k.shadowRoot(X),document)},onIframeLoad:(X,K)=>{Xe.attachIframe(X,K),ts.observeAttachShadow(X)},onStylesheetLoad:(X,K)=>{Ze.attachLinkElement(X,K)},keepIframeSrcFn:W,selector:ce});if(!he)return console.warn("Failed to snapshot the document");te({type:I.FullSnapshot,data:{node:he,initialOffset:nn(window)}},O),we.forEach(X=>X.unlock()),ae==null||ae.unlock(),ue==null||ue.unlock(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Ze.adoptStyleSheets(document.adoptedStyleSheets,ge.getId(document))},Rt=()=>{for(const O of Js)te(O);Js.length=0};let ue;const yi=C.navigation;if(yi!==!1){const O=typeof yi=="object"?yi:{};ue=new Ty({doc:document,config:O,onSnapshot:he=>{Pe&&(fe&&(clearTimeout(fe),fe=null),Pe=!1,Ke=null,we.forEach(X=>{X.resetBuffers(),X.unsetFrozen()}),ae==null||ae.unsetFrozen()),Fe(he)}})}try{const O=[],he=K=>{var me;return L(ay)({mutationCb:es,mousemoveCb:(G,vt)=>te({type:I.IncrementalSnapshot,data:{source:vt,positions:G}}),mouseInteractionCb:G=>te({type:I.IncrementalSnapshot,data:A({source:E.MouseInteraction},G)}),scrollCb:Cn,viewportResizeCb:G=>te({type:I.IncrementalSnapshot,data:A({source:E.ViewportResize},G)}),navigationCb:G=>{ue?ue.handleNavigation(G):Fe(!0)},inputCb:G=>te({type:I.IncrementalSnapshot,data:A({source:E.Input},G)}),mediaInteractionCb:G=>te({type:I.IncrementalSnapshot,data:A({source:E.MediaInteraction},G)}),styleSheetRuleCb:G=>te({type:I.IncrementalSnapshot,data:A({source:E.StyleSheetRule},G)}),styleDeclarationCb:G=>te({type:I.IncrementalSnapshot,data:A({source:E.StyleDeclaration},G)}),canvasMutationCb:xn,visibilityManager:ae,fontCb:G=>te({type:I.IncrementalSnapshot,data:A({source:E.Font},G)}),selectionCb:G=>{te({type:I.IncrementalSnapshot,data:A({source:E.Selection},G)})},customElementCb:G=>{te({type:I.IncrementalSnapshot,data:A({source:E.CustomElement},G)})},blockClass:o,ignoreClass:a,ignoreSelector:c,maskTextClass:h,maskTextSelector:d,excludeAttribute:di,maskInputOptions:fi,inlineStylesheet:f,sampling:C,recordDOM:T,recordCanvas:z,inlineImages:N,userTriggeredOnInput:J,collectFonts:ie,doc:K,maskInputFn:g,maskTextFn:S,keepIframeSrcFn:W,blockSelector:l,slimDOMOptions:pi,dataURLOptions:x,selectorOptions:bn,mirror:ge,iframeManager:Xe,stylesheetManager:Ze,shadowDomManager:ts,processedNodeManager:gi,canvasManager:Pi,ignoreCSSAttributes:q,plugins:((me=F==null?void 0:F.filter(G=>G.observer))==null?void 0:me.map(G=>({observer:G.observer,options:G.options,callback:vt=>te({type:I.Plugin,data:{plugin:G.name,payload:vt}})})))||[]},v)};Xe.addLoadListener(K=>{try{O.push(he(K.contentDocument))}catch(me){console.warn(me)}});const X=()=>{j==="before"&&Rt(),Fe(),O.push(he(document)),jt=!0,j==="after"&&Rt()};return document.readyState==="interactive"||document.readyState==="complete"?X():(O.push(ne("DOMContentLoaded",()=>{te({type:I.DomContentLoaded,data:{}}),P==="DOMContentLoaded"&&X()})),O.push(ne("load",()=>{te({type:I.Load,data:{}}),P==="load"&&X()},window))),()=>{fe&&(clearTimeout(fe),fe=null),Rt(),O.forEach(K=>K()),ue==null||ue.destroy(),gi.destroy(),jt=!1,Yg()}}catch(O){console.warn(O)}}de.getVersion=()=>$y;de.isRecording=()=>jt;de.flushCustomEventQueue=()=>{console.warn(`[rrweb] CustomEvent flushing: ${Js.length} events`),Rt()};de.addCustomEvent=(i,e)=>{const t={type:I.Custom,data:{tag:i,payload:e}};if(!jt){console.warn(`[rrweb] CustomEvent buffered before/after recording start: ${i}`),Js.push(t);return}te(t)};de.freezePage=()=>{we.forEach(i=>i.freeze())};de.takeFullSnapshot=i=>{if(!jt)throw new Error("please take full snapshot after start recording");Fe(i)};de.mirror=ge;function cc(i){return{all:i=i||new Map,on:function(e,t){var s=i.get(e);s?s.push(t):i.set(e,[t])},off:function(e,t){var s=i.get(e);s&&(t?s.splice(s.indexOf(t)>>>0,1):i.set(e,[]))},emit:function(e,t){var s=i.get(e);s&&s.slice().map(function(r){r(t)}),(s=i.get("*"))&&s.slice().map(function(r){r(e,t)})}}}const ky=Object.freeze(Object.defineProperty({__proto__:null,default:cc},Symbol.toStringTag,{value:"Module"}));function _y(i=window,e=document){if("scrollBehavior"in e.documentElement.style&&i.__forceSmoothScrollPolyfill__!==!0)return;const t=i.HTMLElement||i.Element,s=468,r={scroll:i.scroll||i.scrollTo,scrollBy:i.scrollBy,elementScroll:t.prototype.scroll||a,scrollIntoView:t.prototype.scrollIntoView},n=i.performance&&i.performance.now?i.performance.now.bind(i.performance):Date.now;function o(g){const S=["MSIE ","Trident/","Edge/"];return new RegExp(S.join("|")).test(g)}const l=o(i.navigator.userAgent)?1:0;function a(g,S){this.scrollLeft=g,this.scrollTop=S}function c(g){return .5*(1-Math.cos(Math.PI*g))}function u(g){if(g===null||typeof g!="object"||g.behavior===void 0||g.behavior==="auto"||g.behavior==="instant")return!0;if(typeof g=="object"&&g.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+g.behavior+" is not a valid value for enumeration ScrollBehavior.")}function h(g,S){if(S==="Y")return g.clientHeight+l<g.scrollHeight;if(S==="X")return g.clientWidth+l<g.scrollWidth}function d(g,S){const v=i.getComputedStyle(g,null)["overflow"+S];return v==="auto"||v==="scroll"}function f(g){const S=h(g,"Y")&&d(g,"Y"),v=h(g,"X")&&d(g,"X");return S||v}function m(g){for(;g!==e.body&&f(g)===!1;)g=g.parentNode||g.host;return g}function y(g){const S=n();let v,w,C,x=(S-g.startTime)/s;x=x>1?1:x,v=c(x),w=g.startX+(g.x-g.startX)*v,C=g.startY+(g.y-g.startY)*v,g.method.call(g.scrollable,w,C),(w!==g.x||C!==g.y)&&i.requestAnimationFrame(y.bind(i,g))}function p(g,S,v){let w,C,x,R;const T=n();g===e.body?(w=i,C=i.scrollX||i.pageXOffset,x=i.scrollY||i.pageYOffset,R=r.scroll):(w=g,C=g.scrollLeft,x=g.scrollTop,R=a),y({scrollable:w,method:R,startTime:T,startX:C,startY:x,x:S,y:v})}i.scroll=i.scrollTo=function(){if(arguments[0]!==void 0){if(u(arguments[0])===!0){r.scroll.call(i,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:i.scrollX||i.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:i.scrollY||i.pageYOffset);return}p.call(i,e.body,arguments[0].left!==void 0?~~arguments[0].left:i.scrollX||i.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:i.scrollY||i.pageYOffset)}},i.scrollBy=function(){if(arguments[0]!==void 0){if(u(arguments[0])){r.scrollBy.call(i,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}p.call(i,e.body,~~arguments[0].left+(i.scrollX||i.pageXOffset),~~arguments[0].top+(i.scrollY||i.pageYOffset))}},t.prototype.scroll=t.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(u(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");r.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}const g=arguments[0].left,S=arguments[0].top;p.call(this,this,typeof g=="undefined"?this.scrollLeft:~~g,typeof S=="undefined"?this.scrollTop:~~S)},t.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(u(arguments[0])===!0){r.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},t.prototype.scrollIntoView=function(){if(u(arguments[0])===!0){r.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const g=m(this),S=g.getBoundingClientRect(),v=this.getBoundingClientRect();g!==e.body?(p.call(this,g,g.scrollLeft+v.left-S.left,g.scrollTop+v.top-S.top),i.getComputedStyle(g).position!=="fixed"&&i.scrollBy({left:S.left,top:S.top,behavior:"smooth"})):i.scrollBy({left:v.left,top:v.top,behavior:"smooth"})}}class Ly{constructor(e=[],t){b(this,"timeOffset",0),b(this,"speed"),b(this,"actions"),b(this,"raf",null),b(this,"lastTimestamp"),this.actions=e,this.speed=t.speed}addAction(e){const t=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=e.delay)this.actions.push(e);else{const s=this.findActionIndex(e);this.actions.splice(s,0,e)}t&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){const e=performance.now();for(this.timeOffset+=(e-this.lastTimestamp)*this.speed,this.lastTimestamp=e;this.actions.length;){const t=this.actions[0];if(this.timeOffset>=t.delay)this.actions.shift(),t.doAction();else break}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}clear(){this.raf&&(this.raf!==!0&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(e){this.speed=e}isActive(){return this.raf!==null}findActionIndex(e){let t=0,s=this.actions.length-1;for(;t<=s;){const r=Math.floor((t+s)/2);if(this.actions[r].delay<e.delay)t=r+1;else if(this.actions[r].delay>e.delay)s=r-1;else return r+1}return t}}function Xo(i,e){if(i.type===I.IncrementalSnapshot&&i.data.source===E.MouseMove&&i.data.positions&&i.data.positions.length){const t=i.data.positions[0].timeOffset,s=i.timestamp+t;return i.delay=s-e,s-e}return i.delay=i.timestamp-e,i.delay}/*! *****************************************************************************
|
|
80
80
|
Copyright (c) Microsoft Corporation.
|
|
81
81
|
|
|
82
82
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -89,7 +89,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
89
89
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
90
90
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
91
91
|
PERFORMANCE OF THIS SOFTWARE.
|
|
92
|
-
***************************************************************************** */function Jo(i,e){var t=typeof Symbol=="function"&&i[Symbol.iterator];if(!t)return i;var s,r,n=t.call(i),o=[];try{for(;(e===void 0||e-- >0)&&!(s=n.next()).done;)o.push(s.value)}catch(l){r={error:l}}finally{try{s&&!s.done&&(t=n.return)&&t.call(n)}finally{if(r)throw r.error}}return o}var lt;(function(i){i[i.NotStarted=0]="NotStarted",i[i.Running=1]="Running",i[i.Stopped=2]="Stopped"})(lt||(lt={}));var uc={type:"xstate.init"};function Fi(i){return i===void 0?[]:[].concat(i)}function it(i){return{type:"xstate.assign",assignment:i}}function qo(i,e){return typeof(i=typeof i=="string"&&e&&e[i]?e[i]:i)=="string"?{type:i}:typeof i=="function"?{type:i.name,exec:i}:i}function qs(i){return function(e){return i===e}}function hc(i){return typeof i=="string"?{type:i}:i}function Ko(i,e){return{value:i,context:e,actions:[],changed:!1,matches:qs(i)}}function Qo(i,e,t){var s=e,r=!1;return[i.filter(function(n){if(n.type==="xstate.assign"){r=!0;var o=Object.assign({},s);return typeof n.assignment=="function"?o=n.assignment(s,t):Object.keys(n.assignment).forEach(function(l){o[l]=typeof n.assignment[l]=="function"?n.assignment[l](s,t):n.assignment[l]}),s=o,!1}return!0}),s,r]}function dc(i,e){e===void 0&&(e={});var t=Jo(Qo(Fi(i.states[i.initial].entry).map(function(o){return qo(o,e.actions)}),i.context,uc),2),s=t[0],r=t[1],n={config:i,_options:e,initialState:{value:i.initial,actions:s,context:r,matches:qs(i.initial)},transition:function(o,l){var a,c,u=typeof o=="string"?{value:o,context:i.context}:o,h=u.value,d=u.context,f=hc(l),m=i.states[h];if(m.on){var y=Fi(m.on[f.type]);try{for(var p=function(W){var q=typeof Symbol=="function"&&Symbol.iterator,ce=q&&W[q],Le=0;if(ce)return ce.call(W);if(W&&typeof W.length=="number")return{next:function(){return W&&Le>=W.length&&(W=void 0),{value:W&&W[Le++],done:!W}}};throw new TypeError(q?"Object is not iterable.":"Symbol.iterator is not defined.")}(y),g=p.next();!g.done;g=p.next()){var S=g.value;if(S===void 0)return Ko(h,d);var v=typeof S=="string"?{target:S}:S,w=v.target,C=v.actions,x=C===void 0?[]:C,R=v.cond,T=R===void 0?function(){return!0}:R,z=w===void 0,U=w!=null?w:h,P=i.states[U];if(T(d,f)){var j=Jo(Qo((z?Fi(x):[].concat(m.exit,x,P.entry).filter(function(W){return W})).map(function(W){return qo(W,n._options.actions)}),d,f),3),J=j[0],ie=j[1],N=j[2],F=w!=null?w:h;return{value:F,context:ie,actions:J,changed:w!==h||J.length>0||N,matches:qs(F)}}}}catch(W){a={error:W}}finally{try{g&&!g.done&&(c=p.return)&&c.call(p)}finally{if(a)throw a.error}}}return Ko(h,d)}};return n}var ea=function(i,e){return i.actions.forEach(function(t){var s=t.exec;return s&&s(i.context,e)})};function fc(i){var e=i.initialState,t=lt.NotStarted,s=new Set,r={_machine:i,send:function(n){t===lt.Running&&(e=i.transition(e,n),ea(e,hc(n)),s.forEach(function(o){return o(e)}))},subscribe:function(n){return s.add(n),n(e),{unsubscribe:function(){return s.delete(n)}}},start:function(n){if(n){var o=typeof n=="object"?n:{context:i.config.context,value:n};e={value:o.value,actions:[],context:o.context,matches:qs(o.value)}}return t=lt.Running,ea(e,uc),r},stop:function(){return t=lt.Stopped,s.clear(),r},get state(){return e},get status(){return t}};return r}function Py(i,e){for(let t=i.length-1;t>=0;t--){const s=i[t];if(s.type===I.Meta&&s.timestamp<=e)return i.slice(t)}return i}function Fy(i,{getCastFn:e,applyEventsSynchronously:t,emitter:s}){const r=dc({id:"player",context:i,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:it({lastPlayedEvent:(n,o)=>o.type==="CAST_EVENT"?o.payload.event:n.lastPlayedEvent}),recordTimeOffset:it((n,o)=>{let l=n.timeOffset;return"payload"in o&&"timeOffset"in o.payload&&(l=o.payload.timeOffset),re(M({},n),{timeOffset:l,baselineTime:n.events[0].timestamp+l})}),play(n){var o;const{timer:l,events:a,baselineTime:c,lastPlayedEvent:u}=n;l.clear();for(const m of a)Xo(m,c);const h=Py(a,c);let d=u==null?void 0:u.timestamp;(u==null?void 0:u.type)===I.IncrementalSnapshot&&u.data.source===E.MouseMove&&(d=u.timestamp+((o=u.data.positions[0])==null?void 0:o.timeOffset)),c<(d||0)&&s.emit(V.PlayBack);const f=new Array;for(const m of h)if(!(d&&d<c&&(m.timestamp<=d||m===u)))if(m.timestamp<=c)f.push(m);else{const y=e(m,!1);l.addAction({doAction:()=>{y()},delay:m.delay})}t(f),s.emit(V.Flush),l.start()},pause(n){n.timer.clear()},resetLastPlayedEvent:it(n=>re(M({},n),{lastPlayedEvent:null})),startLive:it({baselineTime:(n,o)=>(n.timer.start(),o.type==="TO_LIVE"&&o.payload.baselineTime?o.payload.baselineTime:Date.now())}),addEvent:it((n,o)=>{const{baselineTime:l,timer:a,events:c}=n;if(o.type==="ADD_EVENT"){const{event:u}=o.payload;Xo(u,l);let h=c.length-1;if(!c[h]||c[h].timestamp<=u.timestamp)c.push(u);else{let m=-1,y=0;for(;y<=h;){const p=Math.floor((y+h)/2);c[p].timestamp<=u.timestamp?y=p+1:h=p-1}m===-1&&(m=y),c.splice(m,0,u)}const d=u.timestamp<l,f=e(u,d);d?f():a.isActive()&&a.addAction({doAction:()=>{f()},delay:u.delay})}return re(M({},n),{events:c})})}});return fc(r)}function zy(i){const e=dc({id:"speed",context:i,initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:(t,s)=>{"payload"in s&&t.timer.setSpeed(s.payload.speed)},recordSpeed:it({normalSpeed:t=>t.timer.speed}),restoreSpeed:t=>{t.timer.setSpeed(t.normalSpeed)}}});return fc(e)}const By=i=>[`.${i} { background: currentColor }`,"noscript { display: none !important; }"],ta=new Map;function pc(i,e){let t=ta.get(i);return t||(t=new Map,ta.set(i,t)),t.has(e)||t.set(e,[]),t.get(e)}function He(i,e,t){return async s=>{if(s&&typeof s=="object"&&"rr_type"in s)if(t&&(t.isUnchanged=!1),s.rr_type==="ImageBitmap"&&"args"in s){const r=await He(i,e,t)(s.args);return await createImageBitmap.apply(null,r)}else if("index"in s){if(t||e===null)return s;const{rr_type:r,index:n}=s;return pc(e,r)[n]}else if("args"in s){const{rr_type:r,args:n}=s,o=window[r];return new o(...await Promise.all(n.map(He(i,e,t))))}else{if("base64"in s)return hy(s.base64);if("src"in s){const r=i.get(s.src);if(r)return r;{const n=new Image;return n.src=s.src,i.set(s.src,n),n}}else if("data"in s&&s.rr_type==="Blob"){const r=await Promise.all(s.data.map(He(i,e,t)));return new Blob(r,{type:s.type})}}else if(Array.isArray(s))return await Promise.all(s.map(He(i,e,t)));return s}}function Wy(i,e){try{return e===_e.WebGL?i.getContext("webgl")||i.getContext("experimental-webgl"):i.getContext("webgl2")}catch(t){return null}}const Uy=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function Vy(i,e){if(!(e!=null&&e.constructor))return;const{name:t}=e.constructor;if(!Uy.includes(t))return;const s=pc(i,t);s.includes(e)||s.push(e)}async function Hy({mutation:i,target:e,type:t,imageMap:s,errorHandler:r}){try{const n=Wy(e,t);if(!n)return;if(i.setter){n[i.property]=i.args[0];return}const o=n[i.property],l=await Promise.all(i.args.map(He(s,n))),a=o.apply(n,l);Vy(n,a);const c=!1}catch(n){r(i,n)}}async function Gy({event:i,mutations:e,target:t,imageMap:s,errorHandler:r}){const n=t.getContext("2d");if(!n){r(e[0],new Error("Canvas context is null"));return}const o=e.map(async a=>Promise.all(a.args.map(He(s,n))));(await Promise.all(o)).forEach((a,c)=>{const u=e[c];try{if(u.setter){n[u.property]=u.args[0];return}const h=n[u.property];u.property==="drawImage"&&typeof u.args[0]=="string"?(s.get(i),h.apply(n,u.args)):h.apply(n,a)}catch(h){r(u,h)}})}async function Er({event:i,mutation:e,target:t,imageMap:s,canvasEventMap:r,errorHandler:n}){try{const o=r.get(i)||e,l="commands"in o?o.commands:[o];if([_e.WebGL,_e.WebGL2].includes(e.type)){for(let a=0;a<l.length;a++){const c=l[a];await Hy({mutation:c,type:e.type,target:t,imageMap:s,errorHandler:n})}return}await Gy({event:i,mutations:l,target:t,imageMap:s,errorHandler:n})}catch(o){n(e,o)}}class jy{constructor(e){b(this,"mediaMap",new Map),b(this,"warn"),b(this,"service"),b(this,"speedService"),b(this,"emitter"),b(this,"getCurrentTime"),b(this,"metadataCallbackMap",new Map),this.warn=e.warn,this.service=e.service,this.speedService=e.speedService,this.emitter=e.emitter,this.getCurrentTime=e.getCurrentTime,this.emitter.on(V.Start,this.start.bind(this)),this.emitter.on(V.SkipStart,this.start.bind(this)),this.emitter.on(V.Pause,this.pause.bind(this)),this.emitter.on(V.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(e={pause:!1}){this.mediaMap.forEach((t,s)=>{this.syncTargetWithState(s),e.pause&&s.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:e,target:t,mediaState:s}){if(s.isPlaying){const n=(e-s.lastInteractionTimeOffset)/1e3*s.playbackRate,o="duration"in t&&t.duration;if(Number.isNaN(o)){this.waitForMetadata(t);return}let l=s.currentTimeAtLastInteraction+n;t.loop&&o!==!1&&(l=l%o),t.currentTime=l}else t.pause(),t.currentTime=s.currentTimeAtLastInteraction}waitForMetadata(e){if(this.metadataCallbackMap.has(e)||!("addEventListener"in e))return;const t=()=>{this.metadataCallbackMap.delete(e);const s=this.mediaMap.get(e);s&&this.seekTo({time:this.getCurrentTime(),target:e,mediaState:s})};this.metadataCallbackMap.set(e,t),e.addEventListener("loadedmetadata",t,{once:!0})}getMediaStateFromMutation({target:e,timeOffset:t,mutation:s}){var f,m,y,p,g;const r=this.mediaMap.get(e),{type:n,playbackRate:o,currentTime:l,muted:a,volume:c,loop:u}=s;return{isPlaying:n===Be.Play||n!==Be.Pause&&((r==null?void 0:r.isPlaying)||e.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(f=l!=null?l:r==null?void 0:r.currentTimeAtLastInteraction)!=null?f:0,lastInteractionTimeOffset:t,playbackRate:(m=o!=null?o:r==null?void 0:r.playbackRate)!=null?m:1,volume:(y=c!=null?c:r==null?void 0:r.volume)!=null?y:1,muted:(p=a!=null?a:r==null?void 0:r.muted)!=null?p:e.getAttribute("muted")===null,loop:(g=u!=null?u:r==null?void 0:r.loop)!=null?g:e.getAttribute("loop")===null}}syncTargetWithState(e){const t=this.mediaMap.get(e);if(!t)return;const{muted:s,loop:r,volume:n,isPlaying:o}=t,l=this.service.state.matches("paused"),a=t.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:e,mediaState:t}),e.volume!==n&&(e.volume=n),e.muted=s,e.loop=r,e.playbackRate!==a&&(e.playbackRate=a),o&&!l?e.play():e.pause()}catch(c){this.warn(`Failed to replay media interactions: ${c.message||c}`)}}addMediaElements(e,t,s){if(!["AUDIO","VIDEO"].includes(e.nodeName))return;const r=e,n=s.getMeta(r);if(!n||!("attributes"in n))return;const o=this.service.state.matches("paused"),l=n.attributes;let a=!1;l.rr_mediaState?a=l.rr_mediaState==="played":a=r.getAttribute("autoplay")!==null,a&&o&&r.pause();let c=1;typeof l.rr_mediaPlaybackRate=="number"&&(c=l.rr_mediaPlaybackRate);let u=!1;typeof l.rr_mediaMuted=="boolean"?u=l.rr_mediaMuted:u=r.getAttribute("muted")!==null;let h=!1;typeof l.rr_mediaLoop=="boolean"?h=l.rr_mediaLoop:h=r.getAttribute("loop")!==null;let d=1;typeof l.rr_mediaVolume=="number"&&(d=l.rr_mediaVolume);let f=0;typeof l.rr_mediaCurrentTime=="number"&&(f=l.rr_mediaCurrentTime),this.mediaMap.set(r,{isPlaying:a,currentTimeAtLastInteraction:f,lastInteractionTimeOffset:t,playbackRate:c,volume:d,muted:u,loop:h}),this.syncTargetWithState(r)}mediaMutation({target:e,timeOffset:t,mutation:s}){this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:t,mutation:s})),this.syncTargetWithState(e)}isSupportedMediaElement(e){return["AUDIO","VIDEO"].includes(e.nodeName)}reset(){this.mediaMap.clear()}}function Is(i,e){if(i.nodeName!=="DIALOG"||i instanceof Ce)return;const t=i,s=t.open,r=s&&t.matches("dialog:modal"),n=t.getAttribute("rr_open_mode"),o=typeof(e==null?void 0:e.attributes.open)=="string"||typeof t.getAttribute("open")=="string",l=n==="modal";if(!(s&&!(r&&n==="non-modal"||!r&&l))){if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}s&&t.close(),o&&(l?t.showModal():t.show())}}function Yy(i,e){if(i.nodeName!=="DIALOG"||i instanceof Ce)return;const t=i;if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}e.attributes.open===null&&(t.removeAttribute("open"),t.removeAttribute("rr_open_mode"))}const Zy=5*1e3,Xy=cc||ky,sa="[replayer]",zi={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function ia(i){return i.type==I.IncrementalSnapshot&&(i.data.source==E.TouchMove||i.data.source==E.MouseInteraction&&i.data.type==H.TouchStart)}class Jy{constructor(e,t){if(b(this,"wrapper"),b(this,"iframe"),b(this,"service"),b(this,"speedService"),b(this,"config"),b(this,"usingVirtualDom",!1),b(this,"virtualDom",new bt),b(this,"mouse"),b(this,"mouseTail",null),b(this,"tailPositions",[]),b(this,"emitter",Xy()),b(this,"nextUserInteractionEvent"),b(this,"legacy_missingNodeRetryMap",{}),b(this,"cache",oo()),b(this,"imageMap",new Map),b(this,"canvasEventMap",new Map),b(this,"mirror",oa()),b(this,"styleMirror",new fn),b(this,"mediaManager"),b(this,"firstFullSnapshot",null),b(this,"newDocumentQueue",[]),b(this,"mousePos",null),b(this,"touchActive",null),b(this,"lastMouseDownEvent",null),b(this,"lastHoveredRootNode"),b(this,"lastSelectionData",null),b(this,"constructedStyleMutations",[]),b(this,"adoptedStyleSheets",[]),b(this,"handleResize",l=>{this.iframe.style.display="inherit";for(const a of[this.mouseTail,this.iframe])a&&(a.setAttribute("width",String(l.width)),a.setAttribute("height",String(l.height)))}),b(this,"applyEventsSynchronously",l=>{for(const a of l){switch(a.type){case I.DomContentLoaded:case I.Load:case I.Custom:continue;case I.FullSnapshot:case I.Meta:case I.Plugin:case I.IncrementalSnapshot:break}this.getCastFn(a,!0)()}}),b(this,"getCastFn",(l,a=!1)=>{let c;switch(l.type){case I.DomContentLoaded:case I.Load:break;case I.Custom:c=()=>{this.emitter.emit(V.CustomEvent,l)};break;case I.Meta:c=()=>this.emitter.emit(V.Resize,{width:l.data.width,height:l.data.height});break;case I.FullSnapshot:c=()=>{var h;if(this.firstFullSnapshot){if(this.firstFullSnapshot===l){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(l,a),(h=this.iframe.contentWindow)==null||h.scrollTo(l.data.initialOffset)};break;case I.IncrementalSnapshot:c=()=>{if(this.applyIncremental(l,a),!a&&(l===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(const h of this.service.state.context.events)if(!(h.timestamp<=l.timestamp)&&this.isUserInteraction(h)){h.delay-l.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=h);break}if(this.nextUserInteractionEvent){const h=this.nextUserInteractionEvent.delay-l.delay,d={speed:Math.min(Math.round(h/Zy),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:d}),this.emitter.emit(V.SkipStart,d)}}};break}return()=>{c&&c();for(const d of this.config.plugins||[])d.handler&&d.handler(l,a,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:l}});const h=this.service.state.context.events.length-1;if(!this.config.liveMode&&l===this.service.state.context.events[h]){const d=()=>{h<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(V.Finish))};let f=50;l.type===I.IncrementalSnapshot&&l.data.source===E.MouseMove&&l.data.positions.length&&(f+=Math.max(0,-l.data.positions[0].timeOffset)),setTimeout(d,f)}this.emitter.emit(V.EventCast,l)}}),!(t!=null&&t.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");const s={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:10*1e3,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:zi,useVirtualDom:!0,logger:console};this.config=Object.assign({},s,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(V.Resize,this.handleResize),this.setupDom();for(const l of this.config.plugins||[])l.getMirror&&l.getMirror({nodeMirror:this.mirror});this.emitter.on(V.Flush,()=>{if(this.usingVirtualDom){const l={mirror:this.mirror,applyCanvas:(a,c,u)=>{Er({event:a,mutation:c,target:u,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(a,c)=>{a.source===E.StyleSheetRule?this.applyStyleSheetRule(a,c):a.source===E.StyleDeclaration&&this.applyStyleDeclaration(a,c)},afterAppend:(a,c)=>{for(const u of this.config.plugins||[])u.onBuild&&u.onBuild(a,{id:c,replayer:this})}};if(this.iframe.contentDocument)try{js(this.iframe.contentDocument,this.virtualDom,l,this.virtualDom.mirror)}catch(a){console.warn(a)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const a in this.legacy_missingNodeRetryMap)try{const c=this.legacy_missingNodeRetryMap[a],u=Ys(c.node,this.mirror,this.virtualDom.mirror);js(u,c.node,l,this.virtualDom.mirror),c.node=u}catch(c){this.warn(c)}this.constructedStyleMutations.forEach(a=>{this.applyStyleSheetMutation(a)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(a=>{this.applyAdoptedStyleSheet(a)}),this.adoptedStyleSheets=[]}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),this.touchActive===!0?this.mouse.classList.add("touch-active"):this.touchActive===!1&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){const[l,a]=this.lastMouseDownEvent;l.dispatchEvent(a)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(V.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});const r=new Ly([],{speed:this.config.speed});this.service=Fy({events:e.map(l=>t&&t.unpackFn?t.unpackFn(l):l).sort((l,a)=>l.timestamp-a.timestamp),timer:r,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(l=>{this.emitter.emit(V.StateChange,{player:l})}),this.speedService=zy({normalSpeed:-1,timer:r}),this.speedService.start(),this.speedService.subscribe(l=>{this.emitter.emit(V.StateChange,{speed:l})}),this.mediaManager=new jy({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const n=this.service.state.context.events.find(l=>l.type===I.Meta),o=this.service.state.context.events.find(l=>l.type===I.FullSnapshot);if(n){const{width:l,height:a}=n.data;setTimeout(()=>{this.emitter.emit(V.Resize,{width:l,height:a})},0)}o&&setTimeout(()=>{var l;this.firstFullSnapshot||(this.firstFullSnapshot=o,this.rebuildFullSnapshot(o),(l=this.iframe.contentWindow)==null||l.scrollTo(o.data.initialOffset))},1),this.service.state.context.events.find(ia)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(e,t){return this.emitter.on(e,t),this}off(e,t){return this.emitter.off(e,t),this}setConfig(e){Object.keys(e).forEach(t=>{e[t],this.config[t]=e[t]}),this.config.skipInactive||this.backToNormal(),typeof e.speed!="undefined"&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),typeof e.mouseTail!="undefined"&&(e.mouseTail===!1?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){const e=this.service.state.context.events[0],t=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:t.timestamp,totalTime:t.timestamp-e.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){const{baselineTime:e,events:t}=this.service.state.context;return e-t[0].timestamp}getMirror(){return this.mirror}play(e=0){var t,s;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:e}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:e}})),(s=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||s.classList.remove("rrweb-paused"),this.emitter.emit(V.Start)}pause(e){var t,s;e===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof e=="number"&&(this.play(e),this.service.send({type:"PAUSE"})),(s=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||s.classList.add("rrweb-paused"),this.emitter.emit(V.Pause)}resume(e=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(e),this.emitter.emit(V.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(V.Destroy)}startLive(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}addEvent(e){const t=this.config.unpackFn?this.config.unpackFn(e):e;ia(t)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:t}}))}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=oo()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.config.mouseTail!==!1&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");const e=["allow-same-origin","allow-scripts"];this.config.UNSAFE_replayCanvas,this.iframe.style.display="none",this.iframe.setAttribute("sandbox",e.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(_y(this.iframe.contentWindow,this.iframe.contentDocument),cn(this.iframe.contentWindow))}rebuildFullSnapshot(e,t=!1){if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};const s=[],r=new Set,n=(a,c)=>{if(a.nodeName==="DIALOG"&&r.add(a),this.collectIframeAndAttachDocument(s,a),this.mediaManager.isSupportedMediaElement(a)){const{events:u}=this.service.state.context;this.mediaManager.addMediaElements(a,e.timestamp-u[0].timestamp,this.mirror)}for(const u of this.config.plugins||[])u.onBuild&&u.onBuild(a,{id:c,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),ff(e.data.node,{doc:this.iframe.contentDocument,afterAppend:n,cache:this.cache,mirror:this.mirror}),n(this.iframe.contentDocument,e.data.node.id);for(const{mutationInQueue:a,builtNode:c}of s)this.attachDocumentToIframe(a,c),this.newDocumentQueue=this.newDocumentQueue.filter(u=>u!==a);const{documentElement:o,head:l}=this.iframe.contentDocument;this.insertStyleRules(o,l),r.forEach(a=>Is(a)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(V.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){var s;const r=By(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&r.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),!!r.length)if(this.usingVirtualDom){const n=this.virtualDom.createElement("style");this.virtualDom.mirror.add(n,Vl(n,this.virtualDom.unserializedId)),e.insertBefore(n,t),n.rules.push({source:E.StyleSheetRule,adds:r.map((o,l)=>({rule:o,index:l}))})}else{const n=document.createElement("style");e.insertBefore(n,t);for(let o=0;o<r.length;o++)(s=n.sheet)==null||s.insertRule(r[o],o)}}attachDocumentToIframe(e,t){const s=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,r=[],n=new Set,o=(l,a)=>{l.nodeName==="DIALOG"&&n.add(l),this.collectIframeAndAttachDocument(r,l);const c=s.getMeta(l);if((c==null?void 0:c.type)===Oe.Element&&(c==null?void 0:c.tagName.toUpperCase())==="HTML"){const{documentElement:u,head:h}=t.contentDocument;this.insertStyleRules(u,h)}if(!this.usingVirtualDom)for(const u of this.config.plugins||[])u.onBuild&&u.onBuild(l,{id:a,replayer:this})};$t(e.node,{doc:t.contentDocument,mirror:s,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(t.contentDocument,e.node.id);for(const{mutationInQueue:l,builtNode:a}of r)this.attachDocumentToIframe(l,a),this.newDocumentQueue=this.newDocumentQueue.filter(c=>c!==l);n.forEach(l=>Is(l))}collectIframeAndAttachDocument(e,t){if(ct(t,this.mirror)){const s=this.newDocumentQueue.find(r=>r.parentId===this.mirror.getId(t));s&&e.push({mutationInQueue:s,builtNode:t})}}waitForStylesheetLoad(){var e;const t=(e=this.iframe.contentDocument)==null?void 0:e.head;if(t){const s=new Set;let r,n=this.service.state;const o=()=>{n=this.service.state};this.emitter.on(V.Start,o),this.emitter.on(V.Pause,o);const l=()=>{this.emitter.off(V.Start,o),this.emitter.off(V.Pause,o)};t.querySelectorAll('link[rel="stylesheet"]').forEach(a=>{a.sheet||(s.add(a),a.addEventListener("load",()=>{s.delete(a),s.size===0&&r!==-1&&(n.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(V.LoadStylesheetEnd),r&&clearTimeout(r),l())}))}),s.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(V.LoadStylesheetStart),r=setTimeout(()=>{n.matches("playing")&&this.play(this.getCurrentTime()),r=-1,l()},this.config.loadTimeout))}}async preloadAllImages(){const e=[];for(const t of this.service.state.context.events)t.type===I.IncrementalSnapshot&&t.data.source===E.CanvasMutation&&(e.push(this.deserializeAndPreloadCanvasEvents(t.data,t)),("commands"in t.data?t.data.commands:[t.data]).forEach(r=>{this.preloadImages(r,t)}));return Promise.all(e)}preloadImages(e,t){if(e.property==="drawImage"&&typeof e.args[0]=="string"&&!this.imageMap.has(t)){const s=document.createElement("canvas"),r=s.getContext("2d"),n=r==null?void 0:r.createImageData(s.width,s.height);r==null||r.putImageData(n,0,0)}}async deserializeAndPreloadCanvasEvents(e,t){if(!this.canvasEventMap.has(t)){const s={isUnchanged:!0};if("commands"in e){const r=await Promise.all(e.commands.map(async n=>{const o=await Promise.all(n.args.map(He(this.imageMap,null,s)));return re(M({},n),{args:o})}));s.isUnchanged===!1&&this.canvasEventMap.set(t,re(M({},e),{commands:r}))}else{const r=await Promise.all(e.args.map(He(this.imageMap,null,s)));s.isUnchanged===!1&&this.canvasEventMap.set(t,re(M({},e),{args:r}))}}}applyIncremental(e,t){var s,r,n;const{data:o}=e;switch(o.source){case E.Mutation:{try{this.applyMutation(o,t)}catch(l){this.warn(`Exception in mutation ${l.message||l}`,o)}break}case E.Drag:case E.TouchMove:case E.MouseMove:if(t){const l=o.positions[o.positions.length-1];this.mousePos={x:l.x,y:l.y,id:l.id,debugData:o}}else o.positions.forEach(l=>{const a={doAction:()=>{this.moveAndHover(l.x,l.y,l.id,t,o)},delay:l.timeOffset+e.timestamp-this.service.state.context.baselineTime};this.timer.addAction(a)}),this.timer.addAction({doAction(){},delay:e.delay-((s=o.positions[0])==null?void 0:s.timeOffset)});break;case E.MouseInteraction:{if(o.id===-1)break;const l=new Event(Ge(H[o.type])),a=this.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);this.emitter.emit(V.MouseInteraction,{type:o.type,target:a});const{triggerFocus:c}=this.config;switch(o.type){case H.Blur:"blur"in a&&a.blur();break;case H.Focus:c&&a.focus&&a.focus({preventScroll:!0});break;case H.Click:case H.TouchStart:case H.TouchEnd:case H.MouseDown:case H.MouseUp:t?(o.type===H.TouchStart?this.touchActive=!0:o.type===H.TouchEnd&&(this.touchActive=!1),o.type===H.MouseDown?this.lastMouseDownEvent=[a,l]:o.type===H.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:o.x||0,y:o.y||0,id:o.id,debugData:o}):(o.type===H.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(o.x||0,o.y||0,o.id,t,o),o.type===H.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):o.type===H.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):o.type===H.TouchEnd?this.mouse.classList.remove("touch-active"):a.dispatchEvent(l));break;case H.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:a.dispatchEvent(l)}break}case E.Scroll:{if(o.id===-1)break;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.scrollData=o;break}this.applyScroll(o,t);break}case E.ViewportResize:this.emitter.emit(V.Resize,{width:o.width,height:o.height});break;case E.Input:{if(o.id===-1)break;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.inputData=o;break}this.applyInput(o);break}case E.MediaInteraction:{const l=this.usingVirtualDom?this.virtualDom.mirror.getNode(o.id):this.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);const a=l,{events:c}=this.service.state.context;this.mediaManager.mediaMutation({target:a,timeOffset:e.timestamp-c[0].timestamp,mutation:o});break}case E.StyleSheetRule:case E.StyleDeclaration:{this.usingVirtualDom?o.styleId?this.constructedStyleMutations.push(o):o.id&&((r=this.virtualDom.mirror.getNode(o.id))==null||r.rules.push(o)):this.applyStyleSheetMutation(o);break}case E.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.canvasMutations.push({event:e,mutation:o})}else{const l=this.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);Er({event:e,mutation:o,target:l,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case E.Font:{try{const l=new FontFace(o.family,o.buffer?new Uint8Array(JSON.parse(o.fontSource)):o.fontSource,o.descriptors);(n=this.iframe.contentDocument)==null||n.fonts.add(l)}catch(l){this.warn(l)}break}case E.Selection:{if(t){this.lastSelectionData=o;break}this.applySelection(o);break}case E.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(o):this.applyAdoptedStyleSheet(o);break}case E.Visibility:{const{mutations:l}=o;for(const a of l){const c=this.usingVirtualDom?this.virtualDom.mirror.getNode(a.id):this.mirror.getNode(a.id);c&&c instanceof Element&&(c.style.visibility=a.isVisible?"visible":"hidden")}break}}}applyMutation(e,t){if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,km(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const c in this.legacy_missingNodeRetryMap)try{const u=this.legacy_missingNodeRetryMap[c],h=Ul(u.node,this.virtualDom,this.mirror);h&&(u.node=h)}catch(u){this.warn(u)}const s=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes=e.removes.filter(c=>s.getNode(c.id)?!0:(this.warnNodeNotFound(e,c.id),!1)),e.removes.forEach(c=>{var u;const h=s.getNode(c.id);if(!h)return;let d=s.getNode(c.parentId);if(!d)return this.warnNodeNotFound(e,c.parentId);if(c.isShadow&&Ue(d)&&(d=d.shadowRoot),s.removeNodeFromMap(h),d)try{d.removeChild(h),this.usingVirtualDom&&h.nodeName==="#text"&&d.nodeName==="STYLE"&&((u=d.rules)==null?void 0:u.length)>0&&(d.rules=[])}catch(f){if(f instanceof DOMException)this.warn("parent could not remove child in mutation",d,h,e);else throw f}});const r=M({},this.legacy_missingNodeRetryMap),n=[],o=c=>{let u=null;return c.nextId&&(u=s.getNode(c.nextId)),c.nextId!==null&&c.nextId!==void 0&&c.nextId!==-1&&!u},l=c=>{var u,h;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let d=s.getNode(c.parentId);if(!d)return c.node.type===Oe.Document?this.newDocumentQueue.push(c):n.push(c);c.node.isShadow&&(Ue(d)||d.attachShadow({mode:"open"}),d=d.shadowRoot);let f=null,m=null;if(c.previousId&&(f=s.getNode(c.previousId)),c.nextId&&(m=s.getNode(c.nextId)),o(c))return n.push(c);if(c.node.rootId&&!s.getNode(c.node.rootId))return;const y=c.node.rootId?s.getNode(c.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(ct(d,s)){this.attachDocumentToIframe(c,d);return}const p=(v,w)=>{if(!this.usingVirtualDom){Is(v);for(const C of this.config.plugins||[])C.onBuild&&C.onBuild(v,{id:w,replayer:this})}},g=$t(c.node,{doc:y,mirror:s,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:p});if(c.previousId===-1||c.nextId===-1){r[c.node.id]={node:g,mutation:c};return}const S=s.getMeta(d);if(S&&S.type===Oe.Element&&c.node.type===Oe.Text){const v=Array.isArray(d.childNodes)?d.childNodes:Array.from(d.childNodes);if(S.tagName==="textarea")for(const w of v)w.nodeType===d.TEXT_NODE&&d.removeChild(w);else if(S.tagName==="style"&&v.length===1)for(const w of v)w.nodeType===d.TEXT_NODE&&!s.hasNode(w)&&(g.textContent=w.textContent,d.removeChild(w))}else if((S==null?void 0:S.type)===Oe.Document){const v=d;c.node.type===Oe.DocumentType&&((u=v.childNodes[0])==null?void 0:u.nodeType)===Node.DOCUMENT_TYPE_NODE&&v.removeChild(v.childNodes[0]),g.nodeName==="HTML"&&v.documentElement&&v.removeChild(v.documentElement)}if(f&&f.nextSibling&&f.nextSibling.parentNode?d.insertBefore(g,f.nextSibling):m&&m.parentNode?d.contains(m)?d.insertBefore(g,m):d.insertBefore(g,null):d.appendChild(g),p(g,c.node.id),this.usingVirtualDom&&g.nodeName==="#text"&&d.nodeName==="STYLE"&&((h=d.rules)==null?void 0:h.length)>0&&(d.rules=[]),ct(g,this.mirror)){const v=this.mirror.getId(g),w=this.newDocumentQueue.find(C=>C.parentId===v);w&&(this.attachDocumentToIframe(w,g),this.newDocumentQueue=this.newDocumentQueue.filter(C=>C!==w))}(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(r,d,g,c)};e.adds.forEach(c=>{l(c)});const a=Date.now();for(;n.length;){const c=jl(n);if(n.length=0,Date.now()-a>500){this.warn("Timeout in the loop, please check the resolve tree data:",c);break}for(const u of c)s.getNode(u.value.parentId)?un(u,d=>{l(d)}):this.debug("Drop resolve tree since there is no parent for the root node.",u)}Object.keys(r).length&&Object.assign(this.legacy_missingNodeRetryMap,r),Yl(e.texts).forEach(c=>{var u;const h=s.getNode(c.id);if(!h)return e.removes.find(f=>f.id===c.id)?void 0:this.warnNodeNotFound(e,c.id);const d=h.parentElement;if(c.value&&d&&d.tagName==="STYLE"?h.textContent=ii(c.value,this.cache):h.textContent=c.value,this.usingVirtualDom){const f=h.parentNode;((u=f==null?void 0:f.rules)==null?void 0:u.length)>0&&(f.rules=[])}}),e.attributes.forEach(c=>{var u;const h=s.getNode(c.id);if(!h)return e.removes.find(d=>d.id===c.id)?void 0:this.warnNodeNotFound(e,c.id);for(const d in c.attributes)if(typeof d=="string"){const f=c.attributes[d];if(f===null)h.removeAttribute(d),d==="open"&&Yy(h,c);else if(typeof f=="string")try{if(d==="_cssText"&&(h.nodeName==="LINK"||h.nodeName==="STYLE"))try{const m=s.getMeta(h),y=$t(re(M({},m),{attributes:M(M({},m.attributes),c.attributes)}),{doc:h.ownerDocument,mirror:s,skipChild:!0,hackCss:!0,cache:this.cache});Object.assign(m.attributes,c.attributes);const p=h.nextSibling,g=h.parentNode;if(y&&g){g.removeChild(h),g.insertBefore(y,p),s.replace(c.id,y);break}}catch(m){}if(d==="value"&&h.nodeName==="TEXTAREA"){const m=h;m.childNodes.forEach(p=>m.removeChild(p));const y=(u=h.ownerDocument)==null?void 0:u.createTextNode(f);y&&m.appendChild(y)}else h.setAttribute(d,f);d==="rr_open_mode"&&h.nodeName==="DIALOG"&&Is(h,c)}catch(m){this.warn("An error occurred may due to the checkout feature.",m)}else if(d==="style"){const m=f,y=h;for(const p in m)if(m[p]===!1)y.style.removeProperty(p);else if(m[p]instanceof Array){const g=m[p];y.style.setProperty(p,g[0],g[1])}else{const g=m[p];y.style.setProperty(p,g)}}}})}applyScroll(e,t){var s,r;const n=this.mirror.getNode(e.id);if(!n)return this.debugNodeNotFound(e,e.id);const o=this.mirror.getMeta(n);if(n===this.iframe.contentDocument)(s=this.iframe.contentWindow)==null||s.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else if((o==null?void 0:o.type)===Oe.Document)(r=n.defaultView)==null||r.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else try{n.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"})}catch(l){}}applyInput(e){const t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch(s){}}applySelection(e){try{const t=new Set,s=e.ranges.map(({start:r,startOffset:n,end:o,endOffset:l})=>{const a=this.mirror.getNode(r),c=this.mirror.getNode(o);if(!a||!c)return;const u=new Range;u.setStart(a,n),u.setEnd(c,l);const h=a.ownerDocument,d=h==null?void 0:h.getSelection();return d&&t.add(d),{range:u,selection:d}});t.forEach(r=>r.removeAllRanges()),s.forEach(r=>{var n;return r&&((n=r.selection)==null?void 0:n.addRange(r.range))})}catch(t){}}applyStyleSheetMutation(e){var t;let s=null;e.styleId?s=this.styleMirror.getStyle(e.styleId):e.id&&(s=((t=this.mirror.getNode(e.id))==null?void 0:t.sheet)||null),s&&(e.source===E.StyleSheetRule?this.applyStyleSheetRule(e,s):e.source===E.StyleDeclaration&&this.applyStyleDeclaration(e,s))}applyStyleSheetRule(e,t){var s,r,n,o;if((s=e.adds)==null||s.forEach(({rule:l,index:a})=>{try{if(Array.isArray(a)){const{positions:c,index:u}=Sr(a);ot(t.cssRules,c).insertRule(l,u)}else{const c=a===void 0?void 0:Math.min(a,t.cssRules.length);t==null||t.insertRule(l,c)}}catch(c){}}),(r=e.removes)==null||r.forEach(({index:l})=>{try{if(Array.isArray(l)){const{positions:a,index:c}=Sr(l);ot(t.cssRules,a).deleteRule(c||0)}else t==null||t.deleteRule(l)}catch(a){}}),e.replace)try{(n=t.replace)==null||n.call(t,e.replace)}catch(l){}if(e.replaceSync)try{(o=t.replaceSync)==null||o.call(t,e.replaceSync)}catch(l){}}applyStyleDeclaration(e,t){e.set&&ot(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&ot(t.rules,e.index).style.removeProperty(e.remove.property)}applyAdoptedStyleSheet(e){var t;const s=this.mirror.getNode(e.id);if(!s)return;(t=e.styles)==null||t.forEach(l=>{var a;let c=null,u=null;if(Ue(s)?u=((a=s.ownerDocument)==null?void 0:a.defaultView)||null:s.nodeName==="#document"&&(u=s.defaultView),!!u)try{c=new u.CSSStyleSheet,this.styleMirror.add(c,l.styleId),this.applyStyleSheetRule({source:E.StyleSheetRule,adds:l.rules},c)}catch(h){}});const r=10;let n=0;const o=(l,a)=>{const c=a.map(u=>this.styleMirror.getStyle(u)).filter(u=>u!==null);Ue(l)?l.shadowRoot.adoptedStyleSheets=c:l.nodeName==="#document"&&(l.adoptedStyleSheets=c),c.length!==a.length&&n<r&&(setTimeout(()=>o(l,a),0+100*n),n++)};o(s,e.styleIds)}legacy_resolveMissingNode(e,t,s,r){const{previousId:n,nextId:o}=r,l=n&&e[n],a=o&&e[o];if(l){const{node:c,mutation:u}=l;t.insertBefore(c,s),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,t,c,u)}if(a){const{node:c,mutation:u}=a;t.insertBefore(c,s.nextSibling),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,t,c,u)}}moveAndHover(e,t,s,r,n){const o=this.mirror.getNode(s);if(!o)return this.debugNodeNotFound(n,s);const l=dn(o,this.iframe),a=e*l.absoluteScale+l.x,c=t*l.absoluteScale+l.y;this.mouse.style.left=`${a}px`,this.mouse.style.top=`${c}px`,r||this.drawMouseTail({x:a,y:c}),this.hoverElements(o)}drawMouseTail(e){if(!this.mouseTail)return;const{lineCap:t,lineWidth:s,strokeStyle:r,duration:n}=this.config.mouseTail===!0?zi:Object.assign({},zi,this.config.mouseTail),o=()=>{if(!this.mouseTail)return;const l=this.mouseTail.getContext("2d");!l||!this.tailPositions.length||(l.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),l.beginPath(),l.lineWidth=s,l.lineCap=t,l.strokeStyle=r,l.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(a=>l.lineTo(a.x,a.y)),l.stroke())};this.tailPositions.push(e),o(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(l=>l!==e),o()},n/this.speedService.state.context.timer.speed)}hoverElements(e){var t;(t=this.lastHoveredRootNode||this.iframe.contentDocument)==null||t.querySelectorAll(".\\:hover").forEach(r=>{r.classList.remove(":hover")}),this.lastHoveredRootNode=e.getRootNode();let s=e;for(;s;)s.classList&&s.classList.add(":hover"),s=s.parentElement}isUserInteraction(e){return e.type!==I.IncrementalSnapshot?!1:e.data.source>E.Mutation&&e.data.source<=E.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(V.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(e,t){this.warn(`Node with id '${t}' not found. `,e)}warnCanvasMutationFailed(e,t){this.warn("Has error on canvas update",t,"canvas mutation:",e)}debugNodeNotFound(e,t){this.debug(`Node with id '${t}' not found. `,e)}warn(...e){this.config.showWarning&&this.config.logger.warn(sa,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(sa,...e)}}const qy="3.3.0-alpha.1",{getVersion:Ky}=de,{isRecording:Qy}=de,{flushCustomEventQueue:eb}=de,{addCustomEvent:tb}=de,{freezePage:sb}=de,{takeFullSnapshot:ib}=de;exports.EventType=I;exports.IncrementalSource=E;exports.MouseInteractions=H;exports.Replayer=Jy;exports.ReplayerEvents=V;exports.addCustomEvent=tb;exports.canvasMutation=Er;exports.flushCustomEventQueue=eb;exports.freezePage=sb;exports.getVersion=Ky;exports.isRecording=Qy;exports.record=de;exports.takeFullSnapshot=ib;exports.utils=qm;exports.version=qy;
|
|
92
|
+
***************************************************************************** */function Jo(i,e){var t=typeof Symbol=="function"&&i[Symbol.iterator];if(!t)return i;var s,r,n=t.call(i),o=[];try{for(;(e===void 0||e-- >0)&&!(s=n.next()).done;)o.push(s.value)}catch(l){r={error:l}}finally{try{s&&!s.done&&(t=n.return)&&t.call(n)}finally{if(r)throw r.error}}return o}var lt;(function(i){i[i.NotStarted=0]="NotStarted",i[i.Running=1]="Running",i[i.Stopped=2]="Stopped"})(lt||(lt={}));var uc={type:"xstate.init"};function Fi(i){return i===void 0?[]:[].concat(i)}function it(i){return{type:"xstate.assign",assignment:i}}function qo(i,e){return typeof(i=typeof i=="string"&&e&&e[i]?e[i]:i)=="string"?{type:i}:typeof i=="function"?{type:i.name,exec:i}:i}function qs(i){return function(e){return i===e}}function hc(i){return typeof i=="string"?{type:i}:i}function Ko(i,e){return{value:i,context:e,actions:[],changed:!1,matches:qs(i)}}function Qo(i,e,t){var s=e,r=!1;return[i.filter(function(n){if(n.type==="xstate.assign"){r=!0;var o=Object.assign({},s);return typeof n.assignment=="function"?o=n.assignment(s,t):Object.keys(n.assignment).forEach(function(l){o[l]=typeof n.assignment[l]=="function"?n.assignment[l](s,t):n.assignment[l]}),s=o,!1}return!0}),s,r]}function dc(i,e){e===void 0&&(e={});var t=Jo(Qo(Fi(i.states[i.initial].entry).map(function(o){return qo(o,e.actions)}),i.context,uc),2),s=t[0],r=t[1],n={config:i,_options:e,initialState:{value:i.initial,actions:s,context:r,matches:qs(i.initial)},transition:function(o,l){var a,c,u=typeof o=="string"?{value:o,context:i.context}:o,h=u.value,d=u.context,f=hc(l),m=i.states[h];if(m.on){var y=Fi(m.on[f.type]);try{for(var p=function(W){var q=typeof Symbol=="function"&&Symbol.iterator,ce=q&&W[q],Le=0;if(ce)return ce.call(W);if(W&&typeof W.length=="number")return{next:function(){return W&&Le>=W.length&&(W=void 0),{value:W&&W[Le++],done:!W}}};throw new TypeError(q?"Object is not iterable.":"Symbol.iterator is not defined.")}(y),g=p.next();!g.done;g=p.next()){var S=g.value;if(S===void 0)return Ko(h,d);var v=typeof S=="string"?{target:S}:S,w=v.target,C=v.actions,x=C===void 0?[]:C,R=v.cond,T=R===void 0?function(){return!0}:R,z=w===void 0,U=w!=null?w:h,P=i.states[U];if(T(d,f)){var j=Jo(Qo((z?Fi(x):[].concat(m.exit,x,P.entry).filter(function(W){return W})).map(function(W){return qo(W,n._options.actions)}),d,f),3),J=j[0],ie=j[1],N=j[2],F=w!=null?w:h;return{value:F,context:ie,actions:J,changed:w!==h||J.length>0||N,matches:qs(F)}}}}catch(W){a={error:W}}finally{try{g&&!g.done&&(c=p.return)&&c.call(p)}finally{if(a)throw a.error}}}return Ko(h,d)}};return n}var ea=function(i,e){return i.actions.forEach(function(t){var s=t.exec;return s&&s(i.context,e)})};function fc(i){var e=i.initialState,t=lt.NotStarted,s=new Set,r={_machine:i,send:function(n){t===lt.Running&&(e=i.transition(e,n),ea(e,hc(n)),s.forEach(function(o){return o(e)}))},subscribe:function(n){return s.add(n),n(e),{unsubscribe:function(){return s.delete(n)}}},start:function(n){if(n){var o=typeof n=="object"?n:{context:i.config.context,value:n};e={value:o.value,actions:[],context:o.context,matches:qs(o.value)}}return t=lt.Running,ea(e,uc),r},stop:function(){return t=lt.Stopped,s.clear(),r},get state(){return e},get status(){return t}};return r}function Py(i,e){for(let t=i.length-1;t>=0;t--){const s=i[t];if(s.type===I.Meta&&s.timestamp<=e)return i.slice(t)}return i}function Fy(i,{getCastFn:e,applyEventsSynchronously:t,emitter:s}){const r=dc({id:"player",context:i,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:it({lastPlayedEvent:(n,o)=>o.type==="CAST_EVENT"?o.payload.event:n.lastPlayedEvent}),recordTimeOffset:it((n,o)=>{let l=n.timeOffset;return"payload"in o&&"timeOffset"in o.payload&&(l=o.payload.timeOffset),re(A({},n),{timeOffset:l,baselineTime:n.events[0].timestamp+l})}),play(n){var o;const{timer:l,events:a,baselineTime:c,lastPlayedEvent:u}=n;l.clear();for(const m of a)Xo(m,c);const h=Py(a,c);let d=u==null?void 0:u.timestamp;(u==null?void 0:u.type)===I.IncrementalSnapshot&&u.data.source===E.MouseMove&&(d=u.timestamp+((o=u.data.positions[0])==null?void 0:o.timeOffset)),c<(d||0)&&s.emit(V.PlayBack);const f=new Array;for(const m of h)if(!(d&&d<c&&(m.timestamp<=d||m===u)))if(m.timestamp<=c)f.push(m);else{const y=e(m,!1);l.addAction({doAction:()=>{y()},delay:m.delay})}t(f),s.emit(V.Flush),l.start()},pause(n){n.timer.clear()},resetLastPlayedEvent:it(n=>re(A({},n),{lastPlayedEvent:null})),startLive:it({baselineTime:(n,o)=>(n.timer.start(),o.type==="TO_LIVE"&&o.payload.baselineTime?o.payload.baselineTime:Date.now())}),addEvent:it((n,o)=>{const{baselineTime:l,timer:a,events:c}=n;if(o.type==="ADD_EVENT"){const{event:u}=o.payload;Xo(u,l);let h=c.length-1;if(!c[h]||c[h].timestamp<=u.timestamp)c.push(u);else{let m=-1,y=0;for(;y<=h;){const p=Math.floor((y+h)/2);c[p].timestamp<=u.timestamp?y=p+1:h=p-1}m===-1&&(m=y),c.splice(m,0,u)}const d=u.timestamp<l,f=e(u,d);d?f():a.isActive()&&a.addAction({doAction:()=>{f()},delay:u.delay})}return re(A({},n),{events:c})})}});return fc(r)}function zy(i){const e=dc({id:"speed",context:i,initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:(t,s)=>{"payload"in s&&t.timer.setSpeed(s.payload.speed)},recordSpeed:it({normalSpeed:t=>t.timer.speed}),restoreSpeed:t=>{t.timer.setSpeed(t.normalSpeed)}}});return fc(e)}const By=i=>[`.${i} { background: currentColor }`,"noscript { display: none !important; }"],ta=new Map;function pc(i,e){let t=ta.get(i);return t||(t=new Map,ta.set(i,t)),t.has(e)||t.set(e,[]),t.get(e)}function He(i,e,t){return async s=>{if(s&&typeof s=="object"&&"rr_type"in s)if(t&&(t.isUnchanged=!1),s.rr_type==="ImageBitmap"&&"args"in s){const r=await He(i,e,t)(s.args);return await createImageBitmap.apply(null,r)}else if("index"in s){if(t||e===null)return s;const{rr_type:r,index:n}=s;return pc(e,r)[n]}else if("args"in s){const{rr_type:r,args:n}=s,o=window[r];return new o(...await Promise.all(n.map(He(i,e,t))))}else{if("base64"in s)return hy(s.base64);if("src"in s){const r=i.get(s.src);if(r)return r;{const n=new Image;return n.src=s.src,i.set(s.src,n),n}}else if("data"in s&&s.rr_type==="Blob"){const r=await Promise.all(s.data.map(He(i,e,t)));return new Blob(r,{type:s.type})}}else if(Array.isArray(s))return await Promise.all(s.map(He(i,e,t)));return s}}function Wy(i,e){try{return e===_e.WebGL?i.getContext("webgl")||i.getContext("experimental-webgl"):i.getContext("webgl2")}catch(t){return null}}const Uy=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function Vy(i,e){if(!(e!=null&&e.constructor))return;const{name:t}=e.constructor;if(!Uy.includes(t))return;const s=pc(i,t);s.includes(e)||s.push(e)}async function Hy({mutation:i,target:e,type:t,imageMap:s,errorHandler:r}){try{const n=Wy(e,t);if(!n)return;if(i.setter){n[i.property]=i.args[0];return}const o=n[i.property],l=await Promise.all(i.args.map(He(s,n))),a=o.apply(n,l);Vy(n,a);const c=!1}catch(n){r(i,n)}}async function Gy({event:i,mutations:e,target:t,imageMap:s,errorHandler:r}){const n=t.getContext("2d");if(!n){r(e[0],new Error("Canvas context is null"));return}const o=e.map(async a=>Promise.all(a.args.map(He(s,n))));(await Promise.all(o)).forEach((a,c)=>{const u=e[c];try{if(u.setter){n[u.property]=u.args[0];return}const h=n[u.property];u.property==="drawImage"&&typeof u.args[0]=="string"?(s.get(i),h.apply(n,u.args)):h.apply(n,a)}catch(h){r(u,h)}})}async function Er({event:i,mutation:e,target:t,imageMap:s,canvasEventMap:r,errorHandler:n}){try{const o=r.get(i)||e,l="commands"in o?o.commands:[o];if([_e.WebGL,_e.WebGL2].includes(e.type)){for(let a=0;a<l.length;a++){const c=l[a];await Hy({mutation:c,type:e.type,target:t,imageMap:s,errorHandler:n})}return}await Gy({event:i,mutations:l,target:t,imageMap:s,errorHandler:n})}catch(o){n(e,o)}}class jy{constructor(e){b(this,"mediaMap",new Map),b(this,"warn"),b(this,"service"),b(this,"speedService"),b(this,"emitter"),b(this,"getCurrentTime"),b(this,"metadataCallbackMap",new Map),this.warn=e.warn,this.service=e.service,this.speedService=e.speedService,this.emitter=e.emitter,this.getCurrentTime=e.getCurrentTime,this.emitter.on(V.Start,this.start.bind(this)),this.emitter.on(V.SkipStart,this.start.bind(this)),this.emitter.on(V.Pause,this.pause.bind(this)),this.emitter.on(V.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(e={pause:!1}){this.mediaMap.forEach((t,s)=>{this.syncTargetWithState(s),e.pause&&s.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:e,target:t,mediaState:s}){if(s.isPlaying){const n=(e-s.lastInteractionTimeOffset)/1e3*s.playbackRate,o="duration"in t&&t.duration;if(Number.isNaN(o)){this.waitForMetadata(t);return}let l=s.currentTimeAtLastInteraction+n;t.loop&&o!==!1&&(l=l%o),t.currentTime=l}else t.pause(),t.currentTime=s.currentTimeAtLastInteraction}waitForMetadata(e){if(this.metadataCallbackMap.has(e)||!("addEventListener"in e))return;const t=()=>{this.metadataCallbackMap.delete(e);const s=this.mediaMap.get(e);s&&this.seekTo({time:this.getCurrentTime(),target:e,mediaState:s})};this.metadataCallbackMap.set(e,t),e.addEventListener("loadedmetadata",t,{once:!0})}getMediaStateFromMutation({target:e,timeOffset:t,mutation:s}){var f,m,y,p,g;const r=this.mediaMap.get(e),{type:n,playbackRate:o,currentTime:l,muted:a,volume:c,loop:u}=s;return{isPlaying:n===Be.Play||n!==Be.Pause&&((r==null?void 0:r.isPlaying)||e.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(f=l!=null?l:r==null?void 0:r.currentTimeAtLastInteraction)!=null?f:0,lastInteractionTimeOffset:t,playbackRate:(m=o!=null?o:r==null?void 0:r.playbackRate)!=null?m:1,volume:(y=c!=null?c:r==null?void 0:r.volume)!=null?y:1,muted:(p=a!=null?a:r==null?void 0:r.muted)!=null?p:e.getAttribute("muted")===null,loop:(g=u!=null?u:r==null?void 0:r.loop)!=null?g:e.getAttribute("loop")===null}}syncTargetWithState(e){const t=this.mediaMap.get(e);if(!t)return;const{muted:s,loop:r,volume:n,isPlaying:o}=t,l=this.service.state.matches("paused"),a=t.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:e,mediaState:t}),e.volume!==n&&(e.volume=n),e.muted=s,e.loop=r,e.playbackRate!==a&&(e.playbackRate=a),o&&!l?e.play():e.pause()}catch(c){this.warn(`Failed to replay media interactions: ${c.message||c}`)}}addMediaElements(e,t,s){if(!["AUDIO","VIDEO"].includes(e.nodeName))return;const r=e,n=s.getMeta(r);if(!n||!("attributes"in n))return;const o=this.service.state.matches("paused"),l=n.attributes;let a=!1;l.rr_mediaState?a=l.rr_mediaState==="played":a=r.getAttribute("autoplay")!==null,a&&o&&r.pause();let c=1;typeof l.rr_mediaPlaybackRate=="number"&&(c=l.rr_mediaPlaybackRate);let u=!1;typeof l.rr_mediaMuted=="boolean"?u=l.rr_mediaMuted:u=r.getAttribute("muted")!==null;let h=!1;typeof l.rr_mediaLoop=="boolean"?h=l.rr_mediaLoop:h=r.getAttribute("loop")!==null;let d=1;typeof l.rr_mediaVolume=="number"&&(d=l.rr_mediaVolume);let f=0;typeof l.rr_mediaCurrentTime=="number"&&(f=l.rr_mediaCurrentTime),this.mediaMap.set(r,{isPlaying:a,currentTimeAtLastInteraction:f,lastInteractionTimeOffset:t,playbackRate:c,volume:d,muted:u,loop:h}),this.syncTargetWithState(r)}mediaMutation({target:e,timeOffset:t,mutation:s}){this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:t,mutation:s})),this.syncTargetWithState(e)}isSupportedMediaElement(e){return["AUDIO","VIDEO"].includes(e.nodeName)}reset(){this.mediaMap.clear()}}function Is(i,e){if(i.nodeName!=="DIALOG"||i instanceof Ce)return;const t=i,s=t.open,r=s&&t.matches("dialog:modal"),n=t.getAttribute("rr_open_mode"),o=typeof(e==null?void 0:e.attributes.open)=="string"||typeof t.getAttribute("open")=="string",l=n==="modal";if(!(s&&!(r&&n==="non-modal"||!r&&l))){if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}s&&t.close(),o&&(l?t.showModal():t.show())}}function Yy(i,e){if(i.nodeName!=="DIALOG"||i instanceof Ce)return;const t=i;if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}e.attributes.open===null&&(t.removeAttribute("open"),t.removeAttribute("rr_open_mode"))}const Zy=5*1e3,Xy=cc||ky,sa="[replayer]",zi={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function ia(i){return i.type==I.IncrementalSnapshot&&(i.data.source==E.TouchMove||i.data.source==E.MouseInteraction&&i.data.type==H.TouchStart)}class Jy{constructor(e,t){if(b(this,"wrapper"),b(this,"iframe"),b(this,"service"),b(this,"speedService"),b(this,"config"),b(this,"usingVirtualDom",!1),b(this,"virtualDom",new bt),b(this,"mouse"),b(this,"mouseTail",null),b(this,"tailPositions",[]),b(this,"emitter",Xy()),b(this,"nextUserInteractionEvent"),b(this,"legacy_missingNodeRetryMap",{}),b(this,"cache",oo()),b(this,"imageMap",new Map),b(this,"canvasEventMap",new Map),b(this,"mirror",oa()),b(this,"styleMirror",new fn),b(this,"mediaManager"),b(this,"firstFullSnapshot",null),b(this,"newDocumentQueue",[]),b(this,"mousePos",null),b(this,"touchActive",null),b(this,"lastMouseDownEvent",null),b(this,"lastHoveredRootNode"),b(this,"lastSelectionData",null),b(this,"constructedStyleMutations",[]),b(this,"adoptedStyleSheets",[]),b(this,"handleResize",l=>{this.iframe.style.display="inherit";for(const a of[this.mouseTail,this.iframe])a&&(a.setAttribute("width",String(l.width)),a.setAttribute("height",String(l.height)))}),b(this,"applyEventsSynchronously",l=>{for(const a of l){switch(a.type){case I.DomContentLoaded:case I.Load:case I.Custom:continue;case I.FullSnapshot:case I.Meta:case I.Plugin:case I.IncrementalSnapshot:break}this.getCastFn(a,!0)()}}),b(this,"getCastFn",(l,a=!1)=>{let c;switch(l.type){case I.DomContentLoaded:case I.Load:break;case I.Custom:c=()=>{this.emitter.emit(V.CustomEvent,l)};break;case I.Meta:c=()=>this.emitter.emit(V.Resize,{width:l.data.width,height:l.data.height});break;case I.FullSnapshot:c=()=>{var h;if(this.firstFullSnapshot){if(this.firstFullSnapshot===l){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(l,a),(h=this.iframe.contentWindow)==null||h.scrollTo(l.data.initialOffset)};break;case I.IncrementalSnapshot:c=()=>{if(this.applyIncremental(l,a),!a&&(l===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(const h of this.service.state.context.events)if(!(h.timestamp<=l.timestamp)&&this.isUserInteraction(h)){h.delay-l.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=h);break}if(this.nextUserInteractionEvent){const h=this.nextUserInteractionEvent.delay-l.delay,d={speed:Math.min(Math.round(h/Zy),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:d}),this.emitter.emit(V.SkipStart,d)}}};break}return()=>{c&&c();for(const d of this.config.plugins||[])d.handler&&d.handler(l,a,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:l}});const h=this.service.state.context.events.length-1;if(!this.config.liveMode&&l===this.service.state.context.events[h]){const d=()=>{h<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(V.Finish))};let f=50;l.type===I.IncrementalSnapshot&&l.data.source===E.MouseMove&&l.data.positions.length&&(f+=Math.max(0,-l.data.positions[0].timeOffset)),setTimeout(d,f)}this.emitter.emit(V.EventCast,l)}}),!(t!=null&&t.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");const s={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:10*1e3,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:zi,useVirtualDom:!0,logger:console};this.config=Object.assign({},s,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(V.Resize,this.handleResize),this.setupDom();for(const l of this.config.plugins||[])l.getMirror&&l.getMirror({nodeMirror:this.mirror});this.emitter.on(V.Flush,()=>{if(this.usingVirtualDom){const l={mirror:this.mirror,applyCanvas:(a,c,u)=>{Er({event:a,mutation:c,target:u,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(a,c)=>{a.source===E.StyleSheetRule?this.applyStyleSheetRule(a,c):a.source===E.StyleDeclaration&&this.applyStyleDeclaration(a,c)},afterAppend:(a,c)=>{for(const u of this.config.plugins||[])u.onBuild&&u.onBuild(a,{id:c,replayer:this})}};if(this.iframe.contentDocument)try{js(this.iframe.contentDocument,this.virtualDom,l,this.virtualDom.mirror)}catch(a){console.warn(a)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const a in this.legacy_missingNodeRetryMap)try{const c=this.legacy_missingNodeRetryMap[a],u=Ys(c.node,this.mirror,this.virtualDom.mirror);js(u,c.node,l,this.virtualDom.mirror),c.node=u}catch(c){this.warn(c)}this.constructedStyleMutations.forEach(a=>{this.applyStyleSheetMutation(a)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(a=>{this.applyAdoptedStyleSheet(a)}),this.adoptedStyleSheets=[]}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),this.touchActive===!0?this.mouse.classList.add("touch-active"):this.touchActive===!1&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){const[l,a]=this.lastMouseDownEvent;l.dispatchEvent(a)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(V.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});const r=new Ly([],{speed:this.config.speed});this.service=Fy({events:e.map(l=>t&&t.unpackFn?t.unpackFn(l):l).sort((l,a)=>l.timestamp-a.timestamp),timer:r,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(l=>{this.emitter.emit(V.StateChange,{player:l})}),this.speedService=zy({normalSpeed:-1,timer:r}),this.speedService.start(),this.speedService.subscribe(l=>{this.emitter.emit(V.StateChange,{speed:l})}),this.mediaManager=new jy({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const n=this.service.state.context.events.find(l=>l.type===I.Meta),o=this.service.state.context.events.find(l=>l.type===I.FullSnapshot);if(n){const{width:l,height:a}=n.data;setTimeout(()=>{this.emitter.emit(V.Resize,{width:l,height:a})},0)}o&&setTimeout(()=>{var l;this.firstFullSnapshot||(this.firstFullSnapshot=o,this.rebuildFullSnapshot(o),(l=this.iframe.contentWindow)==null||l.scrollTo(o.data.initialOffset))},1),this.service.state.context.events.find(ia)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(e,t){return this.emitter.on(e,t),this}off(e,t){return this.emitter.off(e,t),this}setConfig(e){Object.keys(e).forEach(t=>{e[t],this.config[t]=e[t]}),this.config.skipInactive||this.backToNormal(),typeof e.speed!="undefined"&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),typeof e.mouseTail!="undefined"&&(e.mouseTail===!1?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){const e=this.service.state.context.events[0],t=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:t.timestamp,totalTime:t.timestamp-e.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){const{baselineTime:e,events:t}=this.service.state.context;return e-t[0].timestamp}getMirror(){return this.mirror}play(e=0){var t,s;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:e}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:e}})),(s=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||s.classList.remove("rrweb-paused"),this.emitter.emit(V.Start)}pause(e){var t,s;e===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof e=="number"&&(this.play(e),this.service.send({type:"PAUSE"})),(s=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||s.classList.add("rrweb-paused"),this.emitter.emit(V.Pause)}resume(e=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(e),this.emitter.emit(V.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(V.Destroy)}startLive(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}addEvent(e){const t=this.config.unpackFn?this.config.unpackFn(e):e;ia(t)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:t}}))}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=oo()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.config.mouseTail!==!1&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");const e=["allow-same-origin","allow-scripts"];this.config.UNSAFE_replayCanvas,this.iframe.style.display="none",this.iframe.setAttribute("sandbox",e.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(_y(this.iframe.contentWindow,this.iframe.contentDocument),cn(this.iframe.contentWindow))}rebuildFullSnapshot(e,t=!1){if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};const s=[],r=new Set,n=(a,c)=>{if(a.nodeName==="DIALOG"&&r.add(a),this.collectIframeAndAttachDocument(s,a),this.mediaManager.isSupportedMediaElement(a)){const{events:u}=this.service.state.context;this.mediaManager.addMediaElements(a,e.timestamp-u[0].timestamp,this.mirror)}for(const u of this.config.plugins||[])u.onBuild&&u.onBuild(a,{id:c,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),ff(e.data.node,{doc:this.iframe.contentDocument,afterAppend:n,cache:this.cache,mirror:this.mirror}),n(this.iframe.contentDocument,e.data.node.id);for(const{mutationInQueue:a,builtNode:c}of s)this.attachDocumentToIframe(a,c),this.newDocumentQueue=this.newDocumentQueue.filter(u=>u!==a);const{documentElement:o,head:l}=this.iframe.contentDocument;this.insertStyleRules(o,l),r.forEach(a=>Is(a)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(V.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){var s;const r=By(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&r.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),!!r.length)if(this.usingVirtualDom){const n=this.virtualDom.createElement("style");this.virtualDom.mirror.add(n,Vl(n,this.virtualDom.unserializedId)),e.insertBefore(n,t),n.rules.push({source:E.StyleSheetRule,adds:r.map((o,l)=>({rule:o,index:l}))})}else{const n=document.createElement("style");e.insertBefore(n,t);for(let o=0;o<r.length;o++)(s=n.sheet)==null||s.insertRule(r[o],o)}}attachDocumentToIframe(e,t){const s=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,r=[],n=new Set,o=(l,a)=>{l.nodeName==="DIALOG"&&n.add(l),this.collectIframeAndAttachDocument(r,l);const c=s.getMeta(l);if((c==null?void 0:c.type)===Oe.Element&&(c==null?void 0:c.tagName.toUpperCase())==="HTML"){const{documentElement:u,head:h}=t.contentDocument;this.insertStyleRules(u,h)}if(!this.usingVirtualDom)for(const u of this.config.plugins||[])u.onBuild&&u.onBuild(l,{id:a,replayer:this})};$t(e.node,{doc:t.contentDocument,mirror:s,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(t.contentDocument,e.node.id);for(const{mutationInQueue:l,builtNode:a}of r)this.attachDocumentToIframe(l,a),this.newDocumentQueue=this.newDocumentQueue.filter(c=>c!==l);n.forEach(l=>Is(l))}collectIframeAndAttachDocument(e,t){if(ct(t,this.mirror)){const s=this.newDocumentQueue.find(r=>r.parentId===this.mirror.getId(t));s&&e.push({mutationInQueue:s,builtNode:t})}}waitForStylesheetLoad(){var e;const t=(e=this.iframe.contentDocument)==null?void 0:e.head;if(t){const s=new Set;let r,n=this.service.state;const o=()=>{n=this.service.state};this.emitter.on(V.Start,o),this.emitter.on(V.Pause,o);const l=()=>{this.emitter.off(V.Start,o),this.emitter.off(V.Pause,o)};t.querySelectorAll('link[rel="stylesheet"]').forEach(a=>{a.sheet||(s.add(a),a.addEventListener("load",()=>{s.delete(a),s.size===0&&r!==-1&&(n.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(V.LoadStylesheetEnd),r&&clearTimeout(r),l())}))}),s.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(V.LoadStylesheetStart),r=setTimeout(()=>{n.matches("playing")&&this.play(this.getCurrentTime()),r=-1,l()},this.config.loadTimeout))}}async preloadAllImages(){const e=[];for(const t of this.service.state.context.events)t.type===I.IncrementalSnapshot&&t.data.source===E.CanvasMutation&&(e.push(this.deserializeAndPreloadCanvasEvents(t.data,t)),("commands"in t.data?t.data.commands:[t.data]).forEach(r=>{this.preloadImages(r,t)}));return Promise.all(e)}preloadImages(e,t){if(e.property==="drawImage"&&typeof e.args[0]=="string"&&!this.imageMap.has(t)){const s=document.createElement("canvas"),r=s.getContext("2d"),n=r==null?void 0:r.createImageData(s.width,s.height);r==null||r.putImageData(n,0,0)}}async deserializeAndPreloadCanvasEvents(e,t){if(!this.canvasEventMap.has(t)){const s={isUnchanged:!0};if("commands"in e){const r=await Promise.all(e.commands.map(async n=>{const o=await Promise.all(n.args.map(He(this.imageMap,null,s)));return re(A({},n),{args:o})}));s.isUnchanged===!1&&this.canvasEventMap.set(t,re(A({},e),{commands:r}))}else{const r=await Promise.all(e.args.map(He(this.imageMap,null,s)));s.isUnchanged===!1&&this.canvasEventMap.set(t,re(A({},e),{args:r}))}}}applyIncremental(e,t){var s,r,n;const{data:o}=e;switch(o.source){case E.Mutation:{try{this.applyMutation(o,t)}catch(l){this.warn(`Exception in mutation ${l.message||l}`,o)}break}case E.Drag:case E.TouchMove:case E.MouseMove:if(t){const l=o.positions[o.positions.length-1];this.mousePos={x:l.x,y:l.y,id:l.id,debugData:o}}else o.positions.forEach(l=>{const a={doAction:()=>{this.moveAndHover(l.x,l.y,l.id,t,o)},delay:l.timeOffset+e.timestamp-this.service.state.context.baselineTime};this.timer.addAction(a)}),this.timer.addAction({doAction(){},delay:e.delay-((s=o.positions[0])==null?void 0:s.timeOffset)});break;case E.MouseInteraction:{if(o.id===-1)break;const l=new Event(Ge(H[o.type])),a=this.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);this.emitter.emit(V.MouseInteraction,{type:o.type,target:a});const{triggerFocus:c}=this.config;switch(o.type){case H.Blur:"blur"in a&&a.blur();break;case H.Focus:c&&a.focus&&a.focus({preventScroll:!0});break;case H.Click:case H.TouchStart:case H.TouchEnd:case H.MouseDown:case H.MouseUp:t?(o.type===H.TouchStart?this.touchActive=!0:o.type===H.TouchEnd&&(this.touchActive=!1),o.type===H.MouseDown?this.lastMouseDownEvent=[a,l]:o.type===H.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:o.x||0,y:o.y||0,id:o.id,debugData:o}):(o.type===H.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(o.x||0,o.y||0,o.id,t,o),o.type===H.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):o.type===H.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):o.type===H.TouchEnd?this.mouse.classList.remove("touch-active"):a.dispatchEvent(l));break;case H.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:a.dispatchEvent(l)}break}case E.Scroll:{if(o.id===-1)break;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.scrollData=o;break}this.applyScroll(o,t);break}case E.ViewportResize:this.emitter.emit(V.Resize,{width:o.width,height:o.height});break;case E.Input:{if(o.id===-1)break;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.inputData=o;break}this.applyInput(o);break}case E.MediaInteraction:{const l=this.usingVirtualDom?this.virtualDom.mirror.getNode(o.id):this.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);const a=l,{events:c}=this.service.state.context;this.mediaManager.mediaMutation({target:a,timeOffset:e.timestamp-c[0].timestamp,mutation:o});break}case E.StyleSheetRule:case E.StyleDeclaration:{this.usingVirtualDom?o.styleId?this.constructedStyleMutations.push(o):o.id&&((r=this.virtualDom.mirror.getNode(o.id))==null||r.rules.push(o)):this.applyStyleSheetMutation(o);break}case E.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.canvasMutations.push({event:e,mutation:o})}else{const l=this.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);Er({event:e,mutation:o,target:l,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case E.Font:{try{const l=new FontFace(o.family,o.buffer?new Uint8Array(JSON.parse(o.fontSource)):o.fontSource,o.descriptors);(n=this.iframe.contentDocument)==null||n.fonts.add(l)}catch(l){this.warn(l)}break}case E.Selection:{if(t){this.lastSelectionData=o;break}this.applySelection(o);break}case E.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(o):this.applyAdoptedStyleSheet(o);break}case E.Visibility:{const{mutations:l}=o;for(const a of l){const c=this.usingVirtualDom?this.virtualDom.mirror.getNode(a.id):this.mirror.getNode(a.id);c&&c instanceof Element&&(c.style.visibility=a.isVisible?"visible":"hidden")}break}}}applyMutation(e,t){if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,km(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const c in this.legacy_missingNodeRetryMap)try{const u=this.legacy_missingNodeRetryMap[c],h=Ul(u.node,this.virtualDom,this.mirror);h&&(u.node=h)}catch(u){this.warn(u)}const s=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes=e.removes.filter(c=>s.getNode(c.id)?!0:(this.warnNodeNotFound(e,c.id),!1)),e.removes.forEach(c=>{var u;const h=s.getNode(c.id);if(!h)return;let d=s.getNode(c.parentId);if(!d)return this.warnNodeNotFound(e,c.parentId);if(c.isShadow&&Ue(d)&&(d=d.shadowRoot),s.removeNodeFromMap(h),d)try{d.removeChild(h),this.usingVirtualDom&&h.nodeName==="#text"&&d.nodeName==="STYLE"&&((u=d.rules)==null?void 0:u.length)>0&&(d.rules=[])}catch(f){if(f instanceof DOMException)this.warn("parent could not remove child in mutation",d,h,e);else throw f}});const r=A({},this.legacy_missingNodeRetryMap),n=[],o=c=>{let u=null;return c.nextId&&(u=s.getNode(c.nextId)),c.nextId!==null&&c.nextId!==void 0&&c.nextId!==-1&&!u},l=c=>{var u,h;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let d=s.getNode(c.parentId);if(!d)return c.node.type===Oe.Document?this.newDocumentQueue.push(c):n.push(c);c.node.isShadow&&(Ue(d)||d.attachShadow({mode:"open"}),d=d.shadowRoot);let f=null,m=null;if(c.previousId&&(f=s.getNode(c.previousId)),c.nextId&&(m=s.getNode(c.nextId)),o(c))return n.push(c);if(c.node.rootId&&!s.getNode(c.node.rootId))return;const y=c.node.rootId?s.getNode(c.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(ct(d,s)){this.attachDocumentToIframe(c,d);return}const p=(v,w)=>{if(!this.usingVirtualDom){Is(v);for(const C of this.config.plugins||[])C.onBuild&&C.onBuild(v,{id:w,replayer:this})}},g=$t(c.node,{doc:y,mirror:s,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:p});if(c.previousId===-1||c.nextId===-1){r[c.node.id]={node:g,mutation:c};return}const S=s.getMeta(d);if(S&&S.type===Oe.Element&&c.node.type===Oe.Text){const v=Array.isArray(d.childNodes)?d.childNodes:Array.from(d.childNodes);if(S.tagName==="textarea")for(const w of v)w.nodeType===d.TEXT_NODE&&d.removeChild(w);else if(S.tagName==="style"&&v.length===1)for(const w of v)w.nodeType===d.TEXT_NODE&&!s.hasNode(w)&&(g.textContent=w.textContent,d.removeChild(w))}else if((S==null?void 0:S.type)===Oe.Document){const v=d;c.node.type===Oe.DocumentType&&((u=v.childNodes[0])==null?void 0:u.nodeType)===Node.DOCUMENT_TYPE_NODE&&v.removeChild(v.childNodes[0]),g.nodeName==="HTML"&&v.documentElement&&v.removeChild(v.documentElement)}if(f&&f.nextSibling&&f.nextSibling.parentNode?d.insertBefore(g,f.nextSibling):m&&m.parentNode?d.contains(m)?d.insertBefore(g,m):d.insertBefore(g,null):d.appendChild(g),p(g,c.node.id),this.usingVirtualDom&&g.nodeName==="#text"&&d.nodeName==="STYLE"&&((h=d.rules)==null?void 0:h.length)>0&&(d.rules=[]),ct(g,this.mirror)){const v=this.mirror.getId(g),w=this.newDocumentQueue.find(C=>C.parentId===v);w&&(this.attachDocumentToIframe(w,g),this.newDocumentQueue=this.newDocumentQueue.filter(C=>C!==w))}(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(r,d,g,c)};e.adds.forEach(c=>{l(c)});const a=Date.now();for(;n.length;){const c=jl(n);if(n.length=0,Date.now()-a>500){this.warn("Timeout in the loop, please check the resolve tree data:",c);break}for(const u of c)s.getNode(u.value.parentId)?un(u,d=>{l(d)}):this.debug("Drop resolve tree since there is no parent for the root node.",u)}Object.keys(r).length&&Object.assign(this.legacy_missingNodeRetryMap,r),Yl(e.texts).forEach(c=>{var u;const h=s.getNode(c.id);if(!h)return e.removes.find(f=>f.id===c.id)?void 0:this.warnNodeNotFound(e,c.id);const d=h.parentElement;if(c.value&&d&&d.tagName==="STYLE"?h.textContent=ii(c.value,this.cache):h.textContent=c.value,this.usingVirtualDom){const f=h.parentNode;((u=f==null?void 0:f.rules)==null?void 0:u.length)>0&&(f.rules=[])}}),e.attributes.forEach(c=>{var u;const h=s.getNode(c.id);if(!h)return e.removes.find(d=>d.id===c.id)?void 0:this.warnNodeNotFound(e,c.id);for(const d in c.attributes)if(typeof d=="string"){const f=c.attributes[d];if(f===null)h.removeAttribute(d),d==="open"&&Yy(h,c);else if(typeof f=="string")try{if(d==="_cssText"&&(h.nodeName==="LINK"||h.nodeName==="STYLE"))try{const m=s.getMeta(h),y=$t(re(A({},m),{attributes:A(A({},m.attributes),c.attributes)}),{doc:h.ownerDocument,mirror:s,skipChild:!0,hackCss:!0,cache:this.cache});Object.assign(m.attributes,c.attributes);const p=h.nextSibling,g=h.parentNode;if(y&&g){g.removeChild(h),g.insertBefore(y,p),s.replace(c.id,y);break}}catch(m){}if(d==="value"&&h.nodeName==="TEXTAREA"){const m=h;m.childNodes.forEach(p=>m.removeChild(p));const y=(u=h.ownerDocument)==null?void 0:u.createTextNode(f);y&&m.appendChild(y)}else h.setAttribute(d,f);d==="rr_open_mode"&&h.nodeName==="DIALOG"&&Is(h,c)}catch(m){this.warn("An error occurred may due to the checkout feature.",m)}else if(d==="style"){const m=f,y=h;for(const p in m)if(m[p]===!1)y.style.removeProperty(p);else if(m[p]instanceof Array){const g=m[p];y.style.setProperty(p,g[0],g[1])}else{const g=m[p];y.style.setProperty(p,g)}}}})}applyScroll(e,t){var s,r;const n=this.mirror.getNode(e.id);if(!n)return this.debugNodeNotFound(e,e.id);const o=this.mirror.getMeta(n);if(n===this.iframe.contentDocument)(s=this.iframe.contentWindow)==null||s.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else if((o==null?void 0:o.type)===Oe.Document)(r=n.defaultView)==null||r.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else try{n.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"})}catch(l){}}applyInput(e){const t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch(s){}}applySelection(e){try{const t=new Set,s=e.ranges.map(({start:r,startOffset:n,end:o,endOffset:l})=>{const a=this.mirror.getNode(r),c=this.mirror.getNode(o);if(!a||!c)return;const u=new Range;u.setStart(a,n),u.setEnd(c,l);const h=a.ownerDocument,d=h==null?void 0:h.getSelection();return d&&t.add(d),{range:u,selection:d}});t.forEach(r=>r.removeAllRanges()),s.forEach(r=>{var n;return r&&((n=r.selection)==null?void 0:n.addRange(r.range))})}catch(t){}}applyStyleSheetMutation(e){var t;let s=null;e.styleId?s=this.styleMirror.getStyle(e.styleId):e.id&&(s=((t=this.mirror.getNode(e.id))==null?void 0:t.sheet)||null),s&&(e.source===E.StyleSheetRule?this.applyStyleSheetRule(e,s):e.source===E.StyleDeclaration&&this.applyStyleDeclaration(e,s))}applyStyleSheetRule(e,t){var s,r,n,o;if((s=e.adds)==null||s.forEach(({rule:l,index:a})=>{try{if(Array.isArray(a)){const{positions:c,index:u}=Sr(a);ot(t.cssRules,c).insertRule(l,u)}else{const c=a===void 0?void 0:Math.min(a,t.cssRules.length);t==null||t.insertRule(l,c)}}catch(c){}}),(r=e.removes)==null||r.forEach(({index:l})=>{try{if(Array.isArray(l)){const{positions:a,index:c}=Sr(l);ot(t.cssRules,a).deleteRule(c||0)}else t==null||t.deleteRule(l)}catch(a){}}),e.replace)try{(n=t.replace)==null||n.call(t,e.replace)}catch(l){}if(e.replaceSync)try{(o=t.replaceSync)==null||o.call(t,e.replaceSync)}catch(l){}}applyStyleDeclaration(e,t){e.set&&ot(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&ot(t.rules,e.index).style.removeProperty(e.remove.property)}applyAdoptedStyleSheet(e){var t;const s=this.mirror.getNode(e.id);if(!s)return;(t=e.styles)==null||t.forEach(l=>{var a;let c=null,u=null;if(Ue(s)?u=((a=s.ownerDocument)==null?void 0:a.defaultView)||null:s.nodeName==="#document"&&(u=s.defaultView),!!u)try{c=new u.CSSStyleSheet,this.styleMirror.add(c,l.styleId),this.applyStyleSheetRule({source:E.StyleSheetRule,adds:l.rules},c)}catch(h){}});const r=10;let n=0;const o=(l,a)=>{const c=a.map(u=>this.styleMirror.getStyle(u)).filter(u=>u!==null);Ue(l)?l.shadowRoot.adoptedStyleSheets=c:l.nodeName==="#document"&&(l.adoptedStyleSheets=c),c.length!==a.length&&n<r&&(setTimeout(()=>o(l,a),0+100*n),n++)};o(s,e.styleIds)}legacy_resolveMissingNode(e,t,s,r){const{previousId:n,nextId:o}=r,l=n&&e[n],a=o&&e[o];if(l){const{node:c,mutation:u}=l;t.insertBefore(c,s),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,t,c,u)}if(a){const{node:c,mutation:u}=a;t.insertBefore(c,s.nextSibling),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,t,c,u)}}moveAndHover(e,t,s,r,n){const o=this.mirror.getNode(s);if(!o)return this.debugNodeNotFound(n,s);const l=dn(o,this.iframe),a=e*l.absoluteScale+l.x,c=t*l.absoluteScale+l.y;this.mouse.style.left=`${a}px`,this.mouse.style.top=`${c}px`,r||this.drawMouseTail({x:a,y:c}),this.hoverElements(o)}drawMouseTail(e){if(!this.mouseTail)return;const{lineCap:t,lineWidth:s,strokeStyle:r,duration:n}=this.config.mouseTail===!0?zi:Object.assign({},zi,this.config.mouseTail),o=()=>{if(!this.mouseTail)return;const l=this.mouseTail.getContext("2d");!l||!this.tailPositions.length||(l.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),l.beginPath(),l.lineWidth=s,l.lineCap=t,l.strokeStyle=r,l.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(a=>l.lineTo(a.x,a.y)),l.stroke())};this.tailPositions.push(e),o(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(l=>l!==e),o()},n/this.speedService.state.context.timer.speed)}hoverElements(e){var t;(t=this.lastHoveredRootNode||this.iframe.contentDocument)==null||t.querySelectorAll(".\\:hover").forEach(r=>{r.classList.remove(":hover")}),this.lastHoveredRootNode=e.getRootNode();let s=e;for(;s;)s.classList&&s.classList.add(":hover"),s=s.parentElement}isUserInteraction(e){return e.type!==I.IncrementalSnapshot?!1:e.data.source>E.Mutation&&e.data.source<=E.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(V.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(e,t){this.warn(`Node with id '${t}' not found. `,e)}warnCanvasMutationFailed(e,t){this.warn("Has error on canvas update",t,"canvas mutation:",e)}debugNodeNotFound(e,t){this.debug(`Node with id '${t}' not found. `,e)}warn(...e){this.config.showWarning&&this.config.logger.warn(sa,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(sa,...e)}}const qy="3.4.0-alpha.1",{getVersion:Ky}=de,{isRecording:Qy}=de,{flushCustomEventQueue:eb}=de,{addCustomEvent:tb}=de,{freezePage:sb}=de,{takeFullSnapshot:ib}=de;exports.EventType=I;exports.IncrementalSource=E;exports.MouseInteractions=H;exports.Replayer=Jy;exports.ReplayerEvents=V;exports.addCustomEvent=tb;exports.canvasMutation=Er;exports.flushCustomEventQueue=eb;exports.freezePage=sb;exports.getVersion=Ky;exports.isRecording=Qy;exports.record=de;exports.takeFullSnapshot=ib;exports.utils=qm;exports.version=qy;
|
|
93
93
|
;if (typeof module.exports == "object" && typeof exports == "object") {
|
|
94
94
|
var __cp = (to, from, except, desc) => {
|
|
95
95
|
if ((from && typeof from === "object") || typeof from === "function") {
|