@appsurify-testmap/rrweb-all 3.2.0-alpha.1 → 3.4.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/rrweb-all.cjs +220 -57
- package/dist/rrweb-all.cjs.map +1 -1
- package/dist/rrweb-all.js +220 -57
- package/dist/rrweb-all.js.map +1 -1
- package/dist/rrweb-all.umd.cjs +227 -57
- package/dist/rrweb-all.umd.cjs.map +3 -3
- package/dist/rrweb-all.umd.min.cjs +44 -44
- package/dist/rrweb-all.umd.min.cjs.map +3 -3
- package/package.json +4 -4
|
@@ -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 Kc=Object.defineProperty,Qc=Object.defineProperties;var eu=Object.getOwnPropertyDescriptors;var Cr=Object.getOwnPropertySymbols;var Zn=Object.prototype.hasOwnProperty,Xn=Object.prototype.propertyIsEnumerable;var Yn=(s,e,t)=>e in s?Kc(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,R=(s,e)=>{for(var t in e||(e={}))Zn.call(e,t)&&Yn(s,t,e[t]);if(Cr)for(var t of Cr(e))Xn.call(e,t)&&Yn(s,t,e[t]);return s},oe=(s,e)=>Qc(s,eu(e));var gt=(s,e)=>{var t={};for(var r in s)Zn.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&Cr)for(var r of Cr(s))e.indexOf(r)<0&&Xn.call(s,r)&&(t[r]=s[r]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var tu=Object.defineProperty,ru=(s,e,t)=>e in s?tu(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,v=(s,e,t)=>ru(s,typeof e!="symbol"?e+"":e,t),Jn,su=Object.defineProperty,iu=(s,e,t)=>e in s?su(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,_s=(s,e,t)=>iu(s,typeof e!="symbol"?e+"":e,t),H=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(H||{});const qn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Kn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},xr={},nu=()=>!!globalThis.Zone;function qi(s){if(xr[s])return xr[s];const e=globalThis[s],t=e.prototype,r=s in qn?qn[s]:void 0,i=!!(r&&r.every(l=>{var a,c;return!!((c=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&c.toString().includes("[native code]"))})),n=s in Kn?Kn[s]:void 0,o=!!(n&&n.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(i&&o&&!nu())return xr[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const a=l.contentWindow;if(!a)return e.prototype;const c=a[s].prototype;return document.body.removeChild(l),c?xr[s]=c:t}catch(l){return t}}const Ls={};function ot(s,e,t){var r;const i=`${s}.${String(t)}`;if(Ls[i])return Ls[i].call(e);const n=qi(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(Ls[i]=o,o.call(e)):e[t]}const Ps={};function Ta(s,e,t){const r=`${s}.${String(t)}`;if(Ps[r])return Ps[r].bind(e);const n=qi(s)[t];return typeof n!="function"?e[t]:(Ps[r]=n,n.bind(e))}function ou(s){return ot("Node",s,"childNodes")}function au(s){return ot("Node",s,"parentNode")}function lu(s){return ot("Node",s,"parentElement")}function cu(s){return ot("Node",s,"textContent")}function uu(s,e){return Ta("Node",s,"contains")(e)}function hu(s){return Ta("Node",s,"getRootNode")()}function du(s){return!s||!("host"in s)?null:ot("ShadowRoot",s,"host")}function fu(s){return s.styleSheets}function pu(s){return!s||!("shadowRoot"in s)?null:ot("Element",s,"shadowRoot")}function mu(s,e){return ot("Element",s,"querySelector")(e)}function gu(s,e){return ot("Element",s,"querySelectorAll")(e)}function yu(){return qi("MutationObserver").constructor}function bu(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch(r){return()=>{}}}function vu(s){const e=s.tagName.toLowerCase(),t=s.id?`#${s.id}`:"",r=s.classList.length?"."+Array.from(s.classList).join("."):"";return`${e}${t}${r}`}function wu(s){var d;var e,t;const r=(d=(e=s.ownerDocument)==null?void 0:e.defaultView)!=null?d:window,i=s.getBoundingClientRect(),n=r.innerWidth||r.document.documentElement.clientWidth||0,o=r.innerHeight||r.document.documentElement.clientHeight||0,l=i.width>0&&i.height>0&&i.bottom>0&&i.right>0&&i.top<o&&i.left<n,a=(t=r.getComputedStyle)==null?void 0:t.call(r,s),u=!!a&&a.display!=="none"&&a.visibility!=="hidden"&&(parseFloat(a.opacity)||0)>0&&l;let h=0;if(u){const f=Math.max(0,Math.min(i.right,n)-Math.max(i.left,0)),m=Math.max(0,Math.min(i.bottom,o)-Math.max(i.top,0)),y=f*m,p=i.width*i.height;h=p>0?y/p:0}return{isVisible:u,ratio:h}}const de={childNodes:ou,parentNode:au,parentElement:lu,textContent:cu,contains:uu,getRootNode:hu,host:du,styleSheets:fu,shadowRoot:pu,querySelector:mu,querySelectorAll:gu,mutationObserver:yu,patch:bu,describeNode:vu,getElementVisibility:wu};function Jt(s){return s.nodeType===s.ELEMENT_NODE}function qt(s){const e=s&&"host"in s&&"mode"in s&&de.host(s)||null;return!!(e&&"shadowRoot"in e&&de.shadowRoot(e)===s)}function Kt(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function Su(s){return s.includes(" background-clip: text;")&&!s.includes(" -webkit-background-clip: text;")&&(s=s.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),s}function Cu(s){const{cssText:e}=s;if(e.split('"').length<3)return e;const t=["@import",`url(${JSON.stringify(s.href)})`];return s.layerName===""?t.push("layer"):s.layerName&&t.push(`layer(${s.layerName})`),s.supportsText&&t.push(`supports(${s.supportsText})`),s.media.length&&t.push(s.media.mediaText),t.join(" ")+";"}function oi(s){try{const e=s.rules||s.cssRules;if(!e)return null;let t=s.href;!t&&s.ownerNode&&s.ownerNode.ownerDocument&&(t=s.ownerNode.ownerDocument.location.href);const r=Array.from(e,i=>Oa(i,t)).join("");return Su(r)}catch(e){return null}}function Oa(s,e){if(Eu(s)){let t;try{t=oi(s.styleSheet)||Cu(s)}catch(r){t=s.cssText}return s.styleSheet.href?rs(t,s.styleSheet.href):t}else{let t=s.cssText;return s.type===CSSRule.KEYFRAMES_RULE||(s.type,CSSRule.KEYFRAME_RULE),Mu(s)&&s.selectorText.includes(":")&&(t=xu(t)),e?rs(t,e):t}}function xu(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function Eu(s){return"styleSheet"in s}function Mu(s){return"selectorText"in s}class Ki{constructor(){_s(this,"idNodeMap",new Map),_s(this,"nodeMetaMap",new WeakMap),_s(this,"selectorNodeMap",new Map)}getId(e){var t;if(!e)return-1;const r=(t=this.getMeta(e))==null?void 0:t.id;return r!=null?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t);const r=this.getMeta(e);if(r!=null&&r.selector){const i=this.selectorNodeMap.get(r.selector);i&&(i.delete(e),i.size===0&&this.selectorNodeMap.delete(r.selector))}e.childNodes&&e.childNodes.forEach(i=>this.removeNodeFromMap(i))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;if(this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t),t.selector){let i=this.selectorNodeMap.get(t.selector);i||(i=new Set,this.selectorNodeMap.set(t.selector,i)),i.add(e)}}replace(e,t){const r=this.getNode(e);if(r){const i=this.nodeMetaMap.get(r);if(i&&(this.nodeMetaMap.set(t,i),i.selector)){const n=this.selectorNodeMap.get(i.selector);n&&(n.delete(r),n.add(t))}}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap,this.selectorNodeMap=new Map}getNodeBySelector(e){const t=this.selectorNodeMap.get(e);return!t||t.size===0?null:t.values().next().value||null}getNodesBySelector(e){const t=this.selectorNodeMap.get(e);return t?Array.from(t):[]}hasSelector(e){const t=this.selectorNodeMap.get(e);return t!==void 0&&t.size>0}}function Da(){return new Ki}function es({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:n}){let o=i||"";const l=r&&it(r);return(e[t.toLowerCase()]||l&&e[l])&&(n?o=n(o,s):o="*".repeat(o.length)),o}function it(s){return s.toLowerCase()}const Qn="__rrweb_original__";function Au(s){const e=s.getContext("2d");if(!e)return!0;const t=50;for(let r=0;r<s.width;r+=t)for(let i=0;i<s.height;i+=t){const n=e.getImageData,o=Qn in n?n[Qn]:n;if(new Uint32Array(o.call(e,r,i,Math.min(t,s.width-r),Math.min(t,s.height-i)).data.buffer).some(a=>a!==0))return!1}return!0}function Iu(s,e){return!s||!e||s.type!==e.type?!1:s.type===H.Document?s.compatMode===e.compatMode:s.type===H.DocumentType?s.name===e.name&&s.publicId===e.publicId&&s.systemId===e.systemId:s.type===H.Comment||s.type===H.Text||s.type===H.CDATA?s.textContent===e.textContent:s.type===H.Element?s.tagName===e.tagName&&JSON.stringify(s.attributes)===JSON.stringify(e.attributes)&&s.isSVG===e.isSVG&&s.needBlock===e.needBlock:!1}function ts(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?it(e):null}function Qi(s,e){var n;let t;try{t=new URL(s,e!=null?e:window.location.href)}catch(o){return null}const r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return(n=i==null?void 0:i[1])!=null?n:null}function Nu(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const Ru=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Tu=/^(?:[a-z+]+:)?\/\//i,Ou=/^www\..*/i,Du=/^(data:)([^,]*),(.*)/i;function rs(s,e){return(s||"").replace(Ru,(t,r,i,n,o,l)=>{const a=i||o||l,c=r||n||"";if(!a)return t;if(Tu.test(a)||Ou.test(a))return`url(${c}${a}${c})`;if(Du.test(a))return`url(${c}${a}${c})`;if(a[0]==="/")return`url(${c}${Nu(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 Er(s,e=!1){return e?s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function $u(s,e,t=!1){const r=Array.from(e.childNodes),i=[];let n=0;if(r.length>1&&s&&typeof s=="string"){let o=Er(s,t);const l=o.length/s.length;for(let a=1;a<r.length;a++)if(r[a].textContent&&typeof r[a].textContent=="string"){const c=Er(r[a].textContent,t),u=100;let h=3;for(;h<c.length&&(c[h].match(/[a-zA-Z0-9]/)||c.indexOf(c.substring(0,h),1)!==-1);h++);for(;h<c.length;h++){let 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]===""&&r[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 i.push(s),i;h=u+1}else h===c.length-1&&(m=o.indexOf(d));if(f.length>=2&&h>u){const y=r[a-1].textContent;if(y&&typeof y=="string"){const p=Er(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<s.length;){if(n+=1,n>50*r.length)return i.push(s),i;const p=Er(s.substring(0,y),t);if(p.length===m){i.push(s.substring(0,y)),s=s.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 i.push(s),i}function ku(s,e){return $u(s,e).join("/* rr_split */")}function _u(s){var e;const t=de.parentNode(s),r=t&&t;return!r||!en(r)?!1:((e=s.textContent)==null?void 0:e.trim())!==""}function en(s){return de.getElementVisibility(s).isVisible}const Lu=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],Pu=["a","button","input","select","textarea","label","details","summary","dialog","video","audio"],Fu=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],tn=new WeakSet,zu=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(s,e,t){if(zu.call(this,s,e,t),this instanceof Element){const r=s.toLowerCase();Lu.includes(r)&&tn.add(this)}};const Bu=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(s,e,t){Bu.call(this,s,e,t)};function Wu(s){return s instanceof Element&&tn.has(s)}function Uu(s){if(s.nodeType===Node.ELEMENT_NODE){const e=s,t=e.tagName.toLowerCase();if(Pu.includes(t))return!0;const r=e.hasAttribute("tabindex")&&e.getAttribute("tabindex")!=="-1",i=["button","link","checkbox","switch","menuitem"].includes(e.getAttribute("role")||"");return Wu(e)||r||i||e instanceof HTMLAnchorElement&&e.hasAttribute("href")||e instanceof HTMLButtonElement&&!e.disabled}return!1}function eo(){document.querySelectorAll("*").forEach(e=>{Fu.forEach(t=>{e.hasAttribute(t)&&tn.add(e)})})}try{document.readyState==="complete"||document.readyState==="interactive"?eo():document.addEventListener("DOMContentLoaded",eo)}catch(s){}const Mr={ANCHOR:.4,PATH:.3,TARGET:.2,UNIQUENESS:.1},Oe={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},to=["form","main","nav","section","article","footer","header"],ro=["form","navigation","main","region","contentinfo","complementary","banner","search"],Hu=["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"],et={"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},$a=new Set(["id","class","style","xmlns","tabindex","contenteditable"]),Gu={maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:0,fallbackToBody:!0,includeUtilityClasses:!1,source:"dom-dsl"};function tr(s){if(/^[a-z]+-\d+$/i.test(s)||/^[a-z]+(-[a-z]+)+-\d+$/i.test(s)||/^[a-z]+(_[a-z]+)*_\d+$/i.test(s)||/^\d+$/.test(s)||/^:[a-z0-9]+:$/i.test(s)||/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i.test(s))return!0;if(/^[a-z]{1,3}[A-Za-z0-9]{8,}$/.test(s)){const e=/\d/.test(s),t=/[A-Z]/.test(s),r=s.length>=20;if(e&&t||r)return!0}return!!(/^radix-/.test(s)||/^mui-\d+$/.test(s))}const ka=new Set(["aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-activedescendant","for","form","list","headers","aria-details","aria-errormessage","aria-flowto"]);function _a(s){return s.trim().split(/\s+/).some(e=>tr(e))}let ju=class{constructor(e,t){var r;this.maxDepth=(r=e.maxPathDepth)!=null?r:10,this.cache=t}findAnchor(e){if(this.cache){const a=this.cache.getAnchor(e);if(a!==void 0)return a}const t=e.tagName.toLowerCase(),r=e.ownerDocument;if(t==="html"){const a={element:e,score:1,tier:"A",depth:0};return this.cacheResult(e,a),a}if(t==="head"||this.isInsideHead(e)){const a=r==null?void 0:r.documentElement;if(a){const c={element:a,score:1,tier:"A",depth:0};return this.cacheResult(e,c),c}}if(t==="body"){const a=r==null?void 0:r.documentElement;if(a){const c={element:a,score:1,tier:"A",depth:0};return this.cacheResult(e,c),c}}let i=e.parentElement,n=0,o=null;for(;i&&n<this.maxDepth;){if(i.tagName.toLowerCase()==="body")return o||{element:i,score:Oe.DEGRADED_SCORE,tier:"C",depth:n};const a=this.scoreAnchor(i);if(a>0){const c=this.applyDepthPenalty(a,n),u=this.getTier(i),h={element:i,score:c,tier:u,depth:n};if(u==="A")return h;(!o||c>o.score)&&(o=h)}i=i.parentElement,n++}const l=o;return this.cache&&this.cache.setAnchor(e,l),l}scoreAnchor(e){let t=0;const r=e.tagName.toLowerCase();to.includes(r)&&(t+=Oe.SEMANTIC_TAG);const i=e.getAttribute("role");i&&ro.includes(i)&&(t+=Oe.ROLE),(e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby"))&&(t+=Oe.ARIA_LABEL);const n=e.id;return n&&!tr(n)&&(t+=Oe.STABLE_ID),(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))&&(t+=Oe.TEST_MARKER),Math.min(t,1)}applyDepthPenalty(e,t){if(t<=Oe.DEPTH_PENALTY_THRESHOLD)return e;const r=(t-Oe.DEPTH_PENALTY_THRESHOLD)*Oe.DEPTH_PENALTY_FACTOR;return Math.max(0,e-r)}getTier(e){const t=e.tagName.toLowerCase();if(to.includes(t))return"A";const r=e.getAttribute("role");return r&&ro.includes(r)?"B":"C"}isInsideHead(e){let t=e.parentElement;for(;t;){const r=t.tagName.toLowerCase();if(r==="head")return!0;if(r==="body")return!1;t=t.parentElement}return!1}cacheResult(e,t){this.cache&&this.cache.setAnchor(e,t)}};const Yu=[/^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,}/],Zu=[/^\[/,/^(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 rn(s){return Yu.some(e=>e.test(s))}function sn(s){return s.length<=2||/^\d/.test(s)?!0:Zu.some(e=>e.test(s))}function Xu(s){return!rn(s)&&!sn(s)}function Ju(s){return s.filter(e=>Xu(e))}function qu(s){const e=[],t=[];for(const r of s)sn(r)||rn(r)?t.push(r):e.push(r);return{semantic:e,utility:t}}function so(s){return sn(s)||rn(s)}const io=s=>s.replace(/([#:.[\]@])/g,"\\$1");let Ku=class{constructor(e,t){var r;this.maxDepth=(r=e.maxPathDepth)!=null?r:10,this.cache=t}buildPath(e,t,r){const i=e.tagName.toLowerCase(),n=t.tagName.toLowerCase();if(i==="html"&&(n==="head"||n==="body"))return{path:[],degraded:!1};if(i==="html"&&this.isInsideHead(t))return this.buildHeadPath(e,t,r);const o=[];let l=t.parentElement;for(;l&&l!==e&&o.length<this.maxDepth;)o.unshift(l),l=l.parentElement;const a=o.length>=this.maxDepth&&l!==e;if(!a&&l!==e)return console.warn("[PathBuilder] Target is not a descendant of anchor"),{path:[],degraded:!0,degradationReason:"target-not-descendant-of-anchor"};let c=this.filterNoise(o);return c=this.ensureUniqueness(o,c,e,t,r),{path:c.map(u=>{const h=u.parentElement;let d;if(h){const f=Array.from(h.children).indexOf(u);f!==-1&&(d=f+1)}return{tag:u.tagName.toLowerCase(),semantics:r.extract(u),score:r.scoreElement(u),nthChild:d}}),degraded:a,degradationReason:a?"path-depth-overflow":void 0}}buildPathNodes(e,t,r){return this.buildPath(e,t,r).path}ensureUniqueness(e,t,r,i,n){const o=this.buildTestSelector(r,t,i);try{const l=i.ownerDocument;if(!l)return t;let a;if(this.cache){const u=this.cache.getSelectorResults(o);u!==void 0?a=u:(a=Array.from(l.querySelectorAll(o)),this.cache.setSelectorResults(o,a))}else a=l.querySelectorAll(o);if(a.length<=1)return t;const c=e.filter(u=>!t.includes(u));for(const u of c){if(n.scoreElement(u)<Vu.MIN_CONFIDENCE_FOR_SKIP)continue;const h=this.insertNodeInOrder(t,u,e),d=this.buildTestSelector(r,h,i);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,r){const i=r.indexOf(t),n=[...e];let o=0;for(let l=0;l<n.length&&!(r.indexOf(n[l])>i);l++)o=l+1;return n.splice(o,0,t),n}buildTestSelector(e,t,r){const i=[];i.push(this.elementToSelector(e));for(const n of t)i.push(this.elementToSelector(n));return i.push(this.elementToSelector(r)),i.join(" ")}elementToSelector(e){let t=e.tagName.toLowerCase();e.id&&!tr(e.id)&&(t+=`#${io(e.id)}`);for(const r of Array.from(e.classList))so(r)||(t+=`.${io(r)}`);return t}filterNoise(e){return e.filter(t=>this.shouldInclude(t))}shouldInclude(e){const t=e.tagName.toLowerCase();return Hu.includes(t)?!0:t==="div"||t==="span"?this.hasSemanticFeatures(e):!1}hasSemanticFeatures(e){if(e.hasAttribute("role"))return!0;for(const r of Array.from(e.attributes))if(r.name.startsWith("aria-"))return!0;if(e.classList.length>0){for(const r of Array.from(e.classList))if(!so(r))return!0}if(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))return!0;const t=e.id;return!!(t&&!tr(t))}isInsideHead(e){let t=e.parentElement;for(;t;){const r=t.tagName.toLowerCase();if(r==="head")return!0;if(r==="body")return!1;t=t.parentElement}return!1}buildHeadPath(e,t,r){const i=[];let n=t.parentElement;for(;n&&n!==e;)i.unshift(n),n=n.parentElement;return n!==e?{path:[],degraded:!0,degradationReason:"target-not-descendant-of-html"}:i.findIndex(o=>o.tagName.toLowerCase()==="head")===-1?{path:[],degraded:!0,degradationReason:"head-not-found-in-path"}:{path:i.map(o=>{const l=o.parentElement;let a;if(l){const c=Array.from(l.children).indexOf(o);c!==-1&&(a=c+1)}return{tag:o.tagName.toLowerCase(),semantics:r.extract(o),score:r.scoreElement(o),nthChild:a}}),degraded:!1}}};function Qu(s){return s?s.trim().replace(/[\n\t\r]/g," ").replace(/\s+/g," "):""}const eh={preserveQueryForAbsolute:!0,removeDynamicHashes:!0};function th(s){return s?[/\d{5,}/,/[a-f0-9]{8,}/i,/(session|token|temp|random|timestamp|nonce|cache)/i,/^\d+$/,/^[a-f0-9-]{32,}$/i].some(e=>e.test(s)):!1}function rh(s,e){if(!s)return s;const t=s.startsWith("http://")||s.startsWith("https://"),[r,i]=s.split("#"),[n,o]=r.split("?");let l=n;return t&&e.preserveQueryForAbsolute&&o&&(l+=`?${o}`),i&&(e.removeDynamicHashes&&th(i)||(l+=`#${i}`)),l}function La(s,e,t={}){if(!e)return e;const r=R(R({},eh),t);return s==="href"||s==="src"?rh(e,r):e}const sh=["role","aria-label","aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-level","aria-posinset","aria-setsize","aria-haspopup"],ih=["aria-selected","aria-checked","aria-pressed","aria-expanded","aria-hidden","aria-disabled","aria-current","aria-busy","aria-invalid","aria-grabbed","aria-live","aria-atomic"],nh=["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"],oh=["data-radix-","data-headlessui-","data-reach-","data-mui-","data-chakra-","data-mantine-","data-tw-"],ah=["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"],lh=["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"],ch=["data-category","data-action","data-label","data-value"],uh=["id","name","type","placeholder","title","for","alt","href"],hh=["disabled","checked","selected","hidden","readonly","required","value"],dh=[/^radix-/,/^headlessui-/,/^mui-/,/:\w+:/];function fh(s,e){return sh.includes(s)?!0:ih.includes(s)||nh.includes(s)||oh.some(t=>s.startsWith(t))?!1:ah.includes(s)?!0:lh.some(t=>s.startsWith(t))||ch.includes(s)?!1:s.startsWith("data-")&&s.endsWith("-id")?!0:s==="id"?!dh.some(t=>t.test(e)):uh.includes(s)?!0:hh.includes(s)?!1:!!s.startsWith("data-")}let no=class{constructor(e,t){var r;this.includeUtilityClasses=(r=e.includeUtilityClasses)!=null?r:!1,this.cache=t}extract(e){if(this.cache){const o=this.cache.getSemantics(e);if(o!==void 0)return o}const t={},r=e.id;if(r&&!tr(r)&&(t.id=r),e.classList.length>0){const o=Array.from(e.classList);if(this.includeUtilityClasses)t.classes=o;else{const{semantic:l}=qu(o);l.length>0&&(t.classes=l)}}const i=this.extractAttributes(e);Object.keys(i).length>0&&(t.attributes=i);const n=e.getAttribute("role");if(n&&(t.role=n),this.shouldExtractText(e)){const o=this.extractText(e);o&&(t.text=o)}return this.cache&&this.cache.setSemantics(e,t),t}scoreElement(e){let t=.5;const r=this.extract(e);return r.id&&(t+=.15),r.classes&&r.classes.length>0&&(t+=.1),r.attributes&&Object.keys(r.attributes).length>0&&(t+=.1),r.role&&(t+=.1),r.text&&(t+=.05),Math.min(t,1)}shouldIgnoreAttribute(e){return!!($a.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 et[e]!==void 0?et[e]:e.startsWith("data-")?et["data-*"]:e.startsWith("aria-")?et["aria-*"]:0}isDynamicValue(e){return[/^[a-f0-9]{32,}$/i,/^\d{10,}$/,/^(undefined|null|\[object)/,/^{{.*}}$/].some(t=>t.test(e))}extractAttributes(e){const t={};for(const r of Array.from(e.attributes)){const i=r.name;if(this.shouldIgnoreAttribute(i)||!fh(i,r.value)||ka.has(i)&&_a(r.value)||this.getAttributePriority(i)===0)continue;const n=i==="href"||i==="src"?La(i,r.value):r.value;!n||n.trim()===""||this.isDynamicValue(n)||(t[i]=n)}return t}extractText(e){const t=this.getDirectTextContent(e);if(!t)return null;const r=Qu(t);if(!r)return null;const i=100,n=t.length>i?t.slice(0,i)+"...":t,o=r.length>i?r.slice(0,i)+"...":r;return{raw:n,normalized:o}}getDirectTextContent(e){var r;const t=[];for(const i of Array.from(e.childNodes))if(i.nodeType===Node.TEXT_NODE&&i.textContent){const n=i.textContent.trim();n&&t.push(n)}return t.length>0?t.join(" "):(r=e.textContent)!=null?r:null}shouldExtractText(e){const t=e.tagName.toLowerCase();return["button","a","label","h1","h2","h3","h4","h5","h6","p","span","li","th","td","dt","dd","legend","figcaption","summary"].includes(t)}},ph=class{fingerprint(e){const t=e.tagName.toLowerCase(),r=this.getShape(t),i={shape:r,hasAnimation:this.hasAnimation(e)};if(r==="path"){const l=e.getAttribute("d");l&&(i.dHash=this.computePathHash(l))}else["circle","rect","ellipse","line"].includes(r)&&(i.geomHash=this.computeGeomHash(e,r));const n=e.getAttribute("role");n&&(i.role=n);const o=e.querySelector("title");return o!=null&&o.textContent&&(i.titleText=o.textContent.trim()),i}computePathHash(e){const t=this.normalizePathData(e);return this.simpleHash(t)}getShape(e){var t;return(t=["path","circle","rect","line","polyline","polygon","ellipse","g","text","use","svg"].find(r=>r===e))!=null?t:"path"}normalizePathData(e){var t;return((t=e.match(/[MLHVCSQTAZ][^MLHVCSQTAZ]*/gi))!=null?t:[]).slice(0,5).map(r=>r.trim().replace(/(-?\d+\.?\d*)/g,i=>parseFloat(i).toFixed(1))).join(" ")}computeGeomHash(e,t){var i,n,o,l,a,c,u,h,d;const r=[];switch(t){case"circle":r.push(`r=${(i=e.getAttribute("r"))!=null?i:"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&&r.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&&r.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);r.push(`angle=${g.toFixed(2)}`)}break}return this.simpleHash(r.join(";"))}hasAnimation(e){if(e.querySelector("animate, animateTransform, animateMotion"))return!0;const t=e.ownerDocument;if(t!=null&&t.defaultView)try{const r=t.defaultView.getComputedStyle(e);if(r.animationName!=="none"||r.transitionProperty!=="all"&&r.transitionProperty!=="none")return!0}catch(r){}return!1}simpleHash(e){let t=0;for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);t=(t<<5)-t+i,t=t&t}return Math.abs(t).toString(16).padStart(8,"0")}};function mh(s,e=0){const t=s.anchor.score,r=s.path.length>0?s.path.reduce((l,a)=>l+a.score,0)/s.path.length:.5,i=s.target.score,n=t*Mr.ANCHOR+r*Mr.PATH+i*Mr.TARGET+e*Mr.UNIQUENESS,o=s.anchor.degraded?.2:0;return Math.max(0,Math.min(1,n-o))}let gh=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 r=this.cache.keys().next().value;r!==void 0&&this.cache.delete(r)}this.cache.set(e,t)}has(e){return this.cache.has(e)}delete(e){this.cache.delete(e)}clear(){this.cache.clear()}get size(){return this.cache.size}},yh=class{constructor(e={}){var t,r;this.eidCache=new WeakMap,this.selectorResultCache=new gh((t=e.maxSelectorCacheSize)!=null?t:1e3),this.anchorCache=new WeakMap,this.semanticsCache=new WeakMap,this.stats={eidHits:0,eidMisses:0,selectorHits:0,selectorMisses:0,anchorHits:0,anchorMisses:0,semanticsHits:0,semanticsMisses:0,selectorCacheSize:0,maxSelectorCacheSize:(r=e.maxSelectorCacheSize)!=null?r:1e3}}getEID(e){const t=this.eidCache.get(e);if(t!==void 0)return this.stats.eidHits++,t;this.stats.eidMisses++}setEID(e,t){this.eidCache.set(e,t)}getSelectorResults(e){const t=this.selectorResultCache.get(e);if(t!==void 0)return this.stats.selectorHits++,this.stats.selectorCacheSize=this.selectorResultCache.size,t;this.stats.selectorMisses++,this.stats.selectorCacheSize=this.selectorResultCache.size}setSelectorResults(e,t){this.selectorResultCache.set(e,t),this.stats.selectorCacheSize=this.selectorResultCache.size}getAnchor(e){if(this.anchorCache.has(e))return this.stats.anchorHits++,this.anchorCache.get(e);this.stats.anchorMisses++}setAnchor(e,t){this.anchorCache.set(e,t)}getSemantics(e){const t=this.semanticsCache.get(e);if(t!==void 0)return this.stats.semanticsHits++,t;this.stats.semanticsMisses++}setSemantics(e,t){this.semanticsCache.set(e,t)}clear(){this.selectorResultCache.clear(),this.stats.selectorCacheSize=0,this.stats={eidHits:0,eidMisses:0,selectorHits:0,selectorMisses:0,anchorHits:0,anchorMisses:0,semanticsHits:0,semanticsMisses:0,selectorCacheSize:0,maxSelectorCacheSize:this.stats.maxSelectorCacheSize}}invalidateElement(e){}invalidateSelector(e){this.selectorResultCache.delete(e),this.stats.selectorCacheSize=this.selectorResultCache.size}getStats(){return oe(R({},this.stats),{selectorCacheSize:this.selectorResultCache.size})}getEIDHitRate(){const e=this.stats.eidHits+this.stats.eidMisses;return e>0?this.stats.eidHits/e:0}getSelectorHitRate(){const e=this.stats.selectorHits+this.stats.selectorMisses;return e>0?this.stats.selectorHits/e:0}getAnchorHitRate(){const e=this.stats.anchorHits+this.stats.anchorMisses;return e>0?this.stats.anchorHits/e:0}getSemanticsHitRate(){const e=this.stats.semanticsHits+this.stats.semanticsMisses;return e>0?this.stats.semanticsHits/e:0}getOverallHitRate(){const e=this.stats.eidHits+this.stats.selectorHits+this.stats.anchorHits+this.stats.semanticsHits,t=this.stats.eidMisses+this.stats.selectorMisses+this.stats.anchorMisses+this.stats.semanticsMisses,r=e+t;return r>0?e/r:0}};function bh(s){return new yh(s)}let Fs=null;function vh(){return Fs||(Fs=bh()),Fs}function oo(s){if(s.ownerDocument)return s.ownerDocument;let e=s;for(;e;){if(e.nodeType===9)return e;e=e.parentNode}throw new Error(`Element does not have an ownerDocument. This typically means:
|
|
2
|
+
"use strict";var eu=Object.defineProperty,tu=Object.defineProperties;var su=Object.getOwnPropertyDescriptors;var Cs=Object.getOwnPropertySymbols;var Jn=Object.prototype.hasOwnProperty,qn=Object.prototype.propertyIsEnumerable;var Xn=(r,e,t)=>e in r?eu(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,R=(r,e)=>{for(var t in e||(e={}))Jn.call(e,t)&&Xn(r,t,e[t]);if(Cs)for(var t of Cs(e))qn.call(e,t)&&Xn(r,t,e[t]);return r},ae=(r,e)=>tu(r,su(e));var gt=(r,e)=>{var t={};for(var s in r)Jn.call(r,s)&&e.indexOf(s)<0&&(t[s]=r[s]);if(r!=null&&Cs)for(var s of Cs(r))e.indexOf(s)<0&&qn.call(r,s)&&(t[s]=r[s]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var ru=Object.defineProperty,iu=(r,e,t)=>e in r?ru(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,v=(r,e,t)=>iu(r,typeof e!="symbol"?e+"":e,t),Kn,nu=Object.defineProperty,ou=(r,e,t)=>e in r?nu(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Lr=(r,e,t)=>ou(r,typeof e!="symbol"?e+"":e,t),H=(r=>(r[r.Document=0]="Document",r[r.DocumentType=1]="DocumentType",r[r.Element=2]="Element",r[r.Text=3]="Text",r[r.CDATA=4]="CDATA",r[r.Comment=5]="Comment",r))(H||{});const Qn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},eo={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},xs={},au=()=>!!globalThis.Zone;function Ki(r){if(xs[r])return xs[r];const e=globalThis[r],t=e.prototype,s=r in Qn?Qn[r]:void 0,i=!!(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=r in eo?eo[r]:void 0,o=!!(n&&n.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(i&&o&&!au())return xs[r]=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[r].prototype;return document.body.removeChild(l),c?xs[r]=c:t}catch(l){return t}}const Pr={};function ot(r,e,t){var s;const i=`${r}.${String(t)}`;if(Pr[i])return Pr[i].call(e);const n=Ki(r),o=(s=Object.getOwnPropertyDescriptor(n,t))==null?void 0:s.get;return o?(Pr[i]=o,o.call(e)):e[t]}const Fr={};function Da(r,e,t){const s=`${r}.${String(t)}`;if(Fr[s])return Fr[s].bind(e);const n=Ki(r)[t];return typeof n!="function"?e[t]:(Fr[s]=n,n.bind(e))}function lu(r){return ot("Node",r,"childNodes")}function cu(r){return ot("Node",r,"parentNode")}function uu(r){return ot("Node",r,"parentElement")}function hu(r){return ot("Node",r,"textContent")}function du(r,e){return Da("Node",r,"contains")(e)}function fu(r){return Da("Node",r,"getRootNode")()}function pu(r){return!r||!("host"in r)?null:ot("ShadowRoot",r,"host")}function mu(r){return r.styleSheets}function gu(r){return!r||!("shadowRoot"in r)?null:ot("Element",r,"shadowRoot")}function yu(r,e){return ot("Element",r,"querySelector")(e)}function bu(r,e){return ot("Element",r,"querySelectorAll")(e)}function vu(){return Ki("MutationObserver").constructor}function wu(r,e,t){try{if(!(e in r))return()=>{};const s=r[e],i=t(s);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:s}})),r[e]=i,()=>{r[e]=s}}catch(s){return()=>{}}}function Su(r){const e=r.tagName.toLowerCase(),t=r.id?`#${r.id}`:"",s=r.classList.length?"."+Array.from(r.classList).join("."):"";return`${e}${t}${s}`}function Cu(r){var d;var e,t;const s=(d=(e=r.ownerDocument)==null?void 0:e.defaultView)!=null?d:window,i=r.getBoundingClientRect(),n=s.innerWidth||s.document.documentElement.clientWidth||0,o=s.innerHeight||s.document.documentElement.clientHeight||0,l=i.width>0&&i.height>0&&i.bottom>0&&i.right>0&&i.top<o&&i.left<n,a=(t=s.getComputedStyle)==null?void 0:t.call(s,r),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(i.right,n)-Math.max(i.left,0)),m=Math.max(0,Math.min(i.bottom,o)-Math.max(i.top,0)),y=f*m,p=i.width*i.height;h=p>0?y/p:0}return{isVisible:u,ratio:h}}const de={childNodes:lu,parentNode:cu,parentElement:uu,textContent:hu,contains:du,getRootNode:fu,host:pu,styleSheets:mu,shadowRoot:gu,querySelector:yu,querySelectorAll:bu,mutationObserver:vu,patch:wu,describeNode:Su,getElementVisibility:Cu};function Xt(r){return r.nodeType===r.ELEMENT_NODE}function Jt(r){const e=r&&"host"in r&&"mode"in r&&de.host(r)||null;return!!(e&&"shadowRoot"in e&&de.shadowRoot(e)===r)}function qt(r){return Object.prototype.toString.call(r)==="[object ShadowRoot]"}function xu(r){return r.includes(" background-clip: text;")&&!r.includes(" -webkit-background-clip: text;")&&(r=r.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),r}function Eu(r){const{cssText:e}=r;if(e.split('"').length<3)return e;const t=["@import",`url(${JSON.stringify(r.href)})`];return r.layerName===""?t.push("layer"):r.layerName&&t.push(`layer(${r.layerName})`),r.supportsText&&t.push(`supports(${r.supportsText})`),r.media.length&&t.push(r.media.mediaText),t.join(" ")+";"}function ai(r){try{const e=r.rules||r.cssRules;if(!e)return null;let t=r.href;!t&&r.ownerNode&&r.ownerNode.ownerDocument&&(t=r.ownerNode.ownerDocument.location.href);const s=Array.from(e,i=>$a(i,t)).join("");return xu(s)}catch(e){return null}}function $a(r,e){if(Au(r)){let t;try{t=ai(r.styleSheet)||Eu(r)}catch(s){t=r.cssText}return r.styleSheet.href?sr(t,r.styleSheet.href):t}else{let t=r.cssText;return r.type===CSSRule.KEYFRAMES_RULE||(r.type,CSSRule.KEYFRAME_RULE),Iu(r)&&r.selectorText.includes(":")&&(t=Mu(t)),e?sr(t,e):t}}function Mu(r){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return r.replace(e,"$1\\$2")}function Au(r){return"styleSheet"in r}function Iu(r){return"selectorText"in r}class Qi{constructor(){Lr(this,"idNodeMap",new Map),Lr(this,"nodeMetaMap",new WeakMap),Lr(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 i=this.selectorNodeMap.get(s.selector);i&&(i.delete(e),i.size===0&&this.selectorNodeMap.delete(s.selector))}e.childNodes&&e.childNodes.forEach(i=>this.removeNodeFromMap(i))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const s=t.id;if(this.idNodeMap.set(s,e),this.nodeMetaMap.set(e,t),t.selector){let i=this.selectorNodeMap.get(t.selector);i||(i=new Set,this.selectorNodeMap.set(t.selector,i)),i.add(e)}}replace(e,t){const s=this.getNode(e);if(s){const i=this.nodeMetaMap.get(s);if(i&&(this.nodeMetaMap.set(t,i),i.selector)){const n=this.selectorNodeMap.get(i.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 ka(){return new Qi}function er({element:r,maskInputOptions:e,tagName:t,type:s,value:i,maskInputFn:n}){let o=i||"";const l=s&&it(s);return(e[t.toLowerCase()]||l&&e[l])&&(n?o=n(o,r):o="*".repeat(o.length)),o}function it(r){return r.toLowerCase()}const to="__rrweb_original__";function Nu(r){const e=r.getContext("2d");if(!e)return!0;const t=50;for(let s=0;s<r.width;s+=t)for(let i=0;i<r.height;i+=t){const n=e.getImageData,o=to in n?n[to]:n;if(new Uint32Array(o.call(e,s,i,Math.min(t,r.width-s),Math.min(t,r.height-i)).data.buffer).some(a=>a!==0))return!1}return!0}function Ru(r,e){return!r||!e||r.type!==e.type?!1:r.type===H.Document?r.compatMode===e.compatMode:r.type===H.DocumentType?r.name===e.name&&r.publicId===e.publicId&&r.systemId===e.systemId:r.type===H.Comment||r.type===H.Text||r.type===H.CDATA?r.textContent===e.textContent:r.type===H.Element?r.tagName===e.tagName&&JSON.stringify(r.attributes)===JSON.stringify(e.attributes)&&r.isSVG===e.isSVG&&r.needBlock===e.needBlock:!1}function tr(r){const e=r.type;return r.hasAttribute("data-rr-is-password")?"password":e?it(e):null}function en(r,e){var n;let t;try{t=new URL(r,e!=null?e:window.location.href)}catch(o){return null}const s=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(s);return(n=i==null?void 0:i[1])!=null?n:null}function Tu(r){let e="";return r.indexOf("//")>-1?e=r.split("/").slice(0,3).join("/"):e=r.split("/")[0],e=e.split("?")[0],e}const Ou=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Du=/^(?:[a-z+]+:)?\/\//i,$u=/^www\..*/i,ku=/^(data:)([^,]*),(.*)/i;function sr(r,e){return(r||"").replace(Ou,(t,s,i,n,o,l)=>{const a=i||o||l,c=s||n||"";if(!a)return t;if(Du.test(a)||$u.test(a))return`url(${c}${a}${c})`;if(ku.test(a))return`url(${c}${a}${c})`;if(a[0]==="/")return`url(${c}${Tu(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 Es(r,e=!1){return e?r.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):r.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function _u(r,e,t=!1){const s=Array.from(e.childNodes),i=[];let n=0;if(s.length>1&&r&&typeof r=="string"){let o=Es(r,t);const l=o.length/r.length;for(let a=1;a<s.length;a++)if(s[a].textContent&&typeof s[a].textContent=="string"){const c=Es(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 i.push(r),i;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=Es(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<r.length;){if(n+=1,n>50*s.length)return i.push(r),i;const p=Es(r.substring(0,y),t);if(p.length===m){i.push(r.substring(0,y)),r=r.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 i.push(r),i}function Lu(r,e){return _u(r,e).join("/* rr_split */")}function Pu(r){var e;const t=de.parentNode(r),s=t&&t;return!s||!tn(s)?!1:((e=r.textContent)==null?void 0:e.trim())!==""}function tn(r){return de.getElementVisibility(r).isVisible}const Fu=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],zu=["a","button","input","select","textarea","label","details","summary","dialog","video","audio"],Bu=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],sn=new WeakSet,Wu=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(r,e,t){if(Wu.call(this,r,e,t),this instanceof Element){const s=r.toLowerCase();Fu.includes(s)&&sn.add(this)}};const Uu=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(r,e,t){Uu.call(this,r,e,t)};function Vu(r){return r instanceof Element&&sn.has(r)}function Hu(r){if(r.nodeType===Node.ELEMENT_NODE){const e=r,t=e.tagName.toLowerCase();if(zu.includes(t))return!0;const s=e.hasAttribute("tabindex")&&e.getAttribute("tabindex")!=="-1",i=["button","link","checkbox","switch","menuitem"].includes(e.getAttribute("role")||"");return Vu(e)||s||i||e instanceof HTMLAnchorElement&&e.hasAttribute("href")||e instanceof HTMLButtonElement&&!e.disabled}return!1}function so(){document.querySelectorAll("*").forEach(e=>{Bu.forEach(t=>{e.hasAttribute(t)&&sn.add(e)})})}try{document.readyState==="complete"||document.readyState==="interactive"?so():document.addEventListener("DOMContentLoaded",so)}catch(r){}const Ms={ANCHOR:.4,PATH:.3,TARGET:.2,UNIQUENESS:.1},ke={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},Gu={MIN_CONFIDENCE_FOR_SKIP:.7},ro=["form","main","nav","section","article","footer","header"],io=["form","navigation","main","region","contentinfo","complementary","banner","search"],ju=["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"],et={"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},_a=new Set(["id","class","style","xmlns","tabindex","contenteditable"]),Yu={maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:0,fallbackToBody:!0,includeUtilityClasses:!1,source:"dom-dsl"};function es(r){if(/^[a-z]+-\d+$/i.test(r)||/^[a-z]+(-[a-z]+)+-\d+$/i.test(r)||/^[a-z]+(_[a-z]+)*_\d+$/i.test(r)||/^\d+$/.test(r)||/^:[a-z0-9]+:$/i.test(r)||/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i.test(r))return!0;if(/^[a-z]{1,3}[A-Za-z0-9]{8,}$/.test(r)){const e=/\d/.test(r),t=/[A-Z]/.test(r),s=r.length>=20;if(e&&t||s)return!0}return!!(/^radix-/.test(r)||/^mui-\d+$/.test(r))}const La=new Set(["aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-activedescendant","for","form","list","headers","aria-details","aria-errormessage","aria-flowto"]);function Pa(r){return r.trim().split(/\s+/).some(e=>es(e))}let Zu=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 i=e.parentElement,n=0,o=null;for(;i&&n<this.maxDepth;){if(i.tagName.toLowerCase()==="body")return o||{element:i,score:ke.DEGRADED_SCORE,tier:"C",depth:n};const a=this.scoreAnchor(i);if(a>0){const c=this.applyDepthPenalty(a,n),u=this.getTier(i),h={element:i,score:c,tier:u,depth:n};if(u==="A")return h;(!o||c>o.score)&&(o=h)}i=i.parentElement,n++}const l=o;return this.cache&&this.cache.setAnchor(e,l),l}scoreAnchor(e){let t=0;const s=e.tagName.toLowerCase();ro.includes(s)&&(t+=ke.SEMANTIC_TAG);const i=e.getAttribute("role");i&&io.includes(i)&&(t+=ke.ROLE),(e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby"))&&(t+=ke.ARIA_LABEL);const n=e.id;return n&&!es(n)&&(t+=ke.STABLE_ID),(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))&&(t+=ke.TEST_MARKER),Math.min(t,1)}applyDepthPenalty(e,t){if(t<=ke.DEPTH_PENALTY_THRESHOLD)return e;const s=(t-ke.DEPTH_PENALTY_THRESHOLD)*ke.DEPTH_PENALTY_FACTOR;return Math.max(0,e-s)}getTier(e){const t=e.tagName.toLowerCase();if(ro.includes(t))return"A";const s=e.getAttribute("role");return s&&io.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,}/],Ju=[/^\[/,/^(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 rn(r){return Xu.some(e=>e.test(r))}function nn(r){return r.length<=2||/^\d/.test(r)?!0:Ju.some(e=>e.test(r))}function qu(r){return!rn(r)&&!nn(r)}function Ku(r){return r.filter(e=>qu(e))}function Qu(r){const e=[],t=[];for(const s of r)nn(s)||rn(s)?t.push(s):e.push(s);return{semantic:e,utility:t}}function no(r){return nn(r)||rn(r)}const oo=r=>r.replace(/([#:.[\]@])/g,"\\$1");let eh=class{constructor(e,t){var s;this.maxDepth=(s=e.maxPathDepth)!=null?s:10,this.cache=t}buildPath(e,t,s){const i=e.tagName.toLowerCase(),n=t.tagName.toLowerCase();if(i==="html"&&(n==="head"||n==="body"))return{path:[],degraded:!1};if(i==="html"&&this.isInsideHead(t))return this.buildHeadPath(e,t,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,i,n){const o=this.buildTestSelector(s,t,i);try{const l=i.ownerDocument;if(!l)return t;let a;if(this.cache){const u=this.cache.getSelectorResults(o);u!==void 0?a=u:(a=Array.from(l.querySelectorAll(o)),this.cache.setSelectorResults(o,a))}else a=l.querySelectorAll(o);if(a.length<=1)return t;const c=e.filter(u=>!t.includes(u));for(const u of c){if(n.scoreElement(u)<Gu.MIN_CONFIDENCE_FOR_SKIP)continue;const h=this.insertNodeInOrder(t,u,e),d=this.buildTestSelector(s,h,i);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 i=s.indexOf(t),n=[...e];let o=0;for(let l=0;l<n.length&&!(s.indexOf(n[l])>i);l++)o=l+1;return n.splice(o,0,t),n}buildTestSelector(e,t,s){const i=[];i.push(this.elementToSelector(e));for(const n of t)i.push(this.elementToSelector(n));return i.push(this.elementToSelector(s)),i.join(" ")}elementToSelector(e){let t=e.tagName.toLowerCase();e.id&&!es(e.id)&&(t+=`#${oo(e.id)}`);for(const s of Array.from(e.classList))no(s)||(t+=`.${oo(s)}`);return t}filterNoise(e){return e.filter(t=>this.shouldInclude(t))}shouldInclude(e){const t=e.tagName.toLowerCase();return ju.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(!no(s))return!0}if(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))return!0;const t=e.id;return!!(t&&!es(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 i=[];let n=t.parentElement;for(;n&&n!==e;)i.unshift(n),n=n.parentElement;return n!==e?{path:[],degraded:!0,degradationReason:"target-not-descendant-of-html"}:i.findIndex(o=>o.tagName.toLowerCase()==="head")===-1?{path:[],degraded:!0,degradationReason:"head-not-found-in-path"}:{path:i.map(o=>{const l=o.parentElement;let a;if(l){const c=Array.from(l.children).indexOf(o);c!==-1&&(a=c+1)}return{tag:o.tagName.toLowerCase(),semantics:s.extract(o),score:s.scoreElement(o),nthChild:a}}),degraded:!1}}};function th(r){return r?r.trim().replace(/[\n\t\r]/g," ").replace(/\s+/g," "):""}const sh={preserveQueryForAbsolute:!0,removeDynamicHashes:!0};function rh(r){return r?[/\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(r)):!1}function ih(r,e){if(!r)return r;const t=r.startsWith("http://")||r.startsWith("https://"),[s,i]=r.split("#"),[n,o]=s.split("?");let l=n;return t&&e.preserveQueryForAbsolute&&o&&(l+=`?${o}`),i&&(e.removeDynamicHashes&&rh(i)||(l+=`#${i}`)),l}function Fa(r,e,t={}){if(!e)return e;const s=R(R({},sh),t);return r==="href"||r==="src"?ih(e,s):e}const nh=["role","aria-label","aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-level","aria-posinset","aria-setsize","aria-haspopup"],oh=["aria-selected","aria-checked","aria-pressed","aria-expanded","aria-hidden","aria-disabled","aria-current","aria-busy","aria-invalid","aria-grabbed","aria-live","aria-atomic"],ah=["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"],lh=["data-radix-","data-headlessui-","data-reach-","data-mui-","data-chakra-","data-mantine-","data-tw-"],ch=["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"],uh=["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"],hh=["data-category","data-action","data-label","data-value"],dh=["id","name","type","placeholder","title","for","alt","href"],fh=["disabled","checked","selected","hidden","readonly","required","value"],ph=[/^radix-/,/^headlessui-/,/^mui-/,/:\w+:/];function mh(r,e){return nh.includes(r)?!0:oh.includes(r)||ah.includes(r)||lh.some(t=>r.startsWith(t))?!1:ch.includes(r)?!0:uh.some(t=>r.startsWith(t))||hh.includes(r)?!1:r.startsWith("data-")&&r.endsWith("-id")?!0:r==="id"?!ph.some(t=>t.test(e)):dh.includes(r)?!0:fh.includes(r)?!1:!!r.startsWith("data-")}let ao=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&&!es(s)&&(t.id=s),e.classList.length>0){const o=Array.from(e.classList);if(this.includeUtilityClasses)t.classes=o;else{const{semantic:l}=Qu(o);l.length>0&&(t.classes=l)}}const i=this.extractAttributes(e);Object.keys(i).length>0&&(t.attributes=i);const n=e.getAttribute("role");if(n&&(t.role=n),this.shouldExtractText(e)){const o=this.extractText(e);o&&(t.text=o)}return this.cache&&this.cache.setSemantics(e,t),t}scoreElement(e){let t=.5;const 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!!(_a.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 et[e]!==void 0?et[e]:e.startsWith("data-")?et["data-*"]:e.startsWith("aria-")?et["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 i=s.name;if(this.shouldIgnoreAttribute(i)||!mh(i,s.value)||La.has(i)&&Pa(s.value)||this.getAttributePriority(i)===0)continue;const n=i==="href"||i==="src"?Fa(i,s.value):s.value;!n||n.trim()===""||this.isDynamicValue(n)||(t[i]=n)}return t}extractText(e){const t=this.getDirectTextContent(e);if(!t)return null;const s=th(t);if(!s)return null;const i=100,n=t.length>i?t.slice(0,i)+"...":t,o=s.length>i?s.slice(0,i)+"...":s;return{raw:n,normalized:o}}getDirectTextContent(e){var s;const t=[];for(const i of Array.from(e.childNodes))if(i.nodeType===Node.TEXT_NODE&&i.textContent){const n=i.textContent.trim();n&&t.push(n)}return t.length>0?t.join(" "):(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)}},gh=class{fingerprint(e){const t=e.tagName.toLowerCase(),s=this.getShape(t),i={shape:s,hasAnimation:this.hasAnimation(e)};if(s==="path"){const l=e.getAttribute("d");l&&(i.dHash=this.computePathHash(l))}else["circle","rect","ellipse","line"].includes(s)&&(i.geomHash=this.computeGeomHash(e,s));const n=e.getAttribute("role");n&&(i.role=n);const o=e.querySelector("title");return o!=null&&o.textContent&&(i.titleText=o.textContent.trim()),i}computePathHash(e){const t=this.normalizePathData(e);return this.simpleHash(t)}getShape(e){var t;return(t=["path","circle","rect","line","polyline","polygon","ellipse","g","text","use","svg"].find(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,i=>parseFloat(i).toFixed(1))).join(" ")}computeGeomHash(e,t){var i,n,o,l,a,c,u,h,d;const s=[];switch(t){case"circle":s.push(`r=${(i=e.getAttribute("r"))!=null?i:"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 i=e.charCodeAt(s);t=(t<<5)-t+i,t=t&t}return Math.abs(t).toString(16).padStart(8,"0")}};function yh(r,e=0){const t=r.anchor.score,s=r.path.length>0?r.path.reduce((l,a)=>l+a.score,0)/r.path.length:.5,i=r.target.score,n=t*Ms.ANCHOR+s*Ms.PATH+i*Ms.TARGET+e*Ms.UNIQUENESS,o=r.anchor.degraded?.2:0;return Math.max(0,Math.min(1,n-o))}let bh=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}},vh=class{constructor(e={}){var t,s;this.eidCache=new WeakMap,this.selectorResultCache=new bh((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 ae(R({},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 wh(r){return new vh(r)}let zr=null;function Sh(){return zr||(zr=wh()),zr}function lo(r){if(r.ownerDocument)return r.ownerDocument;let e=r;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 Ch(r,e){if(!e)return;const t=lo(r),s=e instanceof Document?e:lo(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 Sh(s,e={}){var $,B,W,N;var t;if(!s||!s.ownerDocument||!s.isConnected)return null;const r=R(R({},Gu),e);if(r.root)try{wh(s,r.root)}catch(T){return console.error("Cross-document generation detected:",T),null}const i=($=r.cache)!=null?$:vh(),n=i.getEID(s);if(n!==void 0)return n;if(s.tagName.toLowerCase()==="html"){const T=new no(r,i),D=Eh(s,r,T);return i.setEID(s,D),D}const o=new ju(r,i),l=new Ku(r,i),a=new no(r,i),c=new ph,u=o.findAnchor(s);if(!u&&!r.fallbackToBody)return null;const h=(W=(B=u==null?void 0:u.element)!=null?B:(t=s.ownerDocument)==null?void 0:t.body)!=null?W: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 T=Array.from(m.children).indexOf(h);T!==-1&&(y=T+1)}const p=a.extract(h),g={tag:h.tagName.toLowerCase(),semantics:p,score:(N=u==null?void 0:u.score)!=null?N:Oe.DEGRADED_SCORE,degraded:d,nthChild:y},w=l.buildPath(h,s,a),S=a.extract(s);r.enableSvgFingerprint&&Ch(s)&&(S.svg=c.fingerprint(s));const b=s.parentElement;let C;if(b){const T=Array.from(b.children).indexOf(s);T!==-1&&(C=T+1)}const x={tag:s.tagName.toLowerCase(),semantics:S,score:a.scoreElement(s),nthChild:C},M=[],E={onMultiple:"best-score",onMissing:"anchor-only",maxDepth:3},k=g.degraded||w.degraded,_=xh(g.degraded,w),L={version:"1.0",anchor:g,path:w.path,target:x,constraints:M,fallback:E,meta:{confidence:0,generatedAt:new Date().toISOString(),generator:"dom-eid@1.0",source:r.source,degraded:k,degradationReason:_}};return L.meta.confidence=mh(L),L.meta.confidence<r.confidenceThreshold?null:(i.setEID(s,L),L)}function Ch(s){return s.namespaceURI==="http://www.w3.org/2000/svg"||s.tagName.toLowerCase()==="svg"||s instanceof SVGElement}function xh(s,e){if(s&&e.degraded)return"anchor-and-path-degraded";if(s)return"no-semantic-anchor";if(e.degraded)return e.degradationReason}function Eh(s,e,t,r){const i={tag:"html",semantics:t.extract(s),score:1,degraded:!1,nthChild:void 0};return{version:"1.0",anchor:i,path:[],target:i,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 Pa={maxClasses:2,maxAttributes:5,includeText:!0,maxTextLength:50,simplifyTarget:!0,includeConstraints:!0};function ao(s){return s==="id"?101:et[s]!==void 0?et[s]:s.startsWith("data-")?et["data-*"]:s.startsWith("aria-")?et["aria-*"]:0}function Mh(s){return["id","data-testid","data-qa","data-cy","href","text","role"].includes(s)}function Ah(s){return!!(/@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/.test(s)||/(\+?\d{1,3}[-.\s]?)?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}/.test(s)||/\d{4}[-\s]?\d{4}[-\s]?\d{4}[-\s]?\d{4}/.test(s))}function Ih(s,e){const t=R(R({},Pa),e),r=`v${s.version}`,i=zs(s.anchor,!1,t),n=s.path.length>0?s.path.map(a=>zs(a,!1,t)).join(" > ")+" > ":"",o=zs(s.target,!0,t),l=t.includeConstraints?Nh(s):"";return`${r}: ${i} :: ${n}${o}${l}`}function zs(s,e=!1,t=Pa){const{tag:r,semantics:i}=s;let n=r;const o=[],l=R({},i.attributes);i.id&&(l.id=i.id),i.role&&!l.role&&(l.role=i.role);const a=Object.entries(l).map(([h,d])=>{const f=ao(h),m=h==="href"||h==="src"?La(h,d):d;return{name:h,value:m,priority:f}}).filter(h=>h.name!=="id"&&h.name!=="class"&&$a.has(h.name)||ka.has(h.name)&&_a(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}="${ai(d)}"`);if(t.includeText&&i.text&&!Ah(i.text.normalized)){const h=i.text.normalized;h.length>0&&h.length<=t.maxTextLength&&o.push(`text="${ai(h)}"`)}let u=o;if(o.length>0&&(e&&t.simplifyTarget&&i.id&&(u=o.filter(h=>{const d=h.split("=")[0];return ao(d)>=60||d==="text"||d==="id"||d==="role"})),u.length>0&&u.sort((h,d)=>h.localeCompare(d))),i.classes&&i.classes.length>0){const h=Ju(i.classes),d=!!i.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 s&&s.nthChild){const h=!!i.id||i.attributes&&Object.keys(i.attributes).some(Mh);e&&t.simplifyTarget&&h||(n+=`#${s.nthChild}`)}return n}function Nh(s){if(!s.constraints||s.constraints.length===0)return"";const e=[];for(const t of s.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 r=ai(String(t.params.reference));e.push(`text="${r}"`)}break}return e.length===0?"":` {${e.join(",")}}`}function ai(s){return s.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/>/g,"\\>").replace(/:/g,"\\:")}function Rh(s,e,t){const r=Sh(s,e);return r?Ih(r,t):null}let Th=1;const Oh=new RegExp("[^a-z0-9-_:]"),rr=-2;function Fa(){return Th++}function Dh(s){if(s instanceof HTMLFormElement)return"form";const e=it(s.tagName);return Oh.test(e)?"div":e}let yt,lo;const $h=/^[^ \t\n\r\u000c]+/,kh=/^[, \t\n\r\u000c]+/;function _h(s,e){if(e.trim()==="")return e;let t=0;function r(n){let o;const l=n.exec(e.substring(t));return l?(o=l[0],t+=o.length,o):""}const i=[];for(;r(kh),!(t>=e.length);){let n=r($h);if(n.slice(-1)===",")n=St(s,n.substring(0,n.length-1)),i.push(n);else{let o="";n=St(s,n);let l=!1;for(;;){const a=e.charAt(t);if(a===""){i.push((n+o).trim());break}else if(l)a===")"&&(l=!1);else if(a===","){t+=1,i.push((n+o).trim());break}else a==="("&&(l=!0);o+=a,t+=1}}}return i.join(", ")}const co=new WeakMap;function St(s,e){return!e||e.trim()===""?e:nn(s,e)}function Lh(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function nn(s,e){let t=co.get(s);if(t||(t=s.createElement("a"),co.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function za(s,e,t,r){return r&&(t==="src"||t==="href"&&!(e==="use"&&r[0]==="#")||t==="xlink:href"&&r[0]!=="#"||t==="background"&&(e==="table"||e==="td"||e==="th")?St(s,r):t==="srcset"?_h(s,r):t==="style"?rs(r,nn(s)):e==="object"&&t==="data"?St(s,r):r)}function Ba(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function li(s,e){return e?typeof e=="string"?s.includes(e):e.test(s):!1}function Ph(s,e,t){try{if(typeof e=="string"){if(s.classList.contains(e))return!0}else for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}if(t)return s.matches(t)}catch(r){}return!1}function ss(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?ss(de.parentNode(s),e,t):!1;for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}return t?ss(de.parentNode(s),e,t):!1}function Wa(s,e,t,r){let i;if(Jt(s)){if(i=s,!de.childNodes(i).length)return!1}else{if(de.parentElement(s)===null)return!1;i=de.parentElement(s)}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(ss(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch(n){}return!1}function Fh(s,e,t){const r=s.contentWindow;if(!r)return;let i=!1,n;try{n=r.document.readyState}catch(l){return}if(n!=="complete"){const l=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener("load",()=>{clearTimeout(l),i=!0,e()});return}const o="about:blank";if(r.location.href!==o||s.src===o||s.src==="")return setTimeout(e,0),s.addEventListener("load",e);s.addEventListener("load",e)}function zh(s,e,t){let r=!1,i;try{i=s.sheet}catch(o){return}if(i)return;const n=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener("load",()=>{clearTimeout(n),r=!0,e()})}function Bh(s,e){const{doc:t,mirror:r,blockClass:i,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,w=Wh(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:H.Document,childNodes:[],compatMode:s.compatMode}:{type:H.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return{type:H.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:w};case s.ELEMENT_NODE:return Vh(s,{doc:t,blockClass:i,blockSelector:n,excludeAttribute:o,inlineStylesheet:a,maskInputOptions:c,maskInputFn:h,dataURLOptions:d,inlineImages:f,recordCanvas:m,keepIframeSrcFn:y,newlyAddedElement:p,rootId:w});case s.TEXT_NODE:return Uh(s,{doc:t,needsMask:l,maskTextFn:u,rootId:w,cssCaptured:g});case s.CDATA_SECTION_NODE:return{type:H.CDATA,textContent:"",rootId:w};case s.COMMENT_NODE:return{type:H.Comment,textContent:de.textContent(s)||"",rootId:w};default:return!1}}function Wh(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}function Uh(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:n}=e,o=de.parentNode(s),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=de.textContent(s),c&&a&&(a=rs(a,nn(e.doc)))),!c&&!u&&a&&t&&(a=r?r(a,de.parentElement(s)):a.replace(/[\S]/g,"*")),{type:H.Text,textContent:a||"",rootId:i}}function Vh(s,e){const{doc:t,blockClass:r,blockSelector:i,excludeAttribute:n,inlineStylesheet:o,maskInputOptions:l={},maskInputFn:a,dataURLOptions:c={},inlineImages:u,recordCanvas:h,keepIframeSrcFn:d,newlyAddedElement:f=!1,rootId:m}=e,y=Ph(s,r,i),p=Dh(s);let g={};const w=s.attributes.length;for(let b=0;b<w;b++){const C=s.attributes[b];li(C.name,n)||Ba(p,C.name,C.value)||(g[C.name]=za(t,p,it(C.name),C.value))}if(p==="link"&&o){const b=Array.from(t.styleSheets).find(x=>x.href===s.href);let C=null;b&&(C=oi(b)),C&&(delete g.rel,delete g.href,g._cssText=C)}if(p==="style"&&s.sheet){let b=oi(s.sheet);b&&(s.childNodes.length>1&&(b=ku(b,s)),g._cssText=b)}if(p==="input"||p==="textarea"||p==="select"){const b=s.value,C=s.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&b?g.value=es({element:s,type:ts(s),tagName:p,value:b,maskInputOptions:l,maskInputFn:a}):C&&(g.checked=C)}if(p==="option"&&(s.selected&&!l.select?g.selected=!0:delete g.selected),p==="dialog"&&s.open&&(g.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),p==="canvas"&&h){if(s.__context==="2d")Au(s)||(g.rr_dataURL=s.toDataURL(c.type,c.quality));else if(!("__context"in s)){const b=s.toDataURL(c.type,c.quality),C=t.createElement("canvas");C.width=s.width,C.height=s.height;const x=C.toDataURL(c.type,c.quality);b!==x&&(g.rr_dataURL=b)}}if(p==="img"&&u){yt||(yt=t.createElement("canvas"),lo=yt.getContext("2d"));const b=s,C=b.currentSrc||b.getAttribute("src")||"<unknown-src>",x=b.crossOrigin,M=()=>{b.removeEventListener("load",M);try{yt.width=b.naturalWidth,yt.height=b.naturalHeight,lo.drawImage(b,0,0),g.rr_dataURL=yt.toDataURL(c.type,c.quality)}catch(E){if(b.crossOrigin!=="anonymous"){b.crossOrigin="anonymous",b.complete&&b.naturalWidth!==0?M():b.addEventListener("load",M);return}else console.warn(`Cannot inline img src=${C}! Error: ${E}`)}b.crossOrigin==="anonymous"&&(x?g.crossOrigin=x:b.removeAttribute("crossorigin"))};b.complete&&b.naturalWidth!==0?M():b.addEventListener("load",M)}if(p==="audio"||p==="video"){const b=g;b.rr_mediaState=s.paused?"paused":"played",b.rr_mediaCurrentTime=s.currentTime,b.rr_mediaPlaybackRate=s.playbackRate,b.rr_mediaMuted=s.muted,b.rr_mediaLoop=s.loop,b.rr_mediaVolume=s.volume}if(f||(s.scrollLeft&&(g.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(g.rr_scrollTop=s.scrollTop)),y){const{width:b,height:C}=s.getBoundingClientRect();g={class:g.class,rr_width:`${b}px`,rr_height:`${C}px`}}p==="iframe"&&!d(g.src)&&(s.contentDocument||(g.rr_src=g.src),delete g.src);let S;try{customElements.get(p)&&(S=!0)}catch(b){}return{type:H.Element,tagName:p,attributes:g,childNodes:[],isSVG:Lh(s)||void 0,needBlock:y,rootId:m,isCustom:S}}function Q(s){return s==null?"":s.toLowerCase()}function Hh(s,e){if(e.comment&&s.type===H.Comment)return!0;if(s.type===H.Element){if(e.script&&(s.tagName==="script"||s.tagName==="link"&&(s.attributes.rel==="preload"&&s.attributes.as==="script"||s.attributes.rel==="modulepreload")||s.tagName==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&Qi(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(Q(s.attributes.name).match(/^msapplication-tile(image|color)$/)||Q(s.attributes.name)==="application-name"||Q(s.attributes.rel)==="icon"||Q(s.attributes.rel)==="apple-touch-icon"||Q(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&Q(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(Q(s.attributes.property).match(/^(og|twitter|fb):/)||Q(s.attributes.name).match(/^(og|twitter):/)||Q(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(Q(s.attributes.name)==="robots"||Q(s.attributes.name)==="googlebot"||Q(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(Q(s.attributes.name)==="author"||Q(s.attributes.name)==="generator"||Q(s.attributes.name)==="framework"||Q(s.attributes.name)==="publisher"||Q(s.attributes.name)==="progid"||Q(s.attributes.property).match(/^article:/)||Q(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(Q(s.attributes.name)==="google-site-verification"||Q(s.attributes.name)==="yandex-verification"||Q(s.attributes.name)==="csrf-token"||Q(s.attributes.name)==="p:domain_verify"||Q(s.attributes.name)==="verify-v1"||Q(s.attributes.name)==="verification"||Q(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ct(s,e){const{doc:t,mirror:r,blockClass:i,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:w,onIframeLoad:S,iframeLoadTimeout:b=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:M=()=>!1,newlyAddedElement:E=!1,cssCaptured:k=!1,selectorOptions:_}=e;let{needsMask:L}=e,{preserveWhiteSpace:$=!0}=e;L||(L=Wa(s,o,l,L===void 0));const B=Bh(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,excludeAttribute:a,needsMask:L,inlineStylesheet:u,maskInputOptions:h,maskTextFn:d,maskInputFn:f,dataURLOptions:y,inlineImages:p,recordCanvas:g,keepIframeSrcFn:M,newlyAddedElement:E,cssCaptured:k});if(!B)return console.warn(s,"not serialized"),null;let W;r.hasNode(s)?W=r.getId(s):Hh(B,m)||!$&&B.type===H.Text&&!B.textContent.replace(/^\s+|\s+$/gm,"").length?W=rr:W=Fa();const N=Object.assign(B,{id:W});if(Jt(s)||s.nodeType===Node.TEXT_NODE){if(Jt(s)&&_!==null&&_!==void 0)try{const U={maxPathDepth:_.maxPathDepth,enableSvgFingerprint:_.enableSvgFingerprint,fallbackToBody:_.fallbackToBody},K=Rh(s,U);K&&(N.selector=K)}catch(U){console.warn("Failed to generate SEQL selector:",U)}s.nodeType===Node.TEXT_NODE&&(N.isVisible=_u(s)),s.nodeType===Node.ELEMENT_NODE&&(N.isVisible=en(s),N.isInteractive=Uu(s))}if(r.add(s,N),W===rr)return null;w&&w(s);let T=!c;if(N.type===H.Element){T=T&&!N.needBlock,delete N.needBlock;const U=de.shadowRoot(s);U&&Kt(U)&&(N.isShadowHost=!0)}if((N.type===H.Document||N.type===H.Element)&&T){m.headWhitespace&&N.type===H.Element&&N.tagName==="head"&&($=!1);const U={doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:L,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:$,onSerialize:w,onIframeLoad:S,iframeLoadTimeout:b,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:M,cssCaptured:!1,selectorOptions:_};if(!(N.type===H.Element&&N.tagName==="textarea"&&N.attributes.value!==void 0)){N.type===H.Element&&N.attributes._cssText!==void 0&&typeof N.attributes._cssText=="string"&&(U.cssCaptured=!0);for(const ce of Array.from(de.childNodes(s))){const ee=Ct(ce,U);ee&&N.childNodes.push(ee)}}let K=null;if(Jt(s)&&(K=de.shadowRoot(s)))for(const ce of Array.from(de.childNodes(K))){const ee=Ct(ce,U);ee&&(Kt(K)&&(ee.isShadow=!0),N.childNodes.push(ee))}}const D=de.parentNode(s);return D&&qt(D)&&Kt(D)&&(N.isShadow=!0),N.type===H.Element&&N.tagName==="iframe"&&Fh(s,()=>{const U=s.contentDocument;if(U&&S){const K=Ct(U,{doc:U,mirror:r,blockClass:i,blockSelector:n,needsMask:L,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:$,onSerialize:w,onIframeLoad:S,iframeLoadTimeout:b,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:M,selectorOptions:_});K&&S(s,K)}},b),N.type===H.Element&&N.tagName==="link"&&typeof N.attributes.rel=="string"&&(N.attributes.rel==="stylesheet"||N.attributes.rel==="preload"&&typeof N.attributes.href=="string"&&Qi(N.attributes.href)==="css")&&zh(s,()=>{if(C){const U=Ct(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:L,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:$,onSerialize:w,onIframeLoad:S,iframeLoadTimeout:b,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:M,selectorOptions:_});U&&C(s,U)}},x),N}function Gh(s,e){var L,$,B,W;const{mirror:t=new Ki,blockClass:r="rr-block",blockSelector:i=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:w,iframeLoadTimeout:S,onStylesheetLoad:b,stylesheetLoadTimeout:C,keepIframeSrcFn:x=()=>!1,selector:M}=e||{},E=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,k=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,_=M===!1?null:M===!0?{maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:.3,fallbackToBody:!0}:M===void 0?{maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:.3,fallbackToBody:!0}:{maxPathDepth:(L=M.maxPathDepth)!=null?L:10,enableSvgFingerprint:($=M.enableSvgFingerprint)!=null?$:!0,confidenceThreshold:(B=M.confidenceThreshold)!=null?B:.3,fallbackToBody:(W=M.fallbackToBody)!=null?W:!0};return Ct(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:n,maskTextSelector:o,excludeAttribute:l,skipChild:!1,inlineStylesheet:a,maskInputOptions:E,maskTextFn:d,maskInputFn:f,slimDOMOptions:k,dataURLOptions:y,inlineImages:c,recordCanvas:u,preserveWhiteSpace:p,onSerialize:g,onIframeLoad:w,iframeLoadTimeout:S,onStylesheetLoad:b,stylesheetLoadTimeout:C,keepIframeSrcFn:x,newlyAddedElement:!1,selectorOptions:_})}const jh=/(max|min)-device-(width|height)/,uo=new RegExp(jh.source,"g"),Yh={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(s){s.params.match(uo)&&(s.params=s.params.replace(uo,"$1-$2"))}}}},Zh={postcssPlugin:"postcss-hover-classes",prepare:function(){const s=[];return{Rule:function(e){s.indexOf(e)===-1&&(s.push(e),e.selectors.forEach(function(t){t.includes(":hover")&&(e.selector+=`,
|
|
12
|
-
`+t.replace(/:hover/g,".\\:hover"))}))}}}},
|
|
13
|
-
`+S+i("^")}let m=
|
|
14
|
-
`+m+i("^")}return" "+
|
|
11
|
+
Solution: Ensure element and root parameter are from the same document context.`)}function xh(r,e={}){var _,B,W,N;var t;if(!r||!r.ownerDocument||!r.isConnected)return null;const s=R(R({},Yu),e);if(s.root)try{Ch(r,s.root)}catch(T){return console.error("Cross-document generation detected:",T),null}const i=(_=s.cache)!=null?_:Sh(),n=i.getEID(r);if(n!==void 0)return n;if(r.tagName.toLowerCase()==="html"){const T=new ao(s,i),D=Ah(r,s,T);return i.setEID(r,D),D}const o=new Zu(s,i),l=new eh(s,i),a=new ao(s,i),c=new gh,u=o.findAnchor(r);if(!u&&!s.fallbackToBody)return null;const h=(W=(B=u==null?void 0:u.element)!=null?B:(t=r.ownerDocument)==null?void 0:t.body)!=null?W: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 T=Array.from(m.children).indexOf(h);T!==-1&&(y=T+1)}const p=a.extract(h),g={tag:h.tagName.toLowerCase(),semantics:p,score:(N=u==null?void 0:u.score)!=null?N:ke.DEGRADED_SCORE,degraded:d,nthChild:y},w=l.buildPath(h,r,a),S=a.extract(r);s.enableSvgFingerprint&&Eh(r)&&(S.svg=c.fingerprint(r));const b=r.parentElement;let C;if(b){const T=Array.from(b.children).indexOf(r);T!==-1&&(C=T+1)}const x={tag:r.tagName.toLowerCase(),semantics:S,score:a.scoreElement(r),nthChild:C},M=[],E={onMultiple:"best-score",onMissing:"anchor-only",maxDepth:3},$=g.degraded||w.degraded,k=Mh(g.degraded,w),L={version:"1.0",anchor:g,path:w.path,target:x,constraints:M,fallback:E,meta:{confidence:0,generatedAt:new Date().toISOString(),generator:"dom-eid@1.0",source:s.source,degraded:$,degradationReason:k}};return L.meta.confidence=yh(L),L.meta.confidence<s.confidenceThreshold?null:(i.setEID(r,L),L)}function Eh(r){return r.namespaceURI==="http://www.w3.org/2000/svg"||r.tagName.toLowerCase()==="svg"||r instanceof SVGElement}function Mh(r,e){if(r&&e.degraded)return"anchor-and-path-degraded";if(r)return"no-semantic-anchor";if(e.degraded)return e.degradationReason}function Ah(r,e,t,s){const i={tag:"html",semantics:t.extract(r),score:1,degraded:!1,nthChild:void 0};return{version:"1.0",anchor:i,path:[],target:i,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 za={maxClasses:2,maxAttributes:5,includeText:!0,maxTextLength:50,simplifyTarget:!0,includeConstraints:!0};function co(r){return r==="id"?101:et[r]!==void 0?et[r]:r.startsWith("data-")?et["data-*"]:r.startsWith("aria-")?et["aria-*"]:0}function Ih(r){return["id","data-testid","data-qa","data-cy","href","text","role"].includes(r)}function Nh(r){return!!(/@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/.test(r)||/(\+?\d{1,3}[-.\s]?)?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}/.test(r)||/\d{4}[-\s]?\d{4}[-\s]?\d{4}[-\s]?\d{4}/.test(r))}function Rh(r,e){const t=R(R({},za),e),s=`v${r.version}`,i=Br(r.anchor,!1,t),n=r.path.length>0?r.path.map(a=>Br(a,!1,t)).join(" > ")+" > ":"",o=Br(r.target,!0,t),l=t.includeConstraints?Th(r):"";return`${s}: ${i} :: ${n}${o}${l}`}function Br(r,e=!1,t=za){const{tag:s,semantics:i}=r;let n=s;const o=[],l=R({},i.attributes);i.id&&(l.id=i.id),i.role&&!l.role&&(l.role=i.role);const a=Object.entries(l).map(([h,d])=>{const f=co(h),m=h==="href"||h==="src"?Fa(h,d):d;return{name:h,value:m,priority:f}}).filter(h=>h.name!=="id"&&h.name!=="class"&&_a.has(h.name)||La.has(h.name)&&Pa(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}="${li(d)}"`);if(t.includeText&&i.text&&!Nh(i.text.normalized)){const h=i.text.normalized;h.length>0&&h.length<=t.maxTextLength&&o.push(`text="${li(h)}"`)}let u=o;if(o.length>0&&(e&&t.simplifyTarget&&i.id&&(u=o.filter(h=>{const d=h.split("=")[0];return co(d)>=60||d==="text"||d==="id"||d==="role"})),u.length>0&&u.sort((h,d)=>h.localeCompare(d))),i.classes&&i.classes.length>0){const h=Ku(i.classes),d=!!i.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 r&&r.nthChild){const h=!!i.id||i.attributes&&Object.keys(i.attributes).some(Ih);e&&t.simplifyTarget&&h||(n+=`#${r.nthChild}`)}return n}function Th(r){if(!r.constraints||r.constraints.length===0)return"";const e=[];for(const t of r.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=li(String(t.params.reference));e.push(`text="${s}"`)}break}return e.length===0?"":` {${e.join(",")}}`}function li(r){return r.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/>/g,"\\>").replace(/:/g,"\\:")}function Oh(r,e,t){const s=xh(r,e);return s?Rh(s,t):null}let Dh=1;const $h=new RegExp("[^a-z0-9-_:]"),ts=-2;function Ba(){return Dh++}function kh(r){if(r instanceof HTMLFormElement)return"form";const e=it(r.tagName);return $h.test(e)?"div":e}let yt,uo;const _h=/^[^ \t\n\r\u000c]+/,Lh=/^[, \t\n\r\u000c]+/;function Ph(r,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 i=[];for(;s(Lh),!(t>=e.length);){let n=s(_h);if(n.slice(-1)===",")n=St(r,n.substring(0,n.length-1)),i.push(n);else{let o="";n=St(r,n);let l=!1;for(;;){const a=e.charAt(t);if(a===""){i.push((n+o).trim());break}else if(l)a===")"&&(l=!1);else if(a===","){t+=1,i.push((n+o).trim());break}else a==="("&&(l=!0);o+=a,t+=1}}}return i.join(", ")}const ho=new WeakMap;function St(r,e){return!e||e.trim()===""?e:on(r,e)}function Fh(r){return!!(r.tagName==="svg"||r.ownerSVGElement)}function on(r,e){let t=ho.get(r);if(t||(t=r.createElement("a"),ho.set(r,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function Wa(r,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")?St(r,s):t==="srcset"?Ph(r,s):t==="style"?sr(s,on(r)):e==="object"&&t==="data"?St(r,s):s)}function Ua(r,e,t){return(r==="video"||r==="audio")&&e==="autoplay"}function ci(r,e){return e?typeof e=="string"?r.includes(e):e.test(r):!1}function zh(r,e,t){try{if(typeof e=="string"){if(r.classList.contains(e))return!0}else for(let s=r.classList.length;s--;){const i=r.classList[s];if(e.test(i))return!0}if(t)return r.matches(t)}catch(s){}return!1}function rr(r,e,t){if(!r)return!1;if(r.nodeType!==r.ELEMENT_NODE)return t?rr(de.parentNode(r),e,t):!1;for(let s=r.classList.length;s--;){const i=r.classList[s];if(e.test(i))return!0}return t?rr(de.parentNode(r),e,t):!1}function Va(r,e,t,s){let i;if(Xt(r)){if(i=r,!de.childNodes(i).length)return!1}else{if(de.parentElement(r)===null)return!1;i=de.parentElement(r)}try{if(typeof e=="string"){if(s){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(rr(i,e,s))return!0;if(t){if(s){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch(n){}return!1}function Bh(r,e,t){const s=r.contentWindow;if(!s)return;let i=!1,n;try{n=s.document.readyState}catch(l){return}if(n!=="complete"){const l=setTimeout(()=>{i||(e(),i=!0)},t);r.addEventListener("load",()=>{clearTimeout(l),i=!0,e()});return}const o="about:blank";if(s.location.href!==o||r.src===o||r.src==="")return setTimeout(e,0),r.addEventListener("load",e);r.addEventListener("load",e)}function Wh(r,e,t){let s=!1,i;try{i=r.sheet}catch(o){return}if(i)return;const n=setTimeout(()=>{s||(e(),s=!0)},t);r.addEventListener("load",()=>{clearTimeout(n),s=!0,e()})}function Uh(r,e){const{doc:t,mirror:s,blockClass:i,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,w=Vh(t,s);switch(r.nodeType){case r.DOCUMENT_NODE:return r.compatMode!=="CSS1Compat"?{type:H.Document,childNodes:[],compatMode:r.compatMode}:{type:H.Document,childNodes:[]};case r.DOCUMENT_TYPE_NODE:return{type:H.DocumentType,name:r.name,publicId:r.publicId,systemId:r.systemId,rootId:w};case r.ELEMENT_NODE:return Gh(r,{doc:t,blockClass:i,blockSelector:n,excludeAttribute:o,inlineStylesheet:a,maskInputOptions:c,maskInputFn:h,dataURLOptions:d,inlineImages:f,recordCanvas:m,keepIframeSrcFn:y,newlyAddedElement:p,rootId:w});case r.TEXT_NODE:return Hh(r,{doc:t,needsMask:l,maskTextFn:u,rootId:w,cssCaptured:g});case r.CDATA_SECTION_NODE:return{type:H.CDATA,textContent:"",rootId:w};case r.COMMENT_NODE:return{type:H.Comment,textContent:de.textContent(r)||"",rootId:w};default:return!1}}function Vh(r,e){if(!e.hasNode(r))return;const t=e.getId(r);return t===1?void 0:t}function Hh(r,e){const{needsMask:t,maskTextFn:s,rootId:i,cssCaptured:n}=e,o=de.parentNode(r),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=de.textContent(r),c&&a&&(a=sr(a,on(e.doc)))),!c&&!u&&a&&t&&(a=s?s(a,de.parentElement(r)):a.replace(/[\S]/g,"*")),{type:H.Text,textContent:a||"",rootId:i}}function Gh(r,e){const{doc:t,blockClass:s,blockSelector:i,excludeAttribute:n,inlineStylesheet:o,maskInputOptions:l={},maskInputFn:a,dataURLOptions:c={},inlineImages:u,recordCanvas:h,keepIframeSrcFn:d,newlyAddedElement:f=!1,rootId:m}=e,y=zh(r,s,i),p=kh(r);let g={};const w=r.attributes.length;for(let b=0;b<w;b++){const C=r.attributes[b];ci(C.name,n)||Ua(p,C.name,C.value)||(g[C.name]=Wa(t,p,it(C.name),C.value))}if(p==="link"&&o){const b=Array.from(t.styleSheets).find(x=>x.href===r.href);let C=null;b&&(C=ai(b)),C&&(delete g.rel,delete g.href,g._cssText=C)}if(p==="style"&&r.sheet){let b=ai(r.sheet);b&&(r.childNodes.length>1&&(b=Lu(b,r)),g._cssText=b)}if(p==="input"||p==="textarea"||p==="select"){const b=r.value,C=r.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&b?g.value=er({element:r,type:tr(r),tagName:p,value:b,maskInputOptions:l,maskInputFn:a}):C&&(g.checked=C)}if(p==="option"&&(r.selected&&!l.select?g.selected=!0:delete g.selected),p==="dialog"&&r.open&&(g.rr_open_mode=r.matches("dialog:modal")?"modal":"non-modal"),p==="canvas"&&h){if(r.__context==="2d")Nu(r)||(g.rr_dataURL=r.toDataURL(c.type,c.quality));else if(!("__context"in r)){const b=r.toDataURL(c.type,c.quality),C=t.createElement("canvas");C.width=r.width,C.height=r.height;const x=C.toDataURL(c.type,c.quality);b!==x&&(g.rr_dataURL=b)}}if(p==="img"&&u){yt||(yt=t.createElement("canvas"),uo=yt.getContext("2d"));const b=r,C=b.currentSrc||b.getAttribute("src")||"<unknown-src>",x=b.crossOrigin,M=()=>{b.removeEventListener("load",M);try{yt.width=b.naturalWidth,yt.height=b.naturalHeight,uo.drawImage(b,0,0),g.rr_dataURL=yt.toDataURL(c.type,c.quality)}catch(E){if(b.crossOrigin!=="anonymous"){b.crossOrigin="anonymous",b.complete&&b.naturalWidth!==0?M():b.addEventListener("load",M);return}else console.warn(`Cannot inline img src=${C}! Error: ${E}`)}b.crossOrigin==="anonymous"&&(x?g.crossOrigin=x:b.removeAttribute("crossorigin"))};b.complete&&b.naturalWidth!==0?M():b.addEventListener("load",M)}if(p==="audio"||p==="video"){const b=g;b.rr_mediaState=r.paused?"paused":"played",b.rr_mediaCurrentTime=r.currentTime,b.rr_mediaPlaybackRate=r.playbackRate,b.rr_mediaMuted=r.muted,b.rr_mediaLoop=r.loop,b.rr_mediaVolume=r.volume}if(f||(r.scrollLeft&&(g.rr_scrollLeft=r.scrollLeft),r.scrollTop&&(g.rr_scrollTop=r.scrollTop)),y){const{width:b,height:C}=r.getBoundingClientRect();g={class:g.class,rr_width:`${b}px`,rr_height:`${C}px`}}p==="iframe"&&!d(g.src)&&(r.contentDocument||(g.rr_src=g.src),delete g.src);let S;try{customElements.get(p)&&(S=!0)}catch(b){}return{type:H.Element,tagName:p,attributes:g,childNodes:[],isSVG:Fh(r)||void 0,needBlock:y,rootId:m,isCustom:S}}function te(r){return r==null?"":r.toLowerCase()}function jh(r,e){if(e.comment&&r.type===H.Comment)return!0;if(r.type===H.Element){if(e.script&&(r.tagName==="script"||r.tagName==="link"&&(r.attributes.rel==="preload"&&r.attributes.as==="script"||r.attributes.rel==="modulepreload")||r.tagName==="link"&&r.attributes.rel==="prefetch"&&typeof r.attributes.href=="string"&&en(r.attributes.href)==="js"))return!0;if(e.headFavicon&&(r.tagName==="link"&&r.attributes.rel==="shortcut icon"||r.tagName==="meta"&&(te(r.attributes.name).match(/^msapplication-tile(image|color)$/)||te(r.attributes.name)==="application-name"||te(r.attributes.rel)==="icon"||te(r.attributes.rel)==="apple-touch-icon"||te(r.attributes.rel)==="shortcut icon")))return!0;if(r.tagName==="meta"){if(e.headMetaDescKeywords&&te(r.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(te(r.attributes.property).match(/^(og|twitter|fb):/)||te(r.attributes.name).match(/^(og|twitter):/)||te(r.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(te(r.attributes.name)==="robots"||te(r.attributes.name)==="googlebot"||te(r.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&r.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(te(r.attributes.name)==="author"||te(r.attributes.name)==="generator"||te(r.attributes.name)==="framework"||te(r.attributes.name)==="publisher"||te(r.attributes.name)==="progid"||te(r.attributes.property).match(/^article:/)||te(r.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(te(r.attributes.name)==="google-site-verification"||te(r.attributes.name)==="yandex-verification"||te(r.attributes.name)==="csrf-token"||te(r.attributes.name)==="p:domain_verify"||te(r.attributes.name)==="verify-v1"||te(r.attributes.name)==="verification"||te(r.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ct(r,e){const{doc:t,mirror:s,blockClass:i,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:w,onIframeLoad:S,iframeLoadTimeout:b=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:M=()=>!1,newlyAddedElement:E=!1,cssCaptured:$=!1,selectorOptions:k}=e;let{needsMask:L}=e,{preserveWhiteSpace:_=!0}=e;L||(L=Va(r,o,l,L===void 0));const B=Uh(r,{doc:t,mirror:s,blockClass:i,blockSelector:n,excludeAttribute:a,needsMask:L,inlineStylesheet:u,maskInputOptions:h,maskTextFn:d,maskInputFn:f,dataURLOptions:y,inlineImages:p,recordCanvas:g,keepIframeSrcFn:M,newlyAddedElement:E,cssCaptured:$});if(!B)return console.warn(r,"not serialized"),null;let W;s.hasNode(r)?W=s.getId(r):jh(B,m)||!_&&B.type===H.Text&&!B.textContent.replace(/^\s+|\s+$/gm,"").length?W=ts:W=Ba();const N=Object.assign(B,{id:W});if(Xt(r)||r.nodeType===Node.TEXT_NODE){if(Xt(r)&&k!==null&&k!==void 0)try{const U={maxPathDepth:k.maxPathDepth,enableSvgFingerprint:k.enableSvgFingerprint,fallbackToBody:k.fallbackToBody},Q=Oh(r,U);Q&&(N.selector=Q)}catch(U){console.warn("Failed to generate SEQL selector:",U)}r.nodeType===Node.TEXT_NODE&&(N.isVisible=Pu(r)),r.nodeType===Node.ELEMENT_NODE&&(N.isVisible=tn(r),N.isInteractive=Hu(r))}if(s.add(r,N),W===ts)return null;w&&w(r);let T=!c;if(N.type===H.Element){T=T&&!N.needBlock,delete N.needBlock;const U=de.shadowRoot(r);U&&qt(U)&&(N.isShadowHost=!0)}if((N.type===H.Document||N.type===H.Element)&&T){m.headWhitespace&&N.type===H.Element&&N.tagName==="head"&&(_=!1);const U={doc:t,mirror:s,blockClass:i,blockSelector:n,needsMask:L,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:_,onSerialize:w,onIframeLoad:S,iframeLoadTimeout:b,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:M,cssCaptured:!1,selectorOptions:k};if(!(N.type===H.Element&&N.tagName==="textarea"&&N.attributes.value!==void 0)){N.type===H.Element&&N.attributes._cssText!==void 0&&typeof N.attributes._cssText=="string"&&(U.cssCaptured=!0);for(const ce of Array.from(de.childNodes(r))){const se=Ct(ce,U);se&&N.childNodes.push(se)}}let Q=null;if(Xt(r)&&(Q=de.shadowRoot(r)))for(const ce of Array.from(de.childNodes(Q))){const se=Ct(ce,U);se&&(qt(Q)&&(se.isShadow=!0),N.childNodes.push(se))}}const D=de.parentNode(r);return D&&Jt(D)&&qt(D)&&(N.isShadow=!0),N.type===H.Element&&N.tagName==="iframe"&&Bh(r,()=>{const U=r.contentDocument;if(U&&S){const Q=Ct(U,{doc:U,mirror:s,blockClass:i,blockSelector:n,needsMask:L,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:_,onSerialize:w,onIframeLoad:S,iframeLoadTimeout:b,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:M,selectorOptions:k});Q&&S(r,Q)}},b),N.type===H.Element&&N.tagName==="link"&&typeof N.attributes.rel=="string"&&(N.attributes.rel==="stylesheet"||N.attributes.rel==="preload"&&typeof N.attributes.href=="string"&&en(N.attributes.href)==="css")&&Wh(r,()=>{if(C){const U=Ct(r,{doc:t,mirror:s,blockClass:i,blockSelector:n,needsMask:L,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:_,onSerialize:w,onIframeLoad:S,iframeLoadTimeout:b,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:M,selectorOptions:k});U&&C(r,U)}},x),N}function Yh(r,e){var L,_,B,W;const{mirror:t=new Qi,blockClass:s="rr-block",blockSelector:i=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:w,iframeLoadTimeout:S,onStylesheetLoad:b,stylesheetLoadTimeout:C,keepIframeSrcFn:x=()=>!1,selector:M}=e||{},E=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,k=M===!1?null:M===!0?{maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:.3,fallbackToBody:!0}:M===void 0?{maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:.3,fallbackToBody:!0}:{maxPathDepth:(L=M.maxPathDepth)!=null?L:10,enableSvgFingerprint:(_=M.enableSvgFingerprint)!=null?_:!0,confidenceThreshold:(B=M.confidenceThreshold)!=null?B:.3,fallbackToBody:(W=M.fallbackToBody)!=null?W:!0};return Ct(r,{doc:r,mirror:t,blockClass:s,blockSelector:i,maskTextClass:n,maskTextSelector:o,excludeAttribute:l,skipChild:!1,inlineStylesheet:a,maskInputOptions:E,maskTextFn:d,maskInputFn:f,slimDOMOptions:$,dataURLOptions:y,inlineImages:c,recordCanvas:u,preserveWhiteSpace:p,onSerialize:g,onIframeLoad:w,iframeLoadTimeout:S,onStylesheetLoad:b,stylesheetLoadTimeout:C,keepIframeSrcFn:x,newlyAddedElement:!1,selectorOptions:k})}const Zh=/(max|min)-device-(width|height)/,fo=new RegExp(Zh.source,"g"),Xh={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(r){r.params.match(fo)&&(r.params=r.params.replace(fo,"$1-$2"))}}}},Jh={postcssPlugin:"postcss-hover-classes",prepare:function(){const r=[];return{Rule:function(e){r.indexOf(e)===-1&&(r.push(e),e.selectors.forEach(function(t){t.includes(":hover")&&(e.selector+=`,
|
|
12
|
+
`+t.replace(/:hover/g,".\\:hover"))}))}}}},qh={postcssPlugin:"postcss-animation-fill-mode",prepare:function(){return{Rule:function(r){let e=!1,t=!1,s=null;r.walkDecls(i=>{i.prop==="animation"&&(e=!0,s=i),i.prop==="animation-fill-mode"&&(t=!0)}),e&&!t&&s&&r.insertAfter(s,{prop:"animation-fill-mode",value:"forwards"})}}}};function Kh(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function Qh(r){if(r.__esModule)return r;var e=r.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(r).forEach(function(s){var i=Object.getOwnPropertyDescriptor(r,s);Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:function(){return r[s]}})}),t}var an={exports:{}},F=String,Ha=function(){return{isColorSupported:!1,reset:F,bold:F,dim:F,italic:F,underline:F,inverse:F,hidden:F,strikethrough:F,black:F,red:F,green:F,yellow:F,blue:F,magenta:F,cyan:F,white:F,gray:F,bgBlack:F,bgRed:F,bgGreen:F,bgYellow:F,bgBlue:F,bgMagenta:F,bgCyan:F,bgWhite:F,blackBright:F,redBright:F,greenBright:F,yellowBright:F,blueBright:F,magentaBright:F,cyanBright:F,whiteBright:F,bgBlackBright:F,bgRedBright:F,bgGreenBright:F,bgYellowBright:F,bgBlueBright:F,bgMagentaBright:F,bgCyanBright:F,bgWhiteBright:F}};an.exports=Ha();an.exports.createColors=Ha;var ed=an.exports;const td={},sd=Object.freeze(Object.defineProperty({__proto__:null,default:td},Symbol.toStringTag,{value:"Module"})),Te=Qh(sd);let po=ed,mo=Te,ui=class Ga extends Error{constructor(e,t,s,i,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),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,Ga)}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=po.isColorSupported);let s=u=>u,i=u=>u,n=u=>u;if(e){let{bold:u,gray:h,red:d}=po.createColors(!0);i=f=>u(d(f)),s=f=>h(f),mo&&(n=f=>mo(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),w=u.slice(p,g),S=s(f.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return i(">")+s(f)+n(w)+`
|
|
13
|
+
`+S+i("^")}let m=s(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+s(f)+n(u)+`
|
|
14
|
+
`+m+i("^")}return" "+s(f)+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 ln=ui;ui.default=ui;const go={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++)
|
|
25
|
-
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let
|
|
26
|
-
`)&&(
|
|
27
|
-
`)&&(
|
|
28
|
-
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(
|
|
29
|
-
`);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(
|
|
30
|
-
`?(t=1,
|
|
31
|
-
`?(t=1,r+=1):t+=1;return{column:t,line:r,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,r={column:this.source.start.column,line:this.source.start.line,offset:ze(t,this.source.start)},i=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:ze(t,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(e.word){let o=t.slice(ze(t,this.source.start),ze(t,this.source.end)).indexOf(e.word);o!==-1&&(r=this.positionInside(o),i=this.positionInside(o+e.word.length))}else e.start?r={column:e.start.column,line:e.start.line,offset:ze(t,e.start)}:e.index&&(r=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line,offset:ze(t,e.end)}:typeof e.endIndex=="number"?i=this.positionInside(e.endIndex):e.index&&(i=this.positionInside(e.index+1));return(i.line<r.line||i.line===r.line&&i.column<=r.column)&&(i={column:r.column+1,line:r.line,offset:r.offset+1}),{end:i,start:r}}raw(e,t){return new id().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,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=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))r[o]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)r[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++),r[o]={end:l.end,inputId:a,start:l.start}}else r[o]=l}return i&&(r.inputs=[...t.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=nd){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r={}){let i={node:this};for(let n in r)i[n]=r[n];return e.warn(t,i)}};var vs=fi;fi.default=fi;let ad=vs,pi=class extends ad{constructor(e){super(e),this.type="comment"}};var ws=pi;pi.default=pi;let ld=vs,mi=class extends ld{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=oe(R({},e),{value:String(e.value)})),super(e),this.type="decl"}};var Ss=mi;mi.default=mi;let Ga=ws,ja=Ss,cd=vs,{isClean:Ya,my:Za}=pr,ln,Xa,Ja,cn;function qa(s){return s.map(e=>(e.nodes&&(e.nodes=qa(e.nodes)),delete e.source,e))}function Ka(s){if(s[Ya]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)Ka(e)}let He=class Qa extends cd{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 r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}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(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}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")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(n,o)=>i(n.toProxy(),o):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(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 r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],r<n&&(this.indexes[o]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let l of n)this.proxyOf.nodes.splice(r,0,l);let o;for(let l in this.indexes)o=this.indexes[l],r<=o&&(this.indexes[l]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=qa(Xa(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"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 ja(e)]}else if(e.selector||e.selectors)e=[new cn(e)];else if(e.name)e=[new ln(e)];else if(e.text)e=[new Ga(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Za]||Qa.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Ya]&&Ka(i),i.raws||(i.raws={}),typeof i.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.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 r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}};He.registerParse=s=>{Xa=s};He.registerRule=s=>{cn=s};He.registerAtRule=s=>{ln=s};He.registerRoot=s=>{Ja=s};var dt=He;He.default=He;He.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,ln.prototype):s.type==="rule"?Object.setPrototypeOf(s,cn.prototype):s.type==="decl"?Object.setPrototypeOf(s,ja.prototype):s.type==="comment"?Object.setPrototypeOf(s,Ga.prototype):s.type==="root"&&Object.setPrototypeOf(s,Ja.prototype),s[Za]=!0,s.nodes&&s.nodes.forEach(e=>{He.rebuild(e)})};let el=dt,is=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 un=is;is.default=is;el.registerAtRule(is);let ud=dt,tl,rl,sr=class extends ud{constructor(e){super(R({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new tl(new rl,this,e).stringify()}};sr.registerLazyResult=s=>{tl=s};sr.registerProcessor=s=>{rl=s};var hn=sr;sr.default=sr;let hd="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",dd=(s=21)=>{let e="",t=s|0;for(;t--;)e+=hd[Math.random()*64|0];return e};var fd={nanoid:dd};let{existsSync:pd,readFileSync:md}=Ie,{dirname:Bs,join:gd}=Ie,{SourceMapConsumer:mo,SourceMapGenerator:go}=Ie;function yd(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let gi=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Bs(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new mo(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,o=e.match(i)||e.match(n);if(o)return decodeURIComponent(e.substr(o[0].length));let l=e.match(t)||e.match(r);if(l)return yd(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 r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=Bs(e),pd(e))return this.mapFile=e,md(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 r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof mo)return go.fromSourceMap(t).toString();if(t instanceof go)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 r=this.annotation;return e&&(r=gd(Bs(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var sl=gi;gi.default=gi;let{nanoid:bd}=fd,{isAbsolute:yi,resolve:bi}=Ie,{SourceMapConsumer:vd,SourceMapGenerator:wd}=Ie,{fileURLToPath:yo,pathToFileURL:Ar}=Ie,bo=an,Sd=sl,Ws=Ie,Us=Symbol("lineToIndexCache"),Cd=!!(vd&&wd),vo=!!(bi&&yi);function wo(s){if(s[Us])return s[Us];let e=s.css.split(`
|
|
32
|
-
`),t=new Array(e.length),
|
|
33
|
-
`," "];return
|
|
23
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function rd(r){return r[0].toUpperCase()+r.slice(1)}let hi=class{constructor(e){this.builder=e}atrule(e,t){let s="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?s+=e.raws.afterName:i&&(s+=" "),e.nodes)this.block(e,s+i);else{let n=(e.raws.between||"")+(t?";":"");this.builder(s+i+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 i=e.parent,n=0;for(;i&&i.type!=="root";)n+=1,i=i.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 i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),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 i=0;i<e.nodes.length;i++){let n=e.nodes[i],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==i||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"),i=e.prop+s+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,s){let i;if(s||(s=t),t&&(i=e.raws[t],typeof i!="undefined"))return i;let n=e.parent;if(s==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return go[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"+rd(s);this[l]?i=this[l](o,e):o.walk(a=>{if(i=a.raws[t],typeof i!="undefined")return!1})}return typeof i=="undefined"&&(i=go[s]),o.rawCache[s]=i,i}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
|
+
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let s;return e.walkComments(i=>{if(typeof i.raws.before!="undefined")return s=i.raws.before,s.includes(`
|
|
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(i=>{if(typeof i.raws.before!="undefined")return s=i.raws.before,s.includes(`
|
|
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
|
+
`)&&(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 i=s.parent;if(i&&i!==e&&i.parent&&i.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],i=e.raws[t];return i&&i.value===s?i.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 ja=hi;hi.default=hi;let id=ja;function di(r,e){new id(e).stringify(r)}var br=di;di.default=di;var ps={};ps.isClean=Symbol("isClean");ps.my=Symbol("my");let nd=ln,od=ja,ad=br,{isClean:Ft,my:ld}=ps;function fi(r,e){let t=new r.constructor;for(let s in r){if(!Object.prototype.hasOwnProperty.call(r,s)||s==="proxyCache")continue;let i=r[s],n=typeof i;s==="parent"&&n==="object"?e&&(t[s]=e):s==="source"?t[s]=i:Array.isArray(i)?t[s]=i.map(o=>fi(o,t)):(n==="object"&&i!==null&&(i=fi(i)),t[s]=i)}return t}function Be(r,e){if(e&&typeof e.offset!="undefined")return e.offset;let t=1,s=1,i=0;for(let n=0;n<r.length;n++){if(s===e.line&&t===e.column){i=n;break}r[n]===`
|
|
30
|
+
`?(t=1,s+=1):t+=1}return i}let pi=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[Ft]=!1,this[ld]=!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=fi(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:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:s.column,line:s.line},t)}return new nd(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[Ft]=!0}markDirty(){if(this[Ft]){this[Ft]=!1;let e=this;for(;e=e.parent;)e[Ft]=!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(Be(s,this.source.start),Be(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,i="document"in this.source.input?this.source.input.document:this.source.input.css,n=Be(i,this.source.start),o=n+e;for(let l=n;l<o;l++)i[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:Be(t,this.source.start)},i=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:Be(t,this.source.end)+1}:{column:s.column+1,line:s.line,offset:s.offset+1};if(e.word){let o=t.slice(Be(t,this.source.start),Be(t,this.source.end)).indexOf(e.word);o!==-1&&(s=this.positionInside(o),i=this.positionInside(o+e.word.length))}else e.start?s={column:e.start.column,line:e.start.line,offset:Be(t,e.start)}:e.index&&(s=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line,offset:Be(t,e.end)}:typeof e.endIndex=="number"?i=this.positionInside(e.endIndex):e.index&&(i=this.positionInside(e.index+1));return(i.line<s.line||i.line===s.line&&i.column<=s.column)&&(i={column:s.column+1,line:s.line,offset:s.offset+1}),{end:i,start:s}}raw(e,t){return new od().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 i of e)i===this?s=!0:s?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);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={},i=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 i&&(s.inputs=[...t.keys()].map(o=>o.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=ad){e.stringify&&(e=e.stringify);let t="";return e(this,s=>{t+=s}),t}warn(e,t,s={}){let i={node:this};for(let n in s)i[n]=s[n];return e.warn(t,i)}};var vr=pi;pi.default=pi;let cd=vr,mi=class extends cd{constructor(e){super(e),this.type="comment"}};var wr=mi;mi.default=mi;let ud=vr,gi=class extends ud{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=ae(R({},e),{value:String(e.value)})),super(e),this.type="decl"}};var Sr=gi;gi.default=gi;let Ya=wr,Za=Sr,hd=vr,{isClean:Xa,my:Ja}=ps,cn,qa,Ka,un;function Qa(r){return r.map(e=>(e.nodes&&(e.nodes=Qa(e.nodes)),delete e.source,e))}function el(r){if(r[Xa]=!1,r.proxyOf.nodes)for(let e of r.proxyOf.nodes)el(e)}let Ge=class tl extends hd{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 i of s)this.proxyOf.nodes.push(i)}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,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(s=this.indexes[t],i=e(this.proxyOf.nodes[s],s),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}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(i=>typeof i=="function"?(n,o)=>i(n.toProxy(),o):i)):t==="every"||t==="some"?s=>e[t]((i,...n)=>s(i.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),i=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let o of i)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+i.length);return this.markDirty(),this}insertBefore(e,t){let s=this.index(e),i=s===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[s],i).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=Qa(qa(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"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 Za(e)]}else if(e.selector||e.selectors)e=[new un(e)];else if(e.name)e=[new cn(e)];else if(e.text)e=[new Ya(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Ja]||tl.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Xa]&&el(i),i.raws||(i.raws={}),typeof i.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let s=this.normalize(t,this.first,"prepend").reverse();for(let i of s)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+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(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,s))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,s)=>{let i;try{i=e(t,s)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((s,i)=>{if(s.type==="atrule"&&e.test(s.name))return t(s,i)}):this.walk((s,i)=>{if(s.type==="atrule"&&s.name===e)return t(s,i)}):(t=e,this.walk((s,i)=>{if(s.type==="atrule")return t(s,i)}))}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,i)=>{if(s.type==="decl"&&e.test(s.prop))return t(s,i)}):this.walk((s,i)=>{if(s.type==="decl"&&s.prop===e)return t(s,i)}):(t=e,this.walk((s,i)=>{if(s.type==="decl")return t(s,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((s,i)=>{if(s.type==="rule"&&e.test(s.selector))return t(s,i)}):this.walk((s,i)=>{if(s.type==="rule"&&s.selector===e)return t(s,i)}):(t=e,this.walk((s,i)=>{if(s.type==="rule")return t(s,i)}))}};Ge.registerParse=r=>{qa=r};Ge.registerRule=r=>{un=r};Ge.registerAtRule=r=>{cn=r};Ge.registerRoot=r=>{Ka=r};var ht=Ge;Ge.default=Ge;Ge.rebuild=r=>{r.type==="atrule"?Object.setPrototypeOf(r,cn.prototype):r.type==="rule"?Object.setPrototypeOf(r,un.prototype):r.type==="decl"?Object.setPrototypeOf(r,Za.prototype):r.type==="comment"?Object.setPrototypeOf(r,Ya.prototype):r.type==="root"&&Object.setPrototypeOf(r,Ka.prototype),r[Ja]=!0,r.nodes&&r.nodes.forEach(e=>{Ge.rebuild(e)})};let sl=ht,ir=class extends sl{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 hn=ir;ir.default=ir;sl.registerAtRule(ir);let dd=ht,rl,il,ss=class extends dd{constructor(e){super(R({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new rl(new il,this,e).stringify()}};ss.registerLazyResult=r=>{rl=r};ss.registerProcessor=r=>{il=r};var dn=ss;ss.default=ss;let fd="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",pd=(r=21)=>{let e="",t=r|0;for(;t--;)e+=fd[Math.random()*64|0];return e};var md={nanoid:pd};let{existsSync:gd,readFileSync:yd}=Te,{dirname:Wr,join:bd}=Te,{SourceMapConsumer:yo,SourceMapGenerator:bo}=Te;function vd(r){return Buffer?Buffer.from(r,"base64").toString():window.atob(r)}let yi=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,i=this.loadMap(t.from,s);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Wr(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new yo(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,s=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,o=e.match(i)||e.match(n);if(o)return decodeURIComponent(e.substr(o[0].length));let l=e.match(t)||e.match(s);if(l)return vd(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()),i=e.indexOf("*/",s);s>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,i)))}loadFile(e){if(this.root=Wr(e),gd(e))return this.mapFile=e,yd(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 i=this.loadFile(s);if(!i)throw new Error("Unable to load previous source map: "+s.toString());return i}}else{if(t instanceof yo)return bo.fromSourceMap(t).toString();if(t instanceof bo)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=bd(Wr(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 nl=yi;yi.default=yi;let{nanoid:wd}=md,{isAbsolute:bi,resolve:vi}=Te,{SourceMapConsumer:Sd,SourceMapGenerator:Cd}=Te,{fileURLToPath:vo,pathToFileURL:As}=Te,wo=ln,xd=nl,Ur=Te,Vr=Symbol("lineToIndexCache"),Ed=!!(Sd&&Cd),So=!!(vi&&bi);function Co(r){if(r[Vr])return r[Vr];let e=r.css.split(`
|
|
32
|
+
`),t=new Array(e.length),s=0;for(let i=0,n=e.length;i<n;i++)t[i]=s,s+=e[i].length+1;return r[Vr]=t,t}let nr=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&&(!So||/^\w+:\/\//.test(t.from)||bi(t.from)?this.file=t.from:this.file=vi(t.from)),So&&Ed){let s=new xd(this.css,t);if(s.text){this.map=s;let i=s.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+wd(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,s,i={}){let n,o,l,a,c;if(t&&typeof t=="object"){let h=t,d=s;if(typeof h.offset=="number"){a=h.offset;let f=this.fromOffset(a);t=f.line,s=f.col}else t=h.line,s=h.column,a=this.fromLineAndColumn(t,s);if(typeof d.offset=="number"){l=d.offset;let f=this.fromOffset(l);o=f.line,n=f.col}else o=d.line,n=d.column,l=this.fromLineAndColumn(d.line,d.column)}else if(s)a=this.fromLineAndColumn(t,s);else{a=t;let h=this.fromOffset(a);t=h.line,s=h.col}let u=this.origin(t,s,o,n);return u?c=new wo(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,i.plugin):c=new wo(e,o===void 0?t:{column:s,line:t},o===void 0?s:{column:n,line:o},this.css,this.file,i.plugin),c.input={column:s,endColumn:n,endLine:o,endOffset:l,line:t,offset:a,source:this.css},this.file&&(As&&(c.input.url=As(this.file).toString()),c.input.file=this.file),c}fromLineAndColumn(e,t){return Co(this)[e-1]+t-1}fromOffset(e){let t=Co(this),s=t[t.length-1],i=0;if(e>=s)i=t.length-1;else{let n=t.length-2,o;for(;i<n;)if(o=i+(n-i>>1),e<t[o])n=o-1;else if(e>=t[o+1])i=o+1;else{i=o;break}}return{col:e-t[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:vi(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,s,i){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:i,line:s}));let a;bi(o.source)?a=As(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||As(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(vo)c.file=vo(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=R({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};var Cr=nr;nr.default=nr;Ur&&Ur.registerInput&&Ur.registerInput(nr);let ol=ht,al,ll,It=class extends ol{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,s){let i=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 i)n.raws.before=t.raws.before}return i}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 al(new ll,this,e).stringify()}};It.registerLazyResult=r=>{al=r};It.registerProcessor=r=>{ll=r};var ms=It;It.default=It;ol.registerRoot(It);let rs={comma(r){return rs.split(r,[","],!0)},space(r){let e=[" ",`
|
|
33
|
+
`," "];return rs.split(r,e)},split(r,e,t){let s=[],i="",n=!1,o=0,l=!1,a="",c=!1;for(let u of r)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?(i!==""&&s.push(i.trim()),i="",n=!1):i+=u;return(t||i!=="")&&s.push(i.trim()),s}};var cl=rs;rs.default=rs;let ul=ht,Md=cl,or=class extends ul{get selectors(){return Md.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 fn=or;or.default=or;ul.registerRule(or);let Ad=hn,Id=wr,Nd=Sr,Rd=Cr,Td=nl,Od=ms,Dd=fn;function is(r,e){if(Array.isArray(r))return r.map(o=>is(o));let i=r,{inputs:t}=i,s=gt(i,["inputs"]);if(t){e=[];for(let o of t){let l=ae(R({},o),{__proto__:Rd.prototype});l.map&&(l.map=ae(R({},l.map),{__proto__:Td.prototype})),e.push(l)}}if(s.nodes&&(s.nodes=r.nodes.map(o=>is(o,e))),s.source){let n=s.source,{inputId:o}=n,l=gt(n,["inputId"]);s.source=l,o!=null&&(s.source.input=e[o])}if(s.type==="root")return new Od(s);if(s.type==="decl")return new Nd(s);if(s.type==="rule")return new Dd(s);if(s.type==="comment")return new Id(s);if(s.type==="atrule")return new Ad(s);throw new Error("Unknown node type: "+r.type)}var $d=is;is.default=is;let{dirname:Zs,relative:hl,resolve:dl,sep:fl}=Te,{SourceMapConsumer:pl,SourceMapGenerator:Xs}=Te,{pathToFileURL:xo}=Te,kd=Cr,_d=!!(pl&&Xs),Ld=!!(Zs&&dl&&hl&&fl),Pd=class{constructor(e,t,s,i){this.stringify=e,this.mapOpts=s.map||{},this.root=t,this.opts=s,this.css=i,this.originalCSS=i,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)),
|
|
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?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=
|
|
38
|
-
`.charCodeAt(0),Wt=" ".charCodeAt(0),Rr="\f".charCodeAt(0),Tr=" ".charCodeAt(0),Or="\r".charCodeAt(0),Ld="[".charCodeAt(0),Pd="]".charCodeAt(0),Fd="(".charCodeAt(0),zd=")".charCodeAt(0),Bd="{".charCodeAt(0),Wd="}".charCodeAt(0),Ud=";".charCodeAt(0),Vd="*".charCodeAt(0),Hd=":".charCodeAt(0),Gd="@".charCodeAt(0),Dr=/[\t\n\f\r "#'()/;[\\\]{}]/g,$r=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,jd=/.[\r\n"'(/\\]/,Eo=/[\da-f]/i;var Yd=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,l,a,c,u,h,d,f,m,y=r.length,p=0,g=[],w=[];function S(){return p}function b(E){throw e.error("Unclosed "+E,p)}function C(){return w.length===0&&p>=y}function x(E){if(w.length)return w.pop();if(p>=y)return;let k=E?E.ignoreUnclosed:!1;switch(n=r.charCodeAt(p),n){case Nr:case Wt:case Tr:case Or:case Rr:{a=p;do a+=1,n=r.charCodeAt(a);while(n===Wt||n===Nr||n===Tr||n===Or||n===Rr);u=["space",r.slice(p,a)],p=a-1;break}case Ld:case Pd:case Bd:case Wd:case Hd:case Ud:case zd:{let _=String.fromCharCode(n);u=[_,_,p];break}case Fd:{if(m=g.length?g.pop()[1]:"",f=r.charCodeAt(p+1),m==="url"&&f!==Vs&&f!==Co&&f!==Wt&&f!==Nr&&f!==Tr&&f!==Rr&&f!==Or){a=p;do{if(h=!1,a=r.indexOf(")",a+1),a===-1)if(i||k){a=p;break}else b("bracket");for(d=a;r.charCodeAt(d-1)===Ir;)d-=1,h=!h}while(h);u=["brackets",r.slice(p,a+1),p,a],p=a}else a=r.indexOf(")",p+1),o=r.slice(p,a+1),a===-1||jd.test(o)?u=["(","(",p]:(u=["brackets",o,p,a],p=a);break}case Vs:case Co:{c=n===Vs?"'":'"',a=p;do{if(h=!1,a=r.indexOf(c,a+1),a===-1)if(i||k){a=p+1;break}else b("string");for(d=a;r.charCodeAt(d-1)===Ir;)d-=1,h=!h}while(h);u=["string",r.slice(p,a+1),p,a],p=a;break}case Gd:{Dr.lastIndex=p+1,Dr.test(r),Dr.lastIndex===0?a=r.length-1:a=Dr.lastIndex-2,u=["at-word",r.slice(p,a+1),p,a],p=a;break}case Ir:{for(a=p,l=!0;r.charCodeAt(a+1)===Ir;)a+=1,l=!l;if(n=r.charCodeAt(a+1),l&&n!==xo&&n!==Wt&&n!==Nr&&n!==Tr&&n!==Or&&n!==Rr&&(a+=1,Eo.test(r.charAt(a)))){for(;Eo.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===Wt&&(a+=1)}u=["word",r.slice(p,a+1),p,a],p=a;break}default:{n===xo&&r.charCodeAt(p+1)===Vd?(a=r.indexOf("*/",p+2)+1,a===0&&(i||k?a=r.length:b("comment")),u=["comment",r.slice(p,a+1),p,a],p=a):($r.lastIndex=p+1,$r.test(r),$r.lastIndex===0?a=r.length-1:a=$r.lastIndex-2,u=["word",r.slice(p,a+1),p,a],g.push(u),p=a);break}}return p++,u}function M(E){w.push(E)}return{back:M,endOfFile:C,nextToken:x,position:S}};let Zd=un,Xd=ws,Jd=Ss,qd=mr,Mo=dn,Kd=Yd;const Ao={empty:!0,space:!0};function Qd(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let ef=class{constructor(e){this.input=e,this.root=new qd,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 Zd;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,o=!1,l=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?c.push(r==="("?")":"]"):r==="{"&&c.length>0?c.push("}"):r===c[c.length-1]&&c.pop(),c.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){l=!0;break}else if(r==="}"){if(a.length>0){for(n=a.length-1,i=a[n];i&&i[0]==="space";)i=a[--n];i&&(t.source.end=this.getPosition(i[3]||i[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 r=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[o,l]of e.entries()){if(i=l,n=i[0],n==="("&&(t+=1),n===")"&&(t-=1),t===0&&n===":")if(!r)this.doubleColon(i);else{if(r[0]==="word"&&r[1]==="progid")continue;return o}r=i}return!1}comment(e){let t=new Xd;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=Kd(this.input)}decl(e,t){let r=new Jd;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||Qd(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.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"){r.important=!0;let u=this.stringFrom(e,c);u=this.spacesFromEnd(e)+u,u!==" !important"&&(r.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("!")&&(r.important=!0,r.raws.important=h,e=u)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(r.raws.between+=o.map(c=>c[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.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 Mo;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,r=null,i=!1,n=null,o=[],l=e[1].startsWith("--"),a=[],c=e;for(;c;){if(r=c[0],a.push(c),r==="("||r==="[")n||(n=c),o.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=c),o.push("}");else if(o.length===0)if(r===";")if(i){this.decl(a,l);return}else break;else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop()),t=!0;break}else r===":"&&(i=!0);else r===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&&i){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,r,i){let n,o,l=r.length,a="",c=!0,u,h;for(let d=0;d<l;d+=1)n=r[d],o=n[0],o==="space"&&d===l-1&&!i?c=!1:o==="comment"?(h=r[d-1]?r[d-1][0]:"empty",u=r[d+1]?r[d+1][0]:"empty",!Ao[h]&&!Ao[u]?a.slice(-1)===","?c=!1:a+=n[1]:c=!1):a+=n[1];if(!c){let d=r.reduce((f,m)=>f+m[1],"");e.raws[t]={raw:d,value:a}}e[t]=a}rule(e){e.pop();let t=new Mo;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}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 tf=ef;let rf=dt,sf=Cs,nf=tf;function as(s,e){let t=new sf(s,e),r=new nf(t);try{r.parse()}catch(i){throw i}return r.root}var fn=as;as.default=as;rf.registerParse(as);let vi=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}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 pl=vi;vi.default=vi;let of=pl,wi=class{get content(){return this.css}constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,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 r=new of(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}};var pn=wi;wi.default=wi;let af=dt,lf=hn,cf=fl,uf=fn,Io=pn,hf=mr,df=bs,{isClean:De,my:ff}=pr;const pf={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},mf={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},gf={Once:!0,postcssPlugin:!0,prepare:!0},Rt=0;function Ut(s){return typeof s=="object"&&typeof s.then=="function"}function ml(s){let e=!1,t=pf[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,Rt,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,Rt,t+"Exit"]:[t,t+"Exit"]}function No(s){let e;return s.type==="document"?e=["Document",Rt,"DocumentExit"]:s.type==="root"?e=["Root",Rt,"RootExit"]:e=ml(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function Si(s){return s[De]=!1,s.nodes&&s.nodes.forEach(e=>Si(e)),s}let Ci={},Tt=class gl{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,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=Si(t);else if(t instanceof gl||t instanceof Io)i=Si(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=uf;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(o){this.processed=!0,this.error=o}i&&!i[ff]&&af.rebuild(i)}this.result=new Io(e,i,r),this.helpers=oe(R({},Ci),{postcss:Ci,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?R(R({},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 r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!mf[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!gf[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}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],r=this.runOnRoot(t);if(Ut(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[De];){e[De]=!0;let t=[No(e)];for(;t.length>0;){let r=this.visitTick(t);if(Ut(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}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(r=>e.Once(r,this.helpers));return Ut(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=df;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new cf(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[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(Ut(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[De];)e[De]=!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[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Ut(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[o,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(r.toProxy(),this.helpers)}catch(a){throw this.handleError(a,r)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!l[De]){l[De]=!0,e.push(No(l));return}t.iterator=0,delete r.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===Rt){r.nodes&&r.nodes.length&&(r[De]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[De]=!0;let t=ml(e);for(let r of t)if(r===Rt)e.nodes&&e.each(i=>{i[De]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};Tt.registerPostcss=s=>{Ci=s};var yl=Tt;Tt.default=Tt;hf.registerLazyResult(Tt);lf.registerLazyResult(Tt);let yf=fl,bf=fn;const vf=pn;let wf=bs;let xi=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=bf;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=wf;this.result=new vf(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new yf(n,i,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 Sf=xi;xi.default=xi;let Cf=hn,xf=yl,Ef=Sf,Mf=mr,or=class{constructor(e=[]){this.version="8.5.6",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Ef(this,e,t):new xf(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Af=or;or.default=or;Mf.registerProcessor(or);Cf.registerProcessor(or);let bl=un,vl=ws,If=dt,Nf=an,wl=Ss,Sl=hn,Rf=Od,Tf=Cs,Of=yl,Df=al,$f=vs,kf=fn,mn=Af,_f=pn,Cl=mr,xl=dn,Lf=bs,Pf=pl;function J(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new mn(s)}J.plugin=function(e,t){let r=!1;function i(...o){console&&console.warn&&!r&&(r=!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||Zs(e.file),i;this.mapOpts.sourcesContent===!1?(i=new pl(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,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(),Ld&&_d&&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=Xs.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Xs({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 Xs({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,s="<no source>",i={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"&&(i.generated.line=e,i.generated.column=t-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=s,i.original.line=1,i.original.column=0,this.map.addMapping(i))),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?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=s,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}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?Zs(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(s=Zs(dl(s,this.mapOpts.annotation)));let i=hl(s,e);return this.memoizedPaths.set(e,i),i}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 kd(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 i=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(i,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(xo){let s=xo(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;fl==="\\"&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}};var ml=Pd;const Hr="'".charCodeAt(0),Eo='"'.charCodeAt(0),Is="\\".charCodeAt(0),Mo="/".charCodeAt(0),Ns=`
|
|
38
|
+
`.charCodeAt(0),zt=" ".charCodeAt(0),Rs="\f".charCodeAt(0),Ts=" ".charCodeAt(0),Os="\r".charCodeAt(0),Fd="[".charCodeAt(0),zd="]".charCodeAt(0),Bd="(".charCodeAt(0),Wd=")".charCodeAt(0),Ud="{".charCodeAt(0),Vd="}".charCodeAt(0),Hd=";".charCodeAt(0),Gd="*".charCodeAt(0),jd=":".charCodeAt(0),Yd="@".charCodeAt(0),Ds=/[\t\n\f\r "#'()/;[\\\]{}]/g,$s=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Zd=/.[\r\n"'(/\\]/,Ao=/[\da-f]/i;var Xd=function(e,t={}){let s=e.css.valueOf(),i=t.ignoreErrors,n,o,l,a,c,u,h,d,f,m,y=s.length,p=0,g=[],w=[];function S(){return p}function b(E){throw e.error("Unclosed "+E,p)}function C(){return w.length===0&&p>=y}function x(E){if(w.length)return w.pop();if(p>=y)return;let $=E?E.ignoreUnclosed:!1;switch(n=s.charCodeAt(p),n){case Ns:case zt:case Ts:case Os:case Rs:{a=p;do a+=1,n=s.charCodeAt(a);while(n===zt||n===Ns||n===Ts||n===Os||n===Rs);u=["space",s.slice(p,a)],p=a-1;break}case Fd:case zd:case Ud:case Vd:case jd:case Hd:case Wd:{let k=String.fromCharCode(n);u=[k,k,p];break}case Bd:{if(m=g.length?g.pop()[1]:"",f=s.charCodeAt(p+1),m==="url"&&f!==Hr&&f!==Eo&&f!==zt&&f!==Ns&&f!==Ts&&f!==Rs&&f!==Os){a=p;do{if(h=!1,a=s.indexOf(")",a+1),a===-1)if(i||$){a=p;break}else b("bracket");for(d=a;s.charCodeAt(d-1)===Is;)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||Zd.test(o)?u=["(","(",p]:(u=["brackets",o,p,a],p=a);break}case Hr:case Eo:{c=n===Hr?"'":'"',a=p;do{if(h=!1,a=s.indexOf(c,a+1),a===-1)if(i||$){a=p+1;break}else b("string");for(d=a;s.charCodeAt(d-1)===Is;)d-=1,h=!h}while(h);u=["string",s.slice(p,a+1),p,a],p=a;break}case Yd:{Ds.lastIndex=p+1,Ds.test(s),Ds.lastIndex===0?a=s.length-1:a=Ds.lastIndex-2,u=["at-word",s.slice(p,a+1),p,a],p=a;break}case Is:{for(a=p,l=!0;s.charCodeAt(a+1)===Is;)a+=1,l=!l;if(n=s.charCodeAt(a+1),l&&n!==Mo&&n!==zt&&n!==Ns&&n!==Ts&&n!==Os&&n!==Rs&&(a+=1,Ao.test(s.charAt(a)))){for(;Ao.test(s.charAt(a+1));)a+=1;s.charCodeAt(a+1)===zt&&(a+=1)}u=["word",s.slice(p,a+1),p,a],p=a;break}default:{n===Mo&&s.charCodeAt(p+1)===Gd?(a=s.indexOf("*/",p+2)+1,a===0&&(i||$?a=s.length:b("comment")),u=["comment",s.slice(p,a+1),p,a],p=a):($s.lastIndex=p+1,$s.test(s),$s.lastIndex===0?a=s.length-1:a=$s.lastIndex-2,u=["word",s.slice(p,a+1),p,a],g.push(u),p=a);break}}return p++,u}function M(E){w.push(E)}return{back:M,endOfFile:C,nextToken:x,position:S}};let Jd=hn,qd=wr,Kd=Sr,Qd=ms,Io=fn,ef=Xd;const No={empty:!0,space:!0};function tf(r){for(let e=r.length-1;e>=0;e--){let t=r[e],s=t[3]||t[2];if(s)return s}}let sf=class{constructor(e){this.input=e,this.root=new Qd,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 Jd;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let s,i,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,i=a[n];i&&i[0]==="space";)i=a[--n];i&&(t.source.end=this.getPosition(i[3]||i[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,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(s+=1,s===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,s,i,n;for(let[o,l]of e.entries()){if(i=l,n=i[0],n==="("&&(t+=1),n===")"&&(t-=1),t===0&&n===":")if(!s)this.doubleColon(i);else{if(s[0]==="word"&&s[1]==="progid")continue;return o}s=i}return!1}comment(e){let t=new qd;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 i=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=ef(this.input)}decl(e,t){let s=new Kd;this.init(s,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(i[3]||i[2]||tf(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 Io;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,i=!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&&i&&s==="{")n||(n=c),o.push("}");else if(o.length===0)if(s===";")if(i){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===":"&&(i=!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&&i){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,i){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&&!i?c=!1:o==="comment"?(h=s[d-1]?s[d-1][0]:"empty",u=s[d+1]?s[d+1][0]:"empty",!No[h]&&!No[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 Io;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 i=t;i<e.length;i++)s+=e[i][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 rf=sf;let nf=ht,of=Cr,af=rf;function ar(r,e){let t=new of(r,e),s=new af(t);try{s.parse()}catch(i){throw i}return s.root}var pn=ar;ar.default=ar;nf.registerParse(ar);let wi=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 gl=wi;wi.default=wi;let lf=gl,Si=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 lf(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>e.type==="warning")}};var mn=Si;Si.default=Si;let cf=ht,uf=dn,hf=ml,df=pn,Ro=mn,ff=ms,pf=br,{isClean:_e,my:mf}=ps;const gf={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},yf={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},bf={Once:!0,postcssPlugin:!0,prepare:!0},Nt=0;function Bt(r){return typeof r=="object"&&typeof r.then=="function"}function yl(r){let e=!1,t=gf[r.type];return r.type==="decl"?e=r.prop.toLowerCase():r.type==="atrule"&&(e=r.name.toLowerCase()),e&&r.append?[t,t+"-"+e,Nt,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:r.append?[t,Nt,t+"Exit"]:[t,t+"Exit"]}function To(r){let e;return r.type==="document"?e=["Document",Nt,"DocumentExit"]:r.type==="root"?e=["Root",Nt,"RootExit"]:e=yl(r),{eventIndex:0,events:e,iterator:0,node:r,visitorIndex:0,visitors:[]}}function Ci(r){return r[_e]=!1,r.nodes&&r.nodes.forEach(e=>Ci(e)),r}let xi={},Rt=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 i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=Ci(t);else if(t instanceof bl||t instanceof Ro)i=Ci(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=df;s.syntax&&(n=s.syntax.parse),s.parser&&(n=s.parser),n.parse&&(n=n.parse);try{i=n(t,s)}catch(o){this.processed=!0,this.error=o}i&&!i[mf]&&cf.rebuild(i)}this.result=new Ro(e,i,s),this.helpers=ae(R({},xi),{postcss:xi,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?R(R({},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(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,s,i)=>{this.listeners[s]||(this.listeners[s]=[]),this.listeners[s].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let s in t){if(!yf[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!bf[s])if(typeof t[s]=="object")for(let i in t[s])i==="*"?e(t,s,t[s][i]):e(t,s+"-"+i.toLowerCase(),t[s][i]);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(Bt(s))try{await s}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[_e];){e[_e]=!0;let t=[To(e)];for(;t.length>0;){let s=this.visitTick(t);if(Bt(s))try{await s}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,s]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>s(n,this.helpers));await Promise.all(i)}else await s(e,this.helpers)}catch(i){throw this.handleError(i)}}}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 Bt(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=pf;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new hf(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[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(Bt(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[_e];)e[_e]=!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,i]of e){this.result.lastPlugin=s;let n;try{n=i(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Bt(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:s,visitors:i}=t;if(s.type!=="root"&&s.type!=="document"&&!s.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[o,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.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[_e]){l[_e]=!0,e.push(To(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===Nt){s.nodes&&s.nodes.length&&(s[_e]=!0,t.iterator=s.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[_e]=!0;let t=yl(e);for(let s of t)if(s===Nt)e.nodes&&e.each(i=>{i[_e]||this.walkSync(i)});else{let i=this.listeners[s];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};Rt.registerPostcss=r=>{xi=r};var vl=Rt;Rt.default=Rt;ff.registerLazyResult(Rt);uf.registerLazyResult(Rt);let vf=ml,wf=pn;const Sf=mn;let Cf=br;let Ei=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=wf;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 i,n=Cf;this.result=new Sf(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new vf(n,i,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 xf=Ei;Ei.default=Ei;let Ef=dn,Mf=vl,Af=xf,If=ms,ns=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 Af(this,e,t):new Mf(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Nf=ns;ns.default=ns;If.registerProcessor(ns);Ef.registerProcessor(ns);let wl=hn,Sl=wr,Rf=ht,Tf=ln,Cl=Sr,xl=dn,Of=$d,Df=Cr,$f=vl,kf=cl,_f=vr,Lf=pn,gn=Nf,Pf=mn,El=ms,Ml=fn,Ff=br,zf=gl;function J(...r){return r.length===1&&Array.isArray(r[0])&&(r=r[0]),new gn(r)}J.plugin=function(e,t){let s=!1;function i(...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 mn().version,l}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(o,l,a){return J([i(a)]).process(o,l)},i};J.stringify=Lf;J.parse=kf;J.fromJSON=Rf;J.list=Df;J.comment=s=>new vl(s);J.atRule=s=>new bl(s);J.decl=s=>new wl(s);J.rule=s=>new xl(s);J.root=s=>new Cl(s);J.document=s=>new Sl(s);J.CssSyntaxError=Nf;J.Declaration=wl;J.Container=If;J.Processor=mn;J.Document=Sl;J.Comment=vl;J.Warning=Pf;J.AtRule=bl;J.Result=_f;J.Input=Tf;J.Rule=xl;J.Root=Cl;J.Node=$f;Of.registerPostcss(J);var Ff=J;J.default=J;const re=Jh(Ff);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;const Ro={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 zf(s){let e=Ro[s.tagName]?Ro[s.tagName]:s.tagName;return e==="link"&&s.attributes._cssText&&(e="style"),e}function xs(s,e){const t=e==null?void 0:e.stylesWithHoverClass.get(s);if(t)return t;let r=s;try{r=re([Yh,Zh,Xh]).process(s).css}catch(i){console.warn("Failed to adapt css for replay",i)}return e==null||e.stylesWithHoverClass.set(s,r),r}function To(){return{stylesWithHoverClass:new Map}}function Bf(s,e,t,r){const i=[];for(const a of s.childNodes)a.type===H.Text&&i.push(a);const n=e.split("/* rr_split */");for(;n.length>1&&n.length>i.length;)n.splice(-2,2,n.slice(-2).join(""));let o="";t&&(o=xs(n.join(""),r));let l=0;for(let a=0;a<i.length&&a!==n.length;a++){const c=i[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 Wf(s,e,t,r){const{doc:i,hackCss:n,cache:o}=r;s.childNodes.length?Bf(s,t,n,o):(n&&(t=xs(t,o)),e.appendChild(i.createTextNode(t)))}function Uf(s,e){var t;const{doc:r,hackCss:i,cache:n}=e;switch(s.type){case H.Document:return r.implementation.createDocument(null,"",null);case H.DocumentType:return r.implementation.createDocumentType(s.name||"html",s.publicId,s.systemId);case H.Element:{const o=zf(s);let l;s.isSVG?l=r.createElementNS("http://www.w3.org/2000/svg",o):(s.isCustom&&((t=r.defaultView)!=null&&t.customElements)&&!r.defaultView.customElements.get(s.tagName)&&r.defaultView.customElements.define(s.tagName,class extends r.defaultView.HTMLElement{}),l=r.createElement(o));const a={};for(const c in s.attributes){if(!Object.prototype.hasOwnProperty.call(s.attributes,c))continue;let u=s.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"){Wf(s,l,u,e);continue}else if(o==="textarea"&&c==="value"){l.appendChild(r.createTextNode(u)),s.childNodes=[];continue}}try{if(s.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"&&s.attributes["http-equiv"]==="Content-Security-Policy"&&c==="content"){l.setAttribute("csp-content",u.toString());continue}else o==="link"&&(s.attributes.rel==="preload"&&s.attributes.as==="script"||s.attributes.rel==="modulepreload")||o==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&Qi(s.attributes.href)==="js"||(o==="img"&&s.attributes.srcset&&s.attributes.rr_dataURL?l.setAttribute("rrweb-original-srcset",s.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=r.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",s.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(s.isShadowHost)if(!l.shadowRoot)l.attachShadow({mode:"open"});else for(;l.shadowRoot.firstChild;)l.shadowRoot.removeChild(l.shadowRoot.firstChild);return l}case H.Text:return s.isStyle&&i?r.createTextNode(xs(s.textContent,n)):r.createTextNode(s.textContent);case H.CDATA:return r.createCDATASection(s.textContent);case H.Comment:return r.createComment(s.textContent);default:return null}}function Qt(s,e){const{doc:t,mirror:r,skipChild:i=!1,hackCss:n=!0,afterAppend:o,cache:l}=e;if(r.has(s.id)){const c=r.getNode(s.id),u=r.getMeta(c);if(Iu(u,s))return r.getNode(s.id)}let a=Uf(s,{doc:t,hackCss:n,cache:l});if(!a)return null;if(s.rootId&&r.getNode(s.rootId)!==t&&r.replace(s.rootId,t),s.type===H.Document&&(t.close(),t.open(),s.compatMode==="BackCompat"&&s.childNodes&&s.childNodes[0].type!==H.DocumentType&&(s.childNodes[0].type===H.Element&&"xmlns"in s.childNodes[0].attributes&&s.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),r.add(a,s),(s.type===H.Document||s.type===H.Element)&&!i)for(const c of s.childNodes){const u=Qt(c,{doc:t,mirror:r,skipChild:!1,hackCss:n,afterAppend:o,cache:l});if(!u){console.warn("Failed to rebuild",c);continue}if(c.isShadow&&Jt(a)&&a.shadowRoot)a.shadowRoot.appendChild(u);else if(s.type===H.Document&&c.type==H.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(s,e){function t(r){e(r)}for(const r of s.getIds())s.has(r)&&t(s.getNode(r))}function Hf(s,e){const t=e.getMeta(s);if((t==null?void 0:t.type)!==H.Element)return;const r=s;for(const i in t.attributes){if(!(Object.prototype.hasOwnProperty.call(t.attributes,i)&&i.startsWith("rr_")))continue;const n=t.attributes[i];i==="rr_scrollLeft"&&(r.scrollLeft=n),i==="rr_scrollTop"&&(r.scrollTop=n)}}function Gf(s,e){const{doc:t,onVisit:r,hackCss:i=!0,afterAppend:n,cache:o,mirror:l=new Ki}=e,a=Qt(s,{doc:t,mirror:l,skipChild:!1,hackCss:i,afterAppend:n,cache:o});return Vf(l,c=>{r&&r(c),Hf(c,l)}),a}var jf=Object.defineProperty,Yf=(s,e,t)=>e in s?jf(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,I=(s,e,t)=>Yf(s,typeof e!="symbol"?e+"":e,t),Zf=Object.defineProperty,Xf=(s,e,t)=>e in s?Zf(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Hs=(s,e,t)=>Xf(s,typeof e!="symbol"?e+"":e,t);let Jf=class{constructor(){Hs(this,"idNodeMap",new Map),Hs(this,"nodeMetaMap",new WeakMap),Hs(this,"selectorNodeMap",new Map)}getId(e){var t;if(!e)return-1;const r=(t=this.getMeta(e))==null?void 0:t.id;return r!=null?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t);const r=this.getMeta(e);if(r!=null&&r.selector){const i=this.selectorNodeMap.get(r.selector);i&&(i.delete(e),i.size===0&&this.selectorNodeMap.delete(r.selector))}e.childNodes&&e.childNodes.forEach(i=>this.removeNodeFromMap(i))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;if(this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t),t.selector){let i=this.selectorNodeMap.get(t.selector);i||(i=new Set,this.selectorNodeMap.set(t.selector,i)),i.add(e)}}replace(e,t){const r=this.getNode(e);if(r){const i=this.nodeMetaMap.get(r);if(i&&(this.nodeMetaMap.set(t,i),i.selector)){const n=this.selectorNodeMap.get(i.selector);n&&(n.delete(r),n.add(t))}}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap,this.selectorNodeMap=new Map}getNodeBySelector(e){const t=this.selectorNodeMap.get(e);return!t||t.size===0?null:t.values().next().value||null}getNodesBySelector(e){const t=this.selectorNodeMap.get(e);return t?Array.from(t):[]}hasSelector(e){const t=this.selectorNodeMap.get(e);return t!==void 0&&t.size>0}};function qf(){return new Jf}const Kf=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],Qf=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],El=new WeakSet,ep=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(s,e,t){if(ep.call(this,s,e,t),this instanceof Element){const r=s.toLowerCase();Kf.includes(r)&&El.add(this)}};const tp=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(s,e,t){tp.call(this,s,e,t)};function Oo(){document.querySelectorAll("*").forEach(e=>{Qf.forEach(t=>{e.hasAttribute(t)&&El.add(e)})})}try{document.readyState==="complete"||document.readyState==="interactive"?Oo():document.addEventListener("DOMContentLoaded",Oo)}catch(s){}function rp(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function sp(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function r(){return this instanceof r?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(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}var gn={exports:{}},z=String,Ml=function(){return{isColorSupported:!1,reset:z,bold:z,dim:z,italic:z,underline:z,inverse:z,hidden:z,strikethrough:z,black:z,red:z,green:z,yellow:z,blue:z,magenta:z,cyan:z,white:z,gray:z,bgBlack:z,bgRed:z,bgGreen:z,bgYellow:z,bgBlue:z,bgMagenta:z,bgCyan:z,bgWhite:z,blackBright:z,redBright:z,greenBright:z,yellowBright:z,blueBright:z,magentaBright:z,cyanBright:z,whiteBright:z,bgBlackBright:z,bgRedBright:z,bgGreenBright:z,bgYellowBright:z,bgBlueBright:z,bgMagentaBright:z,bgCyanBright:z,bgWhiteBright:z}};gn.exports=Ml();gn.exports.createColors=Ml;var ip=gn.exports;const np={},op=Object.freeze(Object.defineProperty({__proto__:null,default:np},Symbol.toStringTag,{value:"Module"})),Ne=sp(op);let Do=ip,$o=Ne,Ei=class Al extends Error{constructor(e,t,r,i,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),o&&(this.plugin=o),typeof t!="undefined"&&typeof r!="undefined"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Al)}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=Do.isColorSupported);let r=u=>u,i=u=>u,n=u=>u;if(e){let{bold:u,gray:h,red:d}=Do.createColors(!0);i=f=>u(d(f)),r=f=>h(f),$o&&(n=f=>$o(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),w=u.slice(p,g),S=r(f.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return i(">")+r(f)+n(w)+`
|
|
41
|
-
`+S+i("^")}let m=
|
|
42
|
-
`+m+i("^")}return" "+
|
|
40
|
+
https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new gn().version,l}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(o,l,a){return J([i(a)]).process(o,l)},i};J.stringify=Ff;J.parse=Lf;J.fromJSON=Of;J.list=kf;J.comment=r=>new Sl(r);J.atRule=r=>new wl(r);J.decl=r=>new Cl(r);J.rule=r=>new Ml(r);J.root=r=>new El(r);J.document=r=>new xl(r);J.CssSyntaxError=Tf;J.Declaration=Cl;J.Container=Rf;J.Processor=gn;J.Document=xl;J.Comment=Sl;J.Warning=zf;J.AtRule=wl;J.Result=Pf;J.Input=Df;J.Rule=Ml;J.Root=El;J.Node=_f;$f.registerPostcss(J);var Bf=J;J.default=J;const ie=Kh(Bf);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 Oo={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 Wf(r){let e=Oo[r.tagName]?Oo[r.tagName]:r.tagName;return e==="link"&&r.attributes._cssText&&(e="style"),e}function xr(r,e){const t=e==null?void 0:e.stylesWithHoverClass.get(r);if(t)return t;let s=r;try{s=ie([Xh,Jh,qh]).process(r).css}catch(i){console.warn("Failed to adapt css for replay",i)}return e==null||e.stylesWithHoverClass.set(r,s),s}function Do(){return{stylesWithHoverClass:new Map}}function Uf(r,e,t,s){const i=[];for(const a of r.childNodes)a.type===H.Text&&i.push(a);const n=e.split("/* rr_split */");for(;n.length>1&&n.length>i.length;)n.splice(-2,2,n.slice(-2).join(""));let o="";t&&(o=xr(n.join(""),s));let l=0;for(let a=0;a<i.length&&a!==n.length;a++){const c=i[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 Vf(r,e,t,s){const{doc:i,hackCss:n,cache:o}=s;r.childNodes.length?Uf(r,t,n,o):(n&&(t=xr(t,o)),e.appendChild(i.createTextNode(t)))}function Hf(r,e){var t;const{doc:s,hackCss:i,cache:n}=e;switch(r.type){case H.Document:return s.implementation.createDocument(null,"",null);case H.DocumentType:return s.implementation.createDocumentType(r.name||"html",r.publicId,r.systemId);case H.Element:{const o=Wf(r);let l;r.isSVG?l=s.createElementNS("http://www.w3.org/2000/svg",o):(r.isCustom&&((t=s.defaultView)!=null&&t.customElements)&&!s.defaultView.customElements.get(r.tagName)&&s.defaultView.customElements.define(r.tagName,class extends s.defaultView.HTMLElement{}),l=s.createElement(o));const a={};for(const c in r.attributes){if(!Object.prototype.hasOwnProperty.call(r.attributes,c))continue;let u=r.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"){Vf(r,l,u,e);continue}else if(o==="textarea"&&c==="value"){l.appendChild(s.createTextNode(u)),r.childNodes=[];continue}}try{if(r.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"&&r.attributes["http-equiv"]==="Content-Security-Policy"&&c==="content"){l.setAttribute("csp-content",u.toString());continue}else o==="link"&&(r.attributes.rel==="preload"&&r.attributes.as==="script"||r.attributes.rel==="modulepreload")||o==="link"&&r.attributes.rel==="prefetch"&&typeof r.attributes.href=="string"&&en(r.attributes.href)==="js"||(o==="img"&&r.attributes.srcset&&r.attributes.rr_dataURL?l.setAttribute("rrweb-original-srcset",r.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",r.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(r.isShadowHost)if(!l.shadowRoot)l.attachShadow({mode:"open"});else for(;l.shadowRoot.firstChild;)l.shadowRoot.removeChild(l.shadowRoot.firstChild);return l}case H.Text:return r.isStyle&&i?s.createTextNode(xr(r.textContent,n)):s.createTextNode(r.textContent);case H.CDATA:return s.createCDATASection(r.textContent);case H.Comment:return s.createComment(r.textContent);default:return null}}function Kt(r,e){const{doc:t,mirror:s,skipChild:i=!1,hackCss:n=!0,afterAppend:o,cache:l}=e;if(s.has(r.id)){const c=s.getNode(r.id),u=s.getMeta(c);if(Ru(u,r))return s.getNode(r.id)}let a=Hf(r,{doc:t,hackCss:n,cache:l});if(!a)return null;if(r.rootId&&s.getNode(r.rootId)!==t&&s.replace(r.rootId,t),r.type===H.Document&&(t.close(),t.open(),r.compatMode==="BackCompat"&&r.childNodes&&r.childNodes[0].type!==H.DocumentType&&(r.childNodes[0].type===H.Element&&"xmlns"in r.childNodes[0].attributes&&r.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,r),(r.type===H.Document||r.type===H.Element)&&!i)for(const c of r.childNodes){const u=Kt(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&&Xt(a)&&a.shadowRoot)a.shadowRoot.appendChild(u);else if(r.type===H.Document&&c.type==H.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 Gf(r,e){function t(s){e(s)}for(const s of r.getIds())r.has(s)&&t(r.getNode(s))}function jf(r,e){const t=e.getMeta(r);if((t==null?void 0:t.type)!==H.Element)return;const s=r;for(const i in t.attributes){if(!(Object.prototype.hasOwnProperty.call(t.attributes,i)&&i.startsWith("rr_")))continue;const n=t.attributes[i];i==="rr_scrollLeft"&&(s.scrollLeft=n),i==="rr_scrollTop"&&(s.scrollTop=n)}}function Yf(r,e){const{doc:t,onVisit:s,hackCss:i=!0,afterAppend:n,cache:o,mirror:l=new Qi}=e,a=Kt(r,{doc:t,mirror:l,skipChild:!1,hackCss:i,afterAppend:n,cache:o});return Gf(l,c=>{s&&s(c),jf(c,l)}),a}var Zf=Object.defineProperty,Xf=(r,e,t)=>e in r?Zf(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,I=(r,e,t)=>Xf(r,typeof e!="symbol"?e+"":e,t),Jf=Object.defineProperty,qf=(r,e,t)=>e in r?Jf(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Gr=(r,e,t)=>qf(r,typeof e!="symbol"?e+"":e,t);let Kf=class{constructor(){Gr(this,"idNodeMap",new Map),Gr(this,"nodeMetaMap",new WeakMap),Gr(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 i=this.selectorNodeMap.get(s.selector);i&&(i.delete(e),i.size===0&&this.selectorNodeMap.delete(s.selector))}e.childNodes&&e.childNodes.forEach(i=>this.removeNodeFromMap(i))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const s=t.id;if(this.idNodeMap.set(s,e),this.nodeMetaMap.set(e,t),t.selector){let i=this.selectorNodeMap.get(t.selector);i||(i=new Set,this.selectorNodeMap.set(t.selector,i)),i.add(e)}}replace(e,t){const s=this.getNode(e);if(s){const i=this.nodeMetaMap.get(s);if(i&&(this.nodeMetaMap.set(t,i),i.selector)){const n=this.selectorNodeMap.get(i.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 Qf(){return new Kf}const ep=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],tp=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],Al=new WeakSet,sp=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(r,e,t){if(sp.call(this,r,e,t),this instanceof Element){const s=r.toLowerCase();ep.includes(s)&&Al.add(this)}};const rp=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(r,e,t){rp.call(this,r,e,t)};function $o(){document.querySelectorAll("*").forEach(e=>{tp.forEach(t=>{e.hasAttribute(t)&&Al.add(e)})})}try{document.readyState==="complete"||document.readyState==="interactive"?$o():document.addEventListener("DOMContentLoaded",$o)}catch(r){}function ip(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function np(r){if(r.__esModule)return r;var e=r.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(r).forEach(function(s){var i=Object.getOwnPropertyDescriptor(r,s);Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:function(){return r[s]}})}),t}var yn={exports:{}},z=String,Il=function(){return{isColorSupported:!1,reset:z,bold:z,dim:z,italic:z,underline:z,inverse:z,hidden:z,strikethrough:z,black:z,red:z,green:z,yellow:z,blue:z,magenta:z,cyan:z,white:z,gray:z,bgBlack:z,bgRed:z,bgGreen:z,bgYellow:z,bgBlue:z,bgMagenta:z,bgCyan:z,bgWhite:z,blackBright:z,redBright:z,greenBright:z,yellowBright:z,blueBright:z,magentaBright:z,cyanBright:z,whiteBright:z,bgBlackBright:z,bgRedBright:z,bgGreenBright:z,bgYellowBright:z,bgBlueBright:z,bgMagentaBright:z,bgCyanBright:z,bgWhiteBright:z}};yn.exports=Il();yn.exports.createColors=Il;var op=yn.exports;const ap={},lp=Object.freeze(Object.defineProperty({__proto__:null,default:ap},Symbol.toStringTag,{value:"Module"})),Oe=np(lp);let ko=op,_o=Oe,Mi=class Nl extends Error{constructor(e,t,s,i,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),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,Nl)}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=ko.isColorSupported);let s=u=>u,i=u=>u,n=u=>u;if(e){let{bold:u,gray:h,red:d}=ko.createColors(!0);i=f=>u(d(f)),s=f=>h(f),_o&&(n=f=>_o(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),w=u.slice(p,g),S=s(f.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return i(">")+s(f)+n(w)+`
|
|
41
|
+
`+S+i("^")}let m=s(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+s(f)+n(u)+`
|
|
42
|
+
`+m+i("^")}return" "+s(f)+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 bn=Mi;Mi.default=Mi;const Lo={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++)
|
|
53
|
-
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let
|
|
54
|
-
`)&&(
|
|
55
|
-
`)&&(
|
|
56
|
-
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(
|
|
57
|
-
`);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(
|
|
58
|
-
`?(t=1,
|
|
59
|
-
`?(t=1,r+=1):t+=1;return{column:t,line:r,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,r={column:this.source.start.column,line:this.source.start.line,offset:Be(t,this.source.start)},i=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:Be(t,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(e.word){let o=t.slice(Be(t,this.source.start),Be(t,this.source.end)).indexOf(e.word);o!==-1&&(r=this.positionInside(o),i=this.positionInside(o+e.word.length))}else e.start?r={column:e.start.column,line:e.start.line,offset:Be(t,e.start)}:e.index&&(r=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line,offset:Be(t,e.end)}:typeof e.endIndex=="number"?i=this.positionInside(e.endIndex):e.index&&(i=this.positionInside(e.index+1));return(i.line<r.line||i.line===r.line&&i.column<=r.column)&&(i={column:r.column+1,line:r.line,offset:r.offset+1}),{end:i,start:r}}raw(e,t){return new up().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,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=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))r[o]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)r[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++),r[o]={end:l.end,inputId:a,start:l.start}}else r[o]=l}return i&&(r.inputs=[...t.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=hp){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r={}){let i={node:this};for(let n in r)i[n]=r[n];return e.warn(t,i)}};var Ms=Ni;Ni.default=Ni;let fp=Ms,Ri=class extends fp{constructor(e){super(e),this.type="comment"}};var As=Ri;Ri.default=Ri;let pp=Ms,Ti=class extends pp{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=oe(R({},e),{value:String(e.value)})),super(e),this.type="decl"}};var Is=Ti;Ti.default=Ti;let Nl=As,Rl=Is,mp=Ms,{isClean:Tl,my:Ol}=gr,bn,Dl,$l,vn;function kl(s){return s.map(e=>(e.nodes&&(e.nodes=kl(e.nodes)),delete e.source,e))}function _l(s){if(s[Tl]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)_l(e)}let Ge=class Ll extends mp{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 r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}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(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}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")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(n,o)=>i(n.toProxy(),o):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(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 r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],r<n&&(this.indexes[o]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let l of n)this.proxyOf.nodes.splice(r,0,l);let o;for(let l in this.indexes)o=this.indexes[l],r<=o&&(this.indexes[l]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=kl(Dl(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"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 Rl(e)]}else if(e.selector||e.selectors)e=[new vn(e)];else if(e.name)e=[new bn(e)];else if(e.text)e=[new Nl(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Ol]||Ll.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Tl]&&_l(i),i.raws||(i.raws={}),typeof i.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.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 r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}};Ge.registerParse=s=>{Dl=s};Ge.registerRule=s=>{vn=s};Ge.registerAtRule=s=>{bn=s};Ge.registerRoot=s=>{$l=s};var ft=Ge;Ge.default=Ge;Ge.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,bn.prototype):s.type==="rule"?Object.setPrototypeOf(s,vn.prototype):s.type==="decl"?Object.setPrototypeOf(s,Rl.prototype):s.type==="comment"?Object.setPrototypeOf(s,Nl.prototype):s.type==="root"&&Object.setPrototypeOf(s,$l.prototype),s[Ol]=!0,s.nodes&&s.nodes.forEach(e=>{Ge.rebuild(e)})};let Pl=ft,ls=class extends Pl{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 wn=ls;ls.default=ls;Pl.registerAtRule(ls);let gp=ft,Fl,zl,ar=class extends gp{constructor(e){super(R({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new Fl(new zl,this,e).stringify()}};ar.registerLazyResult=s=>{Fl=s};ar.registerProcessor=s=>{zl=s};var Sn=ar;ar.default=ar;let yp="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",bp=(s=21)=>{let e="",t=s|0;for(;t--;)e+=yp[Math.random()*64|0];return e};var vp={nanoid:bp};let{existsSync:wp,readFileSync:Sp}=Ne,{dirname:Gs,join:Cp}=Ne,{SourceMapConsumer:_o,SourceMapGenerator:Lo}=Ne;function xp(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let Oi=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Gs(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new _o(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,o=e.match(i)||e.match(n);if(o)return decodeURIComponent(e.substr(o[0].length));let l=e.match(t)||e.match(r);if(l)return xp(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 r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=Gs(e),wp(e))return this.mapFile=e,Sp(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 r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof _o)return Lo.fromSourceMap(t).toString();if(t instanceof Lo)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 r=this.annotation;return e&&(r=Cp(Gs(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Bl=Oi;Oi.default=Oi;let{nanoid:Ep}=vp,{isAbsolute:Di,resolve:$i}=Ne,{SourceMapConsumer:Mp,SourceMapGenerator:Ap}=Ne,{fileURLToPath:Po,pathToFileURL:kr}=Ne,Fo=yn,Ip=Bl,js=Ne,Ys=Symbol("lineToIndexCache"),Np=!!(Mp&&Ap),zo=!!($i&&Di);function Bo(s){if(s[Ys])return s[Ys];let e=s.css.split(`
|
|
60
|
-
`),t=new Array(e.length),
|
|
61
|
-
`," "];return
|
|
51
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function cp(r){return r[0].toUpperCase()+r.slice(1)}let Ai=class{constructor(e){this.builder=e}atrule(e,t){let s="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?s+=e.raws.afterName:i&&(s+=" "),e.nodes)this.block(e,s+i);else{let n=(e.raws.between||"")+(t?";":"");this.builder(s+i+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 i=e.parent,n=0;for(;i&&i.type!=="root";)n+=1,i=i.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 i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),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 i=0;i<e.nodes.length;i++){let n=e.nodes[i],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==i||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"),i=e.prop+s+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,s){let i;if(s||(s=t),t&&(i=e.raws[t],typeof i!="undefined"))return i;let n=e.parent;if(s==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return Lo[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"+cp(s);this[l]?i=this[l](o,e):o.walk(a=>{if(i=a.raws[t],typeof i!="undefined")return!1})}return typeof i=="undefined"&&(i=Lo[s]),o.rawCache[s]=i,i}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
|
+
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let s;return e.walkComments(i=>{if(typeof i.raws.before!="undefined")return s=i.raws.before,s.includes(`
|
|
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(i=>{if(typeof i.raws.before!="undefined")return s=i.raws.before,s.includes(`
|
|
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
|
+
`)&&(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 i=s.parent;if(i&&i!==e&&i.parent&&i.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],i=e.raws[t];return i&&i.value===s?i.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 Rl=Ai;Ai.default=Ai;let up=Rl;function Ii(r,e){new up(e).stringify(r)}var Er=Ii;Ii.default=Ii;var gs={};gs.isClean=Symbol("isClean");gs.my=Symbol("my");let hp=bn,dp=Rl,fp=Er,{isClean:Wt,my:pp}=gs;function Ni(r,e){let t=new r.constructor;for(let s in r){if(!Object.prototype.hasOwnProperty.call(r,s)||s==="proxyCache")continue;let i=r[s],n=typeof i;s==="parent"&&n==="object"?e&&(t[s]=e):s==="source"?t[s]=i:Array.isArray(i)?t[s]=i.map(o=>Ni(o,t)):(n==="object"&&i!==null&&(i=Ni(i)),t[s]=i)}return t}function We(r,e){if(e&&typeof e.offset!="undefined")return e.offset;let t=1,s=1,i=0;for(let n=0;n<r.length;n++){if(s===e.line&&t===e.column){i=n;break}r[n]===`
|
|
58
|
+
`?(t=1,s+=1):t+=1}return i}let Ri=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[Wt]=!1,this[pp]=!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=Ni(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:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:s.column,line:s.line},t)}return new hp(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[Wt]=!0}markDirty(){if(this[Wt]){this[Wt]=!1;let e=this;for(;e=e.parent;)e[Wt]=!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(We(s,this.source.start),We(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,i="document"in this.source.input?this.source.input.document:this.source.input.css,n=We(i,this.source.start),o=n+e;for(let l=n;l<o;l++)i[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:We(t,this.source.start)},i=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:We(t,this.source.end)+1}:{column:s.column+1,line:s.line,offset:s.offset+1};if(e.word){let o=t.slice(We(t,this.source.start),We(t,this.source.end)).indexOf(e.word);o!==-1&&(s=this.positionInside(o),i=this.positionInside(o+e.word.length))}else e.start?s={column:e.start.column,line:e.start.line,offset:We(t,e.start)}:e.index&&(s=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line,offset:We(t,e.end)}:typeof e.endIndex=="number"?i=this.positionInside(e.endIndex):e.index&&(i=this.positionInside(e.index+1));return(i.line<s.line||i.line===s.line&&i.column<=s.column)&&(i={column:s.column+1,line:s.line,offset:s.offset+1}),{end:i,start:s}}raw(e,t){return new dp().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 i of e)i===this?s=!0:s?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);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={},i=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 i&&(s.inputs=[...t.keys()].map(o=>o.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=fp){e.stringify&&(e=e.stringify);let t="";return e(this,s=>{t+=s}),t}warn(e,t,s={}){let i={node:this};for(let n in s)i[n]=s[n];return e.warn(t,i)}};var Mr=Ri;Ri.default=Ri;let mp=Mr,Ti=class extends mp{constructor(e){super(e),this.type="comment"}};var Ar=Ti;Ti.default=Ti;let gp=Mr,Oi=class extends gp{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=ae(R({},e),{value:String(e.value)})),super(e),this.type="decl"}};var Ir=Oi;Oi.default=Oi;let Tl=Ar,Ol=Ir,yp=Mr,{isClean:Dl,my:$l}=gs,vn,kl,_l,wn;function Ll(r){return r.map(e=>(e.nodes&&(e.nodes=Ll(e.nodes)),delete e.source,e))}function Pl(r){if(r[Dl]=!1,r.proxyOf.nodes)for(let e of r.proxyOf.nodes)Pl(e)}let je=class Fl extends yp{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 i of s)this.proxyOf.nodes.push(i)}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,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(s=this.indexes[t],i=e(this.proxyOf.nodes[s],s),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}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(i=>typeof i=="function"?(n,o)=>i(n.toProxy(),o):i)):t==="every"||t==="some"?s=>e[t]((i,...n)=>s(i.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),i=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let o of i)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+i.length);return this.markDirty(),this}insertBefore(e,t){let s=this.index(e),i=s===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[s],i).reverse();s=this.index(e);for(let l of n)this.proxyOf.nodes.splice(s,0,l);let o;for(let l in this.indexes)o=this.indexes[l],s<=o&&(this.indexes[l]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Ll(kl(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"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 Ol(e)]}else if(e.selector||e.selectors)e=[new wn(e)];else if(e.name)e=[new vn(e)];else if(e.text)e=[new Tl(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[$l]||Fl.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Dl]&&Pl(i),i.raws||(i.raws={}),typeof i.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let s=this.normalize(t,this.first,"prepend").reverse();for(let i of s)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+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(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,s))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,s)=>{let i;try{i=e(t,s)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((s,i)=>{if(s.type==="atrule"&&e.test(s.name))return t(s,i)}):this.walk((s,i)=>{if(s.type==="atrule"&&s.name===e)return t(s,i)}):(t=e,this.walk((s,i)=>{if(s.type==="atrule")return t(s,i)}))}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,i)=>{if(s.type==="decl"&&e.test(s.prop))return t(s,i)}):this.walk((s,i)=>{if(s.type==="decl"&&s.prop===e)return t(s,i)}):(t=e,this.walk((s,i)=>{if(s.type==="decl")return t(s,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((s,i)=>{if(s.type==="rule"&&e.test(s.selector))return t(s,i)}):this.walk((s,i)=>{if(s.type==="rule"&&s.selector===e)return t(s,i)}):(t=e,this.walk((s,i)=>{if(s.type==="rule")return t(s,i)}))}};je.registerParse=r=>{kl=r};je.registerRule=r=>{wn=r};je.registerAtRule=r=>{vn=r};je.registerRoot=r=>{_l=r};var dt=je;je.default=je;je.rebuild=r=>{r.type==="atrule"?Object.setPrototypeOf(r,vn.prototype):r.type==="rule"?Object.setPrototypeOf(r,wn.prototype):r.type==="decl"?Object.setPrototypeOf(r,Ol.prototype):r.type==="comment"?Object.setPrototypeOf(r,Tl.prototype):r.type==="root"&&Object.setPrototypeOf(r,_l.prototype),r[$l]=!0,r.nodes&&r.nodes.forEach(e=>{je.rebuild(e)})};let zl=dt,lr=class extends zl{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 Sn=lr;lr.default=lr;zl.registerAtRule(lr);let bp=dt,Bl,Wl,os=class extends bp{constructor(e){super(R({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new Bl(new Wl,this,e).stringify()}};os.registerLazyResult=r=>{Bl=r};os.registerProcessor=r=>{Wl=r};var Cn=os;os.default=os;let vp="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",wp=(r=21)=>{let e="",t=r|0;for(;t--;)e+=vp[Math.random()*64|0];return e};var Sp={nanoid:wp};let{existsSync:Cp,readFileSync:xp}=Oe,{dirname:jr,join:Ep}=Oe,{SourceMapConsumer:Po,SourceMapGenerator:Fo}=Oe;function Mp(r){return Buffer?Buffer.from(r,"base64").toString():window.atob(r)}let Di=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,i=this.loadMap(t.from,s);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=jr(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new Po(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,s=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,o=e.match(i)||e.match(n);if(o)return decodeURIComponent(e.substr(o[0].length));let l=e.match(t)||e.match(s);if(l)return Mp(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()),i=e.indexOf("*/",s);s>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,i)))}loadFile(e){if(this.root=jr(e),Cp(e))return this.mapFile=e,xp(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 i=this.loadFile(s);if(!i)throw new Error("Unable to load previous source map: "+s.toString());return i}}else{if(t instanceof Po)return Fo.fromSourceMap(t).toString();if(t instanceof Fo)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let s=this.annotation;return e&&(s=Ep(jr(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 Ul=Di;Di.default=Di;let{nanoid:Ap}=Sp,{isAbsolute:$i,resolve:ki}=Oe,{SourceMapConsumer:Ip,SourceMapGenerator:Np}=Oe,{fileURLToPath:zo,pathToFileURL:ks}=Oe,Bo=bn,Rp=Ul,Yr=Oe,Zr=Symbol("lineToIndexCache"),Tp=!!(Ip&&Np),Wo=!!(ki&&$i);function Uo(r){if(r[Zr])return r[Zr];let e=r.css.split(`
|
|
60
|
+
`),t=new Array(e.length),s=0;for(let i=0,n=e.length;i<n;i++)t[i]=s,s+=e[i].length+1;return r[Zr]=t,t}let cr=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&&(!Wo||/^\w+:\/\//.test(t.from)||$i(t.from)?this.file=t.from:this.file=ki(t.from)),Wo&&Tp){let s=new Rp(this.css,t);if(s.text){this.map=s;let i=s.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+Ap(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,s,i={}){let n,o,l,a,c;if(t&&typeof t=="object"){let h=t,d=s;if(typeof h.offset=="number"){a=h.offset;let f=this.fromOffset(a);t=f.line,s=f.col}else t=h.line,s=h.column,a=this.fromLineAndColumn(t,s);if(typeof d.offset=="number"){l=d.offset;let f=this.fromOffset(l);o=f.line,n=f.col}else o=d.line,n=d.column,l=this.fromLineAndColumn(d.line,d.column)}else if(s)a=this.fromLineAndColumn(t,s);else{a=t;let h=this.fromOffset(a);t=h.line,s=h.col}let u=this.origin(t,s,o,n);return u?c=new Bo(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,i.plugin):c=new Bo(e,o===void 0?t:{column:s,line:t},o===void 0?s:{column:n,line:o},this.css,this.file,i.plugin),c.input={column:s,endColumn:n,endLine:o,endOffset:l,line:t,offset:a,source:this.css},this.file&&(ks&&(c.input.url=ks(this.file).toString()),c.input.file=this.file),c}fromLineAndColumn(e,t){return Uo(this)[e-1]+t-1}fromOffset(e){let t=Uo(this),s=t[t.length-1],i=0;if(e>=s)i=t.length-1;else{let n=t.length-2,o;for(;i<n;)if(o=i+(n-i>>1),e<t[o])n=o-1;else if(e>=t[o+1])i=o+1;else{i=o;break}}return{col:e-t[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ki(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,s,i){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:i,line:s}));let a;$i(o.source)?a=ks(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||ks(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(zo)c.file=zo(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=R({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};var Nr=cr;cr.default=cr;Yr&&Yr.registerInput&&Yr.registerInput(cr);let Vl=dt,Hl,Gl,Tt=class extends Vl{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,s){let i=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 i)n.raws.before=t.raws.before}return i}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 Hl(new Gl,this,e).stringify()}};Tt.registerLazyResult=r=>{Hl=r};Tt.registerProcessor=r=>{Gl=r};var ys=Tt;Tt.default=Tt;Vl.registerRoot(Tt);let as={comma(r){return as.split(r,[","],!0)},space(r){let e=[" ",`
|
|
61
|
+
`," "];return as.split(r,e)},split(r,e,t){let s=[],i="",n=!1,o=0,l=!1,a="",c=!1;for(let u of r)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?(i!==""&&s.push(i.trim()),i="",n=!1):i+=u;return(t||i!=="")&&s.push(i.trim()),s}};var jl=as;as.default=as;let Yl=dt,Op=jl,ur=class extends Yl{get selectors(){return Op.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 xn=ur;ur.default=ur;Yl.registerRule(ur);let Dp=Sn,$p=Ar,kp=Ir,_p=Nr,Lp=Ul,Pp=ys,Fp=xn;function ls(r,e){if(Array.isArray(r))return r.map(o=>ls(o));let i=r,{inputs:t}=i,s=gt(i,["inputs"]);if(t){e=[];for(let o of t){let l=ae(R({},o),{__proto__:_p.prototype});l.map&&(l.map=ae(R({},l.map),{__proto__:Lp.prototype})),e.push(l)}}if(s.nodes&&(s.nodes=r.nodes.map(o=>ls(o,e))),s.source){let n=s.source,{inputId:o}=n,l=gt(n,["inputId"]);s.source=l,o!=null&&(s.source.input=e[o])}if(s.type==="root")return new Pp(s);if(s.type==="decl")return new kp(s);if(s.type==="rule")return new Fp(s);if(s.type==="comment")return new $p(s);if(s.type==="atrule")return new Dp(s);throw new Error("Unknown node type: "+r.type)}var zp=ls;ls.default=ls;let{dirname:Js,relative:Zl,resolve:Xl,sep:Jl}=Oe,{SourceMapConsumer:ql,SourceMapGenerator:qs}=Oe,{pathToFileURL:Vo}=Oe,Bp=Nr,Wp=!!(ql&&qs),Up=!!(Js&&Xl&&Zl&&Jl),Vp=class{constructor(e,t,s,i){this.stringify=e,this.mapOpts=s.map||{},this.root=t,this.opts=s,this.css=i,this.originalCSS=i,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)),
|
|
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?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=
|
|
66
|
-
`.charCodeAt(0),Ht=" ".charCodeAt(0),Pr="\f".charCodeAt(0),Fr=" ".charCodeAt(0),zr="\r".charCodeAt(0),Up="[".charCodeAt(0),Vp="]".charCodeAt(0),Hp="(".charCodeAt(0),Gp=")".charCodeAt(0),jp="{".charCodeAt(0),Yp="}".charCodeAt(0),Zp=";".charCodeAt(0),Xp="*".charCodeAt(0),Jp=":".charCodeAt(0),qp="@".charCodeAt(0),Br=/[\t\n\f\r "#'()/;[\\\]{}]/g,Wr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Kp=/.[\r\n"'(/\\]/,Ho=/[\da-f]/i;var Qp=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,l,a,c,u,h,d,f,m,y=r.length,p=0,g=[],w=[];function S(){return p}function b(E){throw e.error("Unclosed "+E,p)}function C(){return w.length===0&&p>=y}function x(E){if(w.length)return w.pop();if(p>=y)return;let k=E?E.ignoreUnclosed:!1;switch(n=r.charCodeAt(p),n){case Lr:case Ht:case Fr:case zr:case Pr:{a=p;do a+=1,n=r.charCodeAt(a);while(n===Ht||n===Lr||n===Fr||n===zr||n===Pr);u=["space",r.slice(p,a)],p=a-1;break}case Up:case Vp:case jp:case Yp:case Jp:case Zp:case Gp:{let _=String.fromCharCode(n);u=[_,_,p];break}case Hp:{if(m=g.length?g.pop()[1]:"",f=r.charCodeAt(p+1),m==="url"&&f!==Zs&&f!==Uo&&f!==Ht&&f!==Lr&&f!==Fr&&f!==Pr&&f!==zr){a=p;do{if(h=!1,a=r.indexOf(")",a+1),a===-1)if(i||k){a=p;break}else b("bracket");for(d=a;r.charCodeAt(d-1)===_r;)d-=1,h=!h}while(h);u=["brackets",r.slice(p,a+1),p,a],p=a}else a=r.indexOf(")",p+1),o=r.slice(p,a+1),a===-1||Kp.test(o)?u=["(","(",p]:(u=["brackets",o,p,a],p=a);break}case Zs:case Uo:{c=n===Zs?"'":'"',a=p;do{if(h=!1,a=r.indexOf(c,a+1),a===-1)if(i||k){a=p+1;break}else b("string");for(d=a;r.charCodeAt(d-1)===_r;)d-=1,h=!h}while(h);u=["string",r.slice(p,a+1),p,a],p=a;break}case qp:{Br.lastIndex=p+1,Br.test(r),Br.lastIndex===0?a=r.length-1:a=Br.lastIndex-2,u=["at-word",r.slice(p,a+1),p,a],p=a;break}case _r:{for(a=p,l=!0;r.charCodeAt(a+1)===_r;)a+=1,l=!l;if(n=r.charCodeAt(a+1),l&&n!==Vo&&n!==Ht&&n!==Lr&&n!==Fr&&n!==zr&&n!==Pr&&(a+=1,Ho.test(r.charAt(a)))){for(;Ho.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===Ht&&(a+=1)}u=["word",r.slice(p,a+1),p,a],p=a;break}default:{n===Vo&&r.charCodeAt(p+1)===Xp?(a=r.indexOf("*/",p+2)+1,a===0&&(i||k?a=r.length:b("comment")),u=["comment",r.slice(p,a+1),p,a],p=a):(Wr.lastIndex=p+1,Wr.test(r),Wr.lastIndex===0?a=r.length-1:a=Wr.lastIndex-2,u=["word",r.slice(p,a+1),p,a],g.push(u),p=a);break}}return p++,u}function M(E){w.push(E)}return{back:M,endOfFile:C,nextToken:x,position:S}};let em=wn,tm=As,rm=Is,sm=yr,Go=Cn,im=Qp;const jo={empty:!0,space:!0};function nm(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let om=class{constructor(e){this.input=e,this.root=new sm,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 em;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,o=!1,l=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?c.push(r==="("?")":"]"):r==="{"&&c.length>0?c.push("}"):r===c[c.length-1]&&c.pop(),c.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){l=!0;break}else if(r==="}"){if(a.length>0){for(n=a.length-1,i=a[n];i&&i[0]==="space";)i=a[--n];i&&(t.source.end=this.getPosition(i[3]||i[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 r=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[o,l]of e.entries()){if(i=l,n=i[0],n==="("&&(t+=1),n===")"&&(t-=1),t===0&&n===":")if(!r)this.doubleColon(i);else{if(r[0]==="word"&&r[1]==="progid")continue;return o}r=i}return!1}comment(e){let t=new tm;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=im(this.input)}decl(e,t){let r=new rm;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||nm(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.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"){r.important=!0;let u=this.stringFrom(e,c);u=this.spacesFromEnd(e)+u,u!==" !important"&&(r.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("!")&&(r.important=!0,r.raws.important=h,e=u)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(r.raws.between+=o.map(c=>c[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.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 Go;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,r=null,i=!1,n=null,o=[],l=e[1].startsWith("--"),a=[],c=e;for(;c;){if(r=c[0],a.push(c),r==="("||r==="[")n||(n=c),o.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=c),o.push("}");else if(o.length===0)if(r===";")if(i){this.decl(a,l);return}else break;else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop()),t=!0;break}else r===":"&&(i=!0);else r===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&&i){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,r,i){let n,o,l=r.length,a="",c=!0,u,h;for(let d=0;d<l;d+=1)n=r[d],o=n[0],o==="space"&&d===l-1&&!i?c=!1:o==="comment"?(h=r[d-1]?r[d-1][0]:"empty",u=r[d+1]?r[d+1][0]:"empty",!jo[h]&&!jo[u]?a.slice(-1)===","?c=!1:a+=n[1]:c=!1):a+=n[1];if(!c){let d=r.reduce((f,m)=>f+m[1],"");e.raws[t]={raw:d,value:a}}e[t]=a}rule(e){e.pop();let t=new Go;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}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 am=om;let lm=ft,cm=Ns,um=am;function hs(s,e){let t=new cm(s,e),r=new um(t);try{r.parse()}catch(i){throw i}return r.root}var xn=hs;hs.default=hs;lm.registerParse(hs);let ki=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}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 ql=ki;ki.default=ki;let hm=ql,_i=class{get content(){return this.css}constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,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 r=new hm(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}};var En=_i;_i.default=_i;let dm=ft,fm=Sn,pm=Jl,mm=xn,Yo=En,gm=yr,ym=Es,{isClean:$e,my:bm}=gr;const vm={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},wm={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},Sm={Once:!0,postcssPlugin:!0,prepare:!0},Dt=0;function Gt(s){return typeof s=="object"&&typeof s.then=="function"}function Kl(s){let e=!1,t=vm[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,Dt,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,Dt,t+"Exit"]:[t,t+"Exit"]}function Zo(s){let e;return s.type==="document"?e=["Document",Dt,"DocumentExit"]:s.type==="root"?e=["Root",Dt,"RootExit"]:e=Kl(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function Li(s){return s[$e]=!1,s.nodes&&s.nodes.forEach(e=>Li(e)),s}let Pi={},$t=class Ql{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,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=Li(t);else if(t instanceof Ql||t instanceof Yo)i=Li(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=mm;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(o){this.processed=!0,this.error=o}i&&!i[bm]&&dm.rebuild(i)}this.result=new Yo(e,i,r),this.helpers=oe(R({},Pi),{postcss:Pi,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?R(R({},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 r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!wm[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Sm[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}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],r=this.runOnRoot(t);if(Gt(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[$e];){e[$e]=!0;let t=[Zo(e)];for(;t.length>0;){let r=this.visitTick(t);if(Gt(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}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(r=>e.Once(r,this.helpers));return Gt(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=ym;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new pm(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[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(Gt(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[$e];)e[$e]=!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[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Gt(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[o,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(r.toProxy(),this.helpers)}catch(a){throw this.handleError(a,r)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!l[$e]){l[$e]=!0,e.push(Zo(l));return}t.iterator=0,delete r.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===Dt){r.nodes&&r.nodes.length&&(r[$e]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[$e]=!0;let t=Kl(e);for(let r of t)if(r===Dt)e.nodes&&e.each(i=>{i[$e]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};$t.registerPostcss=s=>{Pi=s};var ec=$t;$t.default=$t;gm.registerLazyResult($t);fm.registerLazyResult($t);let Cm=Jl,xm=xn;const Em=En;let Mm=Es;let Fi=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=xm;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=Mm;this.result=new Em(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new Cm(n,i,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 Am=Fi;Fi.default=Fi;let Im=Sn,Nm=ec,Rm=Am,Tm=yr,ur=class{constructor(e=[]){this.version="8.5.6",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Rm(this,e,t):new Nm(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Om=ur;ur.default=ur;Tm.registerProcessor(ur);Im.registerProcessor(ur);let tc=wn,rc=As,Dm=ft,$m=yn,sc=Is,ic=Sn,km=Pp,_m=Ns,Lm=ec,Pm=Hl,Fm=Ms,zm=xn,Mn=Om,Bm=En,nc=yr,oc=Cn,Wm=Es,Um=ql;function q(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Mn(s)}q.plugin=function(e,t){let r=!1;function i(...o){console&&console.warn&&!r&&(r=!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||Js(e.file),i;this.mapOpts.sourcesContent===!1?(i=new ql(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,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(),Up&&Wp&&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=qs.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new qs({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 qs({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,s="<no source>",i={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"&&(i.generated.line=e,i.generated.column=t-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=s,i.original.line=1,i.original.column=0,this.map.addMapping(i))),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?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=s,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}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?Js(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(s=Js(Xl(s,this.mapOpts.annotation)));let i=Zl(s,e);return this.memoizedPaths.set(e,i),i}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 Bp(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 i=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(i,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(Vo){let s=Vo(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;Jl==="\\"&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}};var Kl=Vp;const Xr="'".charCodeAt(0),Ho='"'.charCodeAt(0),_s="\\".charCodeAt(0),Go="/".charCodeAt(0),Ls=`
|
|
66
|
+
`.charCodeAt(0),Ut=" ".charCodeAt(0),Ps="\f".charCodeAt(0),Fs=" ".charCodeAt(0),zs="\r".charCodeAt(0),Hp="[".charCodeAt(0),Gp="]".charCodeAt(0),jp="(".charCodeAt(0),Yp=")".charCodeAt(0),Zp="{".charCodeAt(0),Xp="}".charCodeAt(0),Jp=";".charCodeAt(0),qp="*".charCodeAt(0),Kp=":".charCodeAt(0),Qp="@".charCodeAt(0),Bs=/[\t\n\f\r "#'()/;[\\\]{}]/g,Ws=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,em=/.[\r\n"'(/\\]/,jo=/[\da-f]/i;var tm=function(e,t={}){let s=e.css.valueOf(),i=t.ignoreErrors,n,o,l,a,c,u,h,d,f,m,y=s.length,p=0,g=[],w=[];function S(){return p}function b(E){throw e.error("Unclosed "+E,p)}function C(){return w.length===0&&p>=y}function x(E){if(w.length)return w.pop();if(p>=y)return;let $=E?E.ignoreUnclosed:!1;switch(n=s.charCodeAt(p),n){case Ls:case Ut:case Fs:case zs:case Ps:{a=p;do a+=1,n=s.charCodeAt(a);while(n===Ut||n===Ls||n===Fs||n===zs||n===Ps);u=["space",s.slice(p,a)],p=a-1;break}case Hp:case Gp:case Zp:case Xp:case Kp:case Jp:case Yp:{let k=String.fromCharCode(n);u=[k,k,p];break}case jp:{if(m=g.length?g.pop()[1]:"",f=s.charCodeAt(p+1),m==="url"&&f!==Xr&&f!==Ho&&f!==Ut&&f!==Ls&&f!==Fs&&f!==Ps&&f!==zs){a=p;do{if(h=!1,a=s.indexOf(")",a+1),a===-1)if(i||$){a=p;break}else b("bracket");for(d=a;s.charCodeAt(d-1)===_s;)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||em.test(o)?u=["(","(",p]:(u=["brackets",o,p,a],p=a);break}case Xr:case Ho:{c=n===Xr?"'":'"',a=p;do{if(h=!1,a=s.indexOf(c,a+1),a===-1)if(i||$){a=p+1;break}else b("string");for(d=a;s.charCodeAt(d-1)===_s;)d-=1,h=!h}while(h);u=["string",s.slice(p,a+1),p,a],p=a;break}case Qp:{Bs.lastIndex=p+1,Bs.test(s),Bs.lastIndex===0?a=s.length-1:a=Bs.lastIndex-2,u=["at-word",s.slice(p,a+1),p,a],p=a;break}case _s:{for(a=p,l=!0;s.charCodeAt(a+1)===_s;)a+=1,l=!l;if(n=s.charCodeAt(a+1),l&&n!==Go&&n!==Ut&&n!==Ls&&n!==Fs&&n!==zs&&n!==Ps&&(a+=1,jo.test(s.charAt(a)))){for(;jo.test(s.charAt(a+1));)a+=1;s.charCodeAt(a+1)===Ut&&(a+=1)}u=["word",s.slice(p,a+1),p,a],p=a;break}default:{n===Go&&s.charCodeAt(p+1)===qp?(a=s.indexOf("*/",p+2)+1,a===0&&(i||$?a=s.length:b("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 M(E){w.push(E)}return{back:M,endOfFile:C,nextToken:x,position:S}};let sm=Sn,rm=Ar,im=Ir,nm=ys,Yo=xn,om=tm;const Zo={empty:!0,space:!0};function am(r){for(let e=r.length-1;e>=0;e--){let t=r[e],s=t[3]||t[2];if(s)return s}}let lm=class{constructor(e){this.input=e,this.root=new nm,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 sm;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let s,i,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,i=a[n];i&&i[0]==="space";)i=a[--n];i&&(t.source.end=this.getPosition(i[3]||i[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,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(s+=1,s===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,s,i,n;for(let[o,l]of e.entries()){if(i=l,n=i[0],n==="("&&(t+=1),n===")"&&(t-=1),t===0&&n===":")if(!s)this.doubleColon(i);else{if(s[0]==="word"&&s[1]==="progid")continue;return o}s=i}return!1}comment(e){let t=new rm;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 i=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=om(this.input)}decl(e,t){let s=new im;this.init(s,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(i[3]||i[2]||am(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 Yo;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,i=!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&&i&&s==="{")n||(n=c),o.push("}");else if(o.length===0)if(s===";")if(i){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===":"&&(i=!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&&i){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,i){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&&!i?c=!1:o==="comment"?(h=s[d-1]?s[d-1][0]:"empty",u=s[d+1]?s[d+1][0]:"empty",!Zo[h]&&!Zo[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 Yo;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 i=t;i<e.length;i++)s+=e[i][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 cm=lm;let um=dt,hm=Nr,dm=cm;function hr(r,e){let t=new hm(r,e),s=new dm(t);try{s.parse()}catch(i){throw i}return s.root}var En=hr;hr.default=hr;um.registerParse(hr);let _i=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 Ql=_i;_i.default=_i;let fm=Ql,Li=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 fm(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>e.type==="warning")}};var Mn=Li;Li.default=Li;let pm=dt,mm=Cn,gm=Kl,ym=En,Xo=Mn,bm=ys,vm=Er,{isClean:Le,my:wm}=gs;const Sm={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Cm={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},xm={Once:!0,postcssPlugin:!0,prepare:!0},Ot=0;function Vt(r){return typeof r=="object"&&typeof r.then=="function"}function ec(r){let e=!1,t=Sm[r.type];return r.type==="decl"?e=r.prop.toLowerCase():r.type==="atrule"&&(e=r.name.toLowerCase()),e&&r.append?[t,t+"-"+e,Ot,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:r.append?[t,Ot,t+"Exit"]:[t,t+"Exit"]}function Jo(r){let e;return r.type==="document"?e=["Document",Ot,"DocumentExit"]:r.type==="root"?e=["Root",Ot,"RootExit"]:e=ec(r),{eventIndex:0,events:e,iterator:0,node:r,visitorIndex:0,visitors:[]}}function Pi(r){return r[Le]=!1,r.nodes&&r.nodes.forEach(e=>Pi(e)),r}let Fi={},Dt=class tc{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 i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=Pi(t);else if(t instanceof tc||t instanceof Xo)i=Pi(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=ym;s.syntax&&(n=s.syntax.parse),s.parser&&(n=s.parser),n.parse&&(n=n.parse);try{i=n(t,s)}catch(o){this.processed=!0,this.error=o}i&&!i[wm]&&pm.rebuild(i)}this.result=new Xo(e,i,s),this.helpers=ae(R({},Fi),{postcss:Fi,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?R(R({},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(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,s,i)=>{this.listeners[s]||(this.listeners[s]=[]),this.listeners[s].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let s in t){if(!Cm[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!xm[s])if(typeof t[s]=="object")for(let i in t[s])i==="*"?e(t,s,t[s][i]):e(t,s+"-"+i.toLowerCase(),t[s][i]);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(Vt(s))try{await s}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Le];){e[Le]=!0;let t=[Jo(e)];for(;t.length>0;){let s=this.visitTick(t);if(Vt(s))try{await s}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,s]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>s(n,this.helpers));await Promise.all(i)}else await s(e,this.helpers)}catch(i){throw this.handleError(i)}}}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 Vt(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=vm;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new gm(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[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(Vt(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Le];)e[Le]=!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,i]of e){this.result.lastPlugin=s;let n;try{n=i(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Vt(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:s,visitors:i}=t;if(s.type!=="root"&&s.type!=="document"&&!s.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[o,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.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[Le]){l[Le]=!0,e.push(Jo(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===Ot){s.nodes&&s.nodes.length&&(s[Le]=!0,t.iterator=s.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[Le]=!0;let t=ec(e);for(let s of t)if(s===Ot)e.nodes&&e.each(i=>{i[Le]||this.walkSync(i)});else{let i=this.listeners[s];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};Dt.registerPostcss=r=>{Fi=r};var sc=Dt;Dt.default=Dt;bm.registerLazyResult(Dt);mm.registerLazyResult(Dt);let Em=Kl,Mm=En;const Am=Mn;let Im=Er;let zi=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=Mm;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 i,n=Im;this.result=new Am(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new Em(n,i,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 Nm=zi;zi.default=zi;let Rm=Cn,Tm=sc,Om=Nm,Dm=ys,cs=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 Om(this,e,t):new Tm(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var $m=cs;cs.default=cs;Dm.registerProcessor(cs);Rm.registerProcessor(cs);let rc=Sn,ic=Ar,km=dt,_m=bn,nc=Ir,oc=Cn,Lm=zp,Pm=Nr,Fm=sc,zm=jl,Bm=Mr,Wm=En,An=$m,Um=Mn,ac=ys,lc=xn,Vm=Er,Hm=Ql;function q(...r){return r.length===1&&Array.isArray(r[0])&&(r=r[0]),new An(r)}q.plugin=function(e,t){let s=!1;function i(...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 Mn().version,l}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(o,l,a){return q([i(a)]).process(o,l)},i};q.stringify=Wm;q.parse=zm;q.fromJSON=km;q.list=Pm;q.comment=s=>new rc(s);q.atRule=s=>new tc(s);q.decl=s=>new sc(s);q.rule=s=>new oc(s);q.root=s=>new nc(s);q.document=s=>new ic(s);q.CssSyntaxError=$m;q.Declaration=sc;q.Container=Dm;q.Processor=Mn;q.Document=ic;q.Comment=rc;q.Warning=Um;q.AtRule=tc;q.Result=Bm;q.Input=_m;q.Rule=oc;q.Root=nc;q.Node=Fm;Lm.registerPostcss(q);var Vm=q;q.default=q;const ne=rp(Vm);ne.stringify;ne.fromJSON;ne.plugin;ne.parse;ne.list;ne.document;ne.comment;ne.atRule;ne.rule;ne.decl;ne.root;ne.CssSyntaxError;ne.Declaration;ne.Container;ne.Processor;ne.Document;ne.Comment;ne.Warning;ne.AtRule;ne.Result;ne.Input;ne.Rule;ne.Root;ne.Node;var j=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(j||{});function Hm(s){const e={},t=/;(?![^(]*\))/g,r=/:(.+)/,i=/\/\*.*?\*\//g;return s.replace(i,"").split(t).forEach(function(n){if(n){const o=n.split(r);o.length>1&&(e[zi(o[0].trim())]=o[1].trim())}}),e}function Xo(s){const e=[];for(const t in s){const r=s[t];if(typeof r!="string")continue;const i=Zm(t);e.push(`${i}: ${r};`)}return e.join(" ")}const Gm=/-([a-z])/g,jm=/^--[a-zA-Z0-9-]+$/,zi=s=>jm.test(s)?s:s.replace(Gm,(e,t)=>t?t.toUpperCase():""),Ym=/\B([A-Z])/g,Zm=s=>s.replace(Ym,"-$1").toLowerCase();class Re{constructor(...e){I(this,"parentElement",null),I(this,"parentNode",null),I(this,"ownerDocument"),I(this,"firstChild",null),I(this,"lastChild",null),I(this,"previousSibling",null),I(this,"nextSibling",null),I(this,"ELEMENT_NODE",1),I(this,"TEXT_NODE",3),I(this,"nodeType"),I(this,"nodeName"),I(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 Re){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 An extends Re{constructor(...e){super(e),I(this,"nodeType",9),I(this,"nodeName","#document"),I(this,"compatMode","CSS1Compat"),I(this,"RRNodeType",j.Document),I(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===j.Element&&e.tagName==="HTML")||null}get body(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===j.Element&&t.tagName==="BODY"))||null}get head(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===j.Element&&t.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){const t=e.RRNodeType;if((t===j.Element||t===j.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===t))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===j.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const r=In(this,e);return r.parentElement=null,r}insertBefore(e,t){const r=e.RRNodeType;if((r===j.Element||r===j.DocumentType)&&this.childNodes.some(n=>n.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${r===j.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const i=hc(this,e,t);return i.parentElement=null,i}removeChild(e){return dc(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 r=this.createDocumentType("html",t,"");this.open(),this.appendChild(r)}}createDocument(e,t,r){return new An}createDocumentType(e,t,r){const i=new ac(e,t,r);return i.ownerDocument=this,i}createElement(e){const t=new Rs(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){const t=new lc(e);return t.ownerDocument=this,t}createComment(e){const t=new cc(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new uc(e);return t.ownerDocument=this,t}toString(){return"RRDocument"}}class ac extends Re{constructor(e,t,r){super(),I(this,"nodeType",10),I(this,"RRNodeType",j.DocumentType),I(this,"name"),I(this,"publicId"),I(this,"systemId"),I(this,"textContent",null),this.name=e,this.publicId=t,this.systemId=r,this.nodeName=e}toString(){return"RRDocumentType"}}class Rs extends Re{constructor(e){super(),I(this,"nodeType",1),I(this,"RRNodeType",j.Element),I(this,"tagName"),I(this,"attributes",{}),I(this,"shadowRoot",null),I(this,"scrollLeft"),I(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 qm(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?Hm(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(r,i,n)=>{if(t.test(r))return;const o=zi(r);i?e[o]=i:delete e[o],n==="important"&&(e[o]+=" !important"),this.attributes.style=Xo(e)},e.removeProperty=r=>{if(t.test(r))return"";const i=zi(r),n=e[i]||"";return delete e[i],this.attributes.style=Xo(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,r){this.setAttribute(t,r)}removeAttribute(e){delete this.attributes[e]}appendChild(e){return In(this,e)}insertBefore(e,t){return hc(this,e,t)}removeChild(e){return dc(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 Xm extends Rs{constructor(){super(...arguments),I(this,"currentTime"),I(this,"volume"),I(this,"paused"),I(this,"muted"),I(this,"playbackRate"),I(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 Jm extends Rs{constructor(){super(...arguments),I(this,"tagName","DIALOG"),I(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 lc extends Re{constructor(e){super(),I(this,"nodeType",3),I(this,"nodeName","#text"),I(this,"RRNodeType",j.Text),I(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 cc extends Re{constructor(e){super(),I(this,"nodeType",8),I(this,"nodeName","#comment"),I(this,"RRNodeType",j.Comment),I(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 uc extends Re{constructor(e){super(),I(this,"nodeName","#cdata-section"),I(this,"nodeType",4),I(this,"RRNodeType",j.CDATA),I(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 qm{constructor(e,t){if(I(this,"onChange"),I(this,"classes",[]),I(this,"add",(...r)=>{for(const i of r){const n=String(i);this.classes.indexOf(n)>=0||this.classes.push(n)}this.onChange&&this.onChange(this.classes.join(" "))}),I(this,"remove",(...r)=>{this.classes=this.classes.filter(i=>r.indexOf(i)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),e){const r=e.trim().split(/\s+/);this.classes.push(...r)}this.onChange=t}}function In(s,e){return e.parentNode&&e.parentNode.removeChild(e),s.lastChild?(s.lastChild.nextSibling=e,e.previousSibling=s.lastChild):(s.firstChild=e,e.previousSibling=null),s.lastChild=e,e.nextSibling=null,e.parentNode=s,e.parentElement=s,e.ownerDocument=s.ownerDocument,e}function hc(s,e,t){if(!t)return In(s,e);if(t.parentNode!==s)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:s.firstChild=e,e.parentElement=s,e.parentNode=s,e.ownerDocument=s.ownerDocument),e}function dc(s,e){if(e.parentNode!==s)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:s.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:s.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}var Ee=(s=>(s[s.PLACEHOLDER=0]="PLACEHOLDER",s[s.ELEMENT_NODE=1]="ELEMENT_NODE",s[s.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",s[s.TEXT_NODE=3]="TEXT_NODE",s[s.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",s[s.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",s[s.ENTITY_NODE=6]="ENTITY_NODE",s[s.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",s[s.COMMENT_NODE=8]="COMMENT_NODE",s[s.DOCUMENT_NODE=9]="DOCUMENT_NODE",s[s.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",s[s.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",s))(Ee||{});const Bi={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},Km={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 Le=null;function ds(s,e,t,r=e.mirror||e.ownerDocument.mirror){s=Qm(s,e,t,r),fc(s,e,t,r),eg(s,e,t)}function Qm(s,e,t,r){var i;if(t.afterAppend&&!Le&&(Le=new WeakSet,setTimeout(()=>{Le=null},0)),!Nn(s,e)){const n=fs(e,t.mirror,r);(i=s.parentNode)==null||i.replaceChild(n,s),s=n}switch(e.RRNodeType){case j.Document:{if(!bt(s,e,t.mirror,r)){const n=r.getMeta(e);n&&(t.mirror.removeNodeFromMap(s),s.close(),s.open(),t.mirror.add(s,n),Le==null||Le.add(s))}break}case j.Element:{const n=s,o=e;switch(o.tagName){case"IFRAME":{const l=s.contentDocument;if(!l)break;ds(l,e.contentDocument,t,r);break}}o.shadowRoot&&(n.shadowRoot||n.attachShadow({mode:"open"}),fc(n.shadowRoot,o.shadowRoot,t,r)),tg(n,o,r);break}}return s}function eg(s,e,t){var r;switch(e.RRNodeType){case j.Document:{const i=e.scrollData;i&&t.applyScroll(i,!0);break}case j.Element:{const i=s,n=e;switch(n.scrollData&&t.applyScroll(n.scrollData,!0),n.inputData&&t.applyInput(n.inputData),n.tagName){case"AUDIO":case"VIDEO":{const o=s,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=i.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,s));break}case"STYLE":{const o=i.sheet;o&&e.rules.forEach(l=>t.applyStyleSheetMutation(l,o));break}case"DIALOG":{const o=i,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 j.Text:case j.Comment:case j.CDATA:{s.textContent!==e.data&&(s.textContent=e.data);break}}Le!=null&&Le.has(s)&&(Le.delete(s),(r=t.afterAppend)==null||r.call(t,s,t.mirror.getId(s)))}function tg(s,e,t){const r=s.attributes,i=e.attributes;for(const n in i){const o=i[n],l=t.getMeta(e);if(l!=null&&l.isSVG&&Bi[n])s.setAttributeNS(Bi[n],n,o);else if(e.tagName==="CANVAS"&&n==="rr_dataURL"){const a=document.createElement("img");a.src=o,a.onload=()=>{const c=s.getContext("2d");c&&c.drawImage(a,0,0,a.width,a.height)}}else{if(e.tagName==="IFRAME"&&n==="srcdoc")continue;try{s.setAttribute(n,o)}catch(a){console.warn(a)}}}for(const{name:n}of Array.from(r))n in i||s.removeAttribute(n);e.scrollLeft&&(s.scrollLeft=e.scrollLeft),e.scrollTop&&(s.scrollTop=e.scrollTop)}function fc(s,e,t,r){const i=Array.from(s.childNodes),n=e.childNodes;if(i.length===0&&n.length===0)return;let o=0,l=i.length-1,a=0,c=n.length-1,u=i[o],h=i[l],d=n[a],f=n[c],m,y;for(;o<=l&&a<=c;)if(u===void 0)u=i[++o];else if(h===void 0)h=i[--l];else if(bt(u,d,t.mirror,r))u=i[++o],d=n[++a];else if(bt(h,f,t.mirror,r))h=i[--l],f=n[--c];else if(bt(u,f,t.mirror,r)){try{s.insertBefore(u,h.nextSibling)}catch(w){console.warn(w)}u=i[++o],f=n[--c]}else if(bt(h,d,t.mirror,r)){try{s.insertBefore(h,u)}catch(w){console.warn(w)}h=i[--l],d=n[++a]}else{if(!m){m={};for(let S=o;S<=l;S++){const b=i[S];b&&t.mirror.hasNode(b)&&(m[t.mirror.getId(b)]=S)}}y=m[r.getId(d)];const w=i[y];if(y!==void 0&&w&&bt(w,d,t.mirror,r)){try{s.insertBefore(w,u)}catch(S){console.warn(S)}i[y]=void 0}else{const S=fs(d,t.mirror,r);s.nodeName==="#document"&&u&&(S.nodeType===S.DOCUMENT_TYPE_NODE&&u.nodeType===u.DOCUMENT_TYPE_NODE||S.nodeType===S.ELEMENT_NODE&&u.nodeType===u.ELEMENT_NODE)&&(s.removeChild(u),t.mirror.removeNodeFromMap(u),u=i[++o]);try{s.insertBefore(S,u||null)}catch(b){console.warn(b)}}d=n[++a]}if(o>l){const w=n[c+1];let S=null;for(w&&(S=t.mirror.getNode(r.getId(w)));a<=c;++a){const b=fs(n[a],t.mirror,r);try{s.insertBefore(b,S)}catch(C){console.warn(C)}}}else if(a>c)for(;o<=l;o++){const w=i[o];if(!(!w||w.parentNode!==s))try{s.removeChild(w),t.mirror.removeNodeFromMap(w)}catch(S){console.warn(S)}}let p=s.firstChild,g=e.firstChild;for(;p!==null&&g!==null;)ds(p,g,t,r),p=p.nextSibling,g=g.nextSibling}function fs(s,e,t){const r=t.getId(s),i=t.getMeta(s);let n=null;if(r>-1&&(n=e.getNode(r)),n!==null&&Nn(n,s))return n;switch(s.RRNodeType){case j.Document:n=new Document;break;case j.DocumentType:n=document.implementation.createDocumentType(s.name,s.publicId,s.systemId);break;case j.Element:{let o=s.tagName.toLowerCase();o=Km[o]||o,i&&"isSVG"in i&&(i!=null&&i.isSVG)?n=document.createElementNS(Bi.svg,o):n=document.createElement(s.tagName);break}case j.Text:n=document.createTextNode(s.data);break;case j.Comment:n=document.createComment(s.data);break;case j.CDATA:n=document.createCDATASection(s.data);break}i&&e.add(n,R({},i));try{Le==null||Le.add(n)}catch(o){}return n}function Nn(s,e){return s.nodeType!==e.nodeType?!1:s.nodeType!==s.ELEMENT_NODE||s.tagName.toUpperCase()===e.tagName}function bt(s,e,t,r){const i=t.getId(s),n=r.getId(e);return i===-1||i!==n?!1:Nn(s,e)}class Lt extends An{constructor(e){super(),I(this,"UNSERIALIZED_STARTING_ID",-2),I(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),I(this,"mirror",fg()),I(this,"scrollData",null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(e,t,r){return new Lt}createDocumentType(e,t,r){const i=new rg(e,t,r);return i.ownerDocument=this,i}createElement(e){const t=e.toUpperCase();let r;switch(t){case"AUDIO":case"VIDEO":r=new sg(t);break;case"IFRAME":r=new ag(t,this.mirror);break;case"CANVAS":r=new ng(t);break;case"STYLE":r=new og(t);break;case"DIALOG":r=new ig(t);break;default:r=new Ts(t);break}return r.ownerDocument=this,r}createComment(e){const t=new cg(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new ug(e);return t.ownerDocument=this,t}createTextNode(e){const t=new lg(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 rg=ac;class Ts extends Rs{constructor(){super(...arguments),I(this,"inputData",null),I(this,"scrollData",null)}}class sg extends Xm{}class ig extends Jm{}class ng extends Ts{constructor(){super(...arguments),I(this,"rr_dataURL",null),I(this,"canvasMutations",[])}getContext(){return null}}class og extends Ts{constructor(){super(...arguments),I(this,"rules",[])}}class ag extends Ts{constructor(e,t){super(e),I(this,"contentDocument",new Lt),this.contentDocument.mirror=t}}const lg=lc,cg=cc,ug=uc;function hg(s){return s instanceof HTMLFormElement?"FORM":s.tagName.toUpperCase()}function pc(s,e,t,r){let i;switch(s.nodeType){case Ee.DOCUMENT_NODE:r&&r.nodeName==="IFRAME"?i=r.contentDocument:(i=e,i.compatMode=s.compatMode);break;case Ee.DOCUMENT_TYPE_NODE:{const o=s;i=e.createDocumentType(o.name,o.publicId,o.systemId);break}case Ee.ELEMENT_NODE:{const o=s,l=hg(o);i=e.createElement(l);const a=i;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 Ee.TEXT_NODE:i=e.createTextNode(s.textContent||"");break;case Ee.CDATA_SECTION_NODE:i=e.createCDATASection(s.data);break;case Ee.COMMENT_NODE:i=e.createComment(s.textContent||"");break;case Ee.DOCUMENT_FRAGMENT_NODE:i=r.attachShadow({mode:"open"});break;default:return null}let n=t.getMeta(s);return e instanceof Lt&&(n||(n=mc(i,e.unserializedId),t.add(s,n)),e.mirror.add(i,R({},n))),i}function dg(s,e=qf(),t=new Lt){function r(i,n){const o=pc(i,t,e,n);if(o!==null)if((n==null?void 0:n.nodeName)!=="IFRAME"&&i.nodeType!==Ee.DOCUMENT_FRAGMENT_NODE&&(n==null||n.appendChild(o),o.parentNode=n,o.parentElement=n),i.nodeName==="IFRAME"){const l=i.contentDocument;l&&r(l,o)}else(i.nodeType===Ee.DOCUMENT_NODE||i.nodeType===Ee.ELEMENT_NODE||i.nodeType===Ee.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===Ee.ELEMENT_NODE&&i.shadowRoot&&r(i.shadowRoot,o),i.childNodes.forEach(l=>r(l,o)))}return r(s,null),t}function fg(){return new pg}class pg{constructor(){I(this,"idNodeMap",new Map),I(this,"nodeMetaMap",new WeakMap),I(this,"selectorNodeMap",new Map)}getId(e){var t;if(!e)return-1;const r=(t=this.getMeta(e))==null?void 0:t.id;return r!=null?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t);const r=this.getMeta(e);if(r!=null&&r.selector){const i=this.selectorNodeMap.get(r.selector);i&&(i.delete(e),i.size===0&&this.selectorNodeMap.delete(r.selector))}e.childNodes&&e.childNodes.forEach(i=>this.removeNodeFromMap(i))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;if(this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t),t.selector){let i=this.selectorNodeMap.get(t.selector);i||(i=new Set,this.selectorNodeMap.set(t.selector,i)),i.add(e)}}replace(e,t){const r=this.getNode(e);if(r){const i=this.nodeMetaMap.get(r);if(i&&(this.nodeMetaMap.set(t,i),i.selector)){const n=this.selectorNodeMap.get(i.selector);n&&(n.delete(r),n.add(t))}}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap,this.selectorNodeMap=new Map}getNodeBySelector(e){const t=this.selectorNodeMap.get(e);return!t||t.size===0?null:t.values().next().value||null}getNodesBySelector(e){const t=this.selectorNodeMap.get(e);return t?Array.from(t):[]}hasSelector(e){const t=this.selectorNodeMap.get(e);return t!==void 0&&t.size>0}}function mc(s,e){switch(s.RRNodeType){case j.Document:return{id:e,type:s.RRNodeType,childNodes:[]};case j.DocumentType:{const t=s;return{id:e,type:s.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId}}case j.Element:return{id:e,type:s.RRNodeType,tagName:s.tagName.toLowerCase(),attributes:{},childNodes:[]};case j.Text:return{id:e,type:s.RRNodeType,textContent:s.textContent||""};case j.Comment:return{id:e,type:s.RRNodeType,textContent:s.textContent||""};case j.CDATA:return{id:e,type:s.RRNodeType,textContent:""}}}const Jo={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},qo={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ur={},mg=()=>!!globalThis.Zone;function Rn(s){if(Ur[s])return Ur[s];const e=globalThis[s],t=e.prototype,r=s in Jo?Jo[s]:void 0,i=!!(r&&r.every(l=>{var a,c;return!!((c=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&c.toString().includes("[native code]"))})),n=s in qo?qo[s]:void 0,o=!!(n&&n.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(i&&o&&!mg())return Ur[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const a=l.contentWindow;if(!a)return e.prototype;const c=a[s].prototype;return document.body.removeChild(l),c?Ur[s]=c:t}catch(l){return t}}const Xs={};function at(s,e,t){var r;const i=`${s}.${String(t)}`;if(Xs[i])return Xs[i].call(e);const n=Rn(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(Xs[i]=o,o.call(e)):e[t]}const Js={};function gc(s,e,t){const r=`${s}.${String(t)}`;if(Js[r])return Js[r].bind(e);const n=Rn(s)[t];return typeof n!="function"?e[t]:(Js[r]=n,n.bind(e))}function gg(s){return at("Node",s,"childNodes")}function yg(s){return at("Node",s,"parentNode")}function bg(s){return at("Node",s,"parentElement")}function vg(s){return at("Node",s,"textContent")}function wg(s,e){return gc("Node",s,"contains")(e)}function Sg(s){return gc("Node",s,"getRootNode")()}function Cg(s){return!s||!("host"in s)?null:at("ShadowRoot",s,"host")}function xg(s){return s.styleSheets}function Eg(s){return!s||!("shadowRoot"in s)?null:at("Element",s,"shadowRoot")}function Mg(s,e){return at("Element",s,"querySelector")(e)}function Ag(s,e){return at("Element",s,"querySelectorAll")(e)}function yc(){return Rn("MutationObserver").constructor}function je(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch(r){return()=>{}}}function Ig(s){const e=s.tagName.toLowerCase(),t=s.id?`#${s.id}`:"",r=s.classList.length?"."+Array.from(s.classList).join("."):"";return`${e}${t}${r}`}function Ng(s){var d;var e,t;const r=(d=(e=s.ownerDocument)==null?void 0:e.defaultView)!=null?d:window,i=s.getBoundingClientRect(),n=r.innerWidth||r.document.documentElement.clientWidth||0,o=r.innerHeight||r.document.documentElement.clientHeight||0,l=i.width>0&&i.height>0&&i.bottom>0&&i.right>0&&i.top<o&&i.left<n,a=(t=r.getComputedStyle)==null?void 0:t.call(r,s),u=!!a&&a.display!=="none"&&a.visibility!=="hidden"&&(parseFloat(a.opacity)||0)>0&&l;let h=0;if(u){const f=Math.max(0,Math.min(i.right,n)-Math.max(i.left,0)),m=Math.max(0,Math.min(i.bottom,o)-Math.max(i.top,0)),y=f*m,p=i.width*i.height;h=p>0?y/p:0}return{isVisible:u,ratio:h}}const V={childNodes:gg,parentNode:yg,parentElement:bg,textContent:vg,contains:wg,getRootNode:Sg,host:Cg,styleSheets:xg,shadowRoot:Eg,querySelector:Mg,querySelectorAll:Ag,mutationObserver:yc,patch:je,describeNode:Ig,getElementVisibility:Ng};function ue(s,e,t=document){const r={capture:!0,passive:!0};return t.addEventListener(s,e,r),()=>t.removeEventListener(s,e,r)}const vt=`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(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(o,l,a){return q([i(a)]).process(o,l)},i};q.stringify=Vm;q.parse=Wm;q.fromJSON=Lm;q.list=zm;q.comment=r=>new ic(r);q.atRule=r=>new rc(r);q.decl=r=>new nc(r);q.rule=r=>new lc(r);q.root=r=>new ac(r);q.document=r=>new oc(r);q.CssSyntaxError=_m;q.Declaration=nc;q.Container=km;q.Processor=An;q.Document=oc;q.Comment=ic;q.Warning=Hm;q.AtRule=rc;q.Result=Um;q.Input=Pm;q.Rule=lc;q.Root=ac;q.Node=Bm;Fm.registerPostcss(q);var Gm=q;q.default=q;const oe=ip(Gm);oe.stringify;oe.fromJSON;oe.plugin;oe.parse;oe.list;oe.document;oe.comment;oe.atRule;oe.rule;oe.decl;oe.root;oe.CssSyntaxError;oe.Declaration;oe.Container;oe.Processor;oe.Document;oe.Comment;oe.Warning;oe.AtRule;oe.Result;oe.Input;oe.Rule;oe.Root;oe.Node;var j=(r=>(r[r.Document=0]="Document",r[r.DocumentType=1]="DocumentType",r[r.Element=2]="Element",r[r.Text=3]="Text",r[r.CDATA=4]="CDATA",r[r.Comment=5]="Comment",r))(j||{});function jm(r){const e={},t=/;(?![^(]*\))/g,s=/:(.+)/,i=/\/\*.*?\*\//g;return r.replace(i,"").split(t).forEach(function(n){if(n){const o=n.split(s);o.length>1&&(e[Bi(o[0].trim())]=o[1].trim())}}),e}function qo(r){const e=[];for(const t in r){const s=r[t];if(typeof s!="string")continue;const i=Jm(t);e.push(`${i}: ${s};`)}return e.join(" ")}const Ym=/-([a-z])/g,Zm=/^--[a-zA-Z0-9-]+$/,Bi=r=>Zm.test(r)?r:r.replace(Ym,(e,t)=>t?t.toUpperCase():""),Xm=/\B([A-Z])/g,Jm=r=>r.replace(Xm,"-$1").toLowerCase();class De{constructor(...e){I(this,"parentElement",null),I(this,"parentNode",null),I(this,"ownerDocument"),I(this,"firstChild",null),I(this,"lastChild",null),I(this,"previousSibling",null),I(this,"nextSibling",null),I(this,"ELEMENT_NODE",1),I(this,"TEXT_NODE",3),I(this,"nodeType"),I(this,"nodeName"),I(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 De){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 In extends De{constructor(...e){super(e),I(this,"nodeType",9),I(this,"nodeName","#document"),I(this,"compatMode","CSS1Compat"),I(this,"RRNodeType",j.Document),I(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===j.Element&&e.tagName==="HTML")||null}get body(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===j.Element&&t.tagName==="BODY"))||null}get head(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===j.Element&&t.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){const t=e.RRNodeType;if((t===j.Element||t===j.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===t))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===j.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const s=Nn(this,e);return s.parentElement=null,s}insertBefore(e,t){const s=e.RRNodeType;if((s===j.Element||s===j.DocumentType)&&this.childNodes.some(n=>n.RRNodeType===s))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${s===j.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const i=fc(this,e,t);return i.parentElement=null,i}removeChild(e){return pc(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 In}createDocumentType(e,t,s){const i=new cc(e,t,s);return i.ownerDocument=this,i}createElement(e){const t=new Rr(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){const t=new uc(e);return t.ownerDocument=this,t}createComment(e){const t=new hc(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new dc(e);return t.ownerDocument=this,t}toString(){return"RRDocument"}}class cc extends De{constructor(e,t,s){super(),I(this,"nodeType",10),I(this,"RRNodeType",j.DocumentType),I(this,"name"),I(this,"publicId"),I(this,"systemId"),I(this,"textContent",null),this.name=e,this.publicId=t,this.systemId=s,this.nodeName=e}toString(){return"RRDocumentType"}}class Rr extends De{constructor(e){super(),I(this,"nodeType",1),I(this,"RRNodeType",j.Element),I(this,"tagName"),I(this,"attributes",{}),I(this,"shadowRoot",null),I(this,"scrollLeft"),I(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 Qm(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?jm(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(s,i,n)=>{if(t.test(s))return;const o=Bi(s);i?e[o]=i:delete e[o],n==="important"&&(e[o]+=" !important"),this.attributes.style=qo(e)},e.removeProperty=s=>{if(t.test(s))return"";const i=Bi(s),n=e[i]||"";return delete e[i],this.attributes.style=qo(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 Nn(this,e)}insertBefore(e,t){return fc(this,e,t)}removeChild(e){return pc(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 qm extends Rr{constructor(){super(...arguments),I(this,"currentTime"),I(this,"volume"),I(this,"paused"),I(this,"muted"),I(this,"playbackRate"),I(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 Km extends Rr{constructor(){super(...arguments),I(this,"tagName","DIALOG"),I(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 uc extends De{constructor(e){super(),I(this,"nodeType",3),I(this,"nodeName","#text"),I(this,"RRNodeType",j.Text),I(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 hc extends De{constructor(e){super(),I(this,"nodeType",8),I(this,"nodeName","#comment"),I(this,"RRNodeType",j.Comment),I(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 dc extends De{constructor(e){super(),I(this,"nodeName","#cdata-section"),I(this,"nodeType",4),I(this,"RRNodeType",j.CDATA),I(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 Qm{constructor(e,t){if(I(this,"onChange"),I(this,"classes",[]),I(this,"add",(...s)=>{for(const i of s){const n=String(i);this.classes.indexOf(n)>=0||this.classes.push(n)}this.onChange&&this.onChange(this.classes.join(" "))}),I(this,"remove",(...s)=>{this.classes=this.classes.filter(i=>s.indexOf(i)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),e){const s=e.trim().split(/\s+/);this.classes.push(...s)}this.onChange=t}}function Nn(r,e){return e.parentNode&&e.parentNode.removeChild(e),r.lastChild?(r.lastChild.nextSibling=e,e.previousSibling=r.lastChild):(r.firstChild=e,e.previousSibling=null),r.lastChild=e,e.nextSibling=null,e.parentNode=r,e.parentElement=r,e.ownerDocument=r.ownerDocument,e}function fc(r,e,t){if(!t)return Nn(r,e);if(t.parentNode!==r)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:r.firstChild=e,e.parentElement=r,e.parentNode=r,e.ownerDocument=r.ownerDocument),e}function pc(r,e){if(e.parentNode!==r)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:r.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:r.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}var xe=(r=>(r[r.PLACEHOLDER=0]="PLACEHOLDER",r[r.ELEMENT_NODE=1]="ELEMENT_NODE",r[r.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",r[r.TEXT_NODE=3]="TEXT_NODE",r[r.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",r[r.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",r[r.ENTITY_NODE=6]="ENTITY_NODE",r[r.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",r[r.COMMENT_NODE=8]="COMMENT_NODE",r[r.DOCUMENT_NODE=9]="DOCUMENT_NODE",r[r.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",r[r.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",r))(xe||{});const Wi={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},eg={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 Fe=null;function dr(r,e,t,s=e.mirror||e.ownerDocument.mirror){r=tg(r,e,t,s),mc(r,e,t,s),sg(r,e,t)}function tg(r,e,t,s){var i;if(t.afterAppend&&!Fe&&(Fe=new WeakSet,setTimeout(()=>{Fe=null},0)),!Rn(r,e)){const n=fr(e,t.mirror,s);(i=r.parentNode)==null||i.replaceChild(n,r),r=n}switch(e.RRNodeType){case j.Document:{if(!bt(r,e,t.mirror,s)){const n=s.getMeta(e);n&&(t.mirror.removeNodeFromMap(r),r.close(),r.open(),t.mirror.add(r,n),Fe==null||Fe.add(r))}break}case j.Element:{const n=r,o=e;switch(o.tagName){case"IFRAME":{const l=r.contentDocument;if(!l)break;dr(l,e.contentDocument,t,s);break}}o.shadowRoot&&(n.shadowRoot||n.attachShadow({mode:"open"}),mc(n.shadowRoot,o.shadowRoot,t,s)),rg(n,o,s);break}}return r}function sg(r,e,t){var s;switch(e.RRNodeType){case j.Document:{const i=e.scrollData;i&&t.applyScroll(i,!0);break}case j.Element:{const i=r,n=e;switch(n.scrollData&&t.applyScroll(n.scrollData,!0),n.inputData&&t.applyInput(n.inputData),n.tagName){case"AUDIO":case"VIDEO":{const o=r,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=i.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,r));break}case"STYLE":{const o=i.sheet;o&&e.rules.forEach(l=>t.applyStyleSheetMutation(l,o));break}case"DIALOG":{const o=i,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 j.Text:case j.Comment:case j.CDATA:{r.textContent!==e.data&&(r.textContent=e.data);break}}Fe!=null&&Fe.has(r)&&(Fe.delete(r),(s=t.afterAppend)==null||s.call(t,r,t.mirror.getId(r)))}function rg(r,e,t){const s=r.attributes,i=e.attributes;for(const n in i){const o=i[n],l=t.getMeta(e);if(l!=null&&l.isSVG&&Wi[n])r.setAttributeNS(Wi[n],n,o);else if(e.tagName==="CANVAS"&&n==="rr_dataURL"){const a=document.createElement("img");a.src=o,a.onload=()=>{const c=r.getContext("2d");c&&c.drawImage(a,0,0,a.width,a.height)}}else{if(e.tagName==="IFRAME"&&n==="srcdoc")continue;try{r.setAttribute(n,o)}catch(a){console.warn(a)}}}for(const{name:n}of Array.from(s))n in i||r.removeAttribute(n);e.scrollLeft&&(r.scrollLeft=e.scrollLeft),e.scrollTop&&(r.scrollTop=e.scrollTop)}function mc(r,e,t,s){const i=Array.from(r.childNodes),n=e.childNodes;if(i.length===0&&n.length===0)return;let o=0,l=i.length-1,a=0,c=n.length-1,u=i[o],h=i[l],d=n[a],f=n[c],m,y;for(;o<=l&&a<=c;)if(u===void 0)u=i[++o];else if(h===void 0)h=i[--l];else if(bt(u,d,t.mirror,s))u=i[++o],d=n[++a];else if(bt(h,f,t.mirror,s))h=i[--l],f=n[--c];else if(bt(u,f,t.mirror,s)){try{r.insertBefore(u,h.nextSibling)}catch(w){console.warn(w)}u=i[++o],f=n[--c]}else if(bt(h,d,t.mirror,s)){try{r.insertBefore(h,u)}catch(w){console.warn(w)}h=i[--l],d=n[++a]}else{if(!m){m={};for(let S=o;S<=l;S++){const b=i[S];b&&t.mirror.hasNode(b)&&(m[t.mirror.getId(b)]=S)}}y=m[s.getId(d)];const w=i[y];if(y!==void 0&&w&&bt(w,d,t.mirror,s)){try{r.insertBefore(w,u)}catch(S){console.warn(S)}i[y]=void 0}else{const S=fr(d,t.mirror,s);r.nodeName==="#document"&&u&&(S.nodeType===S.DOCUMENT_TYPE_NODE&&u.nodeType===u.DOCUMENT_TYPE_NODE||S.nodeType===S.ELEMENT_NODE&&u.nodeType===u.ELEMENT_NODE)&&(r.removeChild(u),t.mirror.removeNodeFromMap(u),u=i[++o]);try{r.insertBefore(S,u||null)}catch(b){console.warn(b)}}d=n[++a]}if(o>l){const w=n[c+1];let S=null;for(w&&(S=t.mirror.getNode(s.getId(w)));a<=c;++a){const b=fr(n[a],t.mirror,s);try{r.insertBefore(b,S)}catch(C){console.warn(C)}}}else if(a>c)for(;o<=l;o++){const w=i[o];if(!(!w||w.parentNode!==r))try{r.removeChild(w),t.mirror.removeNodeFromMap(w)}catch(S){console.warn(S)}}let p=r.firstChild,g=e.firstChild;for(;p!==null&&g!==null;)dr(p,g,t,s),p=p.nextSibling,g=g.nextSibling}function fr(r,e,t){const s=t.getId(r),i=t.getMeta(r);let n=null;if(s>-1&&(n=e.getNode(s)),n!==null&&Rn(n,r))return n;switch(r.RRNodeType){case j.Document:n=new Document;break;case j.DocumentType:n=document.implementation.createDocumentType(r.name,r.publicId,r.systemId);break;case j.Element:{let o=r.tagName.toLowerCase();o=eg[o]||o,i&&"isSVG"in i&&(i!=null&&i.isSVG)?n=document.createElementNS(Wi.svg,o):n=document.createElement(r.tagName);break}case j.Text:n=document.createTextNode(r.data);break;case j.Comment:n=document.createComment(r.data);break;case j.CDATA:n=document.createCDATASection(r.data);break}i&&e.add(n,R({},i));try{Fe==null||Fe.add(n)}catch(o){}return n}function Rn(r,e){return r.nodeType!==e.nodeType?!1:r.nodeType!==r.ELEMENT_NODE||r.tagName.toUpperCase()===e.tagName}function bt(r,e,t,s){const i=t.getId(r),n=s.getId(e);return i===-1||i!==n?!1:Rn(r,e)}class _t extends In{constructor(e){super(),I(this,"UNSERIALIZED_STARTING_ID",-2),I(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),I(this,"mirror",mg()),I(this,"scrollData",null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(e,t,s){return new _t}createDocumentType(e,t,s){const i=new ig(e,t,s);return i.ownerDocument=this,i}createElement(e){const t=e.toUpperCase();let s;switch(t){case"AUDIO":case"VIDEO":s=new ng(t);break;case"IFRAME":s=new cg(t,this.mirror);break;case"CANVAS":s=new ag(t);break;case"STYLE":s=new lg(t);break;case"DIALOG":s=new og(t);break;default:s=new Tr(t);break}return s.ownerDocument=this,s}createComment(e){const t=new hg(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new dg(e);return t.ownerDocument=this,t}createTextNode(e){const t=new ug(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 ig=cc;class Tr extends Rr{constructor(){super(...arguments),I(this,"inputData",null),I(this,"scrollData",null)}}class ng extends qm{}class og extends Km{}class ag extends Tr{constructor(){super(...arguments),I(this,"rr_dataURL",null),I(this,"canvasMutations",[])}getContext(){return null}}class lg extends Tr{constructor(){super(...arguments),I(this,"rules",[])}}class cg extends Tr{constructor(e,t){super(e),I(this,"contentDocument",new _t),this.contentDocument.mirror=t}}const ug=uc,hg=hc,dg=dc;function fg(r){return r instanceof HTMLFormElement?"FORM":r.tagName.toUpperCase()}function gc(r,e,t,s){let i;switch(r.nodeType){case xe.DOCUMENT_NODE:s&&s.nodeName==="IFRAME"?i=s.contentDocument:(i=e,i.compatMode=r.compatMode);break;case xe.DOCUMENT_TYPE_NODE:{const o=r;i=e.createDocumentType(o.name,o.publicId,o.systemId);break}case xe.ELEMENT_NODE:{const o=r,l=fg(o);i=e.createElement(l);const a=i;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 xe.TEXT_NODE:i=e.createTextNode(r.textContent||"");break;case xe.CDATA_SECTION_NODE:i=e.createCDATASection(r.data);break;case xe.COMMENT_NODE:i=e.createComment(r.textContent||"");break;case xe.DOCUMENT_FRAGMENT_NODE:i=s.attachShadow({mode:"open"});break;default:return null}let n=t.getMeta(r);return e instanceof _t&&(n||(n=yc(i,e.unserializedId),t.add(r,n)),e.mirror.add(i,R({},n))),i}function pg(r,e=Qf(),t=new _t){function s(i,n){const o=gc(i,t,e,n);if(o!==null)if((n==null?void 0:n.nodeName)!=="IFRAME"&&i.nodeType!==xe.DOCUMENT_FRAGMENT_NODE&&(n==null||n.appendChild(o),o.parentNode=n,o.parentElement=n),i.nodeName==="IFRAME"){const l=i.contentDocument;l&&s(l,o)}else(i.nodeType===xe.DOCUMENT_NODE||i.nodeType===xe.ELEMENT_NODE||i.nodeType===xe.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===xe.ELEMENT_NODE&&i.shadowRoot&&s(i.shadowRoot,o),i.childNodes.forEach(l=>s(l,o)))}return s(r,null),t}function mg(){return new gg}class gg{constructor(){I(this,"idNodeMap",new Map),I(this,"nodeMetaMap",new WeakMap),I(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 i=this.selectorNodeMap.get(s.selector);i&&(i.delete(e),i.size===0&&this.selectorNodeMap.delete(s.selector))}e.childNodes&&e.childNodes.forEach(i=>this.removeNodeFromMap(i))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const s=t.id;if(this.idNodeMap.set(s,e),this.nodeMetaMap.set(e,t),t.selector){let i=this.selectorNodeMap.get(t.selector);i||(i=new Set,this.selectorNodeMap.set(t.selector,i)),i.add(e)}}replace(e,t){const s=this.getNode(e);if(s){const i=this.nodeMetaMap.get(s);if(i&&(this.nodeMetaMap.set(t,i),i.selector)){const n=this.selectorNodeMap.get(i.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 yc(r,e){switch(r.RRNodeType){case j.Document:return{id:e,type:r.RRNodeType,childNodes:[]};case j.DocumentType:{const t=r;return{id:e,type:r.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId}}case j.Element:return{id:e,type:r.RRNodeType,tagName:r.tagName.toLowerCase(),attributes:{},childNodes:[]};case j.Text:return{id:e,type:r.RRNodeType,textContent:r.textContent||""};case j.Comment:return{id:e,type:r.RRNodeType,textContent:r.textContent||""};case j.CDATA:return{id:e,type:r.RRNodeType,textContent:""}}}const Ko={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Qo={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Us={},yg=()=>!!globalThis.Zone;function Tn(r){if(Us[r])return Us[r];const e=globalThis[r],t=e.prototype,s=r in Ko?Ko[r]:void 0,i=!!(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=r in Qo?Qo[r]:void 0,o=!!(n&&n.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(i&&o&&!yg())return Us[r]=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[r].prototype;return document.body.removeChild(l),c?Us[r]=c:t}catch(l){return t}}const Jr={};function at(r,e,t){var s;const i=`${r}.${String(t)}`;if(Jr[i])return Jr[i].call(e);const n=Tn(r),o=(s=Object.getOwnPropertyDescriptor(n,t))==null?void 0:s.get;return o?(Jr[i]=o,o.call(e)):e[t]}const qr={};function bc(r,e,t){const s=`${r}.${String(t)}`;if(qr[s])return qr[s].bind(e);const n=Tn(r)[t];return typeof n!="function"?e[t]:(qr[s]=n,n.bind(e))}function bg(r){return at("Node",r,"childNodes")}function vg(r){return at("Node",r,"parentNode")}function wg(r){return at("Node",r,"parentElement")}function Sg(r){return at("Node",r,"textContent")}function Cg(r,e){return bc("Node",r,"contains")(e)}function xg(r){return bc("Node",r,"getRootNode")()}function Eg(r){return!r||!("host"in r)?null:at("ShadowRoot",r,"host")}function Mg(r){return r.styleSheets}function Ag(r){return!r||!("shadowRoot"in r)?null:at("Element",r,"shadowRoot")}function Ig(r,e){return at("Element",r,"querySelector")(e)}function Ng(r,e){return at("Element",r,"querySelectorAll")(e)}function On(){return Tn("MutationObserver").constructor}function Ye(r,e,t){try{if(!(e in r))return()=>{};const s=r[e],i=t(s);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:s}})),r[e]=i,()=>{r[e]=s}}catch(s){return()=>{}}}function Rg(r){const e=r.tagName.toLowerCase(),t=r.id?`#${r.id}`:"",s=r.classList.length?"."+Array.from(r.classList).join("."):"";return`${e}${t}${s}`}function Tg(r){var d;var e,t;const s=(d=(e=r.ownerDocument)==null?void 0:e.defaultView)!=null?d:window,i=r.getBoundingClientRect(),n=s.innerWidth||s.document.documentElement.clientWidth||0,o=s.innerHeight||s.document.documentElement.clientHeight||0,l=i.width>0&&i.height>0&&i.bottom>0&&i.right>0&&i.top<o&&i.left<n,a=(t=s.getComputedStyle)==null?void 0:t.call(s,r),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(i.right,n)-Math.max(i.left,0)),m=Math.max(0,Math.min(i.bottom,o)-Math.max(i.top,0)),y=f*m,p=i.width*i.height;h=p>0?y/p:0}return{isVisible:u,ratio:h}}const V={childNodes:bg,parentNode:vg,parentElement:wg,textContent:Sg,contains:Cg,getRootNode:xg,host:Eg,styleSheets:Mg,shadowRoot:Ag,querySelector:Ig,querySelectorAll:Ng,mutationObserver:On,patch:Ye,describeNode:Rg,getElementVisibility:Tg};function ue(r,e,t=document){const s={capture:!0,passive:!0};return t.addEventListener(r,e,s),()=>t.removeEventListener(r,e,s)}const vt=`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(vt),-1},getNode(){return console.error(vt),null},removeNodeFromMap(){console.error(vt)},has(){return console.error(vt),!1},reset(){console.error(vt)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(exports.mirror=new Proxy(exports.mirror,{get(s,e,t){return e==="map"&&console.error(vt),Reflect.get(s,e,t)}}));function kt(s,e,t={}){let r=null,i=0;return function(...n){const o=Date.now();!i&&t.leading===!1&&(i=o);const l=e-(o-i),a=this;l<=0||l>e?(r&&(clearTimeout(r),r=null),i=o,s.apply(a,n)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{i=t.leading===!1?0:Date.now(),r=null,s.apply(a,n)},l))}}function br(s,e,t,r,i=window){const n=i.Object.getOwnPropertyDescriptor(s,e);return i.Object.defineProperty(s,e,r?t:{set(o){setTimeout(()=>{t.set.call(this,o)},0),n&&n.set&&n.set.call(this,o)}}),()=>br(s,e,n||{},!0)}function pe(){return Math.round(performance.timeOrigin+performance.now())}function Tn(s=window){var e,t,r,i;const n=s.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:s.pageXOffset!==void 0?s.pageXOffset:n.documentElement.scrollLeft||(n==null?void 0:n.body)&&((e=V.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:s.pageYOffset!==void 0?s.pageYOffset:(n==null?void 0:n.documentElement.scrollTop)||(n==null?void 0:n.body)&&((r=V.parentElement(n.body))==null?void 0:r.scrollTop)||((i=n==null?void 0:n.body)==null?void 0:i.scrollTop)||0}}function On(s=window){const e=s.document;return s.innerHeight||e.documentElement&&e.documentElement.clientHeight||e.body&&e.body.clientHeight||0}function Dn(s=window){const e=s.document;return s.innerWidth||e.documentElement&&e.documentElement.clientWidth||e.body&&e.body.clientWidth||0}function Os(s){return s?s.nodeType===s.ELEMENT_NODE?s:V.parentElement(s):null}function me(s,e,t,r){if(!s)return!1;const i=Os(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(ss(i,e,r))return!0}catch(n){}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function bc(s,e){return e.getId(s)!==-1}function Kr(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===rr}function $n(s,e){if(qt(s))return!1;const t=e.getId(s);if(!e.has(t))return!0;const r=V.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?$n(r,e):!0}function ps(s){return!!s.changedTouches}function kn(s=window){"NodeList"in s&&!s.NodeList.prototype.forEach&&(s.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in s&&!s.DOMTokenList.prototype.forEach&&(s.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function vc(s){const e={},t=(i,n)=>{const o={value:i,parent:n,children:[]};return e[i.node.id]=o,o},r=[];for(const i of s){const{nextId:n,parentId:o}=i;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(i,l.parent))}else{const a=r.indexOf(l);r.splice(a,0,t(i,null))}continue}if(o in e){const l=e[o];l.children.push(t(i,l));continue}r.push(t(i,null))}return r}function _n(s,e){e(s.value);for(let t=s.children.length-1;t>=0;t--)_n(s.children[t],e)}function At(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function Ln(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function Pn(s,e){var t,r;const i=(r=(t=s.ownerDocument)==null?void 0:t.defaultView)==null?void 0:r.frameElement;if(!i||i===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};const n=i.getBoundingClientRect(),o=Pn(i,e),l=n.height/i.clientHeight;return{x:n.x*o.relativeScale+o.x,y:n.y*o.relativeScale+o.y,relativeScale:l,absoluteScale:o.absoluteScale*l}}function tt(s){return s?s instanceof Re&&"shadowRoot"in s?!!s.shadowRoot:!!V.shadowRoot(s):!1}function xt(s,e){const t=s[e[0]];return e.length===1?t:xt(t.cssRules[e[1]].cssRules,e.slice(2))}function Wi(s){const e=[...s],t=e.pop();return{positions:e,index:t}}function wc(s){const e=new Set,t=[];for(let r=s.length;r--;){const i=s[r];e.has(i.id)||(t.push(i),e.add(i.id))}return t}class Fn{constructor(){v(this,"id",1),v(this,"styleIDMap",new WeakMap),v(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 r;return t===void 0?r=this.id++:r=t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function zn(s){var e;let t=null;return"getRootNode"in s&&((e=V.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&V.host(V.getRootNode(s))&&(t=V.host(V.getRootNode(s))),t}function Sc(s){let e=s,t;for(;t=zn(e);)e=t;return e}function Cc(s){const e=s.ownerDocument;if(!e)return!1;const t=Sc(s);return V.contains(e,t)}function Bn(s){const e=s.ownerDocument;return e?V.contains(e,s)||Cc(s):!1}const Rg=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:Fn,get _mirror(){return exports.mirror},closestElementOfNode:Os,getBaseDimension:Pn,getNestedRule:xt,getPositionsAndIndex:Wi,getRootShadowHost:Sc,getShadowHost:zn,getWindowHeight:On,getWindowScroll:Tn,getWindowWidth:Dn,hasShadowRoot:tt,hookSetter:br,inDom:Bn,isAncestorRemoved:$n,isBlocked:me,isIgnored:Kr,isSerialized:bc,isSerializedIframe:At,isSerializedStylesheet:Ln,iterateResolveTree:_n,legacy_isTouchEvent:ps,nowTimestamp:pe,on:ue,polyfill:kn,queueToResolveTrees:vc,shadowHostInDom:Cc,throttle:kt,uniqueTextMutations:wc},Symbol.toStringTag,{value:"Module"}));var O=(s=>(s[s.DomContentLoaded=0]="DomContentLoaded",s[s.Load=1]="Load",s[s.FullSnapshot=2]="FullSnapshot",s[s.IncrementalSnapshot=3]="IncrementalSnapshot",s[s.Meta=4]="Meta",s[s.Custom=5]="Custom",s[s.Plugin=6]="Plugin",s))(O||{}),A=(s=>(s[s.Mutation=0]="Mutation",s[s.MouseMove=1]="MouseMove",s[s.MouseInteraction=2]="MouseInteraction",s[s.Scroll=3]="Scroll",s[s.ViewportResize=4]="ViewportResize",s[s.Input=5]="Input",s[s.TouchMove=6]="TouchMove",s[s.MediaInteraction=7]="MediaInteraction",s[s.StyleSheetRule=8]="StyleSheetRule",s[s.CanvasMutation=9]="CanvasMutation",s[s.Font=10]="Font",s[s.Log=11]="Log",s[s.Drag=12]="Drag",s[s.StyleDeclaration=13]="StyleDeclaration",s[s.Selection=14]="Selection",s[s.AdoptedStyleSheet=15]="AdoptedStyleSheet",s[s.CustomElement=16]="CustomElement",s[s.Visibility=17]="Visibility",s))(A||{}),Z=(s=>(s[s.MouseUp=0]="MouseUp",s[s.MouseDown=1]="MouseDown",s[s.Click=2]="Click",s[s.ContextMenu=3]="ContextMenu",s[s.DblClick=4]="DblClick",s[s.Focus=5]="Focus",s[s.Blur=6]="Blur",s[s.TouchStart=7]="TouchStart",s[s.TouchMove_Departed=8]="TouchMove_Departed",s[s.TouchEnd=9]="TouchEnd",s[s.TouchCancel=10]="TouchCancel",s))(Z||{}),Ue=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(Ue||{}),Ye=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(Ye||{}),Qe=(s=>(s[s.Play=0]="Play",s[s.Pause=1]="Pause",s[s.Seeked=2]="Seeked",s[s.VolumeChange=3]="VolumeChange",s[s.RateChange=4]="RateChange",s))(Qe||{}),Y=(s=>(s.Start="start",s.Pause="pause",s.Resume="resume",s.Resize="resize",s.Finish="finish",s.FullsnapshotRebuilded="fullsnapshot-rebuilded",s.LoadStylesheetStart="load-stylesheet-start",s.LoadStylesheetEnd="load-stylesheet-end",s.SkipStart="skip-start",s.SkipEnd="skip-end",s.MouseInteraction="mouse-interaction",s.EventCast="event-cast",s.CustomEvent="custom-event",s.Flush="flush",s.StateChange="state-change",s.PlayBack="play-back",s.Destroy="destroy",s))(Y||{}),Ve=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(Ve||{});const Vr={ANCHOR:.4,PATH:.3,TARGET:.2,UNIQUENESS:.1},ke={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},Tg={MIN_CONFIDENCE_FOR_SKIP:.7},Ko=["form","main","nav","section","article","footer","header"],Qo=["form","navigation","main","region","contentinfo","complementary","banner","search"],Og=["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"],rt={"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},xc=new Set(["id","class","style","xmlns","tabindex","contenteditable"]),Dg={maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:0,fallbackToBody:!0,includeUtilityClasses:!1,source:"dom-dsl"};function hr(s){if(/^[a-z]+-\d+$/i.test(s)||/^[a-z]+(-[a-z]+)+-\d+$/i.test(s)||/^[a-z]+(_[a-z]+)*_\d+$/i.test(s)||/^\d+$/.test(s)||/^:[a-z0-9]+:$/i.test(s)||/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i.test(s))return!0;if(/^[a-z]{1,3}[A-Za-z0-9]{8,}$/.test(s)){const e=/\d/.test(s),t=/[A-Z]/.test(s),r=s.length>=20;if(e&&t||r)return!0}return!!(/^radix-/.test(s)||/^mui-\d+$/.test(s))}const Ec=new Set(["aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-activedescendant","for","form","list","headers","aria-details","aria-errormessage","aria-flowto"]);function Mc(s){return s.trim().split(/\s+/).some(e=>hr(e))}class $g{constructor(e,t){var r;this.maxDepth=(r=e.maxPathDepth)!=null?r:10,this.cache=t}findAnchor(e){if(this.cache){const a=this.cache.getAnchor(e);if(a!==void 0)return a}const t=e.tagName.toLowerCase(),r=e.ownerDocument;if(t==="html"){const a={element:e,score:1,tier:"A",depth:0};return this.cacheResult(e,a),a}if(t==="head"||this.isInsideHead(e)){const a=r==null?void 0:r.documentElement;if(a){const c={element:a,score:1,tier:"A",depth:0};return this.cacheResult(e,c),c}}if(t==="body"){const a=r==null?void 0:r.documentElement;if(a){const c={element:a,score:1,tier:"A",depth:0};return this.cacheResult(e,c),c}}let i=e.parentElement,n=0,o=null;for(;i&&n<this.maxDepth;){if(i.tagName.toLowerCase()==="body")return o||{element:i,score:ke.DEGRADED_SCORE,tier:"C",depth:n};const a=this.scoreAnchor(i);if(a>0){const c=this.applyDepthPenalty(a,n),u=this.getTier(i),h={element:i,score:c,tier:u,depth:n};if(u==="A")return h;(!o||c>o.score)&&(o=h)}i=i.parentElement,n++}const l=o;return this.cache&&this.cache.setAnchor(e,l),l}scoreAnchor(e){let t=0;const r=e.tagName.toLowerCase();Ko.includes(r)&&(t+=ke.SEMANTIC_TAG);const i=e.getAttribute("role");i&&Qo.includes(i)&&(t+=ke.ROLE),(e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby"))&&(t+=ke.ARIA_LABEL);const n=e.id;return n&&!hr(n)&&(t+=ke.STABLE_ID),(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))&&(t+=ke.TEST_MARKER),Math.min(t,1)}applyDepthPenalty(e,t){if(t<=ke.DEPTH_PENALTY_THRESHOLD)return e;const r=(t-ke.DEPTH_PENALTY_THRESHOLD)*ke.DEPTH_PENALTY_FACTOR;return Math.max(0,e-r)}getTier(e){const t=e.tagName.toLowerCase();if(Ko.includes(t))return"A";const r=e.getAttribute("role");return r&&Qo.includes(r)?"B":"C"}isInsideHead(e){let t=e.parentElement;for(;t;){const r=t.tagName.toLowerCase();if(r==="head")return!0;if(r==="body")return!1;t=t.parentElement}return!1}cacheResult(e,t){this.cache&&this.cache.setAnchor(e,t)}}const kg=[/^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,}/],_g=[/^\[/,/^(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 Wn(s){return kg.some(e=>e.test(s))}function Un(s){return s.length<=2||/^\d/.test(s)?!0:_g.some(e=>e.test(s))}function Lg(s){return!Wn(s)&&!Un(s)}function Pg(s){return s.filter(e=>Lg(e))}function Fg(s){const e=[],t=[];for(const r of s)Un(r)||Wn(r)?t.push(r):e.push(r);return{semantic:e,utility:t}}function ea(s){return Un(s)||Wn(s)}const ta=s=>s.replace(/([#:.[\]@])/g,"\\$1");class zg{constructor(e,t){var r;this.maxDepth=(r=e.maxPathDepth)!=null?r:10,this.cache=t}buildPath(e,t,r){const i=e.tagName.toLowerCase(),n=t.tagName.toLowerCase();if(i==="html"&&(n==="head"||n==="body"))return{path:[],degraded:!1};if(i==="html"&&this.isInsideHead(t))return this.buildHeadPath(e,t,r);const o=[];let l=t.parentElement;for(;l&&l!==e&&o.length<this.maxDepth;)o.unshift(l),l=l.parentElement;const a=o.length>=this.maxDepth&&l!==e;if(!a&&l!==e)return console.warn("[PathBuilder] Target is not a descendant of anchor"),{path:[],degraded:!0,degradationReason:"target-not-descendant-of-anchor"};let c=this.filterNoise(o);return c=this.ensureUniqueness(o,c,e,t,r),{path:c.map(u=>{const h=u.parentElement;let d;if(h){const f=Array.from(h.children).indexOf(u);f!==-1&&(d=f+1)}return{tag:u.tagName.toLowerCase(),semantics:r.extract(u),score:r.scoreElement(u),nthChild:d}}),degraded:a,degradationReason:a?"path-depth-overflow":void 0}}buildPathNodes(e,t,r){return this.buildPath(e,t,r).path}ensureUniqueness(e,t,r,i,n){const o=this.buildTestSelector(r,t,i);try{const l=i.ownerDocument;if(!l)return t;let a;if(this.cache){const u=this.cache.getSelectorResults(o);u!==void 0?a=u:(a=Array.from(l.querySelectorAll(o)),this.cache.setSelectorResults(o,a))}else a=l.querySelectorAll(o);if(a.length<=1)return t;const c=e.filter(u=>!t.includes(u));for(const u of c){if(n.scoreElement(u)<Tg.MIN_CONFIDENCE_FOR_SKIP)continue;const h=this.insertNodeInOrder(t,u,e),d=this.buildTestSelector(r,h,i);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,r){const i=r.indexOf(t),n=[...e];let o=0;for(let l=0;l<n.length&&!(r.indexOf(n[l])>i);l++)o=l+1;return n.splice(o,0,t),n}buildTestSelector(e,t,r){const i=[];i.push(this.elementToSelector(e));for(const n of t)i.push(this.elementToSelector(n));return i.push(this.elementToSelector(r)),i.join(" ")}elementToSelector(e){let t=e.tagName.toLowerCase();e.id&&!hr(e.id)&&(t+=`#${ta(e.id)}`);for(const r of Array.from(e.classList))ea(r)||(t+=`.${ta(r)}`);return t}filterNoise(e){return e.filter(t=>this.shouldInclude(t))}shouldInclude(e){const t=e.tagName.toLowerCase();return Og.includes(t)?!0:t==="div"||t==="span"?this.hasSemanticFeatures(e):!1}hasSemanticFeatures(e){if(e.hasAttribute("role"))return!0;for(const r of Array.from(e.attributes))if(r.name.startsWith("aria-"))return!0;if(e.classList.length>0){for(const r of Array.from(e.classList))if(!ea(r))return!0}if(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))return!0;const t=e.id;return!!(t&&!hr(t))}isInsideHead(e){let t=e.parentElement;for(;t;){const r=t.tagName.toLowerCase();if(r==="head")return!0;if(r==="body")return!1;t=t.parentElement}return!1}buildHeadPath(e,t,r){const i=[];let n=t.parentElement;for(;n&&n!==e;)i.unshift(n),n=n.parentElement;return n!==e?{path:[],degraded:!0,degradationReason:"target-not-descendant-of-html"}:i.findIndex(o=>o.tagName.toLowerCase()==="head")===-1?{path:[],degraded:!0,degradationReason:"head-not-found-in-path"}:{path:i.map(o=>{const l=o.parentElement;let a;if(l){const c=Array.from(l.children).indexOf(o);c!==-1&&(a=c+1)}return{tag:o.tagName.toLowerCase(),semantics:r.extract(o),score:r.scoreElement(o),nthChild:a}}),degraded:!1}}}function Bg(s){return s?s.trim().replace(/[\n\t\r]/g," ").replace(/\s+/g," "):""}const Wg={preserveQueryForAbsolute:!0,removeDynamicHashes:!0};function Ug(s){return s?[/\d{5,}/,/[a-f0-9]{8,}/i,/(session|token|temp|random|timestamp|nonce|cache)/i,/^\d+$/,/^[a-f0-9-]{32,}$/i].some(e=>e.test(s)):!1}function Vg(s,e){if(!s)return s;const t=s.startsWith("http://")||s.startsWith("https://"),[r,i]=s.split("#"),[n,o]=r.split("?");let l=n;return t&&e.preserveQueryForAbsolute&&o&&(l+=`?${o}`),i&&(e.removeDynamicHashes&&Ug(i)||(l+=`#${i}`)),l}function Ac(s,e,t={}){if(!e)return e;const r=R(R({},Wg),t);return s==="href"||s==="src"?Vg(e,r):e}const Hg=["role","aria-label","aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-level","aria-posinset","aria-setsize","aria-haspopup"],Gg=["aria-selected","aria-checked","aria-pressed","aria-expanded","aria-hidden","aria-disabled","aria-current","aria-busy","aria-invalid","aria-grabbed","aria-live","aria-atomic"],jg=["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"],Yg=["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"],Xg=["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"],Jg=["data-category","data-action","data-label","data-value"],qg=["id","name","type","placeholder","title","for","alt","href"],Kg=["disabled","checked","selected","hidden","readonly","required","value"],Qg=[/^radix-/,/^headlessui-/,/^mui-/,/:\w+:/];function ey(s,e){return Hg.includes(s)?!0:Gg.includes(s)||jg.includes(s)||Yg.some(t=>s.startsWith(t))?!1:Zg.includes(s)?!0:Xg.some(t=>s.startsWith(t))||Jg.includes(s)?!1:s.startsWith("data-")&&s.endsWith("-id")?!0:s==="id"?!Qg.some(t=>t.test(e)):qg.includes(s)?!0:Kg.includes(s)?!1:!!s.startsWith("data-")}class ra{constructor(e,t){var r;this.includeUtilityClasses=(r=e.includeUtilityClasses)!=null?r:!1,this.cache=t}extract(e){if(this.cache){const o=this.cache.getSemantics(e);if(o!==void 0)return o}const t={},r=e.id;if(r&&!hr(r)&&(t.id=r),e.classList.length>0){const o=Array.from(e.classList);if(this.includeUtilityClasses)t.classes=o;else{const{semantic:l}=Fg(o);l.length>0&&(t.classes=l)}}const i=this.extractAttributes(e);Object.keys(i).length>0&&(t.attributes=i);const n=e.getAttribute("role");if(n&&(t.role=n),this.shouldExtractText(e)){const o=this.extractText(e);o&&(t.text=o)}return this.cache&&this.cache.setSemantics(e,t),t}scoreElement(e){let t=.5;const r=this.extract(e);return r.id&&(t+=.15),r.classes&&r.classes.length>0&&(t+=.1),r.attributes&&Object.keys(r.attributes).length>0&&(t+=.1),r.role&&(t+=.1),r.text&&(t+=.05),Math.min(t,1)}shouldIgnoreAttribute(e){return!!(xc.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 rt[e]!==void 0?rt[e]:e.startsWith("data-")?rt["data-*"]:e.startsWith("aria-")?rt["aria-*"]:0}isDynamicValue(e){return[/^[a-f0-9]{32,}$/i,/^\d{10,}$/,/^(undefined|null|\[object)/,/^{{.*}}$/].some(t=>t.test(e))}extractAttributes(e){const t={};for(const r of Array.from(e.attributes)){const i=r.name;if(this.shouldIgnoreAttribute(i)||!ey(i,r.value)||Ec.has(i)&&Mc(r.value)||this.getAttributePriority(i)===0)continue;const n=i==="href"||i==="src"?Ac(i,r.value):r.value;!n||n.trim()===""||this.isDynamicValue(n)||(t[i]=n)}return t}extractText(e){const t=this.getDirectTextContent(e);if(!t)return null;const r=Bg(t);if(!r)return null;const i=100,n=t.length>i?t.slice(0,i)+"...":t,o=r.length>i?r.slice(0,i)+"...":r;return{raw:n,normalized:o}}getDirectTextContent(e){var r;const t=[];for(const i of Array.from(e.childNodes))if(i.nodeType===Node.TEXT_NODE&&i.textContent){const n=i.textContent.trim();n&&t.push(n)}return t.length>0?t.join(" "):(r=e.textContent)!=null?r:null}shouldExtractText(e){const t=e.tagName.toLowerCase();return["button","a","label","h1","h2","h3","h4","h5","h6","p","span","li","th","td","dt","dd","legend","figcaption","summary"].includes(t)}}class ty{fingerprint(e){const t=e.tagName.toLowerCase(),r=this.getShape(t),i={shape:r,hasAnimation:this.hasAnimation(e)};if(r==="path"){const l=e.getAttribute("d");l&&(i.dHash=this.computePathHash(l))}else["circle","rect","ellipse","line"].includes(r)&&(i.geomHash=this.computeGeomHash(e,r));const n=e.getAttribute("role");n&&(i.role=n);const o=e.querySelector("title");return o!=null&&o.textContent&&(i.titleText=o.textContent.trim()),i}computePathHash(e){const t=this.normalizePathData(e);return this.simpleHash(t)}getShape(e){var t;return(t=["path","circle","rect","line","polyline","polygon","ellipse","g","text","use","svg"].find(r=>r===e))!=null?t:"path"}normalizePathData(e){var t;return((t=e.match(/[MLHVCSQTAZ][^MLHVCSQTAZ]*/gi))!=null?t:[]).slice(0,5).map(r=>r.trim().replace(/(-?\d+\.?\d*)/g,i=>parseFloat(i).toFixed(1))).join(" ")}computeGeomHash(e,t){var i,n,o,l,a,c,u,h,d;const r=[];switch(t){case"circle":r.push(`r=${(i=e.getAttribute("r"))!=null?i:"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&&r.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&&r.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);r.push(`angle=${g.toFixed(2)}`)}break}return this.simpleHash(r.join(";"))}hasAnimation(e){if(e.querySelector("animate, animateTransform, animateMotion"))return!0;const t=e.ownerDocument;if(t!=null&&t.defaultView)try{const r=t.defaultView.getComputedStyle(e);if(r.animationName!=="none"||r.transitionProperty!=="all"&&r.transitionProperty!=="none")return!0}catch(r){}return!1}simpleHash(e){let t=0;for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);t=(t<<5)-t+i,t=t&t}return Math.abs(t).toString(16).padStart(8,"0")}}function ry(s,e=0){const t=s.anchor.score,r=s.path.length>0?s.path.reduce((l,a)=>l+a.score,0)/s.path.length:.5,i=s.target.score,n=t*Vr.ANCHOR+r*Vr.PATH+i*Vr.TARGET+e*Vr.UNIQUENESS,o=s.anchor.degraded?.2:0;return Math.max(0,Math.min(1,n-o))}class sy{constructor(e){this.cache=new Map,this.maxSize=e}get(e){const t=this.cache.get(e);if(t!==void 0)return this.cache.delete(e),this.cache.set(e,t),t}set(e,t){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.maxSize){const r=this.cache.keys().next().value;r!==void 0&&this.cache.delete(r)}this.cache.set(e,t)}has(e){return this.cache.has(e)}delete(e){this.cache.delete(e)}clear(){this.cache.clear()}get size(){return this.cache.size}}class iy{constructor(e={}){var t,r;this.eidCache=new WeakMap,this.selectorResultCache=new sy((t=e.maxSelectorCacheSize)!=null?t:1e3),this.anchorCache=new WeakMap,this.semanticsCache=new WeakMap,this.stats={eidHits:0,eidMisses:0,selectorHits:0,selectorMisses:0,anchorHits:0,anchorMisses:0,semanticsHits:0,semanticsMisses:0,selectorCacheSize:0,maxSelectorCacheSize:(r=e.maxSelectorCacheSize)!=null?r:1e3}}getEID(e){const t=this.eidCache.get(e);if(t!==void 0)return this.stats.eidHits++,t;this.stats.eidMisses++}setEID(e,t){this.eidCache.set(e,t)}getSelectorResults(e){const t=this.selectorResultCache.get(e);if(t!==void 0)return this.stats.selectorHits++,this.stats.selectorCacheSize=this.selectorResultCache.size,t;this.stats.selectorMisses++,this.stats.selectorCacheSize=this.selectorResultCache.size}setSelectorResults(e,t){this.selectorResultCache.set(e,t),this.stats.selectorCacheSize=this.selectorResultCache.size}getAnchor(e){if(this.anchorCache.has(e))return this.stats.anchorHits++,this.anchorCache.get(e);this.stats.anchorMisses++}setAnchor(e,t){this.anchorCache.set(e,t)}getSemantics(e){const t=this.semanticsCache.get(e);if(t!==void 0)return this.stats.semanticsHits++,t;this.stats.semanticsMisses++}setSemantics(e,t){this.semanticsCache.set(e,t)}clear(){this.selectorResultCache.clear(),this.stats.selectorCacheSize=0,this.stats={eidHits:0,eidMisses:0,selectorHits:0,selectorMisses:0,anchorHits:0,anchorMisses:0,semanticsHits:0,semanticsMisses:0,selectorCacheSize:0,maxSelectorCacheSize:this.stats.maxSelectorCacheSize}}invalidateElement(e){}invalidateSelector(e){this.selectorResultCache.delete(e),this.stats.selectorCacheSize=this.selectorResultCache.size}getStats(){return oe(R({},this.stats),{selectorCacheSize:this.selectorResultCache.size})}getEIDHitRate(){const e=this.stats.eidHits+this.stats.eidMisses;return e>0?this.stats.eidHits/e:0}getSelectorHitRate(){const e=this.stats.selectorHits+this.stats.selectorMisses;return e>0?this.stats.selectorHits/e:0}getAnchorHitRate(){const e=this.stats.anchorHits+this.stats.anchorMisses;return e>0?this.stats.anchorHits/e:0}getSemanticsHitRate(){const e=this.stats.semanticsHits+this.stats.semanticsMisses;return e>0?this.stats.semanticsHits/e:0}getOverallHitRate(){const e=this.stats.eidHits+this.stats.selectorHits+this.stats.anchorHits+this.stats.semanticsHits,t=this.stats.eidMisses+this.stats.selectorMisses+this.stats.anchorMisses+this.stats.semanticsMisses,r=e+t;return r>0?e/r:0}}function ny(s){return new iy(s)}let qs=null;function oy(){return qs||(qs=ny()),qs}function sa(s){if(s.ownerDocument)return s.ownerDocument;let e=s;for(;e;){if(e.nodeType===9)return e;e=e.parentNode}throw new Error(`Element does not have an ownerDocument. This typically means:
|
|
70
|
+
or you can use record.mirror to access the mirror instance during recording.`;exports.mirror={map:{},getId(){return console.error(vt),-1},getNode(){return console.error(vt),null},removeNodeFromMap(){console.error(vt)},has(){return console.error(vt),!1},reset(){console.error(vt)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(exports.mirror=new Proxy(exports.mirror,{get(r,e,t){return e==="map"&&console.error(vt),Reflect.get(r,e,t)}}));function $t(r,e,t={}){let s=null,i=0;return function(...n){const o=Date.now();!i&&t.leading===!1&&(i=o);const l=e-(o-i),a=this;l<=0||l>e?(s&&(clearTimeout(s),s=null),i=o,r.apply(a,n)):!s&&t.trailing!==!1&&(s=setTimeout(()=>{i=t.leading===!1?0:Date.now(),s=null,r.apply(a,n)},l))}}function bs(r,e,t,s,i=window){const n=i.Object.getOwnPropertyDescriptor(r,e);return i.Object.defineProperty(r,e,s?t:{set(o){setTimeout(()=>{t.set.call(this,o)},0),n&&n.set&&n.set.call(this,o)}}),()=>bs(r,e,n||{},!0)}function Ae(){return Math.round(performance.timeOrigin+performance.now())}function Dn(r=window){var e,t,s,i;const n=r.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:r.pageXOffset!==void 0?r.pageXOffset:n.documentElement.scrollLeft||(n==null?void 0:n.body)&&((e=V.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:r.pageYOffset!==void 0?r.pageYOffset:(n==null?void 0:n.documentElement.scrollTop)||(n==null?void 0:n.body)&&((s=V.parentElement(n.body))==null?void 0:s.scrollTop)||((i=n==null?void 0:n.body)==null?void 0:i.scrollTop)||0}}function $n(r=window){const e=r.document;return r.innerHeight||e.documentElement&&e.documentElement.clientHeight||e.body&&e.body.clientHeight||0}function kn(r=window){const e=r.document;return r.innerWidth||e.documentElement&&e.documentElement.clientWidth||e.body&&e.body.clientWidth||0}function Or(r){return r?r.nodeType===r.ELEMENT_NODE?r:V.parentElement(r):null}function ge(r,e,t,s){if(!r)return!1;const i=Or(r);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||s&&i.closest("."+e)!==null)return!0}else if(rr(i,e,s))return!0}catch(n){}return!!(t&&(i.matches(t)||s&&i.closest(t)!==null))}function vc(r,e){return e.getId(r)!==-1}function Ks(r,e,t){return r.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(r)===ts}function _n(r,e){if(Jt(r))return!1;const t=e.getId(r);if(!e.has(t))return!0;const s=V.parentNode(r);return s&&s.nodeType===r.DOCUMENT_NODE?!1:s?_n(s,e):!0}function pr(r){return!!r.changedTouches}function Ln(r=window){"NodeList"in r&&!r.NodeList.prototype.forEach&&(r.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in r&&!r.DOMTokenList.prototype.forEach&&(r.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function wc(r){const e={},t=(i,n)=>{const o={value:i,parent:n,children:[]};return e[i.node.id]=o,o},s=[];for(const i of r){const{nextId:n,parentId:o}=i;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(i,l.parent))}else{const a=s.indexOf(l);s.splice(a,0,t(i,null))}continue}if(o in e){const l=e[o];l.children.push(t(i,l));continue}s.push(t(i,null))}return s}function Pn(r,e){e(r.value);for(let t=r.children.length-1;t>=0;t--)Pn(r.children[t],e)}function At(r,e){return!!(r.nodeName==="IFRAME"&&e.getMeta(r))}function Fn(r,e){return!!(r.nodeName==="LINK"&&r.nodeType===r.ELEMENT_NODE&&r.getAttribute&&r.getAttribute("rel")==="stylesheet"&&e.getMeta(r))}function zn(r,e){var t,s;const i=(s=(t=r.ownerDocument)==null?void 0:t.defaultView)==null?void 0:s.frameElement;if(!i||i===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};const n=i.getBoundingClientRect(),o=zn(i,e),l=n.height/i.clientHeight;return{x:n.x*o.relativeScale+o.x,y:n.y*o.relativeScale+o.y,relativeScale:l,absoluteScale:o.absoluteScale*l}}function tt(r){return r?r instanceof De&&"shadowRoot"in r?!!r.shadowRoot:!!V.shadowRoot(r):!1}function xt(r,e){const t=r[e[0]];return e.length===1?t:xt(t.cssRules[e[1]].cssRules,e.slice(2))}function Ui(r){const e=[...r],t=e.pop();return{positions:e,index:t}}function Sc(r){const e=new Set,t=[];for(let s=r.length;s--;){const i=r[s];e.has(i.id)||(t.push(i),e.add(i.id))}return t}class Bn{constructor(){v(this,"id",1),v(this,"styleIDMap",new WeakMap),v(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(r){var e;let t=null;return"getRootNode"in r&&((e=V.getRootNode(r))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&V.host(V.getRootNode(r))&&(t=V.host(V.getRootNode(r))),t}function Cc(r){let e=r,t;for(;t=Wn(e);)e=t;return e}function xc(r){const e=r.ownerDocument;if(!e)return!1;const t=Cc(r);return V.contains(e,t)}function Un(r){const e=r.ownerDocument;return e?V.contains(e,r)||xc(r):!1}const Og=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:Bn,get _mirror(){return exports.mirror},closestElementOfNode:Or,getBaseDimension:zn,getNestedRule:xt,getPositionsAndIndex:Ui,getRootShadowHost:Cc,getShadowHost:Wn,getWindowHeight:$n,getWindowScroll:Dn,getWindowWidth:kn,hasShadowRoot:tt,hookSetter:bs,inDom:Un,isAncestorRemoved:_n,isBlocked:ge,isIgnored:Ks,isSerialized:vc,isSerializedIframe:At,isSerializedStylesheet:Fn,iterateResolveTree:Pn,legacy_isTouchEvent:pr,nowTimestamp:Ae,on:ue,polyfill:Ln,queueToResolveTrees:wc,shadowHostInDom:xc,throttle:$t,uniqueTextMutations:Sc},Symbol.toStringTag,{value:"Module"}));var O=(r=>(r[r.DomContentLoaded=0]="DomContentLoaded",r[r.Load=1]="Load",r[r.FullSnapshot=2]="FullSnapshot",r[r.IncrementalSnapshot=3]="IncrementalSnapshot",r[r.Meta=4]="Meta",r[r.Custom=5]="Custom",r[r.Plugin=6]="Plugin",r))(O||{}),A=(r=>(r[r.Mutation=0]="Mutation",r[r.MouseMove=1]="MouseMove",r[r.MouseInteraction=2]="MouseInteraction",r[r.Scroll=3]="Scroll",r[r.ViewportResize=4]="ViewportResize",r[r.Input=5]="Input",r[r.TouchMove=6]="TouchMove",r[r.MediaInteraction=7]="MediaInteraction",r[r.StyleSheetRule=8]="StyleSheetRule",r[r.CanvasMutation=9]="CanvasMutation",r[r.Font=10]="Font",r[r.Log=11]="Log",r[r.Drag=12]="Drag",r[r.StyleDeclaration=13]="StyleDeclaration",r[r.Selection=14]="Selection",r[r.AdoptedStyleSheet=15]="AdoptedStyleSheet",r[r.CustomElement=16]="CustomElement",r[r.Visibility=17]="Visibility",r))(A||{}),Z=(r=>(r[r.MouseUp=0]="MouseUp",r[r.MouseDown=1]="MouseDown",r[r.Click=2]="Click",r[r.ContextMenu=3]="ContextMenu",r[r.DblClick=4]="DblClick",r[r.Focus=5]="Focus",r[r.Blur=6]="Blur",r[r.TouchStart=7]="TouchStart",r[r.TouchMove_Departed=8]="TouchMove_Departed",r[r.TouchEnd=9]="TouchEnd",r[r.TouchCancel=10]="TouchCancel",r))(Z||{}),Ve=(r=>(r[r.Mouse=0]="Mouse",r[r.Pen=1]="Pen",r[r.Touch=2]="Touch",r))(Ve||{}),Ze=(r=>(r[r["2D"]=0]="2D",r[r.WebGL=1]="WebGL",r[r.WebGL2=2]="WebGL2",r))(Ze||{}),Qe=(r=>(r[r.Play=0]="Play",r[r.Pause=1]="Pause",r[r.Seeked=2]="Seeked",r[r.VolumeChange=3]="VolumeChange",r[r.RateChange=4]="RateChange",r))(Qe||{}),Y=(r=>(r.Start="start",r.Pause="pause",r.Resume="resume",r.Resize="resize",r.Finish="finish",r.FullsnapshotRebuilded="fullsnapshot-rebuilded",r.LoadStylesheetStart="load-stylesheet-start",r.LoadStylesheetEnd="load-stylesheet-end",r.SkipStart="skip-start",r.SkipEnd="skip-end",r.MouseInteraction="mouse-interaction",r.EventCast="event-cast",r.CustomEvent="custom-event",r.Flush="flush",r.StateChange="state-change",r.PlayBack="play-back",r.Destroy="destroy",r))(Y||{}),He=(r=>(r[r.Document=0]="Document",r[r.DocumentType=1]="DocumentType",r[r.Element=2]="Element",r[r.Text=3]="Text",r[r.CDATA=4]="CDATA",r[r.Comment=5]="Comment",r))(He||{});const Vs={ANCHOR:.4,PATH:.3,TARGET:.2,UNIQUENESS:.1},Pe={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},Dg={MIN_CONFIDENCE_FOR_SKIP:.7},ea=["form","main","nav","section","article","footer","header"],ta=["form","navigation","main","region","contentinfo","complementary","banner","search"],$g=["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"],st={"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},Ec=new Set(["id","class","style","xmlns","tabindex","contenteditable"]),kg={maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:0,fallbackToBody:!0,includeUtilityClasses:!1,source:"dom-dsl"};function us(r){if(/^[a-z]+-\d+$/i.test(r)||/^[a-z]+(-[a-z]+)+-\d+$/i.test(r)||/^[a-z]+(_[a-z]+)*_\d+$/i.test(r)||/^\d+$/.test(r)||/^:[a-z0-9]+:$/i.test(r)||/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i.test(r))return!0;if(/^[a-z]{1,3}[A-Za-z0-9]{8,}$/.test(r)){const e=/\d/.test(r),t=/[A-Z]/.test(r),s=r.length>=20;if(e&&t||s)return!0}return!!(/^radix-/.test(r)||/^mui-\d+$/.test(r))}const Mc=new Set(["aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-activedescendant","for","form","list","headers","aria-details","aria-errormessage","aria-flowto"]);function Ac(r){return r.trim().split(/\s+/).some(e=>us(e))}class _g{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 i=e.parentElement,n=0,o=null;for(;i&&n<this.maxDepth;){if(i.tagName.toLowerCase()==="body")return o||{element:i,score:Pe.DEGRADED_SCORE,tier:"C",depth:n};const a=this.scoreAnchor(i);if(a>0){const c=this.applyDepthPenalty(a,n),u=this.getTier(i),h={element:i,score:c,tier:u,depth:n};if(u==="A")return h;(!o||c>o.score)&&(o=h)}i=i.parentElement,n++}const l=o;return this.cache&&this.cache.setAnchor(e,l),l}scoreAnchor(e){let t=0;const s=e.tagName.toLowerCase();ea.includes(s)&&(t+=Pe.SEMANTIC_TAG);const i=e.getAttribute("role");i&&ta.includes(i)&&(t+=Pe.ROLE),(e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby"))&&(t+=Pe.ARIA_LABEL);const n=e.id;return n&&!us(n)&&(t+=Pe.STABLE_ID),(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))&&(t+=Pe.TEST_MARKER),Math.min(t,1)}applyDepthPenalty(e,t){if(t<=Pe.DEPTH_PENALTY_THRESHOLD)return e;const s=(t-Pe.DEPTH_PENALTY_THRESHOLD)*Pe.DEPTH_PENALTY_FACTOR;return Math.max(0,e-s)}getTier(e){const t=e.tagName.toLowerCase();if(ea.includes(t))return"A";const s=e.getAttribute("role");return s&&ta.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 Lg=[/^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,}/],Pg=[/^\[/,/^(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 Vn(r){return Lg.some(e=>e.test(r))}function Hn(r){return r.length<=2||/^\d/.test(r)?!0:Pg.some(e=>e.test(r))}function Fg(r){return!Vn(r)&&!Hn(r)}function zg(r){return r.filter(e=>Fg(e))}function Bg(r){const e=[],t=[];for(const s of r)Hn(s)||Vn(s)?t.push(s):e.push(s);return{semantic:e,utility:t}}function sa(r){return Hn(r)||Vn(r)}const ra=r=>r.replace(/([#:.[\]@])/g,"\\$1");class Wg{constructor(e,t){var s;this.maxDepth=(s=e.maxPathDepth)!=null?s:10,this.cache=t}buildPath(e,t,s){const i=e.tagName.toLowerCase(),n=t.tagName.toLowerCase();if(i==="html"&&(n==="head"||n==="body"))return{path:[],degraded:!1};if(i==="html"&&this.isInsideHead(t))return this.buildHeadPath(e,t,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,i,n){const o=this.buildTestSelector(s,t,i);try{const l=i.ownerDocument;if(!l)return t;let a;if(this.cache){const u=this.cache.getSelectorResults(o);u!==void 0?a=u:(a=Array.from(l.querySelectorAll(o)),this.cache.setSelectorResults(o,a))}else a=l.querySelectorAll(o);if(a.length<=1)return t;const c=e.filter(u=>!t.includes(u));for(const u of c){if(n.scoreElement(u)<Dg.MIN_CONFIDENCE_FOR_SKIP)continue;const h=this.insertNodeInOrder(t,u,e),d=this.buildTestSelector(s,h,i);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 i=s.indexOf(t),n=[...e];let o=0;for(let l=0;l<n.length&&!(s.indexOf(n[l])>i);l++)o=l+1;return n.splice(o,0,t),n}buildTestSelector(e,t,s){const i=[];i.push(this.elementToSelector(e));for(const n of t)i.push(this.elementToSelector(n));return i.push(this.elementToSelector(s)),i.join(" ")}elementToSelector(e){let t=e.tagName.toLowerCase();e.id&&!us(e.id)&&(t+=`#${ra(e.id)}`);for(const s of Array.from(e.classList))sa(s)||(t+=`.${ra(s)}`);return t}filterNoise(e){return e.filter(t=>this.shouldInclude(t))}shouldInclude(e){const t=e.tagName.toLowerCase();return $g.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(!sa(s))return!0}if(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))return!0;const t=e.id;return!!(t&&!us(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 i=[];let n=t.parentElement;for(;n&&n!==e;)i.unshift(n),n=n.parentElement;return n!==e?{path:[],degraded:!0,degradationReason:"target-not-descendant-of-html"}:i.findIndex(o=>o.tagName.toLowerCase()==="head")===-1?{path:[],degraded:!0,degradationReason:"head-not-found-in-path"}:{path:i.map(o=>{const l=o.parentElement;let a;if(l){const c=Array.from(l.children).indexOf(o);c!==-1&&(a=c+1)}return{tag:o.tagName.toLowerCase(),semantics:s.extract(o),score:s.scoreElement(o),nthChild:a}}),degraded:!1}}}function Ug(r){return r?r.trim().replace(/[\n\t\r]/g," ").replace(/\s+/g," "):""}const Vg={preserveQueryForAbsolute:!0,removeDynamicHashes:!0};function Hg(r){return r?[/\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(r)):!1}function Gg(r,e){if(!r)return r;const t=r.startsWith("http://")||r.startsWith("https://"),[s,i]=r.split("#"),[n,o]=s.split("?");let l=n;return t&&e.preserveQueryForAbsolute&&o&&(l+=`?${o}`),i&&(e.removeDynamicHashes&&Hg(i)||(l+=`#${i}`)),l}function Ic(r,e,t={}){if(!e)return e;const s=R(R({},Vg),t);return r==="href"||r==="src"?Gg(e,s):e}const jg=["role","aria-label","aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-level","aria-posinset","aria-setsize","aria-haspopup"],Yg=["aria-selected","aria-checked","aria-pressed","aria-expanded","aria-hidden","aria-disabled","aria-current","aria-busy","aria-invalid","aria-grabbed","aria-live","aria-atomic"],Zg=["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-"],Jg=["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"],qg=["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"],Kg=["data-category","data-action","data-label","data-value"],Qg=["id","name","type","placeholder","title","for","alt","href"],ey=["disabled","checked","selected","hidden","readonly","required","value"],ty=[/^radix-/,/^headlessui-/,/^mui-/,/:\w+:/];function sy(r,e){return jg.includes(r)?!0:Yg.includes(r)||Zg.includes(r)||Xg.some(t=>r.startsWith(t))?!1:Jg.includes(r)?!0:qg.some(t=>r.startsWith(t))||Kg.includes(r)?!1:r.startsWith("data-")&&r.endsWith("-id")?!0:r==="id"?!ty.some(t=>t.test(e)):Qg.includes(r)?!0:ey.includes(r)?!1:!!r.startsWith("data-")}class ia{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&&!us(s)&&(t.id=s),e.classList.length>0){const o=Array.from(e.classList);if(this.includeUtilityClasses)t.classes=o;else{const{semantic:l}=Bg(o);l.length>0&&(t.classes=l)}}const i=this.extractAttributes(e);Object.keys(i).length>0&&(t.attributes=i);const n=e.getAttribute("role");if(n&&(t.role=n),this.shouldExtractText(e)){const o=this.extractText(e);o&&(t.text=o)}return this.cache&&this.cache.setSemantics(e,t),t}scoreElement(e){let t=.5;const 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!!(Ec.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 st[e]!==void 0?st[e]:e.startsWith("data-")?st["data-*"]:e.startsWith("aria-")?st["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 i=s.name;if(this.shouldIgnoreAttribute(i)||!sy(i,s.value)||Mc.has(i)&&Ac(s.value)||this.getAttributePriority(i)===0)continue;const n=i==="href"||i==="src"?Ic(i,s.value):s.value;!n||n.trim()===""||this.isDynamicValue(n)||(t[i]=n)}return t}extractText(e){const t=this.getDirectTextContent(e);if(!t)return null;const s=Ug(t);if(!s)return null;const i=100,n=t.length>i?t.slice(0,i)+"...":t,o=s.length>i?s.slice(0,i)+"...":s;return{raw:n,normalized:o}}getDirectTextContent(e){var s;const t=[];for(const i of Array.from(e.childNodes))if(i.nodeType===Node.TEXT_NODE&&i.textContent){const n=i.textContent.trim();n&&t.push(n)}return t.length>0?t.join(" "):(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 ry{fingerprint(e){const t=e.tagName.toLowerCase(),s=this.getShape(t),i={shape:s,hasAnimation:this.hasAnimation(e)};if(s==="path"){const l=e.getAttribute("d");l&&(i.dHash=this.computePathHash(l))}else["circle","rect","ellipse","line"].includes(s)&&(i.geomHash=this.computeGeomHash(e,s));const n=e.getAttribute("role");n&&(i.role=n);const o=e.querySelector("title");return o!=null&&o.textContent&&(i.titleText=o.textContent.trim()),i}computePathHash(e){const t=this.normalizePathData(e);return this.simpleHash(t)}getShape(e){var t;return(t=["path","circle","rect","line","polyline","polygon","ellipse","g","text","use","svg"].find(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,i=>parseFloat(i).toFixed(1))).join(" ")}computeGeomHash(e,t){var i,n,o,l,a,c,u,h,d;const s=[];switch(t){case"circle":s.push(`r=${(i=e.getAttribute("r"))!=null?i:"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 i=e.charCodeAt(s);t=(t<<5)-t+i,t=t&t}return Math.abs(t).toString(16).padStart(8,"0")}}function iy(r,e=0){const t=r.anchor.score,s=r.path.length>0?r.path.reduce((l,a)=>l+a.score,0)/r.path.length:.5,i=r.target.score,n=t*Vs.ANCHOR+s*Vs.PATH+i*Vs.TARGET+e*Vs.UNIQUENESS,o=r.anchor.degraded?.2:0;return Math.max(0,Math.min(1,n-o))}class ny{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 oy{constructor(e={}){var t,s;this.eidCache=new WeakMap,this.selectorResultCache=new ny((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 ae(R({},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 ay(r){return new oy(r)}let Kr=null;function ly(){return Kr||(Kr=ay()),Kr}function na(r){if(r.ownerDocument)return r.ownerDocument;let e=r;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 cy(r,e){if(!e)return;const t=na(r),s=e instanceof Document?e:na(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 ly(s,e={}){var $,B,W,N;var t;if(!s||!s.ownerDocument||!s.isConnected)return null;const r=R(R({},Dg),e);if(r.root)try{ay(s,r.root)}catch(T){return console.error("Cross-document generation detected:",T),null}const i=($=r.cache)!=null?$:oy(),n=i.getEID(s);if(n!==void 0)return n;if(s.tagName.toLowerCase()==="html"){const T=new ra(r,i),D=hy(s,r,T);return i.setEID(s,D),D}const o=new $g(r,i),l=new zg(r,i),a=new ra(r,i),c=new ty,u=o.findAnchor(s);if(!u&&!r.fallbackToBody)return null;const h=(W=(B=u==null?void 0:u.element)!=null?B:(t=s.ownerDocument)==null?void 0:t.body)!=null?W: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 T=Array.from(m.children).indexOf(h);T!==-1&&(y=T+1)}const p=a.extract(h),g={tag:h.tagName.toLowerCase(),semantics:p,score:(N=u==null?void 0:u.score)!=null?N:ke.DEGRADED_SCORE,degraded:d,nthChild:y},w=l.buildPath(h,s,a),S=a.extract(s);r.enableSvgFingerprint&&cy(s)&&(S.svg=c.fingerprint(s));const b=s.parentElement;let C;if(b){const T=Array.from(b.children).indexOf(s);T!==-1&&(C=T+1)}const x={tag:s.tagName.toLowerCase(),semantics:S,score:a.scoreElement(s),nthChild:C},M=[],E={onMultiple:"best-score",onMissing:"anchor-only",maxDepth:3},k=g.degraded||w.degraded,_=uy(g.degraded,w),L={version:"1.0",anchor:g,path:w.path,target:x,constraints:M,fallback:E,meta:{confidence:0,generatedAt:new Date().toISOString(),generator:"dom-eid@1.0",source:r.source,degraded:k,degradationReason:_}};return L.meta.confidence=ry(L),L.meta.confidence<r.confidenceThreshold?null:(i.setEID(s,L),L)}function cy(s){return s.namespaceURI==="http://www.w3.org/2000/svg"||s.tagName.toLowerCase()==="svg"||s instanceof SVGElement}function uy(s,e){if(s&&e.degraded)return"anchor-and-path-degraded";if(s)return"no-semantic-anchor";if(e.degraded)return e.degradationReason}function hy(s,e,t,r){const i={tag:"html",semantics:t.extract(s),score:1,degraded:!1,nthChild:void 0};return{version:"1.0",anchor:i,path:[],target:i,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 Ic={maxClasses:2,maxAttributes:5,includeText:!0,maxTextLength:50,simplifyTarget:!0,includeConstraints:!0};function ia(s){return s==="id"?101:rt[s]!==void 0?rt[s]:s.startsWith("data-")?rt["data-*"]:s.startsWith("aria-")?rt["aria-*"]:0}function dy(s){return["id","data-testid","data-qa","data-cy","href","text","role"].includes(s)}function fy(s){return!!(/@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/.test(s)||/(\+?\d{1,3}[-.\s]?)?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}/.test(s)||/\d{4}[-\s]?\d{4}[-\s]?\d{4}[-\s]?\d{4}/.test(s))}function py(s,e){const t=R(R({},Ic),e),r=`v${s.version}`,i=Ks(s.anchor,!1,t),n=s.path.length>0?s.path.map(a=>Ks(a,!1,t)).join(" > ")+" > ":"",o=Ks(s.target,!0,t),l=t.includeConstraints?my(s):"";return`${r}: ${i} :: ${n}${o}${l}`}function Ks(s,e=!1,t=Ic){const{tag:r,semantics:i}=s;let n=r;const o=[],l=R({},i.attributes);i.id&&(l.id=i.id),i.role&&!l.role&&(l.role=i.role);const a=Object.entries(l).map(([h,d])=>{const f=ia(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"&&xc.has(h.name)||Ec.has(h.name)&&Mc(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}="${Ui(d)}"`);if(t.includeText&&i.text&&!fy(i.text.normalized)){const h=i.text.normalized;h.length>0&&h.length<=t.maxTextLength&&o.push(`text="${Ui(h)}"`)}let u=o;if(o.length>0&&(e&&t.simplifyTarget&&i.id&&(u=o.filter(h=>{const d=h.split("=")[0];return ia(d)>=60||d==="text"||d==="id"||d==="role"})),u.length>0&&u.sort((h,d)=>h.localeCompare(d))),i.classes&&i.classes.length>0){const h=Pg(i.classes),d=!!i.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 s&&s.nthChild){const h=!!i.id||i.attributes&&Object.keys(i.attributes).some(dy);e&&t.simplifyTarget&&h||(n+=`#${s.nthChild}`)}return n}function my(s){if(!s.constraints||s.constraints.length===0)return"";const e=[];for(const t of s.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 r=Ui(String(t.params.reference));e.push(`text="${r}"`)}break}return e.length===0?"":` {${e.join(",")}}`}function Ui(s){return s.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/>/g,"\\>").replace(/:/g,"\\:")}function gy(s,e,t){const r=ly(s,e);return r?py(r,t):null}const jt={maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:0,fallbackToBody:!0};function yy(s){var e,t,r,i;return s===!1?null:s===!0||s===void 0?R({},jt):{maxPathDepth:(e=s.maxPathDepth)!=null?e:jt.maxPathDepth,enableSvgFingerprint:(t=s.enableSvgFingerprint)!=null?t:jt.enableSvgFingerprint,confidenceThreshold:(r=s.confidenceThreshold)!=null?r:jt.confidenceThreshold,fallbackToBody:(i=s.fallbackToBody)!=null?i:jt.fallbackToBody}}function na(s,e,t,r){const i=e.getMeta(s),n=i==null?void 0:i.selector;if(n&&!(r!=null&&r.force))return n;const o=s.nodeType===Node.ELEMENT_NODE?s:Os(s);if(!o)return n;const l=e.getMeta(o),a=l==null?void 0:l.selector;if(a&&!(r!=null&&r.force))return a;if(!t)return a!=null?a:n;const c={maxPathDepth:t.maxPathDepth,enableSvgFingerprint:t.enableSvgFingerprint,fallbackToBody:t.fallbackToBody};try{const u=gy(o,c);if(u)return l?l.selector=u:i&&(i.selector=u),u}catch(u){}return a!=null?a:n}function oa(s){return"__ln"in s}class by{constructor(){v(this,"length",0),v(this,"head",null),v(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)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&&oa(e.previousSibling)){const r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&oa(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;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 aa=(s,e)=>`${s}@${e}`,vy=new Set(["id","class","name","role","title","alt","placeholder","for","type"]);function wy(s){const e=s.toLowerCase();return vy.has(e)||e.startsWith("data-")||e.startsWith("aria-")}class Sy{constructor(){v(this,"frozen",!1),v(this,"locked",!1),v(this,"texts",[]),v(this,"attributes",[]),v(this,"attributeMap",new WeakMap),v(this,"removes",[]),v(this,"mapRemoves",[]),v(this,"movedMap",{}),v(this,"addedSet",new Set),v(this,"movedSet",new Set),v(this,"droppedSet",new Set),v(this,"removesSubTreeCache",new Set),v(this,"mutationCb"),v(this,"blockClass"),v(this,"blockSelector"),v(this,"maskTextClass"),v(this,"maskTextSelector"),v(this,"excludeAttribute"),v(this,"inlineStylesheet"),v(this,"maskInputOptions"),v(this,"maskTextFn"),v(this,"maskInputFn"),v(this,"keepIframeSrcFn"),v(this,"recordCanvas"),v(this,"inlineImages"),v(this,"slimDOMOptions"),v(this,"dataURLOptions"),v(this,"selectorOptions",null),v(this,"doc"),v(this,"mirror"),v(this,"iframeManager"),v(this,"stylesheetManager"),v(this,"shadowDomManager"),v(this,"canvasManager"),v(this,"processedNodeManager"),v(this,"unattachedDoc"),v(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),v(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new by,i=a=>{let c=a,u=rr;for(;u===rr;)c=c&&c.nextSibling,u=c&&this.mirror.getId(c);return u},n=a=>{const c=V.parentNode(a);if(!c||!Bn(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=qt(c)?this.mirror.getId(zn(a)):this.mirror.getId(c),d=i(a);if(h===-1||d===-1)return r.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=>{At(m,this.mirror)&&this.iframeManager.addIframe(m),Ln(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),tt(a)&&this.shadowDomManager.addShadowRoot(V.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)la(this.removesSubTreeCache,a,this.mirror)&&!this.movedSet.has(V.parentNode(a))||n(a);for(const a of this.addedSet)!ca(this.droppedSet,a)&&!la(this.removesSubTreeCache,a,this.mirror)||ca(this.movedSet,a)?n(a):this.droppedSet.add(a);let o=null;for(;r.length;){let a=null;if(o){const c=this.mirror.getId(V.parentNode(o.value)),u=i(o.value);c!==-1&&u!==-1&&(a=o)}if(!a){let c=r.tail;for(;c;){const u=c;if(c=c.previous,u){const h=this.mirror.getId(V.parentNode(u.value));if(i(u.value)===-1)continue;if(h!==-1){a=u;break}else{const f=u.value,m=V.parentNode(f);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const y=V.host(m);if(this.mirror.getId(y)!==-1){a=u;break}}}}}}if(!a){for(;r.head;)r.removeNode(r.head.value);break}o=a.previous,r.removeNode(a.value),n(a.value)}const l={texts:this.texts.map(a=>{const c=a.node,u=V.parentNode(c);return u&&u.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(u),{id:this.mirror.getId(c),value:a.value,selector:na(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:na(a.node,this.mirror,this.selectorOptions,{force:Object.keys(c).some(wy)})}}).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))}),v(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 r=Array.from(V.childNodes(e),i=>V.textContent(i)||"").join("");t.attributes.value=es({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:ts(e),value:r,maskInputFn:this.maskInputFn})}),v(this,"processMutation",e=>{if(!Kr(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=V.textContent(e.target);!me(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:Wa(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Os(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,i=e.target.getAttribute(r);const o=t[r],l=typeof o=="boolean",a=document.contains(t),c=en(t),u=li(r,this.excludeAttribute);if(i===null&&!t.hasAttribute(r)&&e.oldValue!==null&&(o===""||o===null||typeof o=="undefined")){console.debug(`[${pe()}] [rrweb:record/mutation] \u26D4 phantom attribute mutation ignored`,{node:V.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:i,oldValue:e.oldValue,excludeAttribute:this.excludeAttribute,propValue:o,isBooleanAttr:l,inDOM:a,isVisible:c,isExcludeAttributeName:u});return}if(li(r,this.excludeAttribute)){console.debug(`[${pe()}] [rrweb:record/mutation] \u26D4 excluded attribute mutation ignored`,{node:V.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:i,oldValue:e.oldValue,excludeAttribute:this.excludeAttribute,propValue:o,isBooleanAttr:l,inDOM:a,isVisible:c,isExcludeAttributeName:u});return}if(r==="value"){const f=ts(t);i=es({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:f,value:i,maskInputFn:this.maskInputFn})}if(me(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let d=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(d||(d={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(d),this.attributeMap.set(e.target,d)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!Ba(t.tagName,r))if(d.attributes[r]=za(this.doc,it(t.tagName),it(r),i),r!=="class"&&(e.oldValue===null||i===""||i!==e.oldValue)&&console.debug(`[${pe()}] [rrweb:record/mutation] \u26A0\uFE0F suspicious attribute mutation`,{reason:[i===e.oldValue?"no change in value":null,i===o?"mirrored in DOM property":null,i===d.attributes[r]?"redundant assignment":null].filter(Boolean).join(", ")||"uncategorized",node:V.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:i,oldValue:e.oldValue,transformedValue:d.attributes[r],excludeAttribute:this.excludeAttribute,propValue:o,isBooleanAttr:l,inDOM:a,isVisible:c,isExcludeAttributeName:u}),r==="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 r==="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(me(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 r=this.mirror.getId(t),i=qt(e.target)?this.mirror.getId(V.host(e.target)):this.mirror.getId(e.target);me(e.target,this.blockClass,this.blockSelector,!1)||Kr(t,this.mirror,this.slimDOMOptions)||!bc(t,this.mirror)||(this.addedSet.has(t)?(Vi(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||$n(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[aa(r,i)]?Vi(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:qt(e.target)&&Kt(e.target)?!0:void 0}),Cy(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),v(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Kr(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&r!==-1&&(this.movedMap[aa(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);me(e,this.blockClass,this.blockSelector,!1)||(V.childNodes(e).forEach(r=>this.genAdds(r)),tt(e)&&V.childNodes(V.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,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 Vi(s,e){s.delete(e),V.childNodes(e).forEach(t=>Vi(s,t))}function Cy(s,e){const t=[s];for(;t.length;){const r=t.pop();e.has(r)||(e.add(r),V.childNodes(r).forEach(i=>t.push(i)))}}function la(s,e,t){return s.size===0?!1:xy(s,e)}function xy(s,e,t){const r=V.parentNode(e);return r?s.has(r):!1}function ca(s,e){return s.size===0?!1:Nc(s,e)}function Nc(s,e){const t=V.parentNode(e);return t?s.has(t)?!0:Nc(s,t):!1}let er;function Ey(s){er=s}function My(){er=void 0}const G=s=>er?(...t)=>{try{return s(...t)}catch(r){if(er&&er(r)===!0)return;throw r}}:s,_e=[];function _t(s){try{if("composedPath"in s){const e=s.composedPath();if(e.length)return e[0]}else if("path"in s&&s.path.length)return s.path[0]}catch(e){}return s&&s.target}function Rc(s,e){const t=new Sy;_e.push(t),t.init(s);const r=new(yc())(G(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function Ay({mousemoveCb:s,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};const i=typeof e.mousemove=="number"?e.mousemove:50,n=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let o=[],l;const a=kt(G(h=>{const d=Date.now()-l;s(o.map(f=>(f.timeOffset-=d,f)),h),o=[],l=null}),n),c=G(kt(G(h=>{const d=_t(h),{clientX:f,clientY:m}=ps(h)?h.changedTouches[0]:h;l||(l=pe()),o.push({x:f,y:m,id:r.getId(d),timeOffset:pe()-l}),a(typeof DragEvent!="undefined"&&h instanceof DragEvent?A.Drag:h instanceof MouseEvent?A.MouseMove:A.TouchMove)}),i,{trailing:!1})),u=[ue("mousemove",c,t),ue("touchmove",c,t),ue("drag",c,t)];return G(()=>{u.forEach(h=>h())})}function Iy({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,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=_t(h);if(me(d,r,i,!0))return;let f=null,m=u;if("pointerType"in h){switch(h.pointerType){case"mouse":f=Ue.Mouse;break;case"touch":f=Ue.Touch;break;case"pen":f=Ue.Pen;break}f===Ue.Touch?Z[u]===Z.MouseDown?m="TouchStart":Z[u]===Z.MouseUp&&(m="TouchEnd"):Ue.Pen}else ps(h)&&(f=Ue.Touch);f!==null?(a=f,(m.startsWith("Touch")&&f===Ue.Touch||m.startsWith("Mouse")&&f===Ue.Mouse)&&(f=null)):Z[u]===Z.Click&&(f=a,a=null);const y=ps(h)?h.changedTouches[0]:h;if(!y)return;const p=t.getId(d),{clientX:g,clientY:w}=y;G(s)(R({type:Z[m],id:p,x:g,y:w},f!==null&&{pointerType:f}))};return Object.keys(Z).filter(u=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&o[u]!==!1).forEach(u=>{let h=it(u);const d=c(u);if(window.PointerEvent)switch(Z[u]){case Z.MouseDown:case Z.MouseUp:h=h.replace("mouse","pointer");break;case Z.TouchStart:case Z.TouchEnd:return}l.push(ue(h,d,e))}),G(()=>{l.forEach(u=>u())})}function Tc({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){const o=G(kt(G(l=>{const a=_t(l);if(!a||me(a,r,i,!0))return;const c=t.getId(a);if(a===e&&e.defaultView){const u=Tn(e.defaultView);s({id:c,x:u.left,y:u.top})}else s({id:c,x:a.scrollLeft,y:a.scrollTop})}),n.scroll||100));return ue("scroll",o,e)}function Ny({viewportResizeCb:s},{win:e}){let t=-1,r=-1;const i=G(kt(G(()=>{const n=On(),o=Dn();(t!==n||r!==o)&&(s({width:Number(o),height:Number(n)}),t=n,r=o)}),200));return ue("resize",i,e)}function Ry({navigationCb:s,doc:e,sampling:t}){if(t.navigation===!1)return()=>{};const r=e.defaultView;if(!r)return()=>{};let i=r.location.href;const n=[],o=G(c=>{const u=r.location.href;u!==i&&(s({href:u,oldHref:i,navigationType:c}),i=u)}),l=je(r.history,"pushState",function(c){return function(...u){const h=c.apply(this,u);return o("pushState"),h}});n.push(l);const a=je(r.history,"replaceState",function(c){return function(...u){const h=c.apply(this,u);return o("replaceState"),h}});return n.push(a),n.push(ue("popstate",()=>o("popstate"),r)),n.push(ue("hashchange",()=>o("hashchange"),r)),G(()=>{n.forEach(c=>c())})}const Qs=["INPUT","TEXTAREA","SELECT"],ua=new WeakMap,Ty=["Enter","Tab","Escape","ArrowDown","ArrowUp","Delete"],ha=new WeakMap;function Oy({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:n,ignoreSelector:o,maskInputOptions:l,maskInputFn:a,sampling:c,userTriggeredOnInput:u}){function h(S){let b=_t(S);const C=S.isTrusted,x=b&&b.tagName;if(b&&x==="OPTION"&&(b=V.parentElement(b)),!b||!x||Qs.indexOf(x)<0||me(b,r,i,!0)||b.classList.contains(n)||o&&b.matches(o))return;let M=b.value,E=!1;const k=ts(b)||"";k==="radio"||k==="checkbox"?E=b.checked:(l[x.toLowerCase()]||l[k])&&(M=es({element:b,maskInputOptions:l,tagName:x,type:k,value:M,maskInputFn:a})),d(b,u?{text:M,isChecked:E,userTriggered:C}:{text:M,isChecked:E});const _=b.name;k==="radio"&&_&&E&&e.querySelectorAll(`input[type="radio"][name="${_}"]`).forEach(L=>{if(L!==b){const $=L.value;d(L,u?{text:$,isChecked:!E,userTriggered:!1}:{text:$,isChecked:!E})}})}function d(S,b){const C=ua.get(S),x=S,M=x.hasAttribute("placeholder"),E=x.value==="",k=typeof x.defaultValue=="string"?x.defaultValue==="":!0,_=!b.userTriggered,L=!C||C.text==="",$=M&&E&&k&&L&&_&&!b.isChecked&&x.type!=="hidden"&&Qs.includes(x.tagName),B=x.tagName==="INPUT"&&x.type==="text"&&!b.userTriggered&&b.text===x.defaultValue&&!C&&x.hasAttribute("placeholder"),W=!b.userTriggered&&x.value===x.defaultValue&&!C&&x.hasAttribute("placeholder")&&!b.isChecked&&x.type!=="hidden"&&Qs.includes(x.tagName),N=x.type==="checkbox"&&!b.userTriggered&&!b.isChecked&&!C,T=x.type==="radio"&&!b.userTriggered&&!b.isChecked&&!C;if($||B||W||N||T){console.debug(`[${pe()}] [rrweb:record/observer] \u26D4 phantom input ignored`,{node:V.describeNode(x),tag:x.tagName,nodeType:x.nodeType,attribute:x.attributes,value:x.value,isLikelyPhantom:$,isRenderDrivenTextInput:B,isValueFromDefault:W,isPhantomCheckbox:N,isPhantomRadio:T});return}if(!C||C.text!==b.text||C.isChecked!==b.isChecked){ua.set(S,b);const D=t.getId(S);G(s)(oe(R({},b),{id:D}))}}const m=(c.input==="last"?["change"]:["input","change"]).map(S=>ue(S,G(h),e)),y=S=>{const b=_t(S);if(!b||!b.tagName)return;if(c.input==="all"){h(S);return}const C=b.tagName,x=S.key,M=Ty.includes(x),E=C==="TEXTAREA",k=e.activeElement===b,_=b.value,L=ha.get(b);if(ha.set(b,_),!k){h(S);return}if(M){if(!E){h(S);return}let $=L!=null?L:"",B=0;const W=2,N=()=>{const T=b.value,D=e.activeElement===b,U=T!==$;if(!D){h(S);return}if(U)B=0,$=T;else if(B++,B>=W){h(S);return}requestAnimationFrame(N)};requestAnimationFrame(N);return}};m.push(ue("keydown",G(y),e));const p=e.defaultView;if(!p)return()=>{m.forEach(S=>S())};const g=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),w=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&m.push(...w.map(S=>br(S[0],S[1],{set(){G(h)({target:this,isTrusted:!1})}},!1,p))),G(()=>{m.forEach(S=>S())})}function ms(s){const e=[];function t(r,i){if(Hr("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Hr("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Hr("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Hr("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const o=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(o)}else if(r.parentStyleSheet){const o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(o)}return i}return t(s,e)}function Ke(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function Dy({styleSheetRuleCb:s,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:G((u,h,d)=>{const[f,m]=d,{id:y,styleId:p}=Ke(h,e,t.styleMirror);return(y&&y!==-1||p&&p!==-1)&&s({id:y,styleId:p,adds:[{rule:f,index:m}]}),u.apply(h,d)})}),r.CSSStyleSheet.prototype.addRule=function(u,h,d=this.cssRules.length){const f=`${u} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[f,d])};const n=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:G((u,h,d)=>{const[f]=d,{id:m,styleId:y}=Ke(h,e,t.styleMirror);return(m&&m!==-1||y&&y!==-1)&&s({id:m,styleId:y,removes:[{index:f}]}),u.apply(h,d)})}),r.CSSStyleSheet.prototype.removeRule=function(u){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[u])};let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:G((u,h,d)=>{const[f]=d,{id:m,styleId:y}=Ke(h,e,t.styleMirror);return(m&&m!==-1||y&&y!==-1)&&s({id:m,styleId:y,replace:f}),u.apply(h,d)})}));let l;r.CSSStyleSheet.prototype.replaceSync&&(l=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:G((u,h,d)=>{const[f]=d,{id:m,styleId:y}=Ke(h,e,t.styleMirror);return(m&&m!==-1||y&&y!==-1)&&s({id:m,styleId:y,replaceSync:f}),u.apply(h,d)})}));const a={};Gr("CSSGroupingRule")?a.CSSGroupingRule=r.CSSGroupingRule:(Gr("CSSMediaRule")&&(a.CSSMediaRule=r.CSSMediaRule),Gr("CSSConditionRule")&&(a.CSSConditionRule=r.CSSConditionRule),Gr("CSSSupportsRule")&&(a.CSSSupportsRule=r.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:G((d,f,m)=>{const[y,p]=m,{id:g,styleId:w}=Ke(f.parentStyleSheet,e,t.styleMirror);return(g&&g!==-1||w&&w!==-1)&&s({id:g,styleId:w,adds:[{rule:y,index:[...ms(f),p||0]}]}),d.apply(f,m)})}),h.prototype.deleteRule=new Proxy(c[u].deleteRule,{apply:G((d,f,m)=>{const[y]=m,{id:p,styleId:g}=Ke(f.parentStyleSheet,e,t.styleMirror);return(p&&p!==-1||g&&g!==-1)&&s({id:p,styleId:g,removes:[{index:[...ms(f),y]}]}),d.apply(f,m)})})}),G(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=n,o&&(r.CSSStyleSheet.prototype.replace=o),l&&(r.CSSStyleSheet.prototype.replaceSync=l),Object.entries(a).forEach(([u,h])=>{h.prototype.insertRule=c[u].insertRule,h.prototype.deleteRule=c[u].deleteRule})})}function Oc({mirror:s,stylesheetManager:e},t){var r,i,n;let o=null;t.nodeName==="#document"?o=s.getId(t):o=s.getId(V.host(t));const l=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(n=(i=t.ownerDocument)==null?void 0:i.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}}),G(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function $y({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){const n=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:G((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}=Ke((u=a.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return(m&&m!==-1||y&&y!==-1)&&s({id:m,styleId:y,set:{property:h,value:d,priority:f},index:ms(a.parentRule)}),l.apply(a,c)})});const o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:G((l,a,c)=>{var u;const[h]=c;if(t.has(h))return o.apply(a,[h]);const{id:d,styleId:f}=Ke((u=a.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return(d&&d!==-1||f&&f!==-1)&&s({id:d,styleId:f,remove:{property:h},index:ms(a.parentRule)}),l.apply(a,c)})}),G(()=>{i.CSSStyleDeclaration.prototype.setProperty=n,i.CSSStyleDeclaration.prototype.removeProperty=o})}function ky({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:n}){const o=G(a=>kt(G(c=>{const u=_t(c);if(!u||me(u,e,t,!0))return;const{currentTime:h,volume:d,muted:f,playbackRate:m,loop:y}=u;s({type:a,id:r.getId(u),currentTime:h,volume:d,muted:f,playbackRate:m,loop:y})}),i.media||500)),l=[ue("play",o(Qe.Play),n),ue("pause",o(Qe.Pause),n),ue("seeked",o(Qe.Seeked),n),ue("volumechange",o(Qe.VolumeChange),n),ue("ratechange",o(Qe.RateChange),n)];return G(()=>{l.forEach(a=>a())})}function _y({fontCb:s,doc:e}){const t=e.defaultView;if(!t)return()=>{};const r=[],i=new WeakMap,n=t.FontFace;t.FontFace=function(a,c,u){const h=new n(a,c,u);return i.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=je(e.fonts,"add",function(l){return function(a){return setTimeout(G(()=>{const c=i.get(a);c&&(s(c),i.delete(a))}),0),l.apply(this,[a])}});return r.push(()=>{t.FontFace=n}),r.push(o),G(()=>{r.forEach(l=>l())})}function Ly(s){const{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:n}=s;let o=!0;const l=G(()=>{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;me(f,r,i,!0)||me(y,r,i,!0)||c.push({start:t.getId(f),startOffset:m,end:t.getId(y),endOffset:p})}n({ranges:c})});return l(),ue("selectionchange",l)}function Py({doc:s,customElementCb:e}){const t=s.defaultView;return!t||!t.customElements?()=>{}:je(t.customElements,"define",function(i){return function(n,o,l){try{e({define:{name:n}})}catch(a){console.warn(`Custom element callback failed for ${n}`)}return i.apply(this,[n,o,l])}})}function Fy(s,e){const{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:n,viewportResizeCb:o,navigationCb:l,inputCb:a,mediaInteractionCb:c,styleSheetRuleCb:u,styleDeclarationCb:h,canvasMutationCb:d,fontCb:f,selectionCb:m,customElementCb:y}=s;s.mutationCb=(...p)=>{e.mutation&&e.mutation(...p),t(...p)},s.mousemoveCb=(...p)=>{e.mousemove&&e.mousemove(...p),r(...p)},s.mouseInteractionCb=(...p)=>{e.mouseInteraction&&e.mouseInteraction(...p),i(...p)},s.scrollCb=(...p)=>{e.scroll&&e.scroll(...p),n(...p)},s.viewportResizeCb=(...p)=>{e.viewportResize&&e.viewportResize(...p),o(...p)},s.navigationCb=(...p)=>{e.navigation&&e.navigation(...p),l(...p)},s.inputCb=(...p)=>{e.input&&e.input(...p),a(...p)},s.mediaInteractionCb=(...p)=>{e.mediaInteaction&&e.mediaInteaction(...p),c(...p)},s.styleSheetRuleCb=(...p)=>{e.styleSheetRule&&e.styleSheetRule(...p),u(...p)},s.styleDeclarationCb=(...p)=>{e.styleDeclaration&&e.styleDeclaration(...p),h(...p)},s.canvasMutationCb=(...p)=>{e.canvasMutation&&e.canvasMutation(...p),d(...p)},s.fontCb=(...p)=>{e.font&&e.font(...p),f(...p)},s.selectionCb=(...p)=>{e.selection&&e.selection(...p),m(...p)},s.customElementCb=(...p)=>{e.customElement&&e.customElement(...p),y(...p)}}function zy(s,e={}){const t=s.doc.defaultView;if(!t)return()=>{};Fy(s,e);let r;s.recordDOM&&(r=Rc(s,s.doc));const i=Ay(s),n=Iy(s),o=Tc(s),l=Ny(s,{win:t}),a=Ry(s),c=Oy(s),u=ky(s);let h=()=>{},d=()=>{},f=()=>{},m=()=>{};s.recordDOM&&(h=Dy(s,{win:t}),d=Oc(s,s.doc),f=$y(s,{win:t}),s.collectFonts&&(m=_y(s)));const y=Ly(s),p=Py(s),g=[];for(const w of s.plugins)g.push(w.observer(w.callback,t,w.options));return G(()=>{var w;_e.forEach(S=>S.reset()),(w=s.visibilityManager)==null||w.reset(),r==null||r.disconnect(),i(),n(),o(),l(),a(),c(),u(),h(),d(),f(),m(),y(),p(),g.forEach(S=>S())})}function Hr(s){return typeof window[s]!="undefined"}function Gr(s){return!!(typeof window[s]!="undefined"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}class da{constructor(e){v(this,"iframeIdToRemoteIdMap",new WeakMap),v(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){const n=r||this.getIdToRemoteIdMap(e),o=i||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 r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(n=>this.getId(e,n,r,i))}getRemoteId(e,t,r){const i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const n=i.get(t);return n||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map(i=>this.getRemoteId(e,i,r))}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 By{constructor(e){v(this,"iframes",new WeakMap),v(this,"crossOriginIframeMap",new WeakMap),v(this,"crossOriginIframeMirror",new da(Fa)),v(this,"crossOriginIframeStyleMirror"),v(this,"crossOriginIframeRootIdMap",new WeakMap),v(this,"mirror"),v(this,"mutationCb"),v(this,"wrappedEmit"),v(this,"loadListener"),v(this,"stylesheetManager"),v(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new da(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 r,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.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 i=this.crossOriginIframeMap.get(e.source);if(!i)return;const n=this.transformCrossOriginEvent(i,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case O.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:O.IncrementalSnapshot,data:{source:A.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case O.Meta:case O.Load:case O.DomContentLoaded:return!1;case O.Plugin:return t;case O.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case O.IncrementalSnapshot:switch(t.data.source){case A.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(i.node,n)}),t.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),t.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),t.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case A.Drag:case A.TouchMove:case A.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case A.ViewportResize:return!1;case A.MediaInteraction:case A.MouseInteraction:case A.Scroll:case A.CanvasMutation:case A.Input:return this.replaceIds(t.data,e,["id"]),t;case A.StyleSheetRule:case A.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case A.Font:return t;case A.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case A.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),t}}return!1}replace(e,t,r,i){for(const n of i)!Array.isArray(t[n])&&typeof t[n]!="number"||(Array.isArray(t[n])?t[n]=e.getIds(r,t[n]):t[n]=e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,t)})}patchRootIdOnNode(e,t){e.type!==Ve.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}class Wy{constructor(e){v(this,"shadowDoms",new WeakSet),v(this,"mutationCb"),v(this,"scrollCb"),v(this,"bypassOptions"),v(this,"mirror"),v(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(!Kt(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Rc(oe(R({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Tc(oe(R({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(V.host(e))),this.restoreHandlers.push(Oc({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 r=this;this.restoreHandlers.push(je(e.prototype,"attachShadow",function(i){return function(n){const o=i.call(this,n),l=V.shadowRoot(this);return l&&Bn(this)&&r.addShadowRoot(l,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Et="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Xt=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var jr=0;jr<Et.length;jr++)Xt[Et.charCodeAt(jr)]=jr;var Uy=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=Et[e[t]>>2],i+=Et[(e[t]&3)<<4|e[t+1]>>4],i+=Et[(e[t+1]&15)<<2|e[t+2]>>6],i+=Et[e[t+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i},Vy=function(s){var e=s.length*.75,t=s.length,r,i=0,n,o,l,a;s[s.length-1]==="="&&(e--,s[s.length-2]==="="&&e--);var c=new ArrayBuffer(e),u=new Uint8Array(c);for(r=0;r<t;r+=4)n=Xt[s.charCodeAt(r)],o=Xt[s.charCodeAt(r+1)],l=Xt[s.charCodeAt(r+2)],a=Xt[s.charCodeAt(r+3)],u[i++]=n<<2|o>>4,u[i++]=(o&15)<<4|l>>2,u[i++]=(l&3)<<6|a&63;return c};const fa=new Map;function Hy(s,e){let t=fa.get(s);return t||(t=new Map,fa.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}const Dc=(s,e,t)=>{if(!s||!(kc(s,e)||typeof s=="object"))return;const r=s.constructor.name,i=Hy(t,r);let n=i.indexOf(s);return n===-1&&(n=i.length,i.push(s)),n};function Qr(s,e,t){if(s instanceof Array)return s.map(r=>Qr(r,e,t));if(s===null)return s;if(s instanceof Float32Array||s instanceof Float64Array||s instanceof Int32Array||s instanceof Uint32Array||s instanceof Uint8Array||s instanceof Uint16Array||s instanceof Int16Array||s instanceof Int8Array||s instanceof Uint8ClampedArray)return{rr_type:s.constructor.name,args:[Object.values(s)]};if(s instanceof ArrayBuffer){const r=s.constructor.name,i=Uy(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[Qr(s.buffer,e,t),s.byteOffset,s.byteLength]};if(s instanceof HTMLImageElement){const r=s.constructor.name,{src:i}=s;return{rr_type:r,src:i}}else if(s instanceof HTMLCanvasElement){const r="HTMLImageElement",i=s.toDataURL();return{rr_type:r,src:i}}else{if(s instanceof ImageData)return{rr_type:s.constructor.name,args:[Qr(s.data,e,t),s.width,s.height]};if(kc(s,e)||typeof s=="object"){const r=s.constructor.name,i=Dc(s,e,t);return{rr_type:r,index:i}}}}return s}const $c=(s,e,t)=>s.map(r=>Qr(r,e,t)),kc=(s,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>s instanceof e[i]);function Gy(s,e,t,r){const i=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const o of n)try{if(typeof e.CanvasRenderingContext2D.prototype[o]!="function")continue;const l=je(e.CanvasRenderingContext2D.prototype,o,function(a){return function(...c){return me(this.canvas,t,r,!0)||setTimeout(()=>{const u=$c(c,e,this);s(this.canvas,{type:Ye["2D"],property:o,args:u})},0),a.apply(this,c)}});i.push(l)}catch(l){const a=br(e.CanvasRenderingContext2D.prototype,o,{set(c){s(this.canvas,{type:Ye["2D"],property:o,args:[c],setter:!0})}});i.push(a)}return()=>{i.forEach(o=>o())}}function jy(s){return s==="experimental-webgl"?"webgl":s}function pa(s,e,t,r){const i=[];try{const n=je(s.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...a){if(!me(this,e,t,!0)){const c=jy(l);if("__context"in this||(this.__context=c),r&&["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])}});i.push(n)}catch(n){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(n=>n())}}function ma(s,e,t,r,i,n){const o=[],l=Object.getOwnPropertyNames(s);for(const a of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if(typeof s[a]!="function")continue;const c=je(s,a,function(u){return function(...h){const d=u.apply(this,h);if(Dc(d,n,this),"tagName"in this.canvas&&!me(this.canvas,r,i,!0)){const f=$c(h,n,this),m={type:e,property:a,args:f};t(this.canvas,m)}return d}});o.push(c)}catch(c){const u=br(s,a,{set(h){t(this.canvas,{type:e,property:a,args:[h],setter:!0})}});o.push(u)}return o}function Yy(s,e,t,r){const i=[];return i.push(...ma(e.WebGLRenderingContext.prototype,Ye.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext!="undefined"&&i.push(...ma(e.WebGL2RenderingContext.prototype,Ye.WebGL2,s,t,r,e)),()=>{i.forEach(n=>n())}}const _c="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Zy=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),ga=typeof self!="undefined"&&self.Blob&&new Blob([Zy(_c)],{type:"text/javascript;charset=utf-8"});function Xy(s){let e;try{if(e=ga&&(self.URL||self.webkitURL).createObjectURL(ga),!e)throw"";const t=new Worker(e,{name:s==null?void 0:s.name});return t.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),t}catch(t){return new Worker("data:text/javascript;base64,"+_c,{name:s==null?void 0:s.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}class Jy{constructor(e){v(this,"pendingCanvasMutations",new Map),v(this,"rafStamps",{latestId:0,invokeId:null}),v(this,"mirror"),v(this,"mutationCb"),v(this,"resetObservers"),v(this,"frozen",!1),v(this,"locked",!1),v(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:r,blockClass:i,blockSelector:n,recordCanvas:o,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&t==="all"&&this.initCanvasMutationObserver(r,i,n),o&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,i,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,r,i,n){const o=pa(t,r,i,!0),l=new Map,a=new Xy;a.onmessage=m=>{const{id:y}=m.data;if(l.set(y,!1),!("base64"in m.data))return;const{base64:p,type:g,width:w,height:S}=m.data;this.mutationCb({id:y,type:Ye["2D"],commands:[{property:"clearRect",args:[0,0,w,S]},{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=>{me(y,r,i,!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 S=y.getContext(y.__context);((p=S==null?void 0:S.getContextAttributes())==null?void 0:p.preserveDrawingBuffer)===!1&&S.clear(S.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(f)};h=requestAnimationFrame(f),this.resetObservers=()=>{o(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=pa(e,t,r,!1),n=Gy(this.processMutation.bind(this),e,t,r),o=Yy(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),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 r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;const i=r.map(o=>{const c=o,{type:l}=c;return gt(c,["type"])}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:i}),this.pendingCanvasMutations.delete(e)}}function ya(s,e,t){var u,h,d,f,m,y;const r=(u=t==null?void 0:t.root)!=null?u:null,i=(h=t==null?void 0:t.threshold)!=null?h:.5,n=(d=t==null?void 0:t.sensitivity)!=null?d:.05,o=qy((f=t==null?void 0:t.rootMargin)!=null?f:"0px"),l=new Map,a=Ky(r),c=Qy(a,o);for(const p of s){const g=p.getBoundingClientRect();let w=rb(),S=0;g.width>0&&g.height>0&&(w=eb(g,c),S=tb(g,w),S=Math.round(S*100)/100);const b=sb(p),C=(m=e.get(p))!=null?m:null,x=(y=C==null?void 0:C.intersectionRatio)!=null?y:0,M=S,E=(C==null?void 0:C.isStyleVisible)&&x>i,k=b&&M>i;!C||E!==k||E!==k&&Math.abs(M-x)>n?l.set(p,{target:p,isVisible:k,isStyleVisible:b,intersectionRatio:M,intersectionRect:w,oldValue:C}):l.set(p,C)}return l}function qy(s){const e=s.trim().split(/\s+/),t=(r,i)=>r.endsWith("%")?parseFloat(r)/100*i:parseFloat(r)||0;return function(r){const i=t(e[0]||"0px",r.height),n=t(e[1]||e[0]||"0px",r.width),o=t(e[2]||e[0]||"0px",r.height),l=t(e[3]||e[1]||e[0]||"0px",r.width);return{top:i,right:n,bottom:o,left:l,width:0,height:0}}}function Ky(s){return s?s.getBoundingClientRect():new DOMRect(0,0,window.innerWidth,window.innerHeight)}function Qy(s,e){const t=e(s);return new DOMRect(s.left-t.left,s.top-t.top,s.width+t.left+t.right,s.height+t.top+t.bottom)}function eb(s,e){const t=Math.max(s.top,e.top),r=Math.max(s.left,e.left),i=Math.min(s.bottom,e.bottom),n=Math.min(s.right,e.right),o=Math.max(0,n-r),l=Math.max(0,i-t);return{top:t,left:r,bottom:i,right:n,width:o,height:l}}function tb(s,e){const t=s.width*s.height,r=e.width*e.height;return t>0?r/t:0}function rb(){return{top:0,left:0,right:0,bottom:0,width:0,height:0}}function sb(s){const e=getComputedStyle(s);return e&&e.display!=="none"&&e.visibility!=="hidden"&&parseFloat(e.opacity||"1")>0}class ib{constructor(e){var c,u,h,d,f,m;v(this,"frozen",!1),v(this,"locked",!1),v(this,"pending",new Map),v(this,"mirror"),v(this,"mutationCb"),v(this,"rafId",null),v(this,"intervalId",null),v(this,"rafThrottle"),v(this,"lastFlushTime",0),v(this,"elements",new Set),v(this,"previousState",new Map),v(this,"root",null),v(this,"threshold"),v(this,"sensitivity"),v(this,"rootMargin"),v(this,"hasInitialized",!1),v(this,"mode","none"),v(this,"debounce",50),v(this,"throttle",100),v(this,"buffer",new Map),v(this,"debounceTimer",null),v(this,"lastThrottleTime",0),v(this,"disabled",!1),v(this,"notifyActivity");const{doc:t,mirror:r,sampling:i,mutationCb:n,notifyActivity:o}=e;if(this.mirror=r,this.mutationCb=n,this.notifyActivity=o,this.rootMargin="0px",i===!1){this.disabled=!0;return}const l=typeof i=="object"&&i!==null?i:{};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(w=>this.observe(w)))}),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=ya(this.elements,this.previousState,{root:this.root,threshold:this.threshold,sensitivity:this.sensitivity,rootMargin:this.rootMargin});for(const[t,r]of e.entries()){const i=this.previousState.get(t);if(!i||i.isVisible!==r.isVisible||Math.abs(i.intersectionRatio-r.intersectionRatio)>this.sensitivity){const o=this.mirror.getId(t);o!==-1&&this.buffer.set(t,{id:o,isVisible:r.isVisible,ratio:r.intersectionRatio}),this.previousState.set(t,r)}}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()),r=t.length;this.buffer.clear(),this.mutationCb({mutations:t}),(e=this.notifyActivity)==null||e.call(this,r)}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=ya(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)}}class nb{constructor(e){v(this,"trackedLinkElements",new WeakSet),v(this,"mutationCb"),v(this,"adoptedStyleSheetCb"),v(this,"styleMirror",new Fn),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;const r={id:t,styleIds:[]},i=[];for(const n of e){let o;this.styleMirror.has(n)?o=this.styleMirror.getId(n):(o=this.styleMirror.add(n),i.push({styleId:o,rules:Array.from(n.rules||CSSRule,(l,a)=>({rule:Oa(l,n.href),index:a}))})),r.styleIds.push(o)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class ob{constructor(){v(this,"nodeMap",new WeakMap),v(this,"active",!1)}inOtherBuffer(e,t){const r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==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 ab="3.1.1-alpha.3";let ie,qe,ei,It=!1;const gs=[];let ht;function lb(s){return new Promise(t=>{const r=()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{t()})})},i=(()=>{let n=!1;return()=>{n||(n=!0,r())}})();["interactive","complete"].includes(s.document.readyState)?i():(s.addEventListener("DOMContentLoaded",i,{once:!0}),s.addEventListener("load",i,{once:!0}),setTimeout(()=>{i()},5e3))})}try{if(Array.from([1],s=>s*2)[0]!==2){const s=document.createElement("iframe");document.body.appendChild(s),Array.from=((Jn=s.contentWindow)==null?void 0:Jn.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}const Me=Da();function Se(s={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,checkoutEveryNvm:i,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:w,hooks:S,packFn:b,sampling:C={},dataURLOptions:x={},mousemoveWait:M,recordDOM:E=!0,recordCanvas:k=!1,recordCrossOriginIframes:_=!1,recordAfter:L=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",flushCustomEvent:$=s.flushCustomEvent!==void 0?s.flushCustomEvent:"after",userTriggeredOnInput:B=!1,collectFonts:W=!1,inlineImages:N=!1,plugins:T,keepIframeSrcFn:D=()=>!1,ignoreCSSAttributes:U=new Set([]),selector:K,errorHandler:ce}=s;Ey(ce);const ee=_?window.parent===window:!0;let fe=!1;if(!ee)try{window.parent.document&&(fe=!1)}catch(P){fe=!0}if(ee&&!e)throw new Error("emit function is required");if(!ee&&!fe)return()=>{};M!==void 0&&C.mousemove===void 0&&(C.mousemove=M),Me.reset();const be=u===void 0?/.^/:u,he=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},le=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||{},lt=yy(K);kn();let Ze,Te=0,pt=0,Pt=0,Fe=!1,Ce=null,Ft=null;const mt=P=>{for(const we of T||[])we.eventProcessor&&(P=we.eventProcessor(P));return b&&!fe&&(P=b(P)),P},vr=()=>{Ce=null,Fe=!1,Ft=null,qe(!0),_e.forEach(P=>{P.resetBuffers(),P.unsetFrozen()}),ve&&ve.unsetFrozen()};ie=(P,we)=>{var se;const ae=P;if(ae.timestamp=pe(),ae.checkoutId=Pt,(se=_e[0])!=null&&se.isFrozen()&&!Fe&&ae.type!==O.FullSnapshot&&!(ae.type===O.IncrementalSnapshot&&ae.data.source===A.Mutation)&&(_e.forEach(xe=>xe.unfreeze()),ve==null||ve.unfreeze()),ee)e==null||e(mt(ae),we);else if(fe){const xe={type:"rrweb",event:mt(ae),isCheckout:we};window.parent.postMessage(xe,"*")}if(ae.type===O.FullSnapshot)Ze=ae,Te=0,pt=0;else if(ae.type===O.IncrementalSnapshot){if(ae.data.source===A.Mutation&&ae.data.isAttachIframe)return;if(ae.data.source!==A.Visibility){Te++;const xe=r&&Te>=r,Xe=t&&ae.timestamp-Ze.timestamp>t;if(xe||Xe)if(n){Fe||(Fe=!0,Ft=pe(),_e.forEach(qc=>qc.freeze()),ve==null||ve.freeze()),Ce&&clearTimeout(Ce);const X=pe()-Ft,zt=n*3;X>=zt?vr():Ce=setTimeout(()=>vr(),n)}else qe(!0)}}};const wr=P=>{ie({type:O.IncrementalSnapshot,data:R({source:A.Mutation},P)})},Zc=P=>{ie({type:O.IncrementalSnapshot,data:R({source:A.Visibility},P)})},Gn=P=>ie({type:O.IncrementalSnapshot,data:R({source:A.Scroll},P)}),jn=P=>ie({type:O.IncrementalSnapshot,data:R({source:A.CanvasMutation},P)}),Xc=P=>ie({type:O.IncrementalSnapshot,data:R({source:A.AdoptedStyleSheet},P)}),ct=new nb({mutationCb:wr,adoptedStyleSheetCb:Xc}),ut=new By({mirror:Me,mutationCb:wr,stylesheetManager:ct,recordCrossOriginIframes:_,wrappedEmit:ie});for(const P of T||[])P.getMirror&&P.getMirror({nodeMirror:Me,crossOriginIframeMirror:ut.crossOriginIframeMirror,crossOriginIframeStyleMirror:ut.crossOriginIframeStyleMirror});const ks=new ob;ei=new Jy({recordCanvas:k,mutationCb:jn,win:window,blockClass:o,blockSelector:l,mirror:Me,sampling:C.canvas,dataURLOptions:x});const Sr=new Wy({mutationCb:wr,scrollCb:Gn,bypassOptions:{blockClass:o,blockSelector:l,maskTextClass:h,maskTextSelector:d,excludeAttribute:be,inlineStylesheet:f,maskInputOptions:he,dataURLOptions:x,maskTextFn:w,maskInputFn:g,recordCanvas:k,inlineImages:N,sampling:C,slimDOMOptions:le,iframeManager:ut,stylesheetManager:ct,canvasManager:ei,keepIframeSrcFn:D,processedNodeManager:ks,selectorOptions:lt},mirror:Me}),Jc=E&&(i!=null||(C==null?void 0:C.visibility)!==void 0&&(C==null?void 0:C.visibility)!==!1);let ve;if(Jc){const P=typeof(C==null?void 0:C.visibility)=="object"&&(C==null?void 0:C.visibility)!==null?C.visibility:{},we=P.recordVisibility===!0;ve=new ib({doc:document,mirror:Me,sampling:P,mutationCb:we?Zc:()=>{},notifyActivity:i!=null?se=>{if(pt+=se,pt>=i)if(pt=0,n){Fe||(Fe=!0,Ft=pe(),_e.forEach(Xe=>Xe.freeze()),ve==null||ve.freeze()),Ce&&clearTimeout(Ce);const ae=pe()-Ft,xe=n*3;ae>=xe?vr():Ce=setTimeout(()=>vr(),n)}else qe(!0)}:void 0})}qe=(P=!1)=>{if(!E)return;Pt++,ie({type:O.Meta,data:{href:window.location.href,width:Dn(),height:On()}},P),ct.reset(),Sr.init(),_e.forEach(se=>se.lock()),ve==null||ve.lock();const we=Gh(document,{mirror:Me,blockClass:o,blockSelector:l,maskTextClass:h,maskTextSelector:d,excludeAttribute:be,inlineStylesheet:f,maskAllInputs:he,maskTextFn:w,maskInputFn:g,slimDOM:le,dataURLOptions:x,recordCanvas:k,inlineImages:N,onSerialize:se=>{At(se,Me)&&ut.addIframe(se),Ln(se,Me)&&ct.trackLinkElement(se),tt(se)&&Sr.addShadowRoot(V.shadowRoot(se),document)},onIframeLoad:(se,ae)=>{ut.attachIframe(se,ae),Sr.observeAttachShadow(se)},onStylesheetLoad:(se,ae)=>{ct.attachLinkElement(se,ae)},keepIframeSrcFn:D,selector:K});if(!we)return console.warn("Failed to snapshot the document");ie({type:O.FullSnapshot,data:{node:we,initialOffset:Tn(window)}},P),_e.forEach(se=>se.unlock()),ve==null||ve.unlock(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ct.adoptStyleSheets(document.adoptedStyleSheets,Me.getId(document))},ht=()=>{for(const P of gs)ie(P);gs.length=0};try{const P=[],we=xe=>{var Xe;return G(zy)({mutationCb:wr,mousemoveCb:(X,zt)=>ie({type:O.IncrementalSnapshot,data:{source:zt,positions:X}}),mouseInteractionCb:X=>ie({type:O.IncrementalSnapshot,data:R({source:A.MouseInteraction},X)}),scrollCb:Gn,viewportResizeCb:X=>ie({type:O.IncrementalSnapshot,data:R({source:A.ViewportResize},X)}),navigationCb:X=>{console.debug(`[${pe()}] [rrweb:record/navigation] \u{1F9ED} Navigation detected:`,X.navigationType,X.oldHref,"\u2192",X.href),qe(!0)},inputCb:X=>ie({type:O.IncrementalSnapshot,data:R({source:A.Input},X)}),mediaInteractionCb:X=>ie({type:O.IncrementalSnapshot,data:R({source:A.MediaInteraction},X)}),styleSheetRuleCb:X=>ie({type:O.IncrementalSnapshot,data:R({source:A.StyleSheetRule},X)}),styleDeclarationCb:X=>ie({type:O.IncrementalSnapshot,data:R({source:A.StyleDeclaration},X)}),canvasMutationCb:jn,visibilityManager:ve,fontCb:X=>ie({type:O.IncrementalSnapshot,data:R({source:A.Font},X)}),selectionCb:X=>{ie({type:O.IncrementalSnapshot,data:R({source:A.Selection},X)})},customElementCb:X=>{ie({type:O.IncrementalSnapshot,data:R({source:A.CustomElement},X)})},blockClass:o,ignoreClass:a,ignoreSelector:c,maskTextClass:h,maskTextSelector:d,excludeAttribute:be,maskInputOptions:he,inlineStylesheet:f,sampling:C,recordDOM:E,recordCanvas:k,inlineImages:N,userTriggeredOnInput:B,collectFonts:W,doc:xe,maskInputFn:g,maskTextFn:w,keepIframeSrcFn:D,blockSelector:l,slimDOMOptions:le,dataURLOptions:x,selectorOptions:lt,mirror:Me,iframeManager:ut,stylesheetManager:ct,shadowDomManager:Sr,processedNodeManager:ks,canvasManager:ei,ignoreCSSAttributes:U,plugins:((Xe=T==null?void 0:T.filter(X=>X.observer))==null?void 0:Xe.map(X=>({observer:X.observer,options:X.options,callback:zt=>ie({type:O.Plugin,data:{plugin:X.name,payload:zt}})})))||[]},S)};ut.addLoadListener(xe=>{try{P.push(we(xe.contentDocument))}catch(Xe){console.warn(Xe)}});const se=()=>{$==="before"&&ht(),qe(),P.push(we(document)),It=!0,$==="after"&&ht()},ae=async()=>{$==="before"&&ht(),L==="DOMContentStabilized"&&(console.debug(`[${pe()}] [rrweb:record] \u{1F7E2} Waiting for DOM stabilization...`),await lb(window),console.debug(`[${pe()}] [rrweb:record] \u2705 DOM stabilized, starting recording`)),console.debug(`[${pe()}] [rrweb:record] \u2705 Init dom and takeFullSnapshot `),qe(),P.push(we(document)),It=!0,$==="after"&&ht()};return document.readyState==="interactive"||document.readyState==="complete"?se():(P.push(ue("DOMContentLoaded",()=>{ie({type:O.DomContentLoaded,data:{}}),L==="DOMContentLoaded"&&se()})),P.push(ue("load",()=>{ie({type:O.Load,data:{}}),L==="load"&&se()},window))),()=>{Ce&&(clearTimeout(Ce),Ce=null),ht(),P.forEach(xe=>xe()),ks.destroy(),It=!1,My()}}catch(P){console.warn(P)}}Se.getVersion=()=>ab;Se.isRecording=()=>It;Se.flushCustomEventQueue=()=>{console.warn(`[rrweb] CustomEvent flushing: ${gs.length} events`),ht()};Se.addCustomEvent=(s,e)=>{const t={type:O.Custom,data:{tag:s,payload:e}};if(!It){console.warn(`[rrweb] CustomEvent buffered before/after recording start: ${s}`),gs.push(t);return}ie(t)};Se.freezePage=()=>{_e.forEach(s=>s.freeze())};Se.takeFullSnapshot=s=>{if(!It)throw new Error("please take full snapshot after start recording");qe(s)};Se.mirror=Me;function Lc(s){return{all:s=s||new Map,on:function(e,t){var r=s.get(e);r?r.push(t):s.set(e,[t])},off:function(e,t){var r=s.get(e);r&&(t?r.splice(r.indexOf(t)>>>0,1):s.set(e,[]))},emit:function(e,t){var r=s.get(e);r&&r.slice().map(function(i){i(t)}),(r=s.get("*"))&&r.slice().map(function(i){i(e,t)})}}}const cb=Object.freeze(Object.defineProperty({__proto__:null,default:Lc},Symbol.toStringTag,{value:"Module"}));function ub(s=window,e=document){if("scrollBehavior"in e.documentElement.style&&s.__forceSmoothScrollPolyfill__!==!0)return;const t=s.HTMLElement||s.Element,r=468,i={scroll:s.scroll||s.scrollTo,scrollBy:s.scrollBy,elementScroll:t.prototype.scroll||a,scrollIntoView:t.prototype.scrollIntoView},n=s.performance&&s.performance.now?s.performance.now.bind(s.performance):Date.now;function o(g){const w=["MSIE ","Trident/","Edge/"];return new RegExp(w.join("|")).test(g)}const l=o(s.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 S=s.getComputedStyle(g,null)["overflow"+w];return S==="auto"||S==="scroll"}function f(g){const w=h(g,"Y")&&d(g,"Y"),S=h(g,"X")&&d(g,"X");return w||S}function m(g){for(;g!==e.body&&f(g)===!1;)g=g.parentNode||g.host;return g}function y(g){const w=n();let S,b,C,x=(w-g.startTime)/r;x=x>1?1:x,S=c(x),b=g.startX+(g.x-g.startX)*S,C=g.startY+(g.y-g.startY)*S,g.method.call(g.scrollable,b,C),(b!==g.x||C!==g.y)&&s.requestAnimationFrame(y.bind(s,g))}function p(g,w,S){let b,C,x,M;const E=n();g===e.body?(b=s,C=s.scrollX||s.pageXOffset,x=s.scrollY||s.pageYOffset,M=i.scroll):(b=g,C=g.scrollLeft,x=g.scrollTop,M=a),y({scrollable:b,method:M,startTime:E,startX:C,startY:x,x:w,y:S})}s.scroll=s.scrollTo=function(){if(arguments[0]!==void 0){if(u(arguments[0])===!0){i.scroll.call(s,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:s.scrollX||s.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:s.scrollY||s.pageYOffset);return}p.call(s,e.body,arguments[0].left!==void 0?~~arguments[0].left:s.scrollX||s.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:s.scrollY||s.pageYOffset)}},s.scrollBy=function(){if(arguments[0]!==void 0){if(u(arguments[0])){i.scrollBy.call(s,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(s,e.body,~~arguments[0].left+(s.scrollX||s.pageXOffset),~~arguments[0].top+(s.scrollY||s.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");i.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;p.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){i.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){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const g=m(this),w=g.getBoundingClientRect(),S=this.getBoundingClientRect();g!==e.body?(p.call(this,g,g.scrollLeft+S.left-w.left,g.scrollTop+S.top-w.top),s.getComputedStyle(g).position!=="fixed"&&s.scrollBy({left:w.left,top:w.top,behavior:"smooth"})):s.scrollBy({left:S.left,top:S.top,behavior:"smooth"})}}class hb{constructor(e=[],t){v(this,"timeOffset",0),v(this,"speed"),v(this,"actions"),v(this,"raf",null),v(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 r=this.findActionIndex(e);this.actions.splice(r,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,r=this.actions.length-1;for(;t<=r;){const i=Math.floor((t+r)/2);if(this.actions[i].delay<e.delay)t=i+1;else if(this.actions[i].delay>e.delay)r=i-1;else return i+1}return t}}function ba(s,e){if(s.type===O.IncrementalSnapshot&&s.data.source===A.MouseMove&&s.data.positions&&s.data.positions.length){const t=s.data.positions[0].timeOffset,r=s.timestamp+t;return s.delay=r-e,r-e}return s.delay=s.timestamp-e,s.delay}/*! *****************************************************************************
|
|
79
|
+
Solution: Ensure element and root parameter are from the same document context.`)}function uy(r,e={}){var _,B,W,N;var t;if(!r||!r.ownerDocument||!r.isConnected)return null;const s=R(R({},kg),e);if(s.root)try{cy(r,s.root)}catch(T){return console.error("Cross-document generation detected:",T),null}const i=(_=s.cache)!=null?_:ly(),n=i.getEID(r);if(n!==void 0)return n;if(r.tagName.toLowerCase()==="html"){const T=new ia(s,i),D=fy(r,s,T);return i.setEID(r,D),D}const o=new _g(s,i),l=new Wg(s,i),a=new ia(s,i),c=new ry,u=o.findAnchor(r);if(!u&&!s.fallbackToBody)return null;const h=(W=(B=u==null?void 0:u.element)!=null?B:(t=r.ownerDocument)==null?void 0:t.body)!=null?W: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 T=Array.from(m.children).indexOf(h);T!==-1&&(y=T+1)}const p=a.extract(h),g={tag:h.tagName.toLowerCase(),semantics:p,score:(N=u==null?void 0:u.score)!=null?N:Pe.DEGRADED_SCORE,degraded:d,nthChild:y},w=l.buildPath(h,r,a),S=a.extract(r);s.enableSvgFingerprint&&hy(r)&&(S.svg=c.fingerprint(r));const b=r.parentElement;let C;if(b){const T=Array.from(b.children).indexOf(r);T!==-1&&(C=T+1)}const x={tag:r.tagName.toLowerCase(),semantics:S,score:a.scoreElement(r),nthChild:C},M=[],E={onMultiple:"best-score",onMissing:"anchor-only",maxDepth:3},$=g.degraded||w.degraded,k=dy(g.degraded,w),L={version:"1.0",anchor:g,path:w.path,target:x,constraints:M,fallback:E,meta:{confidence:0,generatedAt:new Date().toISOString(),generator:"dom-eid@1.0",source:s.source,degraded:$,degradationReason:k}};return L.meta.confidence=iy(L),L.meta.confidence<s.confidenceThreshold?null:(i.setEID(r,L),L)}function hy(r){return r.namespaceURI==="http://www.w3.org/2000/svg"||r.tagName.toLowerCase()==="svg"||r instanceof SVGElement}function dy(r,e){if(r&&e.degraded)return"anchor-and-path-degraded";if(r)return"no-semantic-anchor";if(e.degraded)return e.degradationReason}function fy(r,e,t,s){const i={tag:"html",semantics:t.extract(r),score:1,degraded:!1,nthChild:void 0};return{version:"1.0",anchor:i,path:[],target:i,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 Nc={maxClasses:2,maxAttributes:5,includeText:!0,maxTextLength:50,simplifyTarget:!0,includeConstraints:!0};function oa(r){return r==="id"?101:st[r]!==void 0?st[r]:r.startsWith("data-")?st["data-*"]:r.startsWith("aria-")?st["aria-*"]:0}function py(r){return["id","data-testid","data-qa","data-cy","href","text","role"].includes(r)}function my(r){return!!(/@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/.test(r)||/(\+?\d{1,3}[-.\s]?)?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}/.test(r)||/\d{4}[-\s]?\d{4}[-\s]?\d{4}[-\s]?\d{4}/.test(r))}function gy(r,e){const t=R(R({},Nc),e),s=`v${r.version}`,i=Qr(r.anchor,!1,t),n=r.path.length>0?r.path.map(a=>Qr(a,!1,t)).join(" > ")+" > ":"",o=Qr(r.target,!0,t),l=t.includeConstraints?yy(r):"";return`${s}: ${i} :: ${n}${o}${l}`}function Qr(r,e=!1,t=Nc){const{tag:s,semantics:i}=r;let n=s;const o=[],l=R({},i.attributes);i.id&&(l.id=i.id),i.role&&!l.role&&(l.role=i.role);const a=Object.entries(l).map(([h,d])=>{const f=oa(h),m=h==="href"||h==="src"?Ic(h,d):d;return{name:h,value:m,priority:f}}).filter(h=>h.name!=="id"&&h.name!=="class"&&Ec.has(h.name)||Mc.has(h.name)&&Ac(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}="${Vi(d)}"`);if(t.includeText&&i.text&&!my(i.text.normalized)){const h=i.text.normalized;h.length>0&&h.length<=t.maxTextLength&&o.push(`text="${Vi(h)}"`)}let u=o;if(o.length>0&&(e&&t.simplifyTarget&&i.id&&(u=o.filter(h=>{const d=h.split("=")[0];return oa(d)>=60||d==="text"||d==="id"||d==="role"})),u.length>0&&u.sort((h,d)=>h.localeCompare(d))),i.classes&&i.classes.length>0){const h=zg(i.classes),d=!!i.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 r&&r.nthChild){const h=!!i.id||i.attributes&&Object.keys(i.attributes).some(py);e&&t.simplifyTarget&&h||(n+=`#${r.nthChild}`)}return n}function yy(r){if(!r.constraints||r.constraints.length===0)return"";const e=[];for(const t of r.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=Vi(String(t.params.reference));e.push(`text="${s}"`)}break}return e.length===0?"":` {${e.join(",")}}`}function Vi(r){return r.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/>/g,"\\>").replace(/:/g,"\\:")}function by(r,e,t){const s=uy(r,e);return s?gy(s,t):null}const Ht={maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:0,fallbackToBody:!0};function vy(r){var e,t,s,i;return r===!1?null:r===!0||r===void 0?R({},Ht):{maxPathDepth:(e=r.maxPathDepth)!=null?e:Ht.maxPathDepth,enableSvgFingerprint:(t=r.enableSvgFingerprint)!=null?t:Ht.enableSvgFingerprint,confidenceThreshold:(s=r.confidenceThreshold)!=null?s:Ht.confidenceThreshold,fallbackToBody:(i=r.fallbackToBody)!=null?i:Ht.fallbackToBody}}function aa(r,e,t,s){const i=e.getMeta(r),n=i==null?void 0:i.selector;if(n&&!(s!=null&&s.force))return n;const o=r.nodeType===Node.ELEMENT_NODE?r:Or(r);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=by(o,c);if(u)return l?l.selector=u:i&&(i.selector=u),u}catch(u){}return a!=null?a:n}function la(r){return"__ln"in r}class wy{constructor(){v(this,"length",0),v(this,"head",null),v(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&&la(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&&la(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 ca=(r,e)=>`${r}@${e}`,Sy=new Set(["id","class","name","role","title","alt","placeholder","for","type"]);function Cy(r){const e=r.toLowerCase();return Sy.has(e)||e.startsWith("data-")||e.startsWith("aria-")}class xy{constructor(){v(this,"frozen",!1),v(this,"locked",!1),v(this,"texts",[]),v(this,"attributes",[]),v(this,"attributeMap",new WeakMap),v(this,"removes",[]),v(this,"mapRemoves",[]),v(this,"movedMap",{}),v(this,"addedSet",new Set),v(this,"movedSet",new Set),v(this,"droppedSet",new Set),v(this,"removesSubTreeCache",new Set),v(this,"mutationCb"),v(this,"blockClass"),v(this,"blockSelector"),v(this,"maskTextClass"),v(this,"maskTextSelector"),v(this,"excludeAttribute"),v(this,"inlineStylesheet"),v(this,"maskInputOptions"),v(this,"maskTextFn"),v(this,"maskInputFn"),v(this,"keepIframeSrcFn"),v(this,"recordCanvas"),v(this,"inlineImages"),v(this,"slimDOMOptions"),v(this,"dataURLOptions"),v(this,"selectorOptions",null),v(this,"doc"),v(this,"mirror"),v(this,"iframeManager"),v(this,"stylesheetManager"),v(this,"shadowDomManager"),v(this,"canvasManager"),v(this,"processedNodeManager"),v(this,"unattachedDoc"),v(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),v(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,s=new wy,i=a=>{let c=a,u=ts;for(;u===ts;)c=c&&c.nextSibling,u=c&&this.mirror.getId(c);return u},n=a=>{const c=V.parentNode(a);if(!c||!Un(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=Jt(c)?this.mirror.getId(Wn(a)):this.mirror.getId(c),d=i(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=>{At(m,this.mirror)&&this.iframeManager.addIframe(m),Fn(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),tt(a)&&this.shadowDomManager.addShadowRoot(V.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)ua(this.removesSubTreeCache,a,this.mirror)&&!this.movedSet.has(V.parentNode(a))||n(a);for(const a of this.addedSet)!ha(this.droppedSet,a)&&!ua(this.removesSubTreeCache,a,this.mirror)||ha(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(V.parentNode(o.value)),u=i(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(V.parentNode(u.value));if(i(u.value)===-1)continue;if(h!==-1){a=u;break}else{const f=u.value,m=V.parentNode(f);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const y=V.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=V.parentNode(c);return u&&u.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(u),{id:this.mirror.getId(c),value:a.value,selector:aa(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:aa(a.node,this.mirror,this.selectorOptions,{force:Object.keys(c).some(Cy)})}}).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))}),v(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(V.childNodes(e),i=>V.textContent(i)||"").join("");t.attributes.value=er({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:tr(e),value:s,maskInputFn:this.maskInputFn})}),v(this,"processMutation",e=>{if(!Ks(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=V.textContent(e.target);!ge(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:Va(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Or(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let s=e.attributeName,i=e.target.getAttribute(s);const o=t[s],l=typeof o=="boolean",a=document.contains(t),c=tn(t),u=ci(s,this.excludeAttribute);if(i===null&&!t.hasAttribute(s)&&e.oldValue!==null&&(o===""||o===null||typeof o=="undefined")){console.debug(`[${Ae()}] [rrweb:record/mutation] \u26D4 phantom attribute mutation ignored`,{node:V.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:s,value:i,oldValue:e.oldValue,excludeAttribute:this.excludeAttribute,propValue:o,isBooleanAttr:l,inDOM:a,isVisible:c,isExcludeAttributeName:u});return}if(ci(s,this.excludeAttribute)){console.debug(`[${Ae()}] [rrweb:record/mutation] \u26D4 excluded attribute mutation ignored`,{node:V.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:s,value:i,oldValue:e.oldValue,excludeAttribute:this.excludeAttribute,propValue:o,isBooleanAttr:l,inDOM:a,isVisible:c,isExcludeAttributeName:u});return}if(s==="value"){const f=tr(t);i=er({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:f,value:i,maskInputFn:this.maskInputFn})}if(ge(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let d=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&s==="src"&&!this.keepIframeSrcFn(i))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"),!Ua(t.tagName,s))if(d.attributes[s]=Wa(this.doc,it(t.tagName),it(s),i),s!=="class"&&(e.oldValue===null||i===""||i!==e.oldValue)&&console.debug(`[${Ae()}] [rrweb:record/mutation] \u26A0\uFE0F suspicious attribute mutation`,{reason:[i===e.oldValue?"no change in value":null,i===o?"mirrored in DOM property":null,i===d.attributes[s]?"redundant assignment":null].filter(Boolean).join(", ")||"uncategorized",node:V.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:s,value:i,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(ge(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),i=Jt(e.target)?this.mirror.getId(V.host(e.target)):this.mirror.getId(e.target);ge(e.target,this.blockClass,this.blockSelector,!1)||Ks(t,this.mirror,this.slimDOMOptions)||!vc(t,this.mirror)||(this.addedSet.has(t)?(Hi(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&s===-1||_n(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[ca(s,i)]?Hi(this.movedSet,t):(this.removes.push({parentId:i,id:s,isShadow:Jt(e.target)&&qt(e.target)?!0:void 0}),Ey(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),v(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Ks(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[ca(this.mirror.getId(e),s)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);ge(e,this.blockClass,this.blockSelector,!1)||(V.childNodes(e).forEach(s=>this.genAdds(s)),tt(e)&&V.childNodes(V.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 Hi(r,e){r.delete(e),V.childNodes(e).forEach(t=>Hi(r,t))}function Ey(r,e){const t=[r];for(;t.length;){const s=t.pop();e.has(s)||(e.add(s),V.childNodes(s).forEach(i=>t.push(i)))}}function ua(r,e,t){return r.size===0?!1:My(r,e)}function My(r,e,t){const s=V.parentNode(e);return s?r.has(s):!1}function ha(r,e){return r.size===0?!1:Rc(r,e)}function Rc(r,e){const t=V.parentNode(e);return t?r.has(t)?!0:Rc(r,t):!1}let Qt;function Ay(r){Qt=r}function Iy(){Qt=void 0}const G=r=>Qt?(...t)=>{try{return r(...t)}catch(s){if(Qt&&Qt(s)===!0)return;throw s}}:r,Re=[];function kt(r){try{if("composedPath"in r){const e=r.composedPath();if(e.length)return e[0]}else if("path"in r&&r.path.length)return r.path[0]}catch(e){}return r&&r.target}function Tc(r,e){const t=new xy;Re.push(t),t.init(r);const s=new(On())(G(t.processMutations.bind(t)));return s.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function Ny({mousemoveCb:r,sampling:e,doc:t,mirror:s}){if(e.mousemove===!1)return()=>{};const i=typeof e.mousemove=="number"?e.mousemove:50,n=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let o=[],l;const a=$t(G(h=>{const d=Date.now()-l;r(o.map(f=>(f.timeOffset-=d,f)),h),o=[],l=null}),n),c=G($t(G(h=>{const d=kt(h),{clientX:f,clientY:m}=pr(h)?h.changedTouches[0]:h;l||(l=Ae()),o.push({x:f,y:m,id:s.getId(d),timeOffset:Ae()-l}),a(typeof DragEvent!="undefined"&&h instanceof DragEvent?A.Drag:h instanceof MouseEvent?A.MouseMove:A.TouchMove)}),i,{trailing:!1})),u=[ue("mousemove",c,t),ue("touchmove",c,t),ue("drag",c,t)];return G(()=>{u.forEach(h=>h())})}function Ry({mouseInteractionCb:r,doc:e,mirror:t,blockClass:s,blockSelector:i,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=kt(h);if(ge(d,s,i,!0))return;let f=null,m=u;if("pointerType"in h){switch(h.pointerType){case"mouse":f=Ve.Mouse;break;case"touch":f=Ve.Touch;break;case"pen":f=Ve.Pen;break}f===Ve.Touch?Z[u]===Z.MouseDown?m="TouchStart":Z[u]===Z.MouseUp&&(m="TouchEnd"):Ve.Pen}else pr(h)&&(f=Ve.Touch);f!==null?(a=f,(m.startsWith("Touch")&&f===Ve.Touch||m.startsWith("Mouse")&&f===Ve.Mouse)&&(f=null)):Z[u]===Z.Click&&(f=a,a=null);const y=pr(h)?h.changedTouches[0]:h;if(!y)return;const p=t.getId(d),{clientX:g,clientY:w}=y;G(r)(R({type:Z[m],id:p,x:g,y:w},f!==null&&{pointerType:f}))};return Object.keys(Z).filter(u=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&o[u]!==!1).forEach(u=>{let h=it(u);const d=c(u);if(window.PointerEvent)switch(Z[u]){case Z.MouseDown:case Z.MouseUp:h=h.replace("mouse","pointer");break;case Z.TouchStart:case Z.TouchEnd:return}l.push(ue(h,d,e))}),G(()=>{l.forEach(u=>u())})}function Oc({scrollCb:r,doc:e,mirror:t,blockClass:s,blockSelector:i,sampling:n}){const o=G($t(G(l=>{const a=kt(l);if(!a||ge(a,s,i,!0))return;const c=t.getId(a);if(a===e&&e.defaultView){const u=Dn(e.defaultView);r({id:c,x:u.left,y:u.top})}else r({id:c,x:a.scrollLeft,y:a.scrollTop})}),n.scroll||100));return ue("scroll",o,e)}function Ty({viewportResizeCb:r},{win:e}){let t=-1,s=-1;const i=G($t(G(()=>{const n=$n(),o=kn();(t!==n||s!==o)&&(r({width:Number(o),height:Number(n)}),t=n,s=o)}),200));return ue("resize",i,e)}function Oy({navigationCb:r,doc:e,sampling:t}){var u;if(t.navigation===!1)return()=>{};const s=e.defaultView;if(!s)return()=>{};let i=s.location.href;const n=[],o=G(h=>{const d=s.location.href;d!==i&&(r({href:d,oldHref:i,navigationType:h}),i=d)}),l=Ye(s.history,"pushState",function(h){return function(...d){const f=h.apply(this,d);return o("pushState"),f}});n.push(l);const a=Ye(s.history,"replaceState",function(h){return function(...d){const f=h.apply(this,d);return o("replaceState"),f}});if(n.push(a),n.push(ue("popstate",()=>o("popstate"),s)),n.push(ue("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!==i&&(r({href:p,oldHref:i,navigationType:"navigate"}),i=p)}};h.addEventListener("navigate",d),n.push(()=>h.removeEventListener("navigate",d))}catch(h){}return G(()=>{n.forEach(h=>h())})}const ei=["INPUT","TEXTAREA","SELECT"],da=new WeakMap,Dy=["Enter","Tab","Escape","ArrowDown","ArrowUp","Delete"],fa=new WeakMap;function $y({inputCb:r,doc:e,mirror:t,blockClass:s,blockSelector:i,ignoreClass:n,ignoreSelector:o,maskInputOptions:l,maskInputFn:a,sampling:c,userTriggeredOnInput:u}){function h(S){let b=kt(S);const C=S.isTrusted,x=b&&b.tagName;if(b&&x==="OPTION"&&(b=V.parentElement(b)),!b||!x||ei.indexOf(x)<0||ge(b,s,i,!0)||b.classList.contains(n)||o&&b.matches(o))return;let M=b.value,E=!1;const $=tr(b)||"";$==="radio"||$==="checkbox"?E=b.checked:(l[x.toLowerCase()]||l[$])&&(M=er({element:b,maskInputOptions:l,tagName:x,type:$,value:M,maskInputFn:a})),d(b,u?{text:M,isChecked:E,userTriggered:C}:{text:M,isChecked:E});const k=b.name;$==="radio"&&k&&E&&e.querySelectorAll(`input[type="radio"][name="${k}"]`).forEach(L=>{if(L!==b){const _=L.value;d(L,u?{text:_,isChecked:!E,userTriggered:!1}:{text:_,isChecked:!E})}})}function d(S,b){const C=da.get(S),x=S,M=x.hasAttribute("placeholder"),E=x.value==="",$=typeof x.defaultValue=="string"?x.defaultValue==="":!0,k=!b.userTriggered,L=!C||C.text==="",_=M&&E&&$&&L&&k&&!b.isChecked&&x.type!=="hidden"&&ei.includes(x.tagName),B=x.tagName==="INPUT"&&x.type==="text"&&!b.userTriggered&&b.text===x.defaultValue&&!C&&x.hasAttribute("placeholder"),W=!b.userTriggered&&x.value===x.defaultValue&&!C&&x.hasAttribute("placeholder")&&!b.isChecked&&x.type!=="hidden"&&ei.includes(x.tagName),N=x.type==="checkbox"&&!b.userTriggered&&!b.isChecked&&!C,T=x.type==="radio"&&!b.userTriggered&&!b.isChecked&&!C;if(_||B||W||N||T){console.debug(`[${Ae()}] [rrweb:record/observer] \u26D4 phantom input ignored`,{node:V.describeNode(x),tag:x.tagName,nodeType:x.nodeType,attribute:x.attributes,value:x.value,isLikelyPhantom:_,isRenderDrivenTextInput:B,isValueFromDefault:W,isPhantomCheckbox:N,isPhantomRadio:T});return}if(!C||C.text!==b.text||C.isChecked!==b.isChecked){da.set(S,b);const D=t.getId(S);G(r)(ae(R({},b),{id:D}))}}const m=(c.input==="last"?["change"]:["input","change"]).map(S=>ue(S,G(h),e)),y=S=>{const b=kt(S);if(!b||!b.tagName)return;if(c.input==="all"){h(S);return}const C=b.tagName,x=S.key,M=Dy.includes(x),E=C==="TEXTAREA",$=e.activeElement===b,k=b.value,L=fa.get(b);if(fa.set(b,k),!$){h(S);return}if(M){if(!E){h(S);return}let _=L!=null?L:"",B=0;const W=2,N=()=>{const T=b.value,D=e.activeElement===b,U=T!==_;if(!D){h(S);return}if(U)B=0,_=T;else if(B++,B>=W){h(S);return}requestAnimationFrame(N)};requestAnimationFrame(N);return}};m.push(ue("keydown",G(y),e));const p=e.defaultView;if(!p)return()=>{m.forEach(S=>S())};const g=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),w=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&m.push(...w.map(S=>bs(S[0],S[1],{set(){G(h)({target:this,isTrusted:!1})}},!1,p))),G(()=>{m.forEach(S=>S())})}function mr(r){const e=[];function t(s,i){if(Hs("CSSGroupingRule")&&s.parentRule instanceof CSSGroupingRule||Hs("CSSMediaRule")&&s.parentRule instanceof CSSMediaRule||Hs("CSSSupportsRule")&&s.parentRule instanceof CSSSupportsRule||Hs("CSSConditionRule")&&s.parentRule instanceof CSSConditionRule){const o=Array.from(s.parentRule.cssRules).indexOf(s);i.unshift(o)}else if(s.parentStyleSheet){const o=Array.from(s.parentStyleSheet.cssRules).indexOf(s);i.unshift(o)}return i}return t(r,e)}function Ke(r,e,t){let s,i;return r?(r.ownerNode?s=e.getId(r.ownerNode):i=t.getId(r),{styleId:i,id:s}):{}}function ky({styleSheetRuleCb:r,mirror:e,stylesheetManager:t},{win:s}){if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};const i=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:G((u,h,d)=>{const[f,m]=d,{id:y,styleId:p}=Ke(h,e,t.styleMirror);return(y&&y!==-1||p&&p!==-1)&&r({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:G((u,h,d)=>{const[f]=d,{id:m,styleId:y}=Ke(h,e,t.styleMirror);return(m&&m!==-1||y&&y!==-1)&&r({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:G((u,h,d)=>{const[f]=d,{id:m,styleId:y}=Ke(h,e,t.styleMirror);return(m&&m!==-1||y&&y!==-1)&&r({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:G((u,h,d)=>{const[f]=d,{id:m,styleId:y}=Ke(h,e,t.styleMirror);return(m&&m!==-1||y&&y!==-1)&&r({id:m,styleId:y,replaceSync:f}),u.apply(h,d)})}));const a={};Gs("CSSGroupingRule")?a.CSSGroupingRule=s.CSSGroupingRule:(Gs("CSSMediaRule")&&(a.CSSMediaRule=s.CSSMediaRule),Gs("CSSConditionRule")&&(a.CSSConditionRule=s.CSSConditionRule),Gs("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:G((d,f,m)=>{const[y,p]=m,{id:g,styleId:w}=Ke(f.parentStyleSheet,e,t.styleMirror);return(g&&g!==-1||w&&w!==-1)&&r({id:g,styleId:w,adds:[{rule:y,index:[...mr(f),p||0]}]}),d.apply(f,m)})}),h.prototype.deleteRule=new Proxy(c[u].deleteRule,{apply:G((d,f,m)=>{const[y]=m,{id:p,styleId:g}=Ke(f.parentStyleSheet,e,t.styleMirror);return(p&&p!==-1||g&&g!==-1)&&r({id:p,styleId:g,removes:[{index:[...mr(f),y]}]}),d.apply(f,m)})})}),G(()=>{s.CSSStyleSheet.prototype.insertRule=i,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:r,stylesheetManager:e},t){var s,i,n;let o=null;t.nodeName==="#document"?o=r.getId(t):o=r.getId(V.host(t));const l=t.nodeName==="#document"?(s=t.defaultView)==null?void 0:s.Document:(n=(i=t.ownerDocument)==null?void 0:i.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}}),G(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function _y({styleDeclarationCb:r,mirror:e,ignoreCSSAttributes:t,stylesheetManager:s},{win:i}){const n=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:G((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}=Ke((u=a.parentRule)==null?void 0:u.parentStyleSheet,e,s.styleMirror);return(m&&m!==-1||y&&y!==-1)&&r({id:m,styleId:y,set:{property:h,value:d,priority:f},index:mr(a.parentRule)}),l.apply(a,c)})});const o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:G((l,a,c)=>{var u;const[h]=c;if(t.has(h))return o.apply(a,[h]);const{id:d,styleId:f}=Ke((u=a.parentRule)==null?void 0:u.parentStyleSheet,e,s.styleMirror);return(d&&d!==-1||f&&f!==-1)&&r({id:d,styleId:f,remove:{property:h},index:mr(a.parentRule)}),l.apply(a,c)})}),G(()=>{i.CSSStyleDeclaration.prototype.setProperty=n,i.CSSStyleDeclaration.prototype.removeProperty=o})}function Ly({mediaInteractionCb:r,blockClass:e,blockSelector:t,mirror:s,sampling:i,doc:n}){const o=G(a=>$t(G(c=>{const u=kt(c);if(!u||ge(u,e,t,!0))return;const{currentTime:h,volume:d,muted:f,playbackRate:m,loop:y}=u;r({type:a,id:s.getId(u),currentTime:h,volume:d,muted:f,playbackRate:m,loop:y})}),i.media||500)),l=[ue("play",o(Qe.Play),n),ue("pause",o(Qe.Pause),n),ue("seeked",o(Qe.Seeked),n),ue("volumechange",o(Qe.VolumeChange),n),ue("ratechange",o(Qe.RateChange),n)];return G(()=>{l.forEach(a=>a())})}function Py({fontCb:r,doc:e}){const t=e.defaultView;if(!t)return()=>{};const s=[],i=new WeakMap,n=t.FontFace;t.FontFace=function(a,c,u){const h=new n(a,c,u);return i.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=Ye(e.fonts,"add",function(l){return function(a){return setTimeout(G(()=>{const c=i.get(a);c&&(r(c),i.delete(a))}),0),l.apply(this,[a])}});return s.push(()=>{t.FontFace=n}),s.push(o),G(()=>{s.forEach(l=>l())})}function Fy(r){const{doc:e,mirror:t,blockClass:s,blockSelector:i,selectionCb:n}=r;let o=!0;const l=G(()=>{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;ge(f,s,i,!0)||ge(y,s,i,!0)||c.push({start:t.getId(f),startOffset:m,end:t.getId(y),endOffset:p})}n({ranges:c})});return l(),ue("selectionchange",l)}function zy({doc:r,customElementCb:e}){const t=r.defaultView;return!t||!t.customElements?()=>{}:Ye(t.customElements,"define",function(i){return function(n,o,l){try{e({define:{name:n}})}catch(a){console.warn(`Custom element callback failed for ${n}`)}return i.apply(this,[n,o,l])}})}function By(r,e){const{mutationCb:t,mousemoveCb:s,mouseInteractionCb:i,scrollCb:n,viewportResizeCb:o,navigationCb:l,inputCb:a,mediaInteractionCb:c,styleSheetRuleCb:u,styleDeclarationCb:h,canvasMutationCb:d,fontCb:f,selectionCb:m,customElementCb:y}=r;r.mutationCb=(...p)=>{e.mutation&&e.mutation(...p),t(...p)},r.mousemoveCb=(...p)=>{e.mousemove&&e.mousemove(...p),s(...p)},r.mouseInteractionCb=(...p)=>{e.mouseInteraction&&e.mouseInteraction(...p),i(...p)},r.scrollCb=(...p)=>{e.scroll&&e.scroll(...p),n(...p)},r.viewportResizeCb=(...p)=>{e.viewportResize&&e.viewportResize(...p),o(...p)},r.navigationCb=(...p)=>{e.navigation&&e.navigation(...p),l(...p)},r.inputCb=(...p)=>{e.input&&e.input(...p),a(...p)},r.mediaInteractionCb=(...p)=>{e.mediaInteaction&&e.mediaInteaction(...p),c(...p)},r.styleSheetRuleCb=(...p)=>{e.styleSheetRule&&e.styleSheetRule(...p),u(...p)},r.styleDeclarationCb=(...p)=>{e.styleDeclaration&&e.styleDeclaration(...p),h(...p)},r.canvasMutationCb=(...p)=>{e.canvasMutation&&e.canvasMutation(...p),d(...p)},r.fontCb=(...p)=>{e.font&&e.font(...p),f(...p)},r.selectionCb=(...p)=>{e.selection&&e.selection(...p),m(...p)},r.customElementCb=(...p)=>{e.customElement&&e.customElement(...p),y(...p)}}function Wy(r,e={}){const t=r.doc.defaultView;if(!t)return()=>{};By(r,e);let s;r.recordDOM&&(s=Tc(r,r.doc));const i=Ny(r),n=Ry(r),o=Oc(r),l=Ty(r,{win:t}),a=Oy(r),c=$y(r),u=Ly(r);let h=()=>{},d=()=>{},f=()=>{},m=()=>{};r.recordDOM&&(h=ky(r,{win:t}),d=Dc(r,r.doc),f=_y(r,{win:t}),r.collectFonts&&(m=Py(r)));const y=Fy(r),p=zy(r),g=[];for(const w of r.plugins)g.push(w.observer(w.callback,t,w.options));return G(()=>{var w;Re.forEach(S=>S.reset()),(w=r.visibilityManager)==null||w.reset(),s==null||s.disconnect(),i(),n(),o(),l(),a(),c(),u(),h(),d(),f(),m(),y(),p(),g.forEach(S=>S())})}function Hs(r){return typeof window[r]!="undefined"}function Gs(r){return!!(typeof window[r]!="undefined"&&window[r].prototype&&"insertRule"in window[r].prototype&&"deleteRule"in window[r].prototype)}class pa{constructor(e){v(this,"iframeIdToRemoteIdMap",new WeakMap),v(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,s,i){const n=s||this.getIdToRemoteIdMap(e),o=i||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),i=this.getRemoteIdToIdMap(e);return t.map(n=>this.getId(e,n,s,i))}getRemoteId(e,t,s){const i=s||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const n=i.get(t);return n||-1}getRemoteIds(e,t){const s=this.getRemoteIdToIdMap(e);return t.map(i=>this.getRemoteId(e,i,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 Uy{constructor(e){v(this,"iframes",new WeakMap),v(this,"crossOriginIframeMap",new WeakMap),v(this,"crossOriginIframeMirror",new pa(Ba)),v(this,"crossOriginIframeStyleMirror"),v(this,"crossOriginIframeRootIdMap",new WeakMap),v(this,"mirror"),v(this,"mutationCb"),v(this,"wrappedEmit"),v(this,"loadListener"),v(this,"stylesheetManager"),v(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new pa(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,i;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))),(i=this.loadListener)==null||i.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 i=this.crossOriginIframeMap.get(e.source);if(!i)return;const n=this.transformCrossOriginEvent(i,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}transformCrossOriginEvent(e,t){var s;switch(t.type){case O.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:O.IncrementalSnapshot,data:{source:A.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case O.Meta:case O.Load:case O.DomContentLoaded:return!1;case O.Plugin:return t;case O.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case O.IncrementalSnapshot:switch(t.data.source){case A.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(i.node,n)}),t.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),t.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),t.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case A.Drag:case A.TouchMove:case A.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case A.ViewportResize:return!1;case A.MediaInteraction:case A.MouseInteraction:case A.Scroll:case A.CanvasMutation:case A.Input:return this.replaceIds(t.data,e,["id"]),t;case A.StyleSheetRule:case A.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case A.Font:return t;case A.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case A.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(s=t.data.styles)==null||s.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),t}}return!1}replace(e,t,s,i){for(const n of i)!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!==He.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(s=>{this.patchRootIdOnNode(s,t)})}}class Vy{constructor(e){v(this,"shadowDoms",new WeakSet),v(this,"mutationCb"),v(this,"scrollCb"),v(this,"bypassOptions"),v(this,"mirror"),v(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(!qt(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const s=Tc(ae(R({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>s.disconnect()),this.restoreHandlers.push(Oc(ae(R({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(V.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(Ye(e.prototype,"attachShadow",function(i){return function(n){const o=i.call(this,n),l=V.shadowRoot(this);return l&&Un(this)&&s.addShadowRoot(l,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Et="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Yt=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var js=0;js<Et.length;js++)Yt[Et.charCodeAt(js)]=js;var Hy=function(r){var e=new Uint8Array(r),t,s=e.length,i="";for(t=0;t<s;t+=3)i+=Et[e[t]>>2],i+=Et[(e[t]&3)<<4|e[t+1]>>4],i+=Et[(e[t+1]&15)<<2|e[t+2]>>6],i+=Et[e[t+2]&63];return s%3===2?i=i.substring(0,i.length-1)+"=":s%3===1&&(i=i.substring(0,i.length-2)+"=="),i},Gy=function(r){var e=r.length*.75,t=r.length,s,i=0,n,o,l,a;r[r.length-1]==="="&&(e--,r[r.length-2]==="="&&e--);var c=new ArrayBuffer(e),u=new Uint8Array(c);for(s=0;s<t;s+=4)n=Yt[r.charCodeAt(s)],o=Yt[r.charCodeAt(s+1)],l=Yt[r.charCodeAt(s+2)],a=Yt[r.charCodeAt(s+3)],u[i++]=n<<2|o>>4,u[i++]=(o&15)<<4|l>>2,u[i++]=(l&3)<<6|a&63;return c};const ma=new Map;function jy(r,e){let t=ma.get(r);return t||(t=new Map,ma.set(r,t)),t.has(e)||t.set(e,[]),t.get(e)}const $c=(r,e,t)=>{if(!r||!(_c(r,e)||typeof r=="object"))return;const s=r.constructor.name,i=jy(t,s);let n=i.indexOf(r);return n===-1&&(n=i.length,i.push(r)),n};function Qs(r,e,t){if(r instanceof Array)return r.map(s=>Qs(s,e,t));if(r===null)return r;if(r instanceof Float32Array||r instanceof Float64Array||r instanceof Int32Array||r instanceof Uint32Array||r instanceof Uint8Array||r instanceof Uint16Array||r instanceof Int16Array||r instanceof Int8Array||r instanceof Uint8ClampedArray)return{rr_type:r.constructor.name,args:[Object.values(r)]};if(r instanceof ArrayBuffer){const s=r.constructor.name,i=Hy(r);return{rr_type:s,base64:i}}else{if(r instanceof DataView)return{rr_type:r.constructor.name,args:[Qs(r.buffer,e,t),r.byteOffset,r.byteLength]};if(r instanceof HTMLImageElement){const s=r.constructor.name,{src:i}=r;return{rr_type:s,src:i}}else if(r instanceof HTMLCanvasElement){const s="HTMLImageElement",i=r.toDataURL();return{rr_type:s,src:i}}else{if(r instanceof ImageData)return{rr_type:r.constructor.name,args:[Qs(r.data,e,t),r.width,r.height]};if(_c(r,e)||typeof r=="object"){const s=r.constructor.name,i=$c(r,e,t);return{rr_type:s,index:i}}}}return r}const kc=(r,e,t)=>r.map(s=>Qs(s,e,t)),_c=(r,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>r instanceof e[i]);function Yy(r,e,t,s){const i=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const o of n)try{if(typeof e.CanvasRenderingContext2D.prototype[o]!="function")continue;const l=Ye(e.CanvasRenderingContext2D.prototype,o,function(a){return function(...c){return ge(this.canvas,t,s,!0)||setTimeout(()=>{const u=kc(c,e,this);r(this.canvas,{type:Ze["2D"],property:o,args:u})},0),a.apply(this,c)}});i.push(l)}catch(l){const a=bs(e.CanvasRenderingContext2D.prototype,o,{set(c){r(this.canvas,{type:Ze["2D"],property:o,args:[c],setter:!0})}});i.push(a)}return()=>{i.forEach(o=>o())}}function Zy(r){return r==="experimental-webgl"?"webgl":r}function ga(r,e,t,s){const i=[];try{const n=Ye(r.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...a){if(!ge(this,e,t,!0)){const c=Zy(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])}});i.push(n)}catch(n){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(n=>n())}}function ya(r,e,t,s,i,n){const o=[],l=Object.getOwnPropertyNames(r);for(const a of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if(typeof r[a]!="function")continue;const c=Ye(r,a,function(u){return function(...h){const d=u.apply(this,h);if($c(d,n,this),"tagName"in this.canvas&&!ge(this.canvas,s,i,!0)){const f=kc(h,n,this),m={type:e,property:a,args:f};t(this.canvas,m)}return d}});o.push(c)}catch(c){const u=bs(r,a,{set(h){t(this.canvas,{type:e,property:a,args:[h],setter:!0})}});o.push(u)}return o}function Xy(r,e,t,s){const i=[];return i.push(...ya(e.WebGLRenderingContext.prototype,Ze.WebGL,r,t,s,e)),typeof e.WebGL2RenderingContext!="undefined"&&i.push(...ya(e.WebGL2RenderingContext.prototype,Ze.WebGL2,r,t,s,e)),()=>{i.forEach(n=>n())}}const Lc="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Jy=r=>Uint8Array.from(atob(r),e=>e.charCodeAt(0)),ba=typeof self!="undefined"&&self.Blob&&new Blob([Jy(Lc)],{type:"text/javascript;charset=utf-8"});function qy(r){let e;try{if(e=ba&&(self.URL||self.webkitURL).createObjectURL(ba),!e)throw"";const t=new Worker(e,{name:r==null?void 0:r.name});return t.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),t}catch(t){return new Worker("data:text/javascript;base64,"+Lc,{name:r==null?void 0:r.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}class Ky{constructor(e){v(this,"pendingCanvasMutations",new Map),v(this,"rafStamps",{latestId:0,invokeId:null}),v(this,"mirror"),v(this,"mutationCb"),v(this,"resetObservers"),v(this,"frozen",!1),v(this,"locked",!1),v(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:i,blockSelector:n,recordCanvas:o,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&t==="all"&&this.initCanvasMutationObserver(s,i,n),o&&typeof t=="number"&&this.initCanvasFPSObserver(t,s,i,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,i,n){const o=ga(t,s,i,!0),l=new Map,a=new qy;a.onmessage=m=>{const{id:y}=m.data;if(l.set(y,!1),!("base64"in m.data))return;const{base64:p,type:g,width:w,height:S}=m.data;this.mutationCb({id:y,type:Ze["2D"],commands:[{property:"clearRect",args:[0,0,w,S]},{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=>{ge(y,s,i,!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 S=y.getContext(y.__context);((p=S==null?void 0:S.getContextAttributes())==null?void 0:p.preserveDrawingBuffer)===!1&&S.clear(S.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(f)};h=requestAnimationFrame(f),this.resetObservers=()=>{o(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,s){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=ga(e,t,s,!1),n=Yy(this.processMutation.bind(this),e,t,s),o=Xy(this.processMutation.bind(this),e,t,s);this.resetObservers=()=>{i(),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 i=s.map(o=>{const c=o,{type:l}=c;return gt(c,["type"])}),{type:n}=s[0];this.mutationCb({id:t,type:n,commands:i}),this.pendingCanvasMutations.delete(e)}}function va(r,e,t){var u,h,d,f,m,y;const s=(u=t==null?void 0:t.root)!=null?u:null,i=(h=t==null?void 0:t.threshold)!=null?h:.5,n=(d=t==null?void 0:t.sensitivity)!=null?d:.05,o=Qy((f=t==null?void 0:t.rootMargin)!=null?f:"0px"),l=new Map,a=eb(s),c=tb(a,o);for(const p of r){const g=p.getBoundingClientRect();let w=ib(),S=0;g.width>0&&g.height>0&&(w=sb(g,c),S=rb(g,w),S=Math.round(S*100)/100);const b=nb(p),C=(m=e.get(p))!=null?m:null,x=(y=C==null?void 0:C.intersectionRatio)!=null?y:0,M=S,E=(C==null?void 0:C.isStyleVisible)&&x>i,$=b&&M>i;!C||E!==$||E!==$&&Math.abs(M-x)>n?l.set(p,{target:p,isVisible:$,isStyleVisible:b,intersectionRatio:M,intersectionRect:w,oldValue:C}):l.set(p,C)}return l}function Qy(r){const e=r.trim().split(/\s+/),t=(s,i)=>s.endsWith("%")?parseFloat(s)/100*i:parseFloat(s)||0;return function(s){const i=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:i,right:n,bottom:o,left:l,width:0,height:0}}}function eb(r){return r?r.getBoundingClientRect():new DOMRect(0,0,window.innerWidth,window.innerHeight)}function tb(r,e){const t=e(r);return new DOMRect(r.left-t.left,r.top-t.top,r.width+t.left+t.right,r.height+t.top+t.bottom)}function sb(r,e){const t=Math.max(r.top,e.top),s=Math.max(r.left,e.left),i=Math.min(r.bottom,e.bottom),n=Math.min(r.right,e.right),o=Math.max(0,n-s),l=Math.max(0,i-t);return{top:t,left:s,bottom:i,right:n,width:o,height:l}}function rb(r,e){const t=r.width*r.height,s=e.width*e.height;return t>0?s/t:0}function ib(){return{top:0,left:0,right:0,bottom:0,width:0,height:0}}function nb(r){const e=getComputedStyle(r);return e&&e.display!=="none"&&e.visibility!=="hidden"&&parseFloat(e.opacity||"1")>0}class ob{constructor(e){var c,u,h,d,f,m;v(this,"frozen",!1),v(this,"locked",!1),v(this,"pending",new Map),v(this,"mirror"),v(this,"mutationCb"),v(this,"rafId",null),v(this,"intervalId",null),v(this,"rafThrottle"),v(this,"lastFlushTime",0),v(this,"elements",new Set),v(this,"previousState",new Map),v(this,"root",null),v(this,"threshold"),v(this,"sensitivity"),v(this,"rootMargin"),v(this,"hasInitialized",!1),v(this,"mode","none"),v(this,"debounce",50),v(this,"throttle",100),v(this,"buffer",new Map),v(this,"debounceTimer",null),v(this,"lastThrottleTime",0),v(this,"disabled",!1),v(this,"notifyActivity");const{doc:t,mirror:s,sampling:i,mutationCb:n,notifyActivity:o}=e;if(this.mirror=s,this.mutationCb=n,this.notifyActivity=o,this.rootMargin="0px",i===!1){this.disabled=!0;return}const l=typeof i=="object"&&i!==null?i:{};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(w=>this.observe(w)))}),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=va(this.elements,this.previousState,{root:this.root,threshold:this.threshold,sensitivity:this.sensitivity,rootMargin:this.rootMargin});for(const[t,s]of e.entries()){const i=this.previousState.get(t);if(!i||i.isVisible!==s.isVisible||Math.abs(i.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=va(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 ab=150,lb=5e3,cb=100;class ub{constructor(e){var n,o,l;v(this,"frozen",!1),v(this,"locked",!1),v(this,"disabled",!1),v(this,"settleTimeout"),v(this,"maxWait"),v(this,"debounceMs"),v(this,"settlingObserver",null),v(this,"debounceTimer",null),v(this,"settleCheckTimer",null),v(this,"maxWaitTimer",null),v(this,"lastMutationTime",0),v(this,"pendingNavigation",null),v(this,"doc"),v(this,"onSnapshot");const{doc:t,config:s,onSnapshot:i}=e;this.doc=t,this.onSnapshot=G(i),this.settleTimeout=(n=s.settleTimeout)!=null?n:ab,this.maxWait=(o=s.maxWait)!=null?o:lb,this.debounceMs=(l=s.debounce)!=null?l:cb}handleNavigation(e){this.disabled||this.locked||(this.cancelTimers(),this.disconnectSettlingObserver(),this.pendingNavigation=e,!this.frozen&&this.startDebounce())}cancelPending(){this.cancelTimers(),this.disconnectSettlingObserver(),this.pendingNavigation=null}freeze(){this.frozen=!0,this.cancelTimers(),this.disconnectSettlingObserver()}unfreeze(){this.frozen=!1,this.pendingNavigation&&!this.locked&&!this.disabled&&this.startDebounce()}lock(){this.locked=!0,this.cancelTimers(),this.disconnectSettlingObserver()}unlock(){this.locked=!1,this.pendingNavigation=null}unsetFrozen(){this.frozen=!1}reset(){this.cancelTimers(),this.disconnectSettlingObserver(),this.pendingNavigation=null,this.frozen=!1,this.locked=!1}destroy(){const e=this.pendingNavigation!==null;this.reset(),this.disabled=!0,e&&this.onSnapshot(!0)}startDebounce(){this.debounceTimer=setTimeout(()=>{this.debounceTimer=null,this.startDOMSettling()},this.debounceMs)}startDOMSettling(){if(this.frozen||this.locked||this.disabled)return;this.lastMutationTime=performance.now();const e=On();this.settlingObserver=new e(()=>{this.lastMutationTime=performance.now(),this.settleCheckTimer!==null&&clearTimeout(this.settleCheckTimer),this.settleCheckTimer=setTimeout(()=>this.checkSettled(),this.settleTimeout)}),this.settlingObserver.observe(this.doc,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),this.settleCheckTimer=setTimeout(()=>this.checkSettled(),this.settleTimeout),this.maxWaitTimer=setTimeout(()=>{this.maxWaitTimer=null,this.completeSettling()},this.maxWait)}checkSettled(){this.settleCheckTimer=null;const e=performance.now()-this.lastMutationTime;e>=this.settleTimeout?this.completeSettling():this.settleCheckTimer=setTimeout(()=>this.checkSettled(),this.settleTimeout-e)}completeSettling(){this.frozen||this.locked||this.disabled||this.pendingNavigation&&(this.cancelTimers(),this.disconnectSettlingObserver(),this.pendingNavigation=null,this.onSnapshot(!0))}cancelTimers(){this.debounceTimer!==null&&(clearTimeout(this.debounceTimer),this.debounceTimer=null),this.settleCheckTimer!==null&&(clearTimeout(this.settleCheckTimer),this.settleCheckTimer=null),this.maxWaitTimer!==null&&(clearTimeout(this.maxWaitTimer),this.maxWaitTimer=null)}disconnectSettlingObserver(){this.settlingObserver&&(this.settlingObserver.disconnect(),this.settlingObserver=null)}}class hb{constructor(e){v(this,"trackedLinkElements",new WeakSet),v(this,"mutationCb"),v(this,"adoptedStyleSheetCb"),v(this,"styleMirror",new Bn),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:[]},i=[];for(const n of e){let o;this.styleMirror.has(n)?o=this.styleMirror.getId(n):(o=this.styleMirror.add(n),i.push({styleId:o,rules:Array.from(n.rules||CSSRule,(l,a)=>({rule:$a(l,n.href),index:a}))})),s.styleIds.push(o)}i.length>0&&(s.styles=i),this.adoptedStyleSheetCb(s)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class db{constructor(){v(this,"nodeMap",new WeakMap),v(this,"active",!1)}inOtherBuffer(e,t){const s=this.nodeMap.get(e);return s&&Array.from(s).some(i=>i!==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 fb="3.4.0-alpha.1";let ne,qe,ti,hs=!1;const gr=[];let Zt;try{if(Array.from([1],r=>r*2)[0]!==2){const r=document.createElement("iframe");document.body.appendChild(r),Array.from=((Kn=r.contentWindow)==null?void 0:Kn.Array.from)||Array.from,document.body.removeChild(r)}}catch(r){console.debug("Unable to override Array.from",r)}const Me=ka();function Ce(r={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:s,checkoutEveryNvm:i,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:w,hooks:S,packFn:b,sampling:C={},dataURLOptions:x={},mousemoveWait:M,recordDOM:E=!0,recordCanvas:$=!1,recordCrossOriginIframes:k=!1,recordAfter:L=r.recordAfter==="DOMContentLoaded"?r.recordAfter:"load",flushCustomEvent:_=r.flushCustomEvent!==void 0?r.flushCustomEvent:"after",userTriggeredOnInput:B=!1,collectFonts:W=!1,inlineImages:N=!1,plugins:T,keepIframeSrcFn:D=()=>!1,ignoreCSSAttributes:U=new Set([]),selector:Q,errorHandler:ce}=r;Ay(ce);const se=k?window.parent===window:!0;let fe=!1;if(!se)try{window.parent.document&&(fe=!1)}catch(P){fe=!0}if(se&&!e)throw new Error("emit function is required");if(!se&&!fe)return()=>{};M!==void 0&&C.mousemove===void 0&&(C.mousemove=M),Me.reset();const Se=u===void 0?/.^/:u,he=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},le=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||{},lt=vy(Q);Ln();let Xe,$e=0,ft=0,Lt=0,Ie=!1,pe=null,pt=null;const mt=P=>{for(const ve of T||[])ve.eventProcessor&&(P=ve.eventProcessor(P));return b&&!fe&&(P=b(P)),P},vs=()=>{pe=null,Ie=!1,pt=null,be==null||be.cancelPending(),qe(!0),Re.forEach(P=>{P.resetBuffers(),P.unsetFrozen()}),me&&me.unsetFrozen(),be&&be.unsetFrozen()};ne=(P,ve)=>{var K;const ee=P;if(ee.timestamp=Ae(),ee.checkoutId=Lt,(K=Re[0])!=null&&K.isFrozen()&&!Ie&&ee.type!==O.FullSnapshot&&!(ee.type===O.IncrementalSnapshot&&ee.data.source===A.Mutation)&&(Re.forEach(Ee=>Ee.unfreeze()),me==null||me.unfreeze(),be==null||be.unfreeze()),se)e==null||e(mt(ee),ve);else if(fe){const Ee={type:"rrweb",event:mt(ee),isCheckout:ve};window.parent.postMessage(Ee,"*")}if(ee.type===O.FullSnapshot)Xe=ee,$e=0,ft=0;else if(ee.type===O.IncrementalSnapshot){if(ee.data.source===A.Mutation&&ee.data.isAttachIframe)return;if(ee.data.source!==A.Visibility){$e++;const Ee=s&&$e>=s,X=t&&ee.timestamp-Xe.timestamp>t;if(Ee||X)if(n){Ie||(Ie=!0,pt=Ae(),Re.forEach(Qc=>Qc.freeze()),me==null||me.freeze()),pe&&clearTimeout(pe);const Pt=Ae()-pt,Kc=n*3;Pt>=Kc?vs():pe=setTimeout(()=>vs(),n)}else qe(!0)}}};const ws=P=>{ne({type:O.IncrementalSnapshot,data:R({source:A.Mutation},P)})},Xc=P=>{ne({type:O.IncrementalSnapshot,data:R({source:A.Visibility},P)})},Yn=P=>ne({type:O.IncrementalSnapshot,data:R({source:A.Scroll},P)}),Zn=P=>ne({type:O.IncrementalSnapshot,data:R({source:A.CanvasMutation},P)}),Jc=P=>ne({type:O.IncrementalSnapshot,data:R({source:A.AdoptedStyleSheet},P)}),ct=new hb({mutationCb:ws,adoptedStyleSheetCb:Jc}),ut=new Uy({mirror:Me,mutationCb:ws,stylesheetManager:ct,recordCrossOriginIframes:k,wrappedEmit:ne});for(const P of T||[])P.getMirror&&P.getMirror({nodeMirror:Me,crossOriginIframeMirror:ut.crossOriginIframeMirror,crossOriginIframeStyleMirror:ut.crossOriginIframeStyleMirror});const kr=new db;ti=new Ky({recordCanvas:$,mutationCb:Zn,win:window,blockClass:o,blockSelector:l,mirror:Me,sampling:C.canvas,dataURLOptions:x});const Ss=new Vy({mutationCb:ws,scrollCb:Yn,bypassOptions:{blockClass:o,blockSelector:l,maskTextClass:h,maskTextSelector:d,excludeAttribute:Se,inlineStylesheet:f,maskInputOptions:he,dataURLOptions:x,maskTextFn:w,maskInputFn:g,recordCanvas:$,inlineImages:N,sampling:C,slimDOMOptions:le,iframeManager:ut,stylesheetManager:ct,canvasManager:ti,keepIframeSrcFn:D,processedNodeManager:kr,selectorOptions:lt},mirror:Me}),qc=E&&(i!=null||(C==null?void 0:C.visibility)!==void 0&&(C==null?void 0:C.visibility)!==!1);let me;if(qc){const P=typeof(C==null?void 0:C.visibility)=="object"&&(C==null?void 0:C.visibility)!==null?C.visibility:{},ve=P.recordVisibility===!0;me=new ob({doc:document,mirror:Me,sampling:P,mutationCb:ve?Xc:()=>{},notifyActivity:i!=null?K=>{if(ft+=K,ft>=i)if(ft=0,n){Ie||(Ie=!0,pt=Ae(),Re.forEach(X=>X.freeze()),me==null||me.freeze()),pe&&clearTimeout(pe);const ee=Ae()-pt,Ee=n*3;ee>=Ee?vs():pe=setTimeout(()=>vs(),n)}else qe(!0)}:void 0})}qe=(P=!1)=>{if(!E)return;Lt++,ne({type:O.Meta,data:{href:window.location.href,width:kn(),height:$n()}},P),ct.reset(),Ss.init(),Re.forEach(K=>K.lock()),me==null||me.lock(),be==null||be.lock();const ve=Yh(document,{mirror:Me,blockClass:o,blockSelector:l,maskTextClass:h,maskTextSelector:d,excludeAttribute:Se,inlineStylesheet:f,maskAllInputs:he,maskTextFn:w,maskInputFn:g,slimDOM:le,dataURLOptions:x,recordCanvas:$,inlineImages:N,onSerialize:K=>{At(K,Me)&&ut.addIframe(K),Fn(K,Me)&&ct.trackLinkElement(K),tt(K)&&Ss.addShadowRoot(V.shadowRoot(K),document)},onIframeLoad:(K,ee)=>{ut.attachIframe(K,ee),Ss.observeAttachShadow(K)},onStylesheetLoad:(K,ee)=>{ct.attachLinkElement(K,ee)},keepIframeSrcFn:D,selector:Q});if(!ve)return console.warn("Failed to snapshot the document");ne({type:O.FullSnapshot,data:{node:ve,initialOffset:Dn(window)}},P),Re.forEach(K=>K.unlock()),me==null||me.unlock(),be==null||be.unlock(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ct.adoptStyleSheets(document.adoptedStyleSheets,Me.getId(document))},Zt=()=>{for(const P of gr)ne(P);gr.length=0};let be;const _r=C.navigation;if(_r!==!1){const P=typeof _r=="object"?_r:{};be=new ub({doc:document,config:P,onSnapshot:ve=>{Ie&&(pe&&(clearTimeout(pe),pe=null),Ie=!1,pt=null,Re.forEach(K=>{K.resetBuffers(),K.unsetFrozen()}),me==null||me.unsetFrozen()),qe(ve)}})}try{const P=[],ve=ee=>{var Ee;return G(Wy)({mutationCb:ws,mousemoveCb:(X,Pt)=>ne({type:O.IncrementalSnapshot,data:{source:Pt,positions:X}}),mouseInteractionCb:X=>ne({type:O.IncrementalSnapshot,data:R({source:A.MouseInteraction},X)}),scrollCb:Yn,viewportResizeCb:X=>ne({type:O.IncrementalSnapshot,data:R({source:A.ViewportResize},X)}),navigationCb:X=>{be?be.handleNavigation(X):qe(!0)},inputCb:X=>ne({type:O.IncrementalSnapshot,data:R({source:A.Input},X)}),mediaInteractionCb:X=>ne({type:O.IncrementalSnapshot,data:R({source:A.MediaInteraction},X)}),styleSheetRuleCb:X=>ne({type:O.IncrementalSnapshot,data:R({source:A.StyleSheetRule},X)}),styleDeclarationCb:X=>ne({type:O.IncrementalSnapshot,data:R({source:A.StyleDeclaration},X)}),canvasMutationCb:Zn,visibilityManager:me,fontCb:X=>ne({type:O.IncrementalSnapshot,data:R({source:A.Font},X)}),selectionCb:X=>{ne({type:O.IncrementalSnapshot,data:R({source:A.Selection},X)})},customElementCb:X=>{ne({type:O.IncrementalSnapshot,data:R({source:A.CustomElement},X)})},blockClass:o,ignoreClass:a,ignoreSelector:c,maskTextClass:h,maskTextSelector:d,excludeAttribute:Se,maskInputOptions:he,inlineStylesheet:f,sampling:C,recordDOM:E,recordCanvas:$,inlineImages:N,userTriggeredOnInput:B,collectFonts:W,doc:ee,maskInputFn:g,maskTextFn:w,keepIframeSrcFn:D,blockSelector:l,slimDOMOptions:le,dataURLOptions:x,selectorOptions:lt,mirror:Me,iframeManager:ut,stylesheetManager:ct,shadowDomManager:Ss,processedNodeManager:kr,canvasManager:ti,ignoreCSSAttributes:U,plugins:((Ee=T==null?void 0:T.filter(X=>X.observer))==null?void 0:Ee.map(X=>({observer:X.observer,options:X.options,callback:Pt=>ne({type:O.Plugin,data:{plugin:X.name,payload:Pt}})})))||[]},S)};ut.addLoadListener(ee=>{try{P.push(ve(ee.contentDocument))}catch(Ee){console.warn(Ee)}});const K=()=>{_==="before"&&Zt(),qe(),P.push(ve(document)),hs=!0,_==="after"&&Zt()};return document.readyState==="interactive"||document.readyState==="complete"?K():(P.push(ue("DOMContentLoaded",()=>{ne({type:O.DomContentLoaded,data:{}}),L==="DOMContentLoaded"&&K()})),P.push(ue("load",()=>{ne({type:O.Load,data:{}}),L==="load"&&K()},window))),()=>{pe&&(clearTimeout(pe),pe=null),Zt(),P.forEach(ee=>ee()),be==null||be.destroy(),kr.destroy(),hs=!1,Iy()}}catch(P){console.warn(P)}}Ce.getVersion=()=>fb;Ce.isRecording=()=>hs;Ce.flushCustomEventQueue=()=>{console.warn(`[rrweb] CustomEvent flushing: ${gr.length} events`),Zt()};Ce.addCustomEvent=(r,e)=>{const t={type:O.Custom,data:{tag:r,payload:e}};if(!hs){console.warn(`[rrweb] CustomEvent buffered before/after recording start: ${r}`),gr.push(t);return}ne(t)};Ce.freezePage=()=>{Re.forEach(r=>r.freeze())};Ce.takeFullSnapshot=r=>{if(!hs)throw new Error("please take full snapshot after start recording");qe(r)};Ce.mirror=Me;function Pc(r){return{all:r=r||new Map,on:function(e,t){var s=r.get(e);s?s.push(t):r.set(e,[t])},off:function(e,t){var s=r.get(e);s&&(t?s.splice(s.indexOf(t)>>>0,1):r.set(e,[]))},emit:function(e,t){var s=r.get(e);s&&s.slice().map(function(i){i(t)}),(s=r.get("*"))&&s.slice().map(function(i){i(e,t)})}}}const pb=Object.freeze(Object.defineProperty({__proto__:null,default:Pc},Symbol.toStringTag,{value:"Module"}));function mb(r=window,e=document){if("scrollBehavior"in e.documentElement.style&&r.__forceSmoothScrollPolyfill__!==!0)return;const t=r.HTMLElement||r.Element,s=468,i={scroll:r.scroll||r.scrollTo,scrollBy:r.scrollBy,elementScroll:t.prototype.scroll||a,scrollIntoView:t.prototype.scrollIntoView},n=r.performance&&r.performance.now?r.performance.now.bind(r.performance):Date.now;function o(g){const w=["MSIE ","Trident/","Edge/"];return new RegExp(w.join("|")).test(g)}const l=o(r.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 S=r.getComputedStyle(g,null)["overflow"+w];return S==="auto"||S==="scroll"}function f(g){const w=h(g,"Y")&&d(g,"Y"),S=h(g,"X")&&d(g,"X");return w||S}function m(g){for(;g!==e.body&&f(g)===!1;)g=g.parentNode||g.host;return g}function y(g){const w=n();let S,b,C,x=(w-g.startTime)/s;x=x>1?1:x,S=c(x),b=g.startX+(g.x-g.startX)*S,C=g.startY+(g.y-g.startY)*S,g.method.call(g.scrollable,b,C),(b!==g.x||C!==g.y)&&r.requestAnimationFrame(y.bind(r,g))}function p(g,w,S){let b,C,x,M;const E=n();g===e.body?(b=r,C=r.scrollX||r.pageXOffset,x=r.scrollY||r.pageYOffset,M=i.scroll):(b=g,C=g.scrollLeft,x=g.scrollTop,M=a),y({scrollable:b,method:M,startTime:E,startX:C,startY:x,x:w,y:S})}r.scroll=r.scrollTo=function(){if(arguments[0]!==void 0){if(u(arguments[0])===!0){i.scroll.call(r,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:r.scrollX||r.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:r.scrollY||r.pageYOffset);return}p.call(r,e.body,arguments[0].left!==void 0?~~arguments[0].left:r.scrollX||r.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:r.scrollY||r.pageYOffset)}},r.scrollBy=function(){if(arguments[0]!==void 0){if(u(arguments[0])){i.scrollBy.call(r,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(r,e.body,~~arguments[0].left+(r.scrollX||r.pageXOffset),~~arguments[0].top+(r.scrollY||r.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");i.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;p.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){i.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){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const g=m(this),w=g.getBoundingClientRect(),S=this.getBoundingClientRect();g!==e.body?(p.call(this,g,g.scrollLeft+S.left-w.left,g.scrollTop+S.top-w.top),r.getComputedStyle(g).position!=="fixed"&&r.scrollBy({left:w.left,top:w.top,behavior:"smooth"})):r.scrollBy({left:S.left,top:S.top,behavior:"smooth"})}}class gb{constructor(e=[],t){v(this,"timeOffset",0),v(this,"speed"),v(this,"actions"),v(this,"raf",null),v(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 i=Math.floor((t+s)/2);if(this.actions[i].delay<e.delay)t=i+1;else if(this.actions[i].delay>e.delay)s=i-1;else return i+1}return t}}function wa(r,e){if(r.type===O.IncrementalSnapshot&&r.data.source===A.MouseMove&&r.data.positions&&r.data.positions.length){const t=r.data.positions[0].timeOffset,s=r.timestamp+t;return r.delay=s-e,s-e}return r.delay=r.timestamp-e,r.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 va(s,e){var t=typeof Symbol=="function"&&s[Symbol.iterator];if(!t)return s;var r,i,n=t.call(s),o=[];try{for(;(e===void 0||e-- >0)&&!(r=n.next()).done;)o.push(r.value)}catch(l){i={error:l}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(i)throw i.error}}return o}var Mt;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(Mt||(Mt={}));var Pc={type:"xstate.init"};function ti(s){return s===void 0?[]:[].concat(s)}function wt(s){return{type:"xstate.assign",assignment:s}}function wa(s,e){return typeof(s=typeof s=="string"&&e&&e[s]?e[s]:s)=="string"?{type:s}:typeof s=="function"?{type:s.name,exec:s}:s}function ys(s){return function(e){return s===e}}function Fc(s){return typeof s=="string"?{type:s}:s}function Sa(s,e){return{value:s,context:e,actions:[],changed:!1,matches:ys(s)}}function Ca(s,e,t){var r=e,i=!1;return[s.filter(function(n){if(n.type==="xstate.assign"){i=!0;var o=Object.assign({},r);return typeof n.assignment=="function"?o=n.assignment(r,t):Object.keys(n.assignment).forEach(function(l){o[l]=typeof n.assignment[l]=="function"?n.assignment[l](r,t):n.assignment[l]}),r=o,!1}return!0}),r,i]}function zc(s,e){e===void 0&&(e={});var t=va(Ca(ti(s.states[s.initial].entry).map(function(o){return wa(o,e.actions)}),s.context,Pc),2),r=t[0],i=t[1],n={config:s,_options:e,initialState:{value:s.initial,actions:r,context:i,matches:ys(s.initial)},transition:function(o,l){var a,c,u=typeof o=="string"?{value:o,context:s.context}:o,h=u.value,d=u.context,f=Fc(l),m=s.states[h];if(m.on){var y=ti(m.on[f.type]);try{for(var p=function(D){var U=typeof Symbol=="function"&&Symbol.iterator,K=U&&D[U],ce=0;if(K)return K.call(D);if(D&&typeof D.length=="number")return{next:function(){return D&&ce>=D.length&&(D=void 0),{value:D&&D[ce++],done:!D}}};throw new TypeError(U?"Object is not iterable.":"Symbol.iterator is not defined.")}(y),g=p.next();!g.done;g=p.next()){var w=g.value;if(w===void 0)return Sa(h,d);var S=typeof w=="string"?{target:w}:w,b=S.target,C=S.actions,x=C===void 0?[]:C,M=S.cond,E=M===void 0?function(){return!0}:M,k=b===void 0,_=b!=null?b:h,L=s.states[_];if(E(d,f)){var $=va(Ca((k?ti(x):[].concat(m.exit,x,L.entry).filter(function(D){return D})).map(function(D){return wa(D,n._options.actions)}),d,f),3),B=$[0],W=$[1],N=$[2],T=b!=null?b:h;return{value:T,context:W,actions:B,changed:b!==h||B.length>0||N,matches:ys(T)}}}}catch(D){a={error:D}}finally{try{g&&!g.done&&(c=p.return)&&c.call(p)}finally{if(a)throw a.error}}}return Sa(h,d)}};return n}var xa=function(s,e){return s.actions.forEach(function(t){var r=t.exec;return r&&r(s.context,e)})};function Bc(s){var e=s.initialState,t=Mt.NotStarted,r=new Set,i={_machine:s,send:function(n){t===Mt.Running&&(e=s.transition(e,n),xa(e,Fc(n)),r.forEach(function(o){return o(e)}))},subscribe:function(n){return r.add(n),n(e),{unsubscribe:function(){return r.delete(n)}}},start:function(n){if(n){var o=typeof n=="object"?n:{context:s.config.context,value:n};e={value:o.value,actions:[],context:o.context,matches:ys(o.value)}}return t=Mt.Running,xa(e,Pc),i},stop:function(){return t=Mt.Stopped,r.clear(),i},get state(){return e},get status(){return t}};return i}function db(s,e){for(let t=s.length-1;t>=0;t--){const r=s[t];if(r.type===O.Meta&&r.timestamp<=e)return s.slice(t)}return s}function fb(s,{getCastFn:e,applyEventsSynchronously:t,emitter:r}){const i=zc({id:"player",context:s,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:wt({lastPlayedEvent:(n,o)=>o.type==="CAST_EVENT"?o.payload.event:n.lastPlayedEvent}),recordTimeOffset:wt((n,o)=>{let l=n.timeOffset;return"payload"in o&&"timeOffset"in o.payload&&(l=o.payload.timeOffset),oe(R({},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)ba(m,c);const h=db(a,c);let d=u==null?void 0:u.timestamp;(u==null?void 0:u.type)===O.IncrementalSnapshot&&u.data.source===A.MouseMove&&(d=u.timestamp+((o=u.data.positions[0])==null?void 0:o.timeOffset)),c<(d||0)&&r.emit(Y.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),r.emit(Y.Flush),l.start()},pause(n){n.timer.clear()},resetLastPlayedEvent:wt(n=>oe(R({},n),{lastPlayedEvent:null})),startLive:wt({baselineTime:(n,o)=>(n.timer.start(),o.type==="TO_LIVE"&&o.payload.baselineTime?o.payload.baselineTime:Date.now())}),addEvent:wt((n,o)=>{const{baselineTime:l,timer:a,events:c}=n;if(o.type==="ADD_EVENT"){const{event:u}=o.payload;ba(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 oe(R({},n),{events:c})})}});return Bc(i)}function pb(s){const e=zc({id:"speed",context:s,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,r)=>{"payload"in r&&t.timer.setSpeed(r.payload.speed)},recordSpeed:wt({normalSpeed:t=>t.timer.speed}),restoreSpeed:t=>{t.timer.setSpeed(t.normalSpeed)}}});return Bc(e)}const mb=s=>[`.${s} { background: currentColor }`,"noscript { display: none !important; }"],Ea=new Map;function Wc(s,e){let t=Ea.get(s);return t||(t=new Map,Ea.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}function st(s,e,t){return async r=>{if(r&&typeof r=="object"&&"rr_type"in r)if(t&&(t.isUnchanged=!1),r.rr_type==="ImageBitmap"&&"args"in r){const i=await st(s,e,t)(r.args);return await createImageBitmap.apply(null,i)}else if("index"in r){if(t||e===null)return r;const{rr_type:i,index:n}=r;return Wc(e,i)[n]}else if("args"in r){const{rr_type:i,args:n}=r,o=window[i];return new o(...await Promise.all(n.map(st(s,e,t))))}else{if("base64"in r)return Vy(r.base64);if("src"in r){const i=s.get(r.src);if(i)return i;{const n=new Image;return n.src=r.src,s.set(r.src,n),n}}else if("data"in r&&r.rr_type==="Blob"){const i=await Promise.all(r.data.map(st(s,e,t)));return new Blob(i,{type:r.type})}}else if(Array.isArray(r))return await Promise.all(r.map(st(s,e,t)));return r}}function gb(s,e){try{return e===Ye.WebGL?s.getContext("webgl")||s.getContext("experimental-webgl"):s.getContext("webgl2")}catch(t){return null}}const yb=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function bb(s,e){if(!(e!=null&&e.constructor))return;const{name:t}=e.constructor;if(!yb.includes(t))return;const r=Wc(s,t);r.includes(e)||r.push(e)}async function vb({mutation:s,target:e,type:t,imageMap:r,errorHandler:i}){try{const n=gb(e,t);if(!n)return;if(s.setter){n[s.property]=s.args[0];return}const o=n[s.property],l=await Promise.all(s.args.map(st(r,n))),a=o.apply(n,l);bb(n,a);const c=!1}catch(n){i(s,n)}}async function wb({event:s,mutations:e,target:t,imageMap:r,errorHandler:i}){const n=t.getContext("2d");if(!n){i(e[0],new Error("Canvas context is null"));return}const o=e.map(async a=>Promise.all(a.args.map(st(r,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"?(r.get(s),h.apply(n,u.args)):h.apply(n,a)}catch(h){i(u,h)}})}async function Hi({event:s,mutation:e,target:t,imageMap:r,canvasEventMap:i,errorHandler:n}){try{const o=i.get(s)||e,l="commands"in o?o.commands:[o];if([Ye.WebGL,Ye.WebGL2].includes(e.type)){for(let a=0;a<l.length;a++){const c=l[a];await vb({mutation:c,type:e.type,target:t,imageMap:r,errorHandler:n})}return}await wb({event:s,mutations:l,target:t,imageMap:r,errorHandler:n})}catch(o){n(e,o)}}class Sb{constructor(e){v(this,"mediaMap",new Map),v(this,"warn"),v(this,"service"),v(this,"speedService"),v(this,"emitter"),v(this,"getCurrentTime"),v(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(Y.Start,this.start.bind(this)),this.emitter.on(Y.SkipStart,this.start.bind(this)),this.emitter.on(Y.Pause,this.pause.bind(this)),this.emitter.on(Y.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(e={pause:!1}){this.mediaMap.forEach((t,r)=>{this.syncTargetWithState(r),e.pause&&r.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:e,target:t,mediaState:r}){if(r.isPlaying){const n=(e-r.lastInteractionTimeOffset)/1e3*r.playbackRate,o="duration"in t&&t.duration;if(Number.isNaN(o)){this.waitForMetadata(t);return}let l=r.currentTimeAtLastInteraction+n;t.loop&&o!==!1&&(l=l%o),t.currentTime=l}else t.pause(),t.currentTime=r.currentTimeAtLastInteraction}waitForMetadata(e){if(this.metadataCallbackMap.has(e)||!("addEventListener"in e))return;const t=()=>{this.metadataCallbackMap.delete(e);const r=this.mediaMap.get(e);r&&this.seekTo({time:this.getCurrentTime(),target:e,mediaState:r})};this.metadataCallbackMap.set(e,t),e.addEventListener("loadedmetadata",t,{once:!0})}getMediaStateFromMutation({target:e,timeOffset:t,mutation:r}){var f,m,y,p,g;const i=this.mediaMap.get(e),{type:n,playbackRate:o,currentTime:l,muted:a,volume:c,loop:u}=r;return{isPlaying:n===Qe.Play||n!==Qe.Pause&&((i==null?void 0:i.isPlaying)||e.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(f=l!=null?l:i==null?void 0:i.currentTimeAtLastInteraction)!=null?f:0,lastInteractionTimeOffset:t,playbackRate:(m=o!=null?o:i==null?void 0:i.playbackRate)!=null?m:1,volume:(y=c!=null?c:i==null?void 0:i.volume)!=null?y:1,muted:(p=a!=null?a:i==null?void 0:i.muted)!=null?p:e.getAttribute("muted")===null,loop:(g=u!=null?u:i==null?void 0:i.loop)!=null?g:e.getAttribute("loop")===null}}syncTargetWithState(e){const t=this.mediaMap.get(e);if(!t)return;const{muted:r,loop:i,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=r,e.loop=i,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,r){if(!["AUDIO","VIDEO"].includes(e.nodeName))return;const i=e,n=r.getMeta(i);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=i.getAttribute("autoplay")!==null,a&&o&&i.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=i.getAttribute("muted")!==null;let h=!1;typeof l.rr_mediaLoop=="boolean"?h=l.rr_mediaLoop:h=i.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(i,{isPlaying:a,currentTimeAtLastInteraction:f,lastInteractionTimeOffset:t,playbackRate:c,volume:d,muted:u,loop:h}),this.syncTargetWithState(i)}mediaMutation({target:e,timeOffset:t,mutation:r}){this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:t,mutation:r})),this.syncTargetWithState(e)}isSupportedMediaElement(e){return["AUDIO","VIDEO"].includes(e.nodeName)}reset(){this.mediaMap.clear()}}function Yr(s,e){if(s.nodeName!=="DIALOG"||s instanceof Re)return;const t=s,r=t.open,i=r&&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(!(r&&!(i&&n==="non-modal"||!i&&l))){if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}r&&t.close(),o&&(l?t.showModal():t.show())}}function Cb(s,e){if(s.nodeName!=="DIALOG"||s instanceof Re)return;const t=s;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 xb=5*1e3,Eb=Lc||cb,Ma="[replayer]",ri={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Aa(s){return s.type==O.IncrementalSnapshot&&(s.data.source==A.TouchMove||s.data.source==A.MouseInteraction&&s.data.type==Z.TouchStart)}class Mb{constructor(e,t){if(v(this,"wrapper"),v(this,"iframe"),v(this,"service"),v(this,"speedService"),v(this,"config"),v(this,"usingVirtualDom",!1),v(this,"virtualDom",new Lt),v(this,"mouse"),v(this,"mouseTail",null),v(this,"tailPositions",[]),v(this,"emitter",Eb()),v(this,"nextUserInteractionEvent"),v(this,"legacy_missingNodeRetryMap",{}),v(this,"cache",To()),v(this,"imageMap",new Map),v(this,"canvasEventMap",new Map),v(this,"mirror",Da()),v(this,"styleMirror",new Fn),v(this,"mediaManager"),v(this,"firstFullSnapshot",null),v(this,"newDocumentQueue",[]),v(this,"mousePos",null),v(this,"touchActive",null),v(this,"lastMouseDownEvent",null),v(this,"lastHoveredRootNode"),v(this,"lastSelectionData",null),v(this,"constructedStyleMutations",[]),v(this,"adoptedStyleSheets",[]),v(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)))}),v(this,"applyEventsSynchronously",l=>{for(const a of l){switch(a.type){case O.DomContentLoaded:case O.Load:case O.Custom:continue;case O.FullSnapshot:case O.Meta:case O.Plugin:case O.IncrementalSnapshot:break}this.getCastFn(a,!0)()}}),v(this,"getCastFn",(l,a=!1)=>{let c;switch(l.type){case O.DomContentLoaded:case O.Load:break;case O.Custom:c=()=>{this.emitter.emit(Y.CustomEvent,l)};break;case O.Meta:c=()=>this.emitter.emit(Y.Resize,{width:l.data.width,height:l.data.height});break;case O.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 O.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/xb),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:d}),this.emitter.emit(Y.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(Y.Finish))};let f=50;l.type===O.IncrementalSnapshot&&l.data.source===A.MouseMove&&l.data.positions.length&&(f+=Math.max(0,-l.data.positions[0].timeOffset)),setTimeout(d,f)}this.emitter.emit(Y.EventCast,l)}}),!(t!=null&&t.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");const r={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:ri,useVirtualDom:!0,logger:console};this.config=Object.assign({},r,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(Y.Resize,this.handleResize),this.setupDom();for(const l of this.config.plugins||[])l.getMirror&&l.getMirror({nodeMirror:this.mirror});this.emitter.on(Y.Flush,()=>{if(this.usingVirtualDom){const l={mirror:this.mirror,applyCanvas:(a,c,u)=>{Hi({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===A.StyleSheetRule?this.applyStyleSheetRule(a,c):a.source===A.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{ds(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=fs(c.node,this.mirror,this.virtualDom.mirror);ds(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(Y.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});const i=new hb([],{speed:this.config.speed});this.service=fb({events:e.map(l=>t&&t.unpackFn?t.unpackFn(l):l).sort((l,a)=>l.timestamp-a.timestamp),timer:i,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(Y.StateChange,{player:l})}),this.speedService=pb({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(l=>{this.emitter.emit(Y.StateChange,{speed:l})}),this.mediaManager=new Sb({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===O.Meta),o=this.service.state.context.events.find(l=>l.type===O.FullSnapshot);if(n){const{width:l,height:a}=n.data;setTimeout(()=>{this.emitter.emit(Y.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(Aa)&&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,r;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}})),(r=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||r.classList.remove("rrweb-paused"),this.emitter.emit(Y.Start)}pause(e){var t,r;e===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof e=="number"&&(this.play(e),this.service.send({type:"PAUSE"})),(r=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||r.classList.add("rrweb-paused"),this.emitter.emit(Y.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(Y.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(Y.Destroy)}startLive(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}addEvent(e){const t=this.config.unpackFn?this.config.unpackFn(e):e;Aa(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=To()}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&&(ub(this.iframe.contentWindow,this.iframe.contentDocument),kn(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 r=[],i=new Set,n=(a,c)=>{if(a.nodeName==="DIALOG"&&i.add(a),this.collectIframeAndAttachDocument(r,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(),Gf(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 r)this.attachDocumentToIframe(a,c),this.newDocumentQueue=this.newDocumentQueue.filter(u=>u!==a);const{documentElement:o,head:l}=this.iframe.contentDocument;this.insertStyleRules(o,l),i.forEach(a=>Yr(a)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(Y.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){var r;const i=mb(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),!!i.length)if(this.usingVirtualDom){const n=this.virtualDom.createElement("style");this.virtualDom.mirror.add(n,mc(n,this.virtualDom.unserializedId)),e.insertBefore(n,t),n.rules.push({source:A.StyleSheetRule,adds:i.map((o,l)=>({rule:o,index:l}))})}else{const n=document.createElement("style");e.insertBefore(n,t);for(let o=0;o<i.length;o++)(r=n.sheet)==null||r.insertRule(i[o],o)}}attachDocumentToIframe(e,t){const r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],n=new Set,o=(l,a)=>{l.nodeName==="DIALOG"&&n.add(l),this.collectIframeAndAttachDocument(i,l);const c=r.getMeta(l);if((c==null?void 0:c.type)===Ve.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})};Qt(e.node,{doc:t.contentDocument,mirror:r,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(t.contentDocument,e.node.id);for(const{mutationInQueue:l,builtNode:a}of i)this.attachDocumentToIframe(l,a),this.newDocumentQueue=this.newDocumentQueue.filter(c=>c!==l);n.forEach(l=>Yr(l))}collectIframeAndAttachDocument(e,t){if(At(t,this.mirror)){const r=this.newDocumentQueue.find(i=>i.parentId===this.mirror.getId(t));r&&e.push({mutationInQueue:r,builtNode:t})}}waitForStylesheetLoad(){var e;const t=(e=this.iframe.contentDocument)==null?void 0:e.head;if(t){const r=new Set;let i,n=this.service.state;const o=()=>{n=this.service.state};this.emitter.on(Y.Start,o),this.emitter.on(Y.Pause,o);const l=()=>{this.emitter.off(Y.Start,o),this.emitter.off(Y.Pause,o)};t.querySelectorAll('link[rel="stylesheet"]').forEach(a=>{a.sheet||(r.add(a),a.addEventListener("load",()=>{r.delete(a),r.size===0&&i!==-1&&(n.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(Y.LoadStylesheetEnd),i&&clearTimeout(i),l())}))}),r.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(Y.LoadStylesheetStart),i=setTimeout(()=>{n.matches("playing")&&this.play(this.getCurrentTime()),i=-1,l()},this.config.loadTimeout))}}async preloadAllImages(){const e=[];for(const t of this.service.state.context.events)t.type===O.IncrementalSnapshot&&t.data.source===A.CanvasMutation&&(e.push(this.deserializeAndPreloadCanvasEvents(t.data,t)),("commands"in t.data?t.data.commands:[t.data]).forEach(i=>{this.preloadImages(i,t)}));return Promise.all(e)}preloadImages(e,t){if(e.property==="drawImage"&&typeof e.args[0]=="string"&&!this.imageMap.has(t)){const r=document.createElement("canvas"),i=r.getContext("2d"),n=i==null?void 0:i.createImageData(r.width,r.height);i==null||i.putImageData(n,0,0)}}async deserializeAndPreloadCanvasEvents(e,t){if(!this.canvasEventMap.has(t)){const r={isUnchanged:!0};if("commands"in e){const i=await Promise.all(e.commands.map(async n=>{const o=await Promise.all(n.args.map(st(this.imageMap,null,r)));return oe(R({},n),{args:o})}));r.isUnchanged===!1&&this.canvasEventMap.set(t,oe(R({},e),{commands:i}))}else{const i=await Promise.all(e.args.map(st(this.imageMap,null,r)));r.isUnchanged===!1&&this.canvasEventMap.set(t,oe(R({},e),{args:i}))}}}applyIncremental(e,t){var r,i,n;const{data:o}=e;switch(o.source){case A.Mutation:{try{this.applyMutation(o,t)}catch(l){this.warn(`Exception in mutation ${l.message||l}`,o)}break}case A.Drag:case A.TouchMove:case A.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-((r=o.positions[0])==null?void 0:r.timeOffset)});break;case A.MouseInteraction:{if(o.id===-1)break;const l=new Event(it(Z[o.type])),a=this.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);this.emitter.emit(Y.MouseInteraction,{type:o.type,target:a});const{triggerFocus:c}=this.config;switch(o.type){case Z.Blur:"blur"in a&&a.blur();break;case Z.Focus:c&&a.focus&&a.focus({preventScroll:!0});break;case Z.Click:case Z.TouchStart:case Z.TouchEnd:case Z.MouseDown:case Z.MouseUp:t?(o.type===Z.TouchStart?this.touchActive=!0:o.type===Z.TouchEnd&&(this.touchActive=!1),o.type===Z.MouseDown?this.lastMouseDownEvent=[a,l]:o.type===Z.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:o.x||0,y:o.y||0,id:o.id,debugData:o}):(o.type===Z.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(o.x||0,o.y||0,o.id,t,o),o.type===Z.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):o.type===Z.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):o.type===Z.TouchEnd?this.mouse.classList.remove("touch-active"):a.dispatchEvent(l));break;case Z.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:a.dispatchEvent(l)}break}case A.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 A.ViewportResize:this.emitter.emit(Y.Resize,{width:o.width,height:o.height});break;case A.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 A.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 A.StyleSheetRule:case A.StyleDeclaration:{this.usingVirtualDom?o.styleId?this.constructedStyleMutations.push(o):o.id&&((i=this.virtualDom.mirror.getNode(o.id))==null||i.rules.push(o)):this.applyStyleSheetMutation(o);break}case A.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);Hi({event:e,mutation:o,target:l,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case A.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 A.Selection:{if(t){this.lastSelectionData=o;break}this.applySelection(o);break}case A.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(o):this.applyAdoptedStyleSheet(o);break}case A.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,dg(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=pc(u.node,this.virtualDom,this.mirror);h&&(u.node=h)}catch(u){this.warn(u)}const r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes=e.removes.filter(c=>r.getNode(c.id)?!0:(this.warnNodeNotFound(e,c.id),!1)),e.removes.forEach(c=>{var u;const h=r.getNode(c.id);if(!h)return;let d=r.getNode(c.parentId);if(!d)return this.warnNodeNotFound(e,c.parentId);if(c.isShadow&&tt(d)&&(d=d.shadowRoot),r.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 i=R({},this.legacy_missingNodeRetryMap),n=[],o=c=>{let u=null;return c.nextId&&(u=r.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=r.getNode(c.parentId);if(!d)return c.node.type===Ve.Document?this.newDocumentQueue.push(c):n.push(c);c.node.isShadow&&(tt(d)||d.attachShadow({mode:"open"}),d=d.shadowRoot);let f=null,m=null;if(c.previousId&&(f=r.getNode(c.previousId)),c.nextId&&(m=r.getNode(c.nextId)),o(c))return n.push(c);if(c.node.rootId&&!r.getNode(c.node.rootId))return;const y=c.node.rootId?r.getNode(c.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(At(d,r)){this.attachDocumentToIframe(c,d);return}const p=(S,b)=>{if(!this.usingVirtualDom){Yr(S);for(const C of this.config.plugins||[])C.onBuild&&C.onBuild(S,{id:b,replayer:this})}},g=Qt(c.node,{doc:y,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:p});if(c.previousId===-1||c.nextId===-1){i[c.node.id]={node:g,mutation:c};return}const w=r.getMeta(d);if(w&&w.type===Ve.Element&&c.node.type===Ve.Text){const S=Array.isArray(d.childNodes)?d.childNodes:Array.from(d.childNodes);if(w.tagName==="textarea")for(const b of S)b.nodeType===d.TEXT_NODE&&d.removeChild(b);else if(w.tagName==="style"&&S.length===1)for(const b of S)b.nodeType===d.TEXT_NODE&&!r.hasNode(b)&&(g.textContent=b.textContent,d.removeChild(b))}else if((w==null?void 0:w.type)===Ve.Document){const S=d;c.node.type===Ve.DocumentType&&((u=S.childNodes[0])==null?void 0:u.nodeType)===Node.DOCUMENT_TYPE_NODE&&S.removeChild(S.childNodes[0]),g.nodeName==="HTML"&&S.documentElement&&S.removeChild(S.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=[]),At(g,this.mirror)){const S=this.mirror.getId(g),b=this.newDocumentQueue.find(C=>C.parentId===S);b&&(this.attachDocumentToIframe(b,g),this.newDocumentQueue=this.newDocumentQueue.filter(C=>C!==b))}(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(i,d,g,c)};e.adds.forEach(c=>{l(c)});const a=Date.now();for(;n.length;){const c=vc(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)r.getNode(u.value.parentId)?_n(u,d=>{l(d)}):this.debug("Drop resolve tree since there is no parent for the root node.",u)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),wc(e.texts).forEach(c=>{var u;const h=r.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=xs(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=r.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"&&Cb(h,c);else if(typeof f=="string")try{if(d==="_cssText"&&(h.nodeName==="LINK"||h.nodeName==="STYLE"))try{const m=r.getMeta(h),y=Qt(oe(R({},m),{attributes:R(R({},m.attributes),c.attributes)}),{doc:h.ownerDocument,mirror:r,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),r.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"&&Yr(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 r,i;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)(r=this.iframe.contentWindow)==null||r.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else if((o==null?void 0:o.type)===Ve.Document)(i=n.defaultView)==null||i.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(r){}}applySelection(e){try{const t=new Set,r=e.ranges.map(({start:i,startOffset:n,end:o,endOffset:l})=>{const a=this.mirror.getNode(i),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(i=>i.removeAllRanges()),r.forEach(i=>{var n;return i&&((n=i.selection)==null?void 0:n.addRange(i.range))})}catch(t){}}applyStyleSheetMutation(e){var t;let r=null;e.styleId?r=this.styleMirror.getStyle(e.styleId):e.id&&(r=((t=this.mirror.getNode(e.id))==null?void 0:t.sheet)||null),r&&(e.source===A.StyleSheetRule?this.applyStyleSheetRule(e,r):e.source===A.StyleDeclaration&&this.applyStyleDeclaration(e,r))}applyStyleSheetRule(e,t){var r,i,n,o;if((r=e.adds)==null||r.forEach(({rule:l,index:a})=>{try{if(Array.isArray(a)){const{positions:c,index:u}=Wi(a);xt(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){}}),(i=e.removes)==null||i.forEach(({index:l})=>{try{if(Array.isArray(l)){const{positions:a,index:c}=Wi(l);xt(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&&xt(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&xt(t.rules,e.index).style.removeProperty(e.remove.property)}applyAdoptedStyleSheet(e){var t;const r=this.mirror.getNode(e.id);if(!r)return;(t=e.styles)==null||t.forEach(l=>{var a;let c=null,u=null;if(tt(r)?u=((a=r.ownerDocument)==null?void 0:a.defaultView)||null:r.nodeName==="#document"&&(u=r.defaultView),!!u)try{c=new u.CSSStyleSheet,this.styleMirror.add(c,l.styleId),this.applyStyleSheetRule({source:A.StyleSheetRule,adds:l.rules},c)}catch(h){}});const i=10;let n=0;const o=(l,a)=>{const c=a.map(u=>this.styleMirror.getStyle(u)).filter(u=>u!==null);tt(l)?l.shadowRoot.adoptedStyleSheets=c:l.nodeName==="#document"&&(l.adoptedStyleSheets=c),c.length!==a.length&&n<i&&(setTimeout(()=>o(l,a),0+100*n),n++)};o(r,e.styleIds)}legacy_resolveMissingNode(e,t,r,i){const{previousId:n,nextId:o}=i,l=n&&e[n],a=o&&e[o];if(l){const{node:c,mutation:u}=l;t.insertBefore(c,r),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,r.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,r,i,n){const o=this.mirror.getNode(r);if(!o)return this.debugNodeNotFound(n,r);const l=Pn(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`,i||this.drawMouseTail({x:a,y:c}),this.hoverElements(o)}drawMouseTail(e){if(!this.mouseTail)return;const{lineCap:t,lineWidth:r,strokeStyle:i,duration:n}=this.config.mouseTail===!0?ri:Object.assign({},ri,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=r,l.lineCap=t,l.strokeStyle=i,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(i=>{i.classList.remove(":hover")}),this.lastHoveredRootNode=e.getRootNode();let r=e;for(;r;)r.classList&&r.classList.add(":hover"),r=r.parentElement}isUserInteraction(e){return e.type!==O.IncrementalSnapshot?!1:e.data.source>A.Mutation&&e.data.source<=A.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(Y.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(Ma,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(Ma,...e)}}const Ab="3.1.1-alpha.3",{getVersion:Ib}=Se,{isRecording:Nb}=Se,{flushCustomEventQueue:Rb}=Se,{addCustomEvent:Tb}=Se,{freezePage:Ob}=Se,{takeFullSnapshot:Db}=Se;var ge=Uint8Array,ye=Uint16Array,dr=Uint32Array,Ds=new ge([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),$s=new ge([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Gi=new ge([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Uc=function(s,e){for(var t=new ye(31),r=0;r<31;++r)t[r]=e+=1<<s[r-1];for(var i=new dr(t[30]),r=1;r<30;++r)for(var n=t[r];n<t[r+1];++n)i[n]=n-t[r]<<5|r;return[t,i]},Vc=Uc(Ds,2),Hc=Vc[0],ji=Vc[1];Hc[28]=258,ji[258]=28;var Gc=Uc($s,0),$b=Gc[0],Ia=Gc[1],Yi=new ye(32768);for(var te=0;te<32768;++te){var Je=(te&43690)>>>1|(te&21845)<<1;Je=(Je&52428)>>>2|(Je&13107)<<2,Je=(Je&61680)>>>4|(Je&3855)<<4,Yi[te]=((Je&65280)>>>8|(Je&255)<<8)>>>1}var Pe=function(s,e,t){for(var r=s.length,i=0,n=new ye(e);i<r;++i)++n[s[i]-1];var o=new ye(e);for(i=0;i<e;++i)o[i]=o[i-1]+n[i-1]<<1;var l;if(t){l=new ye(1<<e);var a=15-e;for(i=0;i<r;++i)if(s[i])for(var c=i<<4|s[i],u=e-s[i],h=o[s[i]-1]++<<u,d=h|(1<<u)-1;h<=d;++h)l[Yi[h]>>>a]=c}else for(l=new ye(r),i=0;i<r;++i)l[i]=Yi[o[s[i]-1]++]>>>15-s[i];return l},nt=new ge(288);for(var te=0;te<144;++te)nt[te]=8;for(var te=144;te<256;++te)nt[te]=9;for(var te=256;te<280;++te)nt[te]=7;for(var te=280;te<288;++te)nt[te]=8;var fr=new ge(32);for(var te=0;te<32;++te)fr[te]=5;var kb=Pe(nt,9,0),_b=Pe(nt,9,1),Lb=Pe(fr,5,0),Pb=Pe(fr,5,1),si=function(s){for(var e=s[0],t=1;t<s.length;++t)s[t]>e&&(e=s[t]);return e},Ae=function(s,e,t){var r=e/8>>0;return(s[r]|s[r+1]<<8)>>>(e&7)&t},ii=function(s,e){var t=e/8>>0;return(s[t]|s[t+1]<<8|s[t+2]<<16)>>>(e&7)},Vn=function(s){return(s/8>>0)+(s&7&&1)},Hn=function(s,e,t){(t==null||t>s.length)&&(t=s.length);var r=new(s instanceof ye?ye:s instanceof dr?dr:ge)(t-e);return r.set(s.subarray(e,t)),r},Fb=function(s,e,t){var r=s.length,i=!e||t,n=!t||t.i;t||(t={}),e||(e=new ge(r*3));var o=function(lt){var Ze=e.length;if(lt>Ze){var Te=new ge(Math.max(Ze*2,lt));Te.set(e),e=Te}},l=t.f||0,a=t.p||0,c=t.b||0,u=t.l,h=t.d,d=t.m,f=t.n,m=r*8;do{if(!u){t.f=l=Ae(s,a,1);var y=Ae(s,a+1,3);if(a+=3,y)if(y==1)u=_b,h=Pb,d=9,f=5;else if(y==2){var S=Ae(s,a,31)+257,b=Ae(s,a+10,15)+4,C=S+Ae(s,a+5,31)+1;a+=14;for(var x=new ge(C),M=new ge(19),E=0;E<b;++E)M[Gi[E]]=Ae(s,a+E*3,7);a+=b*3;var k=si(M),_=(1<<k)-1;if(!n&&a+C*(k+7)>m)break;for(var L=Pe(M,k,1),E=0;E<C;){var $=L[Ae(s,a,_)];a+=$&15;var p=$>>>4;if(p<16)x[E++]=p;else{var B=0,W=0;for(p==16?(W=3+Ae(s,a,3),a+=2,B=x[E-1]):p==17?(W=3+Ae(s,a,7),a+=3):p==18&&(W=11+Ae(s,a,127),a+=7);W--;)x[E++]=B}}var N=x.subarray(0,S),T=x.subarray(S);d=si(N),f=si(T),u=Pe(N,d,1),h=Pe(T,f,1)}else throw"invalid block type";else{var p=Vn(a)+4,g=s[p-4]|s[p-3]<<8,w=p+g;if(w>r){if(n)throw"unexpected EOF";break}i&&o(c+g),e.set(s.subarray(p,w),c),t.b=c+=g,t.p=a=w*8;continue}if(a>m)throw"unexpected EOF"}i&&o(c+131072);for(var D=(1<<d)-1,U=(1<<f)-1,K=d+f+18;n||a+K<m;){var B=u[ii(s,a)&D],ce=B>>>4;if(a+=B&15,a>m)throw"unexpected EOF";if(!B)throw"invalid length/literal";if(ce<256)e[c++]=ce;else if(ce==256){u=null;break}else{var ee=ce-254;if(ce>264){var E=ce-257,fe=Ds[E];ee=Ae(s,a,(1<<fe)-1)+Hc[E],a+=fe}var be=h[ii(s,a)&U],he=be>>>4;if(!be)throw"invalid distance";a+=be&15;var T=$b[he];if(he>3){var fe=$s[he];T+=ii(s,a)&(1<<fe)-1,a+=fe}if(a>m)throw"unexpected EOF";i&&o(c+131072);for(var le=c+ee;c<le;c+=4)e[c]=e[c-T],e[c+1]=e[c+1-T],e[c+2]=e[c+2-T],e[c+3]=e[c+3-T];c=le}}t.l=u,t.p=a,t.b=c,u&&(l=1,t.m=d,t.d=h,t.n=f)}while(!l);return c==e.length?e:Hn(e,0,c)},We=function(s,e,t){t<<=e&7;var r=e/8>>0;s[r]|=t,s[r+1]|=t>>>8},Yt=function(s,e,t){t<<=e&7;var r=e/8>>0;s[r]|=t,s[r+1]|=t>>>8,s[r+2]|=t>>>16},ni=function(s,e){for(var t=[],r=0;r<s.length;++r)s[r]&&t.push({s:r,f:s[r]});var i=t.length,n=t.slice();if(!i)return[new ge(0),0];if(i==1){var o=new ge(t[0].s+1);return o[t[0].s]=1,[o,1]}t.sort(function(C,x){return C.f-x.f}),t.push({s:-1,f:25001});var l=t[0],a=t[1],c=0,u=1,h=2;for(t[0]={s:-1,f:l.f+a.f,l,r:a};u!=i-1;)l=t[t[c].f<t[h].f?c++:h++],a=t[c!=u&&t[c].f<t[h].f?c++:h++],t[u++]={s:-1,f:l.f+a.f,l,r:a};for(var d=n[0].s,r=1;r<i;++r)n[r].s>d&&(d=n[r].s);var f=new ye(d+1),m=Zi(t[u-1],f,0);if(m>e){var r=0,y=0,p=m-e,g=1<<p;for(n.sort(function(x,M){return f[M.s]-f[x.s]||x.f-M.f});r<i;++r){var w=n[r].s;if(f[w]>e)y+=g-(1<<m-f[w]),f[w]=e;else break}for(y>>>=p;y>0;){var S=n[r].s;f[S]<e?y-=1<<e-f[S]++-1:++r}for(;r>=0&&y;--r){var b=n[r].s;f[b]==e&&(--f[b],++y)}m=e}return[new ge(f),m]},Zi=function(s,e,t){return s.s==-1?Math.max(Zi(s.l,e,t+1),Zi(s.r,e,t+1)):e[s.s]=t},Na=function(s){for(var e=s.length;e&&!s[--e];);for(var t=new ye(++e),r=0,i=s[0],n=1,o=function(a){t[r++]=a},l=1;l<=e;++l)if(s[l]==i&&l!=e)++n;else{if(!i&&n>2){for(;n>138;n-=138)o(32754);n>2&&(o(n>10?n-11<<5|28690:n-3<<5|12305),n=0)}else if(n>3){for(o(i),--n;n>6;n-=6)o(8304);n>2&&(o(n-3<<5|8208),n=0)}for(;n--;)o(i);n=1,i=s[l]}return[t.subarray(0,r),e]},Zt=function(s,e){for(var t=0,r=0;r<e.length;++r)t+=s[r]*e[r];return t},Xi=function(s,e,t){var r=t.length,i=Vn(e+2);s[i]=r&255,s[i+1]=r>>>8,s[i+2]=s[i]^255,s[i+3]=s[i+1]^255;for(var n=0;n<r;++n)s[i+n+4]=t[n];return(i+4+r)*8},Ra=function(s,e,t,r,i,n,o,l,a,c,u){We(e,u++,t),++i[256];for(var h=ni(i,15),d=h[0],f=h[1],m=ni(n,15),y=m[0],p=m[1],g=Na(d),w=g[0],S=g[1],b=Na(y),C=b[0],x=b[1],M=new ye(19),E=0;E<w.length;++E)M[w[E]&31]++;for(var E=0;E<C.length;++E)M[C[E]&31]++;for(var k=ni(M,7),_=k[0],L=k[1],$=19;$>4&&!_[Gi[$-1]];--$);var B=c+5<<3,W=Zt(i,nt)+Zt(n,fr)+o,N=Zt(i,d)+Zt(n,y)+o+14+3*$+Zt(M,_)+(2*M[16]+3*M[17]+7*M[18]);if(B<=W&&B<=N)return Xi(e,u,s.subarray(a,a+c));var T,D,U,K;if(We(e,u,1+(N<W)),u+=2,N<W){T=Pe(d,f,0),D=d,U=Pe(y,p,0),K=y;var ce=Pe(_,L,0);We(e,u,S-257),We(e,u+5,x-1),We(e,u+10,$-4),u+=14;for(var E=0;E<$;++E)We(e,u+3*E,_[Gi[E]]);u+=3*$;for(var ee=[w,C],fe=0;fe<2;++fe)for(var be=ee[fe],E=0;E<be.length;++E){var he=be[E]&31;We(e,u,ce[he]),u+=_[he],he>15&&(We(e,u,be[E]>>>5&127),u+=be[E]>>>12)}}else T=kb,D=nt,U=Lb,K=fr;for(var E=0;E<l;++E)if(r[E]>255){var he=r[E]>>>18&31;Yt(e,u,T[he+257]),u+=D[he+257],he>7&&(We(e,u,r[E]>>>23&31),u+=Ds[he]);var le=r[E]&31;Yt(e,u,U[le]),u+=K[le],le>3&&(Yt(e,u,r[E]>>>5&8191),u+=$s[le])}else Yt(e,u,T[r[E]]),u+=D[r[E]];return Yt(e,u,T[256]),u+D[256]},zb=new dr([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Bb=function(s,e,t,r,i,n){var o=s.length,l=new ge(r+o+5*(1+Math.floor(o/7e3))+i),a=l.subarray(r,l.length-i),c=0;if(!e||o<8)for(var u=0;u<=o;u+=65535){var h=u+65535;h<o?c=Xi(a,c,s.subarray(u,h)):(a[u]=n,c=Xi(a,c,s.subarray(u,o)))}else{for(var d=zb[e-1],f=d>>>13,m=d&8191,y=(1<<t)-1,p=new ye(32768),g=new ye(y+1),w=Math.ceil(t/3),S=2*w,b=function(mt){return(s[mt]^s[mt+1]<<w^s[mt+2]<<S)&y},C=new dr(25e3),x=new ye(288),M=new ye(32),E=0,k=0,u=0,_=0,L=0,$=0;u<o;++u){var B=b(u),W=u&32767,N=g[B];if(p[W]=N,g[B]=W,L<=u){var T=o-u;if((E>7e3||_>24576)&&T>423){c=Ra(s,a,0,C,x,M,k,_,$,u-$,c),_=E=k=0,$=u;for(var D=0;D<286;++D)x[D]=0;for(var D=0;D<30;++D)M[D]=0}var U=2,K=0,ce=m,ee=W-N&32767;if(T>2&&B==b(u-ee))for(var fe=Math.min(f,T)-1,be=Math.min(32767,u),he=Math.min(258,T);ee<=be&&--ce&&W!=N;){if(s[u+U]==s[u+U-ee]){for(var le=0;le<he&&s[u+le]==s[u+le-ee];++le);if(le>U){if(U=le,K=ee,le>fe)break;for(var lt=Math.min(ee,le-2),Ze=0,D=0;D<lt;++D){var Te=u-ee+D+32768&32767,pt=p[Te],Pt=Te-pt+32768&32767;Pt>Ze&&(Ze=Pt,N=Te)}}}W=N,N=p[W],ee+=W-N+32768&32767}if(K){C[_++]=268435456|ji[U]<<18|Ia[K];var Fe=ji[U]&31,Ce=Ia[K]&31;k+=Ds[Fe]+$s[Ce],++x[257+Fe],++M[Ce],L=u+U,++E}else C[_++]=s[u],++x[s[u]]}}c=Ra(s,a,n,C,x,M,k,_,$,u-$,c)}return Hn(l,0,r+Vn(c)+i)},Wb=function(){var s=1,e=0;return{p:function(t){for(var r=s,i=e,n=t.length,o=0;o!=n;){for(var l=Math.min(o+5552,n);o<l;++o)r+=t[o],i+=r;r%=65521,i%=65521}s=r,e=i},d:function(){return(s>>>8<<16|(e&255)<<8|e>>>8)+((s&255)<<23)*2}}},Ub=function(s,e,t,r,i){return Bb(s,e.level==null?6:e.level,e.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(s.length)))*1.5):12+e.mem,t,r,!0)},Vb=function(s,e,t){for(;t;++e)s[e]=t,t>>>=8},Hb=function(s,e){var t=e.level,r=t==0?0:t<6?1:t==9?3:2;s[0]=120,s[1]=r<<6|(r?32-2*r:1)},Gb=function(s){if((s[0]&15)!=8||s[0]>>>4>7||(s[0]<<8|s[1])%31)throw"invalid zlib data";if(s[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function jb(s,e){e===void 0&&(e={});var t=Wb();t.p(s);var r=Ub(s,e,2,4);return Hb(r,e),Vb(r,r.length-4,t.d()),r}function Yb(s,e){return Fb((Gb(s),s.subarray(2,-4)),e)}function jc(s,e){var t=s.length;if(!e&&typeof TextEncoder!="undefined")return new TextEncoder().encode(s);for(var r=new ge(s.length+(s.length>>>1)),i=0,n=function(c){r[i++]=c},o=0;o<t;++o){if(i+5>r.length){var l=new ge(i+8+(t-o<<1));l.set(r),r=l}var a=s.charCodeAt(o);a<128||e?n(a):a<2048?(n(192|a>>>6),n(128|a&63)):a>55295&&a<57344?(a=65536+(a&1047552)|s.charCodeAt(++o)&1023,n(240|a>>>18),n(128|a>>>12&63),n(128|a>>>6&63),n(128|a&63)):(n(224|a>>>12),n(128|a>>>6&63),n(128|a&63))}return Hn(r,0,i)}function Yc(s,e){var t="";if(!e&&typeof TextDecoder!="undefined")return new TextDecoder().decode(s);for(var r=0;r<s.length;){var i=s[r++];i<128||e?t+=String.fromCharCode(i):i<224?t+=String.fromCharCode((i&31)<<6|s[r++]&63):i<240?t+=String.fromCharCode((i&15)<<12|(s[r++]&63)<<6|s[r++]&63):(i=((i&15)<<18|(s[r++]&63)<<12|(s[r++]&63)<<6|s[r++]&63)-65536,t+=String.fromCharCode(55296|i>>10,56320|i&1023))}return t}const Ji="v1",Zb=s=>{const e=oe(R({},s),{v:Ji});return Yc(jb(jc(JSON.stringify(e))),!0)},Xb=s=>{if(typeof s!="string")return s;try{const e=JSON.parse(s);if(e.timestamp)return e}catch(e){}try{const e=JSON.parse(Yc(Yb(jc(s,!0))));if(e.v===Ji)return e;throw new Error(`These events were packed with packer ${e.v} which is incompatible with current packer ${Ji}.`)}catch(e){throw console.error(e),new Error("Unknown data format.")}};exports.EventType=O;exports.IncrementalSource=A;exports.MouseInteractions=Z;exports.Replayer=Mb;exports.ReplayerEvents=Y;exports.addCustomEvent=Tb;exports.canvasMutation=Hi;exports.flushCustomEventQueue=Rb;exports.freezePage=Ob;exports.getVersion=Ib;exports.isRecording=Nb;exports.pack=Zb;exports.record=Se;exports.takeFullSnapshot=Db;exports.unpack=Xb;exports.utils=Rg;exports.version=Ab;
|
|
92
|
+
***************************************************************************** */function Sa(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var s,i,n=t.call(r),o=[];try{for(;(e===void 0||e-- >0)&&!(s=n.next()).done;)o.push(s.value)}catch(l){i={error:l}}finally{try{s&&!s.done&&(t=n.return)&&t.call(n)}finally{if(i)throw i.error}}return o}var Mt;(function(r){r[r.NotStarted=0]="NotStarted",r[r.Running=1]="Running",r[r.Stopped=2]="Stopped"})(Mt||(Mt={}));var Fc={type:"xstate.init"};function si(r){return r===void 0?[]:[].concat(r)}function wt(r){return{type:"xstate.assign",assignment:r}}function Ca(r,e){return typeof(r=typeof r=="string"&&e&&e[r]?e[r]:r)=="string"?{type:r}:typeof r=="function"?{type:r.name,exec:r}:r}function yr(r){return function(e){return r===e}}function zc(r){return typeof r=="string"?{type:r}:r}function xa(r,e){return{value:r,context:e,actions:[],changed:!1,matches:yr(r)}}function Ea(r,e,t){var s=e,i=!1;return[r.filter(function(n){if(n.type==="xstate.assign"){i=!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,i]}function Bc(r,e){e===void 0&&(e={});var t=Sa(Ea(si(r.states[r.initial].entry).map(function(o){return Ca(o,e.actions)}),r.context,Fc),2),s=t[0],i=t[1],n={config:r,_options:e,initialState:{value:r.initial,actions:s,context:i,matches:yr(r.initial)},transition:function(o,l){var a,c,u=typeof o=="string"?{value:o,context:r.context}:o,h=u.value,d=u.context,f=zc(l),m=r.states[h];if(m.on){var y=si(m.on[f.type]);try{for(var p=function(D){var U=typeof Symbol=="function"&&Symbol.iterator,Q=U&&D[U],ce=0;if(Q)return Q.call(D);if(D&&typeof D.length=="number")return{next:function(){return D&&ce>=D.length&&(D=void 0),{value:D&&D[ce++],done:!D}}};throw new TypeError(U?"Object is not iterable.":"Symbol.iterator is not defined.")}(y),g=p.next();!g.done;g=p.next()){var w=g.value;if(w===void 0)return xa(h,d);var S=typeof w=="string"?{target:w}:w,b=S.target,C=S.actions,x=C===void 0?[]:C,M=S.cond,E=M===void 0?function(){return!0}:M,$=b===void 0,k=b!=null?b:h,L=r.states[k];if(E(d,f)){var _=Sa(Ea(($?si(x):[].concat(m.exit,x,L.entry).filter(function(D){return D})).map(function(D){return Ca(D,n._options.actions)}),d,f),3),B=_[0],W=_[1],N=_[2],T=b!=null?b:h;return{value:T,context:W,actions:B,changed:b!==h||B.length>0||N,matches:yr(T)}}}}catch(D){a={error:D}}finally{try{g&&!g.done&&(c=p.return)&&c.call(p)}finally{if(a)throw a.error}}}return xa(h,d)}};return n}var Ma=function(r,e){return r.actions.forEach(function(t){var s=t.exec;return s&&s(r.context,e)})};function Wc(r){var e=r.initialState,t=Mt.NotStarted,s=new Set,i={_machine:r,send:function(n){t===Mt.Running&&(e=r.transition(e,n),Ma(e,zc(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:r.config.context,value:n};e={value:o.value,actions:[],context:o.context,matches:yr(o.value)}}return t=Mt.Running,Ma(e,Fc),i},stop:function(){return t=Mt.Stopped,s.clear(),i},get state(){return e},get status(){return t}};return i}function yb(r,e){for(let t=r.length-1;t>=0;t--){const s=r[t];if(s.type===O.Meta&&s.timestamp<=e)return r.slice(t)}return r}function bb(r,{getCastFn:e,applyEventsSynchronously:t,emitter:s}){const i=Bc({id:"player",context:r,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:wt({lastPlayedEvent:(n,o)=>o.type==="CAST_EVENT"?o.payload.event:n.lastPlayedEvent}),recordTimeOffset:wt((n,o)=>{let l=n.timeOffset;return"payload"in o&&"timeOffset"in o.payload&&(l=o.payload.timeOffset),ae(R({},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)wa(m,c);const h=yb(a,c);let d=u==null?void 0:u.timestamp;(u==null?void 0:u.type)===O.IncrementalSnapshot&&u.data.source===A.MouseMove&&(d=u.timestamp+((o=u.data.positions[0])==null?void 0:o.timeOffset)),c<(d||0)&&s.emit(Y.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(Y.Flush),l.start()},pause(n){n.timer.clear()},resetLastPlayedEvent:wt(n=>ae(R({},n),{lastPlayedEvent:null})),startLive:wt({baselineTime:(n,o)=>(n.timer.start(),o.type==="TO_LIVE"&&o.payload.baselineTime?o.payload.baselineTime:Date.now())}),addEvent:wt((n,o)=>{const{baselineTime:l,timer:a,events:c}=n;if(o.type==="ADD_EVENT"){const{event:u}=o.payload;wa(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 ae(R({},n),{events:c})})}});return Wc(i)}function vb(r){const e=Bc({id:"speed",context:r,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:wt({normalSpeed:t=>t.timer.speed}),restoreSpeed:t=>{t.timer.setSpeed(t.normalSpeed)}}});return Wc(e)}const wb=r=>[`.${r} { background: currentColor }`,"noscript { display: none !important; }"],Aa=new Map;function Uc(r,e){let t=Aa.get(r);return t||(t=new Map,Aa.set(r,t)),t.has(e)||t.set(e,[]),t.get(e)}function rt(r,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 i=await rt(r,e,t)(s.args);return await createImageBitmap.apply(null,i)}else if("index"in s){if(t||e===null)return s;const{rr_type:i,index:n}=s;return Uc(e,i)[n]}else if("args"in s){const{rr_type:i,args:n}=s,o=window[i];return new o(...await Promise.all(n.map(rt(r,e,t))))}else{if("base64"in s)return Gy(s.base64);if("src"in s){const i=r.get(s.src);if(i)return i;{const n=new Image;return n.src=s.src,r.set(s.src,n),n}}else if("data"in s&&s.rr_type==="Blob"){const i=await Promise.all(s.data.map(rt(r,e,t)));return new Blob(i,{type:s.type})}}else if(Array.isArray(s))return await Promise.all(s.map(rt(r,e,t)));return s}}function Sb(r,e){try{return e===Ze.WebGL?r.getContext("webgl")||r.getContext("experimental-webgl"):r.getContext("webgl2")}catch(t){return null}}const Cb=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function xb(r,e){if(!(e!=null&&e.constructor))return;const{name:t}=e.constructor;if(!Cb.includes(t))return;const s=Uc(r,t);s.includes(e)||s.push(e)}async function Eb({mutation:r,target:e,type:t,imageMap:s,errorHandler:i}){try{const n=Sb(e,t);if(!n)return;if(r.setter){n[r.property]=r.args[0];return}const o=n[r.property],l=await Promise.all(r.args.map(rt(s,n))),a=o.apply(n,l);xb(n,a);const c=!1}catch(n){i(r,n)}}async function Mb({event:r,mutations:e,target:t,imageMap:s,errorHandler:i}){const n=t.getContext("2d");if(!n){i(e[0],new Error("Canvas context is null"));return}const o=e.map(async a=>Promise.all(a.args.map(rt(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(r),h.apply(n,u.args)):h.apply(n,a)}catch(h){i(u,h)}})}async function Gi({event:r,mutation:e,target:t,imageMap:s,canvasEventMap:i,errorHandler:n}){try{const o=i.get(r)||e,l="commands"in o?o.commands:[o];if([Ze.WebGL,Ze.WebGL2].includes(e.type)){for(let a=0;a<l.length;a++){const c=l[a];await Eb({mutation:c,type:e.type,target:t,imageMap:s,errorHandler:n})}return}await Mb({event:r,mutations:l,target:t,imageMap:s,errorHandler:n})}catch(o){n(e,o)}}class Ab{constructor(e){v(this,"mediaMap",new Map),v(this,"warn"),v(this,"service"),v(this,"speedService"),v(this,"emitter"),v(this,"getCurrentTime"),v(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(Y.Start,this.start.bind(this)),this.emitter.on(Y.SkipStart,this.start.bind(this)),this.emitter.on(Y.Pause,this.pause.bind(this)),this.emitter.on(Y.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 i=this.mediaMap.get(e),{type:n,playbackRate:o,currentTime:l,muted:a,volume:c,loop:u}=s;return{isPlaying:n===Qe.Play||n!==Qe.Pause&&((i==null?void 0:i.isPlaying)||e.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(f=l!=null?l:i==null?void 0:i.currentTimeAtLastInteraction)!=null?f:0,lastInteractionTimeOffset:t,playbackRate:(m=o!=null?o:i==null?void 0:i.playbackRate)!=null?m:1,volume:(y=c!=null?c:i==null?void 0:i.volume)!=null?y:1,muted:(p=a!=null?a:i==null?void 0:i.muted)!=null?p:e.getAttribute("muted")===null,loop:(g=u!=null?u:i==null?void 0:i.loop)!=null?g:e.getAttribute("loop")===null}}syncTargetWithState(e){const t=this.mediaMap.get(e);if(!t)return;const{muted:s,loop:i,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=i,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 i=e,n=s.getMeta(i);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=i.getAttribute("autoplay")!==null,a&&o&&i.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=i.getAttribute("muted")!==null;let h=!1;typeof l.rr_mediaLoop=="boolean"?h=l.rr_mediaLoop:h=i.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(i,{isPlaying:a,currentTimeAtLastInteraction:f,lastInteractionTimeOffset:t,playbackRate:c,volume:d,muted:u,loop:h}),this.syncTargetWithState(i)}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 Ys(r,e){if(r.nodeName!=="DIALOG"||r instanceof De)return;const t=r,s=t.open,i=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&&!(i&&n==="non-modal"||!i&&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 Ib(r,e){if(r.nodeName!=="DIALOG"||r instanceof De)return;const t=r;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 Nb=5*1e3,Rb=Pc||pb,Ia="[replayer]",ri={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Na(r){return r.type==O.IncrementalSnapshot&&(r.data.source==A.TouchMove||r.data.source==A.MouseInteraction&&r.data.type==Z.TouchStart)}class Tb{constructor(e,t){if(v(this,"wrapper"),v(this,"iframe"),v(this,"service"),v(this,"speedService"),v(this,"config"),v(this,"usingVirtualDom",!1),v(this,"virtualDom",new _t),v(this,"mouse"),v(this,"mouseTail",null),v(this,"tailPositions",[]),v(this,"emitter",Rb()),v(this,"nextUserInteractionEvent"),v(this,"legacy_missingNodeRetryMap",{}),v(this,"cache",Do()),v(this,"imageMap",new Map),v(this,"canvasEventMap",new Map),v(this,"mirror",ka()),v(this,"styleMirror",new Bn),v(this,"mediaManager"),v(this,"firstFullSnapshot",null),v(this,"newDocumentQueue",[]),v(this,"mousePos",null),v(this,"touchActive",null),v(this,"lastMouseDownEvent",null),v(this,"lastHoveredRootNode"),v(this,"lastSelectionData",null),v(this,"constructedStyleMutations",[]),v(this,"adoptedStyleSheets",[]),v(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)))}),v(this,"applyEventsSynchronously",l=>{for(const a of l){switch(a.type){case O.DomContentLoaded:case O.Load:case O.Custom:continue;case O.FullSnapshot:case O.Meta:case O.Plugin:case O.IncrementalSnapshot:break}this.getCastFn(a,!0)()}}),v(this,"getCastFn",(l,a=!1)=>{let c;switch(l.type){case O.DomContentLoaded:case O.Load:break;case O.Custom:c=()=>{this.emitter.emit(Y.CustomEvent,l)};break;case O.Meta:c=()=>this.emitter.emit(Y.Resize,{width:l.data.width,height:l.data.height});break;case O.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 O.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/Nb),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:d}),this.emitter.emit(Y.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(Y.Finish))};let f=50;l.type===O.IncrementalSnapshot&&l.data.source===A.MouseMove&&l.data.positions.length&&(f+=Math.max(0,-l.data.positions[0].timeOffset)),setTimeout(d,f)}this.emitter.emit(Y.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:ri,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(Y.Resize,this.handleResize),this.setupDom();for(const l of this.config.plugins||[])l.getMirror&&l.getMirror({nodeMirror:this.mirror});this.emitter.on(Y.Flush,()=>{if(this.usingVirtualDom){const l={mirror:this.mirror,applyCanvas:(a,c,u)=>{Gi({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===A.StyleSheetRule?this.applyStyleSheetRule(a,c):a.source===A.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{dr(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=fr(c.node,this.mirror,this.virtualDom.mirror);dr(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(Y.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});const i=new gb([],{speed:this.config.speed});this.service=bb({events:e.map(l=>t&&t.unpackFn?t.unpackFn(l):l).sort((l,a)=>l.timestamp-a.timestamp),timer:i,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(Y.StateChange,{player:l})}),this.speedService=vb({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(l=>{this.emitter.emit(Y.StateChange,{speed:l})}),this.mediaManager=new Ab({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===O.Meta),o=this.service.state.context.events.find(l=>l.type===O.FullSnapshot);if(n){const{width:l,height:a}=n.data;setTimeout(()=>{this.emitter.emit(Y.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(Na)&&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(Y.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(Y.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(Y.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(Y.Destroy)}startLive(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}addEvent(e){const t=this.config.unpackFn?this.config.unpackFn(e):e;Na(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=Do()}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&&(mb(this.iframe.contentWindow,this.iframe.contentDocument),Ln(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=[],i=new Set,n=(a,c)=>{if(a.nodeName==="DIALOG"&&i.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(),Yf(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),i.forEach(a=>Ys(a)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(Y.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){var s;const i=wb(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),!!i.length)if(this.usingVirtualDom){const n=this.virtualDom.createElement("style");this.virtualDom.mirror.add(n,yc(n,this.virtualDom.unserializedId)),e.insertBefore(n,t),n.rules.push({source:A.StyleSheetRule,adds:i.map((o,l)=>({rule:o,index:l}))})}else{const n=document.createElement("style");e.insertBefore(n,t);for(let o=0;o<i.length;o++)(s=n.sheet)==null||s.insertRule(i[o],o)}}attachDocumentToIframe(e,t){const s=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],n=new Set,o=(l,a)=>{l.nodeName==="DIALOG"&&n.add(l),this.collectIframeAndAttachDocument(i,l);const c=s.getMeta(l);if((c==null?void 0:c.type)===He.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})};Kt(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 i)this.attachDocumentToIframe(l,a),this.newDocumentQueue=this.newDocumentQueue.filter(c=>c!==l);n.forEach(l=>Ys(l))}collectIframeAndAttachDocument(e,t){if(At(t,this.mirror)){const s=this.newDocumentQueue.find(i=>i.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 i,n=this.service.state;const o=()=>{n=this.service.state};this.emitter.on(Y.Start,o),this.emitter.on(Y.Pause,o);const l=()=>{this.emitter.off(Y.Start,o),this.emitter.off(Y.Pause,o)};t.querySelectorAll('link[rel="stylesheet"]').forEach(a=>{a.sheet||(s.add(a),a.addEventListener("load",()=>{s.delete(a),s.size===0&&i!==-1&&(n.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(Y.LoadStylesheetEnd),i&&clearTimeout(i),l())}))}),s.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(Y.LoadStylesheetStart),i=setTimeout(()=>{n.matches("playing")&&this.play(this.getCurrentTime()),i=-1,l()},this.config.loadTimeout))}}async preloadAllImages(){const e=[];for(const t of this.service.state.context.events)t.type===O.IncrementalSnapshot&&t.data.source===A.CanvasMutation&&(e.push(this.deserializeAndPreloadCanvasEvents(t.data,t)),("commands"in t.data?t.data.commands:[t.data]).forEach(i=>{this.preloadImages(i,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"),i=s.getContext("2d"),n=i==null?void 0:i.createImageData(s.width,s.height);i==null||i.putImageData(n,0,0)}}async deserializeAndPreloadCanvasEvents(e,t){if(!this.canvasEventMap.has(t)){const s={isUnchanged:!0};if("commands"in e){const i=await Promise.all(e.commands.map(async n=>{const o=await Promise.all(n.args.map(rt(this.imageMap,null,s)));return ae(R({},n),{args:o})}));s.isUnchanged===!1&&this.canvasEventMap.set(t,ae(R({},e),{commands:i}))}else{const i=await Promise.all(e.args.map(rt(this.imageMap,null,s)));s.isUnchanged===!1&&this.canvasEventMap.set(t,ae(R({},e),{args:i}))}}}applyIncremental(e,t){var s,i,n;const{data:o}=e;switch(o.source){case A.Mutation:{try{this.applyMutation(o,t)}catch(l){this.warn(`Exception in mutation ${l.message||l}`,o)}break}case A.Drag:case A.TouchMove:case A.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 A.MouseInteraction:{if(o.id===-1)break;const l=new Event(it(Z[o.type])),a=this.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);this.emitter.emit(Y.MouseInteraction,{type:o.type,target:a});const{triggerFocus:c}=this.config;switch(o.type){case Z.Blur:"blur"in a&&a.blur();break;case Z.Focus:c&&a.focus&&a.focus({preventScroll:!0});break;case Z.Click:case Z.TouchStart:case Z.TouchEnd:case Z.MouseDown:case Z.MouseUp:t?(o.type===Z.TouchStart?this.touchActive=!0:o.type===Z.TouchEnd&&(this.touchActive=!1),o.type===Z.MouseDown?this.lastMouseDownEvent=[a,l]:o.type===Z.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:o.x||0,y:o.y||0,id:o.id,debugData:o}):(o.type===Z.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(o.x||0,o.y||0,o.id,t,o),o.type===Z.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):o.type===Z.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):o.type===Z.TouchEnd?this.mouse.classList.remove("touch-active"):a.dispatchEvent(l));break;case Z.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:a.dispatchEvent(l)}break}case A.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 A.ViewportResize:this.emitter.emit(Y.Resize,{width:o.width,height:o.height});break;case A.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 A.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 A.StyleSheetRule:case A.StyleDeclaration:{this.usingVirtualDom?o.styleId?this.constructedStyleMutations.push(o):o.id&&((i=this.virtualDom.mirror.getNode(o.id))==null||i.rules.push(o)):this.applyStyleSheetMutation(o);break}case A.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);Gi({event:e,mutation:o,target:l,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case A.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 A.Selection:{if(t){this.lastSelectionData=o;break}this.applySelection(o);break}case A.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(o):this.applyAdoptedStyleSheet(o);break}case A.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,pg(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=gc(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&&tt(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 i=R({},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===He.Document?this.newDocumentQueue.push(c):n.push(c);c.node.isShadow&&(tt(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(At(d,s)){this.attachDocumentToIframe(c,d);return}const p=(S,b)=>{if(!this.usingVirtualDom){Ys(S);for(const C of this.config.plugins||[])C.onBuild&&C.onBuild(S,{id:b,replayer:this})}},g=Kt(c.node,{doc:y,mirror:s,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:p});if(c.previousId===-1||c.nextId===-1){i[c.node.id]={node:g,mutation:c};return}const w=s.getMeta(d);if(w&&w.type===He.Element&&c.node.type===He.Text){const S=Array.isArray(d.childNodes)?d.childNodes:Array.from(d.childNodes);if(w.tagName==="textarea")for(const b of S)b.nodeType===d.TEXT_NODE&&d.removeChild(b);else if(w.tagName==="style"&&S.length===1)for(const b of S)b.nodeType===d.TEXT_NODE&&!s.hasNode(b)&&(g.textContent=b.textContent,d.removeChild(b))}else if((w==null?void 0:w.type)===He.Document){const S=d;c.node.type===He.DocumentType&&((u=S.childNodes[0])==null?void 0:u.nodeType)===Node.DOCUMENT_TYPE_NODE&&S.removeChild(S.childNodes[0]),g.nodeName==="HTML"&&S.documentElement&&S.removeChild(S.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=[]),At(g,this.mirror)){const S=this.mirror.getId(g),b=this.newDocumentQueue.find(C=>C.parentId===S);b&&(this.attachDocumentToIframe(b,g),this.newDocumentQueue=this.newDocumentQueue.filter(C=>C!==b))}(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(i,d,g,c)};e.adds.forEach(c=>{l(c)});const a=Date.now();for(;n.length;){const c=wc(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)?Pn(u,d=>{l(d)}):this.debug("Drop resolve tree since there is no parent for the root node.",u)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),Sc(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=xr(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"&&Ib(h,c);else if(typeof f=="string")try{if(d==="_cssText"&&(h.nodeName==="LINK"||h.nodeName==="STYLE"))try{const m=s.getMeta(h),y=Kt(ae(R({},m),{attributes:R(R({},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"&&Ys(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,i;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)===He.Document)(i=n.defaultView)==null||i.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:i,startOffset:n,end:o,endOffset:l})=>{const a=this.mirror.getNode(i),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(i=>i.removeAllRanges()),s.forEach(i=>{var n;return i&&((n=i.selection)==null?void 0:n.addRange(i.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===A.StyleSheetRule?this.applyStyleSheetRule(e,s):e.source===A.StyleDeclaration&&this.applyStyleDeclaration(e,s))}applyStyleSheetRule(e,t){var s,i,n,o;if((s=e.adds)==null||s.forEach(({rule:l,index:a})=>{try{if(Array.isArray(a)){const{positions:c,index:u}=Ui(a);xt(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){}}),(i=e.removes)==null||i.forEach(({index:l})=>{try{if(Array.isArray(l)){const{positions:a,index:c}=Ui(l);xt(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&&xt(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&xt(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(tt(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:A.StyleSheetRule,adds:l.rules},c)}catch(h){}});const i=10;let n=0;const o=(l,a)=>{const c=a.map(u=>this.styleMirror.getStyle(u)).filter(u=>u!==null);tt(l)?l.shadowRoot.adoptedStyleSheets=c:l.nodeName==="#document"&&(l.adoptedStyleSheets=c),c.length!==a.length&&n<i&&(setTimeout(()=>o(l,a),0+100*n),n++)};o(s,e.styleIds)}legacy_resolveMissingNode(e,t,s,i){const{previousId:n,nextId:o}=i,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,i,n){const o=this.mirror.getNode(s);if(!o)return this.debugNodeNotFound(n,s);const l=zn(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`,i||this.drawMouseTail({x:a,y:c}),this.hoverElements(o)}drawMouseTail(e){if(!this.mouseTail)return;const{lineCap:t,lineWidth:s,strokeStyle:i,duration:n}=this.config.mouseTail===!0?ri:Object.assign({},ri,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=i,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(i=>{i.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!==O.IncrementalSnapshot?!1:e.data.source>A.Mutation&&e.data.source<=A.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(Y.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(Ia,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(Ia,...e)}}const Ob="3.4.0-alpha.1",{getVersion:Db}=Ce,{isRecording:$b}=Ce,{flushCustomEventQueue:kb}=Ce,{addCustomEvent:_b}=Ce,{freezePage:Lb}=Ce,{takeFullSnapshot:Pb}=Ce;var ye=Uint8Array,we=Uint16Array,ds=Uint32Array,Dr=new ye([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),$r=new ye([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),ji=new ye([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Vc=function(r,e){for(var t=new we(31),s=0;s<31;++s)t[s]=e+=1<<r[s-1];for(var i=new ds(t[30]),s=1;s<30;++s)for(var n=t[s];n<t[s+1];++n)i[n]=n-t[s]<<5|s;return[t,i]},Hc=Vc(Dr,2),Gc=Hc[0],Yi=Hc[1];Gc[28]=258,Yi[258]=28;var jc=Vc($r,0),Fb=jc[0],Ra=jc[1],Zi=new we(32768);for(var re=0;re<32768;++re){var Je=(re&43690)>>>1|(re&21845)<<1;Je=(Je&52428)>>>2|(Je&13107)<<2,Je=(Je&61680)>>>4|(Je&3855)<<4,Zi[re]=((Je&65280)>>>8|(Je&255)<<8)>>>1}var ze=function(r,e,t){for(var s=r.length,i=0,n=new we(e);i<s;++i)++n[r[i]-1];var o=new we(e);for(i=0;i<e;++i)o[i]=o[i-1]+n[i-1]<<1;var l;if(t){l=new we(1<<e);var a=15-e;for(i=0;i<s;++i)if(r[i])for(var c=i<<4|r[i],u=e-r[i],h=o[r[i]-1]++<<u,d=h|(1<<u)-1;h<=d;++h)l[Zi[h]>>>a]=c}else for(l=new we(s),i=0;i<s;++i)l[i]=Zi[o[r[i]-1]++]>>>15-r[i];return l},nt=new ye(288);for(var re=0;re<144;++re)nt[re]=8;for(var re=144;re<256;++re)nt[re]=9;for(var re=256;re<280;++re)nt[re]=7;for(var re=280;re<288;++re)nt[re]=8;var fs=new ye(32);for(var re=0;re<32;++re)fs[re]=5;var zb=ze(nt,9,0),Bb=ze(nt,9,1),Wb=ze(fs,5,0),Ub=ze(fs,5,1),ii=function(r){for(var e=r[0],t=1;t<r.length;++t)r[t]>e&&(e=r[t]);return e},Ne=function(r,e,t){var s=e/8>>0;return(r[s]|r[s+1]<<8)>>>(e&7)&t},ni=function(r,e){var t=e/8>>0;return(r[t]|r[t+1]<<8|r[t+2]<<16)>>>(e&7)},Gn=function(r){return(r/8>>0)+(r&7&&1)},jn=function(r,e,t){(t==null||t>r.length)&&(t=r.length);var s=new(r instanceof we?we:r instanceof ds?ds:ye)(t-e);return s.set(r.subarray(e,t)),s},Vb=function(r,e,t){var s=r.length,i=!e||t,n=!t||t.i;t||(t={}),e||(e=new ye(s*3));var o=function(lt){var Xe=e.length;if(lt>Xe){var $e=new ye(Math.max(Xe*2,lt));$e.set(e),e=$e}},l=t.f||0,a=t.p||0,c=t.b||0,u=t.l,h=t.d,d=t.m,f=t.n,m=s*8;do{if(!u){t.f=l=Ne(r,a,1);var y=Ne(r,a+1,3);if(a+=3,y)if(y==1)u=Bb,h=Ub,d=9,f=5;else if(y==2){var S=Ne(r,a,31)+257,b=Ne(r,a+10,15)+4,C=S+Ne(r,a+5,31)+1;a+=14;for(var x=new ye(C),M=new ye(19),E=0;E<b;++E)M[ji[E]]=Ne(r,a+E*3,7);a+=b*3;var $=ii(M),k=(1<<$)-1;if(!n&&a+C*($+7)>m)break;for(var L=ze(M,$,1),E=0;E<C;){var _=L[Ne(r,a,k)];a+=_&15;var p=_>>>4;if(p<16)x[E++]=p;else{var B=0,W=0;for(p==16?(W=3+Ne(r,a,3),a+=2,B=x[E-1]):p==17?(W=3+Ne(r,a,7),a+=3):p==18&&(W=11+Ne(r,a,127),a+=7);W--;)x[E++]=B}}var N=x.subarray(0,S),T=x.subarray(S);d=ii(N),f=ii(T),u=ze(N,d,1),h=ze(T,f,1)}else throw"invalid block type";else{var p=Gn(a)+4,g=r[p-4]|r[p-3]<<8,w=p+g;if(w>s){if(n)throw"unexpected EOF";break}i&&o(c+g),e.set(r.subarray(p,w),c),t.b=c+=g,t.p=a=w*8;continue}if(a>m)throw"unexpected EOF"}i&&o(c+131072);for(var D=(1<<d)-1,U=(1<<f)-1,Q=d+f+18;n||a+Q<m;){var B=u[ni(r,a)&D],ce=B>>>4;if(a+=B&15,a>m)throw"unexpected EOF";if(!B)throw"invalid length/literal";if(ce<256)e[c++]=ce;else if(ce==256){u=null;break}else{var se=ce-254;if(ce>264){var E=ce-257,fe=Dr[E];se=Ne(r,a,(1<<fe)-1)+Gc[E],a+=fe}var Se=h[ni(r,a)&U],he=Se>>>4;if(!Se)throw"invalid distance";a+=Se&15;var T=Fb[he];if(he>3){var fe=$r[he];T+=ni(r,a)&(1<<fe)-1,a+=fe}if(a>m)throw"unexpected EOF";i&&o(c+131072);for(var le=c+se;c<le;c+=4)e[c]=e[c-T],e[c+1]=e[c+1-T],e[c+2]=e[c+2-T],e[c+3]=e[c+3-T];c=le}}t.l=u,t.p=a,t.b=c,u&&(l=1,t.m=d,t.d=h,t.n=f)}while(!l);return c==e.length?e:jn(e,0,c)},Ue=function(r,e,t){t<<=e&7;var s=e/8>>0;r[s]|=t,r[s+1]|=t>>>8},Gt=function(r,e,t){t<<=e&7;var s=e/8>>0;r[s]|=t,r[s+1]|=t>>>8,r[s+2]|=t>>>16},oi=function(r,e){for(var t=[],s=0;s<r.length;++s)r[s]&&t.push({s,f:r[s]});var i=t.length,n=t.slice();if(!i)return[new ye(0),0];if(i==1){var o=new ye(t[0].s+1);return o[t[0].s]=1,[o,1]}t.sort(function(C,x){return C.f-x.f}),t.push({s:-1,f:25001});var l=t[0],a=t[1],c=0,u=1,h=2;for(t[0]={s:-1,f:l.f+a.f,l,r:a};u!=i-1;)l=t[t[c].f<t[h].f?c++:h++],a=t[c!=u&&t[c].f<t[h].f?c++:h++],t[u++]={s:-1,f:l.f+a.f,l,r:a};for(var d=n[0].s,s=1;s<i;++s)n[s].s>d&&(d=n[s].s);var f=new we(d+1),m=Xi(t[u-1],f,0);if(m>e){var s=0,y=0,p=m-e,g=1<<p;for(n.sort(function(x,M){return f[M.s]-f[x.s]||x.f-M.f});s<i;++s){var w=n[s].s;if(f[w]>e)y+=g-(1<<m-f[w]),f[w]=e;else break}for(y>>>=p;y>0;){var S=n[s].s;f[S]<e?y-=1<<e-f[S]++-1:++s}for(;s>=0&&y;--s){var b=n[s].s;f[b]==e&&(--f[b],++y)}m=e}return[new ye(f),m]},Xi=function(r,e,t){return r.s==-1?Math.max(Xi(r.l,e,t+1),Xi(r.r,e,t+1)):e[r.s]=t},Ta=function(r){for(var e=r.length;e&&!r[--e];);for(var t=new we(++e),s=0,i=r[0],n=1,o=function(a){t[s++]=a},l=1;l<=e;++l)if(r[l]==i&&l!=e)++n;else{if(!i&&n>2){for(;n>138;n-=138)o(32754);n>2&&(o(n>10?n-11<<5|28690:n-3<<5|12305),n=0)}else if(n>3){for(o(i),--n;n>6;n-=6)o(8304);n>2&&(o(n-3<<5|8208),n=0)}for(;n--;)o(i);n=1,i=r[l]}return[t.subarray(0,s),e]},jt=function(r,e){for(var t=0,s=0;s<e.length;++s)t+=r[s]*e[s];return t},Ji=function(r,e,t){var s=t.length,i=Gn(e+2);r[i]=s&255,r[i+1]=s>>>8,r[i+2]=r[i]^255,r[i+3]=r[i+1]^255;for(var n=0;n<s;++n)r[i+n+4]=t[n];return(i+4+s)*8},Oa=function(r,e,t,s,i,n,o,l,a,c,u){Ue(e,u++,t),++i[256];for(var h=oi(i,15),d=h[0],f=h[1],m=oi(n,15),y=m[0],p=m[1],g=Ta(d),w=g[0],S=g[1],b=Ta(y),C=b[0],x=b[1],M=new we(19),E=0;E<w.length;++E)M[w[E]&31]++;for(var E=0;E<C.length;++E)M[C[E]&31]++;for(var $=oi(M,7),k=$[0],L=$[1],_=19;_>4&&!k[ji[_-1]];--_);var B=c+5<<3,W=jt(i,nt)+jt(n,fs)+o,N=jt(i,d)+jt(n,y)+o+14+3*_+jt(M,k)+(2*M[16]+3*M[17]+7*M[18]);if(B<=W&&B<=N)return Ji(e,u,r.subarray(a,a+c));var T,D,U,Q;if(Ue(e,u,1+(N<W)),u+=2,N<W){T=ze(d,f,0),D=d,U=ze(y,p,0),Q=y;var ce=ze(k,L,0);Ue(e,u,S-257),Ue(e,u+5,x-1),Ue(e,u+10,_-4),u+=14;for(var E=0;E<_;++E)Ue(e,u+3*E,k[ji[E]]);u+=3*_;for(var se=[w,C],fe=0;fe<2;++fe)for(var Se=se[fe],E=0;E<Se.length;++E){var he=Se[E]&31;Ue(e,u,ce[he]),u+=k[he],he>15&&(Ue(e,u,Se[E]>>>5&127),u+=Se[E]>>>12)}}else T=zb,D=nt,U=Wb,Q=fs;for(var E=0;E<l;++E)if(s[E]>255){var he=s[E]>>>18&31;Gt(e,u,T[he+257]),u+=D[he+257],he>7&&(Ue(e,u,s[E]>>>23&31),u+=Dr[he]);var le=s[E]&31;Gt(e,u,U[le]),u+=Q[le],le>3&&(Gt(e,u,s[E]>>>5&8191),u+=$r[le])}else Gt(e,u,T[s[E]]),u+=D[s[E]];return Gt(e,u,T[256]),u+D[256]},Hb=new ds([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Gb=function(r,e,t,s,i,n){var o=r.length,l=new ye(s+o+5*(1+Math.floor(o/7e3))+i),a=l.subarray(s,l.length-i),c=0;if(!e||o<8)for(var u=0;u<=o;u+=65535){var h=u+65535;h<o?c=Ji(a,c,r.subarray(u,h)):(a[u]=n,c=Ji(a,c,r.subarray(u,o)))}else{for(var d=Hb[e-1],f=d>>>13,m=d&8191,y=(1<<t)-1,p=new we(32768),g=new we(y+1),w=Math.ceil(t/3),S=2*w,b=function(mt){return(r[mt]^r[mt+1]<<w^r[mt+2]<<S)&y},C=new ds(25e3),x=new we(288),M=new we(32),E=0,$=0,u=0,k=0,L=0,_=0;u<o;++u){var B=b(u),W=u&32767,N=g[B];if(p[W]=N,g[B]=W,L<=u){var T=o-u;if((E>7e3||k>24576)&&T>423){c=Oa(r,a,0,C,x,M,$,k,_,u-_,c),k=E=$=0,_=u;for(var D=0;D<286;++D)x[D]=0;for(var D=0;D<30;++D)M[D]=0}var U=2,Q=0,ce=m,se=W-N&32767;if(T>2&&B==b(u-se))for(var fe=Math.min(f,T)-1,Se=Math.min(32767,u),he=Math.min(258,T);se<=Se&&--ce&&W!=N;){if(r[u+U]==r[u+U-se]){for(var le=0;le<he&&r[u+le]==r[u+le-se];++le);if(le>U){if(U=le,Q=se,le>fe)break;for(var lt=Math.min(se,le-2),Xe=0,D=0;D<lt;++D){var $e=u-se+D+32768&32767,ft=p[$e],Lt=$e-ft+32768&32767;Lt>Xe&&(Xe=Lt,N=$e)}}}W=N,N=p[W],se+=W-N+32768&32767}if(Q){C[k++]=268435456|Yi[U]<<18|Ra[Q];var Ie=Yi[U]&31,pe=Ra[Q]&31;$+=Dr[Ie]+$r[pe],++x[257+Ie],++M[pe],L=u+U,++E}else C[k++]=r[u],++x[r[u]]}}c=Oa(r,a,n,C,x,M,$,k,_,u-_,c)}return jn(l,0,s+Gn(c)+i)},jb=function(){var r=1,e=0;return{p:function(t){for(var s=r,i=e,n=t.length,o=0;o!=n;){for(var l=Math.min(o+5552,n);o<l;++o)s+=t[o],i+=s;s%=65521,i%=65521}r=s,e=i},d:function(){return(r>>>8<<16|(e&255)<<8|e>>>8)+((r&255)<<23)*2}}},Yb=function(r,e,t,s,i){return Gb(r,e.level==null?6:e.level,e.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(r.length)))*1.5):12+e.mem,t,s,!0)},Zb=function(r,e,t){for(;t;++e)r[e]=t,t>>>=8},Xb=function(r,e){var t=e.level,s=t==0?0:t<6?1:t==9?3:2;r[0]=120,r[1]=s<<6|(s?32-2*s:1)},Jb=function(r){if((r[0]&15)!=8||r[0]>>>4>7||(r[0]<<8|r[1])%31)throw"invalid zlib data";if(r[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function qb(r,e){e===void 0&&(e={});var t=jb();t.p(r);var s=Yb(r,e,2,4);return Xb(s,e),Zb(s,s.length-4,t.d()),s}function Kb(r,e){return Vb((Jb(r),r.subarray(2,-4)),e)}function Yc(r,e){var t=r.length;if(!e&&typeof TextEncoder!="undefined")return new TextEncoder().encode(r);for(var s=new ye(r.length+(r.length>>>1)),i=0,n=function(c){s[i++]=c},o=0;o<t;++o){if(i+5>s.length){var l=new ye(i+8+(t-o<<1));l.set(s),s=l}var a=r.charCodeAt(o);a<128||e?n(a):a<2048?(n(192|a>>>6),n(128|a&63)):a>55295&&a<57344?(a=65536+(a&1047552)|r.charCodeAt(++o)&1023,n(240|a>>>18),n(128|a>>>12&63),n(128|a>>>6&63),n(128|a&63)):(n(224|a>>>12),n(128|a>>>6&63),n(128|a&63))}return jn(s,0,i)}function Zc(r,e){var t="";if(!e&&typeof TextDecoder!="undefined")return new TextDecoder().decode(r);for(var s=0;s<r.length;){var i=r[s++];i<128||e?t+=String.fromCharCode(i):i<224?t+=String.fromCharCode((i&31)<<6|r[s++]&63):i<240?t+=String.fromCharCode((i&15)<<12|(r[s++]&63)<<6|r[s++]&63):(i=((i&15)<<18|(r[s++]&63)<<12|(r[s++]&63)<<6|r[s++]&63)-65536,t+=String.fromCharCode(55296|i>>10,56320|i&1023))}return t}const qi="v1",Qb=r=>{const e=ae(R({},r),{v:qi});return Zc(qb(Yc(JSON.stringify(e))),!0)},ev=r=>{if(typeof r!="string")return r;try{const e=JSON.parse(r);if(e.timestamp)return e}catch(e){}try{const e=JSON.parse(Zc(Kb(Yc(r,!0))));if(e.v===qi)return e;throw new Error(`These events were packed with packer ${e.v} which is incompatible with current packer ${qi}.`)}catch(e){throw console.error(e),new Error("Unknown data format.")}};exports.EventType=O;exports.IncrementalSource=A;exports.MouseInteractions=Z;exports.Replayer=Tb;exports.ReplayerEvents=Y;exports.addCustomEvent=_b;exports.canvasMutation=Gi;exports.flushCustomEventQueue=kb;exports.freezePage=Lb;exports.getVersion=Db;exports.isRecording=$b;exports.pack=Qb;exports.record=Ce;exports.takeFullSnapshot=Pb;exports.unpack=ev;exports.utils=Og;exports.version=Ob;
|
|
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") {
|