@glimt/record 0.0.49 → 0.0.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  (function (g, f) {if ("object" == typeof exports && "object" == typeof module) {module.exports = f();} else if ("function" == typeof define && define.amd) {define("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 ia=Object.defineProperty,na=Object.defineProperties;var oa=Object.getOwnPropertyDescriptors;var Rt=Object.getOwnPropertySymbols;var ei=Object.prototype.hasOwnProperty,ti=Object.prototype.propertyIsEnumerable;var Qs=(s,e,t)=>e in s?ia(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,O=(s,e)=>{for(var t in e||(e={}))ei.call(e,t)&&Qs(s,t,e[t]);if(Rt)for(var t of Rt(e))ti.call(e,t)&&Qs(s,t,e[t]);return s},ee=(s,e)=>na(s,oa(e));var $e=(s,e)=>{var t={};for(var r in s)ei.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&Rt)for(var r of Rt(s))e.indexOf(r)<0&&ti.call(s,r)&&(t[r]=s[r]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var aa=Object.defineProperty,la=(s,e,t)=>e in s?aa(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,w=(s,e,t)=>la(s,typeof e!="symbol"?e+"":e,t),ri,E=(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))(E||{}),R=(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))(R||{}),K=(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))(K||{}),pe=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(pe||{}),Ue=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(Ue||{}),_e=(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))(_e||{}),sn=(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))(sn||{});const si={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ii={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ot={},ua=()=>!!globalThis.Zone;function Rs(s){if(Ot[s])return Ot[s];const e=globalThis[s],t=e.prototype,r=s in si?si[s]:void 0,i=!!(r&&r.every(l=>{var o,c;return!!((c=(o=Object.getOwnPropertyDescriptor(t,l))==null?void 0:o.get)!=null&&c.toString().includes("[native code]"))})),n=s in ii?ii[s]:void 0,a=!!(n&&n.every(l=>{var o;return typeof t[l]=="function"&&((o=t[l])==null?void 0:o.toString().includes("[native code]"))}));if(i&&a&&!ua())return Ot[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const o=l.contentWindow;if(!o)return e.prototype;const c=o[s].prototype;return document.body.removeChild(l),c?Ot[s]=c:t}catch(l){return t}}const kr={};function we(s,e,t){var r;const i=`${s}.${String(t)}`;if(kr[i])return kr[i].call(e);const n=Rs(s),a=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return a?(kr[i]=a,a.call(e)):e[t]}const Tr={};function nn(s,e,t){const r=`${s}.${String(t)}`;if(Tr[r])return Tr[r].bind(e);const n=Rs(s)[t];return typeof n!="function"?e[t]:(Tr[r]=n,n.bind(e))}function ca(s){return we("Node",s,"childNodes")}function ha(s){return we("Node",s,"parentNode")}function fa(s){return we("Node",s,"parentElement")}function pa(s){return we("Node",s,"textContent")}function da(s,e){return nn("Node",s,"contains")(e)}function ma(s){return nn("Node",s,"getRootNode")()}function ga(s){return!s||!("host"in s)?null:we("ShadowRoot",s,"host")}function ya(s){return s.styleSheets}function wa(s){return!s||!("shadowRoot"in s)?null:we("Element",s,"shadowRoot")}function ba(s,e){return we("Element",s,"querySelector")(e)}function Sa(s,e){return we("Element",s,"querySelectorAll")(e)}function on(){return Rs("MutationObserver").constructor}function Oe(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()=>{}}}const x={childNodes:ca,parentNode:ha,parentElement:fa,textContent:pa,contains:da,getRootNode:ma,host:ga,styleSheets:ya,shadowRoot:wa,querySelector:ba,querySelectorAll:Sa,mutationObserver:on,patch:Oe};var Ca=Object.defineProperty,va=(s,e,t)=>e in s?Ca(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Be=(s,e,t)=>va(s,typeof e!="symbol"?e+"":e,t),Y=(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))(Y||{});const ni={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},oi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Mt={},Ia=()=>!!globalThis.Zone;function Os(s){if(Mt[s])return Mt[s];const e=globalThis[s],t=e.prototype,r=s in ni?ni[s]:void 0,i=!!(r&&r.every(l=>{var o,c;return!!((c=(o=Object.getOwnPropertyDescriptor(t,l))==null?void 0:o.get)!=null&&c.toString().includes("[native code]"))})),n=s in oi?oi[s]:void 0,a=!!(n&&n.every(l=>{var o;return typeof t[l]=="function"&&((o=t[l])==null?void 0:o.toString().includes("[native code]"))}));if(i&&a&&!Ia())return Mt[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const o=l.contentWindow;if(!o)return e.prototype;const c=o[s].prototype;return document.body.removeChild(l),c?Mt[s]=c:t}catch(l){return t}}const _r={};function be(s,e,t){var r;const i=`${s}.${String(t)}`;if(_r[i])return _r[i].call(e);const n=Os(s),a=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return a?(_r[i]=a,a.call(e)):e[t]}const Pr={};function an(s,e,t){const r=`${s}.${String(t)}`;if(Pr[r])return Pr[r].bind(e);const n=Os(s)[t];return typeof n!="function"?e[t]:(Pr[r]=n,n.bind(e))}function xa(s){return be("Node",s,"childNodes")}function Aa(s){return be("Node",s,"parentNode")}function Ra(s){return be("Node",s,"parentElement")}function Oa(s){return be("Node",s,"textContent")}function Ma(s,e){return an("Node",s,"contains")(e)}function Ea(s){return an("Node",s,"getRootNode")()}function $a(s){return!s||!("host"in s)?null:be("ShadowRoot",s,"host")}function Na(s){return s.styleSheets}function ka(s){return!s||!("shadowRoot"in s)?null:be("Element",s,"shadowRoot")}function Ta(s,e){return be("Element",s,"querySelector")(e)}function _a(s,e){return be("Element",s,"querySelectorAll")(e)}function Pa(){return Os("MutationObserver").constructor}function La(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()=>{}}}const Z={childNodes:xa,parentNode:Aa,parentElement:Ra,textContent:Oa,contains:Ma,getRootNode:Ea,host:$a,styleSheets:Na,shadowRoot:ka,querySelector:Ta,querySelectorAll:_a,mutationObserver:Pa,patch:La},ln=()=>!("_rrweb_skip_re_fetching_to_suppress_cors_errors"in window&&window._rrweb_skip_re_fetching_to_suppress_cors_errors===!0);function un(s){return s.nodeType===s.ELEMENT_NODE}function rt(s){const e=s&&"host"in s&&"mode"in s&&Z.host(s)||null;return!!(e&&"shadowRoot"in e&&Z.shadowRoot(e)===s)}function st(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function Da(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 Fa(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 ir(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=>cn(i,t)).join("");return Da(r)}catch(e){return null}}function cn(s,e){if(Ua(s)){let t;try{t=ir(s.styleSheet)||Fa(s)}catch(r){t=s.cssText}return s.styleSheet.href?ar(t,s.styleSheet.href):t}else{let t=s.cssText;return Wa(s)&&s.selectorText.includes(":")&&(t=Ba(t)),e?ar(t,e):t}}function Ba(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function Ua(s){return"styleSheet"in s}function Wa(s){return"selectorText"in s}class hn{constructor(){Be(this,"idNodeMap",new Map),Be(this,"nodeMetaMap",new WeakMap)}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),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function za(){return new hn}function nr({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:n}){let a=i||"";const l=r&&Re(r);return(e[t.toLowerCase()]||l&&e[l])&&(n?a=n(a,s):a="*".repeat(a.length)),a}function Re(s){return s.toLowerCase()}const ai="__rrweb_original__",ja=25e4;function Ga(s,e){if(s.width*s.height<ja)return e!=null?e:s.getContext("2d");const t=document.createElement("canvas");t.width=s.width,t.height=s.height;const r=t.getContext("2d");return r&&r.drawImage(s,0,0),t.getContext("2d",{willReadFrequently:!0})}function Va(s,e){if(s.width===0||s.height===0)return!0;const t=Ga(s,e);if(!t)return!0;const r=s.width>512||s.height>512?100:50,i=t.getImageData,n=ai in i?i[ai]:i;for(let a=0;a<s.width;a+=r){const l=Math.min(r,s.width-a);for(let o=0;o<s.height;o+=r){const c=Math.min(r,s.height-o),u=new Uint32Array(n.call(t,a,o,l,c).data.buffer);for(let h=0;h<u.length;h++)if(u[h]!==0)return!1}}return!0}function or(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?Re(e):null}function fn(s,e){var n;let t;try{t=new URL(s,e!=null?e:window.location.href)}catch(a){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 Ha(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const Ya=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Za=/^(?:[a-z+]+:)?\/\//i,Ja=/^www\..*/i,Xa=/^(data:)([^,]*),(.*)/i;function ar(s,e){return(s||"").replace(Ya,(t,r,i,n,a,l)=>{const o=i||a||l,c=r||n||"";if(!o)return t;if(Za.test(o)||Ja.test(o))return`url(${c}${o}${c})`;if(Xa.test(o))return`url(${c}${o}${c})`;if(o[0]==="/")return`url(${c}${Ha(e)+o}${c})`;const u=e.split("/"),h=o.split("/");u.pop();for(const p of h)p!=="."&&(p===".."?u.pop():u.push(p));return`url(${c}${u.join("/")}${c})`})}function Et(s,e=!1){return e?s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Ka(s,e,t=!1){const r=Array.from(e.childNodes),i=[];let n=0;if(r.length>1&&s&&typeof s=="string"){let a=Et(s,t);const l=a.length/s.length;for(let o=1;o<r.length;o++)if(r[o].textContent&&typeof r[o].textContent=="string"){const c=Et(r[o].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 p=c.substring(0,h),d=a.split(p),g=-1;if(d.length===2)g=d[0].length;else if(d.length>2&&d[0]===""&&r[o-1].textContent!=="")g=a.indexOf(p,1);else if(d.length===1){if(p=p.substring(0,p.length-1),d=a.split(p),d.length<=1)return i.push(s),i;h=u+1}else h===c.length-1&&(g=a.indexOf(p));if(d.length>=2&&h>u){const m=r[o-1].textContent;if(m&&typeof m=="string"){const f=Et(m).length;g=a.indexOf(p,f)}g===-1&&(g=d[0].length)}if(g!==-1){let m=Math.floor(g/l);for(;m>0&&m<s.length;){if(n+=1,n>50*r.length)return i.push(s),i;const f=Et(s.substring(0,m),t);if(f.length===g){i.push(s.substring(0,m)),s=s.substring(m),a=a.substring(g);break}else f.length<g?m+=Math.max(1,Math.floor((g-f.length)/l)):m-=Math.max(1,Math.floor((f.length-g)*l))}break}}}}return i.push(s),i}function qa(s,e){return Ka(s,e).join("/* rr_split */")}const Qa=1e3*30,Ne="data-rrweb-link-cloned",el=["woff","woff2","ttf","otf","eot","png","jpg","jpeg","gif","svg","webp","ico","js","mjs","ts","jsx","tsx","json","map","mp4","webm","ogg","mp3","wav","zip","rar","7z","tar","gz","pdf","doc","docx","xls","xlsx"],pn=class Jt{constructor(){if(Be(this,"currentHref",null),Be(this,"clones",{}),Be(this,"cleanTimeout",null),Jt.instance)return Jt.instance;Jt.instance=this}removeCloneNode(e){var t;if(!(e in this.clones)||this.clones[e]===void 0)return;const r=document.querySelector(`link[${Ne}="${this.clones[e].cloneNodeAttrId}"]`);r&&((t=r.parentNode)==null||t.removeChild(r))}onLoad(e){if(!(e in this.clones)||this.clones[e]===void 0)return;const t=Array.from(document.styleSheets);let r=null;for(let a=t.length-1;a>=0;a--)if(t[a].href===e){r=t[a];break}if(!r)return this.removeCloneNode(e);const i=ir(r);if(this.removeCloneNode(e),!i)return;this.clones[e].cssText=i,this.clones[e].loaded=!0;const n=document.querySelector(`link[${Ne}="source-${this.clones[e].cloneNodeAttrId}"]`);n?(n.setAttribute("data-rrweb-mutation",Date.now().toString()),n.removeAttribute(Ne)):(this.clones[e].original.setAttribute("data-rrweb-mutation",Date.now().toString()),this.clones[e].original.removeAttribute(Ne)),window.dispatchEvent(new CustomEvent("__rrweb_custom_event__",{detail:{type:5,timestamp:Date.now(),data:{tag:"async-css-resolution",requestCssId:this.clones[e].requestCssId,cssText:this.clones[e].cssText}}}))}onLoadError(e){!(e in this.clones)||this.clones[e]===void 0||this.removeCloneNode(e)}removeAllCloneElements(){for(const e of Object.keys(this.clones))this.removeCloneNode(e)}onCleanTimeout(){it.cleanTimeout=null,it.removeAllCloneElements()}blowCache(){this.removeAllCloneElements(),this.clones={}}requestClone({forElement:e,requestCssId:t}){if(!ln())return;this.currentHref!=null&&document.location.href!==this.currentHref&&this.blowCache(),this.currentHref=document.location.href;const r=e.href;if(!r||r in this.clones&&this.clones[r]!==void 0||e.getAttribute("crossorigin")==="anonymous")return;if(e.rel!=="stylesheet"){const a=r.split("/").pop();if(a&&a.includes(".")){const[l]=a.split("?"),o=l.split(".").pop();if(o&&el.includes(o.trim().toLowerCase()))return}}const i=e.cloneNode(),n=Math.random().toString(36).slice(2);i.setAttribute("crossorigin","anonymous"),i.setAttribute(Ne,n),e.setAttribute(Ne,`source-${n}`),document.head.appendChild(i),this.clones[r]={original:e,clone:i,loaded:!1,cssText:null,cloneNodeAttrId:n,requestCssId:t},i.onload=()=>{this.onLoad(r)},i.onerror=()=>{this.onLoadError(r)},this.cleanTimeout&&clearTimeout(this.cleanTimeout),this.cleanTimeout=setTimeout(it.onCleanTimeout,Qa)}getClonedCssTextIfAvailable(e){return e in this.clones&&this.clones[e]!==void 0&&this.clones[e].loaded===!0?this.clones[e].cssText:null}};Be(pn,"instance");let tl=pn;const it=new tl;let rl=1;const sl=new RegExp("[^a-z0-9-_:]"),at=-2;function dn(){return rl++}function il(s){if(s instanceof HTMLFormElement)return"form";const e=Re(s.tagName);return sl.test(e)?"div":e}let ke,li;const nl=/^[^ \t\n\r\u000c]+/,ol=/^[, \t\n\r\u000c]+/;function al(s,e){if(e.trim()==="")return e;let t=0;function r(n){let a;const l=n.exec(e.substring(t));return l?(a=l[0],t+=a.length,a):""}const i=[];for(;r(ol),!(t>=e.length);){let n=r(nl);if(n.slice(-1)===",")n=Le(s,n.substring(0,n.length-1)),i.push(n);else{let a="";n=Le(s,n);let l=!1;for(;;){const o=e.charAt(t);if(o===""){i.push((n+a).trim());break}else if(l)o===")"&&(l=!1);else if(o===","){t+=1,i.push((n+a).trim());break}else o==="("&&(l=!0);a+=o,t+=1}}}return i.join(", ")}const ui=new WeakMap;function Le(s,e){return!e||e.trim()===""?e:Ms(s,e)}function ll(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function Ms(s,e){let t=ui.get(s);if(t||(t=s.createElement("a"),ui.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function mn(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")?Le(s,r):t==="srcset"?al(s,r):t==="style"?ar(r,Ms(s)):e==="object"&&t==="data"?Le(s,r):r)}function gn(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function ul(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 lr(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?lr(Z.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?lr(Z.parentNode(s),e,t):!1}function yn(s,e,t,r){let i;if(un(s)){if(i=s,!Z.childNodes(i).length)return!1}else{if(Z.parentElement(s)===null)return!1;i=Z.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(lr(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 cl(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 a="about:blank";if(r.location.href!==a||s.src===a||s.src==="")return setTimeout(e,0),s.addEventListener("load",e);s.addEventListener("load",e)}function hl(s,e,t){let r=!1,i;try{i=s.sheet}catch(a){return}if(i)return;const n=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener("load",()=>{clearTimeout(n),r=!0,e()})}function fl(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:a,inlineStylesheet:l,maskInputOptions:o={},maskTextFn:c,maskInputFn:u,dataURLOptions:h={},inlineImages:p,recordCanvas:d,keepIframeSrcFn:g,newlyAddedElement:m=!1,cssCaptured:f=!1}=e,b=pl(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:Y.Document,childNodes:[],compatMode:s.compatMode}:{type:Y.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return{type:Y.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:b};case s.ELEMENT_NODE:return gl(s,{doc:t,blockClass:i,blockSelector:n,inlineStylesheet:l,maskInputOptions:o,maskInputFn:u,dataURLOptions:h,inlineImages:p,recordCanvas:d,keepIframeSrcFn:g,newlyAddedElement:m,rootId:b});case s.TEXT_NODE:return ml(s,{doc:t,needsMask:a,maskTextFn:c,rootId:b,cssCaptured:f});case s.CDATA_SECTION_NODE:return{type:Y.CDATA,textContent:"",rootId:b};case s.COMMENT_NODE:return{type:Y.Comment,textContent:Z.textContent(s)||"",rootId:b};default:return!1}}function pl(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}const dl=s=>{"requestIdleCallback"in window?window.requestIdleCallback(s):setTimeout(s,100)};function ml(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:n}=e,a=Z.parentNode(s),l=a&&a.tagName;let o="";const c=l==="STYLE"?!0:void 0,u=l==="SCRIPT"?!0:void 0;return u?o="SCRIPT_PLACEHOLDER":n||(o=Z.textContent(s),c&&o&&(o=ar(o,Ms(e.doc)))),!c&&!u&&o&&t&&(o=r?r(o,Z.parentElement(s)):o.replace(/[\S]/g,"*")),{type:Y.Text,textContent:o||"",rootId:i}}function gl(s,e){const{doc:t,blockClass:r,blockSelector:i,inlineStylesheet:n,maskInputOptions:a={},maskInputFn:l,dataURLOptions:o={},inlineImages:c,recordCanvas:u,keepIframeSrcFn:h,newlyAddedElement:p=!1,rootId:d}=e,g=ul(s,r,i),m=il(s);let f={};const b=s.attributes.length;for(let y=0;y<b;y++){const C=s.attributes[y];gn(m,C.name,C.value)||(f[C.name]=mn(t,m,Re(C.name),C.value))}if(m==="link"&&n){const y=Array.from(t.styleSheets);let C=null;for(let $=0;$<y.length;$++)if(y[$].href===s.href){C=y[$];break}let A=null;if(C&&(A=ir(C)),A||(A=it.getClonedCssTextIfAvailable(s.href)),A)delete f.rel,delete f.href,f._cssText=A;else{const $=`css-request-${Math.random().toString(36).slice(2)}`;it.requestClone({forElement:s,requestCssId:$}),f._requestCssId=$}}if(m==="style"&&s.sheet){let y=ir(s.sheet);y&&(s.childNodes.length>1&&(y=qa(y,s)),f._cssText=y)}if(m==="input"||m==="textarea"||m==="select"){const y=s.value,C=s.checked;f.type!=="radio"&&f.type!=="checkbox"&&f.type!=="submit"&&f.type!=="button"&&y?f.value=nr({element:s,type:or(s),tagName:m,value:y,maskInputOptions:a,maskInputFn:l}):C&&(f.checked=C)}if(m==="option"&&(s.selected&&!a.select?f.selected=!0:delete f.selected),m==="dialog"&&s.open&&(f.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),m==="canvas"&&u){let y="getContext"in s?s.getContext("2d"):null;if(y!=null)Va(s,y)||(f.rr_dataURL=s.toDataURL(o.type,o.quality));else if(s.width!==0&&s.height!==0){const C=s.toDataURL(o.type,o.quality);f.rr_dataURL=C,dl(()=>{try{const A=t.createElement("canvas");A.width=s.width,A.height=s.height;const $=A.toDataURL(o.type,o.quality);C===$&&delete f.rr_dataURL}catch(A){}})}}if(m==="img"&&c){ke||(ke=t.createElement("canvas"),li=ke.getContext("2d"));let y=s;const C=y.currentSrc||y.getAttribute("src")||"<unknown-src>",A=y.naturalHeight,$=y.naturalWidth,G=()=>{y=null},k=()=>{y.removeEventListener("error",F);try{ke.width=$,ke.height=A,li.drawImage(y,0,0),f.rr_dataURL=ke.toDataURL(o.type,o.quality)}catch(V){if(y.crossOrigin!=="anonymous"){if(ln()){y=new Image,y.src=C,y.crossOrigin="anonymous",y.height=A,y.width=$,y.complete&&y.naturalWidth!==0?k():(y.addEventListener("load",k,{once:!0}),y.addEventListener("error",F,{once:!0}));return}}else console.warn(`Cannot inline img src=${C}! Error: ${V}`)}G()},F=()=>{y.removeEventListener("load",k),G()};y.complete&&y.naturalWidth!==0?k():(y.addEventListener("load",k,{once:!0}),y.addEventListener("error",F,{once:!0}))}if(m==="audio"||m==="video"){const y=f;y.rr_mediaState=s.paused?"paused":"played",y.rr_mediaCurrentTime=s.currentTime,y.rr_mediaPlaybackRate=s.playbackRate,y.rr_mediaMuted=s.muted,y.rr_mediaLoop=s.loop,y.rr_mediaVolume=s.volume}if(p||(s.scrollLeft&&(f.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(f.rr_scrollTop=s.scrollTop)),g){const{width:y,height:C}=s.getBoundingClientRect();f={class:f.class,rr_width:`${y}px`,rr_height:`${C}px`}}m==="iframe"&&!h(f.src)&&(s.contentDocument||(f.rr_src=f.src),delete f.src);let S;try{customElements.get(m)&&(S=!0)}catch(y){}return{type:Y.Element,tagName:m,attributes:f,childNodes:[],isSVG:ll(s)||void 0,needBlock:g,rootId:d,isCustom:S}}function L(s){return s==null?"":s.toLowerCase()}function yl(s,e){if(e.comment&&s.type===Y.Comment)return!0;if(s.type===Y.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"&&fn(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(L(s.attributes.name).match(/^msapplication-tile(image|color)$/)||L(s.attributes.name)==="application-name"||L(s.attributes.rel)==="icon"||L(s.attributes.rel)==="apple-touch-icon"||L(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&L(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(L(s.attributes.property).match(/^(og|twitter|fb):/)||L(s.attributes.name).match(/^(og|twitter):/)||L(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(L(s.attributes.name)==="robots"||L(s.attributes.name)==="googlebot"||L(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(L(s.attributes.name)==="author"||L(s.attributes.name)==="generator"||L(s.attributes.name)==="framework"||L(s.attributes.name)==="publisher"||L(s.attributes.name)==="progid"||L(s.attributes.property).match(/^article:/)||L(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(L(s.attributes.name)==="google-site-verification"||L(s.attributes.name)==="yandex-verification"||L(s.attributes.name)==="csrf-token"||L(s.attributes.name)==="p:domain_verify"||L(s.attributes.name)==="verify-v1"||L(s.attributes.name)==="verification"||L(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function De(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,maskTextClass:a,maskTextSelector:l,skipChild:o=!1,inlineStylesheet:c=!0,maskInputOptions:u={},maskTextFn:h,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g={},inlineImages:m=!1,recordCanvas:f=!1,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:y=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:A=5e3,keepIframeSrcFn:$=()=>!1,newlyAddedElement:G=!1,cssCaptured:k=!1}=e;let{needsMask:F}=e,{preserveWhiteSpace:V=!0}=e;F||(F=yn(s,a,l,F===void 0));const q=fl(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:F,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:p,dataURLOptions:g,inlineImages:m,recordCanvas:f,keepIframeSrcFn:$,newlyAddedElement:G,cssCaptured:k});if(!q)return console.warn(s,"not serialized"),null;let oe;r.hasNode(s)?oe=r.getId(s):yl(q,d)||!V&&q.type===Y.Text&&!q.textContent.replace(/^\s+|\s+$/gm,"").length?oe=at:oe=dn();const N=Object.assign(q,{id:oe});if(r.add(s,N),oe===at)return null;b&&b(s);let Ye=!o;if(N.type===Y.Element){Ye=Ye&&!N.needBlock,delete N.needBlock;const H=Z.shadowRoot(s);H&&st(H)&&(N.isShadowHost=!0)}if((N.type===Y.Document||N.type===Y.Element)&&Ye){d.headWhitespace&&N.type===Y.Element&&N.tagName==="head"&&(V=!1);const H={doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:F,maskTextClass:a,maskTextSelector:l,skipChild:o,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g,inlineImages:m,recordCanvas:f,preserveWhiteSpace:V,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:A,keepIframeSrcFn:$,cssCaptured:!1};if(!(N.type===Y.Element&&N.tagName==="textarea"&&N.attributes.value!==void 0)){N.type===Y.Element&&N.attributes._cssText!==void 0&&typeof N.attributes._cssText=="string"&&(H.cssCaptured=!0);for(const ge of Array.from(Z.childNodes(s))){const ae=De(ge,H);ae&&N.childNodes.push(ae)}}let Q=null;if(un(s)&&(Q=Z.shadowRoot(s))){const ge=Z.childNodes(Q);for(let ae=0;ae<ge.length;ae++){const vt=ge[ae],Ce=De(vt,H);Ce&&(st(Q)&&(Ce.isShadow=!0),N.childNodes.push(Ce))}}}const Ze=Z.parentNode(s);return Ze&&rt(Ze)&&st(Ze)&&(N.isShadow=!0),N.type===Y.Element&&N.tagName==="iframe"&&cl(s,()=>{const H=s.contentDocument;if(H&&S){const Q=De(H,{doc:H,mirror:r,blockClass:i,blockSelector:n,needsMask:F,maskTextClass:a,maskTextSelector:l,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g,inlineImages:m,recordCanvas:f,preserveWhiteSpace:V,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:A,keepIframeSrcFn:$});Q&&S(s,Q)}},y),N.type===Y.Element&&N.tagName==="link"&&typeof N.attributes.rel=="string"&&(N.attributes.rel==="stylesheet"||N.attributes.rel==="preload"&&typeof N.attributes.href=="string"&&fn(N.attributes.href)==="css")&&hl(s,()=>{if(C){const H=De(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:F,maskTextClass:a,maskTextSelector:l,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g,inlineImages:m,recordCanvas:f,preserveWhiteSpace:V,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:A,keepIframeSrcFn:$});H&&C(s,H)}},A),N}function wl(s,e){const{mirror:t=new hn,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:n="rr-mask",maskTextSelector:a=null,inlineStylesheet:l=!0,inlineImages:o=!1,recordCanvas:c=!1,maskAllInputs:u=!1,maskTextFn:h,maskInputFn:p,slimDOM:d=!1,dataURLOptions:g,preserveWhiteSpace:m,onSerialize:f,onIframeLoad:b,iframeLoadTimeout:S,onStylesheetLoad:y,stylesheetLoadTimeout:C,keepIframeSrcFn:A=()=>!1}=e||{};return De(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:n,maskTextSelector:a,skipChild:!1,inlineStylesheet:l,maskInputOptions:u===!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}:u===!1?{password:!0}:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:d===!0||d==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:d==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:d===!1?{}:d,dataURLOptions:g,inlineImages:o,recordCanvas:c,preserveWhiteSpace:m,onSerialize:f,onIframeLoad:b,iframeLoadTimeout:S,onStylesheetLoad:y,stylesheetLoadTimeout:C,keepIframeSrcFn:A,newlyAddedElement:!1})}function bl(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Sl(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 Es={exports:{}},v=String,wn=function(){return{isColorSupported:!1,reset:v,bold:v,dim:v,italic:v,underline:v,inverse:v,hidden:v,strikethrough:v,black:v,red:v,green:v,yellow:v,blue:v,magenta:v,cyan:v,white:v,gray:v,bgBlack:v,bgRed:v,bgGreen:v,bgYellow:v,bgBlue:v,bgMagenta:v,bgCyan:v,bgWhite:v,blackBright:v,redBright:v,greenBright:v,yellowBright:v,blueBright:v,magentaBright:v,cyanBright:v,whiteBright:v,bgBlackBright:v,bgRedBright:v,bgGreenBright:v,bgYellowBright:v,bgBlueBright:v,bgMagentaBright:v,bgCyanBright:v,bgWhiteBright:v}};Es.exports=wn();Es.exports.createColors=wn;var Cl=Es.exports;const vl={},Il=Object.freeze(Object.defineProperty({__proto__:null,default:vl},Symbol.toStringTag,{value:"Module"})),ie=Sl(Il);let ci=Cl,hi=ie,Yr=class bn extends Error{constructor(e,t,r,i,n,a){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),a&&(this.plugin=a),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,bn)}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=ci.isColorSupported);let r=u=>u,i=u=>u,n=u=>u;if(e){let{bold:u,gray:h,red:p}=ci.createColors(!0);i=d=>u(p(d)),r=d=>h(d),hi&&(n=d=>hi(d))}let a=t.split(/\r?\n/),l=Math.max(this.line-3,0),o=Math.min(this.line+2,a.length),c=String(o).length;return a.slice(l,o).map((u,h)=>{let p=l+1+h,d=" "+(" "+p).slice(-c)+" | ";if(p===this.line){if(u.length>160){let m=20,f=Math.max(0,this.column-m),b=Math.max(this.column+m,this.endColumn+m),S=u.slice(f,b),y=r(d.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,m-1)).replace(/[^\t]/g," ");return i(">")+r(d)+n(S)+`
2
+ "use strict";var ia=Object.defineProperty,na=Object.defineProperties;var oa=Object.getOwnPropertyDescriptors;var Rt=Object.getOwnPropertySymbols;var ei=Object.prototype.hasOwnProperty,ti=Object.prototype.propertyIsEnumerable;var Qs=(s,e,t)=>e in s?ia(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,O=(s,e)=>{for(var t in e||(e={}))ei.call(e,t)&&Qs(s,t,e[t]);if(Rt)for(var t of Rt(e))ti.call(e,t)&&Qs(s,t,e[t]);return s},ee=(s,e)=>na(s,oa(e));var $e=(s,e)=>{var t={};for(var r in s)ei.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&Rt)for(var r of Rt(s))e.indexOf(r)<0&&ti.call(s,r)&&(t[r]=s[r]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var aa=Object.defineProperty,la=(s,e,t)=>e in s?aa(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,w=(s,e,t)=>la(s,typeof e!="symbol"?e+"":e,t),ri,E=(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))(E||{}),R=(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))(R||{}),q=(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))(q||{}),pe=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(pe||{}),Ue=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(Ue||{}),_e=(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))(_e||{}),sn=(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))(sn||{});const si={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ii={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ot={},ua=()=>!!globalThis.Zone;function Rs(s){if(Ot[s])return Ot[s];const e=globalThis[s],t=e.prototype,r=s in si?si[s]:void 0,i=!!(r&&r.every(l=>{var o,c;return!!((c=(o=Object.getOwnPropertyDescriptor(t,l))==null?void 0:o.get)!=null&&c.toString().includes("[native code]"))})),n=s in ii?ii[s]:void 0,a=!!(n&&n.every(l=>{var o;return typeof t[l]=="function"&&((o=t[l])==null?void 0:o.toString().includes("[native code]"))}));if(i&&a&&!ua())return Ot[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const o=l.contentWindow;if(!o)return e.prototype;const c=o[s].prototype;return document.body.removeChild(l),c?Ot[s]=c:t}catch(l){return t}}const kr={};function we(s,e,t){var r;const i=`${s}.${String(t)}`;if(kr[i])return kr[i].call(e);const n=Rs(s),a=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return a?(kr[i]=a,a.call(e)):e[t]}const Tr={};function nn(s,e,t){const r=`${s}.${String(t)}`;if(Tr[r])return Tr[r].bind(e);const n=Rs(s)[t];return typeof n!="function"?e[t]:(Tr[r]=n,n.bind(e))}function ca(s){return we("Node",s,"childNodes")}function ha(s){return we("Node",s,"parentNode")}function fa(s){return we("Node",s,"parentElement")}function pa(s){return we("Node",s,"textContent")}function da(s,e){return nn("Node",s,"contains")(e)}function ma(s){return nn("Node",s,"getRootNode")()}function ga(s){return!s||!("host"in s)?null:we("ShadowRoot",s,"host")}function ya(s){return s.styleSheets}function wa(s){return!s||!("shadowRoot"in s)?null:we("Element",s,"shadowRoot")}function ba(s,e){return we("Element",s,"querySelector")(e)}function Sa(s,e){return we("Element",s,"querySelectorAll")(e)}function on(){return Rs("MutationObserver").constructor}function Oe(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()=>{}}}const x={childNodes:ca,parentNode:ha,parentElement:fa,textContent:pa,contains:da,getRootNode:ma,host:ga,styleSheets:ya,shadowRoot:wa,querySelector:ba,querySelectorAll:Sa,mutationObserver:on,patch:Oe};var Ca=Object.defineProperty,va=(s,e,t)=>e in s?Ca(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Be=(s,e,t)=>va(s,typeof e!="symbol"?e+"":e,t),Y=(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))(Y||{});const ni={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},oi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Mt={},Ia=()=>!!globalThis.Zone;function Os(s){if(Mt[s])return Mt[s];const e=globalThis[s],t=e.prototype,r=s in ni?ni[s]:void 0,i=!!(r&&r.every(l=>{var o,c;return!!((c=(o=Object.getOwnPropertyDescriptor(t,l))==null?void 0:o.get)!=null&&c.toString().includes("[native code]"))})),n=s in oi?oi[s]:void 0,a=!!(n&&n.every(l=>{var o;return typeof t[l]=="function"&&((o=t[l])==null?void 0:o.toString().includes("[native code]"))}));if(i&&a&&!Ia())return Mt[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const o=l.contentWindow;if(!o)return e.prototype;const c=o[s].prototype;return document.body.removeChild(l),c?Mt[s]=c:t}catch(l){return t}}const _r={};function be(s,e,t){var r;const i=`${s}.${String(t)}`;if(_r[i])return _r[i].call(e);const n=Os(s),a=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return a?(_r[i]=a,a.call(e)):e[t]}const Pr={};function an(s,e,t){const r=`${s}.${String(t)}`;if(Pr[r])return Pr[r].bind(e);const n=Os(s)[t];return typeof n!="function"?e[t]:(Pr[r]=n,n.bind(e))}function xa(s){return be("Node",s,"childNodes")}function Aa(s){return be("Node",s,"parentNode")}function Ra(s){return be("Node",s,"parentElement")}function Oa(s){return be("Node",s,"textContent")}function Ma(s,e){return an("Node",s,"contains")(e)}function Ea(s){return an("Node",s,"getRootNode")()}function $a(s){return!s||!("host"in s)?null:be("ShadowRoot",s,"host")}function Na(s){return s.styleSheets}function ka(s){return!s||!("shadowRoot"in s)?null:be("Element",s,"shadowRoot")}function Ta(s,e){return be("Element",s,"querySelector")(e)}function _a(s,e){return be("Element",s,"querySelectorAll")(e)}function Pa(){return Os("MutationObserver").constructor}function La(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()=>{}}}const Z={childNodes:xa,parentNode:Aa,parentElement:Ra,textContent:Oa,contains:Ma,getRootNode:Ea,host:$a,styleSheets:Na,shadowRoot:ka,querySelector:Ta,querySelectorAll:_a,mutationObserver:Pa,patch:La},ln=()=>!("_rrweb_skip_re_fetching_to_suppress_cors_errors"in window&&window._rrweb_skip_re_fetching_to_suppress_cors_errors===!0);function un(s){return s.nodeType===s.ELEMENT_NODE}function rt(s){const e=s&&"host"in s&&"mode"in s&&Z.host(s)||null;return!!(e&&"shadowRoot"in e&&Z.shadowRoot(e)===s)}function st(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function Da(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 Fa(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 ir(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=>cn(i,t)).join("");return Da(r)}catch(e){return null}}function cn(s,e){if(Ua(s)){let t;try{t=ir(s.styleSheet)||Fa(s)}catch(r){t=s.cssText}return s.styleSheet.href?ar(t,s.styleSheet.href):t}else{let t=s.cssText;return Wa(s)&&s.selectorText.includes(":")&&(t=Ba(t)),e?ar(t,e):t}}function Ba(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function Ua(s){return"styleSheet"in s}function Wa(s){return"selectorText"in s}class hn{constructor(){Be(this,"idNodeMap",new Map),Be(this,"nodeMetaMap",new WeakMap)}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),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function za(){return new hn}function nr({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:n}){let a=i||"";const l=r&&Re(r);return(e[t.toLowerCase()]||l&&e[l])&&(n?a=n(a,s):a="*".repeat(a.length)),a}function Re(s){return s.toLowerCase()}const ai="__rrweb_original__",ja=25e4;function Ga(s,e){if(s.width*s.height<ja)return e!=null?e:s.getContext("2d");const t=document.createElement("canvas");t.width=s.width,t.height=s.height;const r=t.getContext("2d");return r&&r.drawImage(s,0,0),t.getContext("2d",{willReadFrequently:!0})}function Va(s,e){if(s.width===0||s.height===0)return!0;const t=Ga(s,e);if(!t)return!0;const r=s.width>512||s.height>512?100:50,i=t.getImageData,n=ai in i?i[ai]:i;for(let a=0;a<s.width;a+=r){const l=Math.min(r,s.width-a);for(let o=0;o<s.height;o+=r){const c=Math.min(r,s.height-o),u=new Uint32Array(n.call(t,a,o,l,c).data.buffer);for(let h=0;h<u.length;h++)if(u[h]!==0)return!1}}return!0}function or(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?Re(e):null}function fn(s,e){var n;let t;try{t=new URL(s,e!=null?e:window.location.href)}catch(a){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 Ha(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const Ya=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Za=/^(?:[a-z+]+:)?\/\//i,Ja=/^www\..*/i,Xa=/^(data:)([^,]*),(.*)/i;function ar(s,e){return(s||"").replace(Ya,(t,r,i,n,a,l)=>{const o=i||a||l,c=r||n||"";if(!o)return t;if(Za.test(o)||Ja.test(o))return`url(${c}${o}${c})`;if(Xa.test(o))return`url(${c}${o}${c})`;if(o[0]==="/")return`url(${c}${Ha(e)+o}${c})`;const u=e.split("/"),h=o.split("/");u.pop();for(const p of h)p!=="."&&(p===".."?u.pop():u.push(p));return`url(${c}${u.join("/")}${c})`})}function Et(s,e=!1){return e?s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Ka(s,e,t=!1){const r=Array.from(e.childNodes),i=[];let n=0;if(r.length>1&&s&&typeof s=="string"){let a=Et(s,t);const l=a.length/s.length;for(let o=1;o<r.length;o++)if(r[o].textContent&&typeof r[o].textContent=="string"){const c=Et(r[o].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 p=c.substring(0,h),d=a.split(p),g=-1;if(d.length===2)g=d[0].length;else if(d.length>2&&d[0]===""&&r[o-1].textContent!=="")g=a.indexOf(p,1);else if(d.length===1){if(p=p.substring(0,p.length-1),d=a.split(p),d.length<=1)return i.push(s),i;h=u+1}else h===c.length-1&&(g=a.indexOf(p));if(d.length>=2&&h>u){const m=r[o-1].textContent;if(m&&typeof m=="string"){const f=Et(m).length;g=a.indexOf(p,f)}g===-1&&(g=d[0].length)}if(g!==-1){let m=Math.floor(g/l);for(;m>0&&m<s.length;){if(n+=1,n>50*r.length)return i.push(s),i;const f=Et(s.substring(0,m),t);if(f.length===g){i.push(s.substring(0,m)),s=s.substring(m),a=a.substring(g);break}else f.length<g?m+=Math.max(1,Math.floor((g-f.length)/l)):m-=Math.max(1,Math.floor((f.length-g)*l))}break}}}}return i.push(s),i}function qa(s,e){return Ka(s,e).join("/* rr_split */")}const Qa=1e3*30,Ne="data-rrweb-link-cloned",el=["woff","woff2","ttf","otf","eot","png","jpg","jpeg","gif","svg","webp","ico","js","mjs","ts","jsx","tsx","json","map","mp4","webm","ogg","mp3","wav","zip","rar","7z","tar","gz","pdf","doc","docx","xls","xlsx"],pn=class Jt{constructor(){if(Be(this,"currentHref",null),Be(this,"clones",{}),Be(this,"cleanTimeout",null),Jt.instance)return Jt.instance;Jt.instance=this}removeCloneNode(e){var t;if(!(e in this.clones)||this.clones[e]===void 0)return;const r=document.querySelector(`link[${Ne}="${this.clones[e].cloneNodeAttrId}"]`);r&&((t=r.parentNode)==null||t.removeChild(r))}onLoad(e){if(!(e in this.clones)||this.clones[e]===void 0)return;const t=Array.from(document.styleSheets);let r=null;for(let a=t.length-1;a>=0;a--)if(t[a].href===e){r=t[a];break}if(!r)return this.removeCloneNode(e);const i=ir(r);if(this.removeCloneNode(e),!i)return;this.clones[e].cssText=i,this.clones[e].loaded=!0;const n=document.querySelector(`link[${Ne}="source-${this.clones[e].cloneNodeAttrId}"]`);n?(n.setAttribute("data-rrweb-mutation",Date.now().toString()),n.removeAttribute(Ne)):(this.clones[e].original.setAttribute("data-rrweb-mutation",Date.now().toString()),this.clones[e].original.removeAttribute(Ne)),window.dispatchEvent(new CustomEvent("__rrweb_custom_event__",{detail:{type:5,timestamp:Date.now(),data:{tag:"async-css-resolution",requestCssId:this.clones[e].requestCssId,cssText:this.clones[e].cssText}}}))}onLoadError(e){!(e in this.clones)||this.clones[e]===void 0||this.removeCloneNode(e)}removeAllCloneElements(){for(const e of Object.keys(this.clones))this.removeCloneNode(e)}onCleanTimeout(){it.cleanTimeout=null,it.removeAllCloneElements()}blowCache(){this.removeAllCloneElements(),this.clones={}}requestClone({forElement:e,requestCssId:t}){if(!ln())return;this.currentHref!=null&&document.location.href!==this.currentHref&&this.blowCache(),this.currentHref=document.location.href;const r=e.href;if(!r||r in this.clones&&this.clones[r]!==void 0||e.getAttribute("crossorigin")==="anonymous")return;if(e.rel!=="stylesheet"){const a=r.split("/").pop();if(a&&a.includes(".")){const[l]=a.split("?"),o=l.split(".").pop();if(o&&el.includes(o.trim().toLowerCase()))return}}const i=e.cloneNode(),n=Math.random().toString(36).slice(2);i.setAttribute("crossorigin","anonymous"),i.setAttribute(Ne,n),e.setAttribute(Ne,`source-${n}`),document.head.appendChild(i),this.clones[r]={original:e,clone:i,loaded:!1,cssText:null,cloneNodeAttrId:n,requestCssId:t},i.onload=()=>{this.onLoad(r)},i.onerror=()=>{this.onLoadError(r)},this.cleanTimeout&&clearTimeout(this.cleanTimeout),this.cleanTimeout=setTimeout(it.onCleanTimeout,Qa)}getClonedCssTextIfAvailable(e){return e in this.clones&&this.clones[e]!==void 0&&this.clones[e].loaded===!0?this.clones[e].cssText:null}};Be(pn,"instance");let tl=pn;const it=new tl;let rl=1;const sl=new RegExp("[^a-z0-9-_:]"),at=-2;function dn(){return rl++}function il(s){if(s instanceof HTMLFormElement)return"form";const e=Re(s.tagName);return sl.test(e)?"div":e}let ke,li;const nl=/^[^ \t\n\r\u000c]+/,ol=/^[, \t\n\r\u000c]+/;function al(s,e){if(e.trim()==="")return e;let t=0;function r(n){let a;const l=n.exec(e.substring(t));return l?(a=l[0],t+=a.length,a):""}const i=[];for(;r(ol),!(t>=e.length);){let n=r(nl);if(n.slice(-1)===",")n=Le(s,n.substring(0,n.length-1)),i.push(n);else{let a="";n=Le(s,n);let l=!1;for(;;){const o=e.charAt(t);if(o===""){i.push((n+a).trim());break}else if(l)o===")"&&(l=!1);else if(o===","){t+=1,i.push((n+a).trim());break}else o==="("&&(l=!0);a+=o,t+=1}}}return i.join(", ")}const ui=new WeakMap;function Le(s,e){return!e||e.trim()===""?e:Ms(s,e)}function ll(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function Ms(s,e){let t=ui.get(s);if(t||(t=s.createElement("a"),ui.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function mn(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")?Le(s,r):t==="srcset"?al(s,r):t==="style"?ar(r,Ms(s)):e==="object"&&t==="data"?Le(s,r):r)}function gn(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function ul(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 lr(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?lr(Z.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?lr(Z.parentNode(s),e,t):!1}function yn(s,e,t,r){let i;if(un(s)){if(i=s,!Z.childNodes(i).length)return!1}else{if(Z.parentElement(s)===null)return!1;i=Z.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(lr(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 cl(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 a="about:blank";if(r.location.href!==a||s.src===a||s.src==="")return setTimeout(e,0),s.addEventListener("load",e);s.addEventListener("load",e)}function hl(s,e,t){let r=!1,i;try{i=s.sheet}catch(a){return}if(i)return;const n=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener("load",()=>{clearTimeout(n),r=!0,e()})}function fl(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:a,inlineStylesheet:l,maskInputOptions:o={},maskTextFn:c,maskInputFn:u,dataURLOptions:h={},inlineImages:p,recordCanvas:d,keepIframeSrcFn:g,newlyAddedElement:m=!1,cssCaptured:f=!1}=e,b=pl(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:Y.Document,childNodes:[],compatMode:s.compatMode}:{type:Y.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return{type:Y.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:b};case s.ELEMENT_NODE:return gl(s,{doc:t,blockClass:i,blockSelector:n,inlineStylesheet:l,maskInputOptions:o,maskInputFn:u,dataURLOptions:h,inlineImages:p,recordCanvas:d,keepIframeSrcFn:g,newlyAddedElement:m,rootId:b});case s.TEXT_NODE:return ml(s,{doc:t,needsMask:a,maskTextFn:c,rootId:b,cssCaptured:f});case s.CDATA_SECTION_NODE:return{type:Y.CDATA,textContent:"",rootId:b};case s.COMMENT_NODE:return{type:Y.Comment,textContent:Z.textContent(s)||"",rootId:b};default:return!1}}function pl(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}const dl=s=>{"requestIdleCallback"in window?window.requestIdleCallback(s):setTimeout(s,100)};function ml(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:n}=e,a=Z.parentNode(s),l=a&&a.tagName;let o="";const c=l==="STYLE"?!0:void 0,u=l==="SCRIPT"?!0:void 0;return u?o="SCRIPT_PLACEHOLDER":n||(o=Z.textContent(s),c&&o&&(o=ar(o,Ms(e.doc)))),!c&&!u&&o&&t&&(o=r?r(o,Z.parentElement(s)):o.replace(/[\S]/g,"*")),{type:Y.Text,textContent:o||"",rootId:i}}function gl(s,e){const{doc:t,blockClass:r,blockSelector:i,inlineStylesheet:n,maskInputOptions:a={},maskInputFn:l,dataURLOptions:o={},inlineImages:c,recordCanvas:u,keepIframeSrcFn:h,newlyAddedElement:p=!1,rootId:d}=e,g=ul(s,r,i),m=il(s);let f={};const b=s.attributes.length;for(let y=0;y<b;y++){const S=s.attributes[y];gn(m,S.name,S.value)||(f[S.name]=mn(t,m,Re(S.name),S.value))}if(m==="link"&&n){const y=Array.from(t.styleSheets);let S=null;for(let $=0;$<y.length;$++)if(y[$].href===s.href){S=y[$];break}let A=null;if(S&&(A=ir(S)),A||(A=it.getClonedCssTextIfAvailable(s.href)),A)delete f.rel,delete f.href,f._cssText=A;else{const $=`css-request-${Math.random().toString(36).slice(2)}`;it.requestClone({forElement:s,requestCssId:$}),f._requestCssId=$}}if(m==="style"&&s.sheet){let y=ir(s.sheet);y&&(s.childNodes.length>1&&(y=qa(y,s)),f._cssText=y)}if(m==="input"||m==="textarea"||m==="select"){const y=s.value,S=s.checked;f.type!=="radio"&&f.type!=="checkbox"&&f.type!=="submit"&&f.type!=="button"&&y?f.value=nr({element:s,type:or(s),tagName:m,value:y,maskInputOptions:a,maskInputFn:l}):S&&(f.checked=S)}if(m==="option"&&(s.selected&&!a.select?f.selected=!0:delete f.selected),m==="dialog"&&s.open&&(f.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),m==="canvas"&&u){let y="getContext"in s?s.getContext("2d"):null;if(y!=null)Va(s,y)||(f.rr_dataURL=s.toDataURL(o.type,o.quality));else if(s.width!==0&&s.height!==0){const S=s.toDataURL(o.type,o.quality);f.rr_dataURL=S,dl(()=>{try{const A=t.createElement("canvas");A.width=s.width,A.height=s.height;const $=A.toDataURL(o.type,o.quality);S===$&&delete f.rr_dataURL}catch(A){}})}}if(m==="img"&&c){ke||(ke=t.createElement("canvas"),li=ke.getContext("2d"));const y=s;let S=null;const A=(y.currentSrc||y.getAttribute("src")||"<unknown-src>")+"",$=y.naturalHeight,V=y.naturalWidth,P=()=>{S=null},L=()=>{(S!=null?S:y).removeEventListener("error",j);try{ke.width=V,ke.height=$,li.drawImage(y,0,0),f.rr_dataURL=ke.toDataURL(o.type,o.quality)}catch(K){if(y.crossOrigin!=="anonymous"){if(ln()){S=new Image,S.src=A,S.crossOrigin="anonymous",S.height=$,S.width=V,S.complete&&S.naturalWidth!==0?L():(S.addEventListener("load",L,{once:!0}),S.addEventListener("error",j,{once:!0}));return}}else console.warn(`Cannot inline img src=${A}! Error: ${K}`)}P()},j=()=>{(S!=null?S:y).removeEventListener("load",L),P()};y.complete&&y.naturalWidth!==0?L():(y.addEventListener("load",L,{once:!0}),y.addEventListener("error",j,{once:!0}))}if(m==="audio"||m==="video"){const y=f;y.rr_mediaState=s.paused?"paused":"played",y.rr_mediaCurrentTime=s.currentTime,y.rr_mediaPlaybackRate=s.playbackRate,y.rr_mediaMuted=s.muted,y.rr_mediaLoop=s.loop,y.rr_mediaVolume=s.volume}if(p||(s.scrollLeft&&(f.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(f.rr_scrollTop=s.scrollTop)),g){const{width:y,height:S}=s.getBoundingClientRect();f={class:f.class,rr_width:`${y}px`,rr_height:`${S}px`}}m==="iframe"&&!h(f.src)&&(s.contentDocument||(f.rr_src=f.src),delete f.src);let C;try{customElements.get(m)&&(C=!0)}catch(y){}return{type:Y.Element,tagName:m,attributes:f,childNodes:[],isSVG:ll(s)||void 0,needBlock:g,rootId:d,isCustom:C}}function D(s){return s==null?"":s.toLowerCase()}function yl(s,e){if(e.comment&&s.type===Y.Comment)return!0;if(s.type===Y.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"&&fn(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(D(s.attributes.name).match(/^msapplication-tile(image|color)$/)||D(s.attributes.name)==="application-name"||D(s.attributes.rel)==="icon"||D(s.attributes.rel)==="apple-touch-icon"||D(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&D(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(D(s.attributes.property).match(/^(og|twitter|fb):/)||D(s.attributes.name).match(/^(og|twitter):/)||D(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(D(s.attributes.name)==="robots"||D(s.attributes.name)==="googlebot"||D(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(D(s.attributes.name)==="author"||D(s.attributes.name)==="generator"||D(s.attributes.name)==="framework"||D(s.attributes.name)==="publisher"||D(s.attributes.name)==="progid"||D(s.attributes.property).match(/^article:/)||D(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(D(s.attributes.name)==="google-site-verification"||D(s.attributes.name)==="yandex-verification"||D(s.attributes.name)==="csrf-token"||D(s.attributes.name)==="p:domain_verify"||D(s.attributes.name)==="verify-v1"||D(s.attributes.name)==="verification"||D(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function De(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,maskTextClass:a,maskTextSelector:l,skipChild:o=!1,inlineStylesheet:c=!0,maskInputOptions:u={},maskTextFn:h,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g={},inlineImages:m=!1,recordCanvas:f=!1,onSerialize:b,onIframeLoad:C,iframeLoadTimeout:y=5e3,onStylesheetLoad:S,stylesheetLoadTimeout:A=5e3,keepIframeSrcFn:$=()=>!1,newlyAddedElement:V=!1,cssCaptured:P=!1}=e;let{needsMask:L}=e,{preserveWhiteSpace:j=!0}=e;L||(L=yn(s,a,l,L===void 0));const K=fl(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:L,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:p,dataURLOptions:g,inlineImages:m,recordCanvas:f,keepIframeSrcFn:$,newlyAddedElement:V,cssCaptured:P});if(!K)return console.warn(s,"not serialized"),null;let oe;r.hasNode(s)?oe=r.getId(s):yl(K,d)||!j&&K.type===Y.Text&&!K.textContent.replace(/^\s+|\s+$/gm,"").length?oe=at:oe=dn();const N=Object.assign(K,{id:oe});if(r.add(s,N),oe===at)return null;b&&b(s);let Ye=!o;if(N.type===Y.Element){Ye=Ye&&!N.needBlock,delete N.needBlock;const H=Z.shadowRoot(s);H&&st(H)&&(N.isShadowHost=!0)}if((N.type===Y.Document||N.type===Y.Element)&&Ye){d.headWhitespace&&N.type===Y.Element&&N.tagName==="head"&&(j=!1);const H={doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:L,maskTextClass:a,maskTextSelector:l,skipChild:o,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g,inlineImages:m,recordCanvas:f,preserveWhiteSpace:j,onSerialize:b,onIframeLoad:C,iframeLoadTimeout:y,onStylesheetLoad:S,stylesheetLoadTimeout:A,keepIframeSrcFn:$,cssCaptured:!1};if(!(N.type===Y.Element&&N.tagName==="textarea"&&N.attributes.value!==void 0)){N.type===Y.Element&&N.attributes._cssText!==void 0&&typeof N.attributes._cssText=="string"&&(H.cssCaptured=!0);for(const ge of Array.from(Z.childNodes(s))){const ae=De(ge,H);ae&&N.childNodes.push(ae)}}let Q=null;if(un(s)&&(Q=Z.shadowRoot(s))){const ge=Z.childNodes(Q);for(let ae=0;ae<ge.length;ae++){const vt=ge[ae],Ce=De(vt,H);Ce&&(st(Q)&&(Ce.isShadow=!0),N.childNodes.push(Ce))}}}const Ze=Z.parentNode(s);return Ze&&rt(Ze)&&st(Ze)&&(N.isShadow=!0),N.type===Y.Element&&N.tagName==="iframe"&&cl(s,()=>{const H=s.contentDocument;if(H&&C){const Q=De(H,{doc:H,mirror:r,blockClass:i,blockSelector:n,needsMask:L,maskTextClass:a,maskTextSelector:l,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g,inlineImages:m,recordCanvas:f,preserveWhiteSpace:j,onSerialize:b,onIframeLoad:C,iframeLoadTimeout:y,onStylesheetLoad:S,stylesheetLoadTimeout:A,keepIframeSrcFn:$});Q&&C(s,Q)}},y),N.type===Y.Element&&N.tagName==="link"&&typeof N.attributes.rel=="string"&&(N.attributes.rel==="stylesheet"||N.attributes.rel==="preload"&&typeof N.attributes.href=="string"&&fn(N.attributes.href)==="css")&&hl(s,()=>{if(S){const H=De(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:L,maskTextClass:a,maskTextSelector:l,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g,inlineImages:m,recordCanvas:f,preserveWhiteSpace:j,onSerialize:b,onIframeLoad:C,iframeLoadTimeout:y,onStylesheetLoad:S,stylesheetLoadTimeout:A,keepIframeSrcFn:$});H&&S(s,H)}},A),N}function wl(s,e){const{mirror:t=new hn,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:n="rr-mask",maskTextSelector:a=null,inlineStylesheet:l=!0,inlineImages:o=!1,recordCanvas:c=!1,maskAllInputs:u=!1,maskTextFn:h,maskInputFn:p,slimDOM:d=!1,dataURLOptions:g,preserveWhiteSpace:m,onSerialize:f,onIframeLoad:b,iframeLoadTimeout:C,onStylesheetLoad:y,stylesheetLoadTimeout:S,keepIframeSrcFn:A=()=>!1}=e||{};return De(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:n,maskTextSelector:a,skipChild:!1,inlineStylesheet:l,maskInputOptions:u===!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}:u===!1?{password:!0}:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:d===!0||d==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:d==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:d===!1?{}:d,dataURLOptions:g,inlineImages:o,recordCanvas:c,preserveWhiteSpace:m,onSerialize:f,onIframeLoad:b,iframeLoadTimeout:C,onStylesheetLoad:y,stylesheetLoadTimeout:S,keepIframeSrcFn:A,newlyAddedElement:!1})}function bl(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Sl(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 Es={exports:{}},v=String,wn=function(){return{isColorSupported:!1,reset:v,bold:v,dim:v,italic:v,underline:v,inverse:v,hidden:v,strikethrough:v,black:v,red:v,green:v,yellow:v,blue:v,magenta:v,cyan:v,white:v,gray:v,bgBlack:v,bgRed:v,bgGreen:v,bgYellow:v,bgBlue:v,bgMagenta:v,bgCyan:v,bgWhite:v,blackBright:v,redBright:v,greenBright:v,yellowBright:v,blueBright:v,magentaBright:v,cyanBright:v,whiteBright:v,bgBlackBright:v,bgRedBright:v,bgGreenBright:v,bgYellowBright:v,bgBlueBright:v,bgMagentaBright:v,bgCyanBright:v,bgWhiteBright:v}};Es.exports=wn();Es.exports.createColors=wn;var Cl=Es.exports;const vl={},Il=Object.freeze(Object.defineProperty({__proto__:null,default:vl},Symbol.toStringTag,{value:"Module"})),ie=Sl(Il);let ci=Cl,hi=ie,Yr=class bn extends Error{constructor(e,t,r,i,n,a){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),a&&(this.plugin=a),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,bn)}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=ci.isColorSupported);let r=u=>u,i=u=>u,n=u=>u;if(e){let{bold:u,gray:h,red:p}=ci.createColors(!0);i=d=>u(p(d)),r=d=>h(d),hi&&(n=d=>hi(d))}let a=t.split(/\r?\n/),l=Math.max(this.line-3,0),o=Math.min(this.line+2,a.length),c=String(o).length;return a.slice(l,o).map((u,h)=>{let p=l+1+h,d=" "+(" "+p).slice(-c)+" | ";if(p===this.line){if(u.length>160){let m=20,f=Math.max(0,this.column-m),b=Math.max(this.column+m,this.endColumn+m),C=u.slice(f,b),y=r(d.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,m-1)).replace(/[^\t]/g," ");return i(">")+r(d)+n(C)+`
3
3
  `+y+i("^")}let g=r(d.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+r(d)+n(u)+`
4
4
  `+g+i("^")}return" "+r(d)+n(u)}).join(`
5
5
  `)}toString(){let e=this.showSourceCode();return e&&(e=`
@@ -24,9 +24,9 @@
24
24
  `;this.css.includes(`\r
25
25
  `)&&(t=`\r
26
26
  `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||Xt(e.file),i;this.mapOpts.sourcesContent===!1?(i=new zn(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}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(),su&&ru&&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=Kt.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Kt({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 Kt({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,a;this.stringify(this.root,(l,o,c)=>{if(this.css+=l,o&&c!=="end"&&(i.generated.line=e,i.generated.column=t-1,o.source&&o.source.start?(i.source=this.sourcePath(o),i.original.line=o.source.start.line,i.original.column=o.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),a=l.match(/\n/g),a?(e+=a.length,n=l.lastIndexOf(`
27
- `),t=l.length-n):t+=l.length,o&&c!=="start"){let u=o.parent||{raws:{}};(!(o.type==="decl"||o.type==="atrule"&&!o.nodes)||o!==u.last||u.raws.semicolon)&&(o.source&&o.source.end?(i.source=this.sourcePath(o),i.original.line=o.source.end.line,i.original.column=o.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,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 r=this.opts.to?Xt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Xt(Un(r,this.mapOpts.annotation)));let i=Bn(r,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 tu(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 r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));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(bi){let r=bi(e).toString();return this.memoizedFileURLs.set(e,r),r}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;Wn==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var jn=iu;const Br=39,Si=34,Nt=92,Ci=47,kt=10,Xe=32,Tt=12,_t=9,Pt=13,nu=91,ou=93,au=40,lu=41,uu=123,cu=125,hu=59,fu=42,pu=58,du=64,Lt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Dt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,mu=/.[\r\n"'(/\\]/,vi=/[\da-f]/i;var gu=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,a,l,o,c,u,h,p,d,g,m=r.length,f=0,b=[],S=[];function y(){return f}function C(k){throw e.error("Unclosed "+k,f)}function A(){return S.length===0&&f>=m}function $(k){if(S.length)return S.pop();if(f>=m)return;let F=k?k.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case kt:case Xe:case _t:case Pt:case Tt:{o=f;do o+=1,n=r.charCodeAt(o);while(n===Xe||n===kt||n===_t||n===Pt||n===Tt);u=["space",r.slice(f,o)],f=o-1;break}case nu:case ou:case uu:case cu:case pu:case hu:case lu:{let V=String.fromCharCode(n);u=[V,V,f];break}case au:{if(g=b.length?b.pop()[1]:"",d=r.charCodeAt(f+1),g==="url"&&d!==Br&&d!==Si&&d!==Xe&&d!==kt&&d!==_t&&d!==Tt&&d!==Pt){o=f;do{if(h=!1,o=r.indexOf(")",o+1),o===-1)if(i||F){o=f;break}else C("bracket");for(p=o;r.charCodeAt(p-1)===Nt;)p-=1,h=!h}while(h);u=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),a=r.slice(f,o+1),o===-1||mu.test(a)?u=["(","(",f]:(u=["brackets",a,f,o],f=o);break}case Br:case Si:{c=n===Br?"'":'"',o=f;do{if(h=!1,o=r.indexOf(c,o+1),o===-1)if(i||F){o=f+1;break}else C("string");for(p=o;r.charCodeAt(p-1)===Nt;)p-=1,h=!h}while(h);u=["string",r.slice(f,o+1),f,o],f=o;break}case du:{Lt.lastIndex=f+1,Lt.test(r),Lt.lastIndex===0?o=r.length-1:o=Lt.lastIndex-2,u=["at-word",r.slice(f,o+1),f,o],f=o;break}case Nt:{for(o=f,l=!0;r.charCodeAt(o+1)===Nt;)o+=1,l=!l;if(n=r.charCodeAt(o+1),l&&n!==Ci&&n!==Xe&&n!==kt&&n!==_t&&n!==Pt&&n!==Tt&&(o+=1,vi.test(r.charAt(o)))){for(;vi.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Xe&&(o+=1)}u=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===Ci&&r.charCodeAt(f+1)===fu?(o=r.indexOf("*/",f+2)+1,o===0&&(i||F?o=r.length:C("comment")),u=["comment",r.slice(f,o+1),f,o],f=o):(Dt.lastIndex=f+1,Dt.test(r),Dt.lastIndex===0?o=r.length-1:o=Dt.lastIndex-2,u=["word",r.slice(f,o+1),f,o],b.push(u),f=o);break}}return f++,u}function G(k){S.push(k)}return{back:G,endOfFile:A,nextToken:$,position:y}};let yu=Ts,wu=Cr,bu=vr,Su=wt,Ii=Ps,Cu=gu;const xi={empty:!0,space:!0};function vu(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let Iu=class{constructor(e){this.input=e,this.root=new Su,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 yu;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,a=!1,l=!1,o=[],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(o.length>0){for(n=o.length-1,i=o[n];i&&i[0]==="space";)i=o[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else o.push(e);else o.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(o),o.length?(t.raws.afterName=this.spacesAndCommentsFromStart(o),this.raw(t,"params",o),a&&(e=o[o.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[a,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 a}r=i}return!1}comment(e){let t=new wu;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=Cu(this.input)}decl(e,t){let r=new bu;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]||vu(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 a=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)a.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 p=c;p>0;p--){let d=u[p][0];if(h.trim().startsWith("!")&&d!=="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+=a.map(c=>c[1]).join(""),a=[]),this.raw(r,"value",a.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 Ii;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,a=[],l=e[1].startsWith("--"),o=[],c=e;for(;c;){if(r=c[0],o.push(c),r==="("||r==="[")n||(n=c),a.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=c),a.push("}");else if(a.length===0)if(r===";")if(i){this.decl(o,l);return}else break;else if(r==="{"){this.rule(o);return}else if(r==="}"){this.tokenizer.back(o.pop()),t=!0;break}else r===":"&&(i=!0);else r===a[a.length-1]&&(a.pop(),a.length===0&&(n=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;o.length&&(c=o[o.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(o.pop());this.decl(o,l)}else this.unknownWord(o)}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,a,l=r.length,o="",c=!0,u,h;for(let p=0;p<l;p+=1)n=r[p],a=n[0],a==="space"&&p===l-1&&!i?c=!1:a==="comment"?(h=r[p-1]?r[p-1][0]:"empty",u=r[p+1]?r[p+1][0]:"empty",!xi[h]&&!xi[u]?o.slice(-1)===","?c=!1:o+=n[1]:c=!1):o+=n[1];if(!c){let p=r.reduce((d,g)=>d+g[1],"");e.raws[t]={raw:p,value:o}}e[t]=o}rule(e){e.pop();let t=new Ii;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 xu=Iu;let Au=Me,Ru=Ir,Ou=xu;function fr(s,e){let t=new Ru(s,e),r=new Ou(t);try{r.parse()}catch(i){throw i}return r.root}var Ls=fr;fr.default=fr;Au.registerParse(fr);let ss=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 Gn=ss;ss.default=ss;let Mu=Gn,is=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 Mu(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}};var Ds=is;is.default=is;let Eu=Me,$u=_s,Nu=jn,ku=Ls,Ai=Ds,Tu=wt,_u=br,{isClean:le,my:Pu}=yt;const Lu={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Du={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},Fu={Once:!0,postcssPlugin:!0,prepare:!0},ze=0;function Ke(s){return typeof s=="object"&&typeof s.then=="function"}function Vn(s){let e=!1,t=Lu[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,ze,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,ze,t+"Exit"]:[t,t+"Exit"]}function Ri(s){let e;return s.type==="document"?e=["Document",ze,"DocumentExit"]:s.type==="root"?e=["Root",ze,"RootExit"]:e=Vn(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function ns(s){return s[le]=!1,s.nodes&&s.nodes.forEach(e=>ns(e)),s}let os={},je=class Hn{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=ns(t);else if(t instanceof Hn||t instanceof Ai)i=ns(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=ku;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(a){this.processed=!0,this.error=a}i&&!i[Pu]&&Eu.rebuild(i)}this.result=new Ai(e,i,r),this.helpers=ee(O({},os),{postcss:os,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?O(O({},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(!Du[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Fu[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(Ke(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[le];){e[le]=!0;let t=[Ri(e)];for(;t.length>0;){let r=this.visitTick(t);if(Ke(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 Ke(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=_u;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Nu(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(Ke(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[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(a){throw this.handleError(a,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Ke(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[a,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=a;try{return l(r.toProxy(),this.helpers)}catch(o){throw this.handleError(o,r)}}if(t.iterator!==0){let a=t.iterator,l;for(;l=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!l[le]){l[le]=!0,e.push(Ri(l));return}t.iterator=0,delete r.indexes[a]}let n=t.events;for(;t.eventIndex<n.length;){let a=n[t.eventIndex];if(t.eventIndex+=1,a===ze){r.nodes&&r.nodes.length&&(r[le]=!0,t.iterator=r.getIterator());return}else if(this.listeners[a]){t.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[le]=!0;let t=Vn(e);for(let r of t)if(r===ze)e.nodes&&e.each(i=>{i[le]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};je.registerPostcss=s=>{os=s};var Yn=je;je.default=je;Tu.registerLazyResult(je);$u.registerLazyResult(je);let Bu=jn,Uu=Ls;const Wu=Ds;let zu=br;let as=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=Uu;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=zu;this.result=new Wu(this._processor,i,this._opts),this.result.css=t;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let l=new Bu(n,i,this._opts,t);if(l.isMap()){let[o,c]=l.generate();o&&(this.result.css=o),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 ju=as;as.default=as;let Gu=_s,Vu=Yn,Hu=ju,Yu=wt,ht=class{constructor(e=[]){this.version="8.5.4",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 Hu(this,e,t):new Vu(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Zu=ht;ht.default=ht;Yu.registerProcessor(ht);Gu.registerProcessor(ht);let Zn=Ts,Jn=Cr,Ju=Me,Xu=$s,Xn=vr,Kn=_s,Ku=eu,qu=Ir,Qu=Yn,ec=Dn,tc=Sr,rc=Ls,Fs=Zu,sc=Ds,qn=wt,Qn=Ps,ic=br,nc=Gn;function _(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Fs(s)}_.plugin=function(e,t){let r=!1;function i(...a){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
27
+ `),t=l.length-n):t+=l.length,o&&c!=="start"){let u=o.parent||{raws:{}};(!(o.type==="decl"||o.type==="atrule"&&!o.nodes)||o!==u.last||u.raws.semicolon)&&(o.source&&o.source.end?(i.source=this.sourcePath(o),i.original.line=o.source.end.line,i.original.column=o.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,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 r=this.opts.to?Xt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Xt(Un(r,this.mapOpts.annotation)));let i=Bn(r,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 tu(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 r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));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(bi){let r=bi(e).toString();return this.memoizedFileURLs.set(e,r),r}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;Wn==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var jn=iu;const Br=39,Si=34,Nt=92,Ci=47,kt=10,Xe=32,Tt=12,_t=9,Pt=13,nu=91,ou=93,au=40,lu=41,uu=123,cu=125,hu=59,fu=42,pu=58,du=64,Lt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Dt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,mu=/.[\r\n"'(/\\]/,vi=/[\da-f]/i;var gu=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,a,l,o,c,u,h,p,d,g,m=r.length,f=0,b=[],C=[];function y(){return f}function S(P){throw e.error("Unclosed "+P,f)}function A(){return C.length===0&&f>=m}function $(P){if(C.length)return C.pop();if(f>=m)return;let L=P?P.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case kt:case Xe:case _t:case Pt:case Tt:{o=f;do o+=1,n=r.charCodeAt(o);while(n===Xe||n===kt||n===_t||n===Pt||n===Tt);u=["space",r.slice(f,o)],f=o-1;break}case nu:case ou:case uu:case cu:case pu:case hu:case lu:{let j=String.fromCharCode(n);u=[j,j,f];break}case au:{if(g=b.length?b.pop()[1]:"",d=r.charCodeAt(f+1),g==="url"&&d!==Br&&d!==Si&&d!==Xe&&d!==kt&&d!==_t&&d!==Tt&&d!==Pt){o=f;do{if(h=!1,o=r.indexOf(")",o+1),o===-1)if(i||L){o=f;break}else S("bracket");for(p=o;r.charCodeAt(p-1)===Nt;)p-=1,h=!h}while(h);u=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),a=r.slice(f,o+1),o===-1||mu.test(a)?u=["(","(",f]:(u=["brackets",a,f,o],f=o);break}case Br:case Si:{c=n===Br?"'":'"',o=f;do{if(h=!1,o=r.indexOf(c,o+1),o===-1)if(i||L){o=f+1;break}else S("string");for(p=o;r.charCodeAt(p-1)===Nt;)p-=1,h=!h}while(h);u=["string",r.slice(f,o+1),f,o],f=o;break}case du:{Lt.lastIndex=f+1,Lt.test(r),Lt.lastIndex===0?o=r.length-1:o=Lt.lastIndex-2,u=["at-word",r.slice(f,o+1),f,o],f=o;break}case Nt:{for(o=f,l=!0;r.charCodeAt(o+1)===Nt;)o+=1,l=!l;if(n=r.charCodeAt(o+1),l&&n!==Ci&&n!==Xe&&n!==kt&&n!==_t&&n!==Pt&&n!==Tt&&(o+=1,vi.test(r.charAt(o)))){for(;vi.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Xe&&(o+=1)}u=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===Ci&&r.charCodeAt(f+1)===fu?(o=r.indexOf("*/",f+2)+1,o===0&&(i||L?o=r.length:S("comment")),u=["comment",r.slice(f,o+1),f,o],f=o):(Dt.lastIndex=f+1,Dt.test(r),Dt.lastIndex===0?o=r.length-1:o=Dt.lastIndex-2,u=["word",r.slice(f,o+1),f,o],b.push(u),f=o);break}}return f++,u}function V(P){C.push(P)}return{back:V,endOfFile:A,nextToken:$,position:y}};let yu=Ts,wu=Cr,bu=vr,Su=wt,Ii=Ps,Cu=gu;const xi={empty:!0,space:!0};function vu(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let Iu=class{constructor(e){this.input=e,this.root=new Su,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 yu;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,a=!1,l=!1,o=[],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(o.length>0){for(n=o.length-1,i=o[n];i&&i[0]==="space";)i=o[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else o.push(e);else o.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(o),o.length?(t.raws.afterName=this.spacesAndCommentsFromStart(o),this.raw(t,"params",o),a&&(e=o[o.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[a,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 a}r=i}return!1}comment(e){let t=new wu;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=Cu(this.input)}decl(e,t){let r=new bu;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]||vu(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 a=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)a.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 p=c;p>0;p--){let d=u[p][0];if(h.trim().startsWith("!")&&d!=="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+=a.map(c=>c[1]).join(""),a=[]),this.raw(r,"value",a.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 Ii;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,a=[],l=e[1].startsWith("--"),o=[],c=e;for(;c;){if(r=c[0],o.push(c),r==="("||r==="[")n||(n=c),a.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=c),a.push("}");else if(a.length===0)if(r===";")if(i){this.decl(o,l);return}else break;else if(r==="{"){this.rule(o);return}else if(r==="}"){this.tokenizer.back(o.pop()),t=!0;break}else r===":"&&(i=!0);else r===a[a.length-1]&&(a.pop(),a.length===0&&(n=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;o.length&&(c=o[o.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(o.pop());this.decl(o,l)}else this.unknownWord(o)}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,a,l=r.length,o="",c=!0,u,h;for(let p=0;p<l;p+=1)n=r[p],a=n[0],a==="space"&&p===l-1&&!i?c=!1:a==="comment"?(h=r[p-1]?r[p-1][0]:"empty",u=r[p+1]?r[p+1][0]:"empty",!xi[h]&&!xi[u]?o.slice(-1)===","?c=!1:o+=n[1]:c=!1):o+=n[1];if(!c){let p=r.reduce((d,g)=>d+g[1],"");e.raws[t]={raw:p,value:o}}e[t]=o}rule(e){e.pop();let t=new Ii;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 xu=Iu;let Au=Me,Ru=Ir,Ou=xu;function fr(s,e){let t=new Ru(s,e),r=new Ou(t);try{r.parse()}catch(i){throw i}return r.root}var Ls=fr;fr.default=fr;Au.registerParse(fr);let ss=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 Gn=ss;ss.default=ss;let Mu=Gn,is=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 Mu(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}};var Ds=is;is.default=is;let Eu=Me,$u=_s,Nu=jn,ku=Ls,Ai=Ds,Tu=wt,_u=br,{isClean:le,my:Pu}=yt;const Lu={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Du={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},Fu={Once:!0,postcssPlugin:!0,prepare:!0},ze=0;function Ke(s){return typeof s=="object"&&typeof s.then=="function"}function Vn(s){let e=!1,t=Lu[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,ze,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,ze,t+"Exit"]:[t,t+"Exit"]}function Ri(s){let e;return s.type==="document"?e=["Document",ze,"DocumentExit"]:s.type==="root"?e=["Root",ze,"RootExit"]:e=Vn(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function ns(s){return s[le]=!1,s.nodes&&s.nodes.forEach(e=>ns(e)),s}let os={},je=class Hn{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=ns(t);else if(t instanceof Hn||t instanceof Ai)i=ns(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=ku;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(a){this.processed=!0,this.error=a}i&&!i[Pu]&&Eu.rebuild(i)}this.result=new Ai(e,i,r),this.helpers=ee(O({},os),{postcss:os,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?O(O({},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(!Du[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Fu[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(Ke(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[le];){e[le]=!0;let t=[Ri(e)];for(;t.length>0;){let r=this.visitTick(t);if(Ke(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 Ke(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=_u;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Nu(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(Ke(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[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(a){throw this.handleError(a,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Ke(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[a,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=a;try{return l(r.toProxy(),this.helpers)}catch(o){throw this.handleError(o,r)}}if(t.iterator!==0){let a=t.iterator,l;for(;l=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!l[le]){l[le]=!0,e.push(Ri(l));return}t.iterator=0,delete r.indexes[a]}let n=t.events;for(;t.eventIndex<n.length;){let a=n[t.eventIndex];if(t.eventIndex+=1,a===ze){r.nodes&&r.nodes.length&&(r[le]=!0,t.iterator=r.getIterator());return}else if(this.listeners[a]){t.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[le]=!0;let t=Vn(e);for(let r of t)if(r===ze)e.nodes&&e.each(i=>{i[le]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};je.registerPostcss=s=>{os=s};var Yn=je;je.default=je;Tu.registerLazyResult(je);$u.registerLazyResult(je);let Bu=jn,Uu=Ls;const Wu=Ds;let zu=br;let as=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=Uu;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=zu;this.result=new Wu(this._processor,i,this._opts),this.result.css=t;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let l=new Bu(n,i,this._opts,t);if(l.isMap()){let[o,c]=l.generate();o&&(this.result.css=o),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 ju=as;as.default=as;let Gu=_s,Vu=Yn,Hu=ju,Yu=wt,ht=class{constructor(e=[]){this.version="8.5.4",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 Hu(this,e,t):new Vu(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Zu=ht;ht.default=ht;Yu.registerProcessor(ht);Gu.registerProcessor(ht);let Zn=Ts,Jn=Cr,Ju=Me,Xu=$s,Xn=vr,Kn=_s,Ku=eu,qu=Ir,Qu=Yn,ec=Dn,tc=Sr,rc=Ls,Fs=Zu,sc=Ds,qn=wt,Qn=Ps,ic=br,nc=Gn;function T(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Fs(s)}T.plugin=function(e,t){let r=!1;function i(...a){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
28
28
  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:
29
- https://www.w3ctech.com/topic/2226`));let l=t(...a);return l.postcssPlugin=e,l.postcssVersion=new Fs().version,l}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(a,l,o){return _([i(o)]).process(a,l)},i};_.stringify=ic;_.parse=rc;_.fromJSON=Ku;_.list=ec;_.comment=s=>new Jn(s);_.atRule=s=>new Zn(s);_.decl=s=>new Xn(s);_.rule=s=>new Qn(s);_.root=s=>new qn(s);_.document=s=>new Kn(s);_.CssSyntaxError=Xu;_.Declaration=Xn;_.Container=Ju;_.Processor=Fs;_.Document=Kn;_.Comment=Jn;_.Warning=nc;_.AtRule=Zn;_.Result=sc;_.Input=qu;_.Rule=Qn;_.Root=qn;_.Node=tc;Qu.registerPostcss(_);var oc=_;_.default=_;const B=bl(oc);B.stringify;B.fromJSON;B.plugin;B.parse;B.list;B.document;B.comment;B.atRule;B.rule;B.decl;B.root;B.CssSyntaxError;B.Declaration;B.Container;B.Processor;B.Document;B.Comment;B.Warning;B.AtRule;B.Result;B.Input;B.Rule;B.Root;B.Node;var ac=Object.defineProperty,lc=(s,e,t)=>e in s?ac(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,te=(s,e,t)=>lc(s,typeof e!="symbol"?e+"":e,t),uc=Object.defineProperty,cc=(s,e,t)=>e in s?uc(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,qt=(s,e,t)=>cc(s,typeof e!="symbol"?e+"":e,t);const hc=()=>!("_rrweb_skip_re_fetching_to_suppress_cors_errors"in window&&window._rrweb_skip_re_fetching_to_suppress_cors_errors===!0);function fc(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 pc(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 eo(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=>dc(i,t)).join("");return fc(r)}catch(e){return null}}function dc(s,e){if(gc(s)){let t;try{t=eo(s.styleSheet)||pc(s)}catch(r){t=s.cssText}return s.styleSheet.href?Oi(t,s.styleSheet.href):t}else{let t=s.cssText;return yc(s)&&s.selectorText.includes(":")&&(t=mc(t)),e?Oi(t,e):t}}function mc(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function gc(s){return"styleSheet"in s}function yc(s){return"selectorText"in s}function wc(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const bc=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Sc=/^(?:[a-z+]+:)?\/\//i,Cc=/^www\..*/i,vc=/^(data:)([^,]*),(.*)/i;function Oi(s,e){return(s||"").replace(bc,(t,r,i,n,a,l)=>{const o=i||a||l,c=r||n||"";if(!o)return t;if(Sc.test(o)||Cc.test(o))return`url(${c}${o}${c})`;if(vc.test(o))return`url(${c}${o}${c})`;if(o[0]==="/")return`url(${c}${wc(e)+o}${c})`;const u=e.split("/"),h=o.split("/");u.pop();for(const p of h)p!=="."&&(p===".."?u.pop():u.push(p));return`url(${c}${u.join("/")}${c})`})}const Ic=1e3*30,Te="data-rrweb-link-cloned",xc=["woff","woff2","ttf","otf","eot","png","jpg","jpeg","gif","svg","webp","ico","js","mjs","ts","jsx","tsx","json","map","mp4","webm","ogg","mp3","wav","zip","rar","7z","tar","gz","pdf","doc","docx","xls","xlsx"],to=class Qt{constructor(){if(qt(this,"currentHref",null),qt(this,"clones",{}),qt(this,"cleanTimeout",null),Qt.instance)return Qt.instance;Qt.instance=this}removeCloneNode(e){var t;if(!(e in this.clones)||this.clones[e]===void 0)return;const r=document.querySelector(`link[${Te}="${this.clones[e].cloneNodeAttrId}"]`);r&&((t=r.parentNode)==null||t.removeChild(r))}onLoad(e){if(!(e in this.clones)||this.clones[e]===void 0)return;const t=Array.from(document.styleSheets);let r=null;for(let a=t.length-1;a>=0;a--)if(t[a].href===e){r=t[a];break}if(!r)return this.removeCloneNode(e);const i=eo(r);if(this.removeCloneNode(e),!i)return;this.clones[e].cssText=i,this.clones[e].loaded=!0;const n=document.querySelector(`link[${Te}="source-${this.clones[e].cloneNodeAttrId}"]`);n?(n.setAttribute("data-rrweb-mutation",Date.now().toString()),n.removeAttribute(Te)):(this.clones[e].original.setAttribute("data-rrweb-mutation",Date.now().toString()),this.clones[e].original.removeAttribute(Te)),window.dispatchEvent(new CustomEvent("__rrweb_custom_event__",{detail:{type:5,timestamp:Date.now(),data:{tag:"async-css-resolution",requestCssId:this.clones[e].requestCssId,cssText:this.clones[e].cssText}}}))}onLoadError(e){!(e in this.clones)||this.clones[e]===void 0||this.removeCloneNode(e)}removeAllCloneElements(){for(const e of Object.keys(this.clones))this.removeCloneNode(e)}onCleanTimeout(){Ur.cleanTimeout=null,Ur.removeAllCloneElements()}blowCache(){this.removeAllCloneElements(),this.clones={}}requestClone({forElement:e,requestCssId:t}){if(!hc())return;this.currentHref!=null&&document.location.href!==this.currentHref&&this.blowCache(),this.currentHref=document.location.href;const r=e.href;if(!r||r in this.clones&&this.clones[r]!==void 0||e.getAttribute("crossorigin")==="anonymous")return;if(e.rel!=="stylesheet"){const a=r.split("/").pop();if(a&&a.includes(".")){const[l]=a.split("?"),o=l.split(".").pop();if(o&&xc.includes(o.trim().toLowerCase()))return}}const i=e.cloneNode(),n=Math.random().toString(36).slice(2);i.setAttribute("crossorigin","anonymous"),i.setAttribute(Te,n),e.setAttribute(Te,`source-${n}`),document.head.appendChild(i),this.clones[r]={original:e,clone:i,loaded:!1,cssText:null,cloneNodeAttrId:n,requestCssId:t},i.onload=()=>{this.onLoad(r)},i.onerror=()=>{this.onLoadError(r)},this.cleanTimeout&&clearTimeout(this.cleanTimeout),this.cleanTimeout=setTimeout(Ur.onCleanTimeout,Ic)}getClonedCssTextIfAvailable(e){return e in this.clones&&this.clones[e]!==void 0&&this.clones[e].loaded===!0?this.clones[e].cssText:null}};qt(to,"instance");let Ac=to;const Ur=new Ac;function Rc(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Oc(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 Bs={exports:{}},I=String,ro=function(){return{isColorSupported:!1,reset:I,bold:I,dim:I,italic:I,underline:I,inverse:I,hidden:I,strikethrough:I,black:I,red:I,green:I,yellow:I,blue:I,magenta:I,cyan:I,white:I,gray:I,bgBlack:I,bgRed:I,bgGreen:I,bgYellow:I,bgBlue:I,bgMagenta:I,bgCyan:I,bgWhite:I,blackBright:I,redBright:I,greenBright:I,yellowBright:I,blueBright:I,magentaBright:I,cyanBright:I,whiteBright:I,bgBlackBright:I,bgRedBright:I,bgGreenBright:I,bgYellowBright:I,bgBlueBright:I,bgMagentaBright:I,bgCyanBright:I,bgWhiteBright:I}};Bs.exports=ro();Bs.exports.createColors=ro;var Mc=Bs.exports;const Ec={},$c=Object.freeze(Object.defineProperty({__proto__:null,default:Ec},Symbol.toStringTag,{value:"Module"})),ne=Oc($c);let Mi=Mc,Ei=ne,ls=class so extends Error{constructor(e,t,r,i,n,a){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),a&&(this.plugin=a),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,so)}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=Mi.isColorSupported);let r=u=>u,i=u=>u,n=u=>u;if(e){let{bold:u,gray:h,red:p}=Mi.createColors(!0);i=d=>u(p(d)),r=d=>h(d),Ei&&(n=d=>Ei(d))}let a=t.split(/\r?\n/),l=Math.max(this.line-3,0),o=Math.min(this.line+2,a.length),c=String(o).length;return a.slice(l,o).map((u,h)=>{let p=l+1+h,d=" "+(" "+p).slice(-c)+" | ";if(p===this.line){if(u.length>160){let m=20,f=Math.max(0,this.column-m),b=Math.max(this.column+m,this.endColumn+m),S=u.slice(f,b),y=r(d.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,m-1)).replace(/[^\t]/g," ");return i(">")+r(d)+n(S)+`
29
+ https://www.w3ctech.com/topic/2226`));let l=t(...a);return l.postcssPlugin=e,l.postcssVersion=new Fs().version,l}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(a,l,o){return T([i(o)]).process(a,l)},i};T.stringify=ic;T.parse=rc;T.fromJSON=Ku;T.list=ec;T.comment=s=>new Jn(s);T.atRule=s=>new Zn(s);T.decl=s=>new Xn(s);T.rule=s=>new Qn(s);T.root=s=>new qn(s);T.document=s=>new Kn(s);T.CssSyntaxError=Xu;T.Declaration=Xn;T.Container=Ju;T.Processor=Fs;T.Document=Kn;T.Comment=Jn;T.Warning=nc;T.AtRule=Zn;T.Result=sc;T.Input=qu;T.Rule=Qn;T.Root=qn;T.Node=tc;Qu.registerPostcss(T);var oc=T;T.default=T;const B=bl(oc);B.stringify;B.fromJSON;B.plugin;B.parse;B.list;B.document;B.comment;B.atRule;B.rule;B.decl;B.root;B.CssSyntaxError;B.Declaration;B.Container;B.Processor;B.Document;B.Comment;B.Warning;B.AtRule;B.Result;B.Input;B.Rule;B.Root;B.Node;var ac=Object.defineProperty,lc=(s,e,t)=>e in s?ac(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,te=(s,e,t)=>lc(s,typeof e!="symbol"?e+"":e,t),uc=Object.defineProperty,cc=(s,e,t)=>e in s?uc(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,qt=(s,e,t)=>cc(s,typeof e!="symbol"?e+"":e,t);const hc=()=>!("_rrweb_skip_re_fetching_to_suppress_cors_errors"in window&&window._rrweb_skip_re_fetching_to_suppress_cors_errors===!0);function fc(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 pc(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 eo(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=>dc(i,t)).join("");return fc(r)}catch(e){return null}}function dc(s,e){if(gc(s)){let t;try{t=eo(s.styleSheet)||pc(s)}catch(r){t=s.cssText}return s.styleSheet.href?Oi(t,s.styleSheet.href):t}else{let t=s.cssText;return yc(s)&&s.selectorText.includes(":")&&(t=mc(t)),e?Oi(t,e):t}}function mc(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function gc(s){return"styleSheet"in s}function yc(s){return"selectorText"in s}function wc(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const bc=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Sc=/^(?:[a-z+]+:)?\/\//i,Cc=/^www\..*/i,vc=/^(data:)([^,]*),(.*)/i;function Oi(s,e){return(s||"").replace(bc,(t,r,i,n,a,l)=>{const o=i||a||l,c=r||n||"";if(!o)return t;if(Sc.test(o)||Cc.test(o))return`url(${c}${o}${c})`;if(vc.test(o))return`url(${c}${o}${c})`;if(o[0]==="/")return`url(${c}${wc(e)+o}${c})`;const u=e.split("/"),h=o.split("/");u.pop();for(const p of h)p!=="."&&(p===".."?u.pop():u.push(p));return`url(${c}${u.join("/")}${c})`})}const Ic=1e3*30,Te="data-rrweb-link-cloned",xc=["woff","woff2","ttf","otf","eot","png","jpg","jpeg","gif","svg","webp","ico","js","mjs","ts","jsx","tsx","json","map","mp4","webm","ogg","mp3","wav","zip","rar","7z","tar","gz","pdf","doc","docx","xls","xlsx"],to=class Qt{constructor(){if(qt(this,"currentHref",null),qt(this,"clones",{}),qt(this,"cleanTimeout",null),Qt.instance)return Qt.instance;Qt.instance=this}removeCloneNode(e){var t;if(!(e in this.clones)||this.clones[e]===void 0)return;const r=document.querySelector(`link[${Te}="${this.clones[e].cloneNodeAttrId}"]`);r&&((t=r.parentNode)==null||t.removeChild(r))}onLoad(e){if(!(e in this.clones)||this.clones[e]===void 0)return;const t=Array.from(document.styleSheets);let r=null;for(let a=t.length-1;a>=0;a--)if(t[a].href===e){r=t[a];break}if(!r)return this.removeCloneNode(e);const i=eo(r);if(this.removeCloneNode(e),!i)return;this.clones[e].cssText=i,this.clones[e].loaded=!0;const n=document.querySelector(`link[${Te}="source-${this.clones[e].cloneNodeAttrId}"]`);n?(n.setAttribute("data-rrweb-mutation",Date.now().toString()),n.removeAttribute(Te)):(this.clones[e].original.setAttribute("data-rrweb-mutation",Date.now().toString()),this.clones[e].original.removeAttribute(Te)),window.dispatchEvent(new CustomEvent("__rrweb_custom_event__",{detail:{type:5,timestamp:Date.now(),data:{tag:"async-css-resolution",requestCssId:this.clones[e].requestCssId,cssText:this.clones[e].cssText}}}))}onLoadError(e){!(e in this.clones)||this.clones[e]===void 0||this.removeCloneNode(e)}removeAllCloneElements(){for(const e of Object.keys(this.clones))this.removeCloneNode(e)}onCleanTimeout(){Ur.cleanTimeout=null,Ur.removeAllCloneElements()}blowCache(){this.removeAllCloneElements(),this.clones={}}requestClone({forElement:e,requestCssId:t}){if(!hc())return;this.currentHref!=null&&document.location.href!==this.currentHref&&this.blowCache(),this.currentHref=document.location.href;const r=e.href;if(!r||r in this.clones&&this.clones[r]!==void 0||e.getAttribute("crossorigin")==="anonymous")return;if(e.rel!=="stylesheet"){const a=r.split("/").pop();if(a&&a.includes(".")){const[l]=a.split("?"),o=l.split(".").pop();if(o&&xc.includes(o.trim().toLowerCase()))return}}const i=e.cloneNode(),n=Math.random().toString(36).slice(2);i.setAttribute("crossorigin","anonymous"),i.setAttribute(Te,n),e.setAttribute(Te,`source-${n}`),document.head.appendChild(i),this.clones[r]={original:e,clone:i,loaded:!1,cssText:null,cloneNodeAttrId:n,requestCssId:t},i.onload=()=>{this.onLoad(r)},i.onerror=()=>{this.onLoadError(r)},this.cleanTimeout&&clearTimeout(this.cleanTimeout),this.cleanTimeout=setTimeout(Ur.onCleanTimeout,Ic)}getClonedCssTextIfAvailable(e){return e in this.clones&&this.clones[e]!==void 0&&this.clones[e].loaded===!0?this.clones[e].cssText:null}};qt(to,"instance");let Ac=to;const Ur=new Ac;function Rc(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Oc(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 Bs={exports:{}},I=String,ro=function(){return{isColorSupported:!1,reset:I,bold:I,dim:I,italic:I,underline:I,inverse:I,hidden:I,strikethrough:I,black:I,red:I,green:I,yellow:I,blue:I,magenta:I,cyan:I,white:I,gray:I,bgBlack:I,bgRed:I,bgGreen:I,bgYellow:I,bgBlue:I,bgMagenta:I,bgCyan:I,bgWhite:I,blackBright:I,redBright:I,greenBright:I,yellowBright:I,blueBright:I,magentaBright:I,cyanBright:I,whiteBright:I,bgBlackBright:I,bgRedBright:I,bgGreenBright:I,bgYellowBright:I,bgBlueBright:I,bgMagentaBright:I,bgCyanBright:I,bgWhiteBright:I}};Bs.exports=ro();Bs.exports.createColors=ro;var Mc=Bs.exports;const Ec={},$c=Object.freeze(Object.defineProperty({__proto__:null,default:Ec},Symbol.toStringTag,{value:"Module"})),ne=Oc($c);let Mi=Mc,Ei=ne,ls=class so extends Error{constructor(e,t,r,i,n,a){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),a&&(this.plugin=a),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,so)}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=Mi.isColorSupported);let r=u=>u,i=u=>u,n=u=>u;if(e){let{bold:u,gray:h,red:p}=Mi.createColors(!0);i=d=>u(p(d)),r=d=>h(d),Ei&&(n=d=>Ei(d))}let a=t.split(/\r?\n/),l=Math.max(this.line-3,0),o=Math.min(this.line+2,a.length),c=String(o).length;return a.slice(l,o).map((u,h)=>{let p=l+1+h,d=" "+(" "+p).slice(-c)+" | ";if(p===this.line){if(u.length>160){let m=20,f=Math.max(0,this.column-m),b=Math.max(this.column+m,this.endColumn+m),C=u.slice(f,b),y=r(d.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,m-1)).replace(/[^\t]/g," ");return i(">")+r(d)+n(C)+`
30
30
  `+y+i("^")}let g=r(d.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+r(d)+n(u)+`
31
31
  `+g+i("^")}return" "+r(d)+n(u)}).join(`
32
32
  `)}toString(){let e=this.showSourceCode();return e&&(e=`
@@ -51,11 +51,11 @@ https://www.w3ctech.com/topic/2226`));let l=t(...a);return l.postcssPlugin=e,l.p
51
51
  `;this.css.includes(`\r
52
52
  `)&&(t=`\r
53
53
  `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||er(e.file),i;this.mapOpts.sourcesContent===!1?(i=new Oo(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}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(),ch&&uh&&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=tr.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new tr({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 tr({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,a;this.stringify(this.root,(l,o,c)=>{if(this.css+=l,o&&c!=="end"&&(i.generated.line=e,i.generated.column=t-1,o.source&&o.source.start?(i.source=this.sourcePath(o),i.original.line=o.source.start.line,i.original.column=o.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),a=l.match(/\n/g),a?(e+=a.length,n=l.lastIndexOf(`
54
- `),t=l.length-n):t+=l.length,o&&c!=="start"){let u=o.parent||{raws:{}};(!(o.type==="decl"||o.type==="atrule"&&!o.nodes)||o!==u.last||u.raws.semicolon)&&(o.source&&o.source.end?(i.source=this.sourcePath(o),i.original.line=o.source.end.line,i.original.column=o.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,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 r=this.opts.to?er(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=er(Ao(r,this.mapOpts.annotation)));let i=xo(r,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 lh(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 r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));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(Di){let r=Di(e).toString();return this.memoizedFileURLs.set(e,r),r}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;Ro==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var Mo=hh;const Gr=39,Fi=34,Bt=92,Bi=47,Ut=10,Qe=32,Wt=12,zt=9,jt=13,fh=91,ph=93,dh=40,mh=41,gh=123,yh=125,wh=59,bh=42,Sh=58,Ch=64,Gt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Vt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,vh=/.[\r\n"'(/\\]/,Ui=/[\da-f]/i;var Ih=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,a,l,o,c,u,h,p,d,g,m=r.length,f=0,b=[],S=[];function y(){return f}function C(k){throw e.error("Unclosed "+k,f)}function A(){return S.length===0&&f>=m}function $(k){if(S.length)return S.pop();if(f>=m)return;let F=k?k.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case Ut:case Qe:case zt:case jt:case Wt:{o=f;do o+=1,n=r.charCodeAt(o);while(n===Qe||n===Ut||n===zt||n===jt||n===Wt);u=["space",r.slice(f,o)],f=o-1;break}case fh:case ph:case gh:case yh:case Sh:case wh:case mh:{let V=String.fromCharCode(n);u=[V,V,f];break}case dh:{if(g=b.length?b.pop()[1]:"",d=r.charCodeAt(f+1),g==="url"&&d!==Gr&&d!==Fi&&d!==Qe&&d!==Ut&&d!==zt&&d!==Wt&&d!==jt){o=f;do{if(h=!1,o=r.indexOf(")",o+1),o===-1)if(i||F){o=f;break}else C("bracket");for(p=o;r.charCodeAt(p-1)===Bt;)p-=1,h=!h}while(h);u=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),a=r.slice(f,o+1),o===-1||vh.test(a)?u=["(","(",f]:(u=["brackets",a,f,o],f=o);break}case Gr:case Fi:{c=n===Gr?"'":'"',o=f;do{if(h=!1,o=r.indexOf(c,o+1),o===-1)if(i||F){o=f+1;break}else C("string");for(p=o;r.charCodeAt(p-1)===Bt;)p-=1,h=!h}while(h);u=["string",r.slice(f,o+1),f,o],f=o;break}case Ch:{Gt.lastIndex=f+1,Gt.test(r),Gt.lastIndex===0?o=r.length-1:o=Gt.lastIndex-2,u=["at-word",r.slice(f,o+1),f,o],f=o;break}case Bt:{for(o=f,l=!0;r.charCodeAt(o+1)===Bt;)o+=1,l=!l;if(n=r.charCodeAt(o+1),l&&n!==Bi&&n!==Qe&&n!==Ut&&n!==zt&&n!==jt&&n!==Wt&&(o+=1,Ui.test(r.charAt(o)))){for(;Ui.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Qe&&(o+=1)}u=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===Bi&&r.charCodeAt(f+1)===bh?(o=r.indexOf("*/",f+2)+1,o===0&&(i||F?o=r.length:C("comment")),u=["comment",r.slice(f,o+1),f,o],f=o):(Vt.lastIndex=f+1,Vt.test(r),Vt.lastIndex===0?o=r.length-1:o=Vt.lastIndex-2,u=["word",r.slice(f,o+1),f,o],b.push(u),f=o);break}}return f++,u}function G(k){S.push(k)}return{back:G,endOfFile:A,nextToken:$,position:y}};let xh=js,Ah=Rr,Rh=Or,Oh=St,Wi=Vs,Mh=Ih;const zi={empty:!0,space:!0};function Eh(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let $h=class{constructor(e){this.input=e,this.root=new Oh,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 xh;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,a=!1,l=!1,o=[],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(o.length>0){for(n=o.length-1,i=o[n];i&&i[0]==="space";)i=o[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else o.push(e);else o.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(o),o.length?(t.raws.afterName=this.spacesAndCommentsFromStart(o),this.raw(t,"params",o),a&&(e=o[o.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[a,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 a}r=i}return!1}comment(e){let t=new Ah;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=Mh(this.input)}decl(e,t){let r=new Rh;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]||Eh(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 a=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)a.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 p=c;p>0;p--){let d=u[p][0];if(h.trim().startsWith("!")&&d!=="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+=a.map(c=>c[1]).join(""),a=[]),this.raw(r,"value",a.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 Wi;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,a=[],l=e[1].startsWith("--"),o=[],c=e;for(;c;){if(r=c[0],o.push(c),r==="("||r==="[")n||(n=c),a.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=c),a.push("}");else if(a.length===0)if(r===";")if(i){this.decl(o,l);return}else break;else if(r==="{"){this.rule(o);return}else if(r==="}"){this.tokenizer.back(o.pop()),t=!0;break}else r===":"&&(i=!0);else r===a[a.length-1]&&(a.pop(),a.length===0&&(n=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;o.length&&(c=o[o.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(o.pop());this.decl(o,l)}else this.unknownWord(o)}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,a,l=r.length,o="",c=!0,u,h;for(let p=0;p<l;p+=1)n=r[p],a=n[0],a==="space"&&p===l-1&&!i?c=!1:a==="comment"?(h=r[p-1]?r[p-1][0]:"empty",u=r[p+1]?r[p+1][0]:"empty",!zi[h]&&!zi[u]?o.slice(-1)===","?c=!1:o+=n[1]:c=!1):o+=n[1];if(!c){let p=r.reduce((d,g)=>d+g[1],"");e.raws[t]={raw:p,value:o}}e[t]=o}rule(e){e.pop();let t=new Wi;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 Nh=$h;let kh=Ee,Th=Mr,_h=Nh;function gr(s,e){let t=new Th(s,e),r=new _h(t);try{r.parse()}catch(i){throw i}return r.root}var Hs=gr;gr.default=gr;kh.registerParse(gr);let ws=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 Eo=ws;ws.default=ws;let Ph=Eo,bs=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 Ph(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}};var Ys=bs;bs.default=bs;let Lh=Ee,Dh=Gs,Fh=Mo,Bh=Hs,ji=Ys,Uh=St,Wh=xr,{isClean:ue,my:zh}=bt;const jh={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Gh={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},Vh={Once:!0,postcssPlugin:!0,prepare:!0},Ve=0;function et(s){return typeof s=="object"&&typeof s.then=="function"}function $o(s){let e=!1,t=jh[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,Ve,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,Ve,t+"Exit"]:[t,t+"Exit"]}function Gi(s){let e;return s.type==="document"?e=["Document",Ve,"DocumentExit"]:s.type==="root"?e=["Root",Ve,"RootExit"]:e=$o(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function Ss(s){return s[ue]=!1,s.nodes&&s.nodes.forEach(e=>Ss(e)),s}let Cs={},He=class No{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=Ss(t);else if(t instanceof No||t instanceof ji)i=Ss(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=Bh;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(a){this.processed=!0,this.error=a}i&&!i[zh]&&Lh.rebuild(i)}this.result=new ji(e,i,r),this.helpers=ee(O({},Cs),{postcss:Cs,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?O(O({},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(!Gh[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Vh[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(et(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ue];){e[ue]=!0;let t=[Gi(e)];for(;t.length>0;){let r=this.visitTick(t);if(et(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 et(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=Wh;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Fh(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(et(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ue];)e[ue]=!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(a){throw this.handleError(a,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(et(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[a,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=a;try{return l(r.toProxy(),this.helpers)}catch(o){throw this.handleError(o,r)}}if(t.iterator!==0){let a=t.iterator,l;for(;l=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!l[ue]){l[ue]=!0,e.push(Gi(l));return}t.iterator=0,delete r.indexes[a]}let n=t.events;for(;t.eventIndex<n.length;){let a=n[t.eventIndex];if(t.eventIndex+=1,a===Ve){r.nodes&&r.nodes.length&&(r[ue]=!0,t.iterator=r.getIterator());return}else if(this.listeners[a]){t.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[ue]=!0;let t=$o(e);for(let r of t)if(r===Ve)e.nodes&&e.each(i=>{i[ue]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};He.registerPostcss=s=>{Cs=s};var ko=He;He.default=He;Uh.registerLazyResult(He);Dh.registerLazyResult(He);let Hh=Mo,Yh=Hs;const Zh=Ys;let Jh=xr;let vs=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=Yh;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=Jh;this.result=new Zh(this._processor,i,this._opts),this.result.css=t;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let l=new Hh(n,i,this._opts,t);if(l.isMap()){let[o,c]=l.generate();o&&(this.result.css=o),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 Xh=vs;vs.default=vs;let Kh=Gs,qh=ko,Qh=Xh,ef=St,mt=class{constructor(e=[]){this.version="8.5.4",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 Qh(this,e,t):new qh(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var tf=mt;mt.default=mt;ef.registerProcessor(mt);Kh.registerProcessor(mt);let To=js,_o=Rr,rf=Ee,sf=Us,Po=Or,Lo=Gs,nf=ah,of=Mr,af=ko,lf=vo,uf=Ar,cf=Hs,Zs=tf,hf=Ys,Do=St,Fo=Vs,ff=xr,pf=Eo;function P(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Zs(s)}P.plugin=function(e,t){let r=!1;function i(...a){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
54
+ `),t=l.length-n):t+=l.length,o&&c!=="start"){let u=o.parent||{raws:{}};(!(o.type==="decl"||o.type==="atrule"&&!o.nodes)||o!==u.last||u.raws.semicolon)&&(o.source&&o.source.end?(i.source=this.sourcePath(o),i.original.line=o.source.end.line,i.original.column=o.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,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 r=this.opts.to?er(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=er(Ao(r,this.mapOpts.annotation)));let i=xo(r,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 lh(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 r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));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(Di){let r=Di(e).toString();return this.memoizedFileURLs.set(e,r),r}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;Ro==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var Mo=hh;const Gr=39,Fi=34,Bt=92,Bi=47,Ut=10,Qe=32,Wt=12,zt=9,jt=13,fh=91,ph=93,dh=40,mh=41,gh=123,yh=125,wh=59,bh=42,Sh=58,Ch=64,Gt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Vt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,vh=/.[\r\n"'(/\\]/,Ui=/[\da-f]/i;var Ih=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,a,l,o,c,u,h,p,d,g,m=r.length,f=0,b=[],C=[];function y(){return f}function S(P){throw e.error("Unclosed "+P,f)}function A(){return C.length===0&&f>=m}function $(P){if(C.length)return C.pop();if(f>=m)return;let L=P?P.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case Ut:case Qe:case zt:case jt:case Wt:{o=f;do o+=1,n=r.charCodeAt(o);while(n===Qe||n===Ut||n===zt||n===jt||n===Wt);u=["space",r.slice(f,o)],f=o-1;break}case fh:case ph:case gh:case yh:case Sh:case wh:case mh:{let j=String.fromCharCode(n);u=[j,j,f];break}case dh:{if(g=b.length?b.pop()[1]:"",d=r.charCodeAt(f+1),g==="url"&&d!==Gr&&d!==Fi&&d!==Qe&&d!==Ut&&d!==zt&&d!==Wt&&d!==jt){o=f;do{if(h=!1,o=r.indexOf(")",o+1),o===-1)if(i||L){o=f;break}else S("bracket");for(p=o;r.charCodeAt(p-1)===Bt;)p-=1,h=!h}while(h);u=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),a=r.slice(f,o+1),o===-1||vh.test(a)?u=["(","(",f]:(u=["brackets",a,f,o],f=o);break}case Gr:case Fi:{c=n===Gr?"'":'"',o=f;do{if(h=!1,o=r.indexOf(c,o+1),o===-1)if(i||L){o=f+1;break}else S("string");for(p=o;r.charCodeAt(p-1)===Bt;)p-=1,h=!h}while(h);u=["string",r.slice(f,o+1),f,o],f=o;break}case Ch:{Gt.lastIndex=f+1,Gt.test(r),Gt.lastIndex===0?o=r.length-1:o=Gt.lastIndex-2,u=["at-word",r.slice(f,o+1),f,o],f=o;break}case Bt:{for(o=f,l=!0;r.charCodeAt(o+1)===Bt;)o+=1,l=!l;if(n=r.charCodeAt(o+1),l&&n!==Bi&&n!==Qe&&n!==Ut&&n!==zt&&n!==jt&&n!==Wt&&(o+=1,Ui.test(r.charAt(o)))){for(;Ui.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Qe&&(o+=1)}u=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===Bi&&r.charCodeAt(f+1)===bh?(o=r.indexOf("*/",f+2)+1,o===0&&(i||L?o=r.length:S("comment")),u=["comment",r.slice(f,o+1),f,o],f=o):(Vt.lastIndex=f+1,Vt.test(r),Vt.lastIndex===0?o=r.length-1:o=Vt.lastIndex-2,u=["word",r.slice(f,o+1),f,o],b.push(u),f=o);break}}return f++,u}function V(P){C.push(P)}return{back:V,endOfFile:A,nextToken:$,position:y}};let xh=js,Ah=Rr,Rh=Or,Oh=St,Wi=Vs,Mh=Ih;const zi={empty:!0,space:!0};function Eh(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let $h=class{constructor(e){this.input=e,this.root=new Oh,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 xh;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,a=!1,l=!1,o=[],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(o.length>0){for(n=o.length-1,i=o[n];i&&i[0]==="space";)i=o[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else o.push(e);else o.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(o),o.length?(t.raws.afterName=this.spacesAndCommentsFromStart(o),this.raw(t,"params",o),a&&(e=o[o.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[a,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 a}r=i}return!1}comment(e){let t=new Ah;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=Mh(this.input)}decl(e,t){let r=new Rh;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]||Eh(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 a=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)a.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 p=c;p>0;p--){let d=u[p][0];if(h.trim().startsWith("!")&&d!=="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+=a.map(c=>c[1]).join(""),a=[]),this.raw(r,"value",a.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 Wi;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,a=[],l=e[1].startsWith("--"),o=[],c=e;for(;c;){if(r=c[0],o.push(c),r==="("||r==="[")n||(n=c),a.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=c),a.push("}");else if(a.length===0)if(r===";")if(i){this.decl(o,l);return}else break;else if(r==="{"){this.rule(o);return}else if(r==="}"){this.tokenizer.back(o.pop()),t=!0;break}else r===":"&&(i=!0);else r===a[a.length-1]&&(a.pop(),a.length===0&&(n=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;o.length&&(c=o[o.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(o.pop());this.decl(o,l)}else this.unknownWord(o)}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,a,l=r.length,o="",c=!0,u,h;for(let p=0;p<l;p+=1)n=r[p],a=n[0],a==="space"&&p===l-1&&!i?c=!1:a==="comment"?(h=r[p-1]?r[p-1][0]:"empty",u=r[p+1]?r[p+1][0]:"empty",!zi[h]&&!zi[u]?o.slice(-1)===","?c=!1:o+=n[1]:c=!1):o+=n[1];if(!c){let p=r.reduce((d,g)=>d+g[1],"");e.raws[t]={raw:p,value:o}}e[t]=o}rule(e){e.pop();let t=new Wi;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 Nh=$h;let kh=Ee,Th=Mr,_h=Nh;function gr(s,e){let t=new Th(s,e),r=new _h(t);try{r.parse()}catch(i){throw i}return r.root}var Hs=gr;gr.default=gr;kh.registerParse(gr);let ws=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 Eo=ws;ws.default=ws;let Ph=Eo,bs=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 Ph(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}};var Ys=bs;bs.default=bs;let Lh=Ee,Dh=Gs,Fh=Mo,Bh=Hs,ji=Ys,Uh=St,Wh=xr,{isClean:ue,my:zh}=bt;const jh={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Gh={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},Vh={Once:!0,postcssPlugin:!0,prepare:!0},Ve=0;function et(s){return typeof s=="object"&&typeof s.then=="function"}function $o(s){let e=!1,t=jh[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,Ve,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,Ve,t+"Exit"]:[t,t+"Exit"]}function Gi(s){let e;return s.type==="document"?e=["Document",Ve,"DocumentExit"]:s.type==="root"?e=["Root",Ve,"RootExit"]:e=$o(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function Ss(s){return s[ue]=!1,s.nodes&&s.nodes.forEach(e=>Ss(e)),s}let Cs={},He=class No{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=Ss(t);else if(t instanceof No||t instanceof ji)i=Ss(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=Bh;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(a){this.processed=!0,this.error=a}i&&!i[zh]&&Lh.rebuild(i)}this.result=new ji(e,i,r),this.helpers=ee(O({},Cs),{postcss:Cs,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?O(O({},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(!Gh[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Vh[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(et(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ue];){e[ue]=!0;let t=[Gi(e)];for(;t.length>0;){let r=this.visitTick(t);if(et(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 et(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=Wh;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Fh(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(et(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ue];)e[ue]=!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(a){throw this.handleError(a,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(et(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[a,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=a;try{return l(r.toProxy(),this.helpers)}catch(o){throw this.handleError(o,r)}}if(t.iterator!==0){let a=t.iterator,l;for(;l=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!l[ue]){l[ue]=!0,e.push(Gi(l));return}t.iterator=0,delete r.indexes[a]}let n=t.events;for(;t.eventIndex<n.length;){let a=n[t.eventIndex];if(t.eventIndex+=1,a===Ve){r.nodes&&r.nodes.length&&(r[ue]=!0,t.iterator=r.getIterator());return}else if(this.listeners[a]){t.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[ue]=!0;let t=$o(e);for(let r of t)if(r===Ve)e.nodes&&e.each(i=>{i[ue]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};He.registerPostcss=s=>{Cs=s};var ko=He;He.default=He;Uh.registerLazyResult(He);Dh.registerLazyResult(He);let Hh=Mo,Yh=Hs;const Zh=Ys;let Jh=xr;let vs=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=Yh;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=Jh;this.result=new Zh(this._processor,i,this._opts),this.result.css=t;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let l=new Hh(n,i,this._opts,t);if(l.isMap()){let[o,c]=l.generate();o&&(this.result.css=o),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 Xh=vs;vs.default=vs;let Kh=Gs,qh=ko,Qh=Xh,ef=St,mt=class{constructor(e=[]){this.version="8.5.4",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 Qh(this,e,t):new qh(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var tf=mt;mt.default=mt;ef.registerProcessor(mt);Kh.registerProcessor(mt);let To=js,_o=Rr,rf=Ee,sf=Us,Po=Or,Lo=Gs,nf=ah,of=Mr,af=ko,lf=vo,uf=Ar,cf=Hs,Zs=tf,hf=Ys,Do=St,Fo=Vs,ff=xr,pf=Eo;function _(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Zs(s)}_.plugin=function(e,t){let r=!1;function i(...a){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
55
55
  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:
56
- https://www.w3ctech.com/topic/2226`));let l=t(...a);return l.postcssPlugin=e,l.postcssVersion=new Zs().version,l}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(a,l,o){return P([i(o)]).process(a,l)},i};P.stringify=ff;P.parse=cf;P.fromJSON=nf;P.list=lf;P.comment=s=>new _o(s);P.atRule=s=>new To(s);P.decl=s=>new Po(s);P.rule=s=>new Fo(s);P.root=s=>new Do(s);P.document=s=>new Lo(s);P.CssSyntaxError=sf;P.Declaration=Po;P.Container=rf;P.Processor=Zs;P.Document=Lo;P.Comment=_o;P.Warning=pf;P.AtRule=To;P.Result=hf;P.Input=of;P.Rule=Fo;P.Root=Do;P.Node=uf;af.registerPostcss(P);var df=P;P.default=P;const U=Rc(df);U.stringify;U.fromJSON;U.plugin;U.parse;U.list;U.document;U.comment;U.atRule;U.rule;U.decl;U.root;U.CssSyntaxError;U.Declaration;U.Container;U.Processor;U.Document;U.Comment;U.Warning;U.AtRule;U.Result;U.Input;U.Rule;U.Root;U.Node;class Js{constructor(...e){te(this,"parentElement",null),te(this,"parentNode",null),te(this,"ownerDocument"),te(this,"firstChild",null),te(this,"lastChild",null),te(this,"previousSibling",null),te(this,"nextSibling",null),te(this,"ELEMENT_NODE",1),te(this,"TEXT_NODE",3),te(this,"nodeType"),te(this,"nodeName"),te(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 Js){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"}}function J(s,e,t=document){const r={capture:!0,passive:!0};return t.addEventListener(s,e,r),()=>t.removeEventListener(s,e,r)}const Pe=`Please stop import mirror directly. Instead of that,\r
56
+ https://www.w3ctech.com/topic/2226`));let l=t(...a);return l.postcssPlugin=e,l.postcssVersion=new Zs().version,l}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(a,l,o){return _([i(o)]).process(a,l)},i};_.stringify=ff;_.parse=cf;_.fromJSON=nf;_.list=lf;_.comment=s=>new _o(s);_.atRule=s=>new To(s);_.decl=s=>new Po(s);_.rule=s=>new Fo(s);_.root=s=>new Do(s);_.document=s=>new Lo(s);_.CssSyntaxError=sf;_.Declaration=Po;_.Container=rf;_.Processor=Zs;_.Document=Lo;_.Comment=_o;_.Warning=pf;_.AtRule=To;_.Result=hf;_.Input=of;_.Rule=Fo;_.Root=Do;_.Node=uf;af.registerPostcss(_);var df=_;_.default=_;const U=Rc(df);U.stringify;U.fromJSON;U.plugin;U.parse;U.list;U.document;U.comment;U.atRule;U.rule;U.decl;U.root;U.CssSyntaxError;U.Declaration;U.Container;U.Processor;U.Document;U.Comment;U.Warning;U.AtRule;U.Result;U.Input;U.Rule;U.Root;U.Node;class Js{constructor(...e){te(this,"parentElement",null),te(this,"parentNode",null),te(this,"ownerDocument"),te(this,"firstChild",null),te(this,"lastChild",null),te(this,"previousSibling",null),te(this,"nextSibling",null),te(this,"ELEMENT_NODE",1),te(this,"TEXT_NODE",3),te(this,"nodeType"),te(this,"nodeName"),te(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 Js){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"}}function J(s,e,t=document){const r={capture:!0,passive:!0};return t.addEventListener(s,e,r),()=>t.removeEventListener(s,e,r)}const Pe=`Please stop import mirror directly. Instead of that,\r
57
57
  now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
58
- or you can use record.mirror to access the mirror instance during recording.`;let Vi={map:{},getId(){return console.error(Pe),-1},getNode(){return console.error(Pe),null},removeNodeFromMap(){console.error(Pe)},has(){return console.error(Pe),!1},reset(){console.error(Pe)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(Vi=new Proxy(Vi,{get(s,e,t){return e==="map"&&console.error(Pe),Reflect.get(s,e,t)}}));function gt(s,e,t={}){let r=null,i=0;return function(...n){const a=Date.now();!i&&t.leading===!1&&(i=a);const l=e-(a-i),o=this;l<=0||l>e?(r&&(clearTimeout(r),r=null),i=a,s.apply(o,n)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{i=t.leading===!1?0:Date.now(),r=null,s.apply(o,n)},l))}}function Er(s,e,t,r,i=window){const n=i.Object.getOwnPropertyDescriptor(s,e);return i.Object.defineProperty(s,e,r?t:{set(a){setTimeout(()=>{t.set.call(this,a)},0),n&&n.set&&n.set.call(this,a)}}),()=>Er(s,e,n||{},!0)}let yr=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(yr=()=>new Date().getTime());function Bo(s){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=x.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=x.parentElement(n.body))==null?void 0:r.scrollTop)||((i=n==null?void 0:n.body)==null?void 0:i.scrollTop)||0}}function Uo(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Wo(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function zo(s){return s?s.nodeType===s.ELEMENT_NODE?s:x.parentElement(s):null}function X(s,e,t,r){if(!s)return!1;const i=zo(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(lr(i,e,r))return!0}catch(n){}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function mf(s,e){return e.getId(s)!==-1}function Vr(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===at}function jo(s,e){if(rt(s))return!1;const t=e.getId(s);if(!e.has(t))return!0;const r=x.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?jo(r,e):!0}function Is(s){return!!s.changedTouches}function gf(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 Go(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function Vo(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function xs(s){return s?s instanceof Js&&"shadowRoot"in s?!!s.shadowRoot:!!x.shadowRoot(s):!1}class yf{constructor(){w(this,"id",1),w(this,"styleIDMap",new WeakMap),w(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 Ho(s){var e;let t=null;return"getRootNode"in s&&((e=x.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&x.host(x.getRootNode(s))&&(t=x.host(x.getRootNode(s))),t}function wf(s){let e=s,t;for(;t=Ho(e);)e=t;return e}function bf(s){const e=s.ownerDocument;if(!e)return!1;const t=wf(s);return x.contains(e,t)}function Yo(s){const e=s.ownerDocument;return e?x.contains(e,s)||bf(s):!1}let nt;function Sf(s){nt=s}function Cf(){nt=void 0}const M=s=>nt?(...t)=>{try{return s(...t)}catch(r){if(nt&&nt(r)===!0)return;throw r}}:s;class Hi{constructor(e){w(this,"iframeIdToRemoteIdMap",new WeakMap),w(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){const n=r||this.getIdToRemoteIdMap(e),a=i||this.getRemoteIdToIdMap(e);let l=n.get(t);return l||(l=this.generateIdFn(),n.set(t,l),a.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 vf{constructor(e){w(this,"iframes",new WeakMap),w(this,"crossOriginIframeMap",new WeakMap),w(this,"crossOriginIframeMirror",new Hi(dn)),w(this,"crossOriginIframeStyleMirror"),w(this,"crossOriginIframeRootIdMap",new WeakMap),w(this,"mirror"),w(this,"mutationCb"),w(this,"wrappedEmit"),w(this,"loadListener"),w(this,"stylesheetManager"),w(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Hi(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"||t.origin!==t.data.origin||!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 E.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:E.IncrementalSnapshot,data:{source:R.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case E.Meta:case E.Load:case E.DomContentLoaded:return!1;case E.Plugin:return t;case E.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case E.IncrementalSnapshot:switch(t.data.source){case R.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 R.Drag:case R.TouchMove:case R.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case R.ViewportResize:return!1;case R.MediaInteraction:case R.MouseInteraction:case R.Scroll:case R.CanvasMutation:case R.Input:return this.replaceIds(t.data,e,["id"]),t;case R.StyleSheetRule:case R.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case R.Font:return t;case R.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case R.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!==sn.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}const Zo=class rr{constructor(){if(w(this,"lastFullSnapshot",-1),w(this,"intervalBetweenSnapshots",150),w(this,"debounceTimeout",null),w(this,"debounceTime",10),rr.instance)return rr.instance;rr.instance=this}requestFullSnapshot(){this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=setTimeout(()=>{this.debounceTimeout=null,this.takeSnapshot()},this.debounceTime)}takeSnapshot(){if(Date.now()-this.lastFullSnapshot<this.intervalBetweenSnapshots){console.log("StormSnapshotManager, takeSnapshot: too soon");return}console.log("StormSnapshotManager, takeSnapshot: taking full snapshot"),ep(),this.lastFullSnapshot=Date.now()}};w(Zo,"instance");let If=Zo;const xf=new If;function Yi(s){return"__ln"in s}class Af{constructor(){w(this,"length",0),w(this,"head",null),w(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&&Yi(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&&Yi(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 Zi=(s,e)=>`${s}@${e}`;class Rf{constructor(){w(this,"frozen",!1),w(this,"locked",!1),w(this,"texts",[]),w(this,"attributes",[]),w(this,"attributeMap",new WeakMap),w(this,"removes",[]),w(this,"mapRemoves",[]),w(this,"movedMap",{}),w(this,"addedSet",new Set),w(this,"movedSet",new Set),w(this,"droppedSet",new Set),w(this,"removesSubTreeCache",new Set),w(this,"mutationCb"),w(this,"blockClass"),w(this,"blockSelector"),w(this,"maskTextClass"),w(this,"maskTextSelector"),w(this,"inlineStylesheet"),w(this,"maskInputOptions"),w(this,"maskTextFn"),w(this,"maskInputFn"),w(this,"keepIframeSrcFn"),w(this,"recordCanvas"),w(this,"inlineImages"),w(this,"slimDOMOptions"),w(this,"dataURLOptions"),w(this,"doc"),w(this,"mirror"),w(this,"iframeManager"),w(this,"stylesheetManager"),w(this,"shadowDomManager"),w(this,"canvasManager"),w(this,"processedNodeManager"),w(this,"unattachedDoc"),w(this,"stormBatches",[]),w(this,"stormInfo",null),w(this,"stormSettings",{batchSize:150,timeout:30,mutationLimit:800}),w(this,"handleStormMutations",e=>{const t=Date.now();this.stormInfo==null&&(this.stormInfo={startedAt:t,totalMutations:0,timeout:setTimeout(this.handleStormFinish,this.stormSettings.timeout),stormExceededLimit:!1}),this.stormInfo.totalMutations+=e.length,this.stormInfo.totalMutations>=this.stormSettings.mutationLimit?(this.stormInfo.stormExceededLimit=!0,this.stormBatches=[]):this.stormBatches.push({ts:t,mutations:e}),clearTimeout(this.stormInfo.timeout),e.length<this.stormSettings.batchSize?this.handleStormFinish():this.stormInfo.timeout=setTimeout(this.handleStormFinish,this.stormSettings.timeout)}),w(this,"handleStormFinish",()=>{if(!this.stormInfo)return;const{stormExceededLimit:e}=this.stormInfo;if(clearTimeout(this.stormInfo.timeout),this.stormInfo=null,e)this.stormBatches=[],xf.requestFullSnapshot();else{let t=[];for(const r of this.stormBatches)t.push(...r.mutations);this.stormBatches=[],this.processInternalMutations(t,!0)}}),w(this,"processInternalMutations",(e,t=!1)=>{if(!t&&(this.stormInfo!=null||e.length>=this.stormSettings.batchSize)){this.handleStormMutations(e);return}for(const r of e)this.processMutation(r);this.emit()}),w(this,"processMutations",e=>{this.processInternalMutations(e)}),w(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new Af,i=u=>{let h=u,p=at;for(;p===at;)h=h&&h.nextSibling,p=h&&this.mirror.getId(h);return p},n=u=>{const h=x.parentNode(u);if(!h||!Yo(u))return;let p=!1;if(u.nodeType===Node.TEXT_NODE){const f=h.tagName;if(f==="TEXTAREA")return;f==="STYLE"&&this.addedSet.has(h)&&(p=!0)}const d=rt(h)?this.mirror.getId(Ho(u)):this.mirror.getId(h),g=i(u);if(d===-1||g===-1)return r.addNode(u);const m=De(u,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:f=>{Go(f,this.mirror)&&this.iframeManager.addIframe(f),Vo(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),xs(u)&&this.shadowDomManager.addShadowRoot(x.shadowRoot(u),this.doc)},onIframeLoad:(f,b)=>{this.iframeManager.attachIframe(f,b),this.shadowDomManager.observeAttachShadow(f)},onStylesheetLoad:(f,b)=>{this.stylesheetManager.attachLinkElement(f,b)},cssCaptured:p});m&&(e.push({parentId:d,nextId:g,node:m}),t.add(m.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const u of this.movedSet)Ji(this.removesSubTreeCache,u,this.mirror)&&!this.movedSet.has(x.parentNode(u))||n(u);for(const u of this.addedSet)!Xi(this.droppedSet,u)&&!Ji(this.removesSubTreeCache,u,this.mirror)||Xi(this.movedSet,u)?n(u):this.droppedSet.add(u);let a=null;for(;r.length;){let u=null;if(a){const h=this.mirror.getId(x.parentNode(a.value)),p=i(a.value);h!==-1&&p!==-1&&(u=a)}if(!u){let h=r.tail;for(;h;){const p=h;if(h=h.previous,p){const d=this.mirror.getId(x.parentNode(p.value));if(i(p.value)===-1)continue;if(d!==-1){u=p;break}else{const m=p.value,f=x.parentNode(m);if(f&&f.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const b=x.host(f);if(this.mirror.getId(b)!==-1){u=p;break}}}}}}if(!u){for(;r.head;)r.removeNode(r.head.value);break}a=u.previous,r.removeNode(u.value),n(u.value)}const l=[];for(const u of this.texts){const h=u.node,p=x.parentNode(h);p&&p.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(p);const d=this.mirror.getId(h);!t.has(d)&&this.mirror.has(d)&&l.push({id:d,value:u.value})}const o=[];for(const u of this.attributes){const{attributes:h}=u;if(typeof h.style=="string"){const d=JSON.stringify(u.styleDiff),g=JSON.stringify(u._unchangedStyles);d.length<h.style.length&&(d+g).split("var(").length===h.style.split("var(").length&&(h.style=u.styleDiff)}const p=this.mirror.getId(u.node);!t.has(p)&&this.mirror.has(p)&&o.push({id:p,attributes:h})}const c={texts:l,attributes:o,removes:this.removes,adds:e};!c.texts.length&&!c.attributes.length&&!c.removes.length&&!c.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(c))}),w(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(x.childNodes(e),i=>x.textContent(i)||"").join("");t.attributes.value=nr({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:or(e),value:r,maskInputFn:this.maskInputFn})}),w(this,"processMutation",e=>{if(!Vr(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=x.textContent(e.target);!X(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:yn(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,zo(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);if(r==="value"){const a=or(t);i=nr({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:a,value:i,maskInputFn:this.maskInputFn})}if(X(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let n=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(n||(n={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(e.target,n)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!gn(t.tagName,r))if(n.attributes[r]=mn(this.doc,Re(t.tagName),Re(r),i),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(l){this.unattachedDoc=this.doc}const a=this.unattachedDoc.createElement("span");e.oldValue&&a.setAttribute("style",e.oldValue);for(const l of Array.from(t.style)){const o=t.style.getPropertyValue(l),c=t.style.getPropertyPriority(l);o!==a.style.getPropertyValue(l)||c!==a.style.getPropertyPriority(l)?c===""?n.styleDiff[l]=o:n.styleDiff[l]=[o,c]:n._unchangedStyles[l]=[o,c]}for(const l of Array.from(a.style))t.style.getPropertyValue(l)===""&&(n.styleDiff[l]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?n.attributes.rr_open_mode="modal":n.attributes.rr_open_mode="non-modal");break}case"childList":{if(X(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}for(let a=0;a<e.addedNodes.length;a++)this.genAdds(e.addedNodes[a],e.target);const t=rt(e.target)?this.mirror.getId(x.host(e.target)):this.mirror.getId(e.target);if(X(e.target,this.blockClass,this.blockSelector,!1))return;const r=this.addedSet.has(e.target),i=jo(e.target,this.mirror),n=rt(e.target)&&st(e.target)?!0:void 0;for(let a=0;a<e.removedNodes.length;a++){const l=e.removedNodes[a],o=this.mirror.getId(l);if(Vr(l,this.mirror,this.slimDOMOptions)||!mf(l,this.mirror))return;this.addedSet.has(l)?(As(this.addedSet,l),this.droppedSet.add(l)):r&&o===-1||i||(this.movedSet.has(l)&&this.movedMap[Zi(o,t)]?As(this.movedSet,l):(this.removes.push({parentId:t,id:o,isShadow:n}),Of(l,this.removesSubTreeCache))),this.mapRemoves.push(l)}break}}}),w(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Vr(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[Zi(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);if(!X(e,this.blockClass,this.blockSelector,!1)){const r=x.childNodes(e);for(let i=0;i<r.length;i++)this.genAdds(r[i]);if(xs(e)){const i=x.childNodes(x.shadowRoot(e));for(let n=0;n<i.length;n++){const a=i[n];this.processedNodeManager.add(a,this),this.genAdds(a,e)}}}}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function As(s,e){s.delete(e);const t=x.childNodes(e);for(let r=0;r<t.length;r++)As(s,t[r])}function Of(s,e){const t=[s];for(;t.length;){const r=t.pop();if(e.has(r))continue;e.add(r);const i=x.childNodes(r);for(let n=0;n<i.length;n++)t.push(i[n])}}function Ji(s,e,t){return s.size===0?!1:Mf(s,e)}function Mf(s,e,t){const r=x.parentNode(e);return r?s.has(r):!1}function Xi(s,e){return s.size===0?!1:Jo(s,e)}function Jo(s,e){const t=x.parentNode(e);return t?s.has(t)?!0:Jo(s,t):!1}const Ae=[];function Ct(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 Xo(s,e){const t=new Rf;Ae.push(t),t.init(s);const r=new(on())(M(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function Ef({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 a=[],l;const o=gt(M(h=>{const p=Date.now()-l;s(a.map(d=>(d.timeOffset-=p,d)),h),a=[],l=null}),n),c=M(gt(M(h=>{const p=Ct(h),{clientX:d,clientY:g}=Is(h)?h.changedTouches[0]:h;l||(l=yr()),a.push({x:d,y:g,id:r.getId(p),timeOffset:yr()-l}),o(typeof DragEvent!="undefined"&&h instanceof DragEvent?R.Drag:h instanceof MouseEvent?R.MouseMove:R.TouchMove)}),i,{trailing:!1})),u=[J("mousemove",c,t),J("touchmove",c,t),J("drag",c,t)];return M(()=>{u.forEach(h=>h())})}function $f({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){if(n.mouseInteraction===!1)return()=>{};const a=n.mouseInteraction===!0||n.mouseInteraction===void 0?{}:n.mouseInteraction,l=[];let o=null;const c=u=>h=>{const p=Ct(h);if(X(p,r,i,!0))return;let d=null,g=u;if("pointerType"in h){switch(h.pointerType){case"mouse":d=pe.Mouse;break;case"touch":d=pe.Touch;break;case"pen":d=pe.Pen;break}d===pe.Touch?K[u]===K.MouseDown?g="TouchStart":K[u]===K.MouseUp&&(g="TouchEnd"):pe.Pen}else Is(h)&&(d=pe.Touch);d!==null?(o=d,(g.startsWith("Touch")&&d===pe.Touch||g.startsWith("Mouse")&&d===pe.Mouse)&&(d=null)):K[u]===K.Click&&(d=o,o=null);const m=Is(h)?h.changedTouches[0]:h;if(!m)return;const f=t.getId(p),{clientX:b,clientY:S}=m;M(s)(O({type:K[g],id:f,x:b,y:S},d!==null&&{pointerType:d}))};return Object.keys(K).filter(u=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&a[u]!==!1).forEach(u=>{let h=Re(u);const p=c(u);if(window.PointerEvent)switch(K[u]){case K.MouseDown:case K.MouseUp:h=h.replace("mouse","pointer");break;case K.TouchStart:case K.TouchEnd:return}l.push(J(h,p,e))}),M(()=>{l.forEach(u=>u())})}function Ko({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){const a=M(gt(M(l=>{const o=Ct(l);if(!o||X(o,r,i,!0))return;const c=t.getId(o);if(o===e&&e.defaultView){const u=Bo(e.defaultView);s({id:c,x:u.left,y:u.top})}else s({id:c,x:o.scrollLeft,y:o.scrollTop})}),n.scroll||100));return J("scroll",a,e)}function Nf({viewportResizeCb:s},{win:e}){let t=-1,r=-1;const i=M(gt(M(()=>{const n=Uo(),a=Wo();(t!==n||r!==a)&&(s({width:Number(a),height:Number(n)}),t=n,r=a)}),200));return J("resize",i,e)}const kf=["INPUT","TEXTAREA","SELECT"],Ki=new WeakMap;function Tf({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:n,ignoreSelector:a,maskInputOptions:l,maskInputFn:o,sampling:c,userTriggeredOnInput:u}){function h(S){let y=Ct(S);const C=S.isTrusted,A=y&&y.tagName;if(y&&A==="OPTION"&&(y=x.parentElement(y)),!y||!A||kf.indexOf(A)<0||X(y,r,i,!0)||y.classList.contains(n)||a&&y.matches(a))return;let $=y.value,G=!1;const k=or(y)||"";k==="radio"||k==="checkbox"?G=y.checked:(l[A.toLowerCase()]||l[k])&&($=nr({element:y,maskInputOptions:l,tagName:A,type:k,value:$,maskInputFn:o})),p(y,u?{text:$,isChecked:G,userTriggered:C}:{text:$,isChecked:G});const F=y.name;k==="radio"&&F&&G&&e.querySelectorAll(`input[type="radio"][name="${F}"]`).forEach(V=>{if(V!==y){const q=V.value;p(V,u?{text:q,isChecked:!G,userTriggered:!1}:{text:q,isChecked:!G})}})}function p(S,y){const C=Ki.get(S);if(!C||C.text!==y.text||C.isChecked!==y.isChecked){Ki.set(S,y);const A=t.getId(S);M(s)(ee(O({},y),{id:A}))}}const g=(c.input==="last"?["change"]:["input","change"]).map(S=>J(S,M(h),e)),m=e.defaultView;if(!m)return()=>{g.forEach(S=>S())};const f=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),b=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];return f&&f.set&&g.push(...b.map(S=>Er(S[0],S[1],{set(){M(h)({target:this,isTrusted:!1})}},!1,m))),M(()=>{g.forEach(S=>S())})}function wr(s){const e=[];function t(r,i){if(Ht("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Ht("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Ht("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Ht("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const a=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(a)}else if(r.parentStyleSheet){const a=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(a)}return i}return t(s,e)}function ye(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function _f({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:M((u,h,p)=>{const[d,g]=p,{id:m,styleId:f}=ye(h,e,t.styleMirror);return(m&&m!==-1||f&&f!==-1)&&s({id:m,styleId:f,adds:[{rule:d,index:g}]}),u.apply(h,p)})}),r.CSSStyleSheet.prototype.addRule=function(u,h,p=this.cssRules.length){const d=`${u} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[d,p])};const n=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:M((u,h,p)=>{const[d]=p,{id:g,styleId:m}=ye(h,e,t.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,removes:[{index:d}]}),u.apply(h,p)})}),r.CSSStyleSheet.prototype.removeRule=function(u){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[u])};let a;r.CSSStyleSheet.prototype.replace&&(a=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:M((u,h,p)=>{const[d]=p,{id:g,styleId:m}=ye(h,e,t.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,replace:d}),u.apply(h,p)})}));let l;r.CSSStyleSheet.prototype.replaceSync&&(l=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:M((u,h,p)=>{const[d]=p,{id:g,styleId:m}=ye(h,e,t.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,replaceSync:d}),u.apply(h,p)})}));const o={};Yt("CSSGroupingRule")?o.CSSGroupingRule=r.CSSGroupingRule:(Yt("CSSMediaRule")&&(o.CSSMediaRule=r.CSSMediaRule),Yt("CSSConditionRule")&&(o.CSSConditionRule=r.CSSConditionRule),Yt("CSSSupportsRule")&&(o.CSSSupportsRule=r.CSSSupportsRule));const c={};return Object.entries(o).forEach(([u,h])=>{c[u]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(c[u].insertRule,{apply:M((p,d,g)=>{const[m,f]=g,{id:b,styleId:S}=ye(d.parentStyleSheet,e,t.styleMirror);return(b&&b!==-1||S&&S!==-1)&&s({id:b,styleId:S,adds:[{rule:m,index:[...wr(d),f||0]}]}),p.apply(d,g)})}),h.prototype.deleteRule=new Proxy(c[u].deleteRule,{apply:M((p,d,g)=>{const[m]=g,{id:f,styleId:b}=ye(d.parentStyleSheet,e,t.styleMirror);return(f&&f!==-1||b&&b!==-1)&&s({id:f,styleId:b,removes:[{index:[...wr(d),m]}]}),p.apply(d,g)})})}),M(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=n,a&&(r.CSSStyleSheet.prototype.replace=a),l&&(r.CSSStyleSheet.prototype.replaceSync=l),Object.entries(o).forEach(([u,h])=>{h.prototype.insertRule=c[u].insertRule,h.prototype.deleteRule=c[u].deleteRule})})}function qo({mirror:s,stylesheetManager:e},t){var r,i,n;let a=null;t.nodeName==="#document"?a=s.getId(t):a=s.getId(x.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,o=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return a===null||a===-1||!l||!o?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){var c;return(c=o.get)==null?void 0:c.call(this)},set(c){var u;const h=(u=o.set)==null?void 0:u.call(this,c);if(a!==null&&a!==-1)try{e.adoptStyleSheets(c,a)}catch(p){}return h}}),M(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})}))}function Pf({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){const n=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:M((l,o,c)=>{var u;const[h,p,d]=c;if(t.has(h))return n.apply(o,[h,p,d]);const{id:g,styleId:m}=ye((u=o.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,set:{property:h,value:p,priority:d},index:wr(o.parentRule)}),l.apply(o,c)})});const a=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:M((l,o,c)=>{var u;const[h]=c;if(t.has(h))return a.apply(o,[h]);const{id:p,styleId:d}=ye((u=o.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return(p&&p!==-1||d&&d!==-1)&&s({id:p,styleId:d,remove:{property:h},index:wr(o.parentRule)}),l.apply(o,c)})}),M(()=>{i.CSSStyleDeclaration.prototype.setProperty=n,i.CSSStyleDeclaration.prototype.removeProperty=a})}function Lf({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:n}){const a=M(o=>gt(M(c=>{const u=Ct(c);if(!u||X(u,e,t,!0))return;const{currentTime:h,volume:p,muted:d,playbackRate:g,loop:m}=u;s({type:o,id:r.getId(u),currentTime:h,volume:p,muted:d,playbackRate:g,loop:m})}),i.media||500)),l=[J("play",a(_e.Play),n),J("pause",a(_e.Pause),n),J("seeked",a(_e.Seeked),n),J("volumechange",a(_e.VolumeChange),n),J("ratechange",a(_e.RateChange),n)];return M(()=>{l.forEach(o=>o())})}function Df({fontCb:s,doc:e}){const t=e.defaultView;if(!t)return()=>{};const r=[],i=new WeakMap,n=t.FontFace;t.FontFace=function(o,c,u){const h=new n(o,c,u);return i.set(h,{family:o,buffer:typeof c!="string",descriptors:u,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),h};const a=Oe(e.fonts,"add",function(l){return function(o){return setTimeout(M(()=>{const c=i.get(o);c&&(s(c),i.delete(o))}),0),l.apply(this,[o])}});return r.push(()=>{t.FontFace=n}),r.push(a),M(()=>{r.forEach(l=>l())})}function Ff(s){const{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:n}=s;let a=!0;const l=M(()=>{const o=e.getSelection();if(!o||a&&(o!=null&&o.isCollapsed))return;a=o.isCollapsed||!1;const c=[],u=o.rangeCount||0;for(let h=0;h<u;h++){const p=o.getRangeAt(h),{startContainer:d,startOffset:g,endContainer:m,endOffset:f}=p;X(d,r,i,!0)||X(m,r,i,!0)||c.push({start:t.getId(d),startOffset:g,end:t.getId(m),endOffset:f})}n({ranges:c})});return l(),J("selectionchange",l)}function Bf({doc:s,customElementCb:e}){const t=s.defaultView;return!t||!t.customElements?()=>{}:Oe(t.customElements,"define",function(i){return function(n,a,l){try{e({define:{name:n}})}catch(o){console.warn(`Custom element callback failed for ${n}`)}return i.apply(this,[n,a,l])}})}function Uf(s,e){const{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:n,viewportResizeCb:a,inputCb:l,mediaInteractionCb:o,styleSheetRuleCb:c,styleDeclarationCb:u,canvasMutationCb:h,fontCb:p,selectionCb:d,customElementCb:g}=s;s.mutationCb=(...m)=>{e.mutation&&e.mutation(...m),t(...m)},s.mousemoveCb=(...m)=>{e.mousemove&&e.mousemove(...m),r(...m)},s.mouseInteractionCb=(...m)=>{e.mouseInteraction&&e.mouseInteraction(...m),i(...m)},s.scrollCb=(...m)=>{e.scroll&&e.scroll(...m),n(...m)},s.viewportResizeCb=(...m)=>{e.viewportResize&&e.viewportResize(...m),a(...m)},s.inputCb=(...m)=>{e.input&&e.input(...m),l(...m)},s.mediaInteractionCb=(...m)=>{e.mediaInteaction&&e.mediaInteaction(...m),o(...m)},s.styleSheetRuleCb=(...m)=>{e.styleSheetRule&&e.styleSheetRule(...m),c(...m)},s.styleDeclarationCb=(...m)=>{e.styleDeclaration&&e.styleDeclaration(...m),u(...m)},s.canvasMutationCb=(...m)=>{e.canvasMutation&&e.canvasMutation(...m),h(...m)},s.fontCb=(...m)=>{e.font&&e.font(...m),p(...m)},s.selectionCb=(...m)=>{e.selection&&e.selection(...m),d(...m)},s.customElementCb=(...m)=>{e.customElement&&e.customElement(...m),g(...m)}}function Wf(s,e={}){const t=s.doc.defaultView;if(!t)return()=>{};Uf(s,e);let r;s.recordDOM&&(r=Xo(s,s.doc));const i=Ef(s),n=$f(s),a=Ko(s),l=Nf(s,{win:t}),o=Tf(s),c=Lf(s);let u=()=>{},h=()=>{},p=()=>{},d=()=>{};s.recordDOM&&(u=_f(s,{win:t}),h=qo(s,s.doc),p=Pf(s,{win:t}),s.collectFonts&&(d=Df(s)));const g=Ff(s),m=Bf(s),f=[];for(const b of s.plugins)f.push(b.observer(b.callback,t,b.options));return M(()=>{Ae.forEach(b=>b.reset()),r==null||r.disconnect(),i(),n(),a(),l(),o(),c(),u(),h(),p(),d(),g(),m(),f.forEach(b=>b())})}function Ht(s){return typeof window[s]!="undefined"}function Yt(s){return!!(typeof window[s]!="undefined"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}var Fe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",zf=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var Zt=0;Zt<Fe.length;Zt++)zf[Fe.charCodeAt(Zt)]=Zt;var jf=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=Fe[e[t]>>2],i+=Fe[(e[t]&3)<<4|e[t+1]>>4],i+=Fe[(e[t+1]&15)<<2|e[t+2]>>6],i+=Fe[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};const qi=new Map;function Gf(s,e){let t=qi.get(s);return t||(t=new Map,qi.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}const Qo=(s,e,t)=>{if(!s||!(ta(s,e)||typeof s=="object"))return;const r=s.constructor.name,i=Gf(t,r);let n=i.indexOf(s);return n===-1&&(n=i.length,i.push(s)),n};function sr(s,e,t){if(s instanceof Array)return s.map(r=>sr(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=jf(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[sr(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:[sr(s.data,e,t),s.width,s.height]};if(ta(s,e)||typeof s=="object"){const r=s.constructor.name,i=Qo(s,e,t);return{rr_type:r,index:i}}}}return s}const ea=(s,e,t)=>s.map(r=>sr(r,e,t)),ta=(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 Vf(s,e,t,r){const i=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const a of n)try{if(typeof e.CanvasRenderingContext2D.prototype[a]!="function")continue;const l=Oe(e.CanvasRenderingContext2D.prototype,a,function(o){return function(...c){return X(this.canvas,t,r,!0)||setTimeout(()=>{const u=ea(c,e,this);s(this.canvas,{type:Ue["2D"],property:a,args:u})},0),o.apply(this,c)}});i.push(l)}catch(l){const o=Er(e.CanvasRenderingContext2D.prototype,a,{set(c){s(this.canvas,{type:Ue["2D"],property:a,args:[c],setter:!0})}});i.push(o)}return()=>{i.forEach(a=>a())}}function Hf(s){return s==="experimental-webgl"?"webgl":s}function Qi(s,e,t,r){const i=[];try{const n=Oe(s.HTMLCanvasElement.prototype,"getContext",function(a){return function(l,...o){if(!X(this,e,t,!0)){const c=Hf(l);if("__context"in this||(this.__context=c),r&&["webgl","webgl2"].includes(c))if(o[0]&&typeof o[0]=="object"){const u=o[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else o.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[l,...o])}});i.push(n)}catch(n){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(n=>n())}}function en(s,e,t,r,i,n){const a=[],l=Object.getOwnPropertyNames(s);for(const o of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(o))try{if(typeof s[o]!="function")continue;const c=Oe(s,o,function(u){return function(...h){const p=u.apply(this,h);if(Qo(p,n,this),"tagName"in this.canvas&&!X(this.canvas,r,i,!0)){const d=ea(h,n,this),g={type:e,property:o,args:d};t(this.canvas,g)}return p}});a.push(c)}catch(c){const u=Er(s,o,{set(h){t(this.canvas,{type:e,property:o,args:[h],setter:!0})}});a.push(u)}return a}function Yf(s,e,t,r){const i=[];return i.push(...en(e.WebGLRenderingContext.prototype,Ue.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext!="undefined"&&i.push(...en(e.WebGL2RenderingContext.prototype,Ue.WebGL2,s,t,r,e)),()=>{i.forEach(n=>n())}}const ra="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Zf=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),tn=typeof self!="undefined"&&self.Blob&&new Blob([Zf(ra)],{type:"text/javascript;charset=utf-8"});function Jf(s){let e;try{if(e=tn&&(self.URL||self.webkitURL).createObjectURL(tn),!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,"+ra,{name:s==null?void 0:s.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}class Xf{constructor(e){w(this,"pendingCanvasMutations",new Map),w(this,"rafStamps",{latestId:0,invokeId:null}),w(this,"mirror"),w(this,"mutationCb"),w(this,"resetObservers"),w(this,"frozen",!1),w(this,"locked",!1),w(this,"processMutation",(o,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(o)||this.pendingCanvasMutations.set(o,[]),this.pendingCanvasMutations.get(o).push(c)});const{sampling:t="all",win:r,blockClass:i,blockSelector:n,recordCanvas:a,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,a&&t==="all"&&this.initCanvasMutationObserver(r,i,n),a&&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 a=Qi(t,r,i,!0),l=new Map,o=new Jf;o.onmessage=g=>{const{id:m}=g.data;if(l.set(m,!1),!("base64"in g.data))return;const{base64:f,type:b,width:S,height:y}=g.data;this.mutationCb({id:m,type:Ue["2D"],commands:[{property:"clearRect",args:[0,0,S,y]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:f}],type:b}]},0,0]}]})};const c=1e3/e;let u=0,h;const p=()=>{const g=[];return t.document.querySelectorAll("canvas").forEach(m=>{X(m,r,i,!0)||g.push(m)}),g},d=g=>{if(u&&g-u<c){h=requestAnimationFrame(d);return}u=g,p().forEach(async m=>{var f;const b=this.mirror.getId(m);if(l.get(b)||m.width===0||m.height===0)return;if(l.set(b,!0),["webgl","webgl2"].includes(m.__context)){const y=m.getContext(m.__context);((f=y==null?void 0:y.getContextAttributes())==null?void 0:f.preserveDrawingBuffer)===!1&&y.clear(y.COLOR_BUFFER_BIT)}const S=await createImageBitmap(m);o.postMessage({id:b,bitmap:S,width:m.width,height:m.height,dataURLOptions:n.dataURLOptions},[S])}),h=requestAnimationFrame(d)};h=requestAnimationFrame(d),this.resetObservers=()=>{a(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=Qi(e,t,r,!1),n=Vf(this.processMutation.bind(this),e,t,r),a=Yf(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),n(),a()}}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(a=>{const c=a,{type:l}=c;return $e(c,["type"])}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:i}),this.pendingCanvasMutations.delete(e)}}class Kf{constructor(){w(this,"nodeMap",new WeakMap),w(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(){}}class qf{constructor(e){w(this,"shadowDoms",new WeakSet),w(this,"mutationCb"),w(this,"scrollCb"),w(this,"bypassOptions"),w(this,"mirror"),w(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(!st(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Xo(ee(O({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Ko(ee(O({},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(x.host(e))),this.restoreHandlers.push(qo({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(Oe(e.prototype,"attachShadow",function(i){return function(n){const a=i.call(this,n),l=x.shadowRoot(this);return l&&Yo(this)&&r.addShadowRoot(l,t),a}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}class Qf{constructor(e){w(this,"trackedLinkElements",new WeakSet),w(this,"mutationCb"),w(this,"adoptedStyleSheetCb"),w(this,"styleMirror",new yf),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 a;this.styleMirror.has(n)?a=this.styleMirror.getId(n):(a=this.styleMirror.add(n),i.push({styleId:a,rules:Array.from(n.rules||CSSRule,(l,o)=>({rule:cn(l,n.href),index:o}))})),r.styleIds.push(a)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}let z,tt,Hr,ot=!1;try{if(Array.from([1],s=>s*2)[0]!==2){const s=document.createElement("iframe");document.body.appendChild(s),Array.from=((ri=s.contentWindow)==null?void 0:ri.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}const se=za();function Se(s={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:n=null,ignoreClass:a="rr-ignore",ignoreSelector:l=null,maskTextClass:o="rr-mask",maskTextSelector:c=null,inlineStylesheet:u=!0,maskAllInputs:h,maskInputOptions:p,slimDOMOptions:d,maskInputFn:g,maskTextFn:m,hooks:f,packFn:b,sampling:S={},dataURLOptions:y={},mousemoveWait:C,recordDOM:A=!0,recordCanvas:$=!1,recordCrossOriginIframes:G=!1,recordAfter:k=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",userTriggeredOnInput:F=!1,collectFonts:V=!1,inlineImages:q=!1,plugins:oe,keepIframeSrcFn:N=()=>!1,ignoreCSSAttributes:Ye=new Set([]),errorHandler:Ze}=s;Sf(Ze);const H=G?window.parent===window:!0;let Q=!1;if(!H)try{window.parent.document&&(Q=!1)}catch(T){Q=!0}if(H&&!e)throw new Error("emit function is required");if(!H&&!Q)return()=>{};C!==void 0&&S.mousemove===void 0&&(S.mousemove=C),se.reset();const ge=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}:p!==void 0?p:{password:!0},ae=d===!0||d==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:d==="all",headMetaDescKeywords:d==="all",headTitleMutations:d==="all"}:d||{};gf();let vt,Ce=0;const Xs=T=>{for(const re of oe||[])re.eventProcessor&&(T=re.eventProcessor(T));return b&&!Q&&(T=b(T)),T};z=(T,re)=>{var W;const j=T;if(j.timestamp=yr(),(W=Ae[0])!=null&&W.isFrozen()&&j.type!==E.FullSnapshot&&!(j.type===E.IncrementalSnapshot&&j.data.source===R.Mutation)&&Ae.forEach(ce=>ce.unfreeze()),H)e==null||e(Xs(j),re);else if(Q){const ce={type:"rrweb",event:Xs(j),origin:window.location.origin,isCheckout:re};window.parent.postMessage(ce,"*")}if(j.type===E.FullSnapshot)vt=j,Ce=0;else if(j.type===E.IncrementalSnapshot){if(j.data.source===R.Mutation&&j.data.isAttachIframe)return;Ce++;const ce=r&&Ce>=r,xe=t&&j.timestamp-vt.timestamp>t;(ce||xe)&&tt(!0)}};const It=T=>{z({type:E.IncrementalSnapshot,data:O({source:R.Mutation},T)})},Ks=T=>z({type:E.IncrementalSnapshot,data:O({source:R.Scroll},T)}),qs=T=>z({type:E.IncrementalSnapshot,data:O({source:R.CanvasMutation},T)}),sa=T=>z({type:E.IncrementalSnapshot,data:O({source:R.AdoptedStyleSheet},T)}),ve=new Qf({mutationCb:It,adoptedStyleSheetCb:sa}),Ie=new vf({mirror:se,mutationCb:It,stylesheetManager:ve,recordCrossOriginIframes:G,wrappedEmit:z});for(const T of oe||[])T.getMirror&&T.getMirror({nodeMirror:se,crossOriginIframeMirror:Ie.crossOriginIframeMirror,crossOriginIframeStyleMirror:Ie.crossOriginIframeStyleMirror});const $r=new Kf;Hr=new Xf({recordCanvas:$,mutationCb:qs,win:window,blockClass:i,blockSelector:n,mirror:se,sampling:S.canvas,dataURLOptions:y});const xt=new qf({mutationCb:It,scrollCb:Ks,bypassOptions:{blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:c,inlineStylesheet:u,maskInputOptions:ge,dataURLOptions:y,maskTextFn:m,maskInputFn:g,recordCanvas:$,inlineImages:q,sampling:S,slimDOMOptions:ae,iframeManager:Ie,stylesheetManager:ve,canvasManager:Hr,keepIframeSrcFn:N,processedNodeManager:$r},mirror:se});tt=(T=!1)=>{if(!A)return;z({type:E.Meta,data:{href:window.location.href,width:Wo(),height:Uo()}},T),ve.reset(),xt.init(),Ae.forEach(W=>W.lock());const re=wl(document,{mirror:se,blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:c,inlineStylesheet:u,maskAllInputs:ge,maskTextFn:m,maskInputFn:g,slimDOM:ae,dataURLOptions:y,recordCanvas:$,inlineImages:q,onSerialize:W=>{Go(W,se)&&Ie.addIframe(W),Vo(W,se)&&ve.trackLinkElement(W),xs(W)&&xt.addShadowRoot(x.shadowRoot(W),document)},onIframeLoad:(W,j)=>{Ie.attachIframe(W,j),xt.observeAttachShadow(W)},onStylesheetLoad:(W,j)=>{ve.attachLinkElement(W,j)},keepIframeSrcFn:N});if(!re)return console.warn("Failed to snapshot the document");z({type:E.FullSnapshot,data:{node:re,initialOffset:Bo(window)}},T),Ae.forEach(W=>W.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ve.adoptStyleSheets(document.adoptedStyleSheets,se.getId(document))};try{const T=[],re=xe=>{var At;return M(Wf)({mutationCb:It,mousemoveCb:(D,Nr)=>z({type:E.IncrementalSnapshot,data:{source:Nr,positions:D}}),mouseInteractionCb:D=>z({type:E.IncrementalSnapshot,data:O({source:R.MouseInteraction},D)}),scrollCb:Ks,viewportResizeCb:D=>z({type:E.IncrementalSnapshot,data:O({source:R.ViewportResize},D)}),inputCb:D=>z({type:E.IncrementalSnapshot,data:O({source:R.Input},D)}),mediaInteractionCb:D=>z({type:E.IncrementalSnapshot,data:O({source:R.MediaInteraction},D)}),styleSheetRuleCb:D=>z({type:E.IncrementalSnapshot,data:O({source:R.StyleSheetRule},D)}),styleDeclarationCb:D=>z({type:E.IncrementalSnapshot,data:O({source:R.StyleDeclaration},D)}),canvasMutationCb:qs,fontCb:D=>z({type:E.IncrementalSnapshot,data:O({source:R.Font},D)}),selectionCb:D=>{z({type:E.IncrementalSnapshot,data:O({source:R.Selection},D)})},customElementCb:D=>{z({type:E.IncrementalSnapshot,data:O({source:R.CustomElement},D)})},blockClass:i,ignoreClass:a,ignoreSelector:l,maskTextClass:o,maskTextSelector:c,maskInputOptions:ge,inlineStylesheet:u,sampling:S,recordDOM:A,recordCanvas:$,inlineImages:q,userTriggeredOnInput:F,collectFonts:V,doc:xe,maskInputFn:g,maskTextFn:m,keepIframeSrcFn:N,blockSelector:n,slimDOMOptions:ae,dataURLOptions:y,mirror:se,iframeManager:Ie,stylesheetManager:ve,shadowDomManager:xt,processedNodeManager:$r,canvasManager:Hr,ignoreCSSAttributes:Ye,plugins:((At=oe==null?void 0:oe.filter(D=>D.observer))==null?void 0:At.map(D=>({observer:D.observer,options:D.options,callback:Nr=>z({type:E.Plugin,data:{plugin:D.name,payload:Nr}})})))||[]},f)};Ie.addLoadListener(xe=>{try{T.push(re(xe.contentDocument))}catch(At){console.warn(At)}});let W=null;const j=()=>{W=Date.now(),tt(),T.push(re(document)),ot=!0},ce=()=>{window.removeEventListener("load",ce),!(!ot||W==null)&&(Date.now()-W<=10||tt())};return window.addEventListener("load",ce),document.readyState==="interactive"||document.readyState==="complete"?(document.readyState==="complete"&&window.removeEventListener("load",ce),j()):(T.push(J("DOMContentLoaded",()=>{z({type:E.DomContentLoaded,data:{}}),k==="DOMContentLoaded"&&j()})),T.push(J("load",()=>{z({type:E.Load,data:{}}),k==="load"&&j()},window))),()=>{T.forEach(xe=>xe()),$r.destroy(),ot=!1,Cf()}}catch(T){console.warn(T)}}Se.addCustomEvent=(s,e)=>{if(!ot)throw new Error("please add custom event after start recording");z({type:E.Custom,data:{tag:s,payload:e}})};Se.freezePage=()=>{Ae.forEach(s=>s.freeze())};Se.takeFullSnapshot=s=>{if(!ot)throw new Error("please take full snapshot after start recording");tt(s)};Se.mirror=se;var rn;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(rn||(rn={}));const{addCustomEvent:_p}=Se,{freezePage:Pp}=Se,{takeFullSnapshot:ep}=Se;exports.record=Se;
58
+ or you can use record.mirror to access the mirror instance during recording.`;let Vi={map:{},getId(){return console.error(Pe),-1},getNode(){return console.error(Pe),null},removeNodeFromMap(){console.error(Pe)},has(){return console.error(Pe),!1},reset(){console.error(Pe)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(Vi=new Proxy(Vi,{get(s,e,t){return e==="map"&&console.error(Pe),Reflect.get(s,e,t)}}));function gt(s,e,t={}){let r=null,i=0;return function(...n){const a=Date.now();!i&&t.leading===!1&&(i=a);const l=e-(a-i),o=this;l<=0||l>e?(r&&(clearTimeout(r),r=null),i=a,s.apply(o,n)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{i=t.leading===!1?0:Date.now(),r=null,s.apply(o,n)},l))}}function Er(s,e,t,r,i=window){const n=i.Object.getOwnPropertyDescriptor(s,e);return i.Object.defineProperty(s,e,r?t:{set(a){setTimeout(()=>{t.set.call(this,a)},0),n&&n.set&&n.set.call(this,a)}}),()=>Er(s,e,n||{},!0)}let yr=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(yr=()=>new Date().getTime());function Bo(s){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=x.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=x.parentElement(n.body))==null?void 0:r.scrollTop)||((i=n==null?void 0:n.body)==null?void 0:i.scrollTop)||0}}function Uo(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Wo(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function zo(s){return s?s.nodeType===s.ELEMENT_NODE?s:x.parentElement(s):null}function X(s,e,t,r){if(!s)return!1;const i=zo(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(lr(i,e,r))return!0}catch(n){}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function mf(s,e){return e.getId(s)!==-1}function Vr(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===at}function jo(s,e){if(rt(s))return!1;const t=e.getId(s);if(!e.has(t))return!0;const r=x.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?jo(r,e):!0}function Is(s){return!!s.changedTouches}function gf(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 Go(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function Vo(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function xs(s){return s?s instanceof Js&&"shadowRoot"in s?!!s.shadowRoot:!!x.shadowRoot(s):!1}class yf{constructor(){w(this,"id",1),w(this,"styleIDMap",new WeakMap),w(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 Ho(s){var e;let t=null;return"getRootNode"in s&&((e=x.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&x.host(x.getRootNode(s))&&(t=x.host(x.getRootNode(s))),t}function wf(s){let e=s,t;for(;t=Ho(e);)e=t;return e}function bf(s){const e=s.ownerDocument;if(!e)return!1;const t=wf(s);return x.contains(e,t)}function Yo(s){const e=s.ownerDocument;return e?x.contains(e,s)||bf(s):!1}let nt;function Sf(s){nt=s}function Cf(){nt=void 0}const M=s=>nt?(...t)=>{try{return s(...t)}catch(r){if(nt&&nt(r)===!0)return;throw r}}:s;class Hi{constructor(e){w(this,"iframeIdToRemoteIdMap",new WeakMap),w(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){const n=r||this.getIdToRemoteIdMap(e),a=i||this.getRemoteIdToIdMap(e);let l=n.get(t);return l||(l=this.generateIdFn(),n.set(t,l),a.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 vf{constructor(e){w(this,"iframes",new WeakMap),w(this,"crossOriginIframeMap",new WeakMap),w(this,"crossOriginIframeMirror",new Hi(dn)),w(this,"crossOriginIframeStyleMirror"),w(this,"crossOriginIframeRootIdMap",new WeakMap),w(this,"mirror"),w(this,"mutationCb"),w(this,"wrappedEmit"),w(this,"loadListener"),w(this,"stylesheetManager"),w(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Hi(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"||t.origin!==t.data.origin||!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 E.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:E.IncrementalSnapshot,data:{source:R.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case E.Meta:case E.Load:case E.DomContentLoaded:return!1;case E.Plugin:return t;case E.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case E.IncrementalSnapshot:switch(t.data.source){case R.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 R.Drag:case R.TouchMove:case R.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case R.ViewportResize:return!1;case R.MediaInteraction:case R.MouseInteraction:case R.Scroll:case R.CanvasMutation:case R.Input:return this.replaceIds(t.data,e,["id"]),t;case R.StyleSheetRule:case R.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case R.Font:return t;case R.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case R.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!==sn.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}const Zo=class rr{constructor(){if(w(this,"lastFullSnapshot",-1),w(this,"intervalBetweenSnapshots",150),w(this,"debounceTimeout",null),w(this,"debounceTime",10),rr.instance)return rr.instance;rr.instance=this}requestFullSnapshot(){this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=setTimeout(()=>{this.debounceTimeout=null,this.takeSnapshot()},this.debounceTime)}takeSnapshot(){if(Date.now()-this.lastFullSnapshot<this.intervalBetweenSnapshots){console.log("StormSnapshotManager, takeSnapshot: too soon");return}console.log("StormSnapshotManager, takeSnapshot: taking full snapshot"),ep(),this.lastFullSnapshot=Date.now()}};w(Zo,"instance");let If=Zo;const xf=new If;function Yi(s){return"__ln"in s}class Af{constructor(){w(this,"length",0),w(this,"head",null),w(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&&Yi(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&&Yi(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 Zi=(s,e)=>`${s}@${e}`;class Rf{constructor(){w(this,"frozen",!1),w(this,"locked",!1),w(this,"texts",[]),w(this,"attributes",[]),w(this,"attributeMap",new WeakMap),w(this,"removes",[]),w(this,"mapRemoves",[]),w(this,"movedMap",{}),w(this,"addedSet",new Set),w(this,"movedSet",new Set),w(this,"droppedSet",new Set),w(this,"removesSubTreeCache",new Set),w(this,"mutationCb"),w(this,"blockClass"),w(this,"blockSelector"),w(this,"maskTextClass"),w(this,"maskTextSelector"),w(this,"inlineStylesheet"),w(this,"maskInputOptions"),w(this,"maskTextFn"),w(this,"maskInputFn"),w(this,"keepIframeSrcFn"),w(this,"recordCanvas"),w(this,"inlineImages"),w(this,"slimDOMOptions"),w(this,"dataURLOptions"),w(this,"doc"),w(this,"mirror"),w(this,"iframeManager"),w(this,"stylesheetManager"),w(this,"shadowDomManager"),w(this,"canvasManager"),w(this,"processedNodeManager"),w(this,"unattachedDoc"),w(this,"stormBatches",[]),w(this,"stormInfo",null),w(this,"stormSettings",{batchSize:150,timeout:30,mutationLimit:800}),w(this,"handleStormMutations",e=>{const t=Date.now();this.stormInfo==null&&(this.stormInfo={startedAt:t,totalMutations:0,timeout:setTimeout(this.handleStormFinish,this.stormSettings.timeout),stormExceededLimit:!1}),this.stormInfo.totalMutations+=e.length,this.stormInfo.totalMutations>=this.stormSettings.mutationLimit?(this.stormInfo.stormExceededLimit=!0,this.stormBatches=[]):this.stormBatches.push({ts:t,mutations:e}),clearTimeout(this.stormInfo.timeout),e.length<this.stormSettings.batchSize?this.handleStormFinish():this.stormInfo.timeout=setTimeout(this.handleStormFinish,this.stormSettings.timeout)}),w(this,"handleStormFinish",()=>{if(!this.stormInfo)return;const{stormExceededLimit:e}=this.stormInfo;if(clearTimeout(this.stormInfo.timeout),this.stormInfo=null,e)this.stormBatches=[],xf.requestFullSnapshot();else{let t=[];for(const r of this.stormBatches)t.push(...r.mutations);this.stormBatches=[],this.processInternalMutations(t,!0)}}),w(this,"processInternalMutations",(e,t=!1)=>{if(!t&&(this.stormInfo!=null||e.length>=this.stormSettings.batchSize)){this.handleStormMutations(e);return}for(const r of e)this.processMutation(r);this.emit()}),w(this,"processMutations",e=>{this.processInternalMutations(e)}),w(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new Af,i=u=>{let h=u,p=at;for(;p===at;)h=h&&h.nextSibling,p=h&&this.mirror.getId(h);return p},n=u=>{const h=x.parentNode(u);if(!h||!Yo(u))return;let p=!1;if(u.nodeType===Node.TEXT_NODE){const f=h.tagName;if(f==="TEXTAREA")return;f==="STYLE"&&this.addedSet.has(h)&&(p=!0)}const d=rt(h)?this.mirror.getId(Ho(u)):this.mirror.getId(h),g=i(u);if(d===-1||g===-1)return r.addNode(u);const m=De(u,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:f=>{Go(f,this.mirror)&&this.iframeManager.addIframe(f),Vo(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),xs(u)&&this.shadowDomManager.addShadowRoot(x.shadowRoot(u),this.doc)},onIframeLoad:(f,b)=>{this.iframeManager.attachIframe(f,b),this.shadowDomManager.observeAttachShadow(f)},onStylesheetLoad:(f,b)=>{this.stylesheetManager.attachLinkElement(f,b)},cssCaptured:p});m&&(e.push({parentId:d,nextId:g,node:m}),t.add(m.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const u of this.movedSet)Ji(this.removesSubTreeCache,u,this.mirror)&&!this.movedSet.has(x.parentNode(u))||n(u);for(const u of this.addedSet)!Xi(this.droppedSet,u)&&!Ji(this.removesSubTreeCache,u,this.mirror)||Xi(this.movedSet,u)?n(u):this.droppedSet.add(u);let a=null;for(;r.length;){let u=null;if(a){const h=this.mirror.getId(x.parentNode(a.value)),p=i(a.value);h!==-1&&p!==-1&&(u=a)}if(!u){let h=r.tail;for(;h;){const p=h;if(h=h.previous,p){const d=this.mirror.getId(x.parentNode(p.value));if(i(p.value)===-1)continue;if(d!==-1){u=p;break}else{const m=p.value,f=x.parentNode(m);if(f&&f.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const b=x.host(f);if(this.mirror.getId(b)!==-1){u=p;break}}}}}}if(!u){for(;r.head;)r.removeNode(r.head.value);break}a=u.previous,r.removeNode(u.value),n(u.value)}const l=[];for(const u of this.texts){const h=u.node,p=x.parentNode(h);p&&p.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(p);const d=this.mirror.getId(h);!t.has(d)&&this.mirror.has(d)&&l.push({id:d,value:u.value})}const o=[];for(const u of this.attributes){const{attributes:h}=u;if(typeof h.style=="string"){const d=JSON.stringify(u.styleDiff),g=JSON.stringify(u._unchangedStyles);d.length<h.style.length&&(d+g).split("var(").length===h.style.split("var(").length&&(h.style=u.styleDiff)}const p=this.mirror.getId(u.node);!t.has(p)&&this.mirror.has(p)&&o.push({id:p,attributes:h})}const c={texts:l,attributes:o,removes:this.removes,adds:e};!c.texts.length&&!c.attributes.length&&!c.removes.length&&!c.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(c))}),w(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(x.childNodes(e),i=>x.textContent(i)||"").join("");t.attributes.value=nr({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:or(e),value:r,maskInputFn:this.maskInputFn})}),w(this,"processMutation",e=>{if(!Vr(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=x.textContent(e.target);!X(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:yn(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,zo(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);if(r==="value"){const a=or(t);i=nr({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:a,value:i,maskInputFn:this.maskInputFn})}if(X(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let n=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(n||(n={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(e.target,n)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!gn(t.tagName,r))if(n.attributes[r]=mn(this.doc,Re(t.tagName),Re(r),i),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(l){this.unattachedDoc=this.doc}const a=this.unattachedDoc.createElement("span");e.oldValue&&a.setAttribute("style",e.oldValue);for(const l of Array.from(t.style)){const o=t.style.getPropertyValue(l),c=t.style.getPropertyPriority(l);o!==a.style.getPropertyValue(l)||c!==a.style.getPropertyPriority(l)?c===""?n.styleDiff[l]=o:n.styleDiff[l]=[o,c]:n._unchangedStyles[l]=[o,c]}for(const l of Array.from(a.style))t.style.getPropertyValue(l)===""&&(n.styleDiff[l]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?n.attributes.rr_open_mode="modal":n.attributes.rr_open_mode="non-modal");break}case"childList":{if(X(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}for(let a=0;a<e.addedNodes.length;a++)this.genAdds(e.addedNodes[a],e.target);const t=rt(e.target)?this.mirror.getId(x.host(e.target)):this.mirror.getId(e.target);if(X(e.target,this.blockClass,this.blockSelector,!1))return;const r=this.addedSet.has(e.target),i=jo(e.target,this.mirror),n=rt(e.target)&&st(e.target)?!0:void 0;for(let a=0;a<e.removedNodes.length;a++){const l=e.removedNodes[a],o=this.mirror.getId(l);if(Vr(l,this.mirror,this.slimDOMOptions)||!mf(l,this.mirror))return;this.addedSet.has(l)?(As(this.addedSet,l),this.droppedSet.add(l)):r&&o===-1||i||(this.movedSet.has(l)&&this.movedMap[Zi(o,t)]?As(this.movedSet,l):(this.removes.push({parentId:t,id:o,isShadow:n}),Of(l,this.removesSubTreeCache))),this.mapRemoves.push(l)}break}}}),w(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Vr(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[Zi(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);if(!X(e,this.blockClass,this.blockSelector,!1)){const r=x.childNodes(e);for(let i=0;i<r.length;i++)this.genAdds(r[i]);if(xs(e)){const i=x.childNodes(x.shadowRoot(e));for(let n=0;n<i.length;n++){const a=i[n];this.processedNodeManager.add(a,this),this.genAdds(a,e)}}}}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function As(s,e){s.delete(e);const t=x.childNodes(e);for(let r=0;r<t.length;r++)As(s,t[r])}function Of(s,e){const t=[s];for(;t.length;){const r=t.pop();if(e.has(r))continue;e.add(r);const i=x.childNodes(r);for(let n=0;n<i.length;n++)t.push(i[n])}}function Ji(s,e,t){return s.size===0?!1:Mf(s,e)}function Mf(s,e,t){const r=x.parentNode(e);return r?s.has(r):!1}function Xi(s,e){return s.size===0?!1:Jo(s,e)}function Jo(s,e){const t=x.parentNode(e);return t?s.has(t)?!0:Jo(s,t):!1}const Ae=[];function Ct(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 Xo(s,e){const t=new Rf;Ae.push(t),t.init(s);const r=new(on())(M(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function Ef({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 a=[],l;const o=gt(M(h=>{const p=Date.now()-l;s(a.map(d=>(d.timeOffset-=p,d)),h),a=[],l=null}),n),c=M(gt(M(h=>{const p=Ct(h),{clientX:d,clientY:g}=Is(h)?h.changedTouches[0]:h;l||(l=yr()),a.push({x:d,y:g,id:r.getId(p),timeOffset:yr()-l}),o(typeof DragEvent!="undefined"&&h instanceof DragEvent?R.Drag:h instanceof MouseEvent?R.MouseMove:R.TouchMove)}),i,{trailing:!1})),u=[J("mousemove",c,t),J("touchmove",c,t),J("drag",c,t)];return M(()=>{u.forEach(h=>h())})}function $f({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){if(n.mouseInteraction===!1)return()=>{};const a=n.mouseInteraction===!0||n.mouseInteraction===void 0?{}:n.mouseInteraction,l=[];let o=null;const c=u=>h=>{const p=Ct(h);if(X(p,r,i,!0))return;let d=null,g=u;if("pointerType"in h){switch(h.pointerType){case"mouse":d=pe.Mouse;break;case"touch":d=pe.Touch;break;case"pen":d=pe.Pen;break}d===pe.Touch?q[u]===q.MouseDown?g="TouchStart":q[u]===q.MouseUp&&(g="TouchEnd"):pe.Pen}else Is(h)&&(d=pe.Touch);d!==null?(o=d,(g.startsWith("Touch")&&d===pe.Touch||g.startsWith("Mouse")&&d===pe.Mouse)&&(d=null)):q[u]===q.Click&&(d=o,o=null);const m=Is(h)?h.changedTouches[0]:h;if(!m)return;const f=t.getId(p),{clientX:b,clientY:C}=m;M(s)(O({type:q[g],id:f,x:b,y:C},d!==null&&{pointerType:d}))};return Object.keys(q).filter(u=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&a[u]!==!1).forEach(u=>{let h=Re(u);const p=c(u);if(window.PointerEvent)switch(q[u]){case q.MouseDown:case q.MouseUp:h=h.replace("mouse","pointer");break;case q.TouchStart:case q.TouchEnd:return}l.push(J(h,p,e))}),M(()=>{l.forEach(u=>u())})}function Ko({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){const a=M(gt(M(l=>{const o=Ct(l);if(!o||X(o,r,i,!0))return;const c=t.getId(o);if(o===e&&e.defaultView){const u=Bo(e.defaultView);s({id:c,x:u.left,y:u.top})}else s({id:c,x:o.scrollLeft,y:o.scrollTop})}),n.scroll||100));return J("scroll",a,e)}function Nf({viewportResizeCb:s},{win:e}){let t=-1,r=-1;const i=M(gt(M(()=>{const n=Uo(),a=Wo();(t!==n||r!==a)&&(s({width:Number(a),height:Number(n)}),t=n,r=a)}),200));return J("resize",i,e)}const kf=["INPUT","TEXTAREA","SELECT"],Ki=new WeakMap;function Tf({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:n,ignoreSelector:a,maskInputOptions:l,maskInputFn:o,sampling:c,userTriggeredOnInput:u}){function h(C){let y=Ct(C);const S=C.isTrusted,A=y&&y.tagName;if(y&&A==="OPTION"&&(y=x.parentElement(y)),!y||!A||kf.indexOf(A)<0||X(y,r,i,!0)||y.classList.contains(n)||a&&y.matches(a))return;let $=y.value,V=!1;const P=or(y)||"";P==="radio"||P==="checkbox"?V=y.checked:(l[A.toLowerCase()]||l[P])&&($=nr({element:y,maskInputOptions:l,tagName:A,type:P,value:$,maskInputFn:o})),p(y,u?{text:$,isChecked:V,userTriggered:S}:{text:$,isChecked:V});const L=y.name;P==="radio"&&L&&V&&e.querySelectorAll(`input[type="radio"][name="${L}"]`).forEach(j=>{if(j!==y){const K=j.value;p(j,u?{text:K,isChecked:!V,userTriggered:!1}:{text:K,isChecked:!V})}})}function p(C,y){const S=Ki.get(C);if(!S||S.text!==y.text||S.isChecked!==y.isChecked){Ki.set(C,y);const A=t.getId(C);M(s)(ee(O({},y),{id:A}))}}const g=(c.input==="last"?["change"]:["input","change"]).map(C=>J(C,M(h),e)),m=e.defaultView;if(!m)return()=>{g.forEach(C=>C())};const f=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),b=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];return f&&f.set&&g.push(...b.map(C=>Er(C[0],C[1],{set(){M(h)({target:this,isTrusted:!1})}},!1,m))),M(()=>{g.forEach(C=>C())})}function wr(s){const e=[];function t(r,i){if(Ht("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Ht("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Ht("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Ht("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const a=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(a)}else if(r.parentStyleSheet){const a=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(a)}return i}return t(s,e)}function ye(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function _f({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:M((u,h,p)=>{const[d,g]=p,{id:m,styleId:f}=ye(h,e,t.styleMirror);return(m&&m!==-1||f&&f!==-1)&&s({id:m,styleId:f,adds:[{rule:d,index:g}]}),u.apply(h,p)})}),r.CSSStyleSheet.prototype.addRule=function(u,h,p=this.cssRules.length){const d=`${u} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[d,p])};const n=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:M((u,h,p)=>{const[d]=p,{id:g,styleId:m}=ye(h,e,t.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,removes:[{index:d}]}),u.apply(h,p)})}),r.CSSStyleSheet.prototype.removeRule=function(u){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[u])};let a;r.CSSStyleSheet.prototype.replace&&(a=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:M((u,h,p)=>{const[d]=p,{id:g,styleId:m}=ye(h,e,t.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,replace:d}),u.apply(h,p)})}));let l;r.CSSStyleSheet.prototype.replaceSync&&(l=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:M((u,h,p)=>{const[d]=p,{id:g,styleId:m}=ye(h,e,t.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,replaceSync:d}),u.apply(h,p)})}));const o={};Yt("CSSGroupingRule")?o.CSSGroupingRule=r.CSSGroupingRule:(Yt("CSSMediaRule")&&(o.CSSMediaRule=r.CSSMediaRule),Yt("CSSConditionRule")&&(o.CSSConditionRule=r.CSSConditionRule),Yt("CSSSupportsRule")&&(o.CSSSupportsRule=r.CSSSupportsRule));const c={};return Object.entries(o).forEach(([u,h])=>{c[u]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(c[u].insertRule,{apply:M((p,d,g)=>{const[m,f]=g,{id:b,styleId:C}=ye(d.parentStyleSheet,e,t.styleMirror);return(b&&b!==-1||C&&C!==-1)&&s({id:b,styleId:C,adds:[{rule:m,index:[...wr(d),f||0]}]}),p.apply(d,g)})}),h.prototype.deleteRule=new Proxy(c[u].deleteRule,{apply:M((p,d,g)=>{const[m]=g,{id:f,styleId:b}=ye(d.parentStyleSheet,e,t.styleMirror);return(f&&f!==-1||b&&b!==-1)&&s({id:f,styleId:b,removes:[{index:[...wr(d),m]}]}),p.apply(d,g)})})}),M(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=n,a&&(r.CSSStyleSheet.prototype.replace=a),l&&(r.CSSStyleSheet.prototype.replaceSync=l),Object.entries(o).forEach(([u,h])=>{h.prototype.insertRule=c[u].insertRule,h.prototype.deleteRule=c[u].deleteRule})})}function qo({mirror:s,stylesheetManager:e},t){var r,i,n;let a=null;t.nodeName==="#document"?a=s.getId(t):a=s.getId(x.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,o=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return a===null||a===-1||!l||!o?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){var c;return(c=o.get)==null?void 0:c.call(this)},set(c){var u;const h=(u=o.set)==null?void 0:u.call(this,c);if(a!==null&&a!==-1)try{e.adoptStyleSheets(c,a)}catch(p){}return h}}),M(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})}))}function Pf({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){const n=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:M((l,o,c)=>{var u;const[h,p,d]=c;if(t.has(h))return n.apply(o,[h,p,d]);const{id:g,styleId:m}=ye((u=o.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,set:{property:h,value:p,priority:d},index:wr(o.parentRule)}),l.apply(o,c)})});const a=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:M((l,o,c)=>{var u;const[h]=c;if(t.has(h))return a.apply(o,[h]);const{id:p,styleId:d}=ye((u=o.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return(p&&p!==-1||d&&d!==-1)&&s({id:p,styleId:d,remove:{property:h},index:wr(o.parentRule)}),l.apply(o,c)})}),M(()=>{i.CSSStyleDeclaration.prototype.setProperty=n,i.CSSStyleDeclaration.prototype.removeProperty=a})}function Lf({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:n}){const a=M(o=>gt(M(c=>{const u=Ct(c);if(!u||X(u,e,t,!0))return;const{currentTime:h,volume:p,muted:d,playbackRate:g,loop:m}=u;s({type:o,id:r.getId(u),currentTime:h,volume:p,muted:d,playbackRate:g,loop:m})}),i.media||500)),l=[J("play",a(_e.Play),n),J("pause",a(_e.Pause),n),J("seeked",a(_e.Seeked),n),J("volumechange",a(_e.VolumeChange),n),J("ratechange",a(_e.RateChange),n)];return M(()=>{l.forEach(o=>o())})}function Df({fontCb:s,doc:e}){const t=e.defaultView;if(!t)return()=>{};const r=[],i=new WeakMap,n=t.FontFace;t.FontFace=function(o,c,u){const h=new n(o,c,u);return i.set(h,{family:o,buffer:typeof c!="string",descriptors:u,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),h};const a=Oe(e.fonts,"add",function(l){return function(o){return setTimeout(M(()=>{const c=i.get(o);c&&(s(c),i.delete(o))}),0),l.apply(this,[o])}});return r.push(()=>{t.FontFace=n}),r.push(a),M(()=>{r.forEach(l=>l())})}function Ff(s){const{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:n}=s;let a=!0;const l=M(()=>{const o=e.getSelection();if(!o||a&&(o!=null&&o.isCollapsed))return;a=o.isCollapsed||!1;const c=[],u=o.rangeCount||0;for(let h=0;h<u;h++){const p=o.getRangeAt(h),{startContainer:d,startOffset:g,endContainer:m,endOffset:f}=p;X(d,r,i,!0)||X(m,r,i,!0)||c.push({start:t.getId(d),startOffset:g,end:t.getId(m),endOffset:f})}n({ranges:c})});return l(),J("selectionchange",l)}function Bf({doc:s,customElementCb:e}){const t=s.defaultView;return!t||!t.customElements?()=>{}:Oe(t.customElements,"define",function(i){return function(n,a,l){try{e({define:{name:n}})}catch(o){console.warn(`Custom element callback failed for ${n}`)}return i.apply(this,[n,a,l])}})}function Uf(s,e){const{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:n,viewportResizeCb:a,inputCb:l,mediaInteractionCb:o,styleSheetRuleCb:c,styleDeclarationCb:u,canvasMutationCb:h,fontCb:p,selectionCb:d,customElementCb:g}=s;s.mutationCb=(...m)=>{e.mutation&&e.mutation(...m),t(...m)},s.mousemoveCb=(...m)=>{e.mousemove&&e.mousemove(...m),r(...m)},s.mouseInteractionCb=(...m)=>{e.mouseInteraction&&e.mouseInteraction(...m),i(...m)},s.scrollCb=(...m)=>{e.scroll&&e.scroll(...m),n(...m)},s.viewportResizeCb=(...m)=>{e.viewportResize&&e.viewportResize(...m),a(...m)},s.inputCb=(...m)=>{e.input&&e.input(...m),l(...m)},s.mediaInteractionCb=(...m)=>{e.mediaInteaction&&e.mediaInteaction(...m),o(...m)},s.styleSheetRuleCb=(...m)=>{e.styleSheetRule&&e.styleSheetRule(...m),c(...m)},s.styleDeclarationCb=(...m)=>{e.styleDeclaration&&e.styleDeclaration(...m),u(...m)},s.canvasMutationCb=(...m)=>{e.canvasMutation&&e.canvasMutation(...m),h(...m)},s.fontCb=(...m)=>{e.font&&e.font(...m),p(...m)},s.selectionCb=(...m)=>{e.selection&&e.selection(...m),d(...m)},s.customElementCb=(...m)=>{e.customElement&&e.customElement(...m),g(...m)}}function Wf(s,e={}){const t=s.doc.defaultView;if(!t)return()=>{};Uf(s,e);let r;s.recordDOM&&(r=Xo(s,s.doc));const i=Ef(s),n=$f(s),a=Ko(s),l=Nf(s,{win:t}),o=Tf(s),c=Lf(s);let u=()=>{},h=()=>{},p=()=>{},d=()=>{};s.recordDOM&&(u=_f(s,{win:t}),h=qo(s,s.doc),p=Pf(s,{win:t}),s.collectFonts&&(d=Df(s)));const g=Ff(s),m=Bf(s),f=[];for(const b of s.plugins)f.push(b.observer(b.callback,t,b.options));return M(()=>{Ae.forEach(b=>b.reset()),r==null||r.disconnect(),i(),n(),a(),l(),o(),c(),u(),h(),p(),d(),g(),m(),f.forEach(b=>b())})}function Ht(s){return typeof window[s]!="undefined"}function Yt(s){return!!(typeof window[s]!="undefined"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}var Fe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",zf=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var Zt=0;Zt<Fe.length;Zt++)zf[Fe.charCodeAt(Zt)]=Zt;var jf=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=Fe[e[t]>>2],i+=Fe[(e[t]&3)<<4|e[t+1]>>4],i+=Fe[(e[t+1]&15)<<2|e[t+2]>>6],i+=Fe[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};const qi=new Map;function Gf(s,e){let t=qi.get(s);return t||(t=new Map,qi.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}const Qo=(s,e,t)=>{if(!s||!(ta(s,e)||typeof s=="object"))return;const r=s.constructor.name,i=Gf(t,r);let n=i.indexOf(s);return n===-1&&(n=i.length,i.push(s)),n};function sr(s,e,t){if(s instanceof Array)return s.map(r=>sr(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=jf(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[sr(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:[sr(s.data,e,t),s.width,s.height]};if(ta(s,e)||typeof s=="object"){const r=s.constructor.name,i=Qo(s,e,t);return{rr_type:r,index:i}}}}return s}const ea=(s,e,t)=>s.map(r=>sr(r,e,t)),ta=(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 Vf(s,e,t,r){const i=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const a of n)try{if(typeof e.CanvasRenderingContext2D.prototype[a]!="function")continue;const l=Oe(e.CanvasRenderingContext2D.prototype,a,function(o){return function(...c){return X(this.canvas,t,r,!0)||setTimeout(()=>{const u=ea(c,e,this);s(this.canvas,{type:Ue["2D"],property:a,args:u})},0),o.apply(this,c)}});i.push(l)}catch(l){const o=Er(e.CanvasRenderingContext2D.prototype,a,{set(c){s(this.canvas,{type:Ue["2D"],property:a,args:[c],setter:!0})}});i.push(o)}return()=>{i.forEach(a=>a())}}function Hf(s){return s==="experimental-webgl"?"webgl":s}function Qi(s,e,t,r){const i=[];try{const n=Oe(s.HTMLCanvasElement.prototype,"getContext",function(a){return function(l,...o){if(!X(this,e,t,!0)){const c=Hf(l);if("__context"in this||(this.__context=c),r&&["webgl","webgl2"].includes(c))if(o[0]&&typeof o[0]=="object"){const u=o[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else o.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[l,...o])}});i.push(n)}catch(n){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(n=>n())}}function en(s,e,t,r,i,n){const a=[],l=Object.getOwnPropertyNames(s);for(const o of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(o))try{if(typeof s[o]!="function")continue;const c=Oe(s,o,function(u){return function(...h){const p=u.apply(this,h);if(Qo(p,n,this),"tagName"in this.canvas&&!X(this.canvas,r,i,!0)){const d=ea(h,n,this),g={type:e,property:o,args:d};t(this.canvas,g)}return p}});a.push(c)}catch(c){const u=Er(s,o,{set(h){t(this.canvas,{type:e,property:o,args:[h],setter:!0})}});a.push(u)}return a}function Yf(s,e,t,r){const i=[];return i.push(...en(e.WebGLRenderingContext.prototype,Ue.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext!="undefined"&&i.push(...en(e.WebGL2RenderingContext.prototype,Ue.WebGL2,s,t,r,e)),()=>{i.forEach(n=>n())}}const ra="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Zf=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),tn=typeof self!="undefined"&&self.Blob&&new Blob([Zf(ra)],{type:"text/javascript;charset=utf-8"});function Jf(s){let e;try{if(e=tn&&(self.URL||self.webkitURL).createObjectURL(tn),!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,"+ra,{name:s==null?void 0:s.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}class Xf{constructor(e){w(this,"pendingCanvasMutations",new Map),w(this,"rafStamps",{latestId:0,invokeId:null}),w(this,"mirror"),w(this,"mutationCb"),w(this,"resetObservers"),w(this,"frozen",!1),w(this,"locked",!1),w(this,"processMutation",(o,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(o)||this.pendingCanvasMutations.set(o,[]),this.pendingCanvasMutations.get(o).push(c)});const{sampling:t="all",win:r,blockClass:i,blockSelector:n,recordCanvas:a,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,a&&t==="all"&&this.initCanvasMutationObserver(r,i,n),a&&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 a=Qi(t,r,i,!0),l=new Map,o=new Jf;o.onmessage=g=>{const{id:m}=g.data;if(l.set(m,!1),!("base64"in g.data))return;const{base64:f,type:b,width:C,height:y}=g.data;this.mutationCb({id:m,type:Ue["2D"],commands:[{property:"clearRect",args:[0,0,C,y]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:f}],type:b}]},0,0]}]})};const c=1e3/e;let u=0,h;const p=()=>{const g=[];return t.document.querySelectorAll("canvas").forEach(m=>{X(m,r,i,!0)||g.push(m)}),g},d=g=>{if(u&&g-u<c){h=requestAnimationFrame(d);return}u=g,p().forEach(async m=>{var f;const b=this.mirror.getId(m);if(l.get(b)||m.width===0||m.height===0)return;if(l.set(b,!0),["webgl","webgl2"].includes(m.__context)){const y=m.getContext(m.__context);((f=y==null?void 0:y.getContextAttributes())==null?void 0:f.preserveDrawingBuffer)===!1&&y.clear(y.COLOR_BUFFER_BIT)}const C=await createImageBitmap(m);o.postMessage({id:b,bitmap:C,width:m.width,height:m.height,dataURLOptions:n.dataURLOptions},[C])}),h=requestAnimationFrame(d)};h=requestAnimationFrame(d),this.resetObservers=()=>{a(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=Qi(e,t,r,!1),n=Vf(this.processMutation.bind(this),e,t,r),a=Yf(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),n(),a()}}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(a=>{const c=a,{type:l}=c;return $e(c,["type"])}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:i}),this.pendingCanvasMutations.delete(e)}}class Kf{constructor(){w(this,"nodeMap",new WeakMap),w(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(){}}class qf{constructor(e){w(this,"shadowDoms",new WeakSet),w(this,"mutationCb"),w(this,"scrollCb"),w(this,"bypassOptions"),w(this,"mirror"),w(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(!st(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Xo(ee(O({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Ko(ee(O({},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(x.host(e))),this.restoreHandlers.push(qo({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(Oe(e.prototype,"attachShadow",function(i){return function(n){const a=i.call(this,n),l=x.shadowRoot(this);return l&&Yo(this)&&r.addShadowRoot(l,t),a}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}class Qf{constructor(e){w(this,"trackedLinkElements",new WeakSet),w(this,"mutationCb"),w(this,"adoptedStyleSheetCb"),w(this,"styleMirror",new yf),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 a;this.styleMirror.has(n)?a=this.styleMirror.getId(n):(a=this.styleMirror.add(n),i.push({styleId:a,rules:Array.from(n.rules||CSSRule,(l,o)=>({rule:cn(l,n.href),index:o}))})),r.styleIds.push(a)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}let z,tt,Hr,ot=!1;try{if(Array.from([1],s=>s*2)[0]!==2){const s=document.createElement("iframe");document.body.appendChild(s),Array.from=((ri=s.contentWindow)==null?void 0:ri.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}const se=za();function Se(s={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:n=null,ignoreClass:a="rr-ignore",ignoreSelector:l=null,maskTextClass:o="rr-mask",maskTextSelector:c=null,inlineStylesheet:u=!0,maskAllInputs:h,maskInputOptions:p,slimDOMOptions:d,maskInputFn:g,maskTextFn:m,hooks:f,packFn:b,sampling:C={},dataURLOptions:y={},mousemoveWait:S,recordDOM:A=!0,recordCanvas:$=!1,recordCrossOriginIframes:V=!1,recordAfter:P=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",userTriggeredOnInput:L=!1,collectFonts:j=!1,inlineImages:K=!1,plugins:oe,keepIframeSrcFn:N=()=>!1,ignoreCSSAttributes:Ye=new Set([]),errorHandler:Ze}=s;Sf(Ze);const H=V?window.parent===window:!0;let Q=!1;if(!H)try{window.parent.document&&(Q=!1)}catch(k){Q=!0}if(H&&!e)throw new Error("emit function is required");if(!H&&!Q)return()=>{};S!==void 0&&C.mousemove===void 0&&(C.mousemove=S),se.reset();const ge=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}:p!==void 0?p:{password:!0},ae=d===!0||d==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:d==="all",headMetaDescKeywords:d==="all",headTitleMutations:d==="all"}:d||{};gf();let vt,Ce=0;const Xs=k=>{for(const re of oe||[])re.eventProcessor&&(k=re.eventProcessor(k));return b&&!Q&&(k=b(k)),k};z=(k,re)=>{var W;const G=k;if(G.timestamp=yr(),(W=Ae[0])!=null&&W.isFrozen()&&G.type!==E.FullSnapshot&&!(G.type===E.IncrementalSnapshot&&G.data.source===R.Mutation)&&Ae.forEach(ce=>ce.unfreeze()),H)e==null||e(Xs(G),re);else if(Q){const ce={type:"rrweb",event:Xs(G),origin:window.location.origin,isCheckout:re};window.parent.postMessage(ce,"*")}if(G.type===E.FullSnapshot)vt=G,Ce=0;else if(G.type===E.IncrementalSnapshot){if(G.data.source===R.Mutation&&G.data.isAttachIframe)return;Ce++;const ce=r&&Ce>=r,xe=t&&G.timestamp-vt.timestamp>t;(ce||xe)&&tt(!0)}};const It=k=>{z({type:E.IncrementalSnapshot,data:O({source:R.Mutation},k)})},Ks=k=>z({type:E.IncrementalSnapshot,data:O({source:R.Scroll},k)}),qs=k=>z({type:E.IncrementalSnapshot,data:O({source:R.CanvasMutation},k)}),sa=k=>z({type:E.IncrementalSnapshot,data:O({source:R.AdoptedStyleSheet},k)}),ve=new Qf({mutationCb:It,adoptedStyleSheetCb:sa}),Ie=new vf({mirror:se,mutationCb:It,stylesheetManager:ve,recordCrossOriginIframes:V,wrappedEmit:z});for(const k of oe||[])k.getMirror&&k.getMirror({nodeMirror:se,crossOriginIframeMirror:Ie.crossOriginIframeMirror,crossOriginIframeStyleMirror:Ie.crossOriginIframeStyleMirror});const $r=new Kf;Hr=new Xf({recordCanvas:$,mutationCb:qs,win:window,blockClass:i,blockSelector:n,mirror:se,sampling:C.canvas,dataURLOptions:y});const xt=new qf({mutationCb:It,scrollCb:Ks,bypassOptions:{blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:c,inlineStylesheet:u,maskInputOptions:ge,dataURLOptions:y,maskTextFn:m,maskInputFn:g,recordCanvas:$,inlineImages:K,sampling:C,slimDOMOptions:ae,iframeManager:Ie,stylesheetManager:ve,canvasManager:Hr,keepIframeSrcFn:N,processedNodeManager:$r},mirror:se});tt=(k=!1)=>{if(!A)return;z({type:E.Meta,data:{href:window.location.href,width:Wo(),height:Uo()}},k),ve.reset(),xt.init(),Ae.forEach(W=>W.lock());const re=wl(document,{mirror:se,blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:c,inlineStylesheet:u,maskAllInputs:ge,maskTextFn:m,maskInputFn:g,slimDOM:ae,dataURLOptions:y,recordCanvas:$,inlineImages:K,onSerialize:W=>{Go(W,se)&&Ie.addIframe(W),Vo(W,se)&&ve.trackLinkElement(W),xs(W)&&xt.addShadowRoot(x.shadowRoot(W),document)},onIframeLoad:(W,G)=>{Ie.attachIframe(W,G),xt.observeAttachShadow(W)},onStylesheetLoad:(W,G)=>{ve.attachLinkElement(W,G)},keepIframeSrcFn:N});if(!re)return console.warn("Failed to snapshot the document");z({type:E.FullSnapshot,data:{node:re,initialOffset:Bo(window)}},k),Ae.forEach(W=>W.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ve.adoptStyleSheets(document.adoptedStyleSheets,se.getId(document))};try{const k=[],re=xe=>{var At;return M(Wf)({mutationCb:It,mousemoveCb:(F,Nr)=>z({type:E.IncrementalSnapshot,data:{source:Nr,positions:F}}),mouseInteractionCb:F=>z({type:E.IncrementalSnapshot,data:O({source:R.MouseInteraction},F)}),scrollCb:Ks,viewportResizeCb:F=>z({type:E.IncrementalSnapshot,data:O({source:R.ViewportResize},F)}),inputCb:F=>z({type:E.IncrementalSnapshot,data:O({source:R.Input},F)}),mediaInteractionCb:F=>z({type:E.IncrementalSnapshot,data:O({source:R.MediaInteraction},F)}),styleSheetRuleCb:F=>z({type:E.IncrementalSnapshot,data:O({source:R.StyleSheetRule},F)}),styleDeclarationCb:F=>z({type:E.IncrementalSnapshot,data:O({source:R.StyleDeclaration},F)}),canvasMutationCb:qs,fontCb:F=>z({type:E.IncrementalSnapshot,data:O({source:R.Font},F)}),selectionCb:F=>{z({type:E.IncrementalSnapshot,data:O({source:R.Selection},F)})},customElementCb:F=>{z({type:E.IncrementalSnapshot,data:O({source:R.CustomElement},F)})},blockClass:i,ignoreClass:a,ignoreSelector:l,maskTextClass:o,maskTextSelector:c,maskInputOptions:ge,inlineStylesheet:u,sampling:C,recordDOM:A,recordCanvas:$,inlineImages:K,userTriggeredOnInput:L,collectFonts:j,doc:xe,maskInputFn:g,maskTextFn:m,keepIframeSrcFn:N,blockSelector:n,slimDOMOptions:ae,dataURLOptions:y,mirror:se,iframeManager:Ie,stylesheetManager:ve,shadowDomManager:xt,processedNodeManager:$r,canvasManager:Hr,ignoreCSSAttributes:Ye,plugins:((At=oe==null?void 0:oe.filter(F=>F.observer))==null?void 0:At.map(F=>({observer:F.observer,options:F.options,callback:Nr=>z({type:E.Plugin,data:{plugin:F.name,payload:Nr}})})))||[]},f)};Ie.addLoadListener(xe=>{try{k.push(re(xe.contentDocument))}catch(At){console.warn(At)}});let W=null;const G=()=>{W=Date.now(),tt(),k.push(re(document)),ot=!0},ce=()=>{window.removeEventListener("load",ce),!(!ot||W==null)&&(Date.now()-W<=10||tt())};return window.addEventListener("load",ce),document.readyState==="interactive"||document.readyState==="complete"?(document.readyState==="complete"&&window.removeEventListener("load",ce),G()):(k.push(J("DOMContentLoaded",()=>{z({type:E.DomContentLoaded,data:{}}),P==="DOMContentLoaded"&&G()})),k.push(J("load",()=>{z({type:E.Load,data:{}}),P==="load"&&G()},window))),()=>{k.forEach(xe=>xe()),$r.destroy(),ot=!1,Cf()}}catch(k){console.warn(k)}}Se.addCustomEvent=(s,e)=>{if(!ot)throw new Error("please add custom event after start recording");z({type:E.Custom,data:{tag:s,payload:e}})};Se.freezePage=()=>{Ae.forEach(s=>s.freeze())};Se.takeFullSnapshot=s=>{if(!ot)throw new Error("please take full snapshot after start recording");tt(s)};Se.mirror=se;var rn;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(rn||(rn={}));const{addCustomEvent:_p}=Se,{freezePage:Pp}=Se,{takeFullSnapshot:ep}=Se;exports.record=Se;
59
59
  ;if (typeof module.exports == "object" && typeof exports == "object") {
60
60
  var __cp = (to, from, except, desc) => {
61
61
  if ((from && typeof from === "object") || typeof from === "function") {