@appsurify-testmap/rrweb 3.10.0-alpha.1 → 3.11.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 +612 -415
- package/dist/rrweb.cjs.map +1 -1
- package/dist/rrweb.js +612 -415
- package/dist/rrweb.js.map +1 -1
- package/dist/rrweb.umd.cjs +642 -415
- package/dist/rrweb.umd.cjs.map +3 -3
- package/dist/rrweb.umd.min.cjs +36 -36
- package/dist/rrweb.umd.min.cjs.map +3 -3
- package/package.json +6 -6
package/dist/rrweb.umd.min.cjs
CHANGED
|
@@ -1,82 +1,82 @@
|
|
|
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 Nc=Object.defineProperty,Rc=Object.defineProperties;var Tc=Object.getOwnPropertyDescriptors;var cs=Object.getOwnPropertySymbols;var kn=Object.prototype.hasOwnProperty,_n=Object.prototype.propertyIsEnumerable;var $n=(i,e,t)=>e in i?Nc(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,A=(i,e)=>{for(var t in e||(e={}))kn.call(e,t)&&$n(i,t,e[t]);if(cs)for(var t of cs(e))_n.call(e,t)&&$n(i,t,e[t]);return i},ne=(i,e)=>Rc(i,Tc(e));var it=(i,e)=>{var t={};for(var s in i)kn.call(i,s)&&e.indexOf(s)<0&&(t[s]=i[s]);if(i!=null&&cs)for(var s of cs(i))e.indexOf(s)<0&&_n.call(i,s)&&(t[s]=i[s]);return t};var Oc=Object.defineProperty,Dc=(i,e,t)=>e in i?Oc(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,b=(i,e,t)=>Dc(i,typeof e!="symbol"?e+"":e,t),Ln;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var $c=Object.defineProperty,kc=(i,e,t)=>e in i?$c(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Mi=(i,e,t)=>kc(i,typeof e!="symbol"?e+"":e,t),L=(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))(L||{});const Pn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Fn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},us={},_c=()=>!!globalThis.Zone;function Or(i){if(us[i])return us[i];const e=globalThis[i],t=e.prototype,s=i in Pn?Pn[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 Fn?Fn[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&&!_c())return us[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?us[i]=c:t}catch(l){return t}}const Ai={};function Xe(i,e,t){var s;const r=`${i}.${String(t)}`;if(Ai[r])return Ai[r].call(e);const n=Or(i),o=(s=Object.getOwnPropertyDescriptor(n,t))==null?void 0:s.get;return o?(Ai[r]=o,o.call(e)):e[t]}const Ii={};function da(i,e,t){const s=`${i}.${String(t)}`;if(Ii[s])return Ii[s].bind(e);const n=Or(i)[t];return typeof n!="function"?e[t]:(Ii[s]=n,n.bind(e))}function Lc(i){return Xe("Node",i,"childNodes")}function Pc(i){return Xe("Node",i,"parentNode")}function Fc(i){return Xe("Node",i,"parentElement")}function zc(i){return Xe("Node",i,"textContent")}function Bc(i,e){return da("Node",i,"contains")(e)}function Wc(i){return da("Node",i,"getRootNode")()}function Uc(i){return!i||!("host"in i)?null:Xe("ShadowRoot",i,"host")}function Vc(i){return i.styleSheets}function Hc(i){return!i||!("shadowRoot"in i)?null:Xe("Element",i,"shadowRoot")}function Gc(i,e){return Xe("Element",i,"querySelector")(e)}function jc(i,e){return Xe("Element",i,"querySelectorAll")(e)}function Yc(){return Or("MutationObserver").constructor}function Zc(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 Xc(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 Jc(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 le={childNodes:Lc,parentNode:Pc,parentElement:Fc,textContent:zc,contains:Bc,getRootNode:Wc,host:Uc,styleSheets:Vc,shadowRoot:Hc,querySelector:Gc,querySelectorAll:jc,mutationObserver:Yc,patch:Zc,describeNode:Xc,getElementVisibility:Jc};function kt(i){return i.nodeType===i.ELEMENT_NODE}function _t(i){const e=i&&"host"in i&&"mode"in i&&le.host(i)||null;return!!(e&&"shadowRoot"in e&&le.shadowRoot(e)===i)}function Lt(i){return Object.prototype.toString.call(i)==="[object ShadowRoot]"}function qc(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 Kc(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 ji(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=>fa(r,t)).join("");return qc(s)}catch(e){return null}}function fa(i,e){if(eu(i)){let t;try{t=ji(i.styleSheet)||Kc(i)}catch(s){t=i.cssText}return i.styleSheet.href?Us(t,i.styleSheet.href):t}else{let t=i.cssText;return i.type===CSSRule.KEYFRAMES_RULE||(i.type,CSSRule.KEYFRAME_RULE),tu(i)&&i.selectorText.includes(":")&&(t=Qc(t)),e?Us(t,e):t}}function Qc(i){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return i.replace(e,"$1\\$2")}function eu(i){return"styleSheet"in i}function tu(i){return"selectorText"in i}class Dr{constructor(){Mi(this,"idNodeMap",new Map),Mi(this,"nodeMetaMap",new WeakMap),Mi(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 pa(){return new Dr}function zt({element:i,maskInputOptions:e,tagName:t,type:s,value:r,maskInputFn:n}){let o=r||"";const l=s&&Ze(s);return(e[t.toLowerCase()]||l&&e[l])&&(n?o=n(o,i):o="*".repeat(o.length)),o}function Ze(i){return i.toLowerCase()}const zn="__rrweb_original__";function su(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=zn in n?n[zn]: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 iu(i,e){return!i||!e||i.type!==e.type?!1:i.type===L.Document?i.compatMode===e.compatMode:i.type===L.DocumentType?i.name===e.name&&i.publicId===e.publicId&&i.systemId===e.systemId:i.type===L.Comment||i.type===L.Text||i.type===L.CDATA?i.textContent===e.textContent:i.type===L.Element?i.tagName===e.tagName&&JSON.stringify(i.attributes)===JSON.stringify(e.attributes)&&i.isSVG===e.isSVG&&i.needBlock===e.needBlock:!1}function Bt(i){const e=i.type;return i.hasAttribute("data-rr-is-password")?"password":e?Ze(e):null}function $r(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 ru(i){let e="";return i.indexOf("//")>-1?e=i.split("/").slice(0,3).join("/"):e=i.split("/")[0],e=e.split("?")[0],e}const nu=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ou=/^(?:[a-z+]+:)?\/\//i,au=/^www\..*/i,lu=/^(data:)([^,]*),(.*)/i;function Us(i,e){return(i||"").replace(nu,(t,s,r,n,o,l)=>{const a=r||o||l,c=s||n||"";if(!a)return t;if(ou.test(a)||au.test(a))return`url(${c}${a}${c})`;if(lu.test(a))return`url(${c}${a}${c})`;if(a[0]==="/")return`url(${c}${ru(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 hs(i,e=!1){return e?i.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):i.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function cu(i,e,t=!1){const s=Array.from(e.childNodes),r=[];let n=0;if(s.length>1&&i&&typeof i=="string"){let o=hs(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=hs(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=hs(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=hs(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 uu(i,e){return cu(i,e).join("/* rr_split */")}function hu(i){var e;const t=le.parentNode(i),s=t&&t;return!s||!kr(s)?!1:((e=i.textContent)==null?void 0:e.trim())!==""}function kr(i){return le.getElementVisibility(i).isVisible}const du=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],fu=["a","button","input","select","textarea","label","details","summary","dialog","video","audio"],pu=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],_r=new WeakSet,mu=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(i,e,t){if(mu.call(this,i,e,t),this instanceof Element){const s=i.toLowerCase();du.includes(s)&&_r.add(this)}};const gu=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(i,e,t){gu.call(this,i,e,t)};function yu(i){return i instanceof Element&&_r.has(i)}function bu(i){if(i.nodeType===Node.ELEMENT_NODE){const e=i,t=e.tagName.toLowerCase();if(fu.includes(t))return!0;const s=e.hasAttribute("tabindex")&&e.getAttribute("tabindex")!=="-1",r=["button","link","checkbox","switch","menuitem"].includes(e.getAttribute("role")||"");return yu(e)||s||r||e instanceof HTMLAnchorElement&&e.hasAttribute("href")||e instanceof HTMLButtonElement&&!e.disabled}return!1}function Bn(){document.querySelectorAll("*").forEach(e=>{pu.forEach(t=>{e.hasAttribute(t)&&_r.add(e)})})}try{document.readyState==="complete"||document.readyState==="interactive"?Bn():document.addEventListener("DOMContentLoaded",Bn)}catch(i){}const ds={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},vu={MIN_CONFIDENCE_FOR_SKIP:.7},Wn=["form","main","nav","section","article","footer","header"],Un=["form","navigation","main","region","contentinfo","complementary","banner","search"],wu=["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"],He={"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},ma=new Set(["id","class","style","xmlns","tabindex","contenteditable"]),Su={maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:0,fallbackToBody:!0,includeUtilityClasses:!1,source:"dom-dsl"};function Wt(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 ga=new Set(["aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-activedescendant","for","form","list","headers","aria-details","aria-errormessage","aria-flowto"]);function ya(i){return i.trim().split(/\s+/).some(e=>Wt(e))}let Cu=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();Wn.includes(s)&&(t+=xe.SEMANTIC_TAG);const r=e.getAttribute("role");r&&Un.includes(r)&&(t+=xe.ROLE),(e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby"))&&(t+=xe.ARIA_LABEL);const n=e.id;return n&&!Wt(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(Wn.includes(t))return"A";const s=e.getAttribute("role");return s&&Un.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 xu=[/^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,}/],Eu=[/^\[/,/^(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 Lr(i){return xu.some(e=>e.test(i))}function Pr(i){return i.length<=2||/^\d/.test(i)?!0:Eu.some(e=>e.test(i))}function Mu(i){return!Lr(i)&&!Pr(i)}function Au(i){return i.filter(e=>Mu(e))}function Iu(i){const e=[],t=[];for(const s of i)Pr(s)||Lr(s)?t.push(s):e.push(s);return{semantic:e,utility:t}}function Vn(i){return Pr(i)||Lr(i)}const Hn=i=>i.replace(/([#:.[\]@])/g,"\\$1");let Nu=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)<vu.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&&!Wt(e.id)&&(t+=`#${Hn(e.id)}`);for(const s of Array.from(e.classList))Vn(s)||(t+=`.${Hn(s)}`);return t}filterNoise(e){return e.filter(t=>this.shouldInclude(t))}shouldInclude(e){const t=e.tagName.toLowerCase();return wu.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(!Vn(s))return!0}if(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))return!0;const t=e.id;return!!(t&&!Wt(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 Ru(i){return i?i.trim().replace(/[\n\t\r]/g," ").replace(/\s+/g," "):""}const Tu={preserveQueryForAbsolute:!0,removeDynamicHashes:!0};function Ou(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 Du(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&&Ou(r)||(l+=`#${r}`)),l}function ba(i,e,t={}){if(!e)return e;const s=A(A({},Tu),t);return i==="href"||i==="src"?Du(e,s):e}const $u=["role","aria-label","aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-level","aria-posinset","aria-setsize","aria-haspopup"],ku=["aria-selected","aria-checked","aria-pressed","aria-expanded","aria-hidden","aria-disabled","aria-current","aria-busy","aria-invalid","aria-grabbed","aria-live","aria-atomic"],_u=["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"],Lu=["data-radix-","data-headlessui-","data-reach-","data-mui-","data-chakra-","data-mantine-","data-tw-"],Pu=["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"],Fu=["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"],zu=["data-category","data-action","data-label","data-value"],Bu=["id","name","type","placeholder","title","for","alt","href"],Wu=["disabled","checked","selected","hidden","readonly","required","value"],Uu=[/^radix-/,/^headlessui-/,/^mui-/,/:\w+:/];function Vu(i,e){return $u.includes(i)?!0:ku.includes(i)||_u.includes(i)||Lu.some(t=>i.startsWith(t))?!1:Pu.includes(i)?!0:Fu.some(t=>i.startsWith(t))||zu.includes(i)?!1:i.startsWith("data-")&&i.endsWith("-id")?!0:i==="id"?!Uu.some(t=>t.test(e)):Bu.includes(i)?!0:Wu.includes(i)?!1:!!i.startsWith("data-")}let Gn=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&&!Wt(s)&&(t.id=s),e.classList.length>0){const o=Array.from(e.classList);if(this.includeUtilityClasses)t.classes=o;else{const{semantic:l}=Iu(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!!(ma.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 He[e]!==void 0?He[e]:e.startsWith("data-")?He["data-*"]:e.startsWith("aria-")?He["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)||!Vu(r,s.value)||ga.has(r)&&ya(s.value)||this.getAttributePriority(r)===0)continue;const n=r==="href"||r==="src"?ba(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=Ru(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)}},Hu=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 Gu(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*ds.ANCHOR+s*ds.PATH+r*ds.TARGET+e*ds.UNIQUENESS,o=i.anchor.degraded?.2:0;return Math.max(0,Math.min(1,n-o))}let ju=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}},Yu=class{constructor(e={}){var t,s;this.eidCache=new WeakMap,this.selectorResultCache=new ju((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 ne(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 Zu(i){return new Yu(i)}let Ni=null;function Xu(){return Ni||(Ni=Zu()),Ni}function jn(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 kc=Object.defineProperty,_c=Object.defineProperties;var Lc=Object.getOwnPropertyDescriptors;var cs=Object.getOwnPropertySymbols;var Ln=Object.prototype.hasOwnProperty,Pn=Object.prototype.propertyIsEnumerable;var _n=(i,e,t)=>e in i?kc(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,M=(i,e)=>{for(var t in e||(e={}))Ln.call(e,t)&&_n(i,t,e[t]);if(cs)for(var t of cs(e))Pn.call(e,t)&&_n(i,t,e[t]);return i},ne=(i,e)=>_c(i,Lc(e));var it=(i,e)=>{var t={};for(var s in i)Ln.call(i,s)&&e.indexOf(s)<0&&(t[s]=i[s]);if(i!=null&&cs)for(var s of cs(i))e.indexOf(s)<0&&Pn.call(i,s)&&(t[s]=i[s]);return t};var Pc=Object.defineProperty,Fc=(i,e,t)=>e in i?Pc(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,b=(i,e,t)=>Fc(i,typeof e!="symbol"?e+"":e,t),Fn;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var zc=Object.defineProperty,Bc=(i,e,t)=>e in i?zc(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Ii=(i,e,t)=>Bc(i,typeof e!="symbol"?e+"":e,t),P=(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))(P||{});const zn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Bn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},us={},Wc=()=>!!globalThis.Zone;function $r(i){if(us[i])return us[i];const e=globalThis[i],t=e.prototype,s=i in zn?zn[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 Bn?Bn[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&&!Wc())return us[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?us[i]=c:t}catch(l){return t}}const Ni={};function Xe(i,e,t){var s;const r=`${i}.${String(t)}`;if(Ni[r])return Ni[r].call(e);const n=$r(i),o=(s=Object.getOwnPropertyDescriptor(n,t))==null?void 0:s.get;return o?(Ni[r]=o,o.call(e)):e[t]}const Ri={};function ga(i,e,t){const s=`${i}.${String(t)}`;if(Ri[s])return Ri[s].bind(e);const n=$r(i)[t];return typeof n!="function"?e[t]:(Ri[s]=n,n.bind(e))}function Uc(i){return Xe("Node",i,"childNodes")}function Vc(i){return Xe("Node",i,"parentNode")}function Hc(i){return Xe("Node",i,"parentElement")}function Gc(i){return Xe("Node",i,"textContent")}function jc(i,e){return ga("Node",i,"contains")(e)}function Yc(i){return ga("Node",i,"getRootNode")()}function Zc(i){return!i||!("host"in i)?null:Xe("ShadowRoot",i,"host")}function Xc(i){return i.styleSheets}function qc(i){return!i||!("shadowRoot"in i)?null:Xe("Element",i,"shadowRoot")}function Jc(i,e){return Xe("Element",i,"querySelector")(e)}function Kc(i,e){return Xe("Element",i,"querySelectorAll")(e)}function Qc(){return $r("MutationObserver").constructor}function eu(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 tu(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 su(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 m=Math.max(0,Math.min(r.right,n)-Math.max(r.left,0)),p=Math.max(0,Math.min(r.bottom,o)-Math.max(r.top,0)),y=m*p,f=r.width*r.height;h=f>0?y/f:0}return{isVisible:u,ratio:h}}const le={childNodes:Uc,parentNode:Vc,parentElement:Hc,textContent:Gc,contains:jc,getRootNode:Yc,host:Zc,styleSheets:Xc,shadowRoot:qc,querySelector:Jc,querySelectorAll:Kc,mutationObserver:Qc,patch:eu,describeNode:tu,getElementVisibility:su};function kt(i){return i.nodeType===i.ELEMENT_NODE}function _t(i){const e=i&&"host"in i&&"mode"in i&&le.host(i)||null;return!!(e&&"shadowRoot"in e&&le.shadowRoot(e)===i)}function Lt(i){return Object.prototype.toString.call(i)==="[object ShadowRoot]"}function iu(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 ru(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 Zi(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=>ya(r,t)).join("");return iu(s)}catch(e){return null}}function ya(i,e){if(ou(i)){let t;try{t=Zi(i.styleSheet)||ru(i)}catch(s){t=i.cssText}return i.styleSheet.href?Us(t,i.styleSheet.href):t}else{let t=i.cssText;return i.type===CSSRule.KEYFRAMES_RULE||(i.type,CSSRule.KEYFRAME_RULE),au(i)&&i.selectorText.includes(":")&&(t=nu(t)),e?Us(t,e):t}}function nu(i){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return i.replace(e,"$1\\$2")}function ou(i){return"styleSheet"in i}function au(i){return"selectorText"in i}class kr{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 ba(){return new kr}function zt({element:i,maskInputOptions:e,tagName:t,type:s,value:r,maskInputFn:n}){let o=r||"";const l=s&&Ze(s);return(e[t.toLowerCase()]||l&&e[l])&&(n?o=n(o,i):o="*".repeat(o.length)),o}function Ze(i){return i.toLowerCase()}const Wn="__rrweb_original__";function lu(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=Wn in n?n[Wn]: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 cu(i,e){return!i||!e||i.type!==e.type?!1:i.type===P.Document?i.compatMode===e.compatMode:i.type===P.DocumentType?i.name===e.name&&i.publicId===e.publicId&&i.systemId===e.systemId:i.type===P.Comment||i.type===P.Text||i.type===P.CDATA?i.textContent===e.textContent:i.type===P.Element?i.tagName===e.tagName&&JSON.stringify(i.attributes)===JSON.stringify(e.attributes)&&i.isSVG===e.isSVG&&i.needBlock===e.needBlock:!1}function Bt(i){const e=i.type;return i.hasAttribute("data-rr-is-password")?"password":e?Ze(e):null}function _r(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 uu(i){let e="";return i.indexOf("//")>-1?e=i.split("/").slice(0,3).join("/"):e=i.split("/")[0],e=e.split("?")[0],e}const hu=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,du=/^(?:[a-z+]+:)?\/\//i,fu=/^www\..*/i,pu=/^(data:)([^,]*),(.*)/i;function Us(i,e){return(i||"").replace(hu,(t,s,r,n,o,l)=>{const a=r||o||l,c=s||n||"";if(!a)return t;if(du.test(a)||fu.test(a))return`url(${c}${a}${c})`;if(pu.test(a))return`url(${c}${a}${c})`;if(a[0]==="/")return`url(${c}${uu(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 hs(i,e=!1){return e?i.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):i.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function mu(i,e,t=!1){const s=Array.from(e.childNodes),r=[];let n=0;if(s.length>1&&i&&typeof i=="string"){let o=hs(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=hs(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),m=o.split(d),p=-1;if(m.length===2)p=m[0].length;else if(m.length>2&&m[0]===""&&s[a-1].textContent!=="")p=o.indexOf(d,1);else if(m.length===1){if(d=d.substring(0,d.length-1),m=o.split(d),m.length<=1)return r.push(i),r;h=u+1}else h===c.length-1&&(p=o.indexOf(d));if(m.length>=2&&h>u){const y=s[a-1].textContent;if(y&&typeof y=="string"){const f=hs(y).length;p=o.indexOf(d,f)}p===-1&&(p=m[0].length)}if(p!==-1){let y=Math.floor(p/l);for(;y>0&&y<i.length;){if(n+=1,n>50*s.length)return r.push(i),r;const f=hs(i.substring(0,y),t);if(f.length===p){r.push(i.substring(0,y)),i=i.substring(y),o=o.substring(p);break}else f.length<p?y+=Math.max(1,Math.floor((p-f.length)/l)):y-=Math.max(1,Math.floor((f.length-p)*l))}break}}}}return r.push(i),r}function gu(i,e){return mu(i,e).join("/* rr_split */")}function yu(i){var e;const t=le.parentNode(i),s=t&&t;return!s||!Lr(s)?!1:((e=i.textContent)==null?void 0:e.trim())!==""}function Lr(i){return le.getElementVisibility(i).isVisible}const bu=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],vu=["a","button","input","select","textarea","label","details","summary","dialog","video","audio"],wu=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],Pr=new WeakSet,Su=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(i,e,t){if(Su.call(this,i,e,t),this instanceof Element){const s=i.toLowerCase();bu.includes(s)&&Pr.add(this)}};const Cu=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(i,e,t){Cu.call(this,i,e,t)};function xu(i){return i instanceof Element&&Pr.has(i)}function Eu(i){if(i.nodeType===Node.ELEMENT_NODE){const e=i,t=e.tagName.toLowerCase();if(vu.includes(t))return!0;const s=e.hasAttribute("tabindex")&&e.getAttribute("tabindex")!=="-1",r=["button","link","checkbox","switch","menuitem"].includes(e.getAttribute("role")||"");return xu(e)||s||r||e instanceof HTMLAnchorElement&&e.hasAttribute("href")||e instanceof HTMLButtonElement&&!e.disabled}return!1}function Un(){document.querySelectorAll("*").forEach(e=>{wu.forEach(t=>{e.hasAttribute(t)&&Pr.add(e)})})}try{document.readyState==="complete"||document.readyState==="interactive"?Un():document.addEventListener("DOMContentLoaded",Un)}catch(i){}const ds={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},Au={MIN_CONFIDENCE_FOR_SKIP:.7},Vn=["form","main","nav","section","article","footer","header"],Hn=["form","navigation","main","region","contentinfo","complementary","banner","search"],Mu=["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"],He={"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},va=new Set(["id","class","style","xmlns","tabindex","contenteditable"]),Iu={maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:0,fallbackToBody:!0,includeUtilityClasses:!1,source:"dom-dsl"};function Wt(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 wa=new Set(["aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-activedescendant","for","form","list","headers","aria-details","aria-errormessage","aria-flowto"]);function Sa(i){return i.trim().split(/\s+/).some(e=>Wt(e))}let Nu=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();Vn.includes(s)&&(t+=xe.SEMANTIC_TAG);const r=e.getAttribute("role");r&&Hn.includes(r)&&(t+=xe.ROLE),(e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby"))&&(t+=xe.ARIA_LABEL);const n=e.id;return n&&!Wt(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(Vn.includes(t))return"A";const s=e.getAttribute("role");return s&&Hn.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 Ru=[/^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,}/],Tu=[/^\[/,/^(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 Fr(i){return Ru.some(e=>e.test(i))}function zr(i){return i.length<=2||/^\d/.test(i)?!0:Tu.some(e=>e.test(i))}function Ou(i){return!Fr(i)&&!zr(i)}function Du(i){return i.filter(e=>Ou(e))}function $u(i){const e=[],t=[];for(const s of i)zr(s)||Fr(s)?t.push(s):e.push(s);return{semantic:e,utility:t}}function Gn(i){return zr(i)||Fr(i)}const ku=new Set(["tr","td","th","thead","tbody","tfoot"]),_u=new Set(["data-testid","data-qa","data-cy","data-test","aria-label","name","href"]);function Lu(i){if(i.id)return!0;if(i.attributes){for(const e of Object.keys(i.attributes))if(_u.has(e))return!0}return!1}function Pu(i,e,t){var n;var s;const r=i.parentElement;if(!r)return!0;for(const o of Array.from(r.children))if(!(o===i||o.tagName.toLowerCase()!==e)&&((n=(s=o.textContent)==null?void 0:s.trim())!=null?n:"")===t)return!1;return!0}function Vs(i,e,t){var s;if(ku.has(i))return!0;if(Lu(e))return!1;if(t){const r=t.parentElement;if(r){const n=(s=e.text)==null?void 0:s.normalized;if(n&&Pu(t,i,n))return!1;if(Array.from(r.children).some(o=>o!==t&&o.tagName.toLowerCase()===i))return!0}return!1}return!0}const jn=i=>i.replace(/([#:.[\]@])/g,"\\$1");let Fu=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.tagName.toLowerCase(),d=s.extract(u);let m;if(Vs(h,d,u)){const p=u.parentElement;if(p){const y=Array.from(p.children).indexOf(u);y!==-1&&(m=y+1)}}return{tag:h,semantics:d,score:s.scoreElement(u),nthChild:m}}),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)<Au.MIN_CONFIDENCE_FOR_SKIP)continue;const h=this.insertNodeInOrder(t,u,e),d=this.buildTestSelector(s,h,r);try{let m;if(this.cache){const p=this.cache.getSelectorResults(d);p!==void 0?m=p:(m=Array.from(l.querySelectorAll(d)),this.cache.setSelectorResults(d,m))}else m=l.querySelectorAll(d);if(m.length===1)return h;m.length<a.length&&(t=h)}catch(m){}}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&&!Wt(e.id)&&(t+=`#${jn(e.id)}`);for(const s of Array.from(e.classList))Gn(s)||(t+=`.${jn(s)}`);return t}filterNoise(e){return e.filter(t=>this.shouldInclude(t))}shouldInclude(e){const t=e.tagName.toLowerCase();return Mu.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(!Gn(s))return!0}if(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))return!0;const t=e.id;return!!(t&&!Wt(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.tagName.toLowerCase(),a=s.extract(o);let c;if(Vs(l,a,o)){const u=o.parentElement;if(u){const h=Array.from(u.children).indexOf(o);h!==-1&&(c=h+1)}}return{tag:l,semantics:a,score:s.scoreElement(o),nthChild:c}}),degraded:!1}}};function zu(i){return i?i.trim().replace(/[\n\t\r]/g," ").replace(/\s+/g," "):""}const Bu={preserveQueryForAbsolute:!0,removeDynamicHashes:!0};function Wu(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 Uu(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&&Wu(r)||(l+=`#${r}`)),l}function Ca(i,e,t={}){if(!e)return e;const s=M(M({},Bu),t);return i==="href"||i==="src"?Uu(e,s):e}const Vu=["role","aria-label","aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-level","aria-posinset","aria-setsize","aria-haspopup"],Hu=["aria-selected","aria-checked","aria-pressed","aria-expanded","aria-hidden","aria-disabled","aria-current","aria-busy","aria-invalid","aria-grabbed","aria-live","aria-atomic"],Gu=["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"],ju=["data-radix-","data-headlessui-","data-reach-","data-mui-","data-chakra-","data-mantine-","data-tw-"],Yu=["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"],Zu=["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"],Xu=["data-category","data-action","data-label","data-value"],qu=["id","name","type","placeholder","title","for","alt","href"],Ju=["disabled","checked","selected","hidden","readonly","required","value"],Ku=[/^radix-/,/^headlessui-/,/^mui-/,/:\w+:/];function Qu(i,e){return Vu.includes(i)?!0:Hu.includes(i)||Gu.includes(i)||ju.some(t=>i.startsWith(t))?!1:Yu.includes(i)?!0:Zu.some(t=>i.startsWith(t))||Xu.includes(i)?!1:i.startsWith("data-")&&i.endsWith("-id")?!0:i==="id"?!Ku.some(t=>t.test(e)):qu.includes(i)?!0:Ju.includes(i)?!1:!!i.startsWith("data-")}let Yn=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&&!Wt(s)&&(t.id=s),e.classList.length>0){const o=Array.from(e.classList);if(this.includeUtilityClasses)t.classes=o;else{const{semantic:l}=$u(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!!(va.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 He[e]!==void 0?He[e]:e.startsWith("data-")?He["data-*"]:e.startsWith("aria-")?He["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)||!Qu(r,s.value)||wa.has(r)&&Sa(s.value)||this.getAttributePriority(r)===0)continue;const n=r==="href"||r==="src"?Ca(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=zu(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)}},eh=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 m=parseFloat((n=e.getAttribute("width"))!=null?n:"0"),p=parseFloat((o=e.getAttribute("height"))!=null?o:"0");m>0&&p>0&&s.push(`ratio=${(m/p).toFixed(2)}`)}break;case"ellipse":{const m=parseFloat((l=e.getAttribute("rx"))!=null?l:"0"),p=parseFloat((a=e.getAttribute("ry"))!=null?a:"0");m>0&&p>0&&s.push(`ratio=${(m/p).toFixed(2)}`)}break;case"line":{const m=parseFloat((c=e.getAttribute("x1"))!=null?c:"0"),p=parseFloat((u=e.getAttribute("y1"))!=null?u:"0"),y=parseFloat((h=e.getAttribute("x2"))!=null?h:"0"),f=parseFloat((d=e.getAttribute("y2"))!=null?d:"0"),g=Math.atan2(f-p,y-m);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 th(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*ds.ANCHOR+s*ds.PATH+r*ds.TARGET+e*ds.UNIQUENESS,o=i.anchor.degraded?.2:0;return Math.max(0,Math.min(1,n-o))}let sh=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}},ih=class{constructor(e={}){var t,s;this.eidCache=new WeakMap,this.selectorResultCache=new sh((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 ne(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 rh(i){return new ih(i)}let Ti=null;function nh(){return Ti||(Ti=rh()),Ti}function Zn(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
|
-
3. You are working with a document node instead of an element`)}function
|
|
5
|
+
3. You are working with a document node instead of an element`)}function oh(i,e){if(!e)return;const t=Zn(i),s=e instanceof Document?e:Zn(e);if(t!==s)throw new Error(`Cross-document operation detected: element and root are from different documents.
|
|
6
6
|
Common causes:
|
|
7
7
|
1. Working with iframe: pass iframe.contentDocument as root parameter
|
|
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 qu(i,e={}){var Y,X,ee,T;var t;if(!i||!i.ownerDocument||!i.isConnected)return null;const s=A(A({},Su),e);if(s.root)try{Ju(i,s.root)}catch(W){return console.error("Cross-document generation detected:",W),null}const r=(Y=s.cache)!=null?Y:Xu(),n=r.getEID(i);if(n!==void 0)return n;if(i.tagName.toLowerCase()==="html"){const W=new Gn(s,r),z=eh(i,s,W);return r.setEID(i,z),z}const o=new Cu(s,r),l=new Nu(s,r),a=new Gn(s,r),c=new Hu,u=o.findAnchor(i);if(!u&&!s.fallbackToBody)return null;const h=(ee=(X=u==null?void 0:u.element)!=null?X:(t=i.ownerDocument)==null?void 0:t.body)!=null?ee: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 W=Array.from(m.children).indexOf(h);W!==-1&&(y=W+1)}const p=a.extract(h),g={tag:h.tagName.toLowerCase(),semantics:p,score:(T=u==null?void 0:u.score)!=null?T:xe.DEGRADED_SCORE,degraded:d,nthChild:y},S=l.buildPath(h,i,a),C=a.extract(i);s.enableSvgFingerprint&&Ku(i)&&(C.svg=c.fingerprint(i));const v=i.parentElement;let w;if(v){const W=Array.from(v.children).indexOf(i);W!==-1&&(w=W+1)}const N={tag:i.tagName.toLowerCase(),semantics:C,score:a.scoreElement(i),nthChild:w},x=[],R={onMultiple:"best-score",onMissing:"anchor-only",maxDepth:3},_=g.degraded||S.degraded,B=Qu(g.degraded,S),V={version:"1.0",anchor:g,path:S.path,target:N,constraints:x,fallback:R,meta:{confidence:0,generatedAt:new Date().toISOString(),generator:"dom-eid@1.0",source:s.source,degraded:_,degradationReason:B}};return V.meta.confidence=Gu(V),V.meta.confidence<s.confidenceThreshold?null:(r.setEID(i,V),V)}function Ku(i){return i.namespaceURI==="http://www.w3.org/2000/svg"||i.tagName.toLowerCase()==="svg"||i instanceof SVGElement}function Qu(i,e){if(i&&e.degraded)return"anchor-and-path-degraded";if(i)return"no-semantic-anchor";if(e.degraded)return e.degradationReason}function eh(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 va={maxClasses:2,maxAttributes:5,includeText:!0,maxTextLength:50,simplifyTarget:!0,includeConstraints:!0};function Yn(i){return i==="id"?101:He[i]!==void 0?He[i]:i.startsWith("data-")?He["data-*"]:i.startsWith("aria-")?He["aria-*"]:0}function th(i){return["id","data-testid","data-qa","data-cy","href","text","role"].includes(i)}function sh(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 ih(i,e){const t=A(A({},va),e),s=`v${i.version}`,r=Ri(i.anchor,!1,t),n=i.path.length>0?i.path.map(a=>Ri(a,!1,t)).join(" > ")+" > ":"",o=Ri(i.target,!0,t),l=t.includeConstraints?rh(i):"";return`${s}: ${r} :: ${n}${o}${l}`}function Ri(i,e=!1,t=va){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=Yn(h),m=h==="href"||h==="src"?ba(h,d):d;return{name:h,value:m,priority:f}}).filter(h=>h.name!=="id"&&h.name!=="class"&&ma.has(h.name)||ga.has(h.name)&&ya(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}="${Yi(d)}"`);if(t.includeText&&r.text&&!sh(r.text.normalized)){const h=r.text.normalized;h.length>0&&h.length<=t.maxTextLength&&o.push(`text="${Yi(h)}"`)}let u=o;if(o.length>0&&(e&&t.simplifyTarget&&r.id&&(u=o.filter(h=>{const d=h.split("=")[0];return Yn(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=Au(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(th);e&&t.simplifyTarget&&h||(n+=`#${i.nthChild}`)}return n}function rh(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=Yi(String(t.params.reference));e.push(`text="${s}"`)}break}return e.length===0?"":` {${e.join(",")}}`}function Yi(i){return i.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/>/g,"\\>").replace(/:/g,"\\:")}function nh(i,e,t){const s=qu(i,e);return s?ih(s,t):null}let oh=1;const ah=new RegExp("[^a-z0-9-_:]"),Ut=-2;function wa(){return oh++}function lh(i){if(i instanceof HTMLFormElement)return"form";const e=Ze(i.tagName);return ah.test(e)?"div":e}let rt,Zn;const ch=/^[^ \t\n\r\u000c]+/,uh=/^[, \t\n\r\u000c]+/;function hh(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(uh),!(t>=e.length);){let n=s(ch);if(n.slice(-1)===",")n=lt(i,n.substring(0,n.length-1)),r.push(n);else{let o="";n=lt(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 Xn=new WeakMap;function lt(i,e){return!e||e.trim()===""?e:Fr(i,e)}function dh(i){return!!(i.tagName==="svg"||i.ownerSVGElement)}function Fr(i,e){let t=Xn.get(i);if(t||(t=i.createElement("a"),Xn.set(i,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function Sa(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")?lt(i,s):t==="srcset"?hh(i,s):t==="style"?Us(s,Fr(i)):e==="object"&&t==="data"?lt(i,s):s)}function Ca(i,e,t){return(i==="video"||i==="audio")&&e==="autoplay"}function Zi(i,e){return e?typeof e=="string"?i.includes(e):e.test(i):!1}function fh(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 Vs(i,e,t){if(!i)return!1;if(i.nodeType!==i.ELEMENT_NODE)return t?Vs(le.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?Vs(le.parentNode(i),e,t):!1}function xa(i,e,t,s){let r;if(kt(i)){if(r=i,!le.childNodes(r).length)return!1}else{if(le.parentElement(i)===null)return!1;r=le.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(Vs(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 ph(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 mh(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 gh(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=yh(t,s);switch(i.nodeType){case i.DOCUMENT_NODE:return i.compatMode!=="CSS1Compat"?{type:L.Document,childNodes:[],compatMode:i.compatMode}:{type:L.Document,childNodes:[]};case i.DOCUMENT_TYPE_NODE:return{type:L.DocumentType,name:i.name,publicId:i.publicId,systemId:i.systemId,rootId:S};case i.ELEMENT_NODE:return vh(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 bh(i,{doc:t,needsMask:l,maskTextFn:u,rootId:S,cssCaptured:g});case i.CDATA_SECTION_NODE:return{type:L.CDATA,textContent:"",rootId:S};case i.COMMENT_NODE:return{type:L.Comment,textContent:le.textContent(i)||"",rootId:S};default:return!1}}function yh(i,e){if(!e.hasNode(i))return;const t=e.getId(i);return t===1?void 0:t}function bh(i,e){const{needsMask:t,maskTextFn:s,rootId:r,cssCaptured:n}=e,o=le.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=le.textContent(i),c&&a&&(a=Us(a,Fr(e.doc)))),!c&&!u&&a&&t&&(a=s?s(a,le.parentElement(i)):a.replace(/[\S]/g,"*")),{type:L.Text,textContent:a||"",rootId:r}}function vh(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=fh(i,s,r),p=lh(i);let g={};const S=i.attributes.length;for(let v=0;v<S;v++){const w=i.attributes[v];Zi(w.name,n)||Ca(p,w.name,w.value)||(g[w.name]=Sa(t,p,Ze(w.name),w.value))}if(p==="link"&&o){const v=Array.from(t.styleSheets).find(N=>N.href===i.href);let w=null;v&&(w=ji(v)),w&&(delete g.rel,delete g.href,g._cssText=w)}if(p==="style"&&i.sheet){let v=ji(i.sheet);v&&(i.childNodes.length>1&&(v=uu(v,i)),g._cssText=v)}if(p==="input"||p==="textarea"||p==="select"){const v=i.value,w=i.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&v?g.value=zt({element:i,type:Bt(i),tagName:p,value:v,maskInputOptions:l,maskInputFn:a}):w&&(g.checked=w)}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")su(i)||(g.rr_dataURL=i.toDataURL(c.type,c.quality));else if(!("__context"in i)){const v=i.toDataURL(c.type,c.quality),w=t.createElement("canvas");w.width=i.width,w.height=i.height;const N=w.toDataURL(c.type,c.quality);v!==N&&(g.rr_dataURL=v)}}if(p==="img"&&u){rt||(rt=t.createElement("canvas"),Zn=rt.getContext("2d"));const v=i,w=v.currentSrc||v.getAttribute("src")||"<unknown-src>",N=v.crossOrigin,x=()=>{v.removeEventListener("load",x);try{rt.width=v.naturalWidth,rt.height=v.naturalHeight,Zn.drawImage(v,0,0),g.rr_dataURL=rt.toDataURL(c.type,c.quality)}catch(R){if(v.crossOrigin!=="anonymous"){v.crossOrigin="anonymous",v.complete&&v.naturalWidth!==0?x():v.addEventListener("load",x);return}else console.warn(`Cannot inline img src=${w}! Error: ${R}`)}v.crossOrigin==="anonymous"&&(N?g.crossOrigin=N:v.removeAttribute("crossorigin"))};v.complete&&v.naturalWidth!==0?x():v.addEventListener("load",x)}if(p==="audio"||p==="video"){const v=g;v.rr_mediaState=i.paused?"paused":"played",v.rr_mediaCurrentTime=i.currentTime,v.rr_mediaPlaybackRate=i.playbackRate,v.rr_mediaMuted=i.muted,v.rr_mediaLoop=i.loop,v.rr_mediaVolume=i.volume}if(f||(i.scrollLeft&&(g.rr_scrollLeft=i.scrollLeft),i.scrollTop&&(g.rr_scrollTop=i.scrollTop)),y){const{width:v,height:w}=i.getBoundingClientRect();g={class:g.class,rr_width:`${v}px`,rr_height:`${w}px`}}p==="iframe"&&!d(g.src)&&(i.contentDocument||(g.rr_src=g.src),delete g.src);let C;try{customElements.get(p)&&(C=!0)}catch(v){}return{type:L.Element,tagName:p,attributes:g,childNodes:[],isSVG:dh(i)||void 0,needBlock:y,rootId:m,isCustom:C}}function Q(i){return i==null?"":i.toLowerCase()}function wh(i,e){if(e.comment&&i.type===L.Comment)return!0;if(i.type===L.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"&&$r(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 ct(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:C,iframeLoadTimeout:v=5e3,onStylesheetLoad:w,stylesheetLoadTimeout:N=5e3,keepIframeSrcFn:x=()=>!1,newlyAddedElement:R=!1,cssCaptured:_=!1,selectorOptions:B}=e;let{needsMask:V}=e,{preserveWhiteSpace:Y=!0}=e;V||(V=xa(i,o,l,V===void 0));const X=gh(i,{doc:t,mirror:s,blockClass:r,blockSelector:n,excludeAttribute:a,needsMask:V,inlineStylesheet:u,maskInputOptions:h,maskTextFn:d,maskInputFn:f,dataURLOptions:y,inlineImages:p,recordCanvas:g,keepIframeSrcFn:x,newlyAddedElement:R,cssCaptured:_});if(!X)return console.warn(i,"not serialized"),null;let ee;s.hasNode(i)?ee=s.getId(i):wh(X,m)||!Y&&X.type===L.Text&&!X.textContent.replace(/^\s+|\s+$/gm,"").length?ee=Ut:ee=wa();const T=Object.assign(X,{id:ee});if(kt(i)||i.nodeType===Node.TEXT_NODE){if(kt(i)&&B!==null&&B!==void 0)try{const K={maxPathDepth:B.maxPathDepth,enableSvgFingerprint:B.enableSvgFingerprint,fallbackToBody:B.fallbackToBody},ce=nh(i,K);ce&&(T.selector=ce)}catch(K){console.warn("Failed to generate SEQL selector:",K)}i.nodeType===Node.TEXT_NODE&&(T.isVisible=hu(i)),i.nodeType===Node.ELEMENT_NODE&&(T.isVisible=kr(i),T.isInteractive=bu(i))}if(s.add(i,T),ee===Ut)return null;S&&S(i);let W=!c;if(T.type===L.Element){W=W&&!T.needBlock,delete T.needBlock;const K=le.shadowRoot(i);K&&Lt(K)&&(T.isShadowHost=!0)}if((T.type===L.Document||T.type===L.Element)&&W){m.headWhitespace&&T.type===L.Element&&T.tagName==="head"&&(Y=!1);const K={doc:t,mirror:s,blockClass:r,blockSelector:n,needsMask:V,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:Y,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:v,onStylesheetLoad:w,stylesheetLoadTimeout:N,keepIframeSrcFn:x,cssCaptured:!1,selectorOptions:B};if(!(T.type===L.Element&&T.tagName==="textarea"&&T.attributes.value!==void 0)){T.type===L.Element&&T.attributes._cssText!==void 0&&typeof T.attributes._cssText=="string"&&(K.cssCaptured=!0);for(const Ne of Array.from(le.childNodes(i))){const Fe=ct(Ne,K);Fe&&T.childNodes.push(Fe)}}let ce=null;if(kt(i)&&(ce=le.shadowRoot(i)))for(const Ne of Array.from(le.childNodes(ce))){const Fe=ct(Ne,K);Fe&&(Lt(ce)&&(Fe.isShadow=!0),T.childNodes.push(Fe))}}const z=le.parentNode(i);return z&&_t(z)&&Lt(z)&&(T.isShadow=!0),T.type===L.Element&&T.tagName==="iframe"&&ph(i,()=>{const K=i.contentDocument;if(K&&C){const ce=ct(K,{doc:K,mirror:s,blockClass:r,blockSelector:n,needsMask:V,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:Y,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:v,onStylesheetLoad:w,stylesheetLoadTimeout:N,keepIframeSrcFn:x,selectorOptions:B});ce&&C(i,ce)}},v),T.type===L.Element&&T.tagName==="link"&&typeof T.attributes.rel=="string"&&(T.attributes.rel==="stylesheet"||T.attributes.rel==="preload"&&typeof T.attributes.href=="string"&&$r(T.attributes.href)==="css")&&mh(i,()=>{if(w){const K=ct(i,{doc:t,mirror:s,blockClass:r,blockSelector:n,needsMask:V,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:Y,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:v,onStylesheetLoad:w,stylesheetLoadTimeout:N,keepIframeSrcFn:x,selectorOptions:B});K&&w(i,K)}},N),T}function Sh(i,e){var V,Y,X,ee;const{mirror:t=new Dr,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:C,onStylesheetLoad:v,stylesheetLoadTimeout:w,keepIframeSrcFn:N=()=>!1,selector:x}=e||{},R=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,_=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,B=x===!1?null:x===!0?{maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:.3,fallbackToBody:!0}:x===void 0?{maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:.3,fallbackToBody:!0}:{maxPathDepth:(V=x.maxPathDepth)!=null?V:10,enableSvgFingerprint:(Y=x.enableSvgFingerprint)!=null?Y:!0,confidenceThreshold:(X=x.confidenceThreshold)!=null?X:.3,fallbackToBody:(ee=x.fallbackToBody)!=null?ee:!0};return ct(i,{doc:i,mirror:t,blockClass:s,blockSelector:r,maskTextClass:n,maskTextSelector:o,excludeAttribute:l,skipChild:!1,inlineStylesheet:a,maskInputOptions:R,maskTextFn:d,maskInputFn:f,slimDOMOptions:_,dataURLOptions:y,inlineImages:c,recordCanvas:u,preserveWhiteSpace:p,onSerialize:g,onIframeLoad:S,iframeLoadTimeout:C,onStylesheetLoad:v,stylesheetLoadTimeout:w,keepIframeSrcFn:N,newlyAddedElement:!1,selectorOptions:B})}const Ch=/(max|min)-device-(width|height)/,Jn=new RegExp(Ch.source,"g"),xh={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(i){i.params.match(Jn)&&(i.params=i.params.replace(Jn,"$1-$2"))}}}},Eh={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
|
-
`+t.replace(/:hover/g,".\\:hover"))}))}}}},
|
|
13
|
-
`+C+r("^")}let
|
|
14
|
-
`+
|
|
11
|
+
Solution: Ensure element and root parameter are from the same document context.`)}function ah(i,e={}){var Z,Q,O,re;var t;if(!i||!i.ownerDocument||!i.isConnected)return null;const s=M(M({},Iu),e);if(s.root)try{oh(i,s.root)}catch(R){return console.error("Cross-document generation detected:",R),null}const r=(Z=s.cache)!=null?Z:nh(),n=r.getEID(i);if(n!==void 0)return n;const o=i.tagName.toLowerCase();if(o==="html"){const R=new Yn(s,r),V=uh(i,s,R);return r.setEID(i,V),V}const l=new Nu(s,r),a=new Fu(s,r),c=new Yn(s,r),u=new eh,h=l.findAnchor(i);if(!h&&!s.fallbackToBody)return null;const d=(O=(Q=h==null?void 0:h.element)!=null?Q:(t=i.ownerDocument)==null?void 0:t.body)!=null?O:null;if(!d)return null;const m=!h||h.tier==="C",p=d.tagName.toLowerCase(),y=c.extract(d),f=d.parentElement;let g;if(f&&p!=="body"&&p!=="html"&&Vs(p,y,d)){const R=Array.from(f.children).indexOf(d);R!==-1&&(g=R+1)}const w={tag:d.tagName.toLowerCase(),semantics:y,score:(re=h==null?void 0:h.score)!=null?re:xe.DEGRADED_SCORE,degraded:m,nthChild:g},C=a.buildPath(d,i,c),v=c.extract(i);s.enableSvgFingerprint&&lh(i)&&(v.svg=u.fingerprint(i));const S=i.parentElement;let I;if(S&&Vs(o,v,i)){const R=Array.from(S.children).indexOf(i);R!==-1&&(I=R+1)}const x={tag:i.tagName.toLowerCase(),semantics:v,score:c.scoreElement(i),nthChild:I},T=[],L={onMultiple:"best-score",onMissing:"anchor-only",maxDepth:3},W=w.degraded||C.degraded,J=ch(w.degraded,C),B={version:"1.0",anchor:w,path:C.path,target:x,constraints:T,fallback:L,meta:{confidence:0,generatedAt:new Date().toISOString(),generator:"dom-eid@1.0",source:s.source,degraded:W,degradationReason:J}};return B.meta.confidence=th(B),B.meta.confidence<s.confidenceThreshold?null:(r.setEID(i,B),B)}function lh(i){return i.namespaceURI==="http://www.w3.org/2000/svg"||i.tagName.toLowerCase()==="svg"||i instanceof SVGElement}function ch(i,e){if(i&&e.degraded)return"anchor-and-path-degraded";if(i)return"no-semantic-anchor";if(e.degraded)return e.degradationReason}function uh(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 xa={id:"i","data-testid":"tid","data-qa":"qa","data-cy":"cy","data-test":"dt","aria-label":"al","aria-labelledby":"alb","aria-describedby":"adb",name:"n",href:"h",src:"s",type:"t",role:"r",alt:"at",title:"tt",for:"f",placeholder:"ph",text:"x"},Xn=Object.fromEntries(Object.entries(xa).map(([i,e])=>[e,i])),Ea={maxClasses:2,maxAttributes:5,includeText:!0,maxTextLength:50,simplifyTarget:!0,includeConstraints:!0,format:"compact"};function qn(i){return i==="id"?101:He[i]!==void 0?He[i]:i.startsWith("data-")?He["data-*"]:i.startsWith("aria-")?He["aria-*"]:0}function hh(i){return["id","data-testid","data-qa","data-cy","href","text","role"].includes(i)}function dh(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 fh(i,e){const t=M(M({},Ea),e),s=t.format==="compact",r=s?"v1":`v${i.version}`,n=s?":":": ",o=s?"::":" :: ",l=s?">":" > ",a=t.includeText&&i.target.semantics.text?i.target.semantics.text.normalized:void 0,c=Oi(i.anchor,!1,t),u=i.path.length>0?i.path.map(m=>Oi(m,!1,t,a)).join(l)+l:"",h=Oi(i.target,!0,t),d=t.includeConstraints?ph(i,t):"";return`${r}${n}${c}${o}${u}${h}${d}`}function Oi(i,e=!1,t=Ea,s){var m;const{tag:r,semantics:n}=i,o=t.format==="compact";let l=r;const a=[],c=M({},n.attributes);n.id&&(c.id=n.id),n.role&&!c.role&&(c.role=n.role);const u=Object.entries(c).map(([p,y])=>{const f=qn(p),g=p==="href"||p==="src"?Ca(p,y):y;return{name:p,value:g,priority:f}}).filter(p=>p.name!=="id"&&p.name!=="class"&&va.has(p.name)||wa.has(p.name)&&Sa(p.value)?!1:p.priority>0||p.name==="role"||p.name==="id");u.sort((p,y)=>y.priority-p.priority);const h=u.slice(0,t.maxAttributes);h.sort((p,y)=>p.name.localeCompare(y.name));for(const{name:p,value:y}of h){const f=o&&(m=xa[p])!=null?m:p;a.push(`${f}="${Xi(y)}"`)}if(t.includeText&&n.text&&!dh(n.text.normalized)){const p=n.text.normalized;if(p.length>0&&p.length<=t.maxTextLength&&!(!e&&s!==void 0&&p===s)){const y=o?"x":"text";a.push(`${y}="${Xi(p)}"`)}}let d=a;if(a.length>0&&e&&t.simplifyTarget&&n.id&&(d=a.filter(p=>{var g;const y=p.split("=")[0],f=(g=Xn[y])!=null?g:y;return qn(f)>=60||f==="text"||f==="id"||f==="role"})),n.classes&&n.classes.length>0){const p=Du(n.classes),y=!!n.id||a.some(f=>{var C;const g=f.split("=")[0],w=(C=Xn[g])!=null?C:g;return w==="href"||w==="data-testid"||w==="text"||w==="role"});if(!(e&&t.simplifyTarget&&y)&&p.length>0){const f=p.sort().slice(0,t.maxClasses);l+=f.map(g=>`.${g}`).join("")}}if(d.length>0&&(l+=`[${d.join(",")}]`),"nthChild"in i&&i.nthChild){const p=!!n.id||n.attributes&&Object.keys(n.attributes).some(hh);e&&t.simplifyTarget&&p||(l+=`#${i.nthChild}`)}return l}function ph(i,e){if(!i.constraints||i.constraints.length===0)return"";const t=[];for(const s of i.constraints)switch(s.type){case"uniqueness":t.push("unique=true");break;case"position":s.params&&s.params.strategy&&t.push(`pos=${s.params.strategy}`);break;case"text-proximity":if(s.params&&s.params.reference){const r=Xi(String(s.params.reference));t.push(`text="${r}"`)}break}return t.length===0?"":`${e.format==="verbose"?" ":""}{${t.join(",")}}`}function Xi(i){return i.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/>/g,"\\>").replace(/:/g,"\\:")}function mh(i,e,t){const s=ah(i,e);return s?fh(s,t):null}let gh=1;const yh=new RegExp("[^a-z0-9-_:]"),Ut=-2;function Aa(){return gh++}function bh(i){if(i instanceof HTMLFormElement)return"form";const e=Ze(i.tagName);return yh.test(e)?"div":e}let rt,Jn;const vh=/^[^ \t\n\r\u000c]+/,wh=/^[, \t\n\r\u000c]+/;function Sh(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(wh),!(t>=e.length);){let n=s(vh);if(n.slice(-1)===",")n=lt(i,n.substring(0,n.length-1)),r.push(n);else{let o="";n=lt(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 Kn=new WeakMap;function lt(i,e){return!e||e.trim()===""?e:Br(i,e)}function Ch(i){return!!(i.tagName==="svg"||i.ownerSVGElement)}function Br(i,e){let t=Kn.get(i);if(t||(t=i.createElement("a"),Kn.set(i,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function Ma(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")?lt(i,s):t==="srcset"?Sh(i,s):t==="style"?Us(s,Br(i)):e==="object"&&t==="data"?lt(i,s):s)}function Ia(i,e,t){return(i==="video"||i==="audio")&&e==="autoplay"}function qi(i,e){return e?typeof e=="string"?i.includes(e):e.test(i):!1}function xh(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 Hs(i,e,t){if(!i)return!1;if(i.nodeType!==i.ELEMENT_NODE)return t?Hs(le.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?Hs(le.parentNode(i),e,t):!1}function Na(i,e,t,s){let r;if(kt(i)){if(r=i,!le.childNodes(r).length)return!1}else{if(le.parentElement(i)===null)return!1;r=le.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(Hs(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 Eh(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 Mh(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:m,recordCanvas:p,keepIframeSrcFn:y,newlyAddedElement:f=!1,cssCaptured:g=!1}=e,w=Ih(t,s);switch(i.nodeType){case i.DOCUMENT_NODE:return i.compatMode!=="CSS1Compat"?{type:P.Document,childNodes:[],compatMode:i.compatMode}:{type:P.Document,childNodes:[]};case i.DOCUMENT_TYPE_NODE:return{type:P.DocumentType,name:i.name,publicId:i.publicId,systemId:i.systemId,rootId:w};case i.ELEMENT_NODE:return Rh(i,{doc:t,blockClass:r,blockSelector:n,excludeAttribute:o,inlineStylesheet:a,maskInputOptions:c,maskInputFn:h,dataURLOptions:d,inlineImages:m,recordCanvas:p,keepIframeSrcFn:y,newlyAddedElement:f,rootId:w});case i.TEXT_NODE:return Nh(i,{doc:t,needsMask:l,maskTextFn:u,rootId:w,cssCaptured:g});case i.CDATA_SECTION_NODE:return{type:P.CDATA,textContent:"",rootId:w};case i.COMMENT_NODE:return{type:P.Comment,textContent:le.textContent(i)||"",rootId:w};default:return!1}}function Ih(i,e){if(!e.hasNode(i))return;const t=e.getId(i);return t===1?void 0:t}function Nh(i,e){const{needsMask:t,maskTextFn:s,rootId:r,cssCaptured:n}=e,o=le.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=le.textContent(i),c&&a&&(a=Us(a,Br(e.doc)))),!c&&!u&&a&&t&&(a=s?s(a,le.parentElement(i)):a.replace(/[\S]/g,"*")),{type:P.Text,textContent:a||"",rootId:r}}function Rh(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:m=!1,rootId:p}=e,y=xh(i,s,r),f=bh(i);let g={};const w=i.attributes.length;for(let v=0;v<w;v++){const S=i.attributes[v];qi(S.name,n)||Ia(f,S.name,S.value)||(g[S.name]=Ma(t,f,Ze(S.name),S.value))}if(f==="link"&&o){const v=Array.from(t.styleSheets).find(I=>I.href===i.href);let S=null;v&&(S=Zi(v)),S&&(delete g.rel,delete g.href,g._cssText=S)}if(f==="style"&&i.sheet){let v=Zi(i.sheet);v&&(i.childNodes.length>1&&(v=gu(v,i)),g._cssText=v)}if(f==="input"||f==="textarea"||f==="select"){const v=i.value,S=i.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&v?g.value=zt({element:i,type:Bt(i),tagName:f,value:v,maskInputOptions:l,maskInputFn:a}):S&&(g.checked=S)}if(f==="option"&&(i.selected&&!l.select?g.selected=!0:delete g.selected),f==="dialog"&&i.open&&(g.rr_open_mode=i.matches("dialog:modal")?"modal":"non-modal"),f==="canvas"&&h){if(i.__context==="2d")lu(i)||(g.rr_dataURL=i.toDataURL(c.type,c.quality));else if(!("__context"in i)){const v=i.toDataURL(c.type,c.quality),S=t.createElement("canvas");S.width=i.width,S.height=i.height;const I=S.toDataURL(c.type,c.quality);v!==I&&(g.rr_dataURL=v)}}if(f==="img"&&u){rt||(rt=t.createElement("canvas"),Jn=rt.getContext("2d"));const v=i,S=v.currentSrc||v.getAttribute("src")||"<unknown-src>",I=v.crossOrigin,x=()=>{v.removeEventListener("load",x);try{rt.width=v.naturalWidth,rt.height=v.naturalHeight,Jn.drawImage(v,0,0),g.rr_dataURL=rt.toDataURL(c.type,c.quality)}catch(T){if(v.crossOrigin!=="anonymous"){v.crossOrigin="anonymous",v.complete&&v.naturalWidth!==0?x():v.addEventListener("load",x);return}else console.warn(`Cannot inline img src=${S}! Error: ${T}`)}v.crossOrigin==="anonymous"&&(I?g.crossOrigin=I:v.removeAttribute("crossorigin"))};v.complete&&v.naturalWidth!==0?x():v.addEventListener("load",x)}if(f==="audio"||f==="video"){const v=g;v.rr_mediaState=i.paused?"paused":"played",v.rr_mediaCurrentTime=i.currentTime,v.rr_mediaPlaybackRate=i.playbackRate,v.rr_mediaMuted=i.muted,v.rr_mediaLoop=i.loop,v.rr_mediaVolume=i.volume}if(m||(i.scrollLeft&&(g.rr_scrollLeft=i.scrollLeft),i.scrollTop&&(g.rr_scrollTop=i.scrollTop)),y){const{width:v,height:S}=i.getBoundingClientRect();g={class:g.class,rr_width:`${v}px`,rr_height:`${S}px`}}f==="iframe"&&!d(g.src)&&(i.contentDocument||(g.rr_src=g.src),delete g.src);let C;try{customElements.get(f)&&(C=!0)}catch(v){}return{type:P.Element,tagName:f,attributes:g,childNodes:[],isSVG:Ch(i)||void 0,needBlock:y,rootId:p,isCustom:C}}function K(i){return i==null?"":i.toLowerCase()}function Th(i,e){if(e.comment&&i.type===P.Comment)return!0;if(i.type===P.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"&&_r(i.attributes.href)==="js"))return!0;if(e.headFavicon&&(i.tagName==="link"&&i.attributes.rel==="shortcut icon"||i.tagName==="meta"&&(K(i.attributes.name).match(/^msapplication-tile(image|color)$/)||K(i.attributes.name)==="application-name"||K(i.attributes.rel)==="icon"||K(i.attributes.rel)==="apple-touch-icon"||K(i.attributes.rel)==="shortcut icon")))return!0;if(i.tagName==="meta"){if(e.headMetaDescKeywords&&K(i.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(K(i.attributes.property).match(/^(og|twitter|fb):/)||K(i.attributes.name).match(/^(og|twitter):/)||K(i.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(K(i.attributes.name)==="robots"||K(i.attributes.name)==="googlebot"||K(i.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&i.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(K(i.attributes.name)==="author"||K(i.attributes.name)==="generator"||K(i.attributes.name)==="framework"||K(i.attributes.name)==="publisher"||K(i.attributes.name)==="progid"||K(i.attributes.property).match(/^article:/)||K(i.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(K(i.attributes.name)==="google-site-verification"||K(i.attributes.name)==="yandex-verification"||K(i.attributes.name)==="csrf-token"||K(i.attributes.name)==="p:domain_verify"||K(i.attributes.name)==="verify-v1"||K(i.attributes.name)==="verification"||K(i.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function ct(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:m,slimDOMOptions:p,dataURLOptions:y={},inlineImages:f=!1,recordCanvas:g=!1,onSerialize:w,onIframeLoad:C,iframeLoadTimeout:v=5e3,onStylesheetLoad:S,stylesheetLoadTimeout:I=5e3,keepIframeSrcFn:x=()=>!1,newlyAddedElement:T=!1,cssCaptured:L=!1,selectorOptions:W}=e;let{needsMask:J}=e,{preserveWhiteSpace:B=!0}=e;J||(J=Na(i,o,l,J===void 0));const Z=Mh(i,{doc:t,mirror:s,blockClass:r,blockSelector:n,excludeAttribute:a,needsMask:J,inlineStylesheet:u,maskInputOptions:h,maskTextFn:d,maskInputFn:m,dataURLOptions:y,inlineImages:f,recordCanvas:g,keepIframeSrcFn:x,newlyAddedElement:T,cssCaptured:L});if(!Z)return console.warn(i,"not serialized"),null;let Q;s.hasNode(i)?Q=s.getId(i):Th(Z,p)||!B&&Z.type===P.Text&&!Z.textContent.replace(/^\s+|\s+$/gm,"").length?Q=Ut:Q=Aa();const O=Object.assign(Z,{id:Q});if(kt(i)||i.nodeType===Node.TEXT_NODE){if(kt(i)&&W!==null&&W!==void 0)try{const V={maxPathDepth:W.maxPathDepth,enableSvgFingerprint:W.enableSvgFingerprint,fallbackToBody:W.fallbackToBody},ce=mh(i,V);ce&&(O.selector=ce)}catch(V){console.warn("Failed to generate SEQL selector:",V)}i.nodeType===Node.TEXT_NODE&&(O.isVisible=yu(i)),i.nodeType===Node.ELEMENT_NODE&&(O.isVisible=Lr(i),O.isInteractive=Eu(i))}if(s.add(i,O),Q===Ut)return null;w&&w(i);let re=!c;if(O.type===P.Element){re=re&&!O.needBlock,delete O.needBlock;const V=le.shadowRoot(i);V&&Lt(V)&&(O.isShadowHost=!0)}if((O.type===P.Document||O.type===P.Element)&&re){p.headWhitespace&&O.type===P.Element&&O.tagName==="head"&&(B=!1);const V={doc:t,mirror:s,blockClass:r,blockSelector:n,needsMask:J,maskTextClass:o,maskTextSelector:l,excludeAttribute:a,skipChild:c,inlineStylesheet:u,maskInputOptions:h,maskTextFn:d,maskInputFn:m,slimDOMOptions:p,dataURLOptions:y,inlineImages:f,recordCanvas:g,preserveWhiteSpace:B,onSerialize:w,onIframeLoad:C,iframeLoadTimeout:v,onStylesheetLoad:S,stylesheetLoadTimeout:I,keepIframeSrcFn:x,cssCaptured:!1,selectorOptions:W};if(!(O.type===P.Element&&O.tagName==="textarea"&&O.attributes.value!==void 0)){O.type===P.Element&&O.attributes._cssText!==void 0&&typeof O.attributes._cssText=="string"&&(V.cssCaptured=!0);for(const Ne of Array.from(le.childNodes(i))){const Fe=ct(Ne,V);Fe&&O.childNodes.push(Fe)}}let ce=null;if(kt(i)&&(ce=le.shadowRoot(i)))for(const Ne of Array.from(le.childNodes(ce))){const Fe=ct(Ne,V);Fe&&(Lt(ce)&&(Fe.isShadow=!0),O.childNodes.push(Fe))}}const R=le.parentNode(i);return R&&_t(R)&&Lt(R)&&(O.isShadow=!0),O.type===P.Element&&O.tagName==="iframe"&&Eh(i,()=>{const V=i.contentDocument;if(V&&C){const ce=ct(V,{doc:V,mirror:s,blockClass:r,blockSelector:n,needsMask:J,maskTextClass:o,maskTextSelector:l,excludeAttribute:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:h,maskTextFn:d,maskInputFn:m,slimDOMOptions:p,dataURLOptions:y,inlineImages:f,recordCanvas:g,preserveWhiteSpace:B,onSerialize:w,onIframeLoad:C,iframeLoadTimeout:v,onStylesheetLoad:S,stylesheetLoadTimeout:I,keepIframeSrcFn:x,selectorOptions:W});ce&&C(i,ce)}},v),O.type===P.Element&&O.tagName==="link"&&typeof O.attributes.rel=="string"&&(O.attributes.rel==="stylesheet"||O.attributes.rel==="preload"&&typeof O.attributes.href=="string"&&_r(O.attributes.href)==="css")&&Ah(i,()=>{if(S){const V=ct(i,{doc:t,mirror:s,blockClass:r,blockSelector:n,needsMask:J,maskTextClass:o,maskTextSelector:l,excludeAttribute:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:h,maskTextFn:d,maskInputFn:m,slimDOMOptions:p,dataURLOptions:y,inlineImages:f,recordCanvas:g,preserveWhiteSpace:B,onSerialize:w,onIframeLoad:C,iframeLoadTimeout:v,onStylesheetLoad:S,stylesheetLoadTimeout:I,keepIframeSrcFn:x,selectorOptions:W});V&&S(i,V)}},I),O}function Oh(i,e){var J,B,Z,Q;const{mirror:t=new kr,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:m,slimDOM:p=!1,dataURLOptions:y,preserveWhiteSpace:f,onSerialize:g,onIframeLoad:w,iframeLoadTimeout:C,onStylesheetLoad:v,stylesheetLoadTimeout:S,keepIframeSrcFn:I=()=>!1,selector:x}=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,L=p===!0||p==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:p==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:p===!1?{}:p,W=x===!1?null:x===!0?{maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:.3,fallbackToBody:!0}:x===void 0?{maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:.3,fallbackToBody:!0}:{maxPathDepth:(J=x.maxPathDepth)!=null?J:10,enableSvgFingerprint:(B=x.enableSvgFingerprint)!=null?B:!0,confidenceThreshold:(Z=x.confidenceThreshold)!=null?Z:.3,fallbackToBody:(Q=x.fallbackToBody)!=null?Q:!0};return ct(i,{doc:i,mirror:t,blockClass:s,blockSelector:r,maskTextClass:n,maskTextSelector:o,excludeAttribute:l,skipChild:!1,inlineStylesheet:a,maskInputOptions:T,maskTextFn:d,maskInputFn:m,slimDOMOptions:L,dataURLOptions:y,inlineImages:c,recordCanvas:u,preserveWhiteSpace:f,onSerialize:g,onIframeLoad:w,iframeLoadTimeout:C,onStylesheetLoad:v,stylesheetLoadTimeout:S,keepIframeSrcFn:I,newlyAddedElement:!1,selectorOptions:W})}const Dh=/(max|min)-device-(width|height)/,Qn=new RegExp(Dh.source,"g"),$h={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(i){i.params.match(Qn)&&(i.params=i.params.replace(Qn,"$1-$2"))}}}},kh={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
|
+
`+t.replace(/:hover/g,".\\:hover"))}))}}}},_h={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 Lh(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function Ph(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 Wr={exports:{}},$=String,Ra=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:$}};Wr.exports=Ra();Wr.exports.createColors=Ra;var Fh=Wr.exports;const zh={},Bh=Object.freeze(Object.defineProperty({__proto__:null,default:zh},Symbol.toStringTag,{value:"Module"})),we=Ph(Bh);let eo=Fh,to=we,Ji=class Ta 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,Ta)}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=eo.isColorSupported);let s=u=>u,r=u=>u,n=u=>u;if(e){let{bold:u,gray:h,red:d}=eo.createColors(!0);r=m=>u(d(m)),s=m=>h(m),to&&(n=m=>to(m))}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,m=" "+(" "+d).slice(-c)+" | ";if(d===this.line){if(u.length>160){let y=20,f=Math.max(0,this.column-y),g=Math.max(this.column+y,this.endColumn+y),w=u.slice(f,g),C=s(m.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return r(">")+s(m)+n(w)+`
|
|
13
|
+
`+C+r("^")}let p=s(m.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+s(m)+n(u)+`
|
|
14
|
+
`+p+r("^")}return" "+s(m)+n(u)}).join(`
|
|
15
15
|
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
16
16
|
|
|
17
17
|
`+e+`
|
|
18
|
-
`),this.name+": "+this.message+e}};var
|
|
18
|
+
`),this.name+": "+this.message+e}};var Ur=Ji;Ji.default=Ji;const so={after:`
|
|
19
19
|
`,beforeClose:`
|
|
20
20
|
`,beforeComment:`
|
|
21
21
|
`,beforeDecl:`
|
|
22
22
|
`,beforeOpen:" ",beforeRule:`
|
|
23
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function
|
|
24
|
-
`)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<n;l++)s+=o}return s}block(e,t){let s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",e,"start");let r;e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let s=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let n=e.nodes[r],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==r||s)}}comment(e){let t=this.raw(e,"left","commentLeft"),s=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+s+"*/",e)}decl(e,t){let s=this.raw(e,"between","colon"),r=e.prop+s+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}document(e){this.body(e)}raw(e,t,s){let r;if(s||(s=t),t&&(r=e.raws[t],typeof r!="undefined"))return r;let n=e.parent;if(s==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return
|
|
23
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Wh(i){return i[0].toUpperCase()+i.slice(1)}let Ki=class{constructor(e){this.builder=e}atrule(e,t){let s="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?s+=e.raws.afterName:r&&(s+=" "),e.nodes)this.block(e,s+r);else{let n=(e.raws.between||"")+(t?";":"");this.builder(s+r+n,e)}}beforeAfter(e,t){let s;e.type==="decl"?s=this.raw(e,null,"beforeDecl"):e.type==="comment"?s=this.raw(e,null,"beforeComment"):t==="before"?s=this.raw(e,null,"beforeRule"):s=this.raw(e,null,"beforeClose");let r=e.parent,n=0;for(;r&&r.type!=="root";)n+=1,r=r.parent;if(s.includes(`
|
|
24
|
+
`)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<n;l++)s+=o}return s}block(e,t){let s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",e,"start");let r;e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let s=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let n=e.nodes[r],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==r||s)}}comment(e){let t=this.raw(e,"left","commentLeft"),s=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+s+"*/",e)}decl(e,t){let s=this.raw(e,"between","colon"),r=e.prop+s+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}document(e){this.body(e)}raw(e,t,s){let r;if(s||(s=t),t&&(r=e.raws[t],typeof r!="undefined"))return r;let n=e.parent;if(s==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return so[s];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[s]!="undefined")return o.rawCache[s];if(s==="before"||s==="after")return this.beforeAfter(e,s);{let l="raw"+Wh(s);this[l]?r=this[l](o,e):o.walk(a=>{if(r=a.raws[t],typeof r!="undefined")return!1})}return typeof r=="undefined"&&(r=so[s]),o.rawCache[s]=r,r}rawBeforeClose(e){let t;return e.walk(s=>{if(s.nodes&&s.nodes.length>0&&typeof s.raws.after!="undefined")return t=s.raws.after,t.includes(`
|
|
25
25
|
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let s;return e.walkComments(r=>{if(typeof r.raws.before!="undefined")return s=r.raws.before,s.includes(`
|
|
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
|
|
30
|
-
`?(t=1,s+=1):t+=1}return r}let
|
|
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:Te(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:Te(t,this.source.end)+1}:{column:s.column+1,line:s.line,offset:s.offset+1};if(e.word){let o=t.slice(Te(t,this.source.start),Te(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:Te(t,e.start)}:e.index&&(s=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line,offset:Te(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 kh().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=_h){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 oi=Qi;Qi.default=Qi;let Ph=oi,er=class extends Ph{constructor(e){super(e),this.type="comment"}};var ai=er;er.default=er;let Fh=oi,tr=class extends Fh{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=ne(A({},e),{value:String(e.value)})),super(e),this.type="decl"}};var li=tr;tr.default=tr;let Ia=ai,Na=li,zh=oi,{isClean:Ra,my:Ta}=Kt,Wr,Oa,Da,Ur;function $a(i){return i.map(e=>(e.nodes&&(e.nodes=$a(e.nodes)),delete e.source,e))}function ka(i){if(i[Ra]=!1,i.proxyOf.nodes)for(let e of i.proxyOf.nodes)ka(e)}let ke=class _a extends zh{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=$a(Oa(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 Na(e)]}else if(e.selector||e.selectors)e=[new Ur(e)];else if(e.name)e=[new Wr(e)];else if(e.text)e=[new Ia(e)];else throw new Error("Unknown node type in node creation");return e.map(r=>(r[Ta]||_a.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[Ra]&&ka(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)}))}};ke.registerParse=i=>{Oa=i};ke.registerRule=i=>{Ur=i};ke.registerAtRule=i=>{Wr=i};ke.registerRoot=i=>{Da=i};var Qe=ke;ke.default=ke;ke.rebuild=i=>{i.type==="atrule"?Object.setPrototypeOf(i,Wr.prototype):i.type==="rule"?Object.setPrototypeOf(i,Ur.prototype):i.type==="decl"?Object.setPrototypeOf(i,Na.prototype):i.type==="comment"?Object.setPrototypeOf(i,Ia.prototype):i.type==="root"&&Object.setPrototypeOf(i,Da.prototype),i[Ta]=!0,i.nodes&&i.nodes.forEach(e=>{ke.rebuild(e)})};let La=Qe,Hs=class extends La{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 Vr=Hs;Hs.default=Hs;La.registerAtRule(Hs);let Bh=Qe,Pa,Fa,Vt=class extends Bh{constructor(e){super(A({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new Pa(new Fa,this,e).stringify()}};Vt.registerLazyResult=i=>{Pa=i};Vt.registerProcessor=i=>{Fa=i};var Hr=Vt;Vt.default=Vt;let Wh="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Uh=(i=21)=>{let e="",t=i|0;for(;t--;)e+=Wh[Math.random()*64|0];return e};var Vh={nanoid:Uh};let{existsSync:Hh,readFileSync:Gh}=we,{dirname:Ti,join:jh}=we,{SourceMapConsumer:eo,SourceMapGenerator:to}=we;function Yh(i){return Buffer?Buffer.from(i,"base64").toString():window.atob(i)}let sr=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=Ti(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new eo(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 Yh(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=Ti(e),Hh(e))return this.mapFile=e,Gh(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 eo)return to.fromSourceMap(t).toString();if(t instanceof to)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=jh(Ti(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 za=sr;sr.default=sr;let{nanoid:Zh}=Vh,{isAbsolute:ir,resolve:rr}=we,{SourceMapConsumer:Xh,SourceMapGenerator:Jh}=we,{fileURLToPath:so,pathToFileURL:fs}=we,io=Br,qh=za,Oi=we,Di=Symbol("lineToIndexCache"),Kh=!!(Xh&&Jh),ro=!!(rr&&ir);function no(i){if(i[Di])return i[Di];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 Ht.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
|
|
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 Oa=Ki;Ki.default=Ki;let Uh=Oa;function Qi(i,e){new Uh(e).stringify(i)}var ai=Qi;Qi.default=Qi;var Kt={};Kt.isClean=Symbol("isClean");Kt.my=Symbol("my");let Vh=Ur,Hh=Oa,Gh=ai,{isClean:At,my:jh}=Kt;function er(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=>er(o,t)):(n==="object"&&r!==null&&(r=er(r)),t[s]=r)}return t}function Te(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 tr=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[At]=!1,this[jh]=!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=er(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 Vh(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[At]=!0}markDirty(){if(this[At]){this[At]=!1;let e=this;for(;e=e.parent;)e[At]=!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(Te(s,this.source.start),Te(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=Te(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:Te(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:Te(t,this.source.end)+1}:{column:s.column+1,line:s.line,offset:s.offset+1};if(e.word){let o=t.slice(Te(t,this.source.start),Te(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:Te(t,e.start)}:e.index&&(s=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line,offset:Te(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 Hh().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=Gh){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 li=tr;tr.default=tr;let Yh=li,sr=class extends Yh{constructor(e){super(e),this.type="comment"}};var ci=sr;sr.default=sr;let Zh=li,ir=class extends Zh{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=ne(M({},e),{value:String(e.value)})),super(e),this.type="decl"}};var ui=ir;ir.default=ir;let Da=ci,$a=ui,Xh=li,{isClean:ka,my:_a}=Kt,Vr,La,Pa,Hr;function Fa(i){return i.map(e=>(e.nodes&&(e.nodes=Fa(e.nodes)),delete e.source,e))}function za(i){if(i[ka]=!1,i.proxyOf.nodes)for(let e of i.proxyOf.nodes)za(e)}let ke=class Ba extends Xh{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=Fa(La(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 $a(e)]}else if(e.selector||e.selectors)e=[new Hr(e)];else if(e.name)e=[new Vr(e)];else if(e.text)e=[new Da(e)];else throw new Error("Unknown node type in node creation");return e.map(r=>(r[_a]||Ba.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[ka]&&za(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)}))}};ke.registerParse=i=>{La=i};ke.registerRule=i=>{Hr=i};ke.registerAtRule=i=>{Vr=i};ke.registerRoot=i=>{Pa=i};var Qe=ke;ke.default=ke;ke.rebuild=i=>{i.type==="atrule"?Object.setPrototypeOf(i,Vr.prototype):i.type==="rule"?Object.setPrototypeOf(i,Hr.prototype):i.type==="decl"?Object.setPrototypeOf(i,$a.prototype):i.type==="comment"?Object.setPrototypeOf(i,Da.prototype):i.type==="root"&&Object.setPrototypeOf(i,Pa.prototype),i[_a]=!0,i.nodes&&i.nodes.forEach(e=>{ke.rebuild(e)})};let Wa=Qe,Gs=class extends Wa{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 Gr=Gs;Gs.default=Gs;Wa.registerAtRule(Gs);let qh=Qe,Ua,Va,Vt=class extends qh{constructor(e){super(M({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new Ua(new Va,this,e).stringify()}};Vt.registerLazyResult=i=>{Ua=i};Vt.registerProcessor=i=>{Va=i};var jr=Vt;Vt.default=Vt;let Jh="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Kh=(i=21)=>{let e="",t=i|0;for(;t--;)e+=Jh[Math.random()*64|0];return e};var Qh={nanoid:Kh};let{existsSync:ed,readFileSync:td}=we,{dirname:Di,join:sd}=we,{SourceMapConsumer:io,SourceMapGenerator:ro}=we;function id(i){return Buffer?Buffer.from(i,"base64").toString():window.atob(i)}let rr=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=Di(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new io(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 id(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=Di(e),ed(e))return this.mapFile=e,td(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 io)return ro.fromSourceMap(t).toString();if(t instanceof ro)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=sd(Di(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 Ha=rr;rr.default=rr;let{nanoid:rd}=Qh,{isAbsolute:nr,resolve:or}=we,{SourceMapConsumer:nd,SourceMapGenerator:od}=we,{fileURLToPath:no,pathToFileURL:fs}=we,oo=Ur,ad=Ha,$i=we,ki=Symbol("lineToIndexCache"),ld=!!(nd&&od),ao=!!(or&&nr);function lo(i){if(i[ki])return i[ki];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[ki]=t,t}let js=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&&(!ao||/^\w+:\/\//.test(t.from)||nr(t.from)?this.file=t.from:this.file=or(t.from)),ao&&ld){let s=new ad(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 "+rd(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 m=this.fromOffset(a);t=m.line,s=m.col}else t=h.line,s=h.column,a=this.fromLineAndColumn(t,s);if(typeof d.offset=="number"){l=d.offset;let m=this.fromOffset(l);o=m.line,n=m.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 oo(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 oo(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&&(fs&&(c.input.url=fs(this.file).toString()),c.input.file=this.file),c}fromLineAndColumn(e,t){return lo(this)[e-1]+t-1}fromOffset(e){let t=lo(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:or(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;nr(o.source)?a=fs(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||fs(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(no)c.file=no(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=M({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};var hi=js;js.default=js;$i&&$i.registerInput&&$i.registerInput(js);let Ga=Qe,ja,Ya,mt=class extends Ga{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 ja(new Ya,this,e).stringify()}};mt.registerLazyResult=i=>{ja=i};mt.registerProcessor=i=>{Ya=i};var Qt=mt;mt.default=mt;Ga.registerRoot(mt);let Ht={comma(i){return Ht.split(i,[","],!0)},space(i){let e=[" ",`
|
|
33
|
+
`," "];return Ht.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 Za=Ht;Ht.default=Ht;let Xa=Qe,cd=Za,Ys=class extends Xa{get selectors(){return cd.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 Yr=Ys;Ys.default=Ys;Xa.registerRule(Ys);let ud=Gr,hd=ci,dd=ui,fd=hi,pd=Ha,md=Qt,gd=Yr;function Gt(i,e){if(Array.isArray(i))return i.map(o=>Gt(o));let r=i,{inputs:t}=r,s=it(r,["inputs"]);if(t){e=[];for(let o of t){let l=ne(M({},o),{__proto__:fd.prototype});l.map&&(l.map=ne(M({},l.map),{__proto__:pd.prototype})),e.push(l)}}if(s.nodes&&(s.nodes=i.nodes.map(o=>Gt(o,e))),s.source){let n=s.source,{inputId:o}=n,l=it(n,["inputId"]);s.source=l,o!=null&&(s.source.input=e[o])}if(s.type==="root")return new md(s);if(s.type==="decl")return new dd(s);if(s.type==="rule")return new gd(s);if(s.type==="comment")return new hd(s);if(s.type==="atrule")return new ud(s);throw new Error("Unknown node type: "+i.type)}var yd=Gt;Gt.default=Gt;let{dirname:_s,relative:qa,resolve:Ja,sep:Ka}=we,{SourceMapConsumer:Qa,SourceMapGenerator:Ls}=we,{pathToFileURL:co}=we,bd=hi,vd=!!(Qa&&Ls),wd=!!(_s&&Ja&&qa&&Ka),Sd=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
|
-
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),s=e.root||_s(e.file),r;this.mapOpts.sourcesContent===!1?(r=new
|
|
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?_s(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(s=_s(
|
|
38
|
-
`.charCodeAt(0),At=" ".charCodeAt(0),gs="\f".charCodeAt(0),ys=" ".charCodeAt(0),bs="\r".charCodeAt(0),dd="[".charCodeAt(0),fd="]".charCodeAt(0),pd="(".charCodeAt(0),md=")".charCodeAt(0),gd="{".charCodeAt(0),yd="}".charCodeAt(0),bd=";".charCodeAt(0),vd="*".charCodeAt(0),wd=":".charCodeAt(0),Sd="@".charCodeAt(0),vs=/[\t\n\f\r "#'()/;[\\\]{}]/g,ws=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Cd=/.[\r\n"'(/\\]/,co=/[\da-f]/i;var xd=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 C(){return p}function v(R){throw e.error("Unclosed "+R,p)}function w(){return S.length===0&&p>=y}function N(R){if(S.length)return S.pop();if(p>=y)return;let _=R?R.ignoreUnclosed:!1;switch(n=s.charCodeAt(p),n){case ms:case At:case ys:case bs:case gs:{a=p;do a+=1,n=s.charCodeAt(a);while(n===At||n===ms||n===ys||n===bs||n===gs);u=["space",s.slice(p,a)],p=a-1;break}case dd:case fd:case gd:case yd:case wd:case bd:case md:{let B=String.fromCharCode(n);u=[B,B,p];break}case pd:{if(m=g.length?g.pop()[1]:"",f=s.charCodeAt(p+1),m==="url"&&f!==$i&&f!==ao&&f!==At&&f!==ms&&f!==ys&&f!==gs&&f!==bs){a=p;do{if(h=!1,a=s.indexOf(")",a+1),a===-1)if(r||_){a=p;break}else v("bracket");for(d=a;s.charCodeAt(d-1)===ps;)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||Cd.test(o)?u=["(","(",p]:(u=["brackets",o,p,a],p=a);break}case $i:case ao:{c=n===$i?"'":'"',a=p;do{if(h=!1,a=s.indexOf(c,a+1),a===-1)if(r||_){a=p+1;break}else v("string");for(d=a;s.charCodeAt(d-1)===ps;)d-=1,h=!h}while(h);u=["string",s.slice(p,a+1),p,a],p=a;break}case Sd:{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 ps:{for(a=p,l=!0;s.charCodeAt(a+1)===ps;)a+=1,l=!l;if(n=s.charCodeAt(a+1),l&&n!==lo&&n!==At&&n!==ms&&n!==ys&&n!==bs&&n!==gs&&(a+=1,co.test(s.charAt(a)))){for(;co.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===lo&&s.charCodeAt(p+1)===vd?(a=s.indexOf("*/",p+2)+1,a===0&&(r||_?a=s.length:v("comment")),u=["comment",s.slice(p,a+1),p,a],p=a):(ws.lastIndex=p+1,ws.test(s),ws.lastIndex===0?a=s.length-1:a=ws.lastIndex-2,u=["word",s.slice(p,a+1),p,a],g.push(u),p=a);break}}return p++,u}function x(R){S.push(R)}return{back:x,endOfFile:w,nextToken:N,position:C}};let Ed=Vr,Md=ai,Ad=li,Id=Qt,uo=Gr,Nd=xd;const ho={empty:!0,space:!0};function Rd(i){for(let e=i.length-1;e>=0;e--){let t=i[e],s=t[3]||t[2];if(s)return s}}let Td=class{constructor(e){this.input=e,this.root=new Id,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 Ed;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 Md;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=Nd(this.input)}decl(e,t){let s=new Ad;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]||Rd(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 uo;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",!ho[h]&&!ho[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 uo;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 Od=Td;let Dd=Qe,$d=ci,kd=Od;function Ys(i,e){let t=new $d(i,e),s=new kd(t);try{s.parse()}catch(r){throw r}return s.root}var jr=Ys;Ys.default=Ys;Dd.registerParse(Ys);let nr=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 Ja=nr;nr.default=nr;let _d=Ja,or=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 _d(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>e.type==="warning")}};var Yr=or;or.default=or;let Ld=Qe,Pd=Hr,Fd=Xa,zd=jr,fo=Yr,Bd=Qt,Wd=ni,{isClean:Ee,my:Ud}=Kt;const Vd={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Hd={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},Gd={Once:!0,postcssPlugin:!0,prepare:!0},gt=0;function It(i){return typeof i=="object"&&typeof i.then=="function"}function qa(i){let e=!1,t=Vd[i.type];return i.type==="decl"?e=i.prop.toLowerCase():i.type==="atrule"&&(e=i.name.toLowerCase()),e&&i.append?[t,t+"-"+e,gt,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:i.append?[t,gt,t+"Exit"]:[t,t+"Exit"]}function po(i){let e;return i.type==="document"?e=["Document",gt,"DocumentExit"]:i.type==="root"?e=["Root",gt,"RootExit"]:e=qa(i),{eventIndex:0,events:e,iterator:0,node:i,visitorIndex:0,visitors:[]}}function ar(i){return i[Ee]=!1,i.nodes&&i.nodes.forEach(e=>ar(e)),i}let lr={},yt=class Ka{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=ar(t);else if(t instanceof Ka||t instanceof fo)r=ar(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=zd;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[Ud]&&Ld.rebuild(r)}this.result=new fo(e,r,s),this.helpers=ne(A({},lr),{postcss:lr,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(!Hd[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Gd[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(It(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=[po(e)];for(;t.length>0;){let s=this.visitTick(t);if(It(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 It(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=Wd;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new Fd(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(It(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(It(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(po(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===gt){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=qa(e);for(let s of t)if(s===gt)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()}};yt.registerPostcss=i=>{lr=i};var Qa=yt;yt.default=yt;Bd.registerLazyResult(yt);Pd.registerLazyResult(yt);let jd=Xa,Yd=jr;const Zd=Yr;let Xd=ni;let cr=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=Yd;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=Xd;this.result=new Zd(this._processor,r,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new jd(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 Jd=cr;cr.default=cr;let qd=Hr,Kd=Qa,Qd=Jd,ef=Qt,jt=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 Qd(this,e,t):new Kd(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var tf=jt;jt.default=jt;ef.registerProcessor(jt);qd.registerProcessor(jt);let el=Vr,tl=ai,sf=Qe,rf=Br,sl=li,il=Hr,nf=ad,of=ci,af=Qa,lf=Va,cf=oi,uf=jr,Zr=tf,hf=Yr,rl=Qt,nl=Gr,df=ni,ff=Ja;function J(...i){return i.length===1&&Array.isArray(i[0])&&(i=i[0]),new Zr(i)}J.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:
|
|
36
|
+
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),s=e.root||_s(e.file),r;this.mapOpts.sourcesContent===!1?(r=new Qa(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(),wd&&vd&&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=Ls.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Ls({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 Ls({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?_s(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(s=_s(Ja(s,this.mapOpts.annotation)));let r=qa(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 bd(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(co){let s=co(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;Ka==="\\"&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}};var el=Sd;const _i="'".charCodeAt(0),uo='"'.charCodeAt(0),ps="\\".charCodeAt(0),ho="/".charCodeAt(0),ms=`
|
|
38
|
+
`.charCodeAt(0),Mt=" ".charCodeAt(0),gs="\f".charCodeAt(0),ys=" ".charCodeAt(0),bs="\r".charCodeAt(0),Cd="[".charCodeAt(0),xd="]".charCodeAt(0),Ed="(".charCodeAt(0),Ad=")".charCodeAt(0),Md="{".charCodeAt(0),Id="}".charCodeAt(0),Nd=";".charCodeAt(0),Rd="*".charCodeAt(0),Td=":".charCodeAt(0),Od="@".charCodeAt(0),vs=/[\t\n\f\r "#'()/;[\\\]{}]/g,ws=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Dd=/.[\r\n"'(/\\]/,fo=/[\da-f]/i;var $d=function(e,t={}){let s=e.css.valueOf(),r=t.ignoreErrors,n,o,l,a,c,u,h,d,m,p,y=s.length,f=0,g=[],w=[];function C(){return f}function v(T){throw e.error("Unclosed "+T,f)}function S(){return w.length===0&&f>=y}function I(T){if(w.length)return w.pop();if(f>=y)return;let L=T?T.ignoreUnclosed:!1;switch(n=s.charCodeAt(f),n){case ms:case Mt:case ys:case bs:case gs:{a=f;do a+=1,n=s.charCodeAt(a);while(n===Mt||n===ms||n===ys||n===bs||n===gs);u=["space",s.slice(f,a)],f=a-1;break}case Cd:case xd:case Md:case Id:case Td:case Nd:case Ad:{let W=String.fromCharCode(n);u=[W,W,f];break}case Ed:{if(p=g.length?g.pop()[1]:"",m=s.charCodeAt(f+1),p==="url"&&m!==_i&&m!==uo&&m!==Mt&&m!==ms&&m!==ys&&m!==gs&&m!==bs){a=f;do{if(h=!1,a=s.indexOf(")",a+1),a===-1)if(r||L){a=f;break}else v("bracket");for(d=a;s.charCodeAt(d-1)===ps;)d-=1,h=!h}while(h);u=["brackets",s.slice(f,a+1),f,a],f=a}else a=s.indexOf(")",f+1),o=s.slice(f,a+1),a===-1||Dd.test(o)?u=["(","(",f]:(u=["brackets",o,f,a],f=a);break}case _i:case uo:{c=n===_i?"'":'"',a=f;do{if(h=!1,a=s.indexOf(c,a+1),a===-1)if(r||L){a=f+1;break}else v("string");for(d=a;s.charCodeAt(d-1)===ps;)d-=1,h=!h}while(h);u=["string",s.slice(f,a+1),f,a],f=a;break}case Od:{vs.lastIndex=f+1,vs.test(s),vs.lastIndex===0?a=s.length-1:a=vs.lastIndex-2,u=["at-word",s.slice(f,a+1),f,a],f=a;break}case ps:{for(a=f,l=!0;s.charCodeAt(a+1)===ps;)a+=1,l=!l;if(n=s.charCodeAt(a+1),l&&n!==ho&&n!==Mt&&n!==ms&&n!==ys&&n!==bs&&n!==gs&&(a+=1,fo.test(s.charAt(a)))){for(;fo.test(s.charAt(a+1));)a+=1;s.charCodeAt(a+1)===Mt&&(a+=1)}u=["word",s.slice(f,a+1),f,a],f=a;break}default:{n===ho&&s.charCodeAt(f+1)===Rd?(a=s.indexOf("*/",f+2)+1,a===0&&(r||L?a=s.length:v("comment")),u=["comment",s.slice(f,a+1),f,a],f=a):(ws.lastIndex=f+1,ws.test(s),ws.lastIndex===0?a=s.length-1:a=ws.lastIndex-2,u=["word",s.slice(f,a+1),f,a],g.push(u),f=a);break}}return f++,u}function x(T){w.push(T)}return{back:x,endOfFile:S,nextToken:I,position:C}};let kd=Gr,_d=ci,Ld=ui,Pd=Qt,po=Yr,Fd=$d;const mo={empty:!0,space:!0};function zd(i){for(let e=i.length-1;e>=0;e--){let t=i[e],s=t[3]||t[2];if(s)return s}}let Bd=class{constructor(e){this.input=e,this.root=new Pd,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 kd;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 _d;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=Fd(this.input)}decl(e,t){let s=new Ld;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]||zd(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 m=u[d][0];if(h.trim().startsWith("!")&&m!=="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 po;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",!mo[h]&&!mo[u]?a.slice(-1)===","?c=!1:a+=n[1]:c=!1):a+=n[1];if(!c){let d=s.reduce((m,p)=>m+p[1],"");e.raws[t]={raw:d,value:a}}e[t]=a}rule(e){e.pop();let t=new po;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 Wd=Bd;let Ud=Qe,Vd=hi,Hd=Wd;function Zs(i,e){let t=new Vd(i,e),s=new Hd(t);try{s.parse()}catch(r){throw r}return s.root}var Zr=Zs;Zs.default=Zs;Ud.registerParse(Zs);let ar=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 tl=ar;ar.default=ar;let Gd=tl,lr=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 Gd(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>e.type==="warning")}};var Xr=lr;lr.default=lr;let jd=Qe,Yd=jr,Zd=el,Xd=Zr,go=Xr,qd=Qt,Jd=ai,{isClean:Ee,my:Kd}=Kt;const Qd={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},ef={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},tf={Once:!0,postcssPlugin:!0,prepare:!0},gt=0;function It(i){return typeof i=="object"&&typeof i.then=="function"}function sl(i){let e=!1,t=Qd[i.type];return i.type==="decl"?e=i.prop.toLowerCase():i.type==="atrule"&&(e=i.name.toLowerCase()),e&&i.append?[t,t+"-"+e,gt,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:i.append?[t,gt,t+"Exit"]:[t,t+"Exit"]}function yo(i){let e;return i.type==="document"?e=["Document",gt,"DocumentExit"]:i.type==="root"?e=["Root",gt,"RootExit"]:e=sl(i),{eventIndex:0,events:e,iterator:0,node:i,visitorIndex:0,visitors:[]}}function cr(i){return i[Ee]=!1,i.nodes&&i.nodes.forEach(e=>cr(e)),i}let ur={},yt=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=cr(t);else if(t instanceof il||t instanceof go)r=cr(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=Xd;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]&&jd.rebuild(r)}this.result=new go(e,r,s),this.helpers=ne(M({},ur),{postcss:ur,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(!ef[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!tf[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(It(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=[yo(e)];for(;t.length>0;){let s=this.visitTick(t);if(It(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 It(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=Jd;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new Zd(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(It(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(It(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(yo(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===gt){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=sl(e);for(let s of t)if(s===gt)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()}};yt.registerPostcss=i=>{ur=i};var rl=yt;yt.default=yt;qd.registerLazyResult(yt);Yd.registerLazyResult(yt);let sf=el,rf=Zr;const nf=Xr;let of=ai;let hr=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=rf;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=of;this.result=new nf(this._processor,r,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new sf(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 af=hr;hr.default=hr;let lf=jr,cf=rl,uf=af,hf=Qt,jt=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 uf(this,e,t):new cf(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var df=jt;jt.default=jt;hf.registerProcessor(jt);lf.registerProcessor(jt);let nl=Gr,ol=ci,ff=Qe,pf=Ur,al=ui,ll=jr,mf=yd,gf=hi,yf=rl,bf=Za,vf=li,wf=Zr,qr=df,Sf=Xr,cl=Qt,ul=Yr,Cf=ai,xf=tl;function X(...i){return i.length===1&&Array.isArray(i[0])&&(i=i[0]),new qr(i)}X.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 Zr().version,l}let n;return Object.defineProperty(r,"postcss",{get(){return n||(n=r()),n}}),r.process=function(o,l,a){return J([r(a)]).process(o,l)},r};J.stringify=df;J.parse=uf;J.fromJSON=nf;J.list=lf;J.comment=i=>new tl(i);J.atRule=i=>new el(i);J.decl=i=>new sl(i);J.rule=i=>new nl(i);J.root=i=>new rl(i);J.document=i=>new il(i);J.CssSyntaxError=rf;J.Declaration=sl;J.Container=sf;J.Processor=Zr;J.Document=il;J.Comment=tl;J.Warning=ff;J.AtRule=el;J.Result=hf;J.Input=of;J.Rule=nl;J.Root=rl;J.Node=cf;af.registerPostcss(J);var pf=J;J.default=J;const ie=Ah(pf);ie.stringify;ie.fromJSON;ie.plugin;ie.parse;ie.list;ie.document;ie.comment;ie.atRule;ie.rule;ie.decl;ie.root;ie.CssSyntaxError;ie.Declaration;ie.Container;ie.Processor;ie.Document;ie.Comment;ie.Warning;ie.AtRule;ie.Result;ie.Input;ie.Rule;ie.Root;ie.Node;const mo={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 mf(i){let e=mo[i.tagName]?mo[i.tagName]:i.tagName;return e==="link"&&i.attributes._cssText&&(e="style"),e}function ui(i,e){const t=e==null?void 0:e.stylesWithHoverClass.get(i);if(t)return t;let s=i;try{s=ie([xh,Eh,Mh]).process(i).css}catch(r){console.warn("Failed to adapt css for replay",r)}return e==null||e.stylesWithHoverClass.set(i,s),s}function go(){return{stylesWithHoverClass:new Map}}function gf(i,e,t,s){const r=[];for(const a of i.childNodes)a.type===L.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=ui(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 yf(i,e,t,s){const{doc:r,hackCss:n,cache:o}=s;i.childNodes.length?gf(i,t,n,o):(n&&(t=ui(t,o)),e.appendChild(r.createTextNode(t)))}function bf(i,e){var t;const{doc:s,hackCss:r,cache:n}=e;switch(i.type){case L.Document:return s.implementation.createDocument(null,"",null);case L.DocumentType:return s.implementation.createDocumentType(i.name||"html",i.publicId,i.systemId);case L.Element:{const o=mf(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"){yf(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"&&$r(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 L.Text:return i.isStyle&&r?s.createTextNode(ui(i.textContent,n)):s.createTextNode(i.textContent);case L.CDATA:return s.createCDATASection(i.textContent);case L.Comment:return s.createComment(i.textContent);default:return null}}function Pt(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(iu(u,i))return s.getNode(i.id)}let a=bf(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===L.Document&&(t.close(),t.open(),i.compatMode==="BackCompat"&&i.childNodes&&i.childNodes[0].type!==L.DocumentType&&(i.childNodes[0].type===L.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===L.Document||i.type===L.Element)&&!r)for(const c of i.childNodes){const u=Pt(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&&kt(a)&&a.shadowRoot)a.shadowRoot.appendChild(u);else if(i.type===L.Document&&c.type==L.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 vf(i,e){function t(s){e(s)}for(const s of i.getIds())i.has(s)&&t(i.getNode(s))}function wf(i,e){const t=e.getMeta(i);if((t==null?void 0:t.type)!==L.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 Sf(i,e){const{doc:t,onVisit:s,hackCss:r=!0,afterAppend:n,cache:o,mirror:l=new Dr}=e,a=Pt(i,{doc:t,mirror:l,skipChild:!1,hackCss:r,afterAppend:n,cache:o});return vf(l,c=>{s&&s(c),wf(c,l)}),a}var Cf=Object.defineProperty,xf=(i,e,t)=>e in i?Cf(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,M=(i,e,t)=>xf(i,typeof e!="symbol"?e+"":e,t),Ef=Object.defineProperty,Mf=(i,e,t)=>e in i?Ef(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,ki=(i,e,t)=>Mf(i,typeof e!="symbol"?e+"":e,t);let Af=class{constructor(){ki(this,"idNodeMap",new Map),ki(this,"nodeMetaMap",new WeakMap),ki(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 If(){return new Af}const Nf=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],Rf=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],ol=new WeakSet,Tf=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(i,e,t){if(Tf.call(this,i,e,t),this instanceof Element){const s=i.toLowerCase();Nf.includes(s)&&ol.add(this)}};const Of=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(i,e,t){Of.call(this,i,e,t)};function yo(){document.querySelectorAll("*").forEach(e=>{Rf.forEach(t=>{e.hasAttribute(t)&&ol.add(e)})})}try{document.readyState==="complete"||document.readyState==="interactive"?yo():document.addEventListener("DOMContentLoaded",yo)}catch(i){}function Df(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function $f(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 Xr={exports:{}},$=String,al=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:$}};Xr.exports=al();Xr.exports.createColors=al;var kf=Xr.exports;const _f={},Lf=Object.freeze(Object.defineProperty({__proto__:null,default:_f},Symbol.toStringTag,{value:"Module"})),Se=$f(Lf);let bo=kf,vo=Se,ur=class ll 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,ll)}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=bo.isColorSupported);let s=u=>u,r=u=>u,n=u=>u;if(e){let{bold:u,gray:h,red:d}=bo.createColors(!0);r=f=>u(d(f)),s=f=>h(f),vo&&(n=f=>vo(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),C=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
|
-
`+C+r("^")}let
|
|
42
|
-
`+
|
|
40
|
+
https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new qr().version,l}let n;return Object.defineProperty(r,"postcss",{get(){return n||(n=r()),n}}),r.process=function(o,l,a){return X([r(a)]).process(o,l)},r};X.stringify=Cf;X.parse=wf;X.fromJSON=mf;X.list=bf;X.comment=i=>new ol(i);X.atRule=i=>new nl(i);X.decl=i=>new al(i);X.rule=i=>new ul(i);X.root=i=>new cl(i);X.document=i=>new ll(i);X.CssSyntaxError=pf;X.Declaration=al;X.Container=ff;X.Processor=qr;X.Document=ll;X.Comment=ol;X.Warning=xf;X.AtRule=nl;X.Result=Sf;X.Input=gf;X.Rule=ul;X.Root=cl;X.Node=vf;yf.registerPostcss(X);var Ef=X;X.default=X;const se=Lh(Ef);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;const bo={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=bo[i.tagName]?bo[i.tagName]:i.tagName;return e==="link"&&i.attributes._cssText&&(e="style"),e}function di(i,e){const t=e==null?void 0:e.stylesWithHoverClass.get(i);if(t)return t;let s=i;try{s=se([$h,kh,_h]).process(i).css}catch(r){console.warn("Failed to adapt css for replay",r)}return e==null||e.stylesWithHoverClass.set(i,s),s}function vo(){return{stylesWithHoverClass:new Map}}function Mf(i,e,t,s){const r=[];for(const a of i.childNodes)a.type===P.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=di(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 m=n[a+1].substring(0,h),p=o.substring(l).indexOf(m);if(d=p!==-1,d){u+=p;break}}d||(u+=n[a].length),c.textContent=o.substring(l,u),l=u}else c.textContent=o.substring(l)}}function If(i,e,t,s){const{doc:r,hackCss:n,cache:o}=s;i.childNodes.length?Mf(i,t,n,o):(n&&(t=di(t,o)),e.appendChild(r.createTextNode(t)))}function Nf(i,e){var t;const{doc:s,hackCss:r,cache:n}=e;switch(i.type){case P.Document:return s.implementation.createDocument(null,"",null);case P.DocumentType:return s.implementation.createDocumentType(i.name||"html",i.publicId,i.systemId);case P.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"){If(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"&&_r(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 P.Text:return i.isStyle&&r?s.createTextNode(di(i.textContent,n)):s.createTextNode(i.textContent);case P.CDATA:return s.createCDATASection(i.textContent);case P.Comment:return s.createComment(i.textContent);default:return null}}function Pt(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(cu(u,i))return s.getNode(i.id)}let a=Nf(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===P.Document&&(t.close(),t.open(),i.compatMode==="BackCompat"&&i.childNodes&&i.childNodes[0].type!==P.DocumentType&&(i.childNodes[0].type===P.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===P.Document||i.type===P.Element)&&!r)for(const c of i.childNodes){const u=Pt(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&&kt(a)&&a.shadowRoot)a.shadowRoot.appendChild(u);else if(i.type===P.Document&&c.type==P.Element){const h=u;let d=null;h.childNodes.forEach(m=>{m.nodeName==="BODY"&&(d=m)}),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 Rf(i,e){function t(s){e(s)}for(const s of i.getIds())i.has(s)&&t(i.getNode(s))}function Tf(i,e){const t=e.getMeta(i);if((t==null?void 0:t.type)!==P.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 Of(i,e){const{doc:t,onVisit:s,hackCss:r=!0,afterAppend:n,cache:o,mirror:l=new kr}=e,a=Pt(i,{doc:t,mirror:l,skipChild:!1,hackCss:r,afterAppend:n,cache:o});return Rf(l,c=>{s&&s(c),Tf(c,l)}),a}var Df=Object.defineProperty,$f=(i,e,t)=>e in i?Df(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,A=(i,e,t)=>$f(i,typeof e!="symbol"?e+"":e,t),kf=Object.defineProperty,_f=(i,e,t)=>e in i?kf(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Li=(i,e,t)=>_f(i,typeof e!="symbol"?e+"":e,t);let Lf=class{constructor(){Li(this,"idNodeMap",new Map),Li(this,"nodeMetaMap",new WeakMap),Li(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 Pf(){return new Lf}const Ff=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],zf=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],hl=new WeakSet,Bf=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(i,e,t){if(Bf.call(this,i,e,t),this instanceof Element){const s=i.toLowerCase();Ff.includes(s)&&hl.add(this)}};const Wf=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(i,e,t){Wf.call(this,i,e,t)};function wo(){document.querySelectorAll("*").forEach(e=>{zf.forEach(t=>{e.hasAttribute(t)&&hl.add(e)})})}try{document.readyState==="complete"||document.readyState==="interactive"?wo():document.addEventListener("DOMContentLoaded",wo)}catch(i){}const Uf={id:"i","data-testid":"tid","data-qa":"qa","data-cy":"cy","data-test":"dt","aria-label":"al","aria-labelledby":"alb","aria-describedby":"adb",name:"n",href:"h",src:"s",type:"t",role:"r",alt:"at",title:"tt",for:"f",placeholder:"ph",text:"x"};Object.fromEntries(Object.entries(Uf).map(([i,e])=>[e,i]));function Vf(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function Hf(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 Jr={exports:{}},k=String,dl=function(){return{isColorSupported:!1,reset:k,bold:k,dim:k,italic:k,underline:k,inverse:k,hidden:k,strikethrough:k,black:k,red:k,green:k,yellow:k,blue:k,magenta:k,cyan:k,white:k,gray:k,bgBlack:k,bgRed:k,bgGreen:k,bgYellow:k,bgBlue:k,bgMagenta:k,bgCyan:k,bgWhite:k,blackBright:k,redBright:k,greenBright:k,yellowBright:k,blueBright:k,magentaBright:k,cyanBright:k,whiteBright:k,bgBlackBright:k,bgRedBright:k,bgGreenBright:k,bgYellowBright:k,bgBlueBright:k,bgMagentaBright:k,bgCyanBright:k,bgWhiteBright:k}};Jr.exports=dl();Jr.exports.createColors=dl;var Gf=Jr.exports;const jf={},Yf=Object.freeze(Object.defineProperty({__proto__:null,default:jf},Symbol.toStringTag,{value:"Module"})),Se=Hf(Yf);let So=Gf,Co=Se,dr=class fl 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,fl)}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=So.isColorSupported);let s=u=>u,r=u=>u,n=u=>u;if(e){let{bold:u,gray:h,red:d}=So.createColors(!0);r=m=>u(d(m)),s=m=>h(m),Co&&(n=m=>Co(m))}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,m=" "+(" "+d).slice(-c)+" | ";if(d===this.line){if(u.length>160){let y=20,f=Math.max(0,this.column-y),g=Math.max(this.column+y,this.endColumn+y),w=u.slice(f,g),C=s(m.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return r(">")+s(m)+n(w)+`
|
|
41
|
+
`+C+r("^")}let p=s(m.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+s(m)+n(u)+`
|
|
42
|
+
`+p+r("^")}return" "+s(m)+n(u)}).join(`
|
|
43
43
|
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
44
44
|
|
|
45
45
|
`+e+`
|
|
46
|
-
`),this.name+": "+this.message+e}};var
|
|
46
|
+
`),this.name+": "+this.message+e}};var Kr=dr;dr.default=dr;const xo={after:`
|
|
47
47
|
`,beforeClose:`
|
|
48
48
|
`,beforeComment:`
|
|
49
49
|
`,beforeDecl:`
|
|
50
50
|
`,beforeOpen:" ",beforeRule:`
|
|
51
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function
|
|
52
|
-
`)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<n;l++)s+=o}return s}block(e,t){let s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",e,"start");let r;e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let s=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let n=e.nodes[r],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==r||s)}}comment(e){let t=this.raw(e,"left","commentLeft"),s=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+s+"*/",e)}decl(e,t){let s=this.raw(e,"between","colon"),r=e.prop+s+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}document(e){this.body(e)}raw(e,t,s){let r;if(s||(s=t),t&&(r=e.raws[t],typeof r!="undefined"))return r;let n=e.parent;if(s==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return
|
|
51
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Zf(i){return i[0].toUpperCase()+i.slice(1)}let fr=class{constructor(e){this.builder=e}atrule(e,t){let s="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?s+=e.raws.afterName:r&&(s+=" "),e.nodes)this.block(e,s+r);else{let n=(e.raws.between||"")+(t?";":"");this.builder(s+r+n,e)}}beforeAfter(e,t){let s;e.type==="decl"?s=this.raw(e,null,"beforeDecl"):e.type==="comment"?s=this.raw(e,null,"beforeComment"):t==="before"?s=this.raw(e,null,"beforeRule"):s=this.raw(e,null,"beforeClose");let r=e.parent,n=0;for(;r&&r.type!=="root";)n+=1,r=r.parent;if(s.includes(`
|
|
52
|
+
`)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<n;l++)s+=o}return s}block(e,t){let s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",e,"start");let r;e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let s=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let n=e.nodes[r],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==r||s)}}comment(e){let t=this.raw(e,"left","commentLeft"),s=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+s+"*/",e)}decl(e,t){let s=this.raw(e,"between","colon"),r=e.prop+s+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}document(e){this.body(e)}raw(e,t,s){let r;if(s||(s=t),t&&(r=e.raws[t],typeof r!="undefined"))return r;let n=e.parent;if(s==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return xo[s];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[s]!="undefined")return o.rawCache[s];if(s==="before"||s==="after")return this.beforeAfter(e,s);{let l="raw"+Zf(s);this[l]?r=this[l](o,e):o.walk(a=>{if(r=a.raws[t],typeof r!="undefined")return!1})}return typeof r=="undefined"&&(r=xo[s]),o.rawCache[s]=r,r}rawBeforeClose(e){let t;return e.walk(s=>{if(s.nodes&&s.nodes.length>0&&typeof s.raws.after!="undefined")return t=s.raws.after,t.includes(`
|
|
53
53
|
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let s;return e.walkComments(r=>{if(typeof r.raws.before!="undefined")return s=r.raws.before,s.includes(`
|
|
54
54
|
`)&&(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(`
|
|
55
55
|
`)&&(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(`
|
|
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
|
-
`);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
|
|
58
|
-
`?(t=1,s+=1):t+=1}return r}let
|
|
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:Oe(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:Oe(t,this.source.end)+1}:{column:s.column+1,line:s.line,offset:s.offset+1};if(e.word){let o=t.slice(Oe(t,this.source.start),Oe(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:Oe(t,e.start)}:e.index&&(s=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line,offset:Oe(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 Bf().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=Wf){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 di=pr;pr.default=pr;let Vf=di,mr=class extends Vf{constructor(e){super(e),this.type="comment"}};var fi=mr;mr.default=mr;let Hf=di,gr=class extends Hf{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=ne(A({},e),{value:String(e.value)})),super(e),this.type="decl"}};var pi=gr;gr.default=gr;let ul=fi,hl=pi,Gf=di,{isClean:dl,my:fl}=es,qr,pl,ml,Kr;function gl(i){return i.map(e=>(e.nodes&&(e.nodes=gl(e.nodes)),delete e.source,e))}function yl(i){if(i[dl]=!1,i.proxyOf.nodes)for(let e of i.proxyOf.nodes)yl(e)}let _e=class bl extends Gf{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=gl(pl(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 hl(e)]}else if(e.selector||e.selectors)e=[new Kr(e)];else if(e.name)e=[new qr(e)];else if(e.text)e=[new ul(e)];else throw new Error("Unknown node type in node creation");return e.map(r=>(r[fl]||bl.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[dl]&&yl(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=>{pl=i};_e.registerRule=i=>{Kr=i};_e.registerAtRule=i=>{qr=i};_e.registerRoot=i=>{ml=i};var et=_e;_e.default=_e;_e.rebuild=i=>{i.type==="atrule"?Object.setPrototypeOf(i,qr.prototype):i.type==="rule"?Object.setPrototypeOf(i,Kr.prototype):i.type==="decl"?Object.setPrototypeOf(i,hl.prototype):i.type==="comment"?Object.setPrototypeOf(i,ul.prototype):i.type==="root"&&Object.setPrototypeOf(i,ml.prototype),i[fl]=!0,i.nodes&&i.nodes.forEach(e=>{_e.rebuild(e)})};let vl=et,Zs=class extends vl{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 Qr=Zs;Zs.default=Zs;vl.registerAtRule(Zs);let jf=et,wl,Sl,Yt=class extends jf{constructor(e){super(A({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new wl(new Sl,this,e).stringify()}};Yt.registerLazyResult=i=>{wl=i};Yt.registerProcessor=i=>{Sl=i};var en=Yt;Yt.default=Yt;let Yf="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Zf=(i=21)=>{let e="",t=i|0;for(;t--;)e+=Yf[Math.random()*64|0];return e};var Xf={nanoid:Zf};let{existsSync:Jf,readFileSync:qf}=Se,{dirname:_i,join:Kf}=Se,{SourceMapConsumer:So,SourceMapGenerator:Co}=Se;function Qf(i){return Buffer?Buffer.from(i,"base64").toString():window.atob(i)}let yr=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=_i(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new So(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 Qf(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=_i(e),Jf(e))return this.mapFile=e,qf(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 So)return Co.fromSourceMap(t).toString();if(t instanceof Co)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=Kf(_i(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 Cl=yr;yr.default=yr;let{nanoid:ep}=Xf,{isAbsolute:br,resolve:vr}=Se,{SourceMapConsumer:tp,SourceMapGenerator:sp}=Se,{fileURLToPath:xo,pathToFileURL:Ss}=Se,Eo=Jr,ip=Cl,Li=Se,Pi=Symbol("lineToIndexCache"),rp=!!(tp&&sp),Mo=!!(vr&&br);function Ao(i){if(i[Pi])return i[Pi];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[
|
|
61
|
-
`," "];return Zt.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
|
|
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 pl=fr;fr.default=fr;let Xf=pl;function pr(i,e){new Xf(e).stringify(i)}var fi=pr;pr.default=pr;var es={};es.isClean=Symbol("isClean");es.my=Symbol("my");let qf=Kr,Jf=pl,Kf=fi,{isClean:Nt,my:Qf}=es;function mr(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=>mr(o,t)):(n==="object"&&r!==null&&(r=mr(r)),t[s]=r)}return t}function Oe(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
|
+
`?(t=1,s+=1):t+=1}return r}let gr=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[Nt]=!1,this[Qf]=!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=mr(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 qf(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[Nt]=!0}markDirty(){if(this[Nt]){this[Nt]=!1;let e=this;for(;e=e.parent;)e[Nt]=!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(Oe(s,this.source.start),Oe(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=Oe(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:Oe(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:Oe(t,this.source.end)+1}:{column:s.column+1,line:s.line,offset:s.offset+1};if(e.word){let o=t.slice(Oe(t,this.source.start),Oe(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:Oe(t,e.start)}:e.index&&(s=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line,offset:Oe(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 Jf().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=Kf){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 pi=gr;gr.default=gr;let ep=pi,yr=class extends ep{constructor(e){super(e),this.type="comment"}};var mi=yr;yr.default=yr;let tp=pi,br=class extends tp{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=ne(M({},e),{value:String(e.value)})),super(e),this.type="decl"}};var gi=br;br.default=br;let ml=mi,gl=gi,sp=pi,{isClean:yl,my:bl}=es,Qr,vl,wl,en;function Sl(i){return i.map(e=>(e.nodes&&(e.nodes=Sl(e.nodes)),delete e.source,e))}function Cl(i){if(i[yl]=!1,i.proxyOf.nodes)for(let e of i.proxyOf.nodes)Cl(e)}let _e=class xl extends sp{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=Sl(vl(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 gl(e)]}else if(e.selector||e.selectors)e=[new en(e)];else if(e.name)e=[new Qr(e)];else if(e.text)e=[new ml(e)];else throw new Error("Unknown node type in node creation");return e.map(r=>(r[bl]||xl.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[yl]&&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=>{vl=i};_e.registerRule=i=>{en=i};_e.registerAtRule=i=>{Qr=i};_e.registerRoot=i=>{wl=i};var et=_e;_e.default=_e;_e.rebuild=i=>{i.type==="atrule"?Object.setPrototypeOf(i,Qr.prototype):i.type==="rule"?Object.setPrototypeOf(i,en.prototype):i.type==="decl"?Object.setPrototypeOf(i,gl.prototype):i.type==="comment"?Object.setPrototypeOf(i,ml.prototype):i.type==="root"&&Object.setPrototypeOf(i,wl.prototype),i[bl]=!0,i.nodes&&i.nodes.forEach(e=>{_e.rebuild(e)})};let El=et,Xs=class extends El{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 tn=Xs;Xs.default=Xs;El.registerAtRule(Xs);let ip=et,Al,Ml,Yt=class extends ip{constructor(e){super(M({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new Al(new Ml,this,e).stringify()}};Yt.registerLazyResult=i=>{Al=i};Yt.registerProcessor=i=>{Ml=i};var sn=Yt;Yt.default=Yt;let rp="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",np=(i=21)=>{let e="",t=i|0;for(;t--;)e+=rp[Math.random()*64|0];return e};var op={nanoid:np};let{existsSync:ap,readFileSync:lp}=Se,{dirname:Pi,join:cp}=Se,{SourceMapConsumer:Eo,SourceMapGenerator:Ao}=Se;function up(i){return Buffer?Buffer.from(i,"base64").toString():window.atob(i)}let vr=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=Pi(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new Eo(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 up(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=Pi(e),ap(e))return this.mapFile=e,lp(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 Eo)return Ao.fromSourceMap(t).toString();if(t instanceof Ao)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=cp(Pi(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 Il=vr;vr.default=vr;let{nanoid:hp}=op,{isAbsolute:wr,resolve:Sr}=Se,{SourceMapConsumer:dp,SourceMapGenerator:fp}=Se,{fileURLToPath:Mo,pathToFileURL:Ss}=Se,Io=Kr,pp=Il,Fi=Se,zi=Symbol("lineToIndexCache"),mp=!!(dp&&fp),No=!!(Sr&&wr);function Ro(i){if(i[zi])return i[zi];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[zi]=t,t}let qs=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&&(!No||/^\w+:\/\//.test(t.from)||wr(t.from)?this.file=t.from:this.file=Sr(t.from)),No&&mp){let s=new pp(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 "+hp(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 m=this.fromOffset(a);t=m.line,s=m.col}else t=h.line,s=h.column,a=this.fromLineAndColumn(t,s);if(typeof d.offset=="number"){l=d.offset;let m=this.fromOffset(l);o=m.line,n=m.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 Io(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 Io(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&&(Ss&&(c.input.url=Ss(this.file).toString()),c.input.file=this.file),c}fromLineAndColumn(e,t){return Ro(this)[e-1]+t-1}fromOffset(e){let t=Ro(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:Sr(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;wr(o.source)?a=Ss(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||Ss(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(Mo)c.file=Mo(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=M({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};var yi=qs;qs.default=qs;Fi&&Fi.registerInput&&Fi.registerInput(qs);let Nl=et,Rl,Tl,bt=class extends Nl{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 Rl(new Tl,this,e).stringify()}};bt.registerLazyResult=i=>{Rl=i};bt.registerProcessor=i=>{Tl=i};var ts=bt;bt.default=bt;Nl.registerRoot(bt);let Zt={comma(i){return Zt.split(i,[","],!0)},space(i){let e=[" ",`
|
|
61
|
+
`," "];return Zt.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 Ol=Zt;Zt.default=Zt;let Dl=et,gp=Ol,Js=class extends Dl{get selectors(){return gp.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 rn=Js;Js.default=Js;Dl.registerRule(Js);let yp=tn,bp=mi,vp=gi,wp=yi,Sp=Il,Cp=ts,xp=rn;function Xt(i,e){if(Array.isArray(i))return i.map(o=>Xt(o));let r=i,{inputs:t}=r,s=it(r,["inputs"]);if(t){e=[];for(let o of t){let l=ne(M({},o),{__proto__:wp.prototype});l.map&&(l.map=ne(M({},l.map),{__proto__:Sp.prototype})),e.push(l)}}if(s.nodes&&(s.nodes=i.nodes.map(o=>Xt(o,e))),s.source){let n=s.source,{inputId:o}=n,l=it(n,["inputId"]);s.source=l,o!=null&&(s.source.input=e[o])}if(s.type==="root")return new Cp(s);if(s.type==="decl")return new vp(s);if(s.type==="rule")return new xp(s);if(s.type==="comment")return new bp(s);if(s.type==="atrule")return new yp(s);throw new Error("Unknown node type: "+i.type)}var Ep=Xt;Xt.default=Xt;let{dirname:Ps,relative:$l,resolve:kl,sep:_l}=Se,{SourceMapConsumer:Ll,SourceMapGenerator:Fs}=Se,{pathToFileURL:To}=Se,Ap=yi,Mp=!!(Ll&&Fs),Ip=!!(Ps&&kl&&$l&&_l),Np=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
|
-
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),s=e.root||Ps(e.file),r;this.mapOpts.sourcesContent===!1?(r=new
|
|
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?Ps(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(s=Ps(
|
|
66
|
-
`.charCodeAt(0),Rt=" ".charCodeAt(0),Es="\f".charCodeAt(0),Ms=" ".charCodeAt(0),As="\r".charCodeAt(0),bp="[".charCodeAt(0),vp="]".charCodeAt(0),wp="(".charCodeAt(0),Sp=")".charCodeAt(0),Cp="{".charCodeAt(0),xp="}".charCodeAt(0),Ep=";".charCodeAt(0),Mp="*".charCodeAt(0),Ap=":".charCodeAt(0),Ip="@".charCodeAt(0),Is=/[\t\n\f\r "#'()/;[\\\]{}]/g,Ns=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Np=/.[\r\n"'(/\\]/,To=/[\da-f]/i;var Rp=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 C(){return p}function v(R){throw e.error("Unclosed "+R,p)}function w(){return S.length===0&&p>=y}function N(R){if(S.length)return S.pop();if(p>=y)return;let _=R?R.ignoreUnclosed:!1;switch(n=s.charCodeAt(p),n){case xs:case Rt:case Ms:case As:case Es:{a=p;do a+=1,n=s.charCodeAt(a);while(n===Rt||n===xs||n===Ms||n===As||n===Es);u=["space",s.slice(p,a)],p=a-1;break}case bp:case vp:case Cp:case xp:case Ap:case Ep:case Sp:{let B=String.fromCharCode(n);u=[B,B,p];break}case wp:{if(m=g.length?g.pop()[1]:"",f=s.charCodeAt(p+1),m==="url"&&f!==Fi&&f!==No&&f!==Rt&&f!==xs&&f!==Ms&&f!==Es&&f!==As){a=p;do{if(h=!1,a=s.indexOf(")",a+1),a===-1)if(r||_){a=p;break}else v("bracket");for(d=a;s.charCodeAt(d-1)===Cs;)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||Np.test(o)?u=["(","(",p]:(u=["brackets",o,p,a],p=a);break}case Fi:case No:{c=n===Fi?"'":'"',a=p;do{if(h=!1,a=s.indexOf(c,a+1),a===-1)if(r||_){a=p+1;break}else v("string");for(d=a;s.charCodeAt(d-1)===Cs;)d-=1,h=!h}while(h);u=["string",s.slice(p,a+1),p,a],p=a;break}case Ip:{Is.lastIndex=p+1,Is.test(s),Is.lastIndex===0?a=s.length-1:a=Is.lastIndex-2,u=["at-word",s.slice(p,a+1),p,a],p=a;break}case Cs:{for(a=p,l=!0;s.charCodeAt(a+1)===Cs;)a+=1,l=!l;if(n=s.charCodeAt(a+1),l&&n!==Ro&&n!==Rt&&n!==xs&&n!==Ms&&n!==As&&n!==Es&&(a+=1,To.test(s.charAt(a)))){for(;To.test(s.charAt(a+1));)a+=1;s.charCodeAt(a+1)===Rt&&(a+=1)}u=["word",s.slice(p,a+1),p,a],p=a;break}default:{n===Ro&&s.charCodeAt(p+1)===Mp?(a=s.indexOf("*/",p+2)+1,a===0&&(r||_?a=s.length:v("comment")),u=["comment",s.slice(p,a+1),p,a],p=a):(Ns.lastIndex=p+1,Ns.test(s),Ns.lastIndex===0?a=s.length-1:a=Ns.lastIndex-2,u=["word",s.slice(p,a+1),p,a],g.push(u),p=a);break}}return p++,u}function x(R){S.push(R)}return{back:x,endOfFile:w,nextToken:N,position:C}};let Tp=Qr,Op=fi,Dp=pi,$p=ts,Oo=tn,kp=Rp;const Do={empty:!0,space:!0};function _p(i){for(let e=i.length-1;e>=0;e--){let t=i[e],s=t[3]||t[2];if(s)return s}}let Lp=class{constructor(e){this.input=e,this.root=new $p,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 Tp;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 Op;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=kp(this.input)}decl(e,t){let s=new Dp;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]||_p(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 Oo;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",!Do[h]&&!Do[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 Oo;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 Pp=Lp;let Fp=et,zp=mi,Bp=Pp;function qs(i,e){let t=new zp(i,e),s=new Bp(t);try{s.parse()}catch(r){throw r}return s.root}var sn=qs;qs.default=qs;Fp.registerParse(qs);let wr=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 $l=wr;wr.default=wr;let Wp=$l,Sr=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 Wp(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>e.type==="warning")}};var rn=Sr;Sr.default=Sr;let Up=et,Vp=en,Hp=Dl,Gp=sn,$o=rn,jp=ts,Yp=hi,{isClean:Me,my:Zp}=es;const Xp={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Jp={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},qp={Once:!0,postcssPlugin:!0,prepare:!0},vt=0;function Tt(i){return typeof i=="object"&&typeof i.then=="function"}function kl(i){let e=!1,t=Xp[i.type];return i.type==="decl"?e=i.prop.toLowerCase():i.type==="atrule"&&(e=i.name.toLowerCase()),e&&i.append?[t,t+"-"+e,vt,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:i.append?[t,vt,t+"Exit"]:[t,t+"Exit"]}function ko(i){let e;return i.type==="document"?e=["Document",vt,"DocumentExit"]:i.type==="root"?e=["Root",vt,"RootExit"]:e=kl(i),{eventIndex:0,events:e,iterator:0,node:i,visitorIndex:0,visitors:[]}}function Cr(i){return i[Me]=!1,i.nodes&&i.nodes.forEach(e=>Cr(e)),i}let xr={},wt=class _l{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=Cr(t);else if(t instanceof _l||t instanceof $o)r=Cr(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=Gp;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[Zp]&&Up.rebuild(r)}this.result=new $o(e,r,s),this.helpers=ne(A({},xr),{postcss:xr,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(!Jp[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!qp[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(Tt(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=[ko(e)];for(;t.length>0;){let s=this.visitTick(t);if(Tt(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 Tt(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=Yp;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new Hp(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(Tt(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(Tt(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(ko(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===vt){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=kl(e);for(let s of t)if(s===vt)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()}};wt.registerPostcss=i=>{xr=i};var Ll=wt;wt.default=wt;jp.registerLazyResult(wt);Vp.registerLazyResult(wt);let Kp=Dl,Qp=sn;const em=rn;let tm=hi;let Er=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=Qp;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=tm;this.result=new em(this._processor,r,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new Kp(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 sm=Er;Er.default=Er;let im=en,rm=Ll,nm=sm,om=ts,Jt=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 nm(this,e,t):new rm(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var am=Jt;Jt.default=Jt;om.registerProcessor(Jt);im.registerProcessor(Jt);let Pl=Qr,Fl=fi,lm=et,cm=Jr,zl=pi,Bl=en,um=fp,hm=mi,dm=Ll,fm=Al,pm=di,mm=sn,nn=am,gm=rn,Wl=ts,Ul=tn,ym=hi,bm=$l;function q(...i){return i.length===1&&Array.isArray(i[0])&&(i=i[0]),new nn(i)}q.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:
|
|
64
|
+
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),s=e.root||Ps(e.file),r;this.mapOpts.sourcesContent===!1?(r=new Ll(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(),Ip&&Mp&&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=Fs.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Fs({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 Fs({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
|
+
`),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?Ps(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(s=Ps(kl(s,this.mapOpts.annotation)));let r=$l(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 Ap(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(To){let s=To(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;_l==="\\"&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}};var Pl=Np;const Bi="'".charCodeAt(0),Oo='"'.charCodeAt(0),Cs="\\".charCodeAt(0),Do="/".charCodeAt(0),xs=`
|
|
66
|
+
`.charCodeAt(0),Rt=" ".charCodeAt(0),Es="\f".charCodeAt(0),As=" ".charCodeAt(0),Ms="\r".charCodeAt(0),Rp="[".charCodeAt(0),Tp="]".charCodeAt(0),Op="(".charCodeAt(0),Dp=")".charCodeAt(0),$p="{".charCodeAt(0),kp="}".charCodeAt(0),_p=";".charCodeAt(0),Lp="*".charCodeAt(0),Pp=":".charCodeAt(0),Fp="@".charCodeAt(0),Is=/[\t\n\f\r "#'()/;[\\\]{}]/g,Ns=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,zp=/.[\r\n"'(/\\]/,$o=/[\da-f]/i;var Bp=function(e,t={}){let s=e.css.valueOf(),r=t.ignoreErrors,n,o,l,a,c,u,h,d,m,p,y=s.length,f=0,g=[],w=[];function C(){return f}function v(T){throw e.error("Unclosed "+T,f)}function S(){return w.length===0&&f>=y}function I(T){if(w.length)return w.pop();if(f>=y)return;let L=T?T.ignoreUnclosed:!1;switch(n=s.charCodeAt(f),n){case xs:case Rt:case As:case Ms:case Es:{a=f;do a+=1,n=s.charCodeAt(a);while(n===Rt||n===xs||n===As||n===Ms||n===Es);u=["space",s.slice(f,a)],f=a-1;break}case Rp:case Tp:case $p:case kp:case Pp:case _p:case Dp:{let W=String.fromCharCode(n);u=[W,W,f];break}case Op:{if(p=g.length?g.pop()[1]:"",m=s.charCodeAt(f+1),p==="url"&&m!==Bi&&m!==Oo&&m!==Rt&&m!==xs&&m!==As&&m!==Es&&m!==Ms){a=f;do{if(h=!1,a=s.indexOf(")",a+1),a===-1)if(r||L){a=f;break}else v("bracket");for(d=a;s.charCodeAt(d-1)===Cs;)d-=1,h=!h}while(h);u=["brackets",s.slice(f,a+1),f,a],f=a}else a=s.indexOf(")",f+1),o=s.slice(f,a+1),a===-1||zp.test(o)?u=["(","(",f]:(u=["brackets",o,f,a],f=a);break}case Bi:case Oo:{c=n===Bi?"'":'"',a=f;do{if(h=!1,a=s.indexOf(c,a+1),a===-1)if(r||L){a=f+1;break}else v("string");for(d=a;s.charCodeAt(d-1)===Cs;)d-=1,h=!h}while(h);u=["string",s.slice(f,a+1),f,a],f=a;break}case Fp:{Is.lastIndex=f+1,Is.test(s),Is.lastIndex===0?a=s.length-1:a=Is.lastIndex-2,u=["at-word",s.slice(f,a+1),f,a],f=a;break}case Cs:{for(a=f,l=!0;s.charCodeAt(a+1)===Cs;)a+=1,l=!l;if(n=s.charCodeAt(a+1),l&&n!==Do&&n!==Rt&&n!==xs&&n!==As&&n!==Ms&&n!==Es&&(a+=1,$o.test(s.charAt(a)))){for(;$o.test(s.charAt(a+1));)a+=1;s.charCodeAt(a+1)===Rt&&(a+=1)}u=["word",s.slice(f,a+1),f,a],f=a;break}default:{n===Do&&s.charCodeAt(f+1)===Lp?(a=s.indexOf("*/",f+2)+1,a===0&&(r||L?a=s.length:v("comment")),u=["comment",s.slice(f,a+1),f,a],f=a):(Ns.lastIndex=f+1,Ns.test(s),Ns.lastIndex===0?a=s.length-1:a=Ns.lastIndex-2,u=["word",s.slice(f,a+1),f,a],g.push(u),f=a);break}}return f++,u}function x(T){w.push(T)}return{back:x,endOfFile:S,nextToken:I,position:C}};let Wp=tn,Up=mi,Vp=gi,Hp=ts,ko=rn,Gp=Bp;const _o={empty:!0,space:!0};function jp(i){for(let e=i.length-1;e>=0;e--){let t=i[e],s=t[3]||t[2];if(s)return s}}let Yp=class{constructor(e){this.input=e,this.root=new Hp,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 Wp;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 Up;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=Gp(this.input)}decl(e,t){let s=new Vp;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]||jp(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 m=u[d][0];if(h.trim().startsWith("!")&&m!=="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 ko;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",!_o[h]&&!_o[u]?a.slice(-1)===","?c=!1:a+=n[1]:c=!1):a+=n[1];if(!c){let d=s.reduce((m,p)=>m+p[1],"");e.raws[t]={raw:d,value:a}}e[t]=a}rule(e){e.pop();let t=new ko;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 Zp=Yp;let Xp=et,qp=yi,Jp=Zp;function Ks(i,e){let t=new qp(i,e),s=new Jp(t);try{s.parse()}catch(r){throw r}return s.root}var nn=Ks;Ks.default=Ks;Xp.registerParse(Ks);let Cr=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 Fl=Cr;Cr.default=Cr;let Kp=Fl,xr=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 Kp(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>e.type==="warning")}};var on=xr;xr.default=xr;let Qp=et,em=sn,tm=Pl,sm=nn,Lo=on,im=ts,rm=fi,{isClean:Ae,my:nm}=es;const om={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},am={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},lm={Once:!0,postcssPlugin:!0,prepare:!0},vt=0;function Tt(i){return typeof i=="object"&&typeof i.then=="function"}function zl(i){let e=!1,t=om[i.type];return i.type==="decl"?e=i.prop.toLowerCase():i.type==="atrule"&&(e=i.name.toLowerCase()),e&&i.append?[t,t+"-"+e,vt,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:i.append?[t,vt,t+"Exit"]:[t,t+"Exit"]}function Po(i){let e;return i.type==="document"?e=["Document",vt,"DocumentExit"]:i.type==="root"?e=["Root",vt,"RootExit"]:e=zl(i),{eventIndex:0,events:e,iterator:0,node:i,visitorIndex:0,visitors:[]}}function Er(i){return i[Ae]=!1,i.nodes&&i.nodes.forEach(e=>Er(e)),i}let Ar={},wt=class Bl{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=Er(t);else if(t instanceof Bl||t instanceof Lo)r=Er(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=sm;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[nm]&&Qp.rebuild(r)}this.result=new Lo(e,r,s),this.helpers=ne(M({},Ar),{postcss:Ar,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(!am[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!lm[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(Tt(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=[Po(e)];for(;t.length>0;){let s=this.visitTick(t);if(Tt(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 Tt(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=rm;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new tm(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(Tt(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(Tt(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(Po(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===vt){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=zl(e);for(let s of t)if(s===vt)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()}};wt.registerPostcss=i=>{Ar=i};var Wl=wt;wt.default=wt;im.registerLazyResult(wt);em.registerLazyResult(wt);let cm=Pl,um=nn;const hm=on;let dm=fi;let Mr=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=um;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=dm;this.result=new hm(this._processor,r,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new cm(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 fm=Mr;Mr.default=Mr;let pm=sn,mm=Wl,gm=fm,ym=ts,qt=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 gm(this,e,t):new mm(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var bm=qt;qt.default=qt;ym.registerProcessor(qt);pm.registerProcessor(qt);let Ul=tn,Vl=mi,vm=et,wm=Kr,Hl=gi,Gl=sn,Sm=Ep,Cm=yi,xm=Wl,Em=Ol,Am=pi,Mm=nn,an=bm,Im=on,jl=ts,Yl=rn,Nm=fi,Rm=Fl;function q(...i){return i.length===1&&Array.isArray(i[0])&&(i=i[0]),new an(i)}q.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 nn().version,l}let n;return Object.defineProperty(r,"postcss",{get(){return n||(n=r()),n}}),r.process=function(o,l,a){return q([r(a)]).process(o,l)},r};q.stringify=ym;q.parse=mm;q.fromJSON=um;q.list=fm;q.comment=i=>new Fl(i);q.atRule=i=>new Pl(i);q.decl=i=>new zl(i);q.rule=i=>new Ul(i);q.root=i=>new Wl(i);q.document=i=>new Bl(i);q.CssSyntaxError=cm;q.Declaration=zl;q.Container=lm;q.Processor=nn;q.Document=Bl;q.Comment=Fl;q.Warning=bm;q.AtRule=Pl;q.Result=gm;q.Input=hm;q.Rule=Ul;q.Root=Wl;q.Node=pm;dm.registerPostcss(q);var vm=q;q.default=q;const re=Df(vm);re.stringify;re.fromJSON;re.plugin;re.parse;re.list;re.document;re.comment;re.atRule;re.rule;re.decl;re.root;re.CssSyntaxError;re.Declaration;re.Container;re.Processor;re.Document;re.Comment;re.Warning;re.AtRule;re.Result;re.Input;re.Rule;re.Root;re.Node;var U=(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))(U||{});function wm(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[Mr(o[0].trim())]=o[1].trim())}}),e}function _o(i){const e=[];for(const t in i){const s=i[t];if(typeof s!="string")continue;const r=Em(t);e.push(`${r}: ${s};`)}return e.join(" ")}const Sm=/-([a-z])/g,Cm=/^--[a-zA-Z0-9-]+$/,Mr=i=>Cm.test(i)?i:i.replace(Sm,(e,t)=>t?t.toUpperCase():""),xm=/\B([A-Z])/g,Em=i=>i.replace(xm,"-$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 on extends Ce{constructor(...e){super(e),M(this,"nodeType",9),M(this,"nodeName","#document"),M(this,"compatMode","CSS1Compat"),M(this,"RRNodeType",U.Document),M(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===U.Element&&e.tagName==="HTML")||null}get body(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===U.Element&&t.tagName==="BODY"))||null}get head(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===U.Element&&t.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){const t=e.RRNodeType;if((t===U.Element||t===U.DocumentType)&&this.childNodes.some(r=>r.RRNodeType===t))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===U.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const s=an(this,e);return s.parentElement=null,s}insertBefore(e,t){const s=e.RRNodeType;if((s===U.Element||s===U.DocumentType)&&this.childNodes.some(n=>n.RRNodeType===s))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${s===U.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const r=Yl(this,e,t);return r.parentElement=null,r}removeChild(e){return Zl(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 on}createDocumentType(e,t,s){const r=new Vl(e,t,s);return r.ownerDocument=this,r}createElement(e){const t=new gi(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){const t=new Hl(e);return t.ownerDocument=this,t}createComment(e){const t=new Gl(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new jl(e);return t.ownerDocument=this,t}toString(){return"RRDocument"}}class Vl extends Ce{constructor(e,t,s){super(),M(this,"nodeType",10),M(this,"RRNodeType",U.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 gi extends Ce{constructor(e){super(),M(this,"nodeType",1),M(this,"RRNodeType",U.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 Im(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?wm(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(s,r,n)=>{if(t.test(s))return;const o=Mr(s);r?e[o]=r:delete e[o],n==="important"&&(e[o]+=" !important"),this.attributes.style=_o(e)},e.removeProperty=s=>{if(t.test(s))return"";const r=Mr(s),n=e[r]||"";return delete e[r],this.attributes.style=_o(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 an(this,e)}insertBefore(e,t){return Yl(this,e,t)}removeChild(e){return Zl(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 Mm extends gi{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 Am extends gi{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 Hl extends Ce{constructor(e){super(),M(this,"nodeType",3),M(this,"nodeName","#text"),M(this,"RRNodeType",U.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 Gl extends Ce{constructor(e){super(),M(this,"nodeType",8),M(this,"nodeName","#comment"),M(this,"RRNodeType",U.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 jl extends Ce{constructor(e){super(),M(this,"nodeName","#cdata-section"),M(this,"nodeType",4),M(this,"RRNodeType",U.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 Im{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 an(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 Yl(i,e,t){if(!t)return an(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 Zl(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 ye=(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))(ye||{});const Ar={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},Nm={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 Ks(i,e,t,s=e.mirror||e.ownerDocument.mirror){i=Rm(i,e,t,s),Xl(i,e,t,s),Tm(i,e,t)}function Rm(i,e,t,s){var r;if(t.afterAppend&&!Ie&&(Ie=new WeakSet,setTimeout(()=>{Ie=null},0)),!ln(i,e)){const n=Qs(e,t.mirror,s);(r=i.parentNode)==null||r.replaceChild(n,i),i=n}switch(e.RRNodeType){case U.Document:{if(!nt(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 U.Element:{const n=i,o=e;switch(o.tagName){case"IFRAME":{const l=i.contentDocument;if(!l)break;Ks(l,e.contentDocument,t,s);break}}o.shadowRoot&&(n.shadowRoot||n.attachShadow({mode:"open"}),Xl(n.shadowRoot,o.shadowRoot,t,s)),Om(n,o,s);break}}return i}function Tm(i,e,t){var s;switch(e.RRNodeType){case U.Document:{const r=e.scrollData;r&&t.applyScroll(r,!0);break}case U.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 U.Text:case U.Comment:case U.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 Om(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&&Ar[n])i.setAttributeNS(Ar[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 Xl(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(nt(u,d,t.mirror,s))u=r[++o],d=n[++a];else if(nt(h,f,t.mirror,s))h=r[--l],f=n[--c];else if(nt(u,f,t.mirror,s)){try{i.insertBefore(u,h.nextSibling)}catch(S){console.warn(S)}u=r[++o],f=n[--c]}else if(nt(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 C=o;C<=l;C++){const v=r[C];v&&t.mirror.hasNode(v)&&(m[t.mirror.getId(v)]=C)}}y=m[s.getId(d)];const S=r[y];if(y!==void 0&&S&&nt(S,d,t.mirror,s)){try{i.insertBefore(S,u)}catch(C){console.warn(C)}r[y]=void 0}else{const C=Qs(d,t.mirror,s);i.nodeName==="#document"&&u&&(C.nodeType===C.DOCUMENT_TYPE_NODE&&u.nodeType===u.DOCUMENT_TYPE_NODE||C.nodeType===C.ELEMENT_NODE&&u.nodeType===u.ELEMENT_NODE)&&(i.removeChild(u),t.mirror.removeNodeFromMap(u),u=r[++o]);try{i.insertBefore(C,u||null)}catch(v){console.warn(v)}}d=n[++a]}if(o>l){const S=n[c+1];let C=null;for(S&&(C=t.mirror.getNode(s.getId(S)));a<=c;++a){const v=Qs(n[a],t.mirror,s);try{i.insertBefore(v,C)}catch(w){console.warn(w)}}}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(C){console.warn(C)}}let p=i.firstChild,g=e.firstChild;for(;p!==null&&g!==null;)Ks(p,g,t,s),p=p.nextSibling,g=g.nextSibling}function Qs(i,e,t){const s=t.getId(i),r=t.getMeta(i);let n=null;if(s>-1&&(n=e.getNode(s)),n!==null&&ln(n,i))return n;switch(i.RRNodeType){case U.Document:n=new Document;break;case U.DocumentType:n=document.implementation.createDocumentType(i.name,i.publicId,i.systemId);break;case U.Element:{let o=i.tagName.toLowerCase();o=Nm[o]||o,r&&"isSVG"in r&&(r!=null&&r.isSVG)?n=document.createElementNS(Ar.svg,o):n=document.createElement(i.tagName);break}case U.Text:n=document.createTextNode(i.data);break;case U.Comment:n=document.createComment(i.data);break;case U.CDATA:n=document.createCDATASection(i.data);break}r&&e.add(n,A({},r));try{Ie==null||Ie.add(n)}catch(o){}return n}function ln(i,e){return i.nodeType!==e.nodeType?!1:i.nodeType!==i.ELEMENT_NODE||i.tagName.toUpperCase()===e.tagName}function nt(i,e,t,s){const r=t.getId(i),n=s.getId(e);return r===-1||r!==n?!1:ln(i,e)}class xt extends on{constructor(e){super(),M(this,"UNSERIALIZED_STARTING_ID",-2),M(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),M(this,"mirror",Vm()),M(this,"scrollData",null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(e,t,s){return new xt}createDocumentType(e,t,s){const r=new Dm(e,t,s);return r.ownerDocument=this,r}createElement(e){const t=e.toUpperCase();let s;switch(t){case"AUDIO":case"VIDEO":s=new $m(t);break;case"IFRAME":s=new Pm(t,this.mirror);break;case"CANVAS":s=new _m(t);break;case"STYLE":s=new Lm(t);break;case"DIALOG":s=new km(t);break;default:s=new yi(t);break}return s.ownerDocument=this,s}createComment(e){const t=new zm(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new Bm(e);return t.ownerDocument=this,t}createTextNode(e){const t=new Fm(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 Dm=Vl;class yi extends gi{constructor(){super(...arguments),M(this,"inputData",null),M(this,"scrollData",null)}}class $m extends Mm{}class km extends Am{}class _m extends yi{constructor(){super(...arguments),M(this,"rr_dataURL",null),M(this,"canvasMutations",[])}getContext(){return null}}class Lm extends yi{constructor(){super(...arguments),M(this,"rules",[])}}class Pm extends yi{constructor(e,t){super(e),M(this,"contentDocument",new xt),this.contentDocument.mirror=t}}const Fm=Hl,zm=Gl,Bm=jl;function Wm(i){return i instanceof HTMLFormElement?"FORM":i.tagName.toUpperCase()}function Jl(i,e,t,s){let r;switch(i.nodeType){case ye.DOCUMENT_NODE:s&&s.nodeName==="IFRAME"?r=s.contentDocument:(r=e,r.compatMode=i.compatMode);break;case ye.DOCUMENT_TYPE_NODE:{const o=i;r=e.createDocumentType(o.name,o.publicId,o.systemId);break}case ye.ELEMENT_NODE:{const o=i,l=Wm(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 ye.TEXT_NODE:r=e.createTextNode(i.textContent||"");break;case ye.CDATA_SECTION_NODE:r=e.createCDATASection(i.data);break;case ye.COMMENT_NODE:r=e.createComment(i.textContent||"");break;case ye.DOCUMENT_FRAGMENT_NODE:r=s.attachShadow({mode:"open"});break;default:return null}let n=t.getMeta(i);return e instanceof xt&&(n||(n=ql(r,e.unserializedId),t.add(i,n)),e.mirror.add(r,A({},n))),r}function Um(i,e=If(),t=new xt){function s(r,n){const o=Jl(r,t,e,n);if(o!==null)if((n==null?void 0:n.nodeName)!=="IFRAME"&&r.nodeType!==ye.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===ye.DOCUMENT_NODE||r.nodeType===ye.ELEMENT_NODE||r.nodeType===ye.DOCUMENT_FRAGMENT_NODE)&&(r.nodeType===ye.ELEMENT_NODE&&r.shadowRoot&&s(r.shadowRoot,o),r.childNodes.forEach(l=>s(l,o)))}return s(i,null),t}function Vm(){return new Hm}class Hm{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 ql(i,e){switch(i.RRNodeType){case U.Document:return{id:e,type:i.RRNodeType,childNodes:[]};case U.DocumentType:{const t=i;return{id:e,type:i.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId}}case U.Element:return{id:e,type:i.RRNodeType,tagName:i.tagName.toLowerCase(),attributes:{},childNodes:[]};case U.Text:return{id:e,type:i.RRNodeType,textContent:i.textContent||""};case U.Comment:return{id:e,type:i.RRNodeType,textContent:i.textContent||""};case U.CDATA:return{id:e,type:i.RRNodeType,textContent:""}}}const Lo={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Po={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Rs={},Gm=()=>!!globalThis.Zone;function cn(i){if(Rs[i])return Rs[i];const e=globalThis[i],t=e.prototype,s=i in Lo?Lo[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 Po?Po[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&&!Gm())return Rs[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?Rs[i]=c:t}catch(l){return t}}const zi={};function Je(i,e,t){var s;const r=`${i}.${String(t)}`;if(zi[r])return zi[r].call(e);const n=cn(i),o=(s=Object.getOwnPropertyDescriptor(n,t))==null?void 0:s.get;return o?(zi[r]=o,o.call(e)):e[t]}const Bi={};function Kl(i,e,t){const s=`${i}.${String(t)}`;if(Bi[s])return Bi[s].bind(e);const n=cn(i)[t];return typeof n!="function"?e[t]:(Bi[s]=n,n.bind(e))}function jm(i){return Je("Node",i,"childNodes")}function Ym(i){return Je("Node",i,"parentNode")}function Zm(i){return Je("Node",i,"parentElement")}function Xm(i){return Je("Node",i,"textContent")}function Jm(i,e){return Kl("Node",i,"contains")(e)}function qm(i){return Kl("Node",i,"getRootNode")()}function Km(i){return!i||!("host"in i)?null:Je("ShadowRoot",i,"host")}function Qm(i){return i.styleSheets}function eg(i){return!i||!("shadowRoot"in i)?null:Je("Element",i,"shadowRoot")}function tg(i,e){return Je("Element",i,"querySelector")(e)}function sg(i,e){return Je("Element",i,"querySelectorAll")(e)}function un(){return cn("MutationObserver").constructor}function Le(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 ig(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 rg(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:jm,parentNode:Ym,parentElement:Zm,textContent:Xm,contains:Jm,getRootNode:qm,host:Km,styleSheets:Qm,shadowRoot:eg,querySelector:tg,querySelectorAll:sg,mutationObserver:un,patch:Le,describeNode:ig,getElementVisibility:rg};function oe(i,e,t=document){const s={capture:!0,passive:!0};return t.addEventListener(i,e,s),()=>t.removeEventListener(i,e,s)}const ot=`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 an().version,l}let n;return Object.defineProperty(r,"postcss",{get(){return n||(n=r()),n}}),r.process=function(o,l,a){return q([r(a)]).process(o,l)},r};q.stringify=Nm;q.parse=Mm;q.fromJSON=Sm;q.list=Em;q.comment=i=>new Vl(i);q.atRule=i=>new Ul(i);q.decl=i=>new Hl(i);q.rule=i=>new Yl(i);q.root=i=>new jl(i);q.document=i=>new Gl(i);q.CssSyntaxError=wm;q.Declaration=Hl;q.Container=vm;q.Processor=an;q.Document=Gl;q.Comment=Vl;q.Warning=Rm;q.AtRule=Ul;q.Result=Im;q.Input=Cm;q.Rule=Yl;q.Root=jl;q.Node=Am;xm.registerPostcss(q);var Tm=q;q.default=q;const ie=Vf(Tm);ie.stringify;ie.fromJSON;ie.plugin;ie.parse;ie.list;ie.document;ie.comment;ie.atRule;ie.rule;ie.decl;ie.root;ie.CssSyntaxError;ie.Declaration;ie.Container;ie.Processor;ie.Document;ie.Comment;ie.Warning;ie.AtRule;ie.Result;ie.Input;ie.Rule;ie.Root;ie.Node;var U=(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))(U||{});function Om(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[Ir(o[0].trim())]=o[1].trim())}}),e}function Fo(i){const e=[];for(const t in i){const s=i[t];if(typeof s!="string")continue;const r=_m(t);e.push(`${r}: ${s};`)}return e.join(" ")}const Dm=/-([a-z])/g,$m=/^--[a-zA-Z0-9-]+$/,Ir=i=>$m.test(i)?i:i.replace(Dm,(e,t)=>t?t.toUpperCase():""),km=/\B([A-Z])/g,_m=i=>i.replace(km,"-$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 ln extends Ce{constructor(...e){super(e),A(this,"nodeType",9),A(this,"nodeName","#document"),A(this,"compatMode","CSS1Compat"),A(this,"RRNodeType",U.Document),A(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===U.Element&&e.tagName==="HTML")||null}get body(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===U.Element&&t.tagName==="BODY"))||null}get head(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===U.Element&&t.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){const t=e.RRNodeType;if((t===U.Element||t===U.DocumentType)&&this.childNodes.some(r=>r.RRNodeType===t))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===U.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const s=cn(this,e);return s.parentElement=null,s}insertBefore(e,t){const s=e.RRNodeType;if((s===U.Element||s===U.DocumentType)&&this.childNodes.some(n=>n.RRNodeType===s))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${s===U.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const r=Kl(this,e,t);return r.parentElement=null,r}removeChild(e){return Ql(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 ln}createDocumentType(e,t,s){const r=new Zl(e,t,s);return r.ownerDocument=this,r}createElement(e){const t=new bi(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){const t=new Xl(e);return t.ownerDocument=this,t}createComment(e){const t=new ql(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new Jl(e);return t.ownerDocument=this,t}toString(){return"RRDocument"}}class Zl extends Ce{constructor(e,t,s){super(),A(this,"nodeType",10),A(this,"RRNodeType",U.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 bi extends Ce{constructor(e){super(),A(this,"nodeType",1),A(this,"RRNodeType",U.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 Fm(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?Om(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(s,r,n)=>{if(t.test(s))return;const o=Ir(s);r?e[o]=r:delete e[o],n==="important"&&(e[o]+=" !important"),this.attributes.style=Fo(e)},e.removeProperty=s=>{if(t.test(s))return"";const r=Ir(s),n=e[r]||"";return delete e[r],this.attributes.style=Fo(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 cn(this,e)}insertBefore(e,t){return Kl(this,e,t)}removeChild(e){return Ql(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 Lm extends bi{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 Pm extends bi{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 Xl extends Ce{constructor(e){super(),A(this,"nodeType",3),A(this,"nodeName","#text"),A(this,"RRNodeType",U.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 ql extends Ce{constructor(e){super(),A(this,"nodeType",8),A(this,"nodeName","#comment"),A(this,"RRNodeType",U.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 Jl extends Ce{constructor(e){super(),A(this,"nodeName","#cdata-section"),A(this,"nodeType",4),A(this,"RRNodeType",U.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 Fm{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 cn(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 Kl(i,e,t){if(!t)return cn(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 Ql(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 ye=(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))(ye||{});const Nr={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},zm={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 Qs(i,e,t,s=e.mirror||e.ownerDocument.mirror){i=Bm(i,e,t,s),ec(i,e,t,s),Wm(i,e,t)}function Bm(i,e,t,s){var r;if(t.afterAppend&&!Ie&&(Ie=new WeakSet,setTimeout(()=>{Ie=null},0)),!un(i,e)){const n=ei(e,t.mirror,s);(r=i.parentNode)==null||r.replaceChild(n,i),i=n}switch(e.RRNodeType){case U.Document:{if(!nt(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 U.Element:{const n=i,o=e;switch(o.tagName){case"IFRAME":{const l=i.contentDocument;if(!l)break;Qs(l,e.contentDocument,t,s);break}}o.shadowRoot&&(n.shadowRoot||n.attachShadow({mode:"open"}),ec(n.shadowRoot,o.shadowRoot,t,s)),Um(n,o,s);break}}return i}function Wm(i,e,t){var s;switch(e.RRNodeType){case U.Document:{const r=e.scrollData;r&&t.applyScroll(r,!0);break}case U.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,m=a!==u;if((d||a&&m)&&o.close(),u&&(m||d))try{h?o.showModal():o.show()}catch(p){console.warn(p)}break}}break}case U.Text:case U.Comment:case U.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 Um(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&&Nr[n])i.setAttributeNS(Nr[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 ec(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],m=n[c],p,y;for(;o<=l&&a<=c;)if(u===void 0)u=r[++o];else if(h===void 0)h=r[--l];else if(nt(u,d,t.mirror,s))u=r[++o],d=n[++a];else if(nt(h,m,t.mirror,s))h=r[--l],m=n[--c];else if(nt(u,m,t.mirror,s)){try{i.insertBefore(u,h.nextSibling)}catch(w){console.warn(w)}u=r[++o],m=n[--c]}else if(nt(h,d,t.mirror,s)){try{i.insertBefore(h,u)}catch(w){console.warn(w)}h=r[--l],d=n[++a]}else{if(!p){p={};for(let C=o;C<=l;C++){const v=r[C];v&&t.mirror.hasNode(v)&&(p[t.mirror.getId(v)]=C)}}y=p[s.getId(d)];const w=r[y];if(y!==void 0&&w&&nt(w,d,t.mirror,s)){try{i.insertBefore(w,u)}catch(C){console.warn(C)}r[y]=void 0}else{const C=ei(d,t.mirror,s);i.nodeName==="#document"&&u&&(C.nodeType===C.DOCUMENT_TYPE_NODE&&u.nodeType===u.DOCUMENT_TYPE_NODE||C.nodeType===C.ELEMENT_NODE&&u.nodeType===u.ELEMENT_NODE)&&(i.removeChild(u),t.mirror.removeNodeFromMap(u),u=r[++o]);try{i.insertBefore(C,u||null)}catch(v){console.warn(v)}}d=n[++a]}if(o>l){const w=n[c+1];let C=null;for(w&&(C=t.mirror.getNode(s.getId(w)));a<=c;++a){const v=ei(n[a],t.mirror,s);try{i.insertBefore(v,C)}catch(S){console.warn(S)}}}else if(a>c)for(;o<=l;o++){const w=r[o];if(!(!w||w.parentNode!==i))try{i.removeChild(w),t.mirror.removeNodeFromMap(w)}catch(C){console.warn(C)}}let f=i.firstChild,g=e.firstChild;for(;f!==null&&g!==null;)Qs(f,g,t,s),f=f.nextSibling,g=g.nextSibling}function ei(i,e,t){const s=t.getId(i),r=t.getMeta(i);let n=null;if(s>-1&&(n=e.getNode(s)),n!==null&&un(n,i))return n;switch(i.RRNodeType){case U.Document:n=new Document;break;case U.DocumentType:n=document.implementation.createDocumentType(i.name,i.publicId,i.systemId);break;case U.Element:{let o=i.tagName.toLowerCase();o=zm[o]||o,r&&"isSVG"in r&&(r!=null&&r.isSVG)?n=document.createElementNS(Nr.svg,o):n=document.createElement(i.tagName);break}case U.Text:n=document.createTextNode(i.data);break;case U.Comment:n=document.createComment(i.data);break;case U.CDATA:n=document.createCDATASection(i.data);break}r&&e.add(n,M({},r));try{Ie==null||Ie.add(n)}catch(o){}return n}function un(i,e){return i.nodeType!==e.nodeType?!1:i.nodeType!==i.ELEMENT_NODE||i.tagName.toUpperCase()===e.tagName}function nt(i,e,t,s){const r=t.getId(i),n=s.getId(e);return r===-1||r!==n?!1:un(i,e)}class xt extends ln{constructor(e){super(),A(this,"UNSERIALIZED_STARTING_ID",-2),A(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),A(this,"mirror",eg()),A(this,"scrollData",null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(e,t,s){return new xt}createDocumentType(e,t,s){const r=new Vm(e,t,s);return r.ownerDocument=this,r}createElement(e){const t=e.toUpperCase();let s;switch(t){case"AUDIO":case"VIDEO":s=new Hm(t);break;case"IFRAME":s=new Zm(t,this.mirror);break;case"CANVAS":s=new jm(t);break;case"STYLE":s=new Ym(t);break;case"DIALOG":s=new Gm(t);break;default:s=new vi(t);break}return s.ownerDocument=this,s}createComment(e){const t=new qm(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new Jm(e);return t.ownerDocument=this,t}createTextNode(e){const t=new Xm(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 Vm=Zl;class vi extends bi{constructor(){super(...arguments),A(this,"inputData",null),A(this,"scrollData",null)}}class Hm extends Lm{}class Gm extends Pm{}class jm extends vi{constructor(){super(...arguments),A(this,"rr_dataURL",null),A(this,"canvasMutations",[])}getContext(){return null}}class Ym extends vi{constructor(){super(...arguments),A(this,"rules",[])}}class Zm extends vi{constructor(e,t){super(e),A(this,"contentDocument",new xt),this.contentDocument.mirror=t}}const Xm=Xl,qm=ql,Jm=Jl;function Km(i){return i instanceof HTMLFormElement?"FORM":i.tagName.toUpperCase()}function tc(i,e,t,s){let r;switch(i.nodeType){case ye.DOCUMENT_NODE:s&&s.nodeName==="IFRAME"?r=s.contentDocument:(r=e,r.compatMode=i.compatMode);break;case ye.DOCUMENT_TYPE_NODE:{const o=i;r=e.createDocumentType(o.name,o.publicId,o.systemId);break}case ye.ELEMENT_NODE:{const o=i,l=Km(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 ye.TEXT_NODE:r=e.createTextNode(i.textContent||"");break;case ye.CDATA_SECTION_NODE:r=e.createCDATASection(i.data);break;case ye.COMMENT_NODE:r=e.createComment(i.textContent||"");break;case ye.DOCUMENT_FRAGMENT_NODE:r=s.attachShadow({mode:"open"});break;default:return null}let n=t.getMeta(i);return e instanceof xt&&(n||(n=sc(r,e.unserializedId),t.add(i,n)),e.mirror.add(r,M({},n))),r}function Qm(i,e=Pf(),t=new xt){function s(r,n){const o=tc(r,t,e,n);if(o!==null)if((n==null?void 0:n.nodeName)!=="IFRAME"&&r.nodeType!==ye.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===ye.DOCUMENT_NODE||r.nodeType===ye.ELEMENT_NODE||r.nodeType===ye.DOCUMENT_FRAGMENT_NODE)&&(r.nodeType===ye.ELEMENT_NODE&&r.shadowRoot&&s(r.shadowRoot,o),r.childNodes.forEach(l=>s(l,o)))}return s(i,null),t}function eg(){return new tg}class tg{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 sc(i,e){switch(i.RRNodeType){case U.Document:return{id:e,type:i.RRNodeType,childNodes:[]};case U.DocumentType:{const t=i;return{id:e,type:i.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId}}case U.Element:return{id:e,type:i.RRNodeType,tagName:i.tagName.toLowerCase(),attributes:{},childNodes:[]};case U.Text:return{id:e,type:i.RRNodeType,textContent:i.textContent||""};case U.Comment:return{id:e,type:i.RRNodeType,textContent:i.textContent||""};case U.CDATA:return{id:e,type:i.RRNodeType,textContent:""}}}const zo={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Bo={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Rs={},sg=()=>!!globalThis.Zone;function hn(i){if(Rs[i])return Rs[i];const e=globalThis[i],t=e.prototype,s=i in zo?zo[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 Bo?Bo[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&&!sg())return Rs[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?Rs[i]=c:t}catch(l){return t}}const Wi={};function qe(i,e,t){var s;const r=`${i}.${String(t)}`;if(Wi[r])return Wi[r].call(e);const n=hn(i),o=(s=Object.getOwnPropertyDescriptor(n,t))==null?void 0:s.get;return o?(Wi[r]=o,o.call(e)):e[t]}const Ui={};function ic(i,e,t){const s=`${i}.${String(t)}`;if(Ui[s])return Ui[s].bind(e);const n=hn(i)[t];return typeof n!="function"?e[t]:(Ui[s]=n,n.bind(e))}function ig(i){return qe("Node",i,"childNodes")}function rg(i){return qe("Node",i,"parentNode")}function ng(i){return qe("Node",i,"parentElement")}function og(i){return qe("Node",i,"textContent")}function ag(i,e){return ic("Node",i,"contains")(e)}function lg(i){return ic("Node",i,"getRootNode")()}function cg(i){return!i||!("host"in i)?null:qe("ShadowRoot",i,"host")}function ug(i){return i.styleSheets}function hg(i){return!i||!("shadowRoot"in i)?null:qe("Element",i,"shadowRoot")}function dg(i,e){return qe("Element",i,"querySelector")(e)}function fg(i,e){return qe("Element",i,"querySelectorAll")(e)}function dn(){return hn("MutationObserver").constructor}function Le(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 pg(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 mg(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 m=Math.max(0,Math.min(r.right,n)-Math.max(r.left,0)),p=Math.max(0,Math.min(r.bottom,o)-Math.max(r.top,0)),y=m*p,f=r.width*r.height;h=f>0?y/f:0}return{isVisible:u,ratio:h}}const _={childNodes:ig,parentNode:rg,parentElement:ng,textContent:og,contains:ag,getRootNode:lg,host:cg,styleSheets:ug,shadowRoot:hg,querySelector:dg,querySelectorAll:fg,mutationObserver:dn,patch:Le,describeNode:pg,getElementVisibility:mg};function oe(i,e,t=document){const s={capture:!0,passive:!0};return t.addEventListener(i,e,s),()=>t.removeEventListener(i,e,s)}const ot=`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(ot),-1},getNode(){return console.error(ot),null},removeNodeFromMap(){console.error(ot)},has(){return console.error(ot),!1},reset(){console.error(ot)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(exports.mirror=new Proxy(exports.mirror,{get(i,e,t){return e==="map"&&console.error(ot),Reflect.get(i,e,t)}}));function St(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 ss(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)}}),()=>ss(i,e,n||{},!0)}function he(){return Math.round(performance.timeOrigin+performance.now())}function hn(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 dn(i=window){const e=i.document;return i.innerHeight||e.documentElement&&e.documentElement.clientHeight||e.body&&e.body.clientHeight||0}function fn(i=window){const e=i.document;return i.innerWidth||e.documentElement&&e.documentElement.clientWidth||e.body&&e.body.clientWidth||0}function bi(i){return i?i.nodeType===i.ELEMENT_NODE?i:k.parentElement(i):null}function de(i,e,t,s){if(!i)return!1;const r=bi(i);if(!r)return!1;try{if(typeof e=="string"){if(r.classList.contains(e)||s&&r.closest("."+e)!==null)return!0}else if(Vs(r,e,s))return!0}catch(n){}return!!(t&&(r.matches(t)||s&&r.closest(t)!==null))}function Ql(i,e){return e.getId(i)!==-1}function zs(i,e,t){return i.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(i)===Ut}function pn(i,e){if(_t(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?pn(s,e):!0}function ei(i){return!!i.changedTouches}function mn(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 ec(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 gn(i,e){e(i.value);for(let t=i.children.length-1;t>=0;t--)gn(i.children[t],e)}function ft(i,e){return!!(i.nodeName==="IFRAME"&&e.getMeta(i))}function yn(i,e){return!!(i.nodeName==="LINK"&&i.nodeType===i.ELEMENT_NODE&&i.getAttribute&&i.getAttribute("rel")==="stylesheet"&&e.getMeta(i))}function bn(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=bn(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 Ge(i){return i?i instanceof Ce&&"shadowRoot"in i?!!i.shadowRoot:!!k.shadowRoot(i):!1}function ut(i,e){const t=i[e[0]];return e.length===1?t:ut(t.cssRules[e[1]].cssRules,e.slice(2))}function Ir(i){const e=[...i],t=e.pop();return{positions:e,index:t}}function tc(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 vn{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 wn(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 sc(i){let e=i,t;for(;t=wn(e);)e=t;return e}function ic(i){const e=i.ownerDocument;if(!e)return!1;const t=sc(i);return k.contains(e,t)}function Sn(i){const e=i.ownerDocument;return e?k.contains(e,i)||ic(i):!1}const ng=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:vn,get _mirror(){return exports.mirror},closestElementOfNode:bi,getBaseDimension:bn,getNestedRule:ut,getPositionsAndIndex:Ir,getRootShadowHost:sc,getShadowHost:wn,getWindowHeight:dn,getWindowScroll:hn,getWindowWidth:fn,hasShadowRoot:Ge,hookSetter:ss,inDom:Sn,isAncestorRemoved:pn,isBlocked:de,isIgnored:zs,isSerialized:Ql,isSerializedIframe:ft,isSerializedStylesheet:yn,iterateResolveTree:gn,legacy_isTouchEvent:ei,nowTimestamp:he,on:oe,polyfill:mn,queueToResolveTrees:ec,shadowHostInDom:ic,throttle:St,uniqueTextMutations:tc},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||{}),G=(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))(G||{}),De=(i=>(i[i.Mouse=0]="Mouse",i[i.Pen=1]="Pen",i[i.Touch=2]="Touch",i))(De||{}),Pe=(i=>(i[i["2D"]=0]="2D",i[i.WebGL=1]="WebGL",i[i.WebGL2=2]="WebGL2",i))(Pe||{}),Ve=(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))(Ve||{}),H=(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))(H||{}),$e=(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))($e||{});const Ts={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},og={MIN_CONFIDENCE_FOR_SKIP:.7},Fo=["form","main","nav","section","article","footer","header"],zo=["form","navigation","main","region","contentinfo","complementary","banner","search"],ag=["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"],je={"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},rc=new Set(["id","class","style","xmlns","tabindex","contenteditable"]),lg={maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:0,fallbackToBody:!0,includeUtilityClasses:!1,source:"dom-dsl"};function qt(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 nc=new Set(["aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-activedescendant","for","form","list","headers","aria-details","aria-errormessage","aria-flowto"]);function oc(i){return i.trim().split(/\s+/).some(e=>qt(e))}class cg{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();Fo.includes(s)&&(t+=Ae.SEMANTIC_TAG);const r=e.getAttribute("role");r&&zo.includes(r)&&(t+=Ae.ROLE),(e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby"))&&(t+=Ae.ARIA_LABEL);const n=e.id;return n&&!qt(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(Fo.includes(t))return"A";const s=e.getAttribute("role");return s&&zo.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 ug=[/^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,}/],hg=[/^\[/,/^(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 Cn(i){return ug.some(e=>e.test(i))}function xn(i){return i.length<=2||/^\d/.test(i)?!0:hg.some(e=>e.test(i))}function dg(i){return!Cn(i)&&!xn(i)}function fg(i){return i.filter(e=>dg(e))}function pg(i){const e=[],t=[];for(const s of i)xn(s)||Cn(s)?t.push(s):e.push(s);return{semantic:e,utility:t}}function Bo(i){return xn(i)||Cn(i)}const Wo=i=>i.replace(/([#:.[\]@])/g,"\\$1");class mg{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)<og.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&&!qt(e.id)&&(t+=`#${Wo(e.id)}`);for(const s of Array.from(e.classList))Bo(s)||(t+=`.${Wo(s)}`);return t}filterNoise(e){return e.filter(t=>this.shouldInclude(t))}shouldInclude(e){const t=e.tagName.toLowerCase();return ag.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(!Bo(s))return!0}if(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))return!0;const t=e.id;return!!(t&&!qt(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 gg(i){return i?i.trim().replace(/[\n\t\r]/g," ").replace(/\s+/g," "):""}const yg={preserveQueryForAbsolute:!0,removeDynamicHashes:!0};function bg(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 vg(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&&bg(r)||(l+=`#${r}`)),l}function ac(i,e,t={}){if(!e)return e;const s=A(A({},yg),t);return i==="href"||i==="src"?vg(e,s):e}const wg=["role","aria-label","aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-level","aria-posinset","aria-setsize","aria-haspopup"],Sg=["aria-selected","aria-checked","aria-pressed","aria-expanded","aria-hidden","aria-disabled","aria-current","aria-busy","aria-invalid","aria-grabbed","aria-live","aria-atomic"],Cg=["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"],xg=["data-radix-","data-headlessui-","data-reach-","data-mui-","data-chakra-","data-mantine-","data-tw-"],Eg=["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"],Mg=["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"],Ag=["data-category","data-action","data-label","data-value"],Ig=["id","name","type","placeholder","title","for","alt","href"],Ng=["disabled","checked","selected","hidden","readonly","required","value"],Rg=[/^radix-/,/^headlessui-/,/^mui-/,/:\w+:/];function Tg(i,e){return wg.includes(i)?!0:Sg.includes(i)||Cg.includes(i)||xg.some(t=>i.startsWith(t))?!1:Eg.includes(i)?!0:Mg.some(t=>i.startsWith(t))||Ag.includes(i)?!1:i.startsWith("data-")&&i.endsWith("-id")?!0:i==="id"?!Rg.some(t=>t.test(e)):Ig.includes(i)?!0:Ng.includes(i)?!1:!!i.startsWith("data-")}class Uo{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&&!qt(s)&&(t.id=s),e.classList.length>0){const o=Array.from(e.classList);if(this.includeUtilityClasses)t.classes=o;else{const{semantic:l}=pg(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!!(rc.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 je[e]!==void 0?je[e]:e.startsWith("data-")?je["data-*"]:e.startsWith("aria-")?je["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)||!Tg(r,s.value)||nc.has(r)&&oc(s.value)||this.getAttributePriority(r)===0)continue;const n=r==="href"||r==="src"?ac(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=gg(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 Og{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 Dg(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*Ts.ANCHOR+s*Ts.PATH+r*Ts.TARGET+e*Ts.UNIQUENESS,o=i.anchor.degraded?.2:0;return Math.max(0,Math.min(1,n-o))}class $g{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 kg{constructor(e={}){var t,s;this.eidCache=new WeakMap,this.selectorResultCache=new $g((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 ne(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 _g(i){return new kg(i)}let Wi=null;function Lg(){return Wi||(Wi=_g()),Wi}function Vo(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(ot),-1},getNode(){return console.error(ot),null},removeNodeFromMap(){console.error(ot)},has(){return console.error(ot),!1},reset(){console.error(ot)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(exports.mirror=new Proxy(exports.mirror,{get(i,e,t){return e==="map"&&console.error(ot),Reflect.get(i,e,t)}}));function St(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 ss(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)}}),()=>ss(i,e,n||{},!0)}function he(){return Math.round(performance.timeOrigin+performance.now())}function fn(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=_.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=_.parentElement(n.body))==null?void 0:s.scrollTop)||((r=n==null?void 0:n.body)==null?void 0:r.scrollTop)||0}}function pn(i=window){const e=i.document;return i.innerHeight||e.documentElement&&e.documentElement.clientHeight||e.body&&e.body.clientHeight||0}function mn(i=window){const e=i.document;return i.innerWidth||e.documentElement&&e.documentElement.clientWidth||e.body&&e.body.clientWidth||0}function wi(i){return i?i.nodeType===i.ELEMENT_NODE?i:_.parentElement(i):null}function de(i,e,t,s){if(!i)return!1;const r=wi(i);if(!r)return!1;try{if(typeof e=="string"){if(r.classList.contains(e)||s&&r.closest("."+e)!==null)return!0}else if(Hs(r,e,s))return!0}catch(n){}return!!(t&&(r.matches(t)||s&&r.closest(t)!==null))}function rc(i,e){return e.getId(i)!==-1}function zs(i,e,t){return i.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(i)===Ut}function gn(i,e){if(_t(i))return!1;const t=e.getId(i);if(!e.has(t))return!0;const s=_.parentNode(i);return s&&s.nodeType===i.DOCUMENT_NODE?!1:s?gn(s,e):!0}function ti(i){return!!i.changedTouches}function yn(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 nc(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 bn(i,e){e(i.value);for(let t=i.children.length-1;t>=0;t--)bn(i.children[t],e)}function ft(i,e){return!!(i.nodeName==="IFRAME"&&e.getMeta(i))}function vn(i,e){return!!(i.nodeName==="LINK"&&i.nodeType===i.ELEMENT_NODE&&i.getAttribute&&i.getAttribute("rel")==="stylesheet"&&e.getMeta(i))}function wn(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=wn(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 Ge(i){return i?i instanceof Ce&&"shadowRoot"in i?!!i.shadowRoot:!!_.shadowRoot(i):!1}function ut(i,e){const t=i[e[0]];return e.length===1?t:ut(t.cssRules[e[1]].cssRules,e.slice(2))}function Rr(i){const e=[...i],t=e.pop();return{positions:e,index:t}}function oc(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 Sn{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 Cn(i){var e;let t=null;return"getRootNode"in i&&((e=_.getRootNode(i))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&_.host(_.getRootNode(i))&&(t=_.host(_.getRootNode(i))),t}function ac(i){let e=i,t;for(;t=Cn(e);)e=t;return e}function lc(i){const e=i.ownerDocument;if(!e)return!1;const t=ac(i);return _.contains(e,t)}function xn(i){const e=i.ownerDocument;return e?_.contains(e,i)||lc(i):!1}const gg=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:Sn,get _mirror(){return exports.mirror},closestElementOfNode:wi,getBaseDimension:wn,getNestedRule:ut,getPositionsAndIndex:Rr,getRootShadowHost:ac,getShadowHost:Cn,getWindowHeight:pn,getWindowScroll:fn,getWindowWidth:mn,hasShadowRoot:Ge,hookSetter:ss,inDom:xn,isAncestorRemoved:gn,isBlocked:de,isIgnored:zs,isSerialized:rc,isSerializedIframe:ft,isSerializedStylesheet:vn,iterateResolveTree:bn,legacy_isTouchEvent:ti,nowTimestamp:he,on:oe,polyfill:yn,queueToResolveTrees:nc,shadowHostInDom:lc,throttle:St,uniqueTextMutations:oc},Symbol.toStringTag,{value:"Module"}));var N=(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))(N||{}),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||{}),G=(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))(G||{}),De=(i=>(i[i.Mouse=0]="Mouse",i[i.Pen=1]="Pen",i[i.Touch=2]="Touch",i))(De||{}),Pe=(i=>(i[i["2D"]=0]="2D",i[i.WebGL=1]="WebGL",i[i.WebGL2=2]="WebGL2",i))(Pe||{}),Ve=(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))(Ve||{}),H=(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))(H||{}),$e=(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))($e||{});const Ts={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},yg={MIN_CONFIDENCE_FOR_SKIP:.7},Wo=["form","main","nav","section","article","footer","header"],Uo=["form","navigation","main","region","contentinfo","complementary","banner","search"],bg=["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"],je={"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},cc=new Set(["id","class","style","xmlns","tabindex","contenteditable"]),vg={maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:0,fallbackToBody:!0,includeUtilityClasses:!1,source:"dom-dsl"};function Jt(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 uc=new Set(["aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-activedescendant","for","form","list","headers","aria-details","aria-errormessage","aria-flowto"]);function hc(i){return i.trim().split(/\s+/).some(e=>Jt(e))}class wg{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();Wo.includes(s)&&(t+=Me.SEMANTIC_TAG);const r=e.getAttribute("role");r&&Uo.includes(r)&&(t+=Me.ROLE),(e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby"))&&(t+=Me.ARIA_LABEL);const n=e.id;return n&&!Jt(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(Wo.includes(t))return"A";const s=e.getAttribute("role");return s&&Uo.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,}/],Cg=[/^\[/,/^(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 En(i){return Sg.some(e=>e.test(i))}function An(i){return i.length<=2||/^\d/.test(i)?!0:Cg.some(e=>e.test(i))}function xg(i){return!En(i)&&!An(i)}function Eg(i){return i.filter(e=>xg(e))}function Ag(i){const e=[],t=[];for(const s of i)An(s)||En(s)?t.push(s):e.push(s);return{semantic:e,utility:t}}function Vo(i){return An(i)||En(i)}const Mg=new Set(["tr","td","th","thead","tbody","tfoot"]),Ig=new Set(["data-testid","data-qa","data-cy","data-test","aria-label","name","href"]);function Ng(i){if(i.id)return!0;if(i.attributes){for(const e of Object.keys(i.attributes))if(Ig.has(e))return!0}return!1}function Rg(i,e,t){var n;var s;const r=i.parentElement;if(!r)return!0;for(const o of Array.from(r.children))if(!(o===i||o.tagName.toLowerCase()!==e)&&((n=(s=o.textContent)==null?void 0:s.trim())!=null?n:"")===t)return!1;return!0}function si(i,e,t){var s;if(Mg.has(i))return!0;if(Ng(e))return!1;if(t){const r=t.parentElement;if(r){const n=(s=e.text)==null?void 0:s.normalized;if(n&&Rg(t,i,n))return!1;if(Array.from(r.children).some(o=>o!==t&&o.tagName.toLowerCase()===i))return!0}return!1}return!0}const Ho=i=>i.replace(/([#:.[\]@])/g,"\\$1");class Tg{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.tagName.toLowerCase(),d=s.extract(u);let m;if(si(h,d,u)){const p=u.parentElement;if(p){const y=Array.from(p.children).indexOf(u);y!==-1&&(m=y+1)}}return{tag:h,semantics:d,score:s.scoreElement(u),nthChild:m}}),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)<yg.MIN_CONFIDENCE_FOR_SKIP)continue;const h=this.insertNodeInOrder(t,u,e),d=this.buildTestSelector(s,h,r);try{let m;if(this.cache){const p=this.cache.getSelectorResults(d);p!==void 0?m=p:(m=Array.from(l.querySelectorAll(d)),this.cache.setSelectorResults(d,m))}else m=l.querySelectorAll(d);if(m.length===1)return h;m.length<a.length&&(t=h)}catch(m){}}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&&!Jt(e.id)&&(t+=`#${Ho(e.id)}`);for(const s of Array.from(e.classList))Vo(s)||(t+=`.${Ho(s)}`);return t}filterNoise(e){return e.filter(t=>this.shouldInclude(t))}shouldInclude(e){const t=e.tagName.toLowerCase();return bg.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(!Vo(s))return!0}if(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))return!0;const t=e.id;return!!(t&&!Jt(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.tagName.toLowerCase(),a=s.extract(o);let c;if(si(l,a,o)){const u=o.parentElement;if(u){const h=Array.from(u.children).indexOf(o);h!==-1&&(c=h+1)}}return{tag:l,semantics:a,score:s.scoreElement(o),nthChild:c}}),degraded:!1}}}function Og(i){return i?i.trim().replace(/[\n\t\r]/g," ").replace(/\s+/g," "):""}const Dg={preserveQueryForAbsolute:!0,removeDynamicHashes:!0};function $g(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 kg(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&&$g(r)||(l+=`#${r}`)),l}function dc(i,e,t={}){if(!e)return e;const s=M(M({},Dg),t);return i==="href"||i==="src"?kg(e,s):e}const _g=["role","aria-label","aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-level","aria-posinset","aria-setsize","aria-haspopup"],Lg=["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"],Fg=["data-radix-","data-headlessui-","data-reach-","data-mui-","data-chakra-","data-mantine-","data-tw-"],zg=["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"],Bg=["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"],Wg=["data-category","data-action","data-label","data-value"],Ug=["id","name","type","placeholder","title","for","alt","href"],Vg=["disabled","checked","selected","hidden","readonly","required","value"],Hg=[/^radix-/,/^headlessui-/,/^mui-/,/:\w+:/];function Gg(i,e){return _g.includes(i)?!0:Lg.includes(i)||Pg.includes(i)||Fg.some(t=>i.startsWith(t))?!1:zg.includes(i)?!0:Bg.some(t=>i.startsWith(t))||Wg.includes(i)?!1:i.startsWith("data-")&&i.endsWith("-id")?!0:i==="id"?!Hg.some(t=>t.test(e)):Ug.includes(i)?!0:Vg.includes(i)?!1:!!i.startsWith("data-")}class Go{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&&!Jt(s)&&(t.id=s),e.classList.length>0){const o=Array.from(e.classList);if(this.includeUtilityClasses)t.classes=o;else{const{semantic:l}=Ag(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!!(cc.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 je[e]!==void 0?je[e]:e.startsWith("data-")?je["data-*"]:e.startsWith("aria-")?je["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)||!Gg(r,s.value)||uc.has(r)&&hc(s.value)||this.getAttributePriority(r)===0)continue;const n=r==="href"||r==="src"?dc(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=Og(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 jg{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 m=parseFloat((n=e.getAttribute("width"))!=null?n:"0"),p=parseFloat((o=e.getAttribute("height"))!=null?o:"0");m>0&&p>0&&s.push(`ratio=${(m/p).toFixed(2)}`)}break;case"ellipse":{const m=parseFloat((l=e.getAttribute("rx"))!=null?l:"0"),p=parseFloat((a=e.getAttribute("ry"))!=null?a:"0");m>0&&p>0&&s.push(`ratio=${(m/p).toFixed(2)}`)}break;case"line":{const m=parseFloat((c=e.getAttribute("x1"))!=null?c:"0"),p=parseFloat((u=e.getAttribute("y1"))!=null?u:"0"),y=parseFloat((h=e.getAttribute("x2"))!=null?h:"0"),f=parseFloat((d=e.getAttribute("y2"))!=null?d:"0"),g=Math.atan2(f-p,y-m);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 Yg(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*Ts.ANCHOR+s*Ts.PATH+r*Ts.TARGET+e*Ts.UNIQUENESS,o=i.anchor.degraded?.2:0;return Math.max(0,Math.min(1,n-o))}class Zg{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 Xg{constructor(e={}){var t,s;this.eidCache=new WeakMap,this.selectorResultCache=new Zg((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 ne(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 qg(i){return new Xg(i)}let Vi=null;function Jg(){return Vi||(Vi=qg()),Vi}function jo(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
|
-
3. You are working with a document node instead of an element`)}function
|
|
73
|
+
3. You are working with a document node instead of an element`)}function Kg(i,e){if(!e)return;const t=jo(i),s=e instanceof Document?e:jo(e);if(t!==s)throw new Error(`Cross-document operation detected: element and root are from different documents.
|
|
74
74
|
Common causes:
|
|
75
75
|
1. Working with iframe: pass iframe.contentDocument as root parameter
|
|
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 Fg(i,e={}){var Y,X,ee,T;var t;if(!i||!i.ownerDocument||!i.isConnected)return null;const s=A(A({},lg),e);if(s.root)try{Pg(i,s.root)}catch(W){return console.error("Cross-document generation detected:",W),null}const r=(Y=s.cache)!=null?Y:Lg(),n=r.getEID(i);if(n!==void 0)return n;if(i.tagName.toLowerCase()==="html"){const W=new Uo(s,r),z=Wg(i,s,W);return r.setEID(i,z),z}const o=new cg(s,r),l=new mg(s,r),a=new Uo(s,r),c=new Og,u=o.findAnchor(i);if(!u&&!s.fallbackToBody)return null;const h=(ee=(X=u==null?void 0:u.element)!=null?X:(t=i.ownerDocument)==null?void 0:t.body)!=null?ee: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 W=Array.from(m.children).indexOf(h);W!==-1&&(y=W+1)}const p=a.extract(h),g={tag:h.tagName.toLowerCase(),semantics:p,score:(T=u==null?void 0:u.score)!=null?T:Ae.DEGRADED_SCORE,degraded:d,nthChild:y},S=l.buildPath(h,i,a),C=a.extract(i);s.enableSvgFingerprint&&zg(i)&&(C.svg=c.fingerprint(i));const v=i.parentElement;let w;if(v){const W=Array.from(v.children).indexOf(i);W!==-1&&(w=W+1)}const N={tag:i.tagName.toLowerCase(),semantics:C,score:a.scoreElement(i),nthChild:w},x=[],R={onMultiple:"best-score",onMissing:"anchor-only",maxDepth:3},_=g.degraded||S.degraded,B=Bg(g.degraded,S),V={version:"1.0",anchor:g,path:S.path,target:N,constraints:x,fallback:R,meta:{confidence:0,generatedAt:new Date().toISOString(),generator:"dom-eid@1.0",source:s.source,degraded:_,degradationReason:B}};return V.meta.confidence=Dg(V),V.meta.confidence<s.confidenceThreshold?null:(r.setEID(i,V),V)}function zg(i){return i.namespaceURI==="http://www.w3.org/2000/svg"||i.tagName.toLowerCase()==="svg"||i instanceof SVGElement}function Bg(i,e){if(i&&e.degraded)return"anchor-and-path-degraded";if(i)return"no-semantic-anchor";if(e.degraded)return e.degradationReason}function Wg(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 lc={maxClasses:2,maxAttributes:5,includeText:!0,maxTextLength:50,simplifyTarget:!0,includeConstraints:!0};function Ho(i){return i==="id"?101:je[i]!==void 0?je[i]:i.startsWith("data-")?je["data-*"]:i.startsWith("aria-")?je["aria-*"]:0}function Ug(i){return["id","data-testid","data-qa","data-cy","href","text","role"].includes(i)}function Vg(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 Hg(i,e){const t=A(A({},lc),e),s=`v${i.version}`,r=Ui(i.anchor,!1,t),n=i.path.length>0?i.path.map(a=>Ui(a,!1,t)).join(" > ")+" > ":"",o=Ui(i.target,!0,t),l=t.includeConstraints?Gg(i):"";return`${s}: ${r} :: ${n}${o}${l}`}function Ui(i,e=!1,t=lc){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=Ho(h),m=h==="href"||h==="src"?ac(h,d):d;return{name:h,value:m,priority:f}}).filter(h=>h.name!=="id"&&h.name!=="class"&&rc.has(h.name)||nc.has(h.name)&&oc(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}="${Nr(d)}"`);if(t.includeText&&r.text&&!Vg(r.text.normalized)){const h=r.text.normalized;h.length>0&&h.length<=t.maxTextLength&&o.push(`text="${Nr(h)}"`)}let u=o;if(o.length>0&&(e&&t.simplifyTarget&&r.id&&(u=o.filter(h=>{const d=h.split("=")[0];return Ho(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=fg(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(Ug);e&&t.simplifyTarget&&h||(n+=`#${i.nthChild}`)}return n}function Gg(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=Nr(String(t.params.reference));e.push(`text="${s}"`)}break}return e.length===0?"":` {${e.join(",")}}`}function Nr(i){return i.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/>/g,"\\>").replace(/:/g,"\\:")}function jg(i,e,t){const s=Fg(i,e);return s?Hg(s,t):null}const Ot={maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:0,fallbackToBody:!0};function Yg(i){var e,t,s,r;return i===!1?null:i===!0||i===void 0?A({},Ot):{maxPathDepth:(e=i.maxPathDepth)!=null?e:Ot.maxPathDepth,enableSvgFingerprint:(t=i.enableSvgFingerprint)!=null?t:Ot.enableSvgFingerprint,confidenceThreshold:(s=i.confidenceThreshold)!=null?s:Ot.confidenceThreshold,fallbackToBody:(r=i.fallbackToBody)!=null?r:Ot.fallbackToBody}}function Go(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:bi(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=jg(o,c);if(u)return l?l.selector=u:r&&(r.selector=u),u}catch(u){}return a!=null?a:n}function jo(i){return"__ln"in i}class Zg{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&&jo(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&&jo(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 Yo=(i,e)=>`${i}@${e}`,Xg=new Set(["id","class","name","role","title","alt","placeholder","for","type"]);function Jg(i){const e=i.toLowerCase();return Xg.has(e)||e.startsWith("data-")||e.startsWith("aria-")}class qg{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 Zg,r=a=>{let c=a,u=Ut;for(;u===Ut;)c=c&&c.nextSibling,u=c&&this.mirror.getId(c);return u},n=a=>{const c=k.parentNode(a);if(!c||!Sn(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=_t(c)?this.mirror.getId(wn(a)):this.mirror.getId(c),d=r(a);if(h===-1||d===-1)return s.addNode(a);const f=ct(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=>{ft(m,this.mirror)&&this.iframeManager.addIframe(m),yn(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),Ge(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)!Xo(this.droppedSet,a)&&!Zo(this.removesSubTreeCache,a,this.mirror)||Xo(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:Go(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:Go(a.node,this.mirror,this.selectorOptions,{force:Object.keys(c).some(Jg)})}}).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=zt({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Bt(e),value:s,maskInputFn:this.maskInputFn})}),b(this,"processMutation",e=>{if(!zs(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=k.textContent(e.target);!de(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:xa(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,bi(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=kr(t),u=Zi(s,this.excludeAttribute);if(r===null&&!t.hasAttribute(s)&&e.oldValue!==null&&(o===""||o===null||typeof o=="undefined")){console.debug(`[${he()}] [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(Zi(s,this.excludeAttribute)){console.debug(`[${he()}] [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=Bt(t);r=zt({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:f,value:r,maskInputFn:this.maskInputFn})}if(de(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"),!Ca(t.tagName,s))if(d.attributes[s]=Sa(this.doc,Ze(t.tagName),Ze(s),r),s!=="class"&&(e.oldValue===null||r===""||r!==e.oldValue)&&console.debug(`[${he()}] [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(de(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=_t(e.target)?this.mirror.getId(k.host(e.target)):this.mirror.getId(e.target);de(e.target,this.blockClass,this.blockSelector,!1)||zs(t,this.mirror,this.slimDOMOptions)||!Ql(t,this.mirror)||(this.addedSet.has(t)?(Rr(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&s===-1||pn(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Yo(s,r)]?Rr(this.movedSet,t):(this.removes.push({parentId:r,id:s,isShadow:_t(e.target)&&Lt(e.target)?!0:void 0}),Kg(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(zs(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[Yo(this.mirror.getId(e),s)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);de(e,this.blockClass,this.blockSelector,!1)||(k.childNodes(e).forEach(s=>this.genAdds(s)),Ge(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 Rr(i,e){i.delete(e),k.childNodes(e).forEach(t=>Rr(i,t))}function Kg(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:Qg(i,e)}function Qg(i,e,t){const s=k.parentNode(e);return s?i.has(s):!1}function Xo(i,e){return i.size===0?!1:cc(i,e)}function cc(i,e){const t=k.parentNode(e);return t?i.has(t)?!0:cc(i,t):!1}let Ft;function ey(i){Ft=i}function ty(){Ft=void 0}const F=i=>Ft?(...t)=>{try{return i(...t)}catch(s){if(Ft&&Ft(s)===!0)return;throw s}}:i,ve=[];function Ct(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 uc(i,e){const t=new qg;ve.push(t),t.init(i);const s=new(un())(F(t.processMutations.bind(t)));return s.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function sy({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=St(F(h=>{const d=Date.now()-l;i(o.map(f=>(f.timeOffset-=d,f)),h),o=[],l=null}),n),c=F(St(F(h=>{const d=Ct(h),{clientX:f,clientY:m}=ei(h)?h.changedTouches[0]:h;l||(l=he()),o.push({x:f,y:m,id:s.getId(d),timeOffset:he()-l}),a(typeof DragEvent!="undefined"&&h instanceof DragEvent?E.Drag:h instanceof MouseEvent?E.MouseMove:E.TouchMove)}),r,{trailing:!1})),u=[oe("mousemove",c,t),oe("touchmove",c,t),oe("drag",c,t)];return F(()=>{u.forEach(h=>h())})}function iy({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=Ct(h);if(de(d,s,r,!0))return;let f=null,m=u;if("pointerType"in h){switch(h.pointerType){case"mouse":f=De.Mouse;break;case"touch":f=De.Touch;break;case"pen":f=De.Pen;break}f===De.Touch?G[u]===G.MouseDown?m="TouchStart":G[u]===G.MouseUp&&(m="TouchEnd"):De.Pen}else ei(h)&&(f=De.Touch);f!==null?(a=f,(m.startsWith("Touch")&&f===De.Touch||m.startsWith("Mouse")&&f===De.Mouse)&&(f=null)):G[u]===G.Click&&(f=a,a=null);const y=ei(h)?h.changedTouches[0]:h;if(!y)return;const p=t.getId(d),{clientX:g,clientY:S}=y;F(i)(A({type:G[m],id:p,x:g,y:S},f!==null&&{pointerType:f}))};return Object.keys(G).filter(u=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&o[u]!==!1).forEach(u=>{let h=Ze(u);const d=c(u);if(window.PointerEvent)switch(G[u]){case G.MouseDown:case G.MouseUp:h=h.replace("mouse","pointer");break;case G.TouchStart:case G.TouchEnd:return}l.push(oe(h,d,e))}),F(()=>{l.forEach(u=>u())})}function hc({scrollCb:i,doc:e,mirror:t,blockClass:s,blockSelector:r,sampling:n}){const o=F(St(F(l=>{const a=Ct(l);if(!a||de(a,s,r,!0))return;const c=t.getId(a);if(a===e&&e.defaultView){const u=hn(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 oe("scroll",o,e)}function ry({viewportResizeCb:i},{win:e}){let t=-1,s=-1;const r=F(St(F(()=>{const n=dn(),o=fn();(t!==n||s!==o)&&(i({width:Number(o),height:Number(n)}),t=n,s=o)}),200));return oe("resize",r,e)}function ny({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=F(h=>{const d=s.location.href;d!==r&&(i({href:d,oldHref:r,navigationType:h}),r=d)}),l=Le(s.history,"pushState",function(h){return function(...d){const f=h.apply(this,d);return o("pushState"),f}});n.push(l);const a=Le(s.history,"replaceState",function(h){return function(...d){const f=h.apply(this,d);return o("replaceState"),f}});if(n.push(a),n.push(oe("popstate",()=>o("popstate"),s)),n.push(oe("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 F(()=>{n.forEach(h=>h())})}const Bs=["INPUT","TEXTAREA","SELECT"],ti=new WeakMap,oy=["Enter","Tab","Escape","ArrowDown","ArrowUp","Delete"],Jo=new WeakMap;function ay({inputCb:i,doc:e,mirror:t,blockClass:s,blockSelector:r,ignoreClass:n,ignoreSelector:o,maskInputOptions:l,maskInputFn:a,sampling:c,userTriggeredOnInput:u,trustSyntheticInput:h}){function d(v){let w=Ct(v);const N=v.isTrusted,x=w&&w.tagName;if(w&&x==="OPTION"&&(w=k.parentElement(w)),!w||!x||Bs.indexOf(x)<0||de(w,s,r,!0)||w.classList.contains(n)||o&&w.matches(o))return;let R=w.value,_=!1;const B=Bt(w)||"";B==="radio"||B==="checkbox"?_=w.checked:(l[x.toLowerCase()]||l[B])&&(R=zt({element:w,maskInputOptions:l,tagName:x,type:B,value:R,maskInputFn:a})),f(w,u?{text:R,isChecked:_,userTriggered:N}:{text:R,isChecked:_});const V=w.name;B==="radio"&&V&&_&&e.querySelectorAll(`input[type="radio"][name="${V}"]`).forEach(Y=>{if(Y!==w){const X=Y.value;f(Y,u?{text:X,isChecked:!_,userTriggered:!1}:{text:X,isChecked:!_})}})}function f(v,w){const N=ti.get(v),x=v;if(h){const R=!w.userTriggered&&x.value===""&&!w.isChecked&&!N,_=x.tagName==="SELECT"&&!w.userTriggered&&!N&&x.selectedIndex===0;if(R||_){console.debug(`[${he()}] [rrweb:record/observer] phantom input ignored (trust mode)`,{node:k.describeNode(x),tag:x.tagName,value:x.value,isInitialEmpty:R,isSelectDefaultSelection:_});return}}else{const R=x.hasAttribute("placeholder"),_=x.value==="",B=typeof x.defaultValue=="string"?x.defaultValue==="":!0,V=!w.userTriggered,Y=!N||N.text==="",X=R&&_&&B&&Y&&V&&!w.isChecked&&x.type!=="hidden"&&Bs.includes(x.tagName),ee=x.tagName==="INPUT"&&x.type==="text"&&!w.userTriggered&&w.text===x.defaultValue&&!N&&x.hasAttribute("placeholder"),T=!w.userTriggered&&x.value===x.defaultValue&&!N&&x.hasAttribute("placeholder")&&!w.isChecked&&x.type!=="hidden"&&Bs.includes(x.tagName),W=x.type==="checkbox"&&!w.userTriggered&&!w.isChecked&&!N,z=x.type==="radio"&&!w.userTriggered&&!w.isChecked&&!N;if(X||ee||T||W||z){console.debug(`[${he()}] [rrweb:record/observer] \u26D4 phantom input ignored`,{node:k.describeNode(x),tag:x.tagName,nodeType:x.nodeType,attribute:x.attributes,value:x.value,isLikelyPhantom:X,isRenderDrivenTextInput:ee,isValueFromDefault:T,isPhantomCheckbox:W,isPhantomRadio:z});return}}if(!N||N.text!==w.text||N.isChecked!==w.isChecked){ti.set(v,w);const R=t.getId(v);F(i)(ne(A({},w),{id:R}))}}const y=(c.input==="last"?["change"]:["input","change"]).map(v=>oe(v,F(d),e)),p=v=>{const w=Ct(v);if(!w||!w.tagName)return;if(c.input==="all"){d(v);return}const N=w.tagName,x=v.key,R=oy.includes(x),_=N==="TEXTAREA",B=e.activeElement===w,V=w.value,Y=Jo.get(w);if(Jo.set(w,V),!B){d(v);return}if(R){if(!_){d(v);return}let X=Y!=null?Y:"",ee=0;const T=2,W=()=>{const z=w.value,K=e.activeElement===w,ce=z!==X;if(!K){d(v);return}if(ce)ee=0,X=z;else if(ee++,ee>=T){d(v);return}requestAnimationFrame(W)};requestAnimationFrame(W);return}};y.push(oe("keydown",F(p),e));const g=e.defaultView;if(!g)return()=>{y.forEach(v=>v())};const S=g.Object.getOwnPropertyDescriptor(g.HTMLInputElement.prototype,"value"),C=[[g.HTMLInputElement.prototype,"value"],[g.HTMLInputElement.prototype,"checked"],[g.HTMLSelectElement.prototype,"value"],[g.HTMLTextAreaElement.prototype,"value"],[g.HTMLSelectElement.prototype,"selectedIndex"],[g.HTMLOptionElement.prototype,"selected"]];return S&&S.set&&y.push(...C.map(v=>ss(v[0],v[1],{set(){F(d)({target:this,isTrusted:!1})}},!1,g))),F(()=>{y.forEach(v=>v())})}function si(i){const e=[];function t(s,r){if(Os("CSSGroupingRule")&&s.parentRule instanceof CSSGroupingRule||Os("CSSMediaRule")&&s.parentRule instanceof CSSMediaRule||Os("CSSSupportsRule")&&s.parentRule instanceof CSSSupportsRule||Os("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 Ue(i,e,t){let s,r;return i?(i.ownerNode?s=e.getId(i.ownerNode):r=t.getId(i),{styleId:r,id:s}):{}}function ly({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:F((u,h,d)=>{const[f,m]=d,{id:y,styleId:p}=Ue(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:F((u,h,d)=>{const[f]=d,{id:m,styleId:y}=Ue(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:F((u,h,d)=>{const[f]=d,{id:m,styleId:y}=Ue(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:F((u,h,d)=>{const[f]=d,{id:m,styleId:y}=Ue(h,e,t.styleMirror);return(m&&m!==-1||y&&y!==-1)&&i({id:m,styleId:y,replaceSync:f}),u.apply(h,d)})}));const a={};Ds("CSSGroupingRule")?a.CSSGroupingRule=s.CSSGroupingRule:(Ds("CSSMediaRule")&&(a.CSSMediaRule=s.CSSMediaRule),Ds("CSSConditionRule")&&(a.CSSConditionRule=s.CSSConditionRule),Ds("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:F((d,f,m)=>{const[y,p]=m,{id:g,styleId:S}=Ue(f.parentStyleSheet,e,t.styleMirror);return(g&&g!==-1||S&&S!==-1)&&i({id:g,styleId:S,adds:[{rule:y,index:[...si(f),p||0]}]}),d.apply(f,m)})}),h.prototype.deleteRule=new Proxy(c[u].deleteRule,{apply:F((d,f,m)=>{const[y]=m,{id:p,styleId:g}=Ue(f.parentStyleSheet,e,t.styleMirror);return(p&&p!==-1||g&&g!==-1)&&i({id:p,styleId:g,removes:[{index:[...si(f),y]}]}),d.apply(f,m)})})}),F(()=>{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 dc({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}}),F(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function cy({styleDeclarationCb:i,mirror:e,ignoreCSSAttributes:t,stylesheetManager:s},{win:r}){const n=r.CSSStyleDeclaration.prototype.setProperty;r.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:F((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}=Ue((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:si(a.parentRule)}),l.apply(a,c)})});const o=r.CSSStyleDeclaration.prototype.removeProperty;return r.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:F((l,a,c)=>{var u;const[h]=c;if(t.has(h))return o.apply(a,[h]);const{id:d,styleId:f}=Ue((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:si(a.parentRule)}),l.apply(a,c)})}),F(()=>{r.CSSStyleDeclaration.prototype.setProperty=n,r.CSSStyleDeclaration.prototype.removeProperty=o})}function uy({mediaInteractionCb:i,blockClass:e,blockSelector:t,mirror:s,sampling:r,doc:n}){const o=F(a=>St(F(c=>{const u=Ct(c);if(!u||de(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=[oe("play",o(Ve.Play),n),oe("pause",o(Ve.Pause),n),oe("seeked",o(Ve.Seeked),n),oe("volumechange",o(Ve.VolumeChange),n),oe("ratechange",o(Ve.RateChange),n)];return F(()=>{l.forEach(a=>a())})}function hy({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=Le(e.fonts,"add",function(l){return function(a){return setTimeout(F(()=>{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),F(()=>{s.forEach(l=>l())})}function dy(i){const{doc:e,mirror:t,blockClass:s,blockSelector:r,selectionCb:n}=i;let o=!0;const l=F(()=>{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;de(f,s,r,!0)||de(y,s,r,!0)||c.push({start:t.getId(f),startOffset:m,end:t.getId(y),endOffset:p})}n({ranges:c})});return l(),oe("selectionchange",l)}function fy({doc:i,customElementCb:e}){const t=i.defaultView;return!t||!t.customElements?()=>{}:Le(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 py(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 my(i,e={}){const t=i.doc.defaultView;if(!t)return()=>{};py(i,e);let s;i.recordDOM&&(s=uc(i,i.doc));const r=sy(i),n=iy(i),o=hc(i),l=ry(i,{win:t}),a=ny(i),c=ay(i),u=uy(i);let h=()=>{},d=()=>{},f=()=>{},m=()=>{};i.recordDOM&&(h=ly(i,{win:t}),d=dc(i,i.doc),f=cy(i,{win:t}),i.collectFonts&&(m=hy(i)));const y=dy(i),p=fy(i),g=[];for(const S of i.plugins)g.push(S.observer(S.callback,t,S.options));return F(()=>{var S;ve.forEach(C=>C.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(C=>C())})}function Os(i){return typeof window[i]!="undefined"}function Ds(i){return!!(typeof window[i]!="undefined"&&window[i].prototype&&"insertRule"in window[i].prototype&&"deleteRule"in window[i].prototype)}class qo{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 gy{constructor(e){b(this,"iframes",new WeakMap),b(this,"crossOriginIframeMap",new WeakMap),b(this,"crossOriginIframeMirror",new qo(wa)),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 qo(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!==$e.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(s=>{this.patchRootIdOnNode(s,t)})}}class yy{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(!Lt(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const s=uc(ne(A({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>s.disconnect()),this.restoreHandlers.push(hc(ne(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(dc({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(Le(e.prototype,"attachShadow",function(r){return function(n){const o=r.call(this,n),l=k.shadowRoot(this);return l&&Sn(this)&&s.addShadowRoot(l,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var ht="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Dt=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var $s=0;$s<ht.length;$s++)Dt[ht.charCodeAt($s)]=$s;var by=function(i){var e=new Uint8Array(i),t,s=e.length,r="";for(t=0;t<s;t+=3)r+=ht[e[t]>>2],r+=ht[(e[t]&3)<<4|e[t+1]>>4],r+=ht[(e[t+1]&15)<<2|e[t+2]>>6],r+=ht[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},vy=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=Dt[i.charCodeAt(s)],o=Dt[i.charCodeAt(s+1)],l=Dt[i.charCodeAt(s+2)],a=Dt[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 Ko=new Map;function wy(i,e){let t=Ko.get(i);return t||(t=new Map,Ko.set(i,t)),t.has(e)||t.set(e,[]),t.get(e)}const fc=(i,e,t)=>{if(!i||!(mc(i,e)||typeof i=="object"))return;const s=i.constructor.name,r=wy(t,s);let n=r.indexOf(i);return n===-1&&(n=r.length,r.push(i)),n};function Ws(i,e,t){if(i instanceof Array)return i.map(s=>Ws(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=by(i);return{rr_type:s,base64:r}}else{if(i instanceof DataView)return{rr_type:i.constructor.name,args:[Ws(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:[Ws(i.data,e,t),i.width,i.height]};if(mc(i,e)||typeof i=="object"){const s=i.constructor.name,r=fc(i,e,t);return{rr_type:s,index:r}}}}return i}const pc=(i,e,t)=>i.map(s=>Ws(s,e,t)),mc=(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 Sy(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=Le(e.CanvasRenderingContext2D.prototype,o,function(a){return function(...c){return de(this.canvas,t,s,!0)||setTimeout(()=>{const u=pc(c,e,this);i(this.canvas,{type:Pe["2D"],property:o,args:u})},0),a.apply(this,c)}});r.push(l)}catch(l){const a=ss(e.CanvasRenderingContext2D.prototype,o,{set(c){i(this.canvas,{type:Pe["2D"],property:o,args:[c],setter:!0})}});r.push(a)}return()=>{r.forEach(o=>o())}}function Cy(i){return i==="experimental-webgl"?"webgl":i}function Qo(i,e,t,s){const r=[];try{const n=Le(i.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...a){if(!de(this,e,t,!0)){const c=Cy(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 ea(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=Le(i,a,function(u){return function(...h){const d=u.apply(this,h);if(fc(d,n,this),"tagName"in this.canvas&&!de(this.canvas,s,r,!0)){const f=pc(h,n,this),m={type:e,property:a,args:f};t(this.canvas,m)}return d}});o.push(c)}catch(c){const u=ss(i,a,{set(h){t(this.canvas,{type:e,property:a,args:[h],setter:!0})}});o.push(u)}return o}function xy(i,e,t,s){const r=[];return r.push(...ea(e.WebGLRenderingContext.prototype,Pe.WebGL,i,t,s,e)),typeof e.WebGL2RenderingContext!="undefined"&&r.push(...ea(e.WebGL2RenderingContext.prototype,Pe.WebGL2,i,t,s,e)),()=>{r.forEach(n=>n())}}const gc="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Ey=i=>Uint8Array.from(atob(i),e=>e.charCodeAt(0)),ta=typeof self!="undefined"&&self.Blob&&new Blob([Ey(gc)],{type:"text/javascript;charset=utf-8"});function My(i){let e;try{if(e=ta&&(self.URL||self.webkitURL).createObjectURL(ta),!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,"+gc,{name:i==null?void 0:i.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}class Ay{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=Qo(t,s,r,!0),l=new Map,a=new My;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:C}=m.data;this.mutationCb({id:y,type:Pe["2D"],commands:[{property:"clearRect",args:[0,0,S,C]},{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=>{de(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 C=y.getContext(y.__context);((p=C==null?void 0:C.getContextAttributes())==null?void 0:p.preserveDrawingBuffer)===!1&&C.clear(C.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=Qo(e,t,s,!1),n=Sy(this.processMutation.bind(this),e,t,s),o=xy(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 it(c,["type"])}),{type:n}=s[0];this.mutationCb({id:t,type:n,commands:r}),this.pendingCanvasMutations.delete(e)}}function sa(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=Iy((f=t==null?void 0:t.rootMargin)!=null?f:"0px"),l=new Map,a=Ny(s),c=Ry(a,o);for(const p of i){const g=p.getBoundingClientRect();let S=Dy(),C=0;g.width>0&&g.height>0&&(S=Ty(g,c),C=Oy(g,S),C=Math.round(C*100)/100);const v=$y(p),w=(m=e.get(p))!=null?m:null,N=(y=w==null?void 0:w.intersectionRatio)!=null?y:0,x=C,R=(w==null?void 0:w.isStyleVisible)&&N>r,_=v&&x>r;!w||R!==_||R!==_&&Math.abs(x-N)>n?l.set(p,{target:p,isVisible:_,isStyleVisible:v,intersectionRatio:x,intersectionRect:S,oldValue:w}):l.set(p,w)}return l}function Iy(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 Ny(i){return i?i.getBoundingClientRect():new DOMRect(0,0,window.innerWidth,window.innerHeight)}function Ry(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 Ty(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 Oy(i,e){const t=i.width*i.height,s=e.width*e.height;return t>0?s/t:0}function Dy(){return{top:0,left:0,right:0,bottom:0,width:0,height:0}}function $y(i){const e=getComputedStyle(i);return e&&e.display!=="none"&&e.visibility!=="hidden"&&parseFloat(e.opacity||"1")>0}class ky{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=sa(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=sa(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 _y=150,Ly=5e3,Py=100;class Fy{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=F(r),this.settleTimeout=(n=s.settleTimeout)!=null?n:_y,this.maxWait=(o=s.maxWait)!=null?o:Ly,this.debounceMs=(l=s.debounce)!=null?l:Py}handleNavigation(e){this.disabled||this.locked||(this.pendingNavigation?(this.cancelTimers(),this.disconnectSettlingObserver(),this.pendingNavigation=null,this.onSnapshot(!0)):(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=un();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}),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 zy{constructor(e){b(this,"trackedLinkElements",new WeakSet),b(this,"mutationCb"),b(this,"adoptedStyleSheetCb"),b(this,"styleMirror",new vn),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:fa(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 By{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 Wy="3.10.0-alpha.1";let se,We,Vi,pt=!1;const ii=[];let $t;try{if(Array.from([1],i=>i*2)[0]!==2){const i=document.createElement("iframe");document.body.appendChild(i),Array.from=((Ln=i.contentWindow)==null?void 0:Ln.Array.from)||Array.from,document.body.removeChild(i)}}catch(i){console.debug("Unable to override Array.from",i)}const ge=pa();function pe(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:C,packFn:v,sampling:w={},dataURLOptions:N={},mousemoveWait:x,recordDOM:R=!0,recordCanvas:_=!1,recordCrossOriginIframes:B=!1,recordAfter:V=i.recordAfter==="DOMContentLoaded"?i.recordAfter:"load",flushCustomEvent:Y=i.flushCustomEvent!==void 0?i.flushCustomEvent:"after",userTriggeredOnInput:X=!1,trustSyntheticInput:ee=!1,collectFonts:T=!1,inlineImages:W=!1,plugins:z,keepIframeSrcFn:K=()=>!1,ignoreCSSAttributes:ce=new Set([]),selector:Ne,errorHandler:Fe}=i;ey(Fe);const is=B?window.parent===window:!0;let Et=!1;if(!is)try{window.parent.document&&(Et=!1)}catch(O){Et=!0}if(is&&!e)throw new Error("emit function is required");if(!is&&!Et)return()=>{};x!==void 0&&w.mousemove===void 0&&(w.mousemove=x),ge.reset();const vi=u===void 0?/.^/:u,tt=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},wi=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||{},En=Yg(Ne);mn();let Mn,Si=0,rs=0,An=0,ze=!1,me=null,st=null,In=0;const xc=(w.scroll||100)*2;let Nn=0;const Ec=500;let Ci=!1;const Rn=O=>{for(const ae of z||[])ae.eventProcessor&&(O=ae.eventProcessor(O));return v&&!Et&&(O=v(O)),O},ns=()=>{me=null,ze=!1,st=null,fe==null||fe.cancelPending(),We(!0),ve.forEach(O=>{O.resetBuffers(),O.unsetFrozen()}),ue&&ue.unsetFrozen(),fe&&fe.unsetFrozen()};se=(O,ae)=>{var Z;const j=O;if(j.timestamp=he(),j.checkoutId=An,(Z=ve[0])!=null&&Z.isFrozen()&&!ze&&j.type!==I.FullSnapshot&&!(j.type===I.IncrementalSnapshot&&j.data.source===E.Mutation)&&(ve.forEach(te=>te.unfreeze()),ue==null||ue.unfreeze(),fe==null||fe.unfreeze()),is)e==null||e(Rn(j),ae);else if(Et){const te={type:"rrweb",event:Rn(j),isCheckout:ae};window.parent.postMessage(te,"*")}if(j.type===I.FullSnapshot)Mn=j,Si=0,rs=0;else if(j.type===I.IncrementalSnapshot){if(j.data.source===E.Mutation&&j.data.isAttachIframe)return;if(j.data.source!==E.Visibility){Si++;const te=s&&Si>=s,P=t&&j.timestamp-Mn.timestamp>t;if(te||P)if(n){ze||(ze=!0,st=he(),ve.forEach(Be=>Be.freeze()),ue==null||ue.freeze()),me&&clearTimeout(me);const be=he()-st,Re=n*3;be>=Re?ns():me=setTimeout(()=>ns(),n)}else We(!0)}}};const os=O=>{var te,P;var ae,Z;((te=(ae=O.adds)==null?void 0:ae.length)!=null?te:0)+((P=(Z=O.removes)==null?void 0:Z.length)!=null?P:0)>10&&(Nn=he(),Ci=!1),se({type:I.IncrementalSnapshot,data:A({source:E.Mutation},O)})},Mc=O=>{se({type:I.IncrementalSnapshot,data:A({source:E.Visibility},O)})},Tn=O=>{In=he(),se({type:I.IncrementalSnapshot,data:A({source:E.Scroll},O)})},On=O=>se({type:I.IncrementalSnapshot,data:A({source:E.CanvasMutation},O)}),Ac=O=>se({type:I.IncrementalSnapshot,data:A({source:E.AdoptedStyleSheet},O)}),qe=new zy({mutationCb:os,adoptedStyleSheetCb:Ac}),Ke=new gy({mirror:ge,mutationCb:os,stylesheetManager:qe,recordCrossOriginIframes:B,wrappedEmit:se});for(const O of z||[])O.getMirror&&O.getMirror({nodeMirror:ge,crossOriginIframeMirror:Ke.crossOriginIframeMirror,crossOriginIframeStyleMirror:Ke.crossOriginIframeStyleMirror});const xi=new By;Vi=new Ay({recordCanvas:_,mutationCb:On,win:window,blockClass:o,blockSelector:l,mirror:ge,sampling:w.canvas,dataURLOptions:N});const as=new yy({mutationCb:os,scrollCb:Tn,bypassOptions:{blockClass:o,blockSelector:l,maskTextClass:h,maskTextSelector:d,excludeAttribute:vi,inlineStylesheet:f,maskInputOptions:tt,dataURLOptions:N,maskTextFn:S,maskInputFn:g,recordCanvas:_,inlineImages:W,sampling:w,slimDOMOptions:wi,iframeManager:Ke,stylesheetManager:qe,canvasManager:Vi,keepIframeSrcFn:K,processedNodeManager:xi,selectorOptions:En},mirror:ge}),Ic=R&&(r!=null||(w==null?void 0:w.visibility)!==void 0&&(w==null?void 0:w.visibility)!==!1);let ue;if(Ic){const O=typeof(w==null?void 0:w.visibility)=="object"&&(w==null?void 0:w.visibility)!==null?w.visibility:{},ae=O.recordVisibility===!0;ue=new ky({doc:document,mirror:ge,sampling:O,mutationCb:ae?Mc:()=>{},notifyActivity:r!=null?Z=>{const j=he(),te=j-In<xc,P=j-Nn<Ec;if(!(te&&!P)&&!(P&&Ci)&&(rs+=Z,rs>=r))if(rs=0,Ci=!0,n){ze||(ze=!0,st=he(),ve.forEach(Be=>Be.freeze()),ue==null||ue.freeze()),me&&clearTimeout(me);const be=he()-st,Re=n*3;be>=Re?ns():me=setTimeout(()=>ns(),n)}else We(!0)}:void 0})}We=(O=!1)=>{if(!R)return;An++,se({type:I.Meta,data:{href:window.location.href,width:fn(),height:dn()}},O),qe.reset(),as.init(),ve.forEach(Z=>Z.lock()),ue==null||ue.lock(),fe==null||fe.lock();const ae=Sh(document,{mirror:ge,blockClass:o,blockSelector:l,maskTextClass:h,maskTextSelector:d,excludeAttribute:vi,inlineStylesheet:f,maskAllInputs:tt,maskTextFn:S,maskInputFn:g,slimDOM:wi,dataURLOptions:N,recordCanvas:_,inlineImages:W,onSerialize:Z=>{ft(Z,ge)&&Ke.addIframe(Z),yn(Z,ge)&&qe.trackLinkElement(Z),Ge(Z)&&as.addShadowRoot(k.shadowRoot(Z),document)},onIframeLoad:(Z,j)=>{Ke.attachIframe(Z,j),as.observeAttachShadow(Z)},onStylesheetLoad:(Z,j)=>{qe.attachLinkElement(Z,j)},keepIframeSrcFn:K,selector:Ne});if(!ae)return console.warn("Failed to snapshot the document");se({type:I.FullSnapshot,data:{node:ae,initialOffset:hn(window)}},O),ve.forEach(Z=>Z.unlock()),ue==null||ue.unlock(),fe==null||fe.unlock(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&qe.adoptStyleSheets(document.adoptedStyleSheets,ge.getId(document))},$t=()=>{for(const O of ii)se(O);ii.length=0};let fe;const Ei=w.navigation;if(Ei!==!1){const O=typeof Ei=="object"?Ei:{};fe=new Fy({doc:document,config:O,onSnapshot:ae=>{ze&&(me&&(clearTimeout(me),me=null),ze=!1,st=null,ve.forEach(Z=>{Z.resetBuffers(),Z.unsetFrozen()}),ue==null||ue.unsetFrozen()),We(ae)}})}try{const O=[],ae=j=>{var te;return F(my)({mutationCb:os,mousemoveCb:(P,be)=>se({type:I.IncrementalSnapshot,data:{source:be,positions:P}}),mouseInteractionCb:P=>se({type:I.IncrementalSnapshot,data:A({source:E.MouseInteraction},P)}),scrollCb:Tn,viewportResizeCb:P=>se({type:I.IncrementalSnapshot,data:A({source:E.ViewportResize},P)}),navigationCb:P=>{fe?fe.handleNavigation(P):We(!0)},inputCb:P=>se({type:I.IncrementalSnapshot,data:A({source:E.Input},P)}),mediaInteractionCb:P=>se({type:I.IncrementalSnapshot,data:A({source:E.MediaInteraction},P)}),styleSheetRuleCb:P=>se({type:I.IncrementalSnapshot,data:A({source:E.StyleSheetRule},P)}),styleDeclarationCb:P=>se({type:I.IncrementalSnapshot,data:A({source:E.StyleDeclaration},P)}),canvasMutationCb:On,visibilityManager:ue,fontCb:P=>se({type:I.IncrementalSnapshot,data:A({source:E.Font},P)}),selectionCb:P=>{se({type:I.IncrementalSnapshot,data:A({source:E.Selection},P)})},customElementCb:P=>{se({type:I.IncrementalSnapshot,data:A({source:E.CustomElement},P)})},blockClass:o,ignoreClass:a,ignoreSelector:c,maskTextClass:h,maskTextSelector:d,excludeAttribute:vi,maskInputOptions:tt,inlineStylesheet:f,sampling:w,recordDOM:R,recordCanvas:_,inlineImages:W,userTriggeredOnInput:X,trustSyntheticInput:ee,collectFonts:T,doc:j,maskInputFn:g,maskTextFn:S,keepIframeSrcFn:K,blockSelector:l,slimDOMOptions:wi,dataURLOptions:N,selectorOptions:En,mirror:ge,iframeManager:Ke,stylesheetManager:qe,shadowDomManager:as,processedNodeManager:xi,canvasManager:Vi,ignoreCSSAttributes:ce,plugins:((te=z==null?void 0:z.filter(P=>P.observer))==null?void 0:te.map(P=>({observer:P.observer,options:P.options,callback:be=>se({type:I.Plugin,data:{plugin:P.name,payload:be}})})))||[]},C)};Ke.addLoadListener(j=>{try{O.push(ae(j.contentDocument))}catch(te){console.warn(te)}});const Z=()=>{Y==="before"&&$t(),We(),O.push(ae(document)),pt=!0,Y==="after"&&$t()};return document.readyState==="interactive"||document.readyState==="complete"?Z():(O.push(oe("DOMContentLoaded",()=>{se({type:I.DomContentLoaded,data:{}}),V==="DOMContentLoaded"&&Z()})),O.push(oe("load",()=>{se({type:I.Load,data:{}}),V==="load"&&Z()},window))),()=>{if(pt){const j=document.activeElement;if(j&&Bs.includes(j.tagName)){const te=j,P=ge.getId(te);if(P!==-1){const be=ti.get(te);let Re=te.value,Be=!1;const ls=Bt(te)||"";if(ls==="radio"||ls==="checkbox"?Be=te.checked:(tt[te.tagName.toLowerCase()]||tt[ls])&&(Re=zt({element:te,maskInputOptions:tt,tagName:te.tagName,type:ls,value:Re,maskInputFn:g})),!be||be.text!==Re||be.isChecked!==Be){const Dn=X?{text:Re,isChecked:Be,userTriggered:!1}:{text:Re,isChecked:Be};ti.set(te,Dn),se({type:I.IncrementalSnapshot,data:ne(A({source:E.Input},Dn),{id:P})})}}}}me&&(clearTimeout(me),me=null),$t(),O.forEach(j=>j()),fe==null||fe.destroy(),xi.destroy(),pt=!1,ty()}}catch(O){console.warn(O)}}pe.getVersion=()=>Wy;pe.isRecording=()=>pt;pe.flushCustomEventQueue=()=>{console.warn(`[rrweb] CustomEvent flushing: ${ii.length} events`),$t()};pe.addCustomEvent=(i,e)=>{const t={type:I.Custom,data:{tag:i,payload:e}};if(!pt){console.warn(`[rrweb] CustomEvent buffered before/after recording start: ${i}`),ii.push(t);return}se(t)};pe.freezePage=()=>{ve.forEach(i=>i.freeze())};pe.takeFullSnapshot=i=>{if(!pt)throw new Error("please take full snapshot after start recording");We(i)};pe.mirror=ge;function yc(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 Uy=Object.freeze(Object.defineProperty({__proto__:null,default:yc},Symbol.toStringTag,{value:"Module"}));function Vy(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 C=i.getComputedStyle(g,null)["overflow"+S];return C==="auto"||C==="scroll"}function f(g){const S=h(g,"Y")&&d(g,"Y"),C=h(g,"X")&&d(g,"X");return S||C}function m(g){for(;g!==e.body&&f(g)===!1;)g=g.parentNode||g.host;return g}function y(g){const S=n();let C,v,w,N=(S-g.startTime)/s;N=N>1?1:N,C=c(N),v=g.startX+(g.x-g.startX)*C,w=g.startY+(g.y-g.startY)*C,g.method.call(g.scrollable,v,w),(v!==g.x||w!==g.y)&&i.requestAnimationFrame(y.bind(i,g))}function p(g,S,C){let v,w,N,x;const R=n();g===e.body?(v=i,w=i.scrollX||i.pageXOffset,N=i.scrollY||i.pageYOffset,x=r.scroll):(v=g,w=g.scrollLeft,N=g.scrollTop,x=a),y({scrollable:v,method:x,startTime:R,startX:w,startY:N,x:S,y:C})}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(),C=this.getBoundingClientRect();g!==e.body?(p.call(this,g,g.scrollLeft+C.left-S.left,g.scrollTop+C.top-S.top),i.getComputedStyle(g).position!=="fixed"&&i.scrollBy({left:S.left,top:S.top,behavior:"smooth"})):i.scrollBy({left:C.left,top:C.top,behavior:"smooth"})}}class Hy{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 ia(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 Qg(i,e={}){var Z,Q,O,re;var t;if(!i||!i.ownerDocument||!i.isConnected)return null;const s=M(M({},vg),e);if(s.root)try{Kg(i,s.root)}catch(R){return console.error("Cross-document generation detected:",R),null}const r=(Z=s.cache)!=null?Z:Jg(),n=r.getEID(i);if(n!==void 0)return n;const o=i.tagName.toLowerCase();if(o==="html"){const R=new Go(s,r),V=sy(i,s,R);return r.setEID(i,V),V}const l=new wg(s,r),a=new Tg(s,r),c=new Go(s,r),u=new jg,h=l.findAnchor(i);if(!h&&!s.fallbackToBody)return null;const d=(O=(Q=h==null?void 0:h.element)!=null?Q:(t=i.ownerDocument)==null?void 0:t.body)!=null?O:null;if(!d)return null;const m=!h||h.tier==="C",p=d.tagName.toLowerCase(),y=c.extract(d),f=d.parentElement;let g;if(f&&p!=="body"&&p!=="html"&&si(p,y,d)){const R=Array.from(f.children).indexOf(d);R!==-1&&(g=R+1)}const w={tag:d.tagName.toLowerCase(),semantics:y,score:(re=h==null?void 0:h.score)!=null?re:Me.DEGRADED_SCORE,degraded:m,nthChild:g},C=a.buildPath(d,i,c),v=c.extract(i);s.enableSvgFingerprint&&ey(i)&&(v.svg=u.fingerprint(i));const S=i.parentElement;let I;if(S&&si(o,v,i)){const R=Array.from(S.children).indexOf(i);R!==-1&&(I=R+1)}const x={tag:i.tagName.toLowerCase(),semantics:v,score:c.scoreElement(i),nthChild:I},T=[],L={onMultiple:"best-score",onMissing:"anchor-only",maxDepth:3},W=w.degraded||C.degraded,J=ty(w.degraded,C),B={version:"1.0",anchor:w,path:C.path,target:x,constraints:T,fallback:L,meta:{confidence:0,generatedAt:new Date().toISOString(),generator:"dom-eid@1.0",source:s.source,degraded:W,degradationReason:J}};return B.meta.confidence=Yg(B),B.meta.confidence<s.confidenceThreshold?null:(r.setEID(i,B),B)}function ey(i){return i.namespaceURI==="http://www.w3.org/2000/svg"||i.tagName.toLowerCase()==="svg"||i instanceof SVGElement}function ty(i,e){if(i&&e.degraded)return"anchor-and-path-degraded";if(i)return"no-semantic-anchor";if(e.degraded)return e.degradationReason}function sy(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 fc={id:"i","data-testid":"tid","data-qa":"qa","data-cy":"cy","data-test":"dt","aria-label":"al","aria-labelledby":"alb","aria-describedby":"adb",name:"n",href:"h",src:"s",type:"t",role:"r",alt:"at",title:"tt",for:"f",placeholder:"ph",text:"x"},Yo=Object.fromEntries(Object.entries(fc).map(([i,e])=>[e,i])),pc={maxClasses:2,maxAttributes:5,includeText:!0,maxTextLength:50,simplifyTarget:!0,includeConstraints:!0,format:"compact"};function Zo(i){return i==="id"?101:je[i]!==void 0?je[i]:i.startsWith("data-")?je["data-*"]:i.startsWith("aria-")?je["aria-*"]:0}function iy(i){return["id","data-testid","data-qa","data-cy","href","text","role"].includes(i)}function ry(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 ny(i,e){const t=M(M({},pc),e),s=t.format==="compact",r=s?"v1":`v${i.version}`,n=s?":":": ",o=s?"::":" :: ",l=s?">":" > ",a=t.includeText&&i.target.semantics.text?i.target.semantics.text.normalized:void 0,c=Hi(i.anchor,!1,t),u=i.path.length>0?i.path.map(m=>Hi(m,!1,t,a)).join(l)+l:"",h=Hi(i.target,!0,t),d=t.includeConstraints?oy(i,t):"";return`${r}${n}${c}${o}${u}${h}${d}`}function Hi(i,e=!1,t=pc,s){var m;const{tag:r,semantics:n}=i,o=t.format==="compact";let l=r;const a=[],c=M({},n.attributes);n.id&&(c.id=n.id),n.role&&!c.role&&(c.role=n.role);const u=Object.entries(c).map(([p,y])=>{const f=Zo(p),g=p==="href"||p==="src"?dc(p,y):y;return{name:p,value:g,priority:f}}).filter(p=>p.name!=="id"&&p.name!=="class"&&cc.has(p.name)||uc.has(p.name)&&hc(p.value)?!1:p.priority>0||p.name==="role"||p.name==="id");u.sort((p,y)=>y.priority-p.priority);const h=u.slice(0,t.maxAttributes);h.sort((p,y)=>p.name.localeCompare(y.name));for(const{name:p,value:y}of h){const f=o&&(m=fc[p])!=null?m:p;a.push(`${f}="${Tr(y)}"`)}if(t.includeText&&n.text&&!ry(n.text.normalized)){const p=n.text.normalized;if(p.length>0&&p.length<=t.maxTextLength&&!(!e&&s!==void 0&&p===s)){const y=o?"x":"text";a.push(`${y}="${Tr(p)}"`)}}let d=a;if(a.length>0&&e&&t.simplifyTarget&&n.id&&(d=a.filter(p=>{var g;const y=p.split("=")[0],f=(g=Yo[y])!=null?g:y;return Zo(f)>=60||f==="text"||f==="id"||f==="role"})),n.classes&&n.classes.length>0){const p=Eg(n.classes),y=!!n.id||a.some(f=>{var C;const g=f.split("=")[0],w=(C=Yo[g])!=null?C:g;return w==="href"||w==="data-testid"||w==="text"||w==="role"});if(!(e&&t.simplifyTarget&&y)&&p.length>0){const f=p.sort().slice(0,t.maxClasses);l+=f.map(g=>`.${g}`).join("")}}if(d.length>0&&(l+=`[${d.join(",")}]`),"nthChild"in i&&i.nthChild){const p=!!n.id||n.attributes&&Object.keys(n.attributes).some(iy);e&&t.simplifyTarget&&p||(l+=`#${i.nthChild}`)}return l}function oy(i,e){if(!i.constraints||i.constraints.length===0)return"";const t=[];for(const s of i.constraints)switch(s.type){case"uniqueness":t.push("unique=true");break;case"position":s.params&&s.params.strategy&&t.push(`pos=${s.params.strategy}`);break;case"text-proximity":if(s.params&&s.params.reference){const r=Tr(String(s.params.reference));t.push(`text="${r}"`)}break}return t.length===0?"":`${e.format==="verbose"?" ":""}{${t.join(",")}}`}function Tr(i){return i.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/>/g,"\\>").replace(/:/g,"\\:")}function ay(i,e,t){const s=Qg(i,e);return s?ny(s,t):null}const Ot={maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:0,fallbackToBody:!0};function ly(i){var e,t,s,r;return i===!1?null:i===!0||i===void 0?M({},Ot):{maxPathDepth:(e=i.maxPathDepth)!=null?e:Ot.maxPathDepth,enableSvgFingerprint:(t=i.enableSvgFingerprint)!=null?t:Ot.enableSvgFingerprint,confidenceThreshold:(s=i.confidenceThreshold)!=null?s:Ot.confidenceThreshold,fallbackToBody:(r=i.fallbackToBody)!=null?r:Ot.fallbackToBody}}function Xo(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:wi(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=ay(o,c);if(u)return l?l.selector=u:r&&(r.selector=u),u}catch(u){}return a!=null?a:n}function qo(i){return"__ln"in i}class cy{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&&qo(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&&qo(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 Jo=(i,e)=>`${i}@${e}`,uy=new Set(["id","class","name","role","title","alt","placeholder","for","type"]);function hy(i){const e=i.toLowerCase();return uy.has(e)||e.startsWith("data-")||e.startsWith("aria-")}class dy{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 cy,r=a=>{let c=a,u=Ut;for(;u===Ut;)c=c&&c.nextSibling,u=c&&this.mirror.getId(c);return u},n=a=>{const c=_.parentNode(a);if(!c||!xn(a))return;let u=!1;if(a.nodeType===Node.TEXT_NODE){const p=c.tagName;if(p==="TEXTAREA")return;p==="STYLE"&&this.addedSet.has(c)&&(u=!0)}const h=_t(c)?this.mirror.getId(Cn(a)):this.mirror.getId(c),d=r(a);if(h===-1||d===-1)return s.addNode(a);const m=ct(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:p=>{ft(p,this.mirror)&&this.iframeManager.addIframe(p),vn(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),Ge(a)&&this.shadowDomManager.addShadowRoot(_.shadowRoot(a),this.doc)},onIframeLoad:(p,y)=>{this.iframeManager.attachIframe(p,y),this.shadowDomManager.observeAttachShadow(p)},onStylesheetLoad:(p,y)=>{this.stylesheetManager.attachLinkElement(p,y)},cssCaptured:u,selectorOptions:this.selectorOptions});m&&(e.push({parentId:h,nextId:d,node:m}),t.add(m.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of this.movedSet)Ko(this.removesSubTreeCache,a,this.mirror)&&!this.movedSet.has(_.parentNode(a))||n(a);for(const a of this.addedSet)!Qo(this.droppedSet,a)&&!Ko(this.removesSubTreeCache,a,this.mirror)||Qo(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(_.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(_.parentNode(u.value));if(r(u.value)===-1)continue;if(h!==-1){a=u;break}else{const m=u.value,p=_.parentNode(m);if(p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const y=_.host(p);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=_.parentNode(c);return u&&u.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(u),{id:this.mirror.getId(c),value:a.value,selector:Xo(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:Xo(a.node,this.mirror,this.selectorOptions,{force:Object.keys(c).some(hy)})}}).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(_.childNodes(e),r=>_.textContent(r)||"").join("");t.attributes.value=zt({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Bt(e),value:s,maskInputFn:this.maskInputFn})}),b(this,"processMutation",e=>{if(!zs(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=_.textContent(e.target);!de(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:Na(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,wi(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=Lr(t),u=qi(s,this.excludeAttribute);if(r===null&&!t.hasAttribute(s)&&e.oldValue!==null&&(o===""||o===null||typeof o=="undefined")){console.debug(`[${he()}] [rrweb:record/mutation] \u26D4 phantom attribute mutation ignored`,{node:_.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(qi(s,this.excludeAttribute)){console.debug(`[${he()}] [rrweb:record/mutation] \u26D4 excluded attribute mutation ignored`,{node:_.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 m=Bt(t);r=zt({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:m,value:r,maskInputFn:this.maskInputFn})}if(de(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"),!Ia(t.tagName,s))if(d.attributes[s]=Ma(this.doc,Ze(t.tagName),Ze(s),r),s!=="class"&&(e.oldValue===null||r===""||r!==e.oldValue)&&console.debug(`[${he()}] [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:_.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 p=this.unattachedDoc.createElement("span");e.oldValue&&p.setAttribute("style",e.oldValue);for(const y of Array.from(t.style)){const f=t.style.getPropertyValue(y),g=t.style.getPropertyPriority(y);f!==p.style.getPropertyValue(y)||g!==p.style.getPropertyPriority(y)?g===""?d.styleDiff[y]=f:d.styleDiff[y]=[f,g]:d._unchangedStyles[y]=[f,g]}for(const y of Array.from(p.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(de(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=_t(e.target)?this.mirror.getId(_.host(e.target)):this.mirror.getId(e.target);de(e.target,this.blockClass,this.blockSelector,!1)||zs(t,this.mirror,this.slimDOMOptions)||!rc(t,this.mirror)||(this.addedSet.has(t)?(Or(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&s===-1||gn(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Jo(s,r)]?Or(this.movedSet,t):(this.removes.push({parentId:r,id:s,isShadow:_t(e.target)&&Lt(e.target)?!0:void 0}),fy(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(zs(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[Jo(this.mirror.getId(e),s)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);de(e,this.blockClass,this.blockSelector,!1)||(_.childNodes(e).forEach(s=>this.genAdds(s)),Ge(e)&&_.childNodes(_.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 Or(i,e){i.delete(e),_.childNodes(e).forEach(t=>Or(i,t))}function fy(i,e){const t=[i];for(;t.length;){const s=t.pop();e.has(s)||(e.add(s),_.childNodes(s).forEach(r=>t.push(r)))}}function Ko(i,e,t){return i.size===0?!1:py(i,e)}function py(i,e,t){const s=_.parentNode(e);return s?i.has(s):!1}function Qo(i,e){return i.size===0?!1:mc(i,e)}function mc(i,e){const t=_.parentNode(e);return t?i.has(t)?!0:mc(i,t):!1}let Ft;function my(i){Ft=i}function gy(){Ft=void 0}const z=i=>Ft?(...t)=>{try{return i(...t)}catch(s){if(Ft&&Ft(s)===!0)return;throw s}}:i,ve=[];function Ct(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 gc(i,e){const t=new dy;ve.push(t),t.init(i);const s=new(dn())(z(t.processMutations.bind(t)));return s.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function yy({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=St(z(h=>{const d=Date.now()-l;i(o.map(m=>(m.timeOffset-=d,m)),h),o=[],l=null}),n),c=z(St(z(h=>{const d=Ct(h),{clientX:m,clientY:p}=ti(h)?h.changedTouches[0]:h;l||(l=he()),o.push({x:m,y:p,id:s.getId(d),timeOffset:he()-l}),a(typeof DragEvent!="undefined"&&h instanceof DragEvent?E.Drag:h instanceof MouseEvent?E.MouseMove:E.TouchMove)}),r,{trailing:!1})),u=[oe("mousemove",c,t),oe("touchmove",c,t),oe("drag",c,t)];return z(()=>{u.forEach(h=>h())})}function by({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=Ct(h);if(de(d,s,r,!0))return;let m=null,p=u;if("pointerType"in h){switch(h.pointerType){case"mouse":m=De.Mouse;break;case"touch":m=De.Touch;break;case"pen":m=De.Pen;break}m===De.Touch?G[u]===G.MouseDown?p="TouchStart":G[u]===G.MouseUp&&(p="TouchEnd"):De.Pen}else ti(h)&&(m=De.Touch);m!==null?(a=m,(p.startsWith("Touch")&&m===De.Touch||p.startsWith("Mouse")&&m===De.Mouse)&&(m=null)):G[u]===G.Click&&(m=a,a=null);const y=ti(h)?h.changedTouches[0]:h;if(!y)return;const f=t.getId(d),{clientX:g,clientY:w}=y;z(i)(M({type:G[p],id:f,x:g,y:w},m!==null&&{pointerType:m}))};return Object.keys(G).filter(u=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&o[u]!==!1).forEach(u=>{let h=Ze(u);const d=c(u);if(window.PointerEvent)switch(G[u]){case G.MouseDown:case G.MouseUp:h=h.replace("mouse","pointer");break;case G.TouchStart:case G.TouchEnd:return}l.push(oe(h,d,e))}),z(()=>{l.forEach(u=>u())})}function yc({scrollCb:i,doc:e,mirror:t,blockClass:s,blockSelector:r,sampling:n}){const o=z(St(z(l=>{const a=Ct(l);if(!a||de(a,s,r,!0))return;const c=t.getId(a);if(a===e&&e.defaultView){const u=fn(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 oe("scroll",o,e)}function vy({viewportResizeCb:i},{win:e}){let t=-1,s=-1;const r=z(St(z(()=>{const n=pn(),o=mn();(t!==n||s!==o)&&(i({width:Number(o),height:Number(n)}),t=n,s=o)}),200));return oe("resize",r,e)}function wy({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=z(h=>{const d=s.location.href;d!==r&&(i({href:d,oldHref:r,navigationType:h}),r=d)}),l=Le(s.history,"pushState",function(h){return function(...d){const m=h.apply(this,d);return o("pushState"),m}});n.push(l);const a=Le(s.history,"replaceState",function(h){return function(...d){const m=h.apply(this,d);return o("replaceState"),m}});if(n.push(a),n.push(oe("popstate",()=>o("popstate"),s)),n.push(oe("hashchange",()=>o("hashchange"),s)),(typeof t.navigation=="object"&&(u=t.navigation.useNavigationAPI)!=null?u:!0)&&"navigation"in s)try{const h=s.navigation,d=m=>{var p;const y=m;if(y.navigationType==="push"||y.navigationType==="replace"){const f=(p=y.destination)==null?void 0:p.url;f&&f!==r&&(i({href:f,oldHref:r,navigationType:"navigate"}),r=f)}};h.addEventListener("navigate",d),n.push(()=>h.removeEventListener("navigate",d))}catch(h){}return z(()=>{n.forEach(h=>h())})}const Bs=["INPUT","TEXTAREA","SELECT"],ii=new WeakMap,Sy=["Enter","Tab","Escape","ArrowDown","ArrowUp","Delete"],ea=new WeakMap;function Cy({inputCb:i,doc:e,mirror:t,blockClass:s,blockSelector:r,ignoreClass:n,ignoreSelector:o,maskInputOptions:l,maskInputFn:a,sampling:c,userTriggeredOnInput:u,trustSyntheticInput:h}){function d(v){let S=Ct(v);const I=v.isTrusted,x=S&&S.tagName;if(S&&x==="OPTION"&&(S=_.parentElement(S)),!S||!x||Bs.indexOf(x)<0||de(S,s,r,!0)||S.classList.contains(n)||o&&S.matches(o))return;let T=S.value,L=!1;const W=Bt(S)||"";W==="radio"||W==="checkbox"?L=S.checked:(l[x.toLowerCase()]||l[W])&&(T=zt({element:S,maskInputOptions:l,tagName:x,type:W,value:T,maskInputFn:a})),m(S,u?{text:T,isChecked:L,userTriggered:I}:{text:T,isChecked:L});const J=S.name;W==="radio"&&J&&L&&e.querySelectorAll(`input[type="radio"][name="${J}"]`).forEach(B=>{if(B!==S){const Z=B.value;m(B,u?{text:Z,isChecked:!L,userTriggered:!1}:{text:Z,isChecked:!L})}})}function m(v,S){const I=ii.get(v),x=v;if(h){const T=!S.userTriggered&&x.value===""&&!S.isChecked&&!I,L=x.tagName==="SELECT"&&!S.userTriggered&&!I&&x.selectedIndex===0;if(T||L){console.debug(`[${he()}] [rrweb:record/observer] phantom input ignored (trust mode)`,{node:_.describeNode(x),tag:x.tagName,value:x.value,isInitialEmpty:T,isSelectDefaultSelection:L});return}}else{const T=x.hasAttribute("placeholder"),L=x.value==="",W=typeof x.defaultValue=="string"?x.defaultValue==="":!0,J=!S.userTriggered,B=!I||I.text==="",Z=T&&L&&W&&B&&J&&!S.isChecked&&x.type!=="hidden"&&Bs.includes(x.tagName),Q=x.tagName==="INPUT"&&x.type==="text"&&!S.userTriggered&&S.text===x.defaultValue&&!I&&x.hasAttribute("placeholder"),O=!S.userTriggered&&x.value===x.defaultValue&&!I&&x.hasAttribute("placeholder")&&!S.isChecked&&x.type!=="hidden"&&Bs.includes(x.tagName),re=x.type==="checkbox"&&!S.userTriggered&&!S.isChecked&&!I,R=x.type==="radio"&&!S.userTriggered&&!S.isChecked&&!I;if(Z||Q||O||re||R){console.debug(`[${he()}] [rrweb:record/observer] \u26D4 phantom input ignored`,{node:_.describeNode(x),tag:x.tagName,nodeType:x.nodeType,attribute:x.attributes,value:x.value,isLikelyPhantom:Z,isRenderDrivenTextInput:Q,isValueFromDefault:O,isPhantomCheckbox:re,isPhantomRadio:R});return}}if(!I||I.text!==S.text||I.isChecked!==S.isChecked){ii.set(v,S);const T=t.getId(v);z(i)(ne(M({},S),{id:T}))}}const y=(c.input==="last"?["change"]:["input","change"]).map(v=>oe(v,z(d),e)),f=v=>{const S=Ct(v);if(!S||!S.tagName)return;if(c.input==="all"){d(v);return}const I=S.tagName,x=v.key,T=Sy.includes(x),L=I==="TEXTAREA",W=e.activeElement===S,J=S.value,B=ea.get(S);if(ea.set(S,J),!W){d(v);return}if(T){if(!L){d(v);return}let Z=B!=null?B:"",Q=0;const O=2,re=()=>{const R=S.value,V=e.activeElement===S,ce=R!==Z;if(!V){d(v);return}if(ce)Q=0,Z=R;else if(Q++,Q>=O){d(v);return}requestAnimationFrame(re)};requestAnimationFrame(re);return}};y.push(oe("keydown",z(f),e));const g=e.defaultView;if(!g)return()=>{y.forEach(v=>v())};const w=g.Object.getOwnPropertyDescriptor(g.HTMLInputElement.prototype,"value"),C=[[g.HTMLInputElement.prototype,"value"],[g.HTMLInputElement.prototype,"checked"],[g.HTMLSelectElement.prototype,"value"],[g.HTMLTextAreaElement.prototype,"value"],[g.HTMLSelectElement.prototype,"selectedIndex"],[g.HTMLOptionElement.prototype,"selected"]];return w&&w.set&&y.push(...C.map(v=>ss(v[0],v[1],{set(){z(d)({target:this,isTrusted:!1})}},!1,g))),z(()=>{y.forEach(v=>v())})}function ri(i){const e=[];function t(s,r){if(Os("CSSGroupingRule")&&s.parentRule instanceof CSSGroupingRule||Os("CSSMediaRule")&&s.parentRule instanceof CSSMediaRule||Os("CSSSupportsRule")&&s.parentRule instanceof CSSSupportsRule||Os("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 Ue(i,e,t){let s,r;return i?(i.ownerNode?s=e.getId(i.ownerNode):r=t.getId(i),{styleId:r,id:s}):{}}function xy({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:z((u,h,d)=>{const[m,p]=d,{id:y,styleId:f}=Ue(h,e,t.styleMirror);return(y&&y!==-1||f&&f!==-1)&&i({id:y,styleId:f,adds:[{rule:m,index:p}]}),u.apply(h,d)})}),s.CSSStyleSheet.prototype.addRule=function(u,h,d=this.cssRules.length){const m=`${u} { ${h} }`;return s.CSSStyleSheet.prototype.insertRule.apply(this,[m,d])};const n=s.CSSStyleSheet.prototype.deleteRule;s.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:z((u,h,d)=>{const[m]=d,{id:p,styleId:y}=Ue(h,e,t.styleMirror);return(p&&p!==-1||y&&y!==-1)&&i({id:p,styleId:y,removes:[{index:m}]}),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:z((u,h,d)=>{const[m]=d,{id:p,styleId:y}=Ue(h,e,t.styleMirror);return(p&&p!==-1||y&&y!==-1)&&i({id:p,styleId:y,replace:m}),u.apply(h,d)})}));let l;s.CSSStyleSheet.prototype.replaceSync&&(l=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:z((u,h,d)=>{const[m]=d,{id:p,styleId:y}=Ue(h,e,t.styleMirror);return(p&&p!==-1||y&&y!==-1)&&i({id:p,styleId:y,replaceSync:m}),u.apply(h,d)})}));const a={};Ds("CSSGroupingRule")?a.CSSGroupingRule=s.CSSGroupingRule:(Ds("CSSMediaRule")&&(a.CSSMediaRule=s.CSSMediaRule),Ds("CSSConditionRule")&&(a.CSSConditionRule=s.CSSConditionRule),Ds("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:z((d,m,p)=>{const[y,f]=p,{id:g,styleId:w}=Ue(m.parentStyleSheet,e,t.styleMirror);return(g&&g!==-1||w&&w!==-1)&&i({id:g,styleId:w,adds:[{rule:y,index:[...ri(m),f||0]}]}),d.apply(m,p)})}),h.prototype.deleteRule=new Proxy(c[u].deleteRule,{apply:z((d,m,p)=>{const[y]=p,{id:f,styleId:g}=Ue(m.parentStyleSheet,e,t.styleMirror);return(f&&f!==-1||g&&g!==-1)&&i({id:f,styleId:g,removes:[{index:[...ri(m),y]}]}),d.apply(m,p)})})}),z(()=>{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 bc({mirror:i,stylesheetManager:e},t){var s,r,n;let o=null;t.nodeName==="#document"?o=i.getId(t):o=i.getId(_.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}}),z(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function Ey({styleDeclarationCb:i,mirror:e,ignoreCSSAttributes:t,stylesheetManager:s},{win:r}){const n=r.CSSStyleDeclaration.prototype.setProperty;r.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:z((l,a,c)=>{var u;const[h,d,m]=c;if(t.has(h))return n.apply(a,[h,d,m]);const{id:p,styleId:y}=Ue((u=a.parentRule)==null?void 0:u.parentStyleSheet,e,s.styleMirror);return(p&&p!==-1||y&&y!==-1)&&i({id:p,styleId:y,set:{property:h,value:d,priority:m},index:ri(a.parentRule)}),l.apply(a,c)})});const o=r.CSSStyleDeclaration.prototype.removeProperty;return r.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:z((l,a,c)=>{var u;const[h]=c;if(t.has(h))return o.apply(a,[h]);const{id:d,styleId:m}=Ue((u=a.parentRule)==null?void 0:u.parentStyleSheet,e,s.styleMirror);return(d&&d!==-1||m&&m!==-1)&&i({id:d,styleId:m,remove:{property:h},index:ri(a.parentRule)}),l.apply(a,c)})}),z(()=>{r.CSSStyleDeclaration.prototype.setProperty=n,r.CSSStyleDeclaration.prototype.removeProperty=o})}function Ay({mediaInteractionCb:i,blockClass:e,blockSelector:t,mirror:s,sampling:r,doc:n}){const o=z(a=>St(z(c=>{const u=Ct(c);if(!u||de(u,e,t,!0))return;const{currentTime:h,volume:d,muted:m,playbackRate:p,loop:y}=u;i({type:a,id:s.getId(u),currentTime:h,volume:d,muted:m,playbackRate:p,loop:y})}),r.media||500)),l=[oe("play",o(Ve.Play),n),oe("pause",o(Ve.Pause),n),oe("seeked",o(Ve.Seeked),n),oe("volumechange",o(Ve.VolumeChange),n),oe("ratechange",o(Ve.RateChange),n)];return z(()=>{l.forEach(a=>a())})}function My({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=Le(e.fonts,"add",function(l){return function(a){return setTimeout(z(()=>{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),z(()=>{s.forEach(l=>l())})}function Iy(i){const{doc:e,mirror:t,blockClass:s,blockSelector:r,selectionCb:n}=i;let o=!0;const l=z(()=>{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:m,startOffset:p,endContainer:y,endOffset:f}=d;de(m,s,r,!0)||de(y,s,r,!0)||c.push({start:t.getId(m),startOffset:p,end:t.getId(y),endOffset:f})}n({ranges:c})});return l(),oe("selectionchange",l)}function Ny({doc:i,customElementCb:e}){const t=i.defaultView;return!t||!t.customElements?()=>{}:Le(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 Ry(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:m,selectionCb:p,customElementCb:y}=i;i.mutationCb=(...f)=>{e.mutation&&e.mutation(...f),t(...f)},i.mousemoveCb=(...f)=>{e.mousemove&&e.mousemove(...f),s(...f)},i.mouseInteractionCb=(...f)=>{e.mouseInteraction&&e.mouseInteraction(...f),r(...f)},i.scrollCb=(...f)=>{e.scroll&&e.scroll(...f),n(...f)},i.viewportResizeCb=(...f)=>{e.viewportResize&&e.viewportResize(...f),o(...f)},i.navigationCb=(...f)=>{e.navigation&&e.navigation(...f),l(...f)},i.inputCb=(...f)=>{e.input&&e.input(...f),a(...f)},i.mediaInteractionCb=(...f)=>{e.mediaInteaction&&e.mediaInteaction(...f),c(...f)},i.styleSheetRuleCb=(...f)=>{e.styleSheetRule&&e.styleSheetRule(...f),u(...f)},i.styleDeclarationCb=(...f)=>{e.styleDeclaration&&e.styleDeclaration(...f),h(...f)},i.canvasMutationCb=(...f)=>{e.canvasMutation&&e.canvasMutation(...f),d(...f)},i.fontCb=(...f)=>{e.font&&e.font(...f),m(...f)},i.selectionCb=(...f)=>{e.selection&&e.selection(...f),p(...f)},i.customElementCb=(...f)=>{e.customElement&&e.customElement(...f),y(...f)}}function Ty(i,e={}){const t=i.doc.defaultView;if(!t)return()=>{};Ry(i,e);let s;i.recordDOM&&(s=gc(i,i.doc));const r=yy(i),n=by(i),o=yc(i),l=vy(i,{win:t}),a=wy(i),c=Cy(i),u=Ay(i);let h=()=>{},d=()=>{},m=()=>{},p=()=>{};i.recordDOM&&(h=xy(i,{win:t}),d=bc(i,i.doc),m=Ey(i,{win:t}),i.collectFonts&&(p=My(i)));const y=Iy(i),f=Ny(i),g=[];for(const w of i.plugins)g.push(w.observer(w.callback,t,w.options));return z(()=>{var w;ve.forEach(C=>C.reset()),(w=i.visibilityManager)==null||w.reset(),s==null||s.disconnect(),r(),n(),o(),l(),a(),c(),u(),h(),d(),m(),p(),y(),f(),g.forEach(C=>C())})}function Os(i){return typeof window[i]!="undefined"}function Ds(i){return!!(typeof window[i]!="undefined"&&window[i].prototype&&"insertRule"in window[i].prototype&&"deleteRule"in window[i].prototype)}class ta{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 Oy{constructor(e){b(this,"iframes",new WeakMap),b(this,"crossOriginIframeMap",new WeakMap),b(this,"crossOriginIframeMirror",new ta(Aa)),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 ta(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 N.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:N.IncrementalSnapshot,data:{source:E.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case N.Meta:case N.Load:case N.DomContentLoaded:return!1;case N.Plugin:return t;case N.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case N.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!==$e.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(s=>{this.patchRootIdOnNode(s,t)})}}class Dy{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(!Lt(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const s=gc(ne(M({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>s.disconnect()),this.restoreHandlers.push(yc(ne(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(_.host(e))),this.restoreHandlers.push(bc({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(Le(e.prototype,"attachShadow",function(r){return function(n){const o=r.call(this,n),l=_.shadowRoot(this);return l&&xn(this)&&s.addShadowRoot(l,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var ht="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Dt=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var $s=0;$s<ht.length;$s++)Dt[ht.charCodeAt($s)]=$s;var $y=function(i){var e=new Uint8Array(i),t,s=e.length,r="";for(t=0;t<s;t+=3)r+=ht[e[t]>>2],r+=ht[(e[t]&3)<<4|e[t+1]>>4],r+=ht[(e[t+1]&15)<<2|e[t+2]>>6],r+=ht[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},ky=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=Dt[i.charCodeAt(s)],o=Dt[i.charCodeAt(s+1)],l=Dt[i.charCodeAt(s+2)],a=Dt[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 sa=new Map;function _y(i,e){let t=sa.get(i);return t||(t=new Map,sa.set(i,t)),t.has(e)||t.set(e,[]),t.get(e)}const vc=(i,e,t)=>{if(!i||!(Sc(i,e)||typeof i=="object"))return;const s=i.constructor.name,r=_y(t,s);let n=r.indexOf(i);return n===-1&&(n=r.length,r.push(i)),n};function Ws(i,e,t){if(i instanceof Array)return i.map(s=>Ws(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=$y(i);return{rr_type:s,base64:r}}else{if(i instanceof DataView)return{rr_type:i.constructor.name,args:[Ws(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:[Ws(i.data,e,t),i.width,i.height]};if(Sc(i,e)||typeof i=="object"){const s=i.constructor.name,r=vc(i,e,t);return{rr_type:s,index:r}}}}return i}const wc=(i,e,t)=>i.map(s=>Ws(s,e,t)),Sc=(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 Ly(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=Le(e.CanvasRenderingContext2D.prototype,o,function(a){return function(...c){return de(this.canvas,t,s,!0)||setTimeout(()=>{const u=wc(c,e,this);i(this.canvas,{type:Pe["2D"],property:o,args:u})},0),a.apply(this,c)}});r.push(l)}catch(l){const a=ss(e.CanvasRenderingContext2D.prototype,o,{set(c){i(this.canvas,{type:Pe["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 ia(i,e,t,s){const r=[];try{const n=Le(i.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...a){if(!de(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 ra(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=Le(i,a,function(u){return function(...h){const d=u.apply(this,h);if(vc(d,n,this),"tagName"in this.canvas&&!de(this.canvas,s,r,!0)){const m=wc(h,n,this),p={type:e,property:a,args:m};t(this.canvas,p)}return d}});o.push(c)}catch(c){const u=ss(i,a,{set(h){t(this.canvas,{type:e,property:a,args:[h],setter:!0})}});o.push(u)}return o}function Fy(i,e,t,s){const r=[];return r.push(...ra(e.WebGLRenderingContext.prototype,Pe.WebGL,i,t,s,e)),typeof e.WebGL2RenderingContext!="undefined"&&r.push(...ra(e.WebGL2RenderingContext.prototype,Pe.WebGL2,i,t,s,e)),()=>{r.forEach(n=>n())}}const Cc="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",zy=i=>Uint8Array.from(atob(i),e=>e.charCodeAt(0)),na=typeof self!="undefined"&&self.Blob&&new Blob([zy(Cc)],{type:"text/javascript;charset=utf-8"});function By(i){let e;try{if(e=na&&(self.URL||self.webkitURL).createObjectURL(na),!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,"+Cc,{name:i==null?void 0:i.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}class Wy{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=ia(t,s,r,!0),l=new Map,a=new By;a.onmessage=p=>{const{id:y}=p.data;if(l.set(y,!1),!("base64"in p.data))return;const{base64:f,type:g,width:w,height:C}=p.data;this.mutationCb({id:y,type:Pe["2D"],commands:[{property:"clearRect",args:[0,0,w,C]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:f}],type:g}]},0,0]}]})};const c=1e3/e;let u=0,h;const d=()=>{const p=[];return t.document.querySelectorAll("canvas").forEach(y=>{de(y,s,r,!0)||p.push(y)}),p},m=p=>{if(u&&p-u<c){h=requestAnimationFrame(m);return}u=p,d().forEach(async y=>{var f;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 C=y.getContext(y.__context);((f=C==null?void 0:C.getContextAttributes())==null?void 0:f.preserveDrawingBuffer)===!1&&C.clear(C.COLOR_BUFFER_BIT)}const w=await createImageBitmap(y);a.postMessage({id:g,bitmap:w,width:y.width,height:y.height,dataURLOptions:n.dataURLOptions},[w])}),h=requestAnimationFrame(m)};h=requestAnimationFrame(m),this.resetObservers=()=>{o(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,s){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const r=ia(e,t,s,!1),n=Ly(this.processMutation.bind(this),e,t,s),o=Fy(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 it(c,["type"])}),{type:n}=s[0];this.mutationCb({id:t,type:n,commands:r}),this.pendingCanvasMutations.delete(e)}}function oa(i,e,t){var u,h,d,m,p,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=Uy((m=t==null?void 0:t.rootMargin)!=null?m:"0px"),l=new Map,a=Vy(s),c=Hy(a,o);for(const f of i){const g=f.getBoundingClientRect();let w=Yy(),C=0;g.width>0&&g.height>0&&(w=Gy(g,c),C=jy(g,w),C=Math.round(C*100)/100);const v=Zy(f),S=(p=e.get(f))!=null?p:null,I=(y=S==null?void 0:S.intersectionRatio)!=null?y:0,x=C,T=(S==null?void 0:S.isStyleVisible)&&I>r,L=v&&x>r;!S||T!==L||T!==L&&Math.abs(x-I)>n?l.set(f,{target:f,isVisible:L,isStyleVisible:v,intersectionRatio:x,intersectionRect:w,oldValue:S}):l.set(f,S)}return l}function Uy(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 Hy(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 Gy(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 jy(i,e){const t=i.width*i.height,s=e.width*e.height;return t>0?s/t:0}function Yy(){return{top:0,left:0,right:0,bottom:0,width:0,height:0}}function Zy(i){const e=getComputedStyle(i);return e&&e.display!=="none"&&e.visibility!=="hidden"&&parseFloat(e.opacity||"1")>0}class Xy{constructor(e){var c,u,h,d,m,p;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((m=l==null?void 0:l.sensitivity)!=null?m:.05),this.rafThrottle=Number((p=l==null?void 0:l.rafThrottle)!=null?p:50),t.querySelectorAll("*").forEach(y=>this.observe(y)),new MutationObserver(y=>{y.forEach(f=>{f.addedNodes.forEach(g=>{g.nodeType===Node.ELEMENT_NODE&&(this.observe(g),g.querySelectorAll("*").forEach(w=>this.observe(w)))}),f.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=oa(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=oa(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 qy=150,Jy=5e3,Ky=100;class Qy{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=z(r),this.settleTimeout=(n=s.settleTimeout)!=null?n:qy,this.maxWait=(o=s.maxWait)!=null?o:Jy,this.debounceMs=(l=s.debounce)!=null?l:Ky}handleNavigation(e){this.disabled||this.locked||(this.pendingNavigation?(this.cancelTimers(),this.disconnectSettlingObserver(),this.pendingNavigation=null,this.onSnapshot(!0)):(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=dn();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}),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 eb{constructor(e){b(this,"trackedLinkElements",new WeakSet),b(this,"mutationCb"),b(this,"adoptedStyleSheetCb"),b(this,"styleMirror",new Sn),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:ya(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 tb{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 sb="3.11.0-alpha.1";let te,We,Gi,pt=!1;const ni=[];let $t;try{if(Array.from([1],i=>i*2)[0]!==2){const i=document.createElement("iframe");document.body.appendChild(i),Array.from=((Fn=i.contentWindow)==null?void 0:Fn.Array.from)||Array.from,document.body.removeChild(i)}}catch(i){console.debug("Unable to override Array.from",i)}const ge=ba();function pe(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:m=!0,maskAllInputs:p,maskInputOptions:y,slimDOMOptions:f,maskInputFn:g,maskTextFn:w,hooks:C,packFn:v,sampling:S={},dataURLOptions:I={},mousemoveWait:x,recordDOM:T=!0,recordCanvas:L=!1,recordCrossOriginIframes:W=!1,recordAfter:J=i.recordAfter==="DOMContentLoaded"?i.recordAfter:"load",flushCustomEvent:B=i.flushCustomEvent!==void 0?i.flushCustomEvent:"after",userTriggeredOnInput:Z=!1,trustSyntheticInput:Q=!1,collectFonts:O=!1,inlineImages:re=!1,plugins:R,keepIframeSrcFn:V=()=>!1,ignoreCSSAttributes:ce=new Set([]),selector:Ne,errorHandler:Fe}=i;my(Fe);const is=W?window.parent===window:!0;let Et=!1;if(!is)try{window.parent.document&&(Et=!1)}catch(D){Et=!0}if(is&&!e)throw new Error("emit function is required");if(!is&&!Et)return()=>{};x!==void 0&&S.mousemove===void 0&&(S.mousemove=x),ge.reset();const Si=u===void 0?/.^/:u,tt=p===!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},Ci=f===!0||f==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:f==="all",headMetaDescKeywords:f==="all",headTitleMutations:f==="all"}:f||{},Mn=ly(Ne);yn();let In,xi=0,rs=0,Nn=0,ze=!1,me=null,st=null,Rn=0;const Rc=(S.scroll||100)*2;let Tn=0;const Tc=500;let Ei=!1;const On=D=>{for(const ae of R||[])ae.eventProcessor&&(D=ae.eventProcessor(D));return v&&!Et&&(D=v(D)),D},ns=()=>{me=null,ze=!1,st=null,fe==null||fe.cancelPending(),We(!0),ve.forEach(D=>{D.resetBuffers(),D.unsetFrozen()}),ue&&ue.unsetFrozen(),fe&&fe.unsetFrozen()};te=(D,ae)=>{var Y;const j=D;if(j.timestamp=he(),j.checkoutId=Nn,(Y=ve[0])!=null&&Y.isFrozen()&&!ze&&j.type!==N.FullSnapshot&&!(j.type===N.IncrementalSnapshot&&j.data.source===E.Mutation)&&(ve.forEach(ee=>ee.unfreeze()),ue==null||ue.unfreeze(),fe==null||fe.unfreeze()),is)e==null||e(On(j),ae);else if(Et){const ee={type:"rrweb",event:On(j),isCheckout:ae};window.parent.postMessage(ee,"*")}if(j.type===N.FullSnapshot)In=j,xi=0,rs=0;else if(j.type===N.IncrementalSnapshot){if(j.data.source===E.Mutation&&j.data.isAttachIframe)return;if(j.data.source!==E.Visibility){xi++;const ee=s&&xi>=s,F=t&&j.timestamp-In.timestamp>t;if(ee||F)if(n){ze||(ze=!0,st=he(),ve.forEach(Be=>Be.freeze()),ue==null||ue.freeze()),me&&clearTimeout(me);const be=he()-st,Re=n*3;be>=Re?ns():me=setTimeout(()=>ns(),n)}else We(!0)}}};const os=D=>{var ee,F;var ae,Y;((ee=(ae=D.adds)==null?void 0:ae.length)!=null?ee:0)+((F=(Y=D.removes)==null?void 0:Y.length)!=null?F:0)>10&&(Tn=he(),Ei=!1),te({type:N.IncrementalSnapshot,data:M({source:E.Mutation},D)})},Oc=D=>{te({type:N.IncrementalSnapshot,data:M({source:E.Visibility},D)})},Dn=D=>{Rn=he(),te({type:N.IncrementalSnapshot,data:M({source:E.Scroll},D)})},$n=D=>te({type:N.IncrementalSnapshot,data:M({source:E.CanvasMutation},D)}),Dc=D=>te({type:N.IncrementalSnapshot,data:M({source:E.AdoptedStyleSheet},D)}),Je=new eb({mutationCb:os,adoptedStyleSheetCb:Dc}),Ke=new Oy({mirror:ge,mutationCb:os,stylesheetManager:Je,recordCrossOriginIframes:W,wrappedEmit:te});for(const D of R||[])D.getMirror&&D.getMirror({nodeMirror:ge,crossOriginIframeMirror:Ke.crossOriginIframeMirror,crossOriginIframeStyleMirror:Ke.crossOriginIframeStyleMirror});const Ai=new tb;Gi=new Wy({recordCanvas:L,mutationCb:$n,win:window,blockClass:o,blockSelector:l,mirror:ge,sampling:S.canvas,dataURLOptions:I});const as=new Dy({mutationCb:os,scrollCb:Dn,bypassOptions:{blockClass:o,blockSelector:l,maskTextClass:h,maskTextSelector:d,excludeAttribute:Si,inlineStylesheet:m,maskInputOptions:tt,dataURLOptions:I,maskTextFn:w,maskInputFn:g,recordCanvas:L,inlineImages:re,sampling:S,slimDOMOptions:Ci,iframeManager:Ke,stylesheetManager:Je,canvasManager:Gi,keepIframeSrcFn:V,processedNodeManager:Ai,selectorOptions:Mn},mirror:ge}),$c=T&&(r!=null||(S==null?void 0:S.visibility)!==void 0&&(S==null?void 0:S.visibility)!==!1);let ue;if($c){const D=typeof(S==null?void 0:S.visibility)=="object"&&(S==null?void 0:S.visibility)!==null?S.visibility:{},ae=D.recordVisibility===!0;ue=new Xy({doc:document,mirror:ge,sampling:D,mutationCb:ae?Oc:()=>{},notifyActivity:r!=null?Y=>{const j=he(),ee=j-Rn<Rc,F=j-Tn<Tc;if(!(ee&&!F)&&!(F&&Ei)&&(rs+=Y,rs>=r))if(rs=0,Ei=!0,n){ze||(ze=!0,st=he(),ve.forEach(Be=>Be.freeze()),ue==null||ue.freeze()),me&&clearTimeout(me);const be=he()-st,Re=n*3;be>=Re?ns():me=setTimeout(()=>ns(),n)}else We(!0)}:void 0})}We=(D=!1)=>{if(!T)return;Nn++,te({type:N.Meta,data:{href:window.location.href,width:mn(),height:pn()}},D),Je.reset(),as.init(),ve.forEach(Y=>Y.lock()),ue==null||ue.lock(),fe==null||fe.lock();const ae=Oh(document,{mirror:ge,blockClass:o,blockSelector:l,maskTextClass:h,maskTextSelector:d,excludeAttribute:Si,inlineStylesheet:m,maskAllInputs:tt,maskTextFn:w,maskInputFn:g,slimDOM:Ci,dataURLOptions:I,recordCanvas:L,inlineImages:re,onSerialize:Y=>{ft(Y,ge)&&Ke.addIframe(Y),vn(Y,ge)&&Je.trackLinkElement(Y),Ge(Y)&&as.addShadowRoot(_.shadowRoot(Y),document)},onIframeLoad:(Y,j)=>{Ke.attachIframe(Y,j),as.observeAttachShadow(Y)},onStylesheetLoad:(Y,j)=>{Je.attachLinkElement(Y,j)},keepIframeSrcFn:V,selector:Ne});if(!ae)return console.warn("Failed to snapshot the document");te({type:N.FullSnapshot,data:{node:ae,initialOffset:fn(window)}},D),ve.forEach(Y=>Y.unlock()),ue==null||ue.unlock(),fe==null||fe.unlock(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Je.adoptStyleSheets(document.adoptedStyleSheets,ge.getId(document))},$t=()=>{for(const D of ni)te(D);ni.length=0};let fe;const Mi=S.navigation;if(Mi!==!1){const D=typeof Mi=="object"?Mi:{};fe=new Qy({doc:document,config:D,onSnapshot:ae=>{ze&&(me&&(clearTimeout(me),me=null),ze=!1,st=null,ve.forEach(Y=>{Y.resetBuffers(),Y.unsetFrozen()}),ue==null||ue.unsetFrozen()),We(ae)}})}try{const D=[],ae=j=>{var ee;return z(Ty)({mutationCb:os,mousemoveCb:(F,be)=>te({type:N.IncrementalSnapshot,data:{source:be,positions:F}}),mouseInteractionCb:F=>te({type:N.IncrementalSnapshot,data:M({source:E.MouseInteraction},F)}),scrollCb:Dn,viewportResizeCb:F=>te({type:N.IncrementalSnapshot,data:M({source:E.ViewportResize},F)}),navigationCb:F=>{fe?fe.handleNavigation(F):We(!0)},inputCb:F=>te({type:N.IncrementalSnapshot,data:M({source:E.Input},F)}),mediaInteractionCb:F=>te({type:N.IncrementalSnapshot,data:M({source:E.MediaInteraction},F)}),styleSheetRuleCb:F=>te({type:N.IncrementalSnapshot,data:M({source:E.StyleSheetRule},F)}),styleDeclarationCb:F=>te({type:N.IncrementalSnapshot,data:M({source:E.StyleDeclaration},F)}),canvasMutationCb:$n,visibilityManager:ue,fontCb:F=>te({type:N.IncrementalSnapshot,data:M({source:E.Font},F)}),selectionCb:F=>{te({type:N.IncrementalSnapshot,data:M({source:E.Selection},F)})},customElementCb:F=>{te({type:N.IncrementalSnapshot,data:M({source:E.CustomElement},F)})},blockClass:o,ignoreClass:a,ignoreSelector:c,maskTextClass:h,maskTextSelector:d,excludeAttribute:Si,maskInputOptions:tt,inlineStylesheet:m,sampling:S,recordDOM:T,recordCanvas:L,inlineImages:re,userTriggeredOnInput:Z,trustSyntheticInput:Q,collectFonts:O,doc:j,maskInputFn:g,maskTextFn:w,keepIframeSrcFn:V,blockSelector:l,slimDOMOptions:Ci,dataURLOptions:I,selectorOptions:Mn,mirror:ge,iframeManager:Ke,stylesheetManager:Je,shadowDomManager:as,processedNodeManager:Ai,canvasManager:Gi,ignoreCSSAttributes:ce,plugins:((ee=R==null?void 0:R.filter(F=>F.observer))==null?void 0:ee.map(F=>({observer:F.observer,options:F.options,callback:be=>te({type:N.Plugin,data:{plugin:F.name,payload:be}})})))||[]},C)};Ke.addLoadListener(j=>{try{D.push(ae(j.contentDocument))}catch(ee){console.warn(ee)}});const Y=()=>{B==="before"&&$t(),We(),D.push(ae(document)),pt=!0,B==="after"&&$t()};return document.readyState==="interactive"||document.readyState==="complete"?Y():(D.push(oe("DOMContentLoaded",()=>{te({type:N.DomContentLoaded,data:{}}),J==="DOMContentLoaded"&&Y()})),D.push(oe("load",()=>{te({type:N.Load,data:{}}),J==="load"&&Y()},window))),()=>{if(pt){const j=document.activeElement;if(j&&Bs.includes(j.tagName)){const ee=j,F=ge.getId(ee);if(F!==-1){const be=ii.get(ee);let Re=ee.value,Be=!1;const ls=Bt(ee)||"";if(ls==="radio"||ls==="checkbox"?Be=ee.checked:(tt[ee.tagName.toLowerCase()]||tt[ls])&&(Re=zt({element:ee,maskInputOptions:tt,tagName:ee.tagName,type:ls,value:Re,maskInputFn:g})),!be||be.text!==Re||be.isChecked!==Be){const kn=Z?{text:Re,isChecked:Be,userTriggered:!1}:{text:Re,isChecked:Be};ii.set(ee,kn),te({type:N.IncrementalSnapshot,data:ne(M({source:E.Input},kn),{id:F})})}}}}me&&(clearTimeout(me),me=null),$t(),D.forEach(j=>j()),fe==null||fe.destroy(),Ai.destroy(),pt=!1,gy()}}catch(D){console.warn(D)}}pe.getVersion=()=>sb;pe.isRecording=()=>pt;pe.flushCustomEventQueue=()=>{console.warn(`[rrweb] CustomEvent flushing: ${ni.length} events`),$t()};pe.addCustomEvent=(i,e)=>{const t={type:N.Custom,data:{tag:i,payload:e}};if(!pt){console.warn(`[rrweb] CustomEvent buffered before/after recording start: ${i}`),ni.push(t);return}te(t)};pe.freezePage=()=>{ve.forEach(i=>i.freeze())};pe.takeFullSnapshot=i=>{if(!pt)throw new Error("please take full snapshot after start recording");We(i)};pe.mirror=ge;function xc(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 ib=Object.freeze(Object.defineProperty({__proto__:null,default:xc},Symbol.toStringTag,{value:"Module"}));function rb(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 w=["MSIE ","Trident/","Edge/"];return new RegExp(w.join("|")).test(g)}const l=o(i.navigator.userAgent)?1:0;function a(g,w){this.scrollLeft=g,this.scrollTop=w}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,w){if(w==="Y")return g.clientHeight+l<g.scrollHeight;if(w==="X")return g.clientWidth+l<g.scrollWidth}function d(g,w){const C=i.getComputedStyle(g,null)["overflow"+w];return C==="auto"||C==="scroll"}function m(g){const w=h(g,"Y")&&d(g,"Y"),C=h(g,"X")&&d(g,"X");return w||C}function p(g){for(;g!==e.body&&m(g)===!1;)g=g.parentNode||g.host;return g}function y(g){const w=n();let C,v,S,I=(w-g.startTime)/s;I=I>1?1:I,C=c(I),v=g.startX+(g.x-g.startX)*C,S=g.startY+(g.y-g.startY)*C,g.method.call(g.scrollable,v,S),(v!==g.x||S!==g.y)&&i.requestAnimationFrame(y.bind(i,g))}function f(g,w,C){let v,S,I,x;const T=n();g===e.body?(v=i,S=i.scrollX||i.pageXOffset,I=i.scrollY||i.pageYOffset,x=r.scroll):(v=g,S=g.scrollLeft,I=g.scrollTop,x=a),y({scrollable:v,method:x,startTime:T,startX:S,startY:I,x:w,y:C})}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}f.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}f.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,w=arguments[0].top;f.call(this,this,typeof g=="undefined"?this.scrollLeft:~~g,typeof w=="undefined"?this.scrollTop:~~w)},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=p(this),w=g.getBoundingClientRect(),C=this.getBoundingClientRect();g!==e.body?(f.call(this,g,g.scrollLeft+C.left-w.left,g.scrollTop+C.top-w.top),i.getComputedStyle(g).position!=="fixed"&&i.scrollBy({left:w.left,top:w.top,behavior:"smooth"})):i.scrollBy({left:C.left,top:C.top,behavior:"smooth"})}}class nb{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 aa(i,e){if(i.type===N.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 ra(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 dt;(function(i){i[i.NotStarted=0]="NotStarted",i[i.Running=1]="Running",i[i.Stopped=2]="Stopped"})(dt||(dt={}));var bc={type:"xstate.init"};function Hi(i){return i===void 0?[]:[].concat(i)}function at(i){return{type:"xstate.assign",assignment:i}}function na(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 ri(i){return function(e){return i===e}}function vc(i){return typeof i=="string"?{type:i}:i}function oa(i,e){return{value:i,context:e,actions:[],changed:!1,matches:ri(i)}}function aa(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 wc(i,e){e===void 0&&(e={});var t=ra(aa(Hi(i.states[i.initial].entry).map(function(o){return na(o,e.actions)}),i.context,bc),2),s=t[0],r=t[1],n={config:i,_options:e,initialState:{value:i.initial,actions:s,context:r,matches:ri(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=vc(l),m=i.states[h];if(m.on){var y=Hi(m.on[f.type]);try{for(var p=function(z){var K=typeof Symbol=="function"&&Symbol.iterator,ce=K&&z[K],Ne=0;if(ce)return ce.call(z);if(z&&typeof z.length=="number")return{next:function(){return z&&Ne>=z.length&&(z=void 0),{value:z&&z[Ne++],done:!z}}};throw new TypeError(K?"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 oa(h,d);var C=typeof S=="string"?{target:S}:S,v=C.target,w=C.actions,N=w===void 0?[]:w,x=C.cond,R=x===void 0?function(){return!0}:x,_=v===void 0,B=v!=null?v:h,V=i.states[B];if(R(d,f)){var Y=ra(aa((_?Hi(N):[].concat(m.exit,N,V.entry).filter(function(z){return z})).map(function(z){return na(z,n._options.actions)}),d,f),3),X=Y[0],ee=Y[1],T=Y[2],W=v!=null?v:h;return{value:W,context:ee,actions:X,changed:v!==h||X.length>0||T,matches:ri(W)}}}}catch(z){a={error:z}}finally{try{g&&!g.done&&(c=p.return)&&c.call(p)}finally{if(a)throw a.error}}}return oa(h,d)}};return n}var la=function(i,e){return i.actions.forEach(function(t){var s=t.exec;return s&&s(i.context,e)})};function Sc(i){var e=i.initialState,t=dt.NotStarted,s=new Set,r={_machine:i,send:function(n){t===dt.Running&&(e=i.transition(e,n),la(e,vc(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:ri(o.value)}}return t=dt.Running,la(e,bc),r},stop:function(){return t=dt.Stopped,s.clear(),r},get state(){return e},get status(){return t}};return r}function Gy(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 jy(i,{getCastFn:e,applyEventsSynchronously:t,emitter:s}){const r=wc({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:at({lastPlayedEvent:(n,o)=>o.type==="CAST_EVENT"?o.payload.event:n.lastPlayedEvent}),recordTimeOffset:at((n,o)=>{let l=n.timeOffset;return"payload"in o&&"timeOffset"in o.payload&&(l=o.payload.timeOffset),ne(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)ia(m,c);const h=Gy(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(H.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(H.Flush),l.start()},pause(n){n.timer.clear()},resetLastPlayedEvent:at(n=>ne(A({},n),{lastPlayedEvent:null})),startLive:at({baselineTime:(n,o)=>(n.timer.start(),o.type==="TO_LIVE"&&o.payload.baselineTime?o.payload.baselineTime:Date.now())}),addEvent:at((n,o)=>{const{baselineTime:l,timer:a,events:c}=n;if(o.type==="ADD_EVENT"){const{event:u}=o.payload;ia(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 ne(A({},n),{events:c})})}});return Sc(r)}function Yy(i){const e=wc({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:at({normalSpeed:t=>t.timer.speed}),restoreSpeed:t=>{t.timer.setSpeed(t.normalSpeed)}}});return Sc(e)}const Zy=i=>[`.${i} { background: currentColor }`,"noscript { display: none !important; }"],ca=new Map;function Cc(i,e){let t=ca.get(i);return t||(t=new Map,ca.set(i,t)),t.has(e)||t.set(e,[]),t.get(e)}function Ye(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 Ye(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 Cc(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(Ye(i,e,t))))}else{if("base64"in s)return vy(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(Ye(i,e,t)));return new Blob(r,{type:s.type})}}else if(Array.isArray(s))return await Promise.all(s.map(Ye(i,e,t)));return s}}function Xy(i,e){try{return e===Pe.WebGL?i.getContext("webgl")||i.getContext("experimental-webgl"):i.getContext("webgl2")}catch(t){return null}}const Jy=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function qy(i,e){if(!(e!=null&&e.constructor))return;const{name:t}=e.constructor;if(!Jy.includes(t))return;const s=Cc(i,t);s.includes(e)||s.push(e)}async function Ky({mutation:i,target:e,type:t,imageMap:s,errorHandler:r}){try{const n=Xy(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(Ye(s,n))),a=o.apply(n,l);qy(n,a);const c=!1}catch(n){r(i,n)}}async function Qy({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(Ye(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 Tr({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([Pe.WebGL,Pe.WebGL2].includes(e.type)){for(let a=0;a<l.length;a++){const c=l[a];await Ky({mutation:c,type:e.type,target:t,imageMap:s,errorHandler:n})}return}await Qy({event:i,mutations:l,target:t,imageMap:s,errorHandler:n})}catch(o){n(e,o)}}class eb{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(H.Start,this.start.bind(this)),this.emitter.on(H.SkipStart,this.start.bind(this)),this.emitter.on(H.Pause,this.pause.bind(this)),this.emitter.on(H.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===Ve.Play||n!==Ve.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 ks(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 tb(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 sb=5*1e3,ib=yc||Uy,ua="[replayer]",Gi={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function ha(i){return i.type==I.IncrementalSnapshot&&(i.data.source==E.TouchMove||i.data.source==E.MouseInteraction&&i.data.type==G.TouchStart)}class rb{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 xt),b(this,"mouse"),b(this,"mouseTail",null),b(this,"tailPositions",[]),b(this,"emitter",ib()),b(this,"nextUserInteractionEvent"),b(this,"legacy_missingNodeRetryMap",{}),b(this,"cache",go()),b(this,"imageMap",new Map),b(this,"canvasEventMap",new Map),b(this,"mirror",pa()),b(this,"styleMirror",new vn),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(H.CustomEvent,l)};break;case I.Meta:c=()=>this.emitter.emit(H.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/sb),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:d}),this.emitter.emit(H.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(H.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(H.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:Gi,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(H.Resize,this.handleResize),this.setupDom();for(const l of this.config.plugins||[])l.getMirror&&l.getMirror({nodeMirror:this.mirror});this.emitter.on(H.Flush,()=>{if(this.usingVirtualDom){const l={mirror:this.mirror,applyCanvas:(a,c,u)=>{Tr({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{Ks(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=Qs(c.node,this.mirror,this.virtualDom.mirror);Ks(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(H.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});const r=new Hy([],{speed:this.config.speed});this.service=jy({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(H.StateChange,{player:l})}),this.speedService=Yy({normalSpeed:-1,timer:r}),this.speedService.start(),this.speedService.subscribe(l=>{this.emitter.emit(H.StateChange,{speed:l})}),this.mediaManager=new eb({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(H.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(ha)&&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(H.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(H.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(H.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(H.Destroy)}startLive(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}addEvent(e){const t=this.config.unpackFn?this.config.unpackFn(e):e;ha(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=go()}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&&(Vy(this.iframe.contentWindow,this.iframe.contentDocument),mn(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(),Sf(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=>ks(a)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(H.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){var s;const r=Zy(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,ql(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)===$e.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})};Pt(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=>ks(l))}collectIframeAndAttachDocument(e,t){if(ft(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(H.Start,o),this.emitter.on(H.Pause,o);const l=()=>{this.emitter.off(H.Start,o),this.emitter.off(H.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(H.LoadStylesheetEnd),r&&clearTimeout(r),l())}))}),s.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(H.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(Ye(this.imageMap,null,s)));return ne(A({},n),{args:o})}));s.isUnchanged===!1&&this.canvasEventMap.set(t,ne(A({},e),{commands:r}))}else{const r=await Promise.all(e.args.map(Ye(this.imageMap,null,s)));s.isUnchanged===!1&&this.canvasEventMap.set(t,ne(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(Ze(G[o.type])),a=this.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);this.emitter.emit(H.MouseInteraction,{type:o.type,target:a});const{triggerFocus:c}=this.config;switch(o.type){case G.Blur:"blur"in a&&a.blur();break;case G.Focus:c&&a.focus&&a.focus({preventScroll:!0});break;case G.Click:case G.TouchStart:case G.TouchEnd:case G.MouseDown:case G.MouseUp:t?(o.type===G.TouchStart?this.touchActive=!0:o.type===G.TouchEnd&&(this.touchActive=!1),o.type===G.MouseDown?this.lastMouseDownEvent=[a,l]:o.type===G.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:o.x||0,y:o.y||0,id:o.id,debugData:o}):(o.type===G.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(o.x||0,o.y||0,o.id,t,o),o.type===G.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):o.type===G.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):o.type===G.TouchEnd?this.mouse.classList.remove("touch-active"):a.dispatchEvent(l));break;case G.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(H.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);Tr({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,Um(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=Jl(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&&Ge(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===$e.Document?this.newDocumentQueue.push(c):n.push(c);c.node.isShadow&&(Ge(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(ft(d,s)){this.attachDocumentToIframe(c,d);return}const p=(C,v)=>{if(!this.usingVirtualDom){ks(C);for(const w of this.config.plugins||[])w.onBuild&&w.onBuild(C,{id:v,replayer:this})}},g=Pt(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===$e.Element&&c.node.type===$e.Text){const C=Array.isArray(d.childNodes)?d.childNodes:Array.from(d.childNodes);if(S.tagName==="textarea")for(const v of C)v.nodeType===d.TEXT_NODE&&d.removeChild(v);else if(S.tagName==="style"&&C.length===1)for(const v of C)v.nodeType===d.TEXT_NODE&&!s.hasNode(v)&&(g.textContent=v.textContent,d.removeChild(v))}else if((S==null?void 0:S.type)===$e.Document){const C=d;c.node.type===$e.DocumentType&&((u=C.childNodes[0])==null?void 0:u.nodeType)===Node.DOCUMENT_TYPE_NODE&&C.removeChild(C.childNodes[0]),g.nodeName==="HTML"&&C.documentElement&&C.removeChild(C.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=[]),ft(g,this.mirror)){const C=this.mirror.getId(g),v=this.newDocumentQueue.find(w=>w.parentId===C);v&&(this.attachDocumentToIframe(v,g),this.newDocumentQueue=this.newDocumentQueue.filter(w=>w!==v))}(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=ec(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)?gn(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),tc(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=ui(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"&&tb(h,c);else if(typeof f=="string")try{if(d==="_cssText"&&(h.nodeName==="LINK"||h.nodeName==="STYLE"))try{const m=s.getMeta(h),y=Pt(ne(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"&&ks(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)===$e.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}=Ir(a);ut(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}=Ir(l);ut(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&&ut(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&ut(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(Ge(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);Ge(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=bn(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?Gi:Object.assign({},Gi,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(H.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(ua,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(ua,...e)}}const nb="3.10.0-alpha.1",{getVersion:ob}=pe,{isRecording:ab}=pe,{flushCustomEventQueue:lb}=pe,{addCustomEvent:cb}=pe,{freezePage:ub}=pe,{takeFullSnapshot:hb}=pe;exports.EventType=I;exports.IncrementalSource=E;exports.MouseInteractions=G;exports.Replayer=rb;exports.ReplayerEvents=H;exports.addCustomEvent=cb;exports.canvasMutation=Tr;exports.flushCustomEventQueue=lb;exports.freezePage=ub;exports.getVersion=ob;exports.isRecording=ab;exports.record=pe;exports.takeFullSnapshot=hb;exports.utils=ng;exports.version=nb;
|
|
92
|
+
***************************************************************************** */function la(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 dt;(function(i){i[i.NotStarted=0]="NotStarted",i[i.Running=1]="Running",i[i.Stopped=2]="Stopped"})(dt||(dt={}));var Ec={type:"xstate.init"};function ji(i){return i===void 0?[]:[].concat(i)}function at(i){return{type:"xstate.assign",assignment:i}}function ca(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 oi(i){return function(e){return i===e}}function Ac(i){return typeof i=="string"?{type:i}:i}function ua(i,e){return{value:i,context:e,actions:[],changed:!1,matches:oi(i)}}function ha(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 Mc(i,e){e===void 0&&(e={});var t=la(ha(ji(i.states[i.initial].entry).map(function(o){return ca(o,e.actions)}),i.context,Ec),2),s=t[0],r=t[1],n={config:i,_options:e,initialState:{value:i.initial,actions:s,context:r,matches:oi(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,m=Ac(l),p=i.states[h];if(p.on){var y=ji(p.on[m.type]);try{for(var f=function(R){var V=typeof Symbol=="function"&&Symbol.iterator,ce=V&&R[V],Ne=0;if(ce)return ce.call(R);if(R&&typeof R.length=="number")return{next:function(){return R&&Ne>=R.length&&(R=void 0),{value:R&&R[Ne++],done:!R}}};throw new TypeError(V?"Object is not iterable.":"Symbol.iterator is not defined.")}(y),g=f.next();!g.done;g=f.next()){var w=g.value;if(w===void 0)return ua(h,d);var C=typeof w=="string"?{target:w}:w,v=C.target,S=C.actions,I=S===void 0?[]:S,x=C.cond,T=x===void 0?function(){return!0}:x,L=v===void 0,W=v!=null?v:h,J=i.states[W];if(T(d,m)){var B=la(ha((L?ji(I):[].concat(p.exit,I,J.entry).filter(function(R){return R})).map(function(R){return ca(R,n._options.actions)}),d,m),3),Z=B[0],Q=B[1],O=B[2],re=v!=null?v:h;return{value:re,context:Q,actions:Z,changed:v!==h||Z.length>0||O,matches:oi(re)}}}}catch(R){a={error:R}}finally{try{g&&!g.done&&(c=f.return)&&c.call(f)}finally{if(a)throw a.error}}}return ua(h,d)}};return n}var da=function(i,e){return i.actions.forEach(function(t){var s=t.exec;return s&&s(i.context,e)})};function Ic(i){var e=i.initialState,t=dt.NotStarted,s=new Set,r={_machine:i,send:function(n){t===dt.Running&&(e=i.transition(e,n),da(e,Ac(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:oi(o.value)}}return t=dt.Running,da(e,Ec),r},stop:function(){return t=dt.Stopped,s.clear(),r},get state(){return e},get status(){return t}};return r}function ob(i,e){for(let t=i.length-1;t>=0;t--){const s=i[t];if(s.type===N.Meta&&s.timestamp<=e)return i.slice(t)}return i}function ab(i,{getCastFn:e,applyEventsSynchronously:t,emitter:s}){const r=Mc({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:at({lastPlayedEvent:(n,o)=>o.type==="CAST_EVENT"?o.payload.event:n.lastPlayedEvent}),recordTimeOffset:at((n,o)=>{let l=n.timeOffset;return"payload"in o&&"timeOffset"in o.payload&&(l=o.payload.timeOffset),ne(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 p of a)aa(p,c);const h=ob(a,c);let d=u==null?void 0:u.timestamp;(u==null?void 0:u.type)===N.IncrementalSnapshot&&u.data.source===E.MouseMove&&(d=u.timestamp+((o=u.data.positions[0])==null?void 0:o.timeOffset)),c<(d||0)&&s.emit(H.PlayBack);const m=new Array;for(const p of h)if(!(d&&d<c&&(p.timestamp<=d||p===u)))if(p.timestamp<=c)m.push(p);else{const y=e(p,!1);l.addAction({doAction:()=>{y()},delay:p.delay})}t(m),s.emit(H.Flush),l.start()},pause(n){n.timer.clear()},resetLastPlayedEvent:at(n=>ne(M({},n),{lastPlayedEvent:null})),startLive:at({baselineTime:(n,o)=>(n.timer.start(),o.type==="TO_LIVE"&&o.payload.baselineTime?o.payload.baselineTime:Date.now())}),addEvent:at((n,o)=>{const{baselineTime:l,timer:a,events:c}=n;if(o.type==="ADD_EVENT"){const{event:u}=o.payload;aa(u,l);let h=c.length-1;if(!c[h]||c[h].timestamp<=u.timestamp)c.push(u);else{let p=-1,y=0;for(;y<=h;){const f=Math.floor((y+h)/2);c[f].timestamp<=u.timestamp?y=f+1:h=f-1}p===-1&&(p=y),c.splice(p,0,u)}const d=u.timestamp<l,m=e(u,d);d?m():a.isActive()&&a.addAction({doAction:()=>{m()},delay:u.delay})}return ne(M({},n),{events:c})})}});return Ic(r)}function lb(i){const e=Mc({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:at({normalSpeed:t=>t.timer.speed}),restoreSpeed:t=>{t.timer.setSpeed(t.normalSpeed)}}});return Ic(e)}const cb=i=>[`.${i} { background: currentColor }`,"noscript { display: none !important; }"],fa=new Map;function Nc(i,e){let t=fa.get(i);return t||(t=new Map,fa.set(i,t)),t.has(e)||t.set(e,[]),t.get(e)}function Ye(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 Ye(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 Nc(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(Ye(i,e,t))))}else{if("base64"in s)return ky(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(Ye(i,e,t)));return new Blob(r,{type:s.type})}}else if(Array.isArray(s))return await Promise.all(s.map(Ye(i,e,t)));return s}}function ub(i,e){try{return e===Pe.WebGL?i.getContext("webgl")||i.getContext("experimental-webgl"):i.getContext("webgl2")}catch(t){return null}}const hb=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function db(i,e){if(!(e!=null&&e.constructor))return;const{name:t}=e.constructor;if(!hb.includes(t))return;const s=Nc(i,t);s.includes(e)||s.push(e)}async function fb({mutation:i,target:e,type:t,imageMap:s,errorHandler:r}){try{const n=ub(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(Ye(s,n))),a=o.apply(n,l);db(n,a);const c=!1}catch(n){r(i,n)}}async function pb({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(Ye(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 Dr({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([Pe.WebGL,Pe.WebGL2].includes(e.type)){for(let a=0;a<l.length;a++){const c=l[a];await fb({mutation:c,type:e.type,target:t,imageMap:s,errorHandler:n})}return}await pb({event:i,mutations:l,target:t,imageMap:s,errorHandler:n})}catch(o){n(e,o)}}class mb{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(H.Start,this.start.bind(this)),this.emitter.on(H.SkipStart,this.start.bind(this)),this.emitter.on(H.Pause,this.pause.bind(this)),this.emitter.on(H.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 m,p,y,f,g;const r=this.mediaMap.get(e),{type:n,playbackRate:o,currentTime:l,muted:a,volume:c,loop:u}=s;return{isPlaying:n===Ve.Play||n!==Ve.Pause&&((r==null?void 0:r.isPlaying)||e.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(m=l!=null?l:r==null?void 0:r.currentTimeAtLastInteraction)!=null?m:0,lastInteractionTimeOffset:t,playbackRate:(p=o!=null?o:r==null?void 0:r.playbackRate)!=null?p:1,volume:(y=c!=null?c:r==null?void 0:r.volume)!=null?y:1,muted:(f=a!=null?a:r==null?void 0:r.muted)!=null?f: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 m=0;typeof l.rr_mediaCurrentTime=="number"&&(m=l.rr_mediaCurrentTime),this.mediaMap.set(r,{isPlaying:a,currentTimeAtLastInteraction:m,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 ks(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 gb(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 yb=5*1e3,bb=xc||ib,pa="[replayer]",Yi={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function ma(i){return i.type==N.IncrementalSnapshot&&(i.data.source==E.TouchMove||i.data.source==E.MouseInteraction&&i.data.type==G.TouchStart)}class vb{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 xt),b(this,"mouse"),b(this,"mouseTail",null),b(this,"tailPositions",[]),b(this,"emitter",bb()),b(this,"nextUserInteractionEvent"),b(this,"legacy_missingNodeRetryMap",{}),b(this,"cache",vo()),b(this,"imageMap",new Map),b(this,"canvasEventMap",new Map),b(this,"mirror",ba()),b(this,"styleMirror",new Sn),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 N.DomContentLoaded:case N.Load:case N.Custom:continue;case N.FullSnapshot:case N.Meta:case N.Plugin:case N.IncrementalSnapshot:break}this.getCastFn(a,!0)()}}),b(this,"getCastFn",(l,a=!1)=>{let c;switch(l.type){case N.DomContentLoaded:case N.Load:break;case N.Custom:c=()=>{this.emitter.emit(H.CustomEvent,l)};break;case N.Meta:c=()=>this.emitter.emit(H.Resize,{width:l.data.width,height:l.data.height});break;case N.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 N.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/yb),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:d}),this.emitter.emit(H.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(H.Finish))};let m=50;l.type===N.IncrementalSnapshot&&l.data.source===E.MouseMove&&l.data.positions.length&&(m+=Math.max(0,-l.data.positions[0].timeOffset)),setTimeout(d,m)}this.emitter.emit(H.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:Yi,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(H.Resize,this.handleResize),this.setupDom();for(const l of this.config.plugins||[])l.getMirror&&l.getMirror({nodeMirror:this.mirror});this.emitter.on(H.Flush,()=>{if(this.usingVirtualDom){const l={mirror:this.mirror,applyCanvas:(a,c,u)=>{Dr({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{Qs(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=ei(c.node,this.mirror,this.virtualDom.mirror);Qs(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(H.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});const r=new nb([],{speed:this.config.speed});this.service=ab({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(H.StateChange,{player:l})}),this.speedService=lb({normalSpeed:-1,timer:r}),this.speedService.start(),this.speedService.subscribe(l=>{this.emitter.emit(H.StateChange,{speed:l})}),this.mediaManager=new mb({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===N.Meta),o=this.service.state.context.events.find(l=>l.type===N.FullSnapshot);if(n){const{width:l,height:a}=n.data;setTimeout(()=>{this.emitter.emit(H.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(ma)&&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(H.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(H.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(H.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(H.Destroy)}startLive(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}addEvent(e){const t=this.config.unpackFn?this.config.unpackFn(e):e;ma(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=vo()}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&&(rb(this.iframe.contentWindow,this.iframe.contentDocument),yn(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(),Of(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=>ks(a)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(H.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){var s;const r=cb(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,sc(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)===$e.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})};Pt(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=>ks(l))}collectIframeAndAttachDocument(e,t){if(ft(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(H.Start,o),this.emitter.on(H.Pause,o);const l=()=>{this.emitter.off(H.Start,o),this.emitter.off(H.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(H.LoadStylesheetEnd),r&&clearTimeout(r),l())}))}),s.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(H.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===N.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(Ye(this.imageMap,null,s)));return ne(M({},n),{args:o})}));s.isUnchanged===!1&&this.canvasEventMap.set(t,ne(M({},e),{commands:r}))}else{const r=await Promise.all(e.args.map(Ye(this.imageMap,null,s)));s.isUnchanged===!1&&this.canvasEventMap.set(t,ne(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(Ze(G[o.type])),a=this.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);this.emitter.emit(H.MouseInteraction,{type:o.type,target:a});const{triggerFocus:c}=this.config;switch(o.type){case G.Blur:"blur"in a&&a.blur();break;case G.Focus:c&&a.focus&&a.focus({preventScroll:!0});break;case G.Click:case G.TouchStart:case G.TouchEnd:case G.MouseDown:case G.MouseUp:t?(o.type===G.TouchStart?this.touchActive=!0:o.type===G.TouchEnd&&(this.touchActive=!1),o.type===G.MouseDown?this.lastMouseDownEvent=[a,l]:o.type===G.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:o.x||0,y:o.y||0,id:o.id,debugData:o}):(o.type===G.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(o.x||0,o.y||0,o.id,t,o),o.type===G.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):o.type===G.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):o.type===G.TouchEnd?this.mouse.classList.remove("touch-active"):a.dispatchEvent(l));break;case G.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(H.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);Dr({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,Qm(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=tc(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&&Ge(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(m){if(m instanceof DOMException)this.warn("parent could not remove child in mutation",d,h,e);else throw m}});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===$e.Document?this.newDocumentQueue.push(c):n.push(c);c.node.isShadow&&(Ge(d)||d.attachShadow({mode:"open"}),d=d.shadowRoot);let m=null,p=null;if(c.previousId&&(m=s.getNode(c.previousId)),c.nextId&&(p=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(ft(d,s)){this.attachDocumentToIframe(c,d);return}const f=(C,v)=>{if(!this.usingVirtualDom){ks(C);for(const S of this.config.plugins||[])S.onBuild&&S.onBuild(C,{id:v,replayer:this})}},g=Pt(c.node,{doc:y,mirror:s,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:f});if(c.previousId===-1||c.nextId===-1){r[c.node.id]={node:g,mutation:c};return}const w=s.getMeta(d);if(w&&w.type===$e.Element&&c.node.type===$e.Text){const C=Array.isArray(d.childNodes)?d.childNodes:Array.from(d.childNodes);if(w.tagName==="textarea")for(const v of C)v.nodeType===d.TEXT_NODE&&d.removeChild(v);else if(w.tagName==="style"&&C.length===1)for(const v of C)v.nodeType===d.TEXT_NODE&&!s.hasNode(v)&&(g.textContent=v.textContent,d.removeChild(v))}else if((w==null?void 0:w.type)===$e.Document){const C=d;c.node.type===$e.DocumentType&&((u=C.childNodes[0])==null?void 0:u.nodeType)===Node.DOCUMENT_TYPE_NODE&&C.removeChild(C.childNodes[0]),g.nodeName==="HTML"&&C.documentElement&&C.removeChild(C.documentElement)}if(m&&m.nextSibling&&m.nextSibling.parentNode?d.insertBefore(g,m.nextSibling):p&&p.parentNode?d.contains(p)?d.insertBefore(g,p):d.insertBefore(g,null):d.appendChild(g),f(g,c.node.id),this.usingVirtualDom&&g.nodeName==="#text"&&d.nodeName==="STYLE"&&((h=d.rules)==null?void 0:h.length)>0&&(d.rules=[]),ft(g,this.mirror)){const C=this.mirror.getId(g),v=this.newDocumentQueue.find(S=>S.parentId===C);v&&(this.attachDocumentToIframe(v,g),this.newDocumentQueue=this.newDocumentQueue.filter(S=>S!==v))}(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=nc(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)?bn(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),oc(e.texts).forEach(c=>{var u;const h=s.getNode(c.id);if(!h)return e.removes.find(m=>m.id===c.id)?void 0:this.warnNodeNotFound(e,c.id);const d=h.parentElement;if(c.value&&d&&d.tagName==="STYLE"?h.textContent=di(c.value,this.cache):h.textContent=c.value,this.usingVirtualDom){const m=h.parentNode;((u=m==null?void 0:m.rules)==null?void 0:u.length)>0&&(m.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 m=c.attributes[d];if(m===null)h.removeAttribute(d),d==="open"&&gb(h,c);else if(typeof m=="string")try{if(d==="_cssText"&&(h.nodeName==="LINK"||h.nodeName==="STYLE"))try{const p=s.getMeta(h),y=Pt(ne(M({},p),{attributes:M(M({},p.attributes),c.attributes)}),{doc:h.ownerDocument,mirror:s,skipChild:!0,hackCss:!0,cache:this.cache});Object.assign(p.attributes,c.attributes);const f=h.nextSibling,g=h.parentNode;if(y&&g){g.removeChild(h),g.insertBefore(y,f),s.replace(c.id,y);break}}catch(p){}if(d==="value"&&h.nodeName==="TEXTAREA"){const p=h;p.childNodes.forEach(f=>p.removeChild(f));const y=(u=h.ownerDocument)==null?void 0:u.createTextNode(m);y&&p.appendChild(y)}else h.setAttribute(d,m);d==="rr_open_mode"&&h.nodeName==="DIALOG"&&ks(h,c)}catch(p){this.warn("An error occurred may due to the checkout feature.",p)}else if(d==="style"){const p=m,y=h;for(const f in p)if(p[f]===!1)y.style.removeProperty(f);else if(p[f]instanceof Array){const g=p[f];y.style.setProperty(f,g[0],g[1])}else{const g=p[f];y.style.setProperty(f,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)===$e.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}=Rr(a);ut(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}=Rr(l);ut(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&&ut(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&ut(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(Ge(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);Ge(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=wn(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?Yi:Object.assign({},Yi,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!==N.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(H.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(pa,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(pa,...e)}}const wb="3.11.0-alpha.1",{getVersion:Sb}=pe,{isRecording:Cb}=pe,{flushCustomEventQueue:xb}=pe,{addCustomEvent:Eb}=pe,{freezePage:Ab}=pe,{takeFullSnapshot:Mb}=pe;exports.EventType=N;exports.IncrementalSource=E;exports.MouseInteractions=G;exports.Replayer=vb;exports.ReplayerEvents=H;exports.addCustomEvent=Eb;exports.canvasMutation=Dr;exports.flushCustomEventQueue=xb;exports.freezePage=Ab;exports.getVersion=Sb;exports.isRecording=Cb;exports.record=pe;exports.takeFullSnapshot=Mb;exports.utils=gg;exports.version=wb;
|
|
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") {
|