@posthog/rrweb 0.0.20 → 0.0.21

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.
@@ -11,14 +11,14 @@
11
11
  }(this, () => {
12
12
  var exports = {};
13
13
  var module = { exports };
14
- "use strict";var qo=Object.defineProperty,Vo=Object.defineProperties;var jo=Object.getOwnPropertyDescriptors;var ht=Object.getOwnPropertySymbols;var js=Object.prototype.hasOwnProperty,Gs=Object.prototype.propertyIsEnumerable;var Vs=(e,t,r)=>t in e?qo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,L=(e,t)=>{for(var r in t||(t={}))js.call(t,r)&&Vs(e,r,t[r]);if(ht)for(var r of ht(t))Gs.call(t,r)&&Vs(e,r,t[r]);return e},se=(e,t)=>Vo(e,jo(t));var Ue=(e,t)=>{var r={};for(var s in e)js.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&ht)for(var s of ht(e))t.indexOf(s)<0&&Gs.call(e,s)&&(r[s]=e[s]);return r};var Go=Object.defineProperty,Ho=(e,t,r)=>t in e?Go(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,M=(e,t,r)=>Ho(e,typeof t!="symbol"?t+"":t,r),Hs;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Yo=Object.defineProperty,Jo=(e,t,r)=>t in e?Yo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ys=(e,t,r)=>Jo(e,typeof t!="symbol"?t+"":t,r),U=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(U||{});const Js={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Xs={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ft={};function Xo(e){var t,r;const s=(r=(t=globalThis==null?void 0:globalThis.Zone)==null?void 0:t.__symbol__)==null?void 0:r.call(t,e);if(s&&globalThis[s])return globalThis[s]}function as(e){if(ft[e])return ft[e];const t=Xo(e)||globalThis[e],r=t.prototype,s=e in Js?Js[e]:void 0,i=!!(s&&s.every(l=>{var d,u;return!!((u=(d=Object.getOwnPropertyDescriptor(r,l))==null?void 0:d.get)!=null&&u.toString().includes("[native code]"))})),a=e in Xs?Xs[e]:void 0,o=!!(a&&a.every(l=>{var d;return typeof r[l]=="function"&&((d=r[l])==null?void 0:d.toString().includes("[native code]"))}));if(i&&o)return ft[e]=t.prototype,t.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const d=l.contentWindow;if(!d)return t.prototype;const u=d[e].prototype;return document.body.removeChild(l),u?ft[e]=u:r}catch(l){return r}}const jt={};function De(e,t,r){var s;const i=`${e}.${String(r)}`;if(jt[i])return jt[i].call(t);const a=as(e),o=(s=Object.getOwnPropertyDescriptor(a,r))==null?void 0:s.get;return o?(jt[i]=o,o.call(t)):t[r]}const Gt={};function Un(e,t,r){const s=`${e}.${String(r)}`;if(Gt[s])return Gt[s].bind(t);const a=as(e)[r];return typeof a!="function"?t[r]:(Gt[s]=a,a.bind(t))}function Qo(e){return De("Node",e,"childNodes")}function Ko(e){return De("Node",e,"parentNode")}function Zo(e){return De("Node",e,"parentElement")}function ea(e){return De("Node",e,"textContent")}function ta(e,t){return Un("Node",e,"contains")(t)}function ra(e){return Un("Node",e,"getRootNode")()}function sa(e){return!e||!("host"in e)?null:De("ShadowRoot",e,"host")}function ia(e){return e.styleSheets}function na(e){return!e||!("shadowRoot"in e)?null:De("Element",e,"shadowRoot")}function oa(e,t){return De("Element",e,"querySelector")(t)}function aa(e,t){return De("Element",e,"querySelectorAll")(t)}function la(){return as("MutationObserver").constructor}function ua(e,t,r){try{if(!(t in e))return()=>{};const s=e[t],i=r(s);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:s}})),e[t]=i,()=>{e[t]=s}}catch(s){return()=>{}}}const ne={childNodes:Qo,parentNode:Ko,parentElement:Zo,textContent:ea,contains:ta,getRootNode:ra,host:sa,styleSheets:ia,shadowRoot:na,querySelector:oa,querySelectorAll:aa,mutationObserver:la,patch:ua};function ls(e){return e.nodeType===e.ELEMENT_NODE}function Ze(e){const t=e&&"host"in e&&"mode"in e&&ne.host(e)||null;return!!(t&&"shadowRoot"in t&&ne.shadowRoot(t)===e)}function et(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function ca(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function ha(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const r=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}function xt(e){try{const t=e.rules||e.cssRules;if(!t)return null;const r=Array.from(t,s=>Bn(s,e.href)).join("");return ca(r)}catch(t){return null}}function Bn(e,t){if(da(e)){let r;try{r=xt(e.styleSheet)||ha(e)}catch(s){r=e.cssText}return e.styleSheet.href?Mt(r,e.styleSheet.href):r}else{let r=e.cssText;return pa(e)&&e.selectorText.includes(":")&&(r=fa(r)),t?Mt(r,t):r}}function fa(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function da(e){return"styleSheet"in e}function pa(e){return"selectorText"in e}class us{constructor(){Ys(this,"idNodeMap",new Map),Ys(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const s=(r=this.getMeta(t))==null?void 0:r.id;return s!=null?s:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const s=r.id;this.idNodeMap.set(s,t),this.nodeMetaMap.set(t,r)}replace(t,r){const s=this.getNode(t);if(s){const i=this.nodeMetaMap.get(s);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function $n(){return new us}function cs({element:e,maskInputOptions:t,tagName:r,type:s,value:i,maskInputFn:a}){let o=i||"";const l=s&&Ie(s);return(t[r.toLowerCase()]||l&&t[l])&&(a?o=a(o,e):o="*".repeat(o.length)),o}function Ie(e){return e.toLowerCase()}const Qs="__rrweb_original__";function ma(e){const t=e.getContext("2d");if(!t)return!0;const r=50;for(let s=0;s<e.width;s+=r)for(let i=0;i<e.height;i+=r){const a=t.getImageData,o=Qs in a?a[Qs]:a;if(new Uint32Array(o.call(t,s,i,Math.min(r,e.width-s),Math.min(r,e.height-i)).data.buffer).some(d=>d!==0))return!1}return!0}function ga(e,t){return!e||!t||e.type!==t.type?!1:e.type===U.Document?e.compatMode===t.compatMode:e.type===U.DocumentType?e.name===t.name&&e.publicId===t.publicId&&e.systemId===t.systemId:e.type===U.Comment||e.type===U.Text||e.type===U.CDATA?e.textContent===t.textContent:e.type===U.Element?e.tagName===t.tagName&&JSON.stringify(e.attributes)===JSON.stringify(t.attributes)&&e.isSVG===t.isSVG&&e.needBlock===t.needBlock:!1}function hs(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Ie(t):null}function fs(e,t){var a;let r;try{r=new URL(e,t!=null?t:window.location.href)}catch(o){return null}const s=/\.([0-9a-z]+)(?:$)/i,i=r.pathname.match(s);return(a=i==null?void 0:i[1])!=null?a:null}function ya(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}const wa=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ba=/^(?:[a-z+]+:)?\/\//i,va=/^www\..*/i,Sa=/^(data:)([^,]*),(.*)/i;function Mt(e,t){return(e||"").replace(wa,(r,s,i,a,o,l)=>{const d=i||o||l,u=s||a||"";if(!d)return r;if(ba.test(d)||va.test(d))return`url(${u}${d}${u})`;if(Sa.test(d))return`url(${u}${d}${u})`;if(d[0]==="/")return`url(${u}${ya(t)+d}${u})`;const n=t.split("/"),f=d.split("/");n.pop();for(const c of f)c!=="."&&(c===".."?n.pop():n.push(c));return`url(${u}${n.join("/")}${u})`})}let Ca=1;const Ea=new RegExp("[^a-z0-9-_:]"),st=-2;function Wn(){return Ca++}function Ra(e){if(e instanceof HTMLFormElement)return"form";const t=Ie(e.tagName);return Ea.test(t)?"div":t}let Be,Ks;const xa=/^[^ \t\n\r\u000c]+/,Ma=/^[, \t\n\r\u000c]+/;function Oa(e,t){if(t.trim()==="")return t;let r=0;function s(a){let o;const l=a.exec(t.substring(r));return l?(o=l[0],r+=o.length,o):""}const i=[];for(;s(Ma),!(r>=t.length);){let a=s(xa);if(a.slice(-1)===",")a=qe(e,a.substring(0,a.length-1)),i.push(a);else{let o="";a=qe(e,a);let l=!1;for(;;){const d=t.charAt(r);if(d===""){i.push((a+o).trim());break}else if(l)d===")"&&(l=!1);else if(d===","){r+=1,i.push((a+o).trim());break}else d==="("&&(l=!0);o+=d,r+=1}}}return i.join(", ")}const Zs=new WeakMap;function qe(e,t){return!t||t.trim()===""?t:ds(e,t)}function Na(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function ds(e,t){let r=Zs.get(e);if(r||(r=e.createElement("a"),Zs.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function zn(e,t,r,s){return s&&(r==="src"||r==="href"&&!(t==="use"&&s[0]==="#")||r==="xlink:href"&&s[0]!=="#"||r==="background"&&(t==="table"||t==="td"||t==="th")?qe(e,s):r==="srcset"?Oa(e,s):r==="style"?Mt(s,ds(e)):t==="object"&&r==="data"?qe(e,s):s)}function qn(e,t,r){return(e==="video"||e==="audio")&&t==="autoplay"}function Ia(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let s=e.classList.length;s--;){const i=e.classList[s];if(t.test(i))return!0}if(r)return e.matches(r)}catch(s){}return!1}function Ot(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?Ot(ne.parentNode(e),t,r):!1;for(let s=e.classList.length;s--;){const i=e.classList[s];if(t.test(i))return!0}return r?Ot(ne.parentNode(e),t,r):!1}function Vn(e,t,r,s){let i;if(ls(e)){if(i=e,!ne.childNodes(i).length)return!1}else{if(ne.parentElement(e)===null)return!1;i=ne.parentElement(e)}try{if(typeof t=="string"){if(s){if(i.closest(`.${t}`))return!0}else if(i.classList.contains(t))return!0}else if(Ot(i,t,s))return!0;if(r){if(s){if(i.closest(r))return!0}else if(i.matches(r))return!0}}catch(a){}return!1}function Da(e,t,r){const s=e.contentWindow;if(!s)return;let i=!1,a;try{a=s.document.readyState}catch(l){return}if(a!=="complete"){const l=setTimeout(()=>{i||(t(),i=!0)},r);e.addEventListener("load",()=>{clearTimeout(l),i=!0,t()});return}const o="about:blank";if(s.location.href!==o||e.src===o||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function Aa(e,t,r){let s=!1,i;try{i=e.sheet}catch(o){return}if(i)return;const a=setTimeout(()=>{s||(t(),s=!0)},r);e.addEventListener("load",()=>{clearTimeout(a),s=!0,t()})}function Ta(e,t){const{doc:r,mirror:s,blockClass:i,blockSelector:a,needsMask:o,inlineStylesheet:l,maskInputOptions:d={},maskTextFn:u,maskInputFn:n,dataURLOptions:f={},inlineImages:c,recordCanvas:h,keepIframeSrcFn:m,newlyAddedElement:p=!1}=t,g=_a(r,s);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:U.Document,childNodes:[],compatMode:e.compatMode}:{type:U.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:U.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:g};case e.ELEMENT_NODE:return La(e,{doc:r,blockClass:i,blockSelector:a,inlineStylesheet:l,maskInputOptions:d,maskInputFn:n,dataURLOptions:f,inlineImages:c,recordCanvas:h,keepIframeSrcFn:m,newlyAddedElement:p,rootId:g});case e.TEXT_NODE:return Pa(e,{doc:r,needsMask:o,maskTextFn:u,rootId:g});case e.CDATA_SECTION_NODE:return{type:U.CDATA,textContent:"",rootId:g};case e.COMMENT_NODE:return{type:U.Comment,textContent:ne.textContent(e)||"",rootId:g};default:return!1}}function _a(e,t){if(!t.hasNode(e))return;const r=t.getId(e);return r===1?void 0:r}function Pa(e,t){var r;const{needsMask:s,maskTextFn:i,rootId:a}=t,o=ne.parentNode(e),l=o&&o.tagName;let d=ne.textContent(e);const u=l==="STYLE"?!0:void 0,n=l==="SCRIPT"?!0:void 0;if(u&&d){try{e.nextSibling||e.previousSibling||(r=o.sheet)!=null&&r.cssRules&&(d=xt(o.sheet))}catch(f){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${f}`,e)}d=Mt(d,ds(t.doc))}return n&&(d="SCRIPT_PLACEHOLDER"),!u&&!n&&d&&s&&(d=i?i(d,ne.parentElement(e)):d.replace(/[\S]/g,"*")),{type:U.Text,textContent:d||"",isStyle:u,rootId:a}}function ei(e,t){return Array.from(e.styleSheets).find(r=>r.href===t)}function ka(e){return e.href}function La(e,t){const{doc:r,blockClass:s,blockSelector:i,inlineStylesheet:a,maskInputOptions:o={},maskInputFn:l,dataURLOptions:d={},inlineImages:u,recordCanvas:n,keepIframeSrcFn:f,newlyAddedElement:c=!1,rootId:h}=t,m=Ia(e,s,i),p=Ra(e);let g={};const w=e.attributes.length;for(let b=0;b<w;b++){const C=e.attributes[b];qn(p,C.name,C.value)||(g[C.name]=zn(r,p,Ie(C.name),C.value))}if(p==="link"&&a){const b=ka(e);if(b){let C=ei(r,b);if(!C&&b.includes(".css")){const S=window.location.origin,E=b.replace(window.location.href,""),R=S+"/"+E;C=ei(r,R)}let v=null;C&&(v=xt(C)),v&&(delete g.rel,delete g.href,g._cssText=v)}}if(p==="style"&&e.sheet&&!(e.innerText||ne.textContent(e)||"").trim().length){const b=xt(e.sheet);b&&(g._cssText=b)}if(p==="input"||p==="textarea"||p==="select"){const b=e.value,C=e.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&b?g.value=cs({element:e,type:hs(e),tagName:p,value:b,maskInputOptions:o,maskInputFn:l}):C&&(g.checked=C)}if(p==="option"&&(e.selected&&!o.select?g.selected=!0:delete g.selected),p==="dialog"&&e.open)try{g.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"}catch(b){g.rr_open_mode="modal",g.ph_rr_could_not_detect_modal=!0}if(p==="canvas"&&n){if(e.__context==="2d")ma(e)||(g.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){const b=e.toDataURL(d.type,d.quality),C=r.createElement("canvas");C.width=e.width,C.height=e.height;const v=C.toDataURL(d.type,d.quality);b!==v&&(g.rr_dataURL=b)}}if(p==="img"&&u){Be||(Be=r.createElement("canvas"),Ks=Be.getContext("2d"));const b=e,C=b.currentSrc||b.getAttribute("src")||"<unknown-src>",v=b.crossOrigin,S=()=>{b.removeEventListener("load",S);try{Be.width=b.naturalWidth,Be.height=b.naturalHeight,Ks.drawImage(b,0,0),g.rr_dataURL=Be.toDataURL(d.type,d.quality)}catch(E){if(b.crossOrigin!=="anonymous"){b.crossOrigin="anonymous",b.complete&&b.naturalWidth!==0?S():b.addEventListener("load",S);return}else console.warn(`Cannot inline img src=${C}! Error: ${E}`)}b.crossOrigin==="anonymous"&&(v?g.crossOrigin=v:b.removeAttribute("crossorigin"))};b.complete&&b.naturalWidth!==0?S():b.addEventListener("load",S)}if(p==="audio"||p==="video"){const b=g;b.rr_mediaState=e.paused?"paused":"played",b.rr_mediaCurrentTime=e.currentTime,b.rr_mediaPlaybackRate=e.playbackRate,b.rr_mediaMuted=e.muted,b.rr_mediaLoop=e.loop,b.rr_mediaVolume=e.volume}if(c||(e.scrollLeft&&(g.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(g.rr_scrollTop=e.scrollTop)),m){const{width:b,height:C}=e.getBoundingClientRect();g={class:g.class,rr_width:`${b}px`,rr_height:`${C}px`}}p==="iframe"&&!f(g.src)&&(e.contentDocument||(g.rr_src=g.src),delete g.src);let y;try{customElements.get(p)&&(y=!0)}catch(b){}return{type:U.Element,tagName:p,attributes:g,childNodes:[],isSVG:Na(e)||void 0,needBlock:m,rootId:h,isCustom:y}}function H(e){return e==null?"":e.toLowerCase()}function Fa(e,t){if(t.comment&&e.type===U.Comment)return!0;if(e.type===U.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&fs(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(H(e.attributes.name).match(/^msapplication-tile(image|color)$/)||H(e.attributes.name)==="application-name"||H(e.attributes.rel)==="icon"||H(e.attributes.rel)==="apple-touch-icon"||H(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&H(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(H(e.attributes.property).match(/^(og|twitter|fb):/)||H(e.attributes.name).match(/^(og|twitter):/)||H(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(H(e.attributes.name)==="robots"||H(e.attributes.name)==="googlebot"||H(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(H(e.attributes.name)==="author"||H(e.attributes.name)==="generator"||H(e.attributes.name)==="framework"||H(e.attributes.name)==="publisher"||H(e.attributes.name)==="progid"||H(e.attributes.property).match(/^article:/)||H(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(H(e.attributes.name)==="google-site-verification"||H(e.attributes.name)==="yandex-verification"||H(e.attributes.name)==="csrf-token"||H(e.attributes.name)==="p:domain_verify"||H(e.attributes.name)==="verify-v1"||H(e.attributes.name)==="verification"||H(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ve(e,t){const{doc:r,mirror:s,blockClass:i,blockSelector:a,maskTextClass:o,maskTextSelector:l,skipChild:d=!1,inlineStylesheet:u=!0,maskInputOptions:n={},maskTextFn:f,maskInputFn:c,slimDOMOptions:h,dataURLOptions:m={},inlineImages:p=!1,recordCanvas:g=!1,onSerialize:w,onIframeLoad:y,iframeLoadTimeout:b=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:v=5e3,keepIframeSrcFn:S=()=>!1,newlyAddedElement:E=!1}=t;let{needsMask:R}=t,{preserveWhiteSpace:I=!0}=t;R||(R=Vn(e,o,l,R===void 0));const O=Ta(e,{doc:r,mirror:s,blockClass:i,blockSelector:a,needsMask:R,inlineStylesheet:u,maskInputOptions:n,maskTextFn:f,maskInputFn:c,dataURLOptions:m,inlineImages:p,recordCanvas:g,keepIframeSrcFn:S,newlyAddedElement:E});if(!O)return console.warn(e,"not serialized"),null;let F;s.hasNode(e)?F=s.getId(e):Fa(O,h)||!I&&O.type===U.Text&&!O.isStyle&&!O.textContent.replace(/^\s+|\s+$/gm,"").length?F=st:F=Wn();const D=Object.assign(O,{id:F});if(s.add(e,D),F===st)return null;w&&w(e);let re=!d;if(D.type===U.Element){re=re&&!D.needBlock,delete D.needBlock;const x=ne.shadowRoot(e);x&&et(x)&&(D.isShadowHost=!0)}if((D.type===U.Document||D.type===U.Element)&&re){h.headWhitespace&&D.type===U.Element&&D.tagName==="head"&&(I=!1);const x={doc:r,mirror:s,blockClass:i,blockSelector:a,needsMask:R,maskTextClass:o,maskTextSelector:l,skipChild:d,inlineStylesheet:u,maskInputOptions:n,maskTextFn:f,maskInputFn:c,slimDOMOptions:h,dataURLOptions:m,inlineImages:p,recordCanvas:g,preserveWhiteSpace:I,onSerialize:w,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:C,stylesheetLoadTimeout:v,keepIframeSrcFn:S};if(!(D.type===U.Element&&D.tagName==="textarea"&&D.attributes.value!==void 0))for(const P of Array.from(ne.childNodes(e))){const V=Ve(P,x);V&&D.childNodes.push(V)}let Z=null;if(ls(e)&&(Z=ne.shadowRoot(e)))for(const P of Array.from(ne.childNodes(Z))){const V=Ve(P,x);V&&(et(Z)&&(V.isShadow=!0),D.childNodes.push(V))}}const ie=ne.parentNode(e);return ie&&Ze(ie)&&et(ie)&&(D.isShadow=!0),D.type===U.Element&&D.tagName==="iframe"&&Da(e,()=>{const x=e.contentDocument;if(x&&y){const Z=Ve(x,{doc:x,mirror:s,blockClass:i,blockSelector:a,needsMask:R,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:n,maskTextFn:f,maskInputFn:c,slimDOMOptions:h,dataURLOptions:m,inlineImages:p,recordCanvas:g,preserveWhiteSpace:I,onSerialize:w,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:C,stylesheetLoadTimeout:v,keepIframeSrcFn:S});Z&&y(e,Z)}},b),D.type===U.Element&&D.tagName==="link"&&typeof D.attributes.rel=="string"&&(D.attributes.rel==="stylesheet"||D.attributes.rel==="preload"&&typeof D.attributes.href=="string"&&fs(D.attributes.href)==="css")&&Aa(e,()=>{if(C){const x=Ve(e,{doc:r,mirror:s,blockClass:i,blockSelector:a,needsMask:R,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:n,maskTextFn:f,maskInputFn:c,slimDOMOptions:h,dataURLOptions:m,inlineImages:p,recordCanvas:g,preserveWhiteSpace:I,onSerialize:w,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:C,stylesheetLoadTimeout:v,keepIframeSrcFn:S});x&&C(e,x)}},v),D}function Ua(e,t){const{mirror:r=new us,blockClass:s="rr-block",blockSelector:i=null,maskTextClass:a="rr-mask",maskTextSelector:o=null,inlineStylesheet:l=!0,inlineImages:d=!1,recordCanvas:u=!1,maskAllInputs:n=!1,maskTextFn:f,maskInputFn:c,slimDOM:h=!1,dataURLOptions:m,preserveWhiteSpace:p,onSerialize:g,onIframeLoad:w,iframeLoadTimeout:y,onStylesheetLoad:b,stylesheetLoadTimeout:C,keepIframeSrcFn:v=()=>!1}=t||{};return Ve(e,{doc:e,mirror:r,blockClass:s,blockSelector:i,maskTextClass:a,maskTextSelector:o,skipChild:!1,inlineStylesheet:l,maskInputOptions:n===!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}:n===!1?{password:!0}:n,maskTextFn:f,maskInputFn:c,slimDOMOptions:h===!0||h==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:h==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:h===!1?{}:h,dataURLOptions:m,inlineImages:d,recordCanvas:u,preserveWhiteSpace:p,onSerialize:g,onIframeLoad:w,iframeLoadTimeout:y,onStylesheetLoad:b,stylesheetLoadTimeout:C,keepIframeSrcFn:v,newlyAddedElement:!1})}const Ba=/(max|min)-device-(width|height)/,ti=new RegExp(Ba.source,"g"),$a={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(e){e.params.match(ti)&&(e.params=e.params.replace(ti,"$1-$2"))}}}},Wa={postcssPlugin:"postcss-hover-classes",prepare:function(){const e=[];return{Rule:function(t){e.indexOf(t)===-1&&(e.push(t),t.selectors.forEach(function(r){r.includes(":hover")&&(t.selector+=`,
15
- `+r.replace(/:hover/g,".\\:hover"))}))}}}};function jn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function za(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function s(){return this instanceof s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(r,s,i.get?i:{enumerable:!0,get:function(){return e[s]}})}),r}var dt={exports:{}},ri;function qa(){if(ri)return dt.exports;ri=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return dt.exports=t(),dt.exports.createColors=t,dt.exports}const Va={},ja=Object.freeze(Object.defineProperty({__proto__:null,default:Va},Symbol.toStringTag,{value:"Module"})),de=za(ja);var Ht,si;function ps(){if(si)return Ht;si=1;let e=qa(),t=de;class r extends Error{constructor(i,a,o,l,d,u){super(i),this.name="CssSyntaxError",this.reason=i,d&&(this.file=d),l&&(this.source=l),u&&(this.plugin=u),typeof a!="undefined"&&typeof o!="undefined"&&(typeof a=="number"?(this.line=a,this.column=o):(this.line=a.line,this.column=a.column,this.endLine=o.line,this.endColumn=o.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}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(i){if(!this.source)return"";let a=this.source;i==null&&(i=e.isColorSupported);let o=h=>h,l=h=>h,d=h=>h;if(i){let{bold:h,gray:m,red:p}=e.createColors(!0);l=g=>h(p(g)),o=g=>m(g),t&&(d=g=>t(g))}let u=a.split(/\r?\n/),n=Math.max(this.line-3,0),f=Math.min(this.line+2,u.length),c=String(f).length;return u.slice(n,f).map((h,m)=>{let p=n+1+m,g=" "+(" "+p).slice(-c)+" | ";if(p===this.line){if(h.length>160){let y=20,b=Math.max(0,this.column-y),C=Math.max(this.column+y,this.endColumn+y),v=h.slice(b,C),S=o(g.replace(/\d/g," "))+h.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return l(">")+o(g)+d(v)+`
14
+ "use strict";var qo=Object.defineProperty,Vo=Object.defineProperties;var jo=Object.getOwnPropertyDescriptors;var ht=Object.getOwnPropertySymbols;var js=Object.prototype.hasOwnProperty,Gs=Object.prototype.propertyIsEnumerable;var Vs=(e,t,r)=>t in e?qo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,L=(e,t)=>{for(var r in t||(t={}))js.call(t,r)&&Vs(e,r,t[r]);if(ht)for(var r of ht(t))Gs.call(t,r)&&Vs(e,r,t[r]);return e},se=(e,t)=>Vo(e,jo(t));var Ue=(e,t)=>{var r={};for(var s in e)js.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&ht)for(var s of ht(e))t.indexOf(s)<0&&Gs.call(e,s)&&(r[s]=e[s]);return r};var Go=Object.defineProperty,Ho=(e,t,r)=>t in e?Go(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,M=(e,t,r)=>Ho(e,typeof t!="symbol"?t+"":t,r),Hs;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Yo=Object.defineProperty,Jo=(e,t,r)=>t in e?Yo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ys=(e,t,r)=>Jo(e,typeof t!="symbol"?t+"":t,r),U=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(U||{});const Js={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Xs={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ft={};function Xo(e){var t,r;const s=(r=(t=globalThis==null?void 0:globalThis.Zone)==null?void 0:t.__symbol__)==null?void 0:r.call(t,e);if(s&&globalThis[s])return globalThis[s]}function as(e){if(ft[e])return ft[e];const t=Xo(e)||globalThis[e],r=t.prototype,s=e in Js?Js[e]:void 0,i=!!(s&&s.every(l=>{var d,u;return!!((u=(d=Object.getOwnPropertyDescriptor(r,l))==null?void 0:d.get)!=null&&u.toString().includes("[native code]"))})),a=e in Xs?Xs[e]:void 0,o=!!(a&&a.every(l=>{var d;return typeof r[l]=="function"&&((d=r[l])==null?void 0:d.toString().includes("[native code]"))}));if(i&&o)return ft[e]=t.prototype,t.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const d=l.contentWindow;if(!d)return t.prototype;const u=d[e].prototype;return document.body.removeChild(l),u?ft[e]=u:r}catch(l){return r}}const jt={};function De(e,t,r){var s;const i=`${e}.${String(r)}`;if(jt[i])return jt[i].call(t);const a=as(e),o=(s=Object.getOwnPropertyDescriptor(a,r))==null?void 0:s.get;return o?(jt[i]=o,o.call(t)):t[r]}const Gt={};function Fn(e,t,r){const s=`${e}.${String(r)}`;if(Gt[s])return Gt[s].bind(t);const a=as(e)[r];return typeof a!="function"?t[r]:(Gt[s]=a,a.bind(t))}function Qo(e){return De("Node",e,"childNodes")}function Ko(e){return De("Node",e,"parentNode")}function Zo(e){return De("Node",e,"parentElement")}function ea(e){return De("Node",e,"textContent")}function ta(e,t){return Fn("Node",e,"contains")(t)}function ra(e){return Fn("Node",e,"getRootNode")()}function sa(e){return!e||!("host"in e)?null:De("ShadowRoot",e,"host")}function ia(e){return e.styleSheets}function na(e){return!e||!("shadowRoot"in e)?null:De("Element",e,"shadowRoot")}function oa(e,t){return De("Element",e,"querySelector")(t)}function aa(e,t){return De("Element",e,"querySelectorAll")(t)}function la(){return as("MutationObserver").constructor}function ua(e,t,r){try{if(!(t in e))return()=>{};const s=e[t],i=r(s);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:s}})),e[t]=i,()=>{e[t]=s}}catch(s){return()=>{}}}const ne={childNodes:Qo,parentNode:Ko,parentElement:Zo,textContent:ea,contains:ta,getRootNode:ra,host:sa,styleSheets:ia,shadowRoot:na,querySelector:oa,querySelectorAll:aa,mutationObserver:la,patch:ua};function ls(e){return e.nodeType===e.ELEMENT_NODE}function Ze(e){const t=e&&"host"in e&&"mode"in e&&ne.host(e)||null;return!!(t&&"shadowRoot"in t&&ne.shadowRoot(t)===e)}function et(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function ca(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function ha(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const r=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}function xt(e){try{const t=e.rules||e.cssRules;if(!t)return null;let r=e.href;!r&&e.ownerNode&&e.ownerNode.ownerDocument&&(r=e.ownerNode.ownerDocument.baseURI);const s=Array.from(t,i=>Un(i,r)).join("");return ca(s)}catch(t){return null}}function Un(e,t){var r;if(da(e)){let s;try{s=xt(e.styleSheet)||ha(e)}catch(i){s=e.cssText}try{if(s&&((r=e.styleSheet)!=null&&r.href))return Mt(s,e.styleSheet.href)}catch(i){}return s}else{let s=e.cssText;return pa(e)&&e.selectorText.includes(":")&&(s=fa(s)),t?Mt(s,t):s}}function fa(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function da(e){return"styleSheet"in e}function pa(e){return"selectorText"in e}class us{constructor(){Ys(this,"idNodeMap",new Map),Ys(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const s=(r=this.getMeta(t))==null?void 0:r.id;return s!=null?s:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const s=r.id;this.idNodeMap.set(s,t),this.nodeMetaMap.set(t,r)}replace(t,r){const s=this.getNode(t);if(s){const i=this.nodeMetaMap.get(s);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Bn(){return new us}function cs({element:e,maskInputOptions:t,tagName:r,type:s,value:i,maskInputFn:a}){let o=i||"";const l=s&&Ie(s);return(t[r.toLowerCase()]||l&&t[l])&&(a?o=a(o,e):o="*".repeat(o.length)),o}function Ie(e){return e.toLowerCase()}const Qs="__rrweb_original__";function ma(e){const t=e.getContext("2d");if(!t)return!0;const r=50;for(let s=0;s<e.width;s+=r)for(let i=0;i<e.height;i+=r){const a=t.getImageData,o=Qs in a?a[Qs]:a;if(new Uint32Array(o.call(t,s,i,Math.min(r,e.width-s),Math.min(r,e.height-i)).data.buffer).some(d=>d!==0))return!1}return!0}function ga(e,t){return!e||!t||e.type!==t.type?!1:e.type===U.Document?e.compatMode===t.compatMode:e.type===U.DocumentType?e.name===t.name&&e.publicId===t.publicId&&e.systemId===t.systemId:e.type===U.Comment||e.type===U.Text||e.type===U.CDATA?e.textContent===t.textContent:e.type===U.Element?e.tagName===t.tagName&&JSON.stringify(e.attributes)===JSON.stringify(t.attributes)&&e.isSVG===t.isSVG&&e.needBlock===t.needBlock:!1}function hs(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Ie(t):null}function fs(e,t){var a;let r;try{r=new URL(e,t!=null?t:window.location.href)}catch(o){return null}const s=/\.([0-9a-z]+)(?:$)/i,i=r.pathname.match(s);return(a=i==null?void 0:i[1])!=null?a:null}function ya(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}const wa=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ba=/^(?:[a-z+]+:)?\/\//i,va=/^www\..*/i,Sa=/^(data:)([^,]*),(.*)/i;function Mt(e,t){return(e||"").replace(wa,(r,s,i,a,o,l)=>{const d=i||o||l,u=s||a||"";if(!d)return r;if(ba.test(d)||va.test(d))return`url(${u}${d}${u})`;if(Sa.test(d))return`url(${u}${d}${u})`;if(d[0]==="/")return`url(${u}${ya(t)+d}${u})`;const n=t.split("/"),f=d.split("/");n.pop();for(const c of f)c!=="."&&(c===".."?n.pop():n.push(c));return`url(${u}${n.join("/")}${u})`})}let Ca=1;const Ea=new RegExp("[^a-z0-9-_:]"),st=-2;function $n(){return Ca++}function Ra(e){if(e instanceof HTMLFormElement)return"form";const t=Ie(e.tagName);return Ea.test(t)?"div":t}let Be,Ks;const xa=/^[^ \t\n\r\u000c]+/,Ma=/^[, \t\n\r\u000c]+/;function Na(e,t){if(t.trim()==="")return t;let r=0;function s(a){let o;const l=a.exec(t.substring(r));return l?(o=l[0],r+=o.length,o):""}const i=[];for(;s(Ma),!(r>=t.length);){let a=s(xa);if(a.slice(-1)===",")a=qe(e,a.substring(0,a.length-1)),i.push(a);else{let o="";a=qe(e,a);let l=!1;for(;;){const d=t.charAt(r);if(d===""){i.push((a+o).trim());break}else if(l)d===")"&&(l=!1);else if(d===","){r+=1,i.push((a+o).trim());break}else d==="("&&(l=!0);o+=d,r+=1}}}return i.join(", ")}const Zs=new WeakMap;function qe(e,t){return!t||t.trim()===""?t:ds(e,t)}function Oa(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function ds(e,t){let r=Zs.get(e);if(r||(r=e.createElement("a"),Zs.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function Wn(e,t,r,s){return s&&(r==="src"||r==="href"&&!(t==="use"&&s[0]==="#")||r==="xlink:href"&&s[0]!=="#"||r==="background"&&(t==="table"||t==="td"||t==="th")?qe(e,s):r==="srcset"?Na(e,s):r==="style"?Mt(s,ds(e)):t==="object"&&r==="data"?qe(e,s):s)}function zn(e,t,r){return(e==="video"||e==="audio")&&t==="autoplay"}function Ia(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let s=e.classList.length;s--;){const i=e.classList[s];if(t.test(i))return!0}if(r)return e.matches(r)}catch(s){}return!1}function Nt(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?Nt(ne.parentNode(e),t,r):!1;for(let s=e.classList.length;s--;){const i=e.classList[s];if(t.test(i))return!0}return r?Nt(ne.parentNode(e),t,r):!1}function qn(e,t,r,s){let i;if(ls(e)){if(i=e,!ne.childNodes(i).length)return!1}else{if(ne.parentElement(e)===null)return!1;i=ne.parentElement(e)}try{if(typeof t=="string"){if(s){if(i.closest(`.${t}`))return!0}else if(i.classList.contains(t))return!0}else if(Nt(i,t,s))return!0;if(r){if(s){if(i.closest(r))return!0}else if(i.matches(r))return!0}}catch(a){}return!1}function Da(e,t,r){const s=e.contentWindow;if(!s)return;let i=!1,a;try{a=s.document.readyState}catch(l){return}if(a!=="complete"){const l=setTimeout(()=>{i||(t(),i=!0)},r);e.addEventListener("load",()=>{clearTimeout(l),i=!0,t()});return}const o="about:blank";if(s.location.href!==o||e.src===o||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function Aa(e,t,r){let s=!1,i;try{i=e.sheet}catch(o){return}if(i)return;const a=setTimeout(()=>{s||(t(),s=!0)},r);e.addEventListener("load",()=>{clearTimeout(a),s=!0,t()})}function Ta(e,t){const{doc:r,mirror:s,blockClass:i,blockSelector:a,needsMask:o,inlineStylesheet:l,maskInputOptions:d={},maskTextFn:u,maskInputFn:n,dataURLOptions:f={},inlineImages:c,recordCanvas:h,keepIframeSrcFn:m,newlyAddedElement:p=!1}=t,g=_a(r,s);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:U.Document,childNodes:[],compatMode:e.compatMode}:{type:U.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:U.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:g};case e.ELEMENT_NODE:return La(e,{doc:r,blockClass:i,blockSelector:a,inlineStylesheet:l,maskInputOptions:d,maskInputFn:n,dataURLOptions:f,inlineImages:c,recordCanvas:h,keepIframeSrcFn:m,newlyAddedElement:p,rootId:g});case e.TEXT_NODE:return Pa(e,{doc:r,needsMask:o,maskTextFn:u,rootId:g});case e.CDATA_SECTION_NODE:return{type:U.CDATA,textContent:"",rootId:g};case e.COMMENT_NODE:return{type:U.Comment,textContent:ne.textContent(e)||"",rootId:g};default:return!1}}function _a(e,t){if(!t.hasNode(e))return;const r=t.getId(e);return r===1?void 0:r}function Pa(e,t){var r;const{needsMask:s,maskTextFn:i,rootId:a}=t,o=ne.parentNode(e),l=o&&o.tagName;let d=ne.textContent(e);const u=l==="STYLE"?!0:void 0,n=l==="SCRIPT"?!0:void 0;if(u&&d){try{e.nextSibling||e.previousSibling||(r=o.sheet)!=null&&r.cssRules&&(d=xt(o.sheet))}catch(f){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${f}`,e)}d=Mt(d,ds(t.doc))}return n&&(d="SCRIPT_PLACEHOLDER"),!u&&!n&&d&&s&&(d=i?i(d,ne.parentElement(e)):d.replace(/[\S]/g,"*")),{type:U.Text,textContent:d||"",isStyle:u,rootId:a}}function ei(e,t){return Array.from(e.styleSheets).find(r=>r.href===t)}function ka(e){return e.href}function La(e,t){const{doc:r,blockClass:s,blockSelector:i,inlineStylesheet:a,maskInputOptions:o={},maskInputFn:l,dataURLOptions:d={},inlineImages:u,recordCanvas:n,keepIframeSrcFn:f,newlyAddedElement:c=!1,rootId:h}=t,m=Ia(e,s,i),p=Ra(e);let g={};const w=e.attributes.length;for(let b=0;b<w;b++){const C=e.attributes[b];zn(p,C.name,C.value)||(g[C.name]=Wn(r,p,Ie(C.name),C.value))}if(p==="link"&&a){const b=ka(e);if(b){let C=ei(r,b);if(!C&&b.includes(".css")){const S=window.location.origin,E=b.replace(window.location.href,""),R=S+"/"+E;C=ei(r,R)}let v=null;C&&(v=xt(C)),v&&(delete g.rel,delete g.href,g._cssText=v)}}if(p==="style"&&e.sheet&&!(e.innerText||ne.textContent(e)||"").trim().length){const b=xt(e.sheet);b&&(g._cssText=b)}if(p==="input"||p==="textarea"||p==="select"){const b=e.value,C=e.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&b?g.value=cs({element:e,type:hs(e),tagName:p,value:b,maskInputOptions:o,maskInputFn:l}):C&&(g.checked=C)}if(p==="option"&&(e.selected&&!o.select?g.selected=!0:delete g.selected),p==="dialog"&&e.open)try{g.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"}catch(b){g.rr_open_mode="modal",g.ph_rr_could_not_detect_modal=!0}if(p==="canvas"&&n){if(e.__context==="2d")ma(e)||(g.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){const b=e.toDataURL(d.type,d.quality),C=r.createElement("canvas");C.width=e.width,C.height=e.height;const v=C.toDataURL(d.type,d.quality);b!==v&&(g.rr_dataURL=b)}}if(p==="img"&&u){Be||(Be=r.createElement("canvas"),Ks=Be.getContext("2d"));const b=e,C=b.currentSrc||b.getAttribute("src")||"<unknown-src>",v=b.crossOrigin,S=()=>{b.removeEventListener("load",S);try{Be.width=b.naturalWidth,Be.height=b.naturalHeight,Ks.drawImage(b,0,0),g.rr_dataURL=Be.toDataURL(d.type,d.quality)}catch(E){if(b.crossOrigin!=="anonymous"){b.crossOrigin="anonymous",b.complete&&b.naturalWidth!==0?S():b.addEventListener("load",S);return}else console.warn(`Cannot inline img src=${C}! Error: ${E}`)}b.crossOrigin==="anonymous"&&(v?g.crossOrigin=v:b.removeAttribute("crossorigin"))};b.complete&&b.naturalWidth!==0?S():b.addEventListener("load",S)}if(p==="audio"||p==="video"){const b=g;b.rr_mediaState=e.paused?"paused":"played",b.rr_mediaCurrentTime=e.currentTime,b.rr_mediaPlaybackRate=e.playbackRate,b.rr_mediaMuted=e.muted,b.rr_mediaLoop=e.loop,b.rr_mediaVolume=e.volume}if(c||(e.scrollLeft&&(g.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(g.rr_scrollTop=e.scrollTop)),m){const{width:b,height:C}=e.getBoundingClientRect();g={class:g.class,rr_width:`${b}px`,rr_height:`${C}px`}}p==="iframe"&&!f(g.src)&&(e.contentDocument||(g.rr_src=g.src),delete g.src);let y;try{customElements.get(p)&&(y=!0)}catch(b){}return{type:U.Element,tagName:p,attributes:g,childNodes:[],isSVG:Oa(e)||void 0,needBlock:m,rootId:h,isCustom:y}}function H(e){return e==null?"":e.toLowerCase()}function Fa(e,t){if(t.comment&&e.type===U.Comment)return!0;if(e.type===U.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&fs(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(H(e.attributes.name).match(/^msapplication-tile(image|color)$/)||H(e.attributes.name)==="application-name"||H(e.attributes.rel)==="icon"||H(e.attributes.rel)==="apple-touch-icon"||H(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&H(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(H(e.attributes.property).match(/^(og|twitter|fb):/)||H(e.attributes.name).match(/^(og|twitter):/)||H(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(H(e.attributes.name)==="robots"||H(e.attributes.name)==="googlebot"||H(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(H(e.attributes.name)==="author"||H(e.attributes.name)==="generator"||H(e.attributes.name)==="framework"||H(e.attributes.name)==="publisher"||H(e.attributes.name)==="progid"||H(e.attributes.property).match(/^article:/)||H(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(H(e.attributes.name)==="google-site-verification"||H(e.attributes.name)==="yandex-verification"||H(e.attributes.name)==="csrf-token"||H(e.attributes.name)==="p:domain_verify"||H(e.attributes.name)==="verify-v1"||H(e.attributes.name)==="verification"||H(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ve(e,t){const{doc:r,mirror:s,blockClass:i,blockSelector:a,maskTextClass:o,maskTextSelector:l,skipChild:d=!1,inlineStylesheet:u=!0,maskInputOptions:n={},maskTextFn:f,maskInputFn:c,slimDOMOptions:h,dataURLOptions:m={},inlineImages:p=!1,recordCanvas:g=!1,onSerialize:w,onIframeLoad:y,iframeLoadTimeout:b=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:v=5e3,keepIframeSrcFn:S=()=>!1,newlyAddedElement:E=!1}=t;let{needsMask:R}=t,{preserveWhiteSpace:I=!0}=t;R||(R=qn(e,o,l,R===void 0));const N=Ta(e,{doc:r,mirror:s,blockClass:i,blockSelector:a,needsMask:R,inlineStylesheet:u,maskInputOptions:n,maskTextFn:f,maskInputFn:c,dataURLOptions:m,inlineImages:p,recordCanvas:g,keepIframeSrcFn:S,newlyAddedElement:E});if(!N)return console.warn(e,"not serialized"),null;let F;s.hasNode(e)?F=s.getId(e):Fa(N,h)||!I&&N.type===U.Text&&!N.isStyle&&!N.textContent.replace(/^\s+|\s+$/gm,"").length?F=st:F=$n();const D=Object.assign(N,{id:F});if(s.add(e,D),F===st)return null;w&&w(e);let re=!d;if(D.type===U.Element){re=re&&!D.needBlock,delete D.needBlock;const x=ne.shadowRoot(e);x&&et(x)&&(D.isShadowHost=!0)}if((D.type===U.Document||D.type===U.Element)&&re){h.headWhitespace&&D.type===U.Element&&D.tagName==="head"&&(I=!1);const x={doc:r,mirror:s,blockClass:i,blockSelector:a,needsMask:R,maskTextClass:o,maskTextSelector:l,skipChild:d,inlineStylesheet:u,maskInputOptions:n,maskTextFn:f,maskInputFn:c,slimDOMOptions:h,dataURLOptions:m,inlineImages:p,recordCanvas:g,preserveWhiteSpace:I,onSerialize:w,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:C,stylesheetLoadTimeout:v,keepIframeSrcFn:S};if(!(D.type===U.Element&&D.tagName==="textarea"&&D.attributes.value!==void 0))for(const P of Array.from(ne.childNodes(e))){const V=Ve(P,x);V&&D.childNodes.push(V)}let Z=null;if(ls(e)&&(Z=ne.shadowRoot(e)))for(const P of Array.from(ne.childNodes(Z))){const V=Ve(P,x);V&&(et(Z)&&(V.isShadow=!0),D.childNodes.push(V))}}const ie=ne.parentNode(e);return ie&&Ze(ie)&&et(ie)&&(D.isShadow=!0),D.type===U.Element&&D.tagName==="iframe"&&Da(e,()=>{const x=e.contentDocument;if(x&&y){const Z=Ve(x,{doc:x,mirror:s,blockClass:i,blockSelector:a,needsMask:R,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:n,maskTextFn:f,maskInputFn:c,slimDOMOptions:h,dataURLOptions:m,inlineImages:p,recordCanvas:g,preserveWhiteSpace:I,onSerialize:w,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:C,stylesheetLoadTimeout:v,keepIframeSrcFn:S});Z&&y(e,Z)}},b),D.type===U.Element&&D.tagName==="link"&&typeof D.attributes.rel=="string"&&(D.attributes.rel==="stylesheet"||D.attributes.rel==="preload"&&typeof D.attributes.href=="string"&&fs(D.attributes.href)==="css")&&Aa(e,()=>{if(C){const x=Ve(e,{doc:r,mirror:s,blockClass:i,blockSelector:a,needsMask:R,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:n,maskTextFn:f,maskInputFn:c,slimDOMOptions:h,dataURLOptions:m,inlineImages:p,recordCanvas:g,preserveWhiteSpace:I,onSerialize:w,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:C,stylesheetLoadTimeout:v,keepIframeSrcFn:S});x&&C(e,x)}},v),D}function Ua(e,t){const{mirror:r=new us,blockClass:s="rr-block",blockSelector:i=null,maskTextClass:a="rr-mask",maskTextSelector:o=null,inlineStylesheet:l=!0,inlineImages:d=!1,recordCanvas:u=!1,maskAllInputs:n=!1,maskTextFn:f,maskInputFn:c,slimDOM:h=!1,dataURLOptions:m,preserveWhiteSpace:p,onSerialize:g,onIframeLoad:w,iframeLoadTimeout:y,onStylesheetLoad:b,stylesheetLoadTimeout:C,keepIframeSrcFn:v=()=>!1}=t||{};return Ve(e,{doc:e,mirror:r,blockClass:s,blockSelector:i,maskTextClass:a,maskTextSelector:o,skipChild:!1,inlineStylesheet:l,maskInputOptions:n===!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}:n===!1?{password:!0}:n,maskTextFn:f,maskInputFn:c,slimDOMOptions:h===!0||h==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:h==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:h===!1?{}:h,dataURLOptions:m,inlineImages:d,recordCanvas:u,preserveWhiteSpace:p,onSerialize:g,onIframeLoad:w,iframeLoadTimeout:y,onStylesheetLoad:b,stylesheetLoadTimeout:C,keepIframeSrcFn:v,newlyAddedElement:!1})}const Ba=/(max|min)-device-(width|height)/,ti=new RegExp(Ba.source,"g"),$a={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(e){e.params.match(ti)&&(e.params=e.params.replace(ti,"$1-$2"))}}}},Wa={postcssPlugin:"postcss-hover-classes",prepare:function(){const e=[];return{Rule:function(t){e.indexOf(t)===-1&&(e.push(t),t.selectors.forEach(function(r){r.includes(":hover")&&(t.selector+=`,
15
+ `+r.replace(/:hover/g,".\\:hover"))}))}}}};function Vn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function za(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function s(){return this instanceof s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(r,s,i.get?i:{enumerable:!0,get:function(){return e[s]}})}),r}var dt={exports:{}},ri;function qa(){if(ri)return dt.exports;ri=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return dt.exports=t(),dt.exports.createColors=t,dt.exports}const Va={},ja=Object.freeze(Object.defineProperty({__proto__:null,default:Va},Symbol.toStringTag,{value:"Module"})),de=za(ja);var Ht,si;function ps(){if(si)return Ht;si=1;let e=qa(),t=de;class r extends Error{constructor(i,a,o,l,d,u){super(i),this.name="CssSyntaxError",this.reason=i,d&&(this.file=d),l&&(this.source=l),u&&(this.plugin=u),typeof a!="undefined"&&typeof o!="undefined"&&(typeof a=="number"?(this.line=a,this.column=o):(this.line=a.line,this.column=a.column,this.endLine=o.line,this.endColumn=o.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}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(i){if(!this.source)return"";let a=this.source;i==null&&(i=e.isColorSupported);let o=h=>h,l=h=>h,d=h=>h;if(i){let{bold:h,gray:m,red:p}=e.createColors(!0);l=g=>h(p(g)),o=g=>m(g),t&&(d=g=>t(g))}let u=a.split(/\r?\n/),n=Math.max(this.line-3,0),f=Math.min(this.line+2,u.length),c=String(f).length;return u.slice(n,f).map((h,m)=>{let p=n+1+m,g=" "+(" "+p).slice(-c)+" | ";if(p===this.line){if(h.length>160){let y=20,b=Math.max(0,this.column-y),C=Math.max(this.column+y,this.endColumn+y),v=h.slice(b,C),S=o(g.replace(/\d/g," "))+h.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return l(">")+o(g)+d(v)+`
16
16
  `+S+l("^")}let w=o(g.replace(/\d/g," "))+h.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+o(g)+d(h)+`
17
17
  `+w+l("^")}return" "+o(g)+d(h)}).join(`
18
18
  `)}toString(){let i=this.showSourceCode();return i&&(i=`
19
19
 
20
20
  `+i+`
21
- `),this.name+": "+this.message+i}}return Ht=r,r.default=r,Ht}var Yt,ii;function Gn(){if(ii)return Yt;ii=1;const e={after:`
21
+ `),this.name+": "+this.message+i}}return Ht=r,r.default=r,Ht}var Yt,ii;function jn(){if(ii)return Yt;ii=1;const e={after:`
22
22
  `,beforeClose:`
23
23
  `,beforeComment:`
24
24
  `,beforeDecl:`
@@ -29,23 +29,23 @@ var module = { exports };
29
29
  `)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o=="undefined"?o=this.raw(a,null,"beforeDecl"):o&&(o=o.replace(/\S/g,"")),o}rawBeforeDecl(i,a){let o;return i.walkDecls(l=>{if(typeof l.raws.before!="undefined")return o=l.raws.before,o.includes(`
30
30
  `)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o=="undefined"?o=this.raw(a,null,"beforeRule"):o&&(o=o.replace(/\S/g,"")),o}rawBeforeOpen(i){let a;return i.walk(o=>{if(o.type!=="decl"&&(a=o.raws.between,typeof a!="undefined"))return!1}),a}rawBeforeRule(i){let a;return i.walk(o=>{if(o.nodes&&(o.parent!==i||i.first!==o)&&typeof o.raws.before!="undefined")return a=o.raws.before,a.includes(`
31
31
  `)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawColon(i){let a;return i.walkDecls(o=>{if(typeof o.raws.between!="undefined")return a=o.raws.between.replace(/[^\s:]/g,""),!1}),a}rawEmptyBody(i){let a;return i.walk(o=>{if(o.nodes&&o.nodes.length===0&&(a=o.raws.after,typeof a!="undefined"))return!1}),a}rawIndent(i){if(i.raws.indent)return i.raws.indent;let a;return i.walk(o=>{let l=o.parent;if(l&&l!==i&&l.parent&&l.parent===i&&typeof o.raws.before!="undefined"){let d=o.raws.before.split(`
32
- `);return a=d[d.length-1],a=a.replace(/\S/g,""),!1}}),a}rawSemicolon(i){let a;return i.walk(o=>{if(o.nodes&&o.nodes.length&&o.last.type==="decl"&&(a=o.raws.semicolon,typeof a!="undefined"))return!1}),a}rawValue(i,a){let o=i[a],l=i.raws[a];return l&&l.value===o?l.raw:o}root(i){this.body(i),i.raws.after&&this.builder(i.raws.after)}rule(i){this.block(i,this.rawValue(i,"selector")),i.raws.ownSemicolon&&this.builder(i.raws.ownSemicolon,i,"end")}stringify(i,a){if(!this[i.type])throw new Error("Unknown AST node type "+i.type+". Maybe you need to change PostCSS stringifier.");this[i.type](i,a)}}return Yt=r,r.default=r,Yt}var Jt,ni;function Pt(){if(ni)return Jt;ni=1;let e=Gn();function t(r,s){new e(s).stringify(r)}return Jt=t,t.default=t,Jt}var pt={},oi;function ms(){return oi||(oi=1,pt.isClean=Symbol("isClean"),pt.my=Symbol("my")),pt}var Xt,ai;function kt(){if(ai)return Xt;ai=1;let e=ps(),t=Gn(),r=Pt(),{isClean:s,my:i}=ms();function a(d,u){let n=new d.constructor;for(let f in d){if(!Object.prototype.hasOwnProperty.call(d,f)||f==="proxyCache")continue;let c=d[f],h=typeof c;f==="parent"&&h==="object"?u&&(n[f]=u):f==="source"?n[f]=c:Array.isArray(c)?n[f]=c.map(m=>a(m,n)):(h==="object"&&c!==null&&(c=a(c)),n[f]=c)}return n}function o(d,u){if(u&&typeof u.offset!="undefined")return u.offset;let n=1,f=1,c=0;for(let h=0;h<d.length;h++){if(f===u.line&&n===u.column){c=h;break}d[h]===`
32
+ `);return a=d[d.length-1],a=a.replace(/\S/g,""),!1}}),a}rawSemicolon(i){let a;return i.walk(o=>{if(o.nodes&&o.nodes.length&&o.last.type==="decl"&&(a=o.raws.semicolon,typeof a!="undefined"))return!1}),a}rawValue(i,a){let o=i[a],l=i.raws[a];return l&&l.value===o?l.raw:o}root(i){this.body(i),i.raws.after&&this.builder(i.raws.after)}rule(i){this.block(i,this.rawValue(i,"selector")),i.raws.ownSemicolon&&this.builder(i.raws.ownSemicolon,i,"end")}stringify(i,a){if(!this[i.type])throw new Error("Unknown AST node type "+i.type+". Maybe you need to change PostCSS stringifier.");this[i.type](i,a)}}return Yt=r,r.default=r,Yt}var Jt,ni;function Pt(){if(ni)return Jt;ni=1;let e=jn();function t(r,s){new e(s).stringify(r)}return Jt=t,t.default=t,Jt}var pt={},oi;function ms(){return oi||(oi=1,pt.isClean=Symbol("isClean"),pt.my=Symbol("my")),pt}var Xt,ai;function kt(){if(ai)return Xt;ai=1;let e=ps(),t=jn(),r=Pt(),{isClean:s,my:i}=ms();function a(d,u){let n=new d.constructor;for(let f in d){if(!Object.prototype.hasOwnProperty.call(d,f)||f==="proxyCache")continue;let c=d[f],h=typeof c;f==="parent"&&h==="object"?u&&(n[f]=u):f==="source"?n[f]=c:Array.isArray(c)?n[f]=c.map(m=>a(m,n)):(h==="object"&&c!==null&&(c=a(c)),n[f]=c)}return n}function o(d,u){if(u&&typeof u.offset!="undefined")return u.offset;let n=1,f=1,c=0;for(let h=0;h<d.length;h++){if(f===u.line&&n===u.column){c=h;break}d[h]===`
33
33
  `?(n=1,f+=1):n+=1}return c}class l{constructor(u={}){this.raws={},this[s]=!1,this[i]=!0;for(let n in u)if(n==="nodes"){this.nodes=[];for(let f of u[n])typeof f.clone=="function"?this.append(f.clone()):this.append(f)}else this[n]=u[n]}addToError(u){if(u.postcssNode=this,u.stack&&this.source&&/\n\s{4}at /.test(u.stack)){let n=this.source;u.stack=u.stack.replace(/\n\s{4}at /,`$&${n.input.from}:${n.start.line}:${n.start.column}$&`)}return u}after(u){return this.parent.insertAfter(this,u),this}assign(u={}){for(let n in u)this[n]=u[n];return this}before(u){return this.parent.insertBefore(this,u),this}cleanRaws(u){delete this.raws.before,delete this.raws.after,u||delete this.raws.between}clone(u={}){let n=a(this);for(let f in u)n[f]=u[f];return n}cloneAfter(u={}){let n=this.clone(u);return this.parent.insertAfter(this,n),n}cloneBefore(u={}){let n=this.clone(u);return this.parent.insertBefore(this,n),n}error(u,n={}){if(this.source){let{end:f,start:c}=this.rangeBy(n);return this.source.input.error(u,{column:c.column,line:c.line},{column:f.column,line:f.line},n)}return new e(u)}getProxyProcessor(){return{get(u,n){return n==="proxyOf"?u:n==="root"?()=>u.root().toProxy():u[n]},set(u,n,f){return u[n]===f||(u[n]=f,(n==="prop"||n==="value"||n==="name"||n==="params"||n==="important"||n==="text")&&u.markDirty()),!0}}}markClean(){this[s]=!0}markDirty(){if(this[s]){this[s]=!1;let u=this;for(;u=u.parent;)u[s]=!1}}next(){if(!this.parent)return;let u=this.parent.index(this);return this.parent.nodes[u+1]}positionBy(u){let n=this.source.start;if(u.index)n=this.positionInside(u.index);else if(u.word){let f="document"in this.source.input?this.source.input.document:this.source.input.css,h=f.slice(o(f,this.source.start),o(f,this.source.end)).indexOf(u.word);h!==-1&&(n=this.positionInside(h))}return n}positionInside(u){let n=this.source.start.column,f=this.source.start.line,c="document"in this.source.input?this.source.input.document:this.source.input.css,h=o(c,this.source.start),m=h+u;for(let p=h;p<m;p++)c[p]===`
34
- `?(n=1,f+=1):n+=1;return{column:n,line:f}}prev(){if(!this.parent)return;let u=this.parent.index(this);return this.parent.nodes[u-1]}rangeBy(u){let n={column:this.source.start.column,line:this.source.start.line},f=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:n.column+1,line:n.line};if(u.word){let c="document"in this.source.input?this.source.input.document:this.source.input.css,m=c.slice(o(c,this.source.start),o(c,this.source.end)).indexOf(u.word);m!==-1&&(n=this.positionInside(m),f=this.positionInside(m+u.word.length))}else u.start?n={column:u.start.column,line:u.start.line}:u.index&&(n=this.positionInside(u.index)),u.end?f={column:u.end.column,line:u.end.line}:typeof u.endIndex=="number"?f=this.positionInside(u.endIndex):u.index&&(f=this.positionInside(u.index+1));return(f.line<n.line||f.line===n.line&&f.column<=n.column)&&(f={column:n.column+1,line:n.line}),{end:f,start:n}}raw(u,n){return new t().raw(this,u,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...u){if(this.parent){let n=this,f=!1;for(let c of u)c===this?f=!0:f?(this.parent.insertAfter(n,c),n=c):this.parent.insertBefore(n,c);f||this.remove()}return this}root(){let u=this;for(;u.parent&&u.parent.type!=="document";)u=u.parent;return u}toJSON(u,n){let f={},c=n==null;n=n||new Map;let h=0;for(let m in this){if(!Object.prototype.hasOwnProperty.call(this,m)||m==="parent"||m==="proxyCache")continue;let p=this[m];if(Array.isArray(p))f[m]=p.map(g=>typeof g=="object"&&g.toJSON?g.toJSON(null,n):g);else if(typeof p=="object"&&p.toJSON)f[m]=p.toJSON(null,n);else if(m==="source"){let g=n.get(p.input);g==null&&(g=h,n.set(p.input,h),h++),f[m]={end:p.end,inputId:g,start:p.start}}else f[m]=p}return c&&(f.inputs=[...n.keys()].map(m=>m.toJSON())),f}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(u=r){u.stringify&&(u=u.stringify);let n="";return u(this,f=>{n+=f}),n}warn(u,n,f){let c={node:this};for(let h in f)c[h]=f[h];return u.warn(n,c)}get proxyOf(){return this}}return Xt=l,l.default=l,Xt}var Qt,li;function nt(){if(li)return Qt;li=1;let e=kt();class t extends e{constructor(s){super(s),this.type="comment"}}return Qt=t,t.default=t,Qt}var Kt,ui;function Lt(){if(ui)return Kt;ui=1;let e=kt();class t extends e{constructor(s){s&&typeof s.value!="undefined"&&typeof s.value!="string"&&(s=se(L({},s),{value:String(s.value)})),super(s),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return Kt=t,t.default=t,Kt}var Zt,ci;function ke(){if(ci)return Zt;ci=1;let e=nt(),t=Lt(),r=kt(),{isClean:s,my:i}=ms(),a,o,l,d;function u(c){return c.map(h=>(h.nodes&&(h.nodes=u(h.nodes)),delete h.source,h))}function n(c){if(c[s]=!1,c.proxyOf.nodes)for(let h of c.proxyOf.nodes)n(h)}class f extends r{append(...h){for(let m of h){let p=this.normalize(m,this.last);for(let g of p)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(h){if(super.cleanRaws(h),this.nodes)for(let m of this.nodes)m.cleanRaws(h)}each(h){if(!this.proxyOf.nodes)return;let m=this.getIterator(),p,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(p=this.indexes[m],g=h(this.proxyOf.nodes[p],p),g!==!1);)this.indexes[m]+=1;return delete this.indexes[m],g}every(h){return this.nodes.every(h)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let h=this.lastEach;return this.indexes[h]=0,h}getProxyProcessor(){return{get(h,m){return m==="proxyOf"?h:h[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...p)=>h[m](...p.map(g=>typeof g=="function"?(w,y)=>g(w.toProxy(),y):g)):m==="every"||m==="some"?p=>h[m]((g,...w)=>p(g.toProxy(),...w)):m==="root"?()=>h.root().toProxy():m==="nodes"?h.nodes.map(p=>p.toProxy()):m==="first"||m==="last"?h[m].toProxy():h[m]:h[m]},set(h,m,p){return h[m]===p||(h[m]=p,(m==="name"||m==="params"||m==="selector")&&h.markDirty()),!0}}}index(h){return typeof h=="number"?h:(h.proxyOf&&(h=h.proxyOf),this.proxyOf.nodes.indexOf(h))}insertAfter(h,m){let p=this.index(h),g=this.normalize(m,this.proxyOf.nodes[p]).reverse();p=this.index(h);for(let y of g)this.proxyOf.nodes.splice(p+1,0,y);let w;for(let y in this.indexes)w=this.indexes[y],p<w&&(this.indexes[y]=w+g.length);return this.markDirty(),this}insertBefore(h,m){let p=this.index(h),g=p===0?"prepend":!1,w=this.normalize(m,this.proxyOf.nodes[p],g).reverse();p=this.index(h);for(let b of w)this.proxyOf.nodes.splice(p,0,b);let y;for(let b in this.indexes)y=this.indexes[b],p<=y&&(this.indexes[b]=y+w.length);return this.markDirty(),this}normalize(h,m){if(typeof h=="string")h=u(o(h).nodes);else if(typeof h=="undefined")h=[];else if(Array.isArray(h)){h=h.slice(0);for(let g of h)g.parent&&g.parent.removeChild(g,"ignore")}else if(h.type==="root"&&this.type!=="document"){h=h.nodes.slice(0);for(let g of h)g.parent&&g.parent.removeChild(g,"ignore")}else if(h.type)h=[h];else if(h.prop){if(typeof h.value=="undefined")throw new Error("Value field is missed in node creation");typeof h.value!="string"&&(h.value=String(h.value)),h=[new t(h)]}else if(h.selector||h.selectors)h=[new d(h)];else if(h.name)h=[new a(h)];else if(h.text)h=[new e(h)];else throw new Error("Unknown node type in node creation");return h.map(g=>(g[i]||f.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[s]&&n(g),g.raws||(g.raws={}),typeof g.raws.before=="undefined"&&m&&typeof m.raws.before!="undefined"&&(g.raws.before=m.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...h){h=h.reverse();for(let m of h){let p=this.normalize(m,this.first,"prepend").reverse();for(let g of p)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+p.length}return this.markDirty(),this}push(h){return h.parent=this,this.proxyOf.nodes.push(h),this}removeAll(){for(let h of this.proxyOf.nodes)h.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(h){h=this.index(h),this.proxyOf.nodes[h].parent=void 0,this.proxyOf.nodes.splice(h,1);let m;for(let p in this.indexes)m=this.indexes[p],m>=h&&(this.indexes[p]=m-1);return this.markDirty(),this}replaceValues(h,m,p){return p||(p=m,m={}),this.walkDecls(g=>{m.props&&!m.props.includes(g.prop)||m.fast&&!g.value.includes(m.fast)||(g.value=g.value.replace(h,p))}),this.markDirty(),this}some(h){return this.nodes.some(h)}walk(h){return this.each((m,p)=>{let g;try{g=h(m,p)}catch(w){throw m.addToError(w)}return g!==!1&&m.walk&&(g=m.walk(h)),g})}walkAtRules(h,m){return m?h instanceof RegExp?this.walk((p,g)=>{if(p.type==="atrule"&&h.test(p.name))return m(p,g)}):this.walk((p,g)=>{if(p.type==="atrule"&&p.name===h)return m(p,g)}):(m=h,this.walk((p,g)=>{if(p.type==="atrule")return m(p,g)}))}walkComments(h){return this.walk((m,p)=>{if(m.type==="comment")return h(m,p)})}walkDecls(h,m){return m?h instanceof RegExp?this.walk((p,g)=>{if(p.type==="decl"&&h.test(p.prop))return m(p,g)}):this.walk((p,g)=>{if(p.type==="decl"&&p.prop===h)return m(p,g)}):(m=h,this.walk((p,g)=>{if(p.type==="decl")return m(p,g)}))}walkRules(h,m){return m?h instanceof RegExp?this.walk((p,g)=>{if(p.type==="rule"&&h.test(p.selector))return m(p,g)}):this.walk((p,g)=>{if(p.type==="rule"&&p.selector===h)return m(p,g)}):(m=h,this.walk((p,g)=>{if(p.type==="rule")return m(p,g)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return f.registerParse=c=>{o=c},f.registerRule=c=>{d=c},f.registerAtRule=c=>{a=c},f.registerRoot=c=>{l=c},Zt=f,f.default=f,f.rebuild=c=>{c.type==="atrule"?Object.setPrototypeOf(c,a.prototype):c.type==="rule"?Object.setPrototypeOf(c,d.prototype):c.type==="decl"?Object.setPrototypeOf(c,t.prototype):c.type==="comment"?Object.setPrototypeOf(c,e.prototype):c.type==="root"&&Object.setPrototypeOf(c,l.prototype),c[i]=!0,c.nodes&&c.nodes.forEach(h=>{f.rebuild(h)})},Zt}var er,hi;function gs(){if(hi)return er;hi=1;let e=ke();class t extends e{constructor(s){super(s),this.type="atrule"}append(...s){return this.proxyOf.nodes||(this.nodes=[]),super.append(...s)}prepend(...s){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...s)}}return er=t,t.default=t,e.registerAtRule(t),er}var tr,fi;function ys(){if(fi)return tr;fi=1;let e=ke(),t,r;class s extends e{constructor(a){super(L({type:"document"},a)),this.nodes||(this.nodes=[])}toResult(a={}){return new t(new r,this,a).stringify()}}return s.registerLazyResult=i=>{t=i},s.registerProcessor=i=>{r=i},tr=s,s.default=s,tr}var rr,di;function Ga(){if(di)return rr;di=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return rr={nanoid:(s=21)=>{let i="",a=s|0;for(;a--;)i+=e[Math.random()*64|0];return i},customAlphabet:(s,i=21)=>(a=i)=>{let o="",l=a|0;for(;l--;)o+=s[Math.random()*s.length|0];return o}},rr}var sr,pi;function Hn(){if(pi)return sr;pi=1;let{existsSync:e,readFileSync:t}=de,{dirname:r,join:s}=de,{SourceMapConsumer:i,SourceMapGenerator:a}=de;function o(d){return Buffer?Buffer.from(d,"base64").toString():window.atob(d)}class l{constructor(u,n){if(n.map===!1)return;this.loadAnnotation(u),this.inline=this.startWith(this.annotation,"data:");let f=n.map?n.map.prev:void 0,c=this.loadMap(n.from,f);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=r(this.mapFile)),c&&(this.text=c)}consumer(){return this.consumerCache||(this.consumerCache=new i(this.text)),this.consumerCache}decodeInline(u){let n=/^data:application\/json;charset=utf-?8;base64,/,f=/^data:application\/json;base64,/,c=/^data:application\/json;charset=utf-?8,/,h=/^data:application\/json,/,m=u.match(c)||u.match(h);if(m)return decodeURIComponent(u.substr(m[0].length));let p=u.match(n)||u.match(f);if(p)return o(u.substr(p[0].length));let g=u.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+g)}getAnnotationURL(u){return u.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(u){return typeof u!="object"?!1:typeof u.mappings=="string"||typeof u._mappings=="string"||Array.isArray(u.sections)}loadAnnotation(u){let n=u.match(/\/\*\s*# sourceMappingURL=/g);if(!n)return;let f=u.lastIndexOf(n.pop()),c=u.indexOf("*/",f);f>-1&&c>-1&&(this.annotation=this.getAnnotationURL(u.substring(f,c)))}loadFile(u){if(this.root=r(u),e(u))return this.mapFile=u,t(u,"utf-8").toString().trim()}loadMap(u,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let f=n(u);if(f){let c=this.loadFile(f);if(!c)throw new Error("Unable to load previous source map: "+f.toString());return c}}else{if(n instanceof i)return a.fromSourceMap(n).toString();if(n instanceof a)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let f=this.annotation;return u&&(f=s(r(u),f)),this.loadFile(f)}}}startWith(u,n){return u?u.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return sr=l,l.default=l,sr}var ir,mi;function Ft(){if(mi)return ir;mi=1;let{nanoid:e}=Ga(),{isAbsolute:t,resolve:r}=de,{SourceMapConsumer:s,SourceMapGenerator:i}=de,{fileURLToPath:a,pathToFileURL:o}=de,l=ps(),d=Hn(),u=de,n=Symbol("fromOffsetCache"),f=!!(s&&i),c=!!(r&&t);class h{constructor(p,g={}){if(p===null||typeof p=="undefined"||typeof p=="object"&&!p.toString)throw new Error(`PostCSS received ${p} instead of CSS string`);if(this.css=p.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,g.document&&(this.document=g.document.toString()),g.from&&(!c||/^\w+:\/\//.test(g.from)||t(g.from)?this.file=g.from:this.file=r(g.from)),c&&f){let w=new d(this.css,g);if(w.text){this.map=w;let y=w.consumer().file;!this.file&&y&&(this.file=this.mapResolve(y))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(p,g,w,y={}){let b,C,v;if(g&&typeof g=="object"){let E=g,R=w;if(typeof E.offset=="number"){let I=this.fromOffset(E.offset);g=I.line,w=I.col}else g=E.line,w=E.column;if(typeof R.offset=="number"){let I=this.fromOffset(R.offset);C=I.line,b=I.col}else C=R.line,b=R.column}else if(!w){let E=this.fromOffset(g);g=E.line,w=E.col}let S=this.origin(g,w,C,b);return S?v=new l(p,S.endLine===void 0?S.line:{column:S.column,line:S.line},S.endLine===void 0?S.column:{column:S.endColumn,line:S.endLine},S.source,S.file,y.plugin):v=new l(p,C===void 0?g:{column:w,line:g},C===void 0?w:{column:b,line:C},this.css,this.file,y.plugin),v.input={column:w,endColumn:b,endLine:C,line:g,source:this.css},this.file&&(o&&(v.input.url=o(this.file).toString()),v.input.file=this.file),v}fromOffset(p){let g,w;if(this[n])w=this[n];else{let b=this.css.split(`
35
- `);w=new Array(b.length);let C=0;for(let v=0,S=b.length;v<S;v++)w[v]=C,C+=b[v].length+1;this[n]=w}g=w[w.length-1];let y=0;if(p>=g)y=w.length-1;else{let b=w.length-2,C;for(;y<b;)if(C=y+(b-y>>1),p<w[C])b=C-1;else if(p>=w[C+1])y=C+1;else{y=C;break}}return{col:p-w[y]+1,line:y+1}}mapResolve(p){return/^\w+:\/\//.test(p)?p:r(this.map.consumer().sourceRoot||this.map.root||".",p)}origin(p,g,w,y){if(!this.map)return!1;let b=this.map.consumer(),C=b.originalPositionFor({column:g,line:p});if(!C.source)return!1;let v;typeof w=="number"&&(v=b.originalPositionFor({column:y,line:w}));let S;t(C.source)?S=o(C.source):S=new URL(C.source,this.map.consumer().sourceRoot||o(this.map.mapFile));let E={column:C.column,endColumn:v&&v.column,endLine:v&&v.line,line:C.line,url:S.toString()};if(S.protocol==="file:")if(a)E.file=a(S);else throw new Error("file: protocol is not available in this PostCSS build");let R=b.sourceContentFor(C.source);return R&&(E.source=R),E}toJSON(){let p={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(p[g]=this[g]);return this.map&&(p.map=L({},this.map),p.map.consumerCache&&(p.map.consumerCache=void 0)),p}get from(){return this.file||this.id}}return ir=h,h.default=h,u&&u.registerInput&&u.registerInput(h),ir}var nr,gi;function ot(){if(gi)return nr;gi=1;let e=ke(),t,r;class s extends e{constructor(a){super(a),this.type="root",this.nodes||(this.nodes=[])}normalize(a,o,l){let d=super.normalize(a);if(o){if(l==="prepend")this.nodes.length>1?o.raws.before=this.nodes[1].raws.before:delete o.raws.before;else if(this.first!==o)for(let u of d)u.raws.before=o.raws.before}return d}removeChild(a,o){let l=this.index(a);return!o&&l===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[l].raws.before),super.removeChild(a)}toResult(a={}){return new t(new r,this,a).stringify()}}return s.registerLazyResult=i=>{t=i},s.registerProcessor=i=>{r=i},nr=s,s.default=s,e.registerRoot(s),nr}var or,yi;function Yn(){if(yi)return or;yi=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let r=[" ",`
36
- `," "];return e.split(t,r)},split(t,r,s){let i=[],a="",o=!1,l=0,d=!1,u="",n=!1;for(let f of t)n?n=!1:f==="\\"?n=!0:d?f===u&&(d=!1):f==='"'||f==="'"?(d=!0,u=f):f==="("?l+=1:f===")"?l>0&&(l-=1):l===0&&r.includes(f)&&(o=!0),o?(a!==""&&i.push(a.trim()),a="",o=!1):a+=f;return(s||a!=="")&&i.push(a.trim()),i}};return or=e,e.default=e,or}var ar,wi;function ws(){if(wi)return ar;wi=1;let e=ke(),t=Yn();class r extends e{constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(i){let a=this.selector?this.selector.match(/,\s*/):null,o=a?a[0]:","+this.raw("between","beforeOpen");this.selector=i.join(o)}}return ar=r,r.default=r,e.registerRule(r),ar}var lr,bi;function Ha(){if(bi)return lr;bi=1;let e=gs(),t=nt(),r=Lt(),s=Ft(),i=Hn(),a=ot(),o=ws();function l(d,u){if(Array.isArray(d))return d.map(m=>l(m));let c=d,{inputs:n}=c,f=Ue(c,["inputs"]);if(n){u=[];for(let m of n){let p=se(L({},m),{__proto__:s.prototype});p.map&&(p.map=se(L({},p.map),{__proto__:i.prototype})),u.push(p)}}if(f.nodes&&(f.nodes=d.nodes.map(m=>l(m,u))),f.source){let h=f.source,{inputId:m}=h,p=Ue(h,["inputId"]);f.source=p,m!=null&&(f.source.input=u[m])}if(f.type==="root")return new a(f);if(f.type==="decl")return new r(f);if(f.type==="rule")return new o(f);if(f.type==="comment")return new t(f);if(f.type==="atrule")return new e(f);throw new Error("Unknown node type: "+d.type)}return lr=l,l.default=l,lr}var ur,vi;function Jn(){if(vi)return ur;vi=1;let{dirname:e,relative:t,resolve:r,sep:s}=de,{SourceMapConsumer:i,SourceMapGenerator:a}=de,{pathToFileURL:o}=de,l=Ft(),d=!!(i&&a),u=!!(e&&r&&t&&s);class n{constructor(c,h,m,p){this.stringify=c,this.mapOpts=m.map||{},this.root=h,this.opts=m,this.css=p,this.originalCSS=p,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let c;this.isInline()?c="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?c=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?c=this.mapOpts.annotation(this.opts.to,this.root):c=this.outputFile()+".map";let h=`
34
+ `?(n=1,f+=1):n+=1;return{column:n,line:f}}prev(){if(!this.parent)return;let u=this.parent.index(this);return this.parent.nodes[u-1]}rangeBy(u){let n={column:this.source.start.column,line:this.source.start.line},f=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:n.column+1,line:n.line};if(u.word){let c="document"in this.source.input?this.source.input.document:this.source.input.css,m=c.slice(o(c,this.source.start),o(c,this.source.end)).indexOf(u.word);m!==-1&&(n=this.positionInside(m),f=this.positionInside(m+u.word.length))}else u.start?n={column:u.start.column,line:u.start.line}:u.index&&(n=this.positionInside(u.index)),u.end?f={column:u.end.column,line:u.end.line}:typeof u.endIndex=="number"?f=this.positionInside(u.endIndex):u.index&&(f=this.positionInside(u.index+1));return(f.line<n.line||f.line===n.line&&f.column<=n.column)&&(f={column:n.column+1,line:n.line}),{end:f,start:n}}raw(u,n){return new t().raw(this,u,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...u){if(this.parent){let n=this,f=!1;for(let c of u)c===this?f=!0:f?(this.parent.insertAfter(n,c),n=c):this.parent.insertBefore(n,c);f||this.remove()}return this}root(){let u=this;for(;u.parent&&u.parent.type!=="document";)u=u.parent;return u}toJSON(u,n){let f={},c=n==null;n=n||new Map;let h=0;for(let m in this){if(!Object.prototype.hasOwnProperty.call(this,m)||m==="parent"||m==="proxyCache")continue;let p=this[m];if(Array.isArray(p))f[m]=p.map(g=>typeof g=="object"&&g.toJSON?g.toJSON(null,n):g);else if(typeof p=="object"&&p.toJSON)f[m]=p.toJSON(null,n);else if(m==="source"){let g=n.get(p.input);g==null&&(g=h,n.set(p.input,h),h++),f[m]={end:p.end,inputId:g,start:p.start}}else f[m]=p}return c&&(f.inputs=[...n.keys()].map(m=>m.toJSON())),f}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(u=r){u.stringify&&(u=u.stringify);let n="";return u(this,f=>{n+=f}),n}warn(u,n,f){let c={node:this};for(let h in f)c[h]=f[h];return u.warn(n,c)}get proxyOf(){return this}}return Xt=l,l.default=l,Xt}var Qt,li;function nt(){if(li)return Qt;li=1;let e=kt();class t extends e{constructor(s){super(s),this.type="comment"}}return Qt=t,t.default=t,Qt}var Kt,ui;function Lt(){if(ui)return Kt;ui=1;let e=kt();class t extends e{constructor(s){s&&typeof s.value!="undefined"&&typeof s.value!="string"&&(s=se(L({},s),{value:String(s.value)})),super(s),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return Kt=t,t.default=t,Kt}var Zt,ci;function ke(){if(ci)return Zt;ci=1;let e=nt(),t=Lt(),r=kt(),{isClean:s,my:i}=ms(),a,o,l,d;function u(c){return c.map(h=>(h.nodes&&(h.nodes=u(h.nodes)),delete h.source,h))}function n(c){if(c[s]=!1,c.proxyOf.nodes)for(let h of c.proxyOf.nodes)n(h)}class f extends r{append(...h){for(let m of h){let p=this.normalize(m,this.last);for(let g of p)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(h){if(super.cleanRaws(h),this.nodes)for(let m of this.nodes)m.cleanRaws(h)}each(h){if(!this.proxyOf.nodes)return;let m=this.getIterator(),p,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(p=this.indexes[m],g=h(this.proxyOf.nodes[p],p),g!==!1);)this.indexes[m]+=1;return delete this.indexes[m],g}every(h){return this.nodes.every(h)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let h=this.lastEach;return this.indexes[h]=0,h}getProxyProcessor(){return{get(h,m){return m==="proxyOf"?h:h[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...p)=>h[m](...p.map(g=>typeof g=="function"?(w,y)=>g(w.toProxy(),y):g)):m==="every"||m==="some"?p=>h[m]((g,...w)=>p(g.toProxy(),...w)):m==="root"?()=>h.root().toProxy():m==="nodes"?h.nodes.map(p=>p.toProxy()):m==="first"||m==="last"?h[m].toProxy():h[m]:h[m]},set(h,m,p){return h[m]===p||(h[m]=p,(m==="name"||m==="params"||m==="selector")&&h.markDirty()),!0}}}index(h){return typeof h=="number"?h:(h.proxyOf&&(h=h.proxyOf),this.proxyOf.nodes.indexOf(h))}insertAfter(h,m){let p=this.index(h),g=this.normalize(m,this.proxyOf.nodes[p]).reverse();p=this.index(h);for(let y of g)this.proxyOf.nodes.splice(p+1,0,y);let w;for(let y in this.indexes)w=this.indexes[y],p<w&&(this.indexes[y]=w+g.length);return this.markDirty(),this}insertBefore(h,m){let p=this.index(h),g=p===0?"prepend":!1,w=this.normalize(m,this.proxyOf.nodes[p],g).reverse();p=this.index(h);for(let b of w)this.proxyOf.nodes.splice(p,0,b);let y;for(let b in this.indexes)y=this.indexes[b],p<=y&&(this.indexes[b]=y+w.length);return this.markDirty(),this}normalize(h,m){if(typeof h=="string")h=u(o(h).nodes);else if(typeof h=="undefined")h=[];else if(Array.isArray(h)){h=h.slice(0);for(let g of h)g.parent&&g.parent.removeChild(g,"ignore")}else if(h.type==="root"&&this.type!=="document"){h=h.nodes.slice(0);for(let g of h)g.parent&&g.parent.removeChild(g,"ignore")}else if(h.type)h=[h];else if(h.prop){if(typeof h.value=="undefined")throw new Error("Value field is missed in node creation");typeof h.value!="string"&&(h.value=String(h.value)),h=[new t(h)]}else if(h.selector||h.selectors)h=[new d(h)];else if(h.name)h=[new a(h)];else if(h.text)h=[new e(h)];else throw new Error("Unknown node type in node creation");return h.map(g=>(g[i]||f.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[s]&&n(g),g.raws||(g.raws={}),typeof g.raws.before=="undefined"&&m&&typeof m.raws.before!="undefined"&&(g.raws.before=m.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...h){h=h.reverse();for(let m of h){let p=this.normalize(m,this.first,"prepend").reverse();for(let g of p)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+p.length}return this.markDirty(),this}push(h){return h.parent=this,this.proxyOf.nodes.push(h),this}removeAll(){for(let h of this.proxyOf.nodes)h.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(h){h=this.index(h),this.proxyOf.nodes[h].parent=void 0,this.proxyOf.nodes.splice(h,1);let m;for(let p in this.indexes)m=this.indexes[p],m>=h&&(this.indexes[p]=m-1);return this.markDirty(),this}replaceValues(h,m,p){return p||(p=m,m={}),this.walkDecls(g=>{m.props&&!m.props.includes(g.prop)||m.fast&&!g.value.includes(m.fast)||(g.value=g.value.replace(h,p))}),this.markDirty(),this}some(h){return this.nodes.some(h)}walk(h){return this.each((m,p)=>{let g;try{g=h(m,p)}catch(w){throw m.addToError(w)}return g!==!1&&m.walk&&(g=m.walk(h)),g})}walkAtRules(h,m){return m?h instanceof RegExp?this.walk((p,g)=>{if(p.type==="atrule"&&h.test(p.name))return m(p,g)}):this.walk((p,g)=>{if(p.type==="atrule"&&p.name===h)return m(p,g)}):(m=h,this.walk((p,g)=>{if(p.type==="atrule")return m(p,g)}))}walkComments(h){return this.walk((m,p)=>{if(m.type==="comment")return h(m,p)})}walkDecls(h,m){return m?h instanceof RegExp?this.walk((p,g)=>{if(p.type==="decl"&&h.test(p.prop))return m(p,g)}):this.walk((p,g)=>{if(p.type==="decl"&&p.prop===h)return m(p,g)}):(m=h,this.walk((p,g)=>{if(p.type==="decl")return m(p,g)}))}walkRules(h,m){return m?h instanceof RegExp?this.walk((p,g)=>{if(p.type==="rule"&&h.test(p.selector))return m(p,g)}):this.walk((p,g)=>{if(p.type==="rule"&&p.selector===h)return m(p,g)}):(m=h,this.walk((p,g)=>{if(p.type==="rule")return m(p,g)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return f.registerParse=c=>{o=c},f.registerRule=c=>{d=c},f.registerAtRule=c=>{a=c},f.registerRoot=c=>{l=c},Zt=f,f.default=f,f.rebuild=c=>{c.type==="atrule"?Object.setPrototypeOf(c,a.prototype):c.type==="rule"?Object.setPrototypeOf(c,d.prototype):c.type==="decl"?Object.setPrototypeOf(c,t.prototype):c.type==="comment"?Object.setPrototypeOf(c,e.prototype):c.type==="root"&&Object.setPrototypeOf(c,l.prototype),c[i]=!0,c.nodes&&c.nodes.forEach(h=>{f.rebuild(h)})},Zt}var er,hi;function gs(){if(hi)return er;hi=1;let e=ke();class t extends e{constructor(s){super(s),this.type="atrule"}append(...s){return this.proxyOf.nodes||(this.nodes=[]),super.append(...s)}prepend(...s){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...s)}}return er=t,t.default=t,e.registerAtRule(t),er}var tr,fi;function ys(){if(fi)return tr;fi=1;let e=ke(),t,r;class s extends e{constructor(a){super(L({type:"document"},a)),this.nodes||(this.nodes=[])}toResult(a={}){return new t(new r,this,a).stringify()}}return s.registerLazyResult=i=>{t=i},s.registerProcessor=i=>{r=i},tr=s,s.default=s,tr}var rr,di;function Ga(){if(di)return rr;di=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return rr={nanoid:(s=21)=>{let i="",a=s|0;for(;a--;)i+=e[Math.random()*64|0];return i},customAlphabet:(s,i=21)=>(a=i)=>{let o="",l=a|0;for(;l--;)o+=s[Math.random()*s.length|0];return o}},rr}var sr,pi;function Gn(){if(pi)return sr;pi=1;let{existsSync:e,readFileSync:t}=de,{dirname:r,join:s}=de,{SourceMapConsumer:i,SourceMapGenerator:a}=de;function o(d){return Buffer?Buffer.from(d,"base64").toString():window.atob(d)}class l{constructor(u,n){if(n.map===!1)return;this.loadAnnotation(u),this.inline=this.startWith(this.annotation,"data:");let f=n.map?n.map.prev:void 0,c=this.loadMap(n.from,f);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=r(this.mapFile)),c&&(this.text=c)}consumer(){return this.consumerCache||(this.consumerCache=new i(this.text)),this.consumerCache}decodeInline(u){let n=/^data:application\/json;charset=utf-?8;base64,/,f=/^data:application\/json;base64,/,c=/^data:application\/json;charset=utf-?8,/,h=/^data:application\/json,/,m=u.match(c)||u.match(h);if(m)return decodeURIComponent(u.substr(m[0].length));let p=u.match(n)||u.match(f);if(p)return o(u.substr(p[0].length));let g=u.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+g)}getAnnotationURL(u){return u.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(u){return typeof u!="object"?!1:typeof u.mappings=="string"||typeof u._mappings=="string"||Array.isArray(u.sections)}loadAnnotation(u){let n=u.match(/\/\*\s*# sourceMappingURL=/g);if(!n)return;let f=u.lastIndexOf(n.pop()),c=u.indexOf("*/",f);f>-1&&c>-1&&(this.annotation=this.getAnnotationURL(u.substring(f,c)))}loadFile(u){if(this.root=r(u),e(u))return this.mapFile=u,t(u,"utf-8").toString().trim()}loadMap(u,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let f=n(u);if(f){let c=this.loadFile(f);if(!c)throw new Error("Unable to load previous source map: "+f.toString());return c}}else{if(n instanceof i)return a.fromSourceMap(n).toString();if(n instanceof a)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let f=this.annotation;return u&&(f=s(r(u),f)),this.loadFile(f)}}}startWith(u,n){return u?u.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return sr=l,l.default=l,sr}var ir,mi;function Ft(){if(mi)return ir;mi=1;let{nanoid:e}=Ga(),{isAbsolute:t,resolve:r}=de,{SourceMapConsumer:s,SourceMapGenerator:i}=de,{fileURLToPath:a,pathToFileURL:o}=de,l=ps(),d=Gn(),u=de,n=Symbol("fromOffsetCache"),f=!!(s&&i),c=!!(r&&t);class h{constructor(p,g={}){if(p===null||typeof p=="undefined"||typeof p=="object"&&!p.toString)throw new Error(`PostCSS received ${p} instead of CSS string`);if(this.css=p.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,g.document&&(this.document=g.document.toString()),g.from&&(!c||/^\w+:\/\//.test(g.from)||t(g.from)?this.file=g.from:this.file=r(g.from)),c&&f){let w=new d(this.css,g);if(w.text){this.map=w;let y=w.consumer().file;!this.file&&y&&(this.file=this.mapResolve(y))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(p,g,w,y={}){let b,C,v;if(g&&typeof g=="object"){let E=g,R=w;if(typeof E.offset=="number"){let I=this.fromOffset(E.offset);g=I.line,w=I.col}else g=E.line,w=E.column;if(typeof R.offset=="number"){let I=this.fromOffset(R.offset);C=I.line,b=I.col}else C=R.line,b=R.column}else if(!w){let E=this.fromOffset(g);g=E.line,w=E.col}let S=this.origin(g,w,C,b);return S?v=new l(p,S.endLine===void 0?S.line:{column:S.column,line:S.line},S.endLine===void 0?S.column:{column:S.endColumn,line:S.endLine},S.source,S.file,y.plugin):v=new l(p,C===void 0?g:{column:w,line:g},C===void 0?w:{column:b,line:C},this.css,this.file,y.plugin),v.input={column:w,endColumn:b,endLine:C,line:g,source:this.css},this.file&&(o&&(v.input.url=o(this.file).toString()),v.input.file=this.file),v}fromOffset(p){let g,w;if(this[n])w=this[n];else{let b=this.css.split(`
35
+ `);w=new Array(b.length);let C=0;for(let v=0,S=b.length;v<S;v++)w[v]=C,C+=b[v].length+1;this[n]=w}g=w[w.length-1];let y=0;if(p>=g)y=w.length-1;else{let b=w.length-2,C;for(;y<b;)if(C=y+(b-y>>1),p<w[C])b=C-1;else if(p>=w[C+1])y=C+1;else{y=C;break}}return{col:p-w[y]+1,line:y+1}}mapResolve(p){return/^\w+:\/\//.test(p)?p:r(this.map.consumer().sourceRoot||this.map.root||".",p)}origin(p,g,w,y){if(!this.map)return!1;let b=this.map.consumer(),C=b.originalPositionFor({column:g,line:p});if(!C.source)return!1;let v;typeof w=="number"&&(v=b.originalPositionFor({column:y,line:w}));let S;t(C.source)?S=o(C.source):S=new URL(C.source,this.map.consumer().sourceRoot||o(this.map.mapFile));let E={column:C.column,endColumn:v&&v.column,endLine:v&&v.line,line:C.line,url:S.toString()};if(S.protocol==="file:")if(a)E.file=a(S);else throw new Error("file: protocol is not available in this PostCSS build");let R=b.sourceContentFor(C.source);return R&&(E.source=R),E}toJSON(){let p={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(p[g]=this[g]);return this.map&&(p.map=L({},this.map),p.map.consumerCache&&(p.map.consumerCache=void 0)),p}get from(){return this.file||this.id}}return ir=h,h.default=h,u&&u.registerInput&&u.registerInput(h),ir}var nr,gi;function ot(){if(gi)return nr;gi=1;let e=ke(),t,r;class s extends e{constructor(a){super(a),this.type="root",this.nodes||(this.nodes=[])}normalize(a,o,l){let d=super.normalize(a);if(o){if(l==="prepend")this.nodes.length>1?o.raws.before=this.nodes[1].raws.before:delete o.raws.before;else if(this.first!==o)for(let u of d)u.raws.before=o.raws.before}return d}removeChild(a,o){let l=this.index(a);return!o&&l===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[l].raws.before),super.removeChild(a)}toResult(a={}){return new t(new r,this,a).stringify()}}return s.registerLazyResult=i=>{t=i},s.registerProcessor=i=>{r=i},nr=s,s.default=s,e.registerRoot(s),nr}var or,yi;function Hn(){if(yi)return or;yi=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let r=[" ",`
36
+ `," "];return e.split(t,r)},split(t,r,s){let i=[],a="",o=!1,l=0,d=!1,u="",n=!1;for(let f of t)n?n=!1:f==="\\"?n=!0:d?f===u&&(d=!1):f==='"'||f==="'"?(d=!0,u=f):f==="("?l+=1:f===")"?l>0&&(l-=1):l===0&&r.includes(f)&&(o=!0),o?(a!==""&&i.push(a.trim()),a="",o=!1):a+=f;return(s||a!=="")&&i.push(a.trim()),i}};return or=e,e.default=e,or}var ar,wi;function ws(){if(wi)return ar;wi=1;let e=ke(),t=Hn();class r extends e{constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(i){let a=this.selector?this.selector.match(/,\s*/):null,o=a?a[0]:","+this.raw("between","beforeOpen");this.selector=i.join(o)}}return ar=r,r.default=r,e.registerRule(r),ar}var lr,bi;function Ha(){if(bi)return lr;bi=1;let e=gs(),t=nt(),r=Lt(),s=Ft(),i=Gn(),a=ot(),o=ws();function l(d,u){if(Array.isArray(d))return d.map(m=>l(m));let c=d,{inputs:n}=c,f=Ue(c,["inputs"]);if(n){u=[];for(let m of n){let p=se(L({},m),{__proto__:s.prototype});p.map&&(p.map=se(L({},p.map),{__proto__:i.prototype})),u.push(p)}}if(f.nodes&&(f.nodes=d.nodes.map(m=>l(m,u))),f.source){let h=f.source,{inputId:m}=h,p=Ue(h,["inputId"]);f.source=p,m!=null&&(f.source.input=u[m])}if(f.type==="root")return new a(f);if(f.type==="decl")return new r(f);if(f.type==="rule")return new o(f);if(f.type==="comment")return new t(f);if(f.type==="atrule")return new e(f);throw new Error("Unknown node type: "+d.type)}return lr=l,l.default=l,lr}var ur,vi;function Yn(){if(vi)return ur;vi=1;let{dirname:e,relative:t,resolve:r,sep:s}=de,{SourceMapConsumer:i,SourceMapGenerator:a}=de,{pathToFileURL:o}=de,l=Ft(),d=!!(i&&a),u=!!(e&&r&&t&&s);class n{constructor(c,h,m,p){this.stringify=c,this.mapOpts=m.map||{},this.root=h,this.opts=m,this.css=p,this.originalCSS=p,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let c;this.isInline()?c="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?c=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?c=this.mapOpts.annotation(this.opts.to,this.root):c=this.outputFile()+".map";let h=`
37
37
  `;this.css.includes(`\r
38
38
  `)&&(h=`\r
39
39
  `),this.css+=h+"/*# sourceMappingURL="+c+" */"}applyPrevMaps(){for(let c of this.previous()){let h=this.toUrl(this.path(c.file)),m=c.root||e(c.file),p;this.mapOpts.sourcesContent===!1?(p=new i(c.text),p.sourcesContent&&(p.sourcesContent=null)):p=c.consumer(),this.map.applySourceMap(p,h,this.toUrl(this.path(m)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let c;for(let h=this.root.nodes.length-1;h>=0;h--)c=this.root.nodes[h],c.type==="comment"&&c.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(h)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),u&&d&&this.isMap())return this.generateMap();{let c="";return this.stringify(this.root,h=>{c+=h}),[c]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let c=this.previous()[0].consumer();c.file=this.outputFile(),this.map=a.fromSourceMap(c,{ignoreInvalidMapping:!0})}else this.map=new a({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 a({file:this.outputFile(),ignoreInvalidMapping:!0});let c=1,h=1,m="<no source>",p={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,w;this.stringify(this.root,(y,b,C)=>{if(this.css+=y,b&&C!=="end"&&(p.generated.line=c,p.generated.column=h-1,b.source&&b.source.start?(p.source=this.sourcePath(b),p.original.line=b.source.start.line,p.original.column=b.source.start.column-1,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,this.map.addMapping(p))),w=y.match(/\n/g),w?(c+=w.length,g=y.lastIndexOf(`
40
- `),h=y.length-g):h+=y.length,b&&C!=="start"){let v=b.parent||{raws:{}};(!(b.type==="decl"||b.type==="atrule"&&!b.nodes)||b!==v.last||v.raws.semicolon)&&(b.source&&b.source.end?(p.source=this.sourcePath(b),p.original.line=b.source.end.line,p.original.column=b.source.end.column-1,p.generated.line=c,p.generated.column=h-2,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,p.generated.line=c,p.generated.column=h-1,this.map.addMapping(p)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(c=>c.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let c=this.mapOpts.annotation;return typeof c!="undefined"&&c!==!0?!1:this.previous().length?this.previous().some(h=>h.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(c=>c.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(c){if(this.mapOpts.absolute||c.charCodeAt(0)===60||/^\w+:\/\//.test(c))return c;let h=this.memoizedPaths.get(c);if(h)return h;let m=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=e(r(m,this.mapOpts.annotation)));let p=t(m,c);return this.memoizedPaths.set(c,p),p}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(c=>{if(c.source&&c.source.input.map){let h=c.source.input.map;this.previousMaps.includes(h)||this.previousMaps.push(h)}});else{let c=new l(this.originalCSS,this.opts);c.map&&this.previousMaps.push(c.map)}return this.previousMaps}setSourcesContent(){let c={};if(this.root)this.root.walk(h=>{if(h.source){let m=h.source.input.from;if(m&&!c[m]){c[m]=!0;let p=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(p,h.source.input.css)}}});else if(this.css){let h=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(h,this.css)}}sourcePath(c){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(c.source.input.from):this.toUrl(this.path(c.source.input.from))}toBase64(c){return Buffer?Buffer.from(c).toString("base64"):window.btoa(unescape(encodeURIComponent(c)))}toFileUrl(c){let h=this.memoizedFileURLs.get(c);if(h)return h;if(o){let m=o(c).toString();return this.memoizedFileURLs.set(c,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(c){let h=this.memoizedURLs.get(c);if(h)return h;s==="\\"&&(c=c.replace(/\\/g,"/"));let m=encodeURI(c).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(c,m),m}}return ur=n,ur}var cr,Si;function Xn(){if(Si)return cr;Si=1;const e=39,t=34,r=92,s=47,i=10,a=32,o=12,l=9,d=13,u=91,n=93,f=40,c=41,h=123,m=125,p=59,g=42,w=58,y=64,b=/[\t\n\f\r "#'()/;[\\\]{}]/g,C=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,v=/.[\r\n"'(/\\]/,S=/[\da-f]/i;return cr=function(R,I={}){let O=R.css.valueOf(),F=I.ignoreErrors,D,re,ie,x,Z,P,V,ee,X,be,Ee=O.length,N=0,ge=[],ce=[];function Qe(){return N}function le(k){throw R.error("Unclosed "+k,N)}function he(){return ce.length===0&&N>=Ee}function _e(k){if(ce.length)return ce.pop();if(N>=Ee)return;let te=k?k.ignoreUnclosed:!1;switch(D=O.charCodeAt(N),D){case i:case a:case l:case d:case o:{x=N;do x+=1,D=O.charCodeAt(x);while(D===a||D===i||D===l||D===d||D===o);P=["space",O.slice(N,x)],N=x-1;break}case u:case n:case h:case m:case w:case p:case c:{let j=String.fromCharCode(D);P=[j,j,N];break}case f:{if(be=ge.length?ge.pop()[1]:"",X=O.charCodeAt(N+1),be==="url"&&X!==e&&X!==t&&X!==a&&X!==i&&X!==l&&X!==o&&X!==d){x=N;do{if(V=!1,x=O.indexOf(")",x+1),x===-1)if(F||te){x=N;break}else le("bracket");for(ee=x;O.charCodeAt(ee-1)===r;)ee-=1,V=!V}while(V);P=["brackets",O.slice(N,x+1),N,x],N=x}else x=O.indexOf(")",N+1),re=O.slice(N,x+1),x===-1||v.test(re)?P=["(","(",N]:(P=["brackets",re,N,x],N=x);break}case e:case t:{Z=D===e?"'":'"',x=N;do{if(V=!1,x=O.indexOf(Z,x+1),x===-1)if(F||te){x=N+1;break}else le("string");for(ee=x;O.charCodeAt(ee-1)===r;)ee-=1,V=!V}while(V);P=["string",O.slice(N,x+1),N,x],N=x;break}case y:{b.lastIndex=N+1,b.test(O),b.lastIndex===0?x=O.length-1:x=b.lastIndex-2,P=["at-word",O.slice(N,x+1),N,x],N=x;break}case r:{for(x=N,ie=!0;O.charCodeAt(x+1)===r;)x+=1,ie=!ie;if(D=O.charCodeAt(x+1),ie&&D!==s&&D!==a&&D!==i&&D!==l&&D!==d&&D!==o&&(x+=1,S.test(O.charAt(x)))){for(;S.test(O.charAt(x+1));)x+=1;O.charCodeAt(x+1)===a&&(x+=1)}P=["word",O.slice(N,x+1),N,x],N=x;break}default:{D===s&&O.charCodeAt(N+1)===g?(x=O.indexOf("*/",N+2)+1,x===0&&(F||te?x=O.length:le("comment")),P=["comment",O.slice(N,x+1),N,x],N=x):(C.lastIndex=N+1,C.test(O),C.lastIndex===0?x=O.length-1:x=C.lastIndex-2,P=["word",O.slice(N,x+1),N,x],ge.push(P),N=x);break}}return N++,P}function Re(k){ce.push(k)}return{back:Re,endOfFile:he,nextToken:_e,position:Qe}},cr}var hr,Ci;function Qn(){if(Ci)return hr;Ci=1;let e=gs(),t=nt(),r=Lt(),s=ot(),i=ws(),a=Xn();const o={empty:!0,space:!0};function l(u){for(let n=u.length-1;n>=0;n--){let f=u[n],c=f[3]||f[2];if(c)return c}}class d{constructor(n){this.input=n,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:n,start:{column:1,line:1,offset:0}}}atrule(n){let f=new e;f.name=n[1].slice(1),f.name===""&&this.unnamedAtrule(f,n),this.init(f,n[2]);let c,h,m,p=!1,g=!1,w=[],y=[];for(;!this.tokenizer.endOfFile();){if(n=this.tokenizer.nextToken(),c=n[0],c==="("||c==="["?y.push(c==="("?")":"]"):c==="{"&&y.length>0?y.push("}"):c===y[y.length-1]&&y.pop(),y.length===0)if(c===";"){f.source.end=this.getPosition(n[2]),f.source.end.offset++,this.semicolon=!0;break}else if(c==="{"){g=!0;break}else if(c==="}"){if(w.length>0){for(m=w.length-1,h=w[m];h&&h[0]==="space";)h=w[--m];h&&(f.source.end=this.getPosition(h[3]||h[2]),f.source.end.offset++)}this.end(n);break}else w.push(n);else w.push(n);if(this.tokenizer.endOfFile()){p=!0;break}}f.raws.between=this.spacesAndCommentsFromEnd(w),w.length?(f.raws.afterName=this.spacesAndCommentsFromStart(w),this.raw(f,"params",w),p&&(n=w[w.length-1],f.source.end=this.getPosition(n[3]||n[2]),f.source.end.offset++,this.spaces=f.raws.between,f.raws.between="")):(f.raws.afterName="",f.params=""),g&&(f.nodes=[],this.current=f)}checkMissedSemicolon(n){let f=this.colon(n);if(f===!1)return;let c=0,h;for(let m=f-1;m>=0&&(h=n[m],!(h[0]!=="space"&&(c+=1,c===2)));m--);throw this.input.error("Missed semicolon",h[0]==="word"?h[3]+1:h[2])}colon(n){let f=0,c,h,m;for(let[p,g]of n.entries()){if(h=g,m=h[0],m==="("&&(f+=1),m===")"&&(f-=1),f===0&&m===":")if(!c)this.doubleColon(h);else{if(c[0]==="word"&&c[1]==="progid")continue;return p}c=h}return!1}comment(n){let f=new t;this.init(f,n[2]),f.source.end=this.getPosition(n[3]||n[2]),f.source.end.offset++;let c=n[1].slice(2,-2);if(/^\s*$/.test(c))f.text="",f.raws.left=c,f.raws.right="";else{let h=c.match(/^(\s*)([^]*\S)(\s*)$/);f.text=h[2],f.raws.left=h[1],f.raws.right=h[3]}}createTokenizer(){this.tokenizer=a(this.input)}decl(n,f){let c=new r;this.init(c,n[0][2]);let h=n[n.length-1];for(h[0]===";"&&(this.semicolon=!0,n.pop()),c.source.end=this.getPosition(h[3]||h[2]||l(n)),c.source.end.offset++;n[0][0]!=="word";)n.length===1&&this.unknownWord(n),c.raws.before+=n.shift()[1];for(c.source.start=this.getPosition(n[0][2]),c.prop="";n.length;){let y=n[0][0];if(y===":"||y==="space"||y==="comment")break;c.prop+=n.shift()[1]}c.raws.between="";let m;for(;n.length;)if(m=n.shift(),m[0]===":"){c.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),c.raws.between+=m[1];(c.prop[0]==="_"||c.prop[0]==="*")&&(c.raws.before+=c.prop[0],c.prop=c.prop.slice(1));let p=[],g;for(;n.length&&(g=n[0][0],!(g!=="space"&&g!=="comment"));)p.push(n.shift());this.precheckMissedSemicolon(n);for(let y=n.length-1;y>=0;y--){if(m=n[y],m[1].toLowerCase()==="!important"){c.important=!0;let b=this.stringFrom(n,y);b=this.spacesFromEnd(n)+b,b!==" !important"&&(c.raws.important=b);break}else if(m[1].toLowerCase()==="important"){let b=n.slice(0),C="";for(let v=y;v>0;v--){let S=b[v][0];if(C.trim().startsWith("!")&&S!=="space")break;C=b.pop()[1]+C}C.trim().startsWith("!")&&(c.important=!0,c.raws.important=C,n=b)}if(m[0]!=="space"&&m[0]!=="comment")break}n.some(y=>y[0]!=="space"&&y[0]!=="comment")&&(c.raws.between+=p.map(y=>y[1]).join(""),p=[]),this.raw(c,"value",p.concat(n),f),c.value.includes(":")&&!f&&this.checkMissedSemicolon(n)}doubleColon(n){throw this.input.error("Double colon",{offset:n[2]},{offset:n[2]+n[1].length})}emptyRule(n){let f=new i;this.init(f,n[2]),f.selector="",f.raws.between="",this.current=f}end(n){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(n[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(n)}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(n){if(this.spaces+=n[1],this.current.nodes){let f=this.current.nodes[this.current.nodes.length-1];f&&f.type==="rule"&&!f.raws.ownSemicolon&&(f.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(n){let f=this.input.fromOffset(n);return{column:f.col,line:f.line,offset:n}}init(n,f){this.current.push(n),n.source={input:this.input,start:this.getPosition(f)},n.raws.before=this.spaces,this.spaces="",n.type!=="comment"&&(this.semicolon=!1)}other(n){let f=!1,c=null,h=!1,m=null,p=[],g=n[1].startsWith("--"),w=[],y=n;for(;y;){if(c=y[0],w.push(y),c==="("||c==="[")m||(m=y),p.push(c==="("?")":"]");else if(g&&h&&c==="{")m||(m=y),p.push("}");else if(p.length===0)if(c===";")if(h){this.decl(w,g);return}else break;else if(c==="{"){this.rule(w);return}else if(c==="}"){this.tokenizer.back(w.pop()),f=!0;break}else c===":"&&(h=!0);else c===p[p.length-1]&&(p.pop(),p.length===0&&(m=null));y=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(f=!0),p.length>0&&this.unclosedBracket(m),f&&h){if(!g)for(;w.length&&(y=w[w.length-1][0],!(y!=="space"&&y!=="comment"));)this.tokenizer.back(w.pop());this.decl(w,g)}else this.unknownWord(w)}parse(){let n;for(;!this.tokenizer.endOfFile();)switch(n=this.tokenizer.nextToken(),n[0]){case"space":this.spaces+=n[1];break;case";":this.freeSemicolon(n);break;case"}":this.end(n);break;case"comment":this.comment(n);break;case"at-word":this.atrule(n);break;case"{":this.emptyRule(n);break;default:this.other(n);break}this.endFile()}precheckMissedSemicolon(){}raw(n,f,c,h){let m,p,g=c.length,w="",y=!0,b,C;for(let v=0;v<g;v+=1)m=c[v],p=m[0],p==="space"&&v===g-1&&!h?y=!1:p==="comment"?(C=c[v-1]?c[v-1][0]:"empty",b=c[v+1]?c[v+1][0]:"empty",!o[C]&&!o[b]?w.slice(-1)===","?y=!1:w+=m[1]:y=!1):w+=m[1];if(!y){let v=c.reduce((S,E)=>S+E[1],"");n.raws[f]={raw:v,value:w}}n[f]=w}rule(n){n.pop();let f=new i;this.init(f,n[0][2]),f.raws.between=this.spacesAndCommentsFromEnd(n),this.raw(f,"selector",n),this.current=f}spacesAndCommentsFromEnd(n){let f,c="";for(;n.length&&(f=n[n.length-1][0],!(f!=="space"&&f!=="comment"));)c=n.pop()[1]+c;return c}spacesAndCommentsFromStart(n){let f,c="";for(;n.length&&(f=n[0][0],!(f!=="space"&&f!=="comment"));)c+=n.shift()[1];return c}spacesFromEnd(n){let f,c="";for(;n.length&&(f=n[n.length-1][0],f==="space");)c=n.pop()[1]+c;return c}stringFrom(n,f){let c="";for(let h=f;h<n.length;h++)c+=n[h][1];return n.splice(f,n.length-f),c}unclosedBlock(){let n=this.current.source.start;throw this.input.error("Unclosed block",n.line,n.column)}unclosedBracket(n){throw this.input.error("Unclosed bracket",{offset:n[2]},{offset:n[2]+1})}unexpectedClose(n){throw this.input.error("Unexpected }",{offset:n[2]},{offset:n[2]+1})}unknownWord(n){throw this.input.error("Unknown word",{offset:n[0][2]},{offset:n[0][2]+n[0][1].length})}unnamedAtrule(n,f){throw this.input.error("At-rule without name",{offset:f[2]},{offset:f[2]+f[1].length})}}return hr=d,hr}var fr,Ei;function bs(){if(Ei)return fr;Ei=1;let e=ke(),t=Ft(),r=Qn();function s(i,a){let o=new t(i,a),l=new r(o);try{l.parse()}catch(d){throw d}return l.root}return fr=s,s.default=s,e.registerParse(s),fr}var dr,Ri;function Kn(){if(Ri)return dr;Ri=1;class e{constructor(r,s={}){if(this.type="warning",this.text=r,s.node&&s.node.source){let i=s.node.rangeBy(s);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in s)this[i]=s[i]}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}}return dr=e,e.default=e,dr}var pr,xi;function vs(){if(xi)return pr;xi=1;let e=Kn();class t{constructor(s,i,a){this.processor=s,this.messages=[],this.root=i,this.opts=a,this.css=void 0,this.map=void 0}toString(){return this.css}warn(s,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let a=new e(s,i);return this.messages.push(a),a}warnings(){return this.messages.filter(s=>s.type==="warning")}get content(){return this.css}}return pr=t,t.default=t,pr}var mr,Mi;function Zn(){if(Mi)return mr;Mi=1;let e={};return mr=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},mr}var gr,Oi;function eo(){if(Oi)return gr;Oi=1;let e=ke(),t=ys(),r=Jn(),s=bs(),i=vs(),a=ot(),o=Pt(),{isClean:l,my:d}=ms(),u=Zn();const n={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},f={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},c={Once:!0,postcssPlugin:!0,prepare:!0},h=0;function m(C){return typeof C=="object"&&typeof C.then=="function"}function p(C){let v=!1,S=n[C.type];return C.type==="decl"?v=C.prop.toLowerCase():C.type==="atrule"&&(v=C.name.toLowerCase()),v&&C.append?[S,S+"-"+v,h,S+"Exit",S+"Exit-"+v]:v?[S,S+"-"+v,S+"Exit",S+"Exit-"+v]:C.append?[S,h,S+"Exit"]:[S,S+"Exit"]}function g(C){let v;return C.type==="document"?v=["Document",h,"DocumentExit"]:C.type==="root"?v=["Root",h,"RootExit"]:v=p(C),{eventIndex:0,events:v,iterator:0,node:C,visitorIndex:0,visitors:[]}}function w(C){return C[l]=!1,C.nodes&&C.nodes.forEach(v=>w(v)),C}let y={};class b{constructor(v,S,E){this.stringified=!1,this.processed=!1;let R;if(typeof S=="object"&&S!==null&&(S.type==="root"||S.type==="document"))R=w(S);else if(S instanceof b||S instanceof i)R=w(S.root),S.map&&(typeof E.map=="undefined"&&(E.map={}),E.map.inline||(E.map.inline=!1),E.map.prev=S.map);else{let I=s;E.syntax&&(I=E.syntax.parse),E.parser&&(I=E.parser),I.parse&&(I=I.parse);try{R=I(S,E)}catch(O){this.processed=!0,this.error=O}R&&!R[d]&&e.rebuild(R)}this.result=new i(v,R,E),this.helpers=se(L({},y),{postcss:y,result:this.result}),this.plugins=this.processor.plugins.map(I=>typeof I=="object"&&I.prepare?L(L({},I),I.prepare(this.result)):I)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(v){return this.async().catch(v)}finally(v){return this.async().then(v,v)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(v,S){let E=this.result.lastPlugin;try{S&&S.addToError(v),this.error=v,v.name==="CssSyntaxError"&&!v.plugin?(v.plugin=E.postcssPlugin,v.setMessage()):E.postcssVersion}catch(R){console&&console.error&&console.error(R)}return v}prepareVisitors(){this.listeners={};let v=(S,E,R)=>{this.listeners[E]||(this.listeners[E]=[]),this.listeners[E].push([S,R])};for(let S of this.plugins)if(typeof S=="object")for(let E in S){if(!f[E]&&/^[A-Z]/.test(E))throw new Error(`Unknown event ${E} in ${S.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!c[E])if(typeof S[E]=="object")for(let R in S[E])R==="*"?v(S,E,S[E][R]):v(S,E+"-"+R.toLowerCase(),S[E][R]);else typeof S[E]=="function"&&v(S,E,S[E])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let v=0;v<this.plugins.length;v++){let S=this.plugins[v],E=this.runOnRoot(S);if(m(E))try{await E}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let v=this.result.root;for(;!v[l];){v[l]=!0;let S=[g(v)];for(;S.length>0;){let E=this.visitTick(S);if(m(E))try{await E}catch(R){let I=S[S.length-1].node;throw this.handleError(R,I)}}}if(this.listeners.OnceExit)for(let[S,E]of this.listeners.OnceExit){this.result.lastPlugin=S;try{if(v.type==="document"){let R=v.nodes.map(I=>E(I,this.helpers));await Promise.all(R)}else await E(v,this.helpers)}catch(R){throw this.handleError(R)}}}return this.processed=!0,this.stringify()}runOnRoot(v){this.result.lastPlugin=v;try{if(typeof v=="object"&&v.Once){if(this.result.root.type==="document"){let S=this.result.root.nodes.map(E=>v.Once(E,this.helpers));return m(S[0])?Promise.all(S):S}return v.Once(this.result.root,this.helpers)}else if(typeof v=="function")return v(this.result.root,this.result)}catch(S){throw this.handleError(S)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let v=this.result.opts,S=o;v.syntax&&(S=v.syntax.stringify),v.stringifier&&(S=v.stringifier),S.stringify&&(S=S.stringify);let R=new r(S,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let v of this.plugins){let S=this.runOnRoot(v);if(m(S))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let v=this.result.root;for(;!v[l];)v[l]=!0,this.walkSync(v);if(this.listeners.OnceExit)if(v.type==="document")for(let S of v.nodes)this.visitSync(this.listeners.OnceExit,S);else this.visitSync(this.listeners.OnceExit,v)}return this.result}then(v,S){return this.async().then(v,S)}toString(){return this.css}visitSync(v,S){for(let[E,R]of v){this.result.lastPlugin=E;let I;try{I=R(S,this.helpers)}catch(O){throw this.handleError(O,S.proxyOf)}if(S.type!=="root"&&S.type!=="document"&&!S.parent)return!0;if(m(I))throw this.getAsyncError()}}visitTick(v){let S=v[v.length-1],{node:E,visitors:R}=S;if(E.type!=="root"&&E.type!=="document"&&!E.parent){v.pop();return}if(R.length>0&&S.visitorIndex<R.length){let[O,F]=R[S.visitorIndex];S.visitorIndex+=1,S.visitorIndex===R.length&&(S.visitors=[],S.visitorIndex=0),this.result.lastPlugin=O;try{return F(E.toProxy(),this.helpers)}catch(D){throw this.handleError(D,E)}}if(S.iterator!==0){let O=S.iterator,F;for(;F=E.nodes[E.indexes[O]];)if(E.indexes[O]+=1,!F[l]){F[l]=!0,v.push(g(F));return}S.iterator=0,delete E.indexes[O]}let I=S.events;for(;S.eventIndex<I.length;){let O=I[S.eventIndex];if(S.eventIndex+=1,O===h){E.nodes&&E.nodes.length&&(E[l]=!0,S.iterator=E.getIterator());return}else if(this.listeners[O]){S.visitors=this.listeners[O];return}}v.pop()}walkSync(v){v[l]=!0;let S=p(v);for(let E of S)if(E===h)v.nodes&&v.each(R=>{R[l]||this.walkSync(R)});else{let R=this.listeners[E];if(R&&this.visitSync(R,v.toProxy()))return}}warnings(){return this.sync().warnings()}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"}}return b.registerPostcss=C=>{y=C},gr=b,b.default=b,a.registerLazyResult(b),t.registerLazyResult(b),gr}var yr,Ni;function Ya(){if(Ni)return yr;Ni=1;let e=Jn(),t=bs();const r=vs();let s=Pt(),i=Zn();class a{constructor(l,d,u){d=d.toString(),this.stringified=!1,this._processor=l,this._css=d,this._opts=u,this._map=void 0;let n,f=s;this.result=new r(this._processor,n,this._opts),this.result.css=d;let c=this;Object.defineProperty(this.result,"root",{get(){return c.root}});let h=new e(f,n,this._opts,d);if(h.isMap()){let[m,p]=h.generate();m&&(this.result.css=m),p&&(this.result.map=p)}else h.clearAnnotation(),this.result.css=h.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(l){return this.async().catch(l)}finally(l){return this.async().then(l,l)}sync(){if(this.error)throw this.error;return this.result}then(l,d){return this.async().then(l,d)}toString(){return this._css}warnings(){return[]}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 l,d=t;try{l=d(this._css,this._opts)}catch(u){this.error=u}if(this.error)throw this.error;return this._root=l,l}get[Symbol.toStringTag](){return"NoWorkResult"}}return yr=a,a.default=a,yr}var wr,Ii;function Ja(){if(Ii)return wr;Ii=1;let e=ys(),t=eo(),r=Ya(),s=ot();class i{constructor(o=[]){this.version="8.5.1",this.plugins=this.normalize(o)}normalize(o){let l=[];for(let d of o)if(d.postcss===!0?d=d():d.postcss&&(d=d.postcss),typeof d=="object"&&Array.isArray(d.plugins))l=l.concat(d.plugins);else if(typeof d=="object"&&d.postcssPlugin)l.push(d);else if(typeof d=="function")l.push(d);else if(!(typeof d=="object"&&(d.parse||d.stringify)))throw new Error(d+" is not a PostCSS plugin");return l}process(o,l={}){return!this.plugins.length&&!l.parser&&!l.stringifier&&!l.syntax?new r(this,o,l):new t(this,o,l)}use(o){return this.plugins=this.plugins.concat(this.normalize([o])),this}}return wr=i,i.default=i,s.registerProcessor(i),e.registerProcessor(i),wr}var br,Di;function to(){if(Di)return br;Di=1;let e=gs(),t=nt(),r=ke(),s=ps(),i=Lt(),a=ys(),o=Ha(),l=Ft(),d=eo(),u=Yn(),n=kt(),f=bs(),c=Ja(),h=vs(),m=ot(),p=ws(),g=Pt(),w=Kn();function y(...b){return b.length===1&&Array.isArray(b[0])&&(b=b[0]),new c(b)}return y.plugin=function(C,v){let S=!1;function E(...I){console&&console.warn&&!S&&(S=!0,console.warn(C+`: postcss.plugin was deprecated. Migration guide:
40
+ `),h=y.length-g):h+=y.length,b&&C!=="start"){let v=b.parent||{raws:{}};(!(b.type==="decl"||b.type==="atrule"&&!b.nodes)||b!==v.last||v.raws.semicolon)&&(b.source&&b.source.end?(p.source=this.sourcePath(b),p.original.line=b.source.end.line,p.original.column=b.source.end.column-1,p.generated.line=c,p.generated.column=h-2,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,p.generated.line=c,p.generated.column=h-1,this.map.addMapping(p)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(c=>c.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let c=this.mapOpts.annotation;return typeof c!="undefined"&&c!==!0?!1:this.previous().length?this.previous().some(h=>h.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(c=>c.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(c){if(this.mapOpts.absolute||c.charCodeAt(0)===60||/^\w+:\/\//.test(c))return c;let h=this.memoizedPaths.get(c);if(h)return h;let m=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=e(r(m,this.mapOpts.annotation)));let p=t(m,c);return this.memoizedPaths.set(c,p),p}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(c=>{if(c.source&&c.source.input.map){let h=c.source.input.map;this.previousMaps.includes(h)||this.previousMaps.push(h)}});else{let c=new l(this.originalCSS,this.opts);c.map&&this.previousMaps.push(c.map)}return this.previousMaps}setSourcesContent(){let c={};if(this.root)this.root.walk(h=>{if(h.source){let m=h.source.input.from;if(m&&!c[m]){c[m]=!0;let p=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(p,h.source.input.css)}}});else if(this.css){let h=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(h,this.css)}}sourcePath(c){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(c.source.input.from):this.toUrl(this.path(c.source.input.from))}toBase64(c){return Buffer?Buffer.from(c).toString("base64"):window.btoa(unescape(encodeURIComponent(c)))}toFileUrl(c){let h=this.memoizedFileURLs.get(c);if(h)return h;if(o){let m=o(c).toString();return this.memoizedFileURLs.set(c,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(c){let h=this.memoizedURLs.get(c);if(h)return h;s==="\\"&&(c=c.replace(/\\/g,"/"));let m=encodeURI(c).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(c,m),m}}return ur=n,ur}var cr,Si;function Jn(){if(Si)return cr;Si=1;const e=39,t=34,r=92,s=47,i=10,a=32,o=12,l=9,d=13,u=91,n=93,f=40,c=41,h=123,m=125,p=59,g=42,w=58,y=64,b=/[\t\n\f\r "#'()/;[\\\]{}]/g,C=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,v=/.[\r\n"'(/\\]/,S=/[\da-f]/i;return cr=function(R,I={}){let N=R.css.valueOf(),F=I.ignoreErrors,D,re,ie,x,Z,P,V,ee,X,be,Ee=N.length,O=0,ge=[],ce=[];function Qe(){return O}function le(k){throw R.error("Unclosed "+k,O)}function he(){return ce.length===0&&O>=Ee}function _e(k){if(ce.length)return ce.pop();if(O>=Ee)return;let te=k?k.ignoreUnclosed:!1;switch(D=N.charCodeAt(O),D){case i:case a:case l:case d:case o:{x=O;do x+=1,D=N.charCodeAt(x);while(D===a||D===i||D===l||D===d||D===o);P=["space",N.slice(O,x)],O=x-1;break}case u:case n:case h:case m:case w:case p:case c:{let j=String.fromCharCode(D);P=[j,j,O];break}case f:{if(be=ge.length?ge.pop()[1]:"",X=N.charCodeAt(O+1),be==="url"&&X!==e&&X!==t&&X!==a&&X!==i&&X!==l&&X!==o&&X!==d){x=O;do{if(V=!1,x=N.indexOf(")",x+1),x===-1)if(F||te){x=O;break}else le("bracket");for(ee=x;N.charCodeAt(ee-1)===r;)ee-=1,V=!V}while(V);P=["brackets",N.slice(O,x+1),O,x],O=x}else x=N.indexOf(")",O+1),re=N.slice(O,x+1),x===-1||v.test(re)?P=["(","(",O]:(P=["brackets",re,O,x],O=x);break}case e:case t:{Z=D===e?"'":'"',x=O;do{if(V=!1,x=N.indexOf(Z,x+1),x===-1)if(F||te){x=O+1;break}else le("string");for(ee=x;N.charCodeAt(ee-1)===r;)ee-=1,V=!V}while(V);P=["string",N.slice(O,x+1),O,x],O=x;break}case y:{b.lastIndex=O+1,b.test(N),b.lastIndex===0?x=N.length-1:x=b.lastIndex-2,P=["at-word",N.slice(O,x+1),O,x],O=x;break}case r:{for(x=O,ie=!0;N.charCodeAt(x+1)===r;)x+=1,ie=!ie;if(D=N.charCodeAt(x+1),ie&&D!==s&&D!==a&&D!==i&&D!==l&&D!==d&&D!==o&&(x+=1,S.test(N.charAt(x)))){for(;S.test(N.charAt(x+1));)x+=1;N.charCodeAt(x+1)===a&&(x+=1)}P=["word",N.slice(O,x+1),O,x],O=x;break}default:{D===s&&N.charCodeAt(O+1)===g?(x=N.indexOf("*/",O+2)+1,x===0&&(F||te?x=N.length:le("comment")),P=["comment",N.slice(O,x+1),O,x],O=x):(C.lastIndex=O+1,C.test(N),C.lastIndex===0?x=N.length-1:x=C.lastIndex-2,P=["word",N.slice(O,x+1),O,x],ge.push(P),O=x);break}}return O++,P}function Re(k){ce.push(k)}return{back:Re,endOfFile:he,nextToken:_e,position:Qe}},cr}var hr,Ci;function Xn(){if(Ci)return hr;Ci=1;let e=gs(),t=nt(),r=Lt(),s=ot(),i=ws(),a=Jn();const o={empty:!0,space:!0};function l(u){for(let n=u.length-1;n>=0;n--){let f=u[n],c=f[3]||f[2];if(c)return c}}class d{constructor(n){this.input=n,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:n,start:{column:1,line:1,offset:0}}}atrule(n){let f=new e;f.name=n[1].slice(1),f.name===""&&this.unnamedAtrule(f,n),this.init(f,n[2]);let c,h,m,p=!1,g=!1,w=[],y=[];for(;!this.tokenizer.endOfFile();){if(n=this.tokenizer.nextToken(),c=n[0],c==="("||c==="["?y.push(c==="("?")":"]"):c==="{"&&y.length>0?y.push("}"):c===y[y.length-1]&&y.pop(),y.length===0)if(c===";"){f.source.end=this.getPosition(n[2]),f.source.end.offset++,this.semicolon=!0;break}else if(c==="{"){g=!0;break}else if(c==="}"){if(w.length>0){for(m=w.length-1,h=w[m];h&&h[0]==="space";)h=w[--m];h&&(f.source.end=this.getPosition(h[3]||h[2]),f.source.end.offset++)}this.end(n);break}else w.push(n);else w.push(n);if(this.tokenizer.endOfFile()){p=!0;break}}f.raws.between=this.spacesAndCommentsFromEnd(w),w.length?(f.raws.afterName=this.spacesAndCommentsFromStart(w),this.raw(f,"params",w),p&&(n=w[w.length-1],f.source.end=this.getPosition(n[3]||n[2]),f.source.end.offset++,this.spaces=f.raws.between,f.raws.between="")):(f.raws.afterName="",f.params=""),g&&(f.nodes=[],this.current=f)}checkMissedSemicolon(n){let f=this.colon(n);if(f===!1)return;let c=0,h;for(let m=f-1;m>=0&&(h=n[m],!(h[0]!=="space"&&(c+=1,c===2)));m--);throw this.input.error("Missed semicolon",h[0]==="word"?h[3]+1:h[2])}colon(n){let f=0,c,h,m;for(let[p,g]of n.entries()){if(h=g,m=h[0],m==="("&&(f+=1),m===")"&&(f-=1),f===0&&m===":")if(!c)this.doubleColon(h);else{if(c[0]==="word"&&c[1]==="progid")continue;return p}c=h}return!1}comment(n){let f=new t;this.init(f,n[2]),f.source.end=this.getPosition(n[3]||n[2]),f.source.end.offset++;let c=n[1].slice(2,-2);if(/^\s*$/.test(c))f.text="",f.raws.left=c,f.raws.right="";else{let h=c.match(/^(\s*)([^]*\S)(\s*)$/);f.text=h[2],f.raws.left=h[1],f.raws.right=h[3]}}createTokenizer(){this.tokenizer=a(this.input)}decl(n,f){let c=new r;this.init(c,n[0][2]);let h=n[n.length-1];for(h[0]===";"&&(this.semicolon=!0,n.pop()),c.source.end=this.getPosition(h[3]||h[2]||l(n)),c.source.end.offset++;n[0][0]!=="word";)n.length===1&&this.unknownWord(n),c.raws.before+=n.shift()[1];for(c.source.start=this.getPosition(n[0][2]),c.prop="";n.length;){let y=n[0][0];if(y===":"||y==="space"||y==="comment")break;c.prop+=n.shift()[1]}c.raws.between="";let m;for(;n.length;)if(m=n.shift(),m[0]===":"){c.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),c.raws.between+=m[1];(c.prop[0]==="_"||c.prop[0]==="*")&&(c.raws.before+=c.prop[0],c.prop=c.prop.slice(1));let p=[],g;for(;n.length&&(g=n[0][0],!(g!=="space"&&g!=="comment"));)p.push(n.shift());this.precheckMissedSemicolon(n);for(let y=n.length-1;y>=0;y--){if(m=n[y],m[1].toLowerCase()==="!important"){c.important=!0;let b=this.stringFrom(n,y);b=this.spacesFromEnd(n)+b,b!==" !important"&&(c.raws.important=b);break}else if(m[1].toLowerCase()==="important"){let b=n.slice(0),C="";for(let v=y;v>0;v--){let S=b[v][0];if(C.trim().startsWith("!")&&S!=="space")break;C=b.pop()[1]+C}C.trim().startsWith("!")&&(c.important=!0,c.raws.important=C,n=b)}if(m[0]!=="space"&&m[0]!=="comment")break}n.some(y=>y[0]!=="space"&&y[0]!=="comment")&&(c.raws.between+=p.map(y=>y[1]).join(""),p=[]),this.raw(c,"value",p.concat(n),f),c.value.includes(":")&&!f&&this.checkMissedSemicolon(n)}doubleColon(n){throw this.input.error("Double colon",{offset:n[2]},{offset:n[2]+n[1].length})}emptyRule(n){let f=new i;this.init(f,n[2]),f.selector="",f.raws.between="",this.current=f}end(n){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(n[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(n)}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(n){if(this.spaces+=n[1],this.current.nodes){let f=this.current.nodes[this.current.nodes.length-1];f&&f.type==="rule"&&!f.raws.ownSemicolon&&(f.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(n){let f=this.input.fromOffset(n);return{column:f.col,line:f.line,offset:n}}init(n,f){this.current.push(n),n.source={input:this.input,start:this.getPosition(f)},n.raws.before=this.spaces,this.spaces="",n.type!=="comment"&&(this.semicolon=!1)}other(n){let f=!1,c=null,h=!1,m=null,p=[],g=n[1].startsWith("--"),w=[],y=n;for(;y;){if(c=y[0],w.push(y),c==="("||c==="[")m||(m=y),p.push(c==="("?")":"]");else if(g&&h&&c==="{")m||(m=y),p.push("}");else if(p.length===0)if(c===";")if(h){this.decl(w,g);return}else break;else if(c==="{"){this.rule(w);return}else if(c==="}"){this.tokenizer.back(w.pop()),f=!0;break}else c===":"&&(h=!0);else c===p[p.length-1]&&(p.pop(),p.length===0&&(m=null));y=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(f=!0),p.length>0&&this.unclosedBracket(m),f&&h){if(!g)for(;w.length&&(y=w[w.length-1][0],!(y!=="space"&&y!=="comment"));)this.tokenizer.back(w.pop());this.decl(w,g)}else this.unknownWord(w)}parse(){let n;for(;!this.tokenizer.endOfFile();)switch(n=this.tokenizer.nextToken(),n[0]){case"space":this.spaces+=n[1];break;case";":this.freeSemicolon(n);break;case"}":this.end(n);break;case"comment":this.comment(n);break;case"at-word":this.atrule(n);break;case"{":this.emptyRule(n);break;default:this.other(n);break}this.endFile()}precheckMissedSemicolon(){}raw(n,f,c,h){let m,p,g=c.length,w="",y=!0,b,C;for(let v=0;v<g;v+=1)m=c[v],p=m[0],p==="space"&&v===g-1&&!h?y=!1:p==="comment"?(C=c[v-1]?c[v-1][0]:"empty",b=c[v+1]?c[v+1][0]:"empty",!o[C]&&!o[b]?w.slice(-1)===","?y=!1:w+=m[1]:y=!1):w+=m[1];if(!y){let v=c.reduce((S,E)=>S+E[1],"");n.raws[f]={raw:v,value:w}}n[f]=w}rule(n){n.pop();let f=new i;this.init(f,n[0][2]),f.raws.between=this.spacesAndCommentsFromEnd(n),this.raw(f,"selector",n),this.current=f}spacesAndCommentsFromEnd(n){let f,c="";for(;n.length&&(f=n[n.length-1][0],!(f!=="space"&&f!=="comment"));)c=n.pop()[1]+c;return c}spacesAndCommentsFromStart(n){let f,c="";for(;n.length&&(f=n[0][0],!(f!=="space"&&f!=="comment"));)c+=n.shift()[1];return c}spacesFromEnd(n){let f,c="";for(;n.length&&(f=n[n.length-1][0],f==="space");)c=n.pop()[1]+c;return c}stringFrom(n,f){let c="";for(let h=f;h<n.length;h++)c+=n[h][1];return n.splice(f,n.length-f),c}unclosedBlock(){let n=this.current.source.start;throw this.input.error("Unclosed block",n.line,n.column)}unclosedBracket(n){throw this.input.error("Unclosed bracket",{offset:n[2]},{offset:n[2]+1})}unexpectedClose(n){throw this.input.error("Unexpected }",{offset:n[2]},{offset:n[2]+1})}unknownWord(n){throw this.input.error("Unknown word",{offset:n[0][2]},{offset:n[0][2]+n[0][1].length})}unnamedAtrule(n,f){throw this.input.error("At-rule without name",{offset:f[2]},{offset:f[2]+f[1].length})}}return hr=d,hr}var fr,Ei;function bs(){if(Ei)return fr;Ei=1;let e=ke(),t=Ft(),r=Xn();function s(i,a){let o=new t(i,a),l=new r(o);try{l.parse()}catch(d){throw d}return l.root}return fr=s,s.default=s,e.registerParse(s),fr}var dr,Ri;function Qn(){if(Ri)return dr;Ri=1;class e{constructor(r,s={}){if(this.type="warning",this.text=r,s.node&&s.node.source){let i=s.node.rangeBy(s);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in s)this[i]=s[i]}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}}return dr=e,e.default=e,dr}var pr,xi;function vs(){if(xi)return pr;xi=1;let e=Qn();class t{constructor(s,i,a){this.processor=s,this.messages=[],this.root=i,this.opts=a,this.css=void 0,this.map=void 0}toString(){return this.css}warn(s,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let a=new e(s,i);return this.messages.push(a),a}warnings(){return this.messages.filter(s=>s.type==="warning")}get content(){return this.css}}return pr=t,t.default=t,pr}var mr,Mi;function Kn(){if(Mi)return mr;Mi=1;let e={};return mr=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},mr}var gr,Ni;function Zn(){if(Ni)return gr;Ni=1;let e=ke(),t=ys(),r=Yn(),s=bs(),i=vs(),a=ot(),o=Pt(),{isClean:l,my:d}=ms(),u=Kn();const n={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},f={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},c={Once:!0,postcssPlugin:!0,prepare:!0},h=0;function m(C){return typeof C=="object"&&typeof C.then=="function"}function p(C){let v=!1,S=n[C.type];return C.type==="decl"?v=C.prop.toLowerCase():C.type==="atrule"&&(v=C.name.toLowerCase()),v&&C.append?[S,S+"-"+v,h,S+"Exit",S+"Exit-"+v]:v?[S,S+"-"+v,S+"Exit",S+"Exit-"+v]:C.append?[S,h,S+"Exit"]:[S,S+"Exit"]}function g(C){let v;return C.type==="document"?v=["Document",h,"DocumentExit"]:C.type==="root"?v=["Root",h,"RootExit"]:v=p(C),{eventIndex:0,events:v,iterator:0,node:C,visitorIndex:0,visitors:[]}}function w(C){return C[l]=!1,C.nodes&&C.nodes.forEach(v=>w(v)),C}let y={};class b{constructor(v,S,E){this.stringified=!1,this.processed=!1;let R;if(typeof S=="object"&&S!==null&&(S.type==="root"||S.type==="document"))R=w(S);else if(S instanceof b||S instanceof i)R=w(S.root),S.map&&(typeof E.map=="undefined"&&(E.map={}),E.map.inline||(E.map.inline=!1),E.map.prev=S.map);else{let I=s;E.syntax&&(I=E.syntax.parse),E.parser&&(I=E.parser),I.parse&&(I=I.parse);try{R=I(S,E)}catch(N){this.processed=!0,this.error=N}R&&!R[d]&&e.rebuild(R)}this.result=new i(v,R,E),this.helpers=se(L({},y),{postcss:y,result:this.result}),this.plugins=this.processor.plugins.map(I=>typeof I=="object"&&I.prepare?L(L({},I),I.prepare(this.result)):I)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(v){return this.async().catch(v)}finally(v){return this.async().then(v,v)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(v,S){let E=this.result.lastPlugin;try{S&&S.addToError(v),this.error=v,v.name==="CssSyntaxError"&&!v.plugin?(v.plugin=E.postcssPlugin,v.setMessage()):E.postcssVersion}catch(R){console&&console.error&&console.error(R)}return v}prepareVisitors(){this.listeners={};let v=(S,E,R)=>{this.listeners[E]||(this.listeners[E]=[]),this.listeners[E].push([S,R])};for(let S of this.plugins)if(typeof S=="object")for(let E in S){if(!f[E]&&/^[A-Z]/.test(E))throw new Error(`Unknown event ${E} in ${S.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!c[E])if(typeof S[E]=="object")for(let R in S[E])R==="*"?v(S,E,S[E][R]):v(S,E+"-"+R.toLowerCase(),S[E][R]);else typeof S[E]=="function"&&v(S,E,S[E])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let v=0;v<this.plugins.length;v++){let S=this.plugins[v],E=this.runOnRoot(S);if(m(E))try{await E}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let v=this.result.root;for(;!v[l];){v[l]=!0;let S=[g(v)];for(;S.length>0;){let E=this.visitTick(S);if(m(E))try{await E}catch(R){let I=S[S.length-1].node;throw this.handleError(R,I)}}}if(this.listeners.OnceExit)for(let[S,E]of this.listeners.OnceExit){this.result.lastPlugin=S;try{if(v.type==="document"){let R=v.nodes.map(I=>E(I,this.helpers));await Promise.all(R)}else await E(v,this.helpers)}catch(R){throw this.handleError(R)}}}return this.processed=!0,this.stringify()}runOnRoot(v){this.result.lastPlugin=v;try{if(typeof v=="object"&&v.Once){if(this.result.root.type==="document"){let S=this.result.root.nodes.map(E=>v.Once(E,this.helpers));return m(S[0])?Promise.all(S):S}return v.Once(this.result.root,this.helpers)}else if(typeof v=="function")return v(this.result.root,this.result)}catch(S){throw this.handleError(S)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let v=this.result.opts,S=o;v.syntax&&(S=v.syntax.stringify),v.stringifier&&(S=v.stringifier),S.stringify&&(S=S.stringify);let R=new r(S,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let v of this.plugins){let S=this.runOnRoot(v);if(m(S))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let v=this.result.root;for(;!v[l];)v[l]=!0,this.walkSync(v);if(this.listeners.OnceExit)if(v.type==="document")for(let S of v.nodes)this.visitSync(this.listeners.OnceExit,S);else this.visitSync(this.listeners.OnceExit,v)}return this.result}then(v,S){return this.async().then(v,S)}toString(){return this.css}visitSync(v,S){for(let[E,R]of v){this.result.lastPlugin=E;let I;try{I=R(S,this.helpers)}catch(N){throw this.handleError(N,S.proxyOf)}if(S.type!=="root"&&S.type!=="document"&&!S.parent)return!0;if(m(I))throw this.getAsyncError()}}visitTick(v){let S=v[v.length-1],{node:E,visitors:R}=S;if(E.type!=="root"&&E.type!=="document"&&!E.parent){v.pop();return}if(R.length>0&&S.visitorIndex<R.length){let[N,F]=R[S.visitorIndex];S.visitorIndex+=1,S.visitorIndex===R.length&&(S.visitors=[],S.visitorIndex=0),this.result.lastPlugin=N;try{return F(E.toProxy(),this.helpers)}catch(D){throw this.handleError(D,E)}}if(S.iterator!==0){let N=S.iterator,F;for(;F=E.nodes[E.indexes[N]];)if(E.indexes[N]+=1,!F[l]){F[l]=!0,v.push(g(F));return}S.iterator=0,delete E.indexes[N]}let I=S.events;for(;S.eventIndex<I.length;){let N=I[S.eventIndex];if(S.eventIndex+=1,N===h){E.nodes&&E.nodes.length&&(E[l]=!0,S.iterator=E.getIterator());return}else if(this.listeners[N]){S.visitors=this.listeners[N];return}}v.pop()}walkSync(v){v[l]=!0;let S=p(v);for(let E of S)if(E===h)v.nodes&&v.each(R=>{R[l]||this.walkSync(R)});else{let R=this.listeners[E];if(R&&this.visitSync(R,v.toProxy()))return}}warnings(){return this.sync().warnings()}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"}}return b.registerPostcss=C=>{y=C},gr=b,b.default=b,a.registerLazyResult(b),t.registerLazyResult(b),gr}var yr,Oi;function Ya(){if(Oi)return yr;Oi=1;let e=Yn(),t=bs();const r=vs();let s=Pt(),i=Kn();class a{constructor(l,d,u){d=d.toString(),this.stringified=!1,this._processor=l,this._css=d,this._opts=u,this._map=void 0;let n,f=s;this.result=new r(this._processor,n,this._opts),this.result.css=d;let c=this;Object.defineProperty(this.result,"root",{get(){return c.root}});let h=new e(f,n,this._opts,d);if(h.isMap()){let[m,p]=h.generate();m&&(this.result.css=m),p&&(this.result.map=p)}else h.clearAnnotation(),this.result.css=h.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(l){return this.async().catch(l)}finally(l){return this.async().then(l,l)}sync(){if(this.error)throw this.error;return this.result}then(l,d){return this.async().then(l,d)}toString(){return this._css}warnings(){return[]}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 l,d=t;try{l=d(this._css,this._opts)}catch(u){this.error=u}if(this.error)throw this.error;return this._root=l,l}get[Symbol.toStringTag](){return"NoWorkResult"}}return yr=a,a.default=a,yr}var wr,Ii;function Ja(){if(Ii)return wr;Ii=1;let e=ys(),t=Zn(),r=Ya(),s=ot();class i{constructor(o=[]){this.version="8.5.1",this.plugins=this.normalize(o)}normalize(o){let l=[];for(let d of o)if(d.postcss===!0?d=d():d.postcss&&(d=d.postcss),typeof d=="object"&&Array.isArray(d.plugins))l=l.concat(d.plugins);else if(typeof d=="object"&&d.postcssPlugin)l.push(d);else if(typeof d=="function")l.push(d);else if(!(typeof d=="object"&&(d.parse||d.stringify)))throw new Error(d+" is not a PostCSS plugin");return l}process(o,l={}){return!this.plugins.length&&!l.parser&&!l.stringifier&&!l.syntax?new r(this,o,l):new t(this,o,l)}use(o){return this.plugins=this.plugins.concat(this.normalize([o])),this}}return wr=i,i.default=i,s.registerProcessor(i),e.registerProcessor(i),wr}var br,Di;function eo(){if(Di)return br;Di=1;let e=gs(),t=nt(),r=ke(),s=ps(),i=Lt(),a=ys(),o=Ha(),l=Ft(),d=Zn(),u=Hn(),n=kt(),f=bs(),c=Ja(),h=vs(),m=ot(),p=ws(),g=Pt(),w=Qn();function y(...b){return b.length===1&&Array.isArray(b[0])&&(b=b[0]),new c(b)}return y.plugin=function(C,v){let S=!1;function E(...I){console&&console.warn&&!S&&(S=!0,console.warn(C+`: postcss.plugin was deprecated. Migration guide:
41
41
  https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(C+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
42
- https://www.w3ctech.com/topic/2226`));let O=v(...I);return O.postcssPlugin=C,O.postcssVersion=new c().version,O}let R;return Object.defineProperty(E,"postcss",{get(){return R||(R=E()),R}}),E.process=function(I,O,F){return y([E(F)]).process(I,O)},E},y.stringify=g,y.parse=f,y.fromJSON=o,y.list=u,y.comment=b=>new t(b),y.atRule=b=>new e(b),y.decl=b=>new i(b),y.rule=b=>new p(b),y.root=b=>new m(b),y.document=b=>new a(b),y.CssSyntaxError=s,y.Declaration=i,y.Container=r,y.Processor=c,y.Document=a,y.Comment=t,y.Warning=w,y.AtRule=e,y.Result=h,y.Input=l,y.Rule=p,y.Root=m,y.Node=n,d.registerPostcss(y),br=y,y.default=y,br}var vr,Ai;function Xa(){if(Ai)return vr;Ai=1;let e=nt(),t=Qn(),r=Xn();class s extends t{checkMissedSemicolon(){}comment(a){let o=new e;this.init(o,a[2]);let l=this.input.fromOffset(a[3])||this.input.fromOffset(this.input.css.length-1);o.source.end={column:l.col,line:l.line,offset:a[3]+1};let d=a[1].slice(2);if(d.slice(-2)==="*/"&&(d=d.slice(0,-2)),/^\s*$/.test(d))o.text="",o.raws.left=d,o.raws.right="";else{let u=d.match(/^(\s*)([^]*\S)(\s*)$/);o.text=u[2],o.raws.left=u[1],o.raws.right=u[3]}}createTokenizer(){this.tokenizer=r(this.input,{ignoreErrors:!0})}decl(a){a.length>1&&a.some(o=>o[0]==="word")&&super.decl(a)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(a){let o=this.colon(a);if(o===!1)return;let l,d;for(l=o-1;l>=0&&a[l][0]!=="word";l--);if(l===0||l<0)return;for(d=l-1;d>=0;d--)if(a[d][0]!=="space"){d+=1;break}let u=a.slice(l),n=a.slice(d,l);a.splice(d,a.length-d),this.spaces=n.map(f=>f[1]).join(""),this.decl(u)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(a){this.spaces+=a.map(o=>o[1]).join("")}unnamedAtrule(a){a.name=""}}return vr=s,vr}var Sr,Ti;function Qa(){if(Ti)return Sr;Ti=1;let{Input:e}=to(),t=Xa();return Sr=function(s,i){let a=new e(s,i),o=new t(a);return o.parse(),o.root},Sr}var Ka=Qa();const Za=jn(Ka);var el=to();const Y=jn(el);Y.stringify;Y.fromJSON;Y.plugin;Y.parse;Y.list;Y.document;Y.comment;Y.atRule;Y.rule;Y.decl;Y.root;Y.CssSyntaxError;Y.Declaration;Y.Container;Y.Processor;Y.Document;Y.Comment;Y.Warning;Y.AtRule;Y.Result;Y.Input;Y.Rule;Y.Root;Y.Node;const _i={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function tl(e){let t=_i[e.tagName]?_i[e.tagName]:e.tagName;return t==="link"&&e.attributes._cssText&&(t="style"),t}function Pi(e,t){const r=t==null?void 0:t.stylesWithHoverClass.get(e);if(r)return r;let s=e;try{s=Y([$a,Wa]).process(e,{parser:Za}).css}catch(i){console.warn("Failed to adapt css for replay",i)}return t==null||t.stylesWithHoverClass.set(e,s),s}function ki(){return{stylesWithHoverClass:new Map}}function rl(e,t){var r;const{doc:s,hackCss:i,cache:a}=t;switch(e.type){case U.Document:return s.implementation.createDocument(null,"",null);case U.DocumentType:return s.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case U.Element:{const o=tl(e);let l;e.isSVG?l=s.createElementNS("http://www.w3.org/2000/svg",o):(e.isCustom&&((r=s.defaultView)!=null&&r.customElements)&&!s.defaultView.customElements.get(e.tagName)&&s.defaultView.customElements.define(e.tagName,class extends s.defaultView.HTMLElement{}),l=s.createElement(o));const d={};for(const u in e.attributes){if(!Object.prototype.hasOwnProperty.call(e.attributes,u))continue;let n=e.attributes[u];if(o==="option"&&u==="selected"&&n===!1||n===null)continue;if(n===!0&&(n=""),u.startsWith("rr_")){d[u]=n;continue}const f=o==="textarea"&&u==="value",c=o==="style"&&u==="_cssText";if(c&&i&&typeof n=="string"&&(n=Pi(n,a)),(f||c)&&typeof n=="string"){l.appendChild(s.createTextNode(n)),e.childNodes=[];continue}try{if(e.isSVG&&u==="xlink:href")l.setAttributeNS("http://www.w3.org/1999/xlink",u,n.toString());else if(u==="onload"||u==="onclick"||u.substring(0,7)==="onmouse")l.setAttribute("_"+u,n.toString());else if(o==="meta"&&e.attributes["http-equiv"]==="Content-Security-Policy"&&u==="content"){l.setAttribute("csp-content",n.toString());continue}else o==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||o==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&fs(e.attributes.href)==="js"||(o==="img"&&e.attributes.srcset&&e.attributes.rr_dataURL?l.setAttribute("rrweb-original-srcset",e.attributes.srcset):l.setAttribute(u,n.toString()))}catch(h){}}for(const u in d){const n=d[u];if(o==="canvas"&&u==="rr_dataURL"){const f=s.createElement("img");f.onload=()=>{const c=l.getContext("2d");c&&c.drawImage(f,0,0,f.width,f.height)},f.src=n.toString(),l.RRNodeType&&(l.rr_dataURL=n.toString())}else if(o==="img"&&u==="rr_dataURL"){const f=l;f.currentSrc.startsWith("data:")||(f.setAttribute("rrweb-original-src",e.attributes.src),f.src=n.toString())}if(u==="rr_width")l.style.setProperty("width",n.toString());else if(u==="rr_height")l.style.setProperty("height",n.toString());else if(u==="rr_mediaCurrentTime"&&typeof n=="number")l.currentTime=n;else if(u==="rr_mediaState")switch(n){case"played":l.play().catch(f=>console.warn("media playback error",f));break;case"paused":l.pause();break}else u==="rr_mediaPlaybackRate"&&typeof n=="number"?l.playbackRate=n:u==="rr_mediaMuted"&&typeof n=="boolean"?l.muted=n:u==="rr_mediaLoop"&&typeof n=="boolean"?l.loop=n:u==="rr_mediaVolume"&&typeof n=="number"?l.volume=n:u==="rr_open_mode"&&l.setAttribute("rr_open_mode",n)}if(e.isShadowHost)if(!l.shadowRoot)l.attachShadow({mode:"open"});else for(;l.shadowRoot.firstChild;)l.shadowRoot.removeChild(l.shadowRoot.firstChild);return l}case U.Text:return s.createTextNode(e.isStyle&&i?Pi(e.textContent,a):e.textContent);case U.CDATA:return e.textContent.trim()===""?null:s.createCDATASection(e.textContent);case U.Comment:return s.createComment(e.textContent);default:return null}}function tt(e,t){const{doc:r,mirror:s,skipChild:i=!1,hackCss:a=!0,afterAppend:o,cache:l}=t;if(s.has(e.id)){const u=s.getNode(e.id),n=s.getMeta(u);if(ga(n,e))return s.getNode(e.id)}let d=rl(e,{doc:r,hackCss:a,cache:l});if(!d)return null;if(e.rootId&&s.getNode(e.rootId)!==r&&s.replace(e.rootId,r),e.type===U.Document&&(r.close(),r.open(),e.compatMode==="BackCompat"&&e.childNodes&&e.childNodes[0].type!==U.DocumentType&&(e.childNodes[0].type===U.Element&&"xmlns"in e.childNodes[0].attributes&&e.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),d=r),s.add(d,e),(e.type===U.Document||e.type===U.Element)&&!i)for(const u of e.childNodes){const n=tt(u,{doc:r,mirror:s,skipChild:!1,hackCss:a,afterAppend:o,cache:l});if(!n){console.warn("Failed to rebuild",u);continue}if(u.isShadow&&ls(d)&&d.shadowRoot)d.shadowRoot.appendChild(n);else if(e.type===U.Document&&u.type==U.Element){const f=n;let c=null;f.childNodes.forEach(h=>{h.nodeName==="BODY"&&(c=h)}),c?(f.removeChild(c),d.appendChild(n),f.appendChild(c)):d.appendChild(n)}else d.appendChild(n);o&&o(n,u.id)}return d}function sl(e,t){function r(s){t(s)}for(const s of e.getIds())e.has(s)&&r(e.getNode(s))}function il(e,t){const r=t.getMeta(e);if((r==null?void 0:r.type)!==U.Element)return;const s=e;for(const i in r.attributes){if(!(Object.prototype.hasOwnProperty.call(r.attributes,i)&&i.startsWith("rr_")))continue;const a=r.attributes[i];i==="rr_scrollLeft"&&(s.scrollLeft=a),i==="rr_scrollTop"&&(s.scrollTop=a)}}function nl(e,t){const{doc:r,onVisit:s,hackCss:i=!0,afterAppend:a,cache:o,mirror:l=new us}=t,d=tt(e,{doc:r,mirror:l,skipChild:!1,hackCss:i,afterAppend:a,cache:o});return sl(l,u=>{s&&s(u),il(u,l)}),d}var ol=Object.defineProperty,al=(e,t,r)=>t in e?ol(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,A=(e,t,r)=>al(e,typeof t!="symbol"?t+"":t,r),ll=Object.defineProperty,ul=(e,t,r)=>t in e?ll(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Li=(e,t,r)=>ul(e,typeof t!="symbol"?t+"":t,r);let cl=class{constructor(){Li(this,"idNodeMap",new Map),Li(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const s=(r=this.getMeta(t))==null?void 0:r.id;return s!=null?s:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const s=r.id;this.idNodeMap.set(s,t),this.nodeMetaMap.set(t,r)}replace(t,r){const s=this.getNode(t);if(s){const i=this.nodeMetaMap.get(s);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function hl(){return new cl}function fl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function dl(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function s(){return this instanceof s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(r,s,i.get?i:{enumerable:!0,get:function(){return e[s]}})}),r}var mt={exports:{}},Fi;function pl(){if(Fi)return mt.exports;Fi=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return mt.exports=t(),mt.exports.createColors=t,mt.exports}const ml={},gl=Object.freeze(Object.defineProperty({__proto__:null,default:ml},Symbol.toStringTag,{value:"Module"})),pe=dl(gl);var Cr,Ui;function Ss(){if(Ui)return Cr;Ui=1;let e=pl(),t=pe;class r extends Error{constructor(i,a,o,l,d,u){super(i),this.name="CssSyntaxError",this.reason=i,d&&(this.file=d),l&&(this.source=l),u&&(this.plugin=u),typeof a!="undefined"&&typeof o!="undefined"&&(typeof a=="number"?(this.line=a,this.column=o):(this.line=a.line,this.column=a.column,this.endLine=o.line,this.endColumn=o.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}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(i){if(!this.source)return"";let a=this.source;i==null&&(i=e.isColorSupported);let o=h=>h,l=h=>h,d=h=>h;if(i){let{bold:h,gray:m,red:p}=e.createColors(!0);l=g=>h(p(g)),o=g=>m(g),t&&(d=g=>t(g))}let u=a.split(/\r?\n/),n=Math.max(this.line-3,0),f=Math.min(this.line+2,u.length),c=String(f).length;return u.slice(n,f).map((h,m)=>{let p=n+1+m,g=" "+(" "+p).slice(-c)+" | ";if(p===this.line){if(h.length>160){let y=20,b=Math.max(0,this.column-y),C=Math.max(this.column+y,this.endColumn+y),v=h.slice(b,C),S=o(g.replace(/\d/g," "))+h.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return l(">")+o(g)+d(v)+`
42
+ https://www.w3ctech.com/topic/2226`));let N=v(...I);return N.postcssPlugin=C,N.postcssVersion=new c().version,N}let R;return Object.defineProperty(E,"postcss",{get(){return R||(R=E()),R}}),E.process=function(I,N,F){return y([E(F)]).process(I,N)},E},y.stringify=g,y.parse=f,y.fromJSON=o,y.list=u,y.comment=b=>new t(b),y.atRule=b=>new e(b),y.decl=b=>new i(b),y.rule=b=>new p(b),y.root=b=>new m(b),y.document=b=>new a(b),y.CssSyntaxError=s,y.Declaration=i,y.Container=r,y.Processor=c,y.Document=a,y.Comment=t,y.Warning=w,y.AtRule=e,y.Result=h,y.Input=l,y.Rule=p,y.Root=m,y.Node=n,d.registerPostcss(y),br=y,y.default=y,br}var vr,Ai;function Xa(){if(Ai)return vr;Ai=1;let e=nt(),t=Xn(),r=Jn();class s extends t{checkMissedSemicolon(){}comment(a){let o=new e;this.init(o,a[2]);let l=this.input.fromOffset(a[3])||this.input.fromOffset(this.input.css.length-1);o.source.end={column:l.col,line:l.line,offset:a[3]+1};let d=a[1].slice(2);if(d.slice(-2)==="*/"&&(d=d.slice(0,-2)),/^\s*$/.test(d))o.text="",o.raws.left=d,o.raws.right="";else{let u=d.match(/^(\s*)([^]*\S)(\s*)$/);o.text=u[2],o.raws.left=u[1],o.raws.right=u[3]}}createTokenizer(){this.tokenizer=r(this.input,{ignoreErrors:!0})}decl(a){a.length>1&&a.some(o=>o[0]==="word")&&super.decl(a)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(a){let o=this.colon(a);if(o===!1)return;let l,d;for(l=o-1;l>=0&&a[l][0]!=="word";l--);if(l===0||l<0)return;for(d=l-1;d>=0;d--)if(a[d][0]!=="space"){d+=1;break}let u=a.slice(l),n=a.slice(d,l);a.splice(d,a.length-d),this.spaces=n.map(f=>f[1]).join(""),this.decl(u)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(a){this.spaces+=a.map(o=>o[1]).join("")}unnamedAtrule(a){a.name=""}}return vr=s,vr}var Sr,Ti;function Qa(){if(Ti)return Sr;Ti=1;let{Input:e}=eo(),t=Xa();return Sr=function(s,i){let a=new e(s,i),o=new t(a);return o.parse(),o.root},Sr}var Ka=Qa();const Za=Vn(Ka);var el=eo();const Y=Vn(el);Y.stringify;Y.fromJSON;Y.plugin;Y.parse;Y.list;Y.document;Y.comment;Y.atRule;Y.rule;Y.decl;Y.root;Y.CssSyntaxError;Y.Declaration;Y.Container;Y.Processor;Y.Document;Y.Comment;Y.Warning;Y.AtRule;Y.Result;Y.Input;Y.Rule;Y.Root;Y.Node;const _i={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function tl(e){let t=_i[e.tagName]?_i[e.tagName]:e.tagName;return t==="link"&&e.attributes._cssText&&(t="style"),t}function to(e,t){const r=t==null?void 0:t.stylesWithHoverClass.get(e);if(r)return r;let s=e;try{s=Y([$a,Wa]).process(e,{parser:Za}).css}catch(i){console.warn("Failed to adapt css for replay",i)}return t==null||t.stylesWithHoverClass.set(e,s),s}function Pi(){return{stylesWithHoverClass:new Map}}function rl(e,t){let r=e.textContent;if(e.isStyle&&t.hackCss)try{r=to(e.textContent,t.cache)}catch(s){}return t.doc.createTextNode(r)}function sl(e,t){var r;const{doc:s,hackCss:i,cache:a}=t;switch(e.type){case U.Document:return s.implementation.createDocument(null,"",null);case U.DocumentType:return s.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case U.Element:{const o=tl(e);let l;e.isSVG?l=s.createElementNS("http://www.w3.org/2000/svg",o):(e.isCustom&&((r=s.defaultView)!=null&&r.customElements)&&!s.defaultView.customElements.get(e.tagName)&&s.defaultView.customElements.define(e.tagName,class extends s.defaultView.HTMLElement{}),l=s.createElement(o));const d={};for(const u in e.attributes){if(!Object.prototype.hasOwnProperty.call(e.attributes,u))continue;let n=e.attributes[u];if(o==="option"&&u==="selected"&&n===!1||n===null)continue;if(n===!0&&(n=""),u.startsWith("rr_")){d[u]=n;continue}const f=o==="textarea"&&u==="value",c=o==="style"&&u==="_cssText";if(c&&i&&typeof n=="string"&&(n=to(n,a)),(f||c)&&typeof n=="string"){l.appendChild(s.createTextNode(n)),e.childNodes=[];continue}try{if(e.isSVG&&u==="xlink:href")l.setAttributeNS("http://www.w3.org/1999/xlink",u,n.toString());else if(u==="onload"||u==="onclick"||u.substring(0,7)==="onmouse")l.setAttribute("_"+u,n.toString());else if(o==="meta"&&e.attributes["http-equiv"]==="Content-Security-Policy"&&u==="content"){l.setAttribute("csp-content",n.toString());continue}else o==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||o==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&fs(e.attributes.href)==="js"||(o==="img"&&e.attributes.srcset&&e.attributes.rr_dataURL?l.setAttribute("rrweb-original-srcset",e.attributes.srcset):l.setAttribute(u,n.toString()))}catch(h){}}for(const u in d){const n=d[u];if(o==="canvas"&&u==="rr_dataURL"){const f=s.createElement("img");f.onload=()=>{const c=l.getContext("2d");c&&c.drawImage(f,0,0,f.width,f.height)},f.src=n.toString(),l.RRNodeType&&(l.rr_dataURL=n.toString())}else if(o==="img"&&u==="rr_dataURL"){const f=l;f.currentSrc.startsWith("data:")||(f.setAttribute("rrweb-original-src",e.attributes.src),f.src=n.toString())}if(u==="rr_width")l.style.setProperty("width",n.toString());else if(u==="rr_height")l.style.setProperty("height",n.toString());else if(u==="rr_mediaCurrentTime"&&typeof n=="number")l.currentTime=n;else if(u==="rr_mediaState")switch(n){case"played":l.play().catch(f=>console.warn("media playback error",f));break;case"paused":l.pause();break}else u==="rr_mediaPlaybackRate"&&typeof n=="number"?l.playbackRate=n:u==="rr_mediaMuted"&&typeof n=="boolean"?l.muted=n:u==="rr_mediaLoop"&&typeof n=="boolean"?l.loop=n:u==="rr_mediaVolume"&&typeof n=="number"?l.volume=n:u==="rr_open_mode"&&l.setAttribute("rr_open_mode",n)}if(e.isShadowHost)if(!l.shadowRoot)l.attachShadow({mode:"open"});else for(;l.shadowRoot.firstChild;)l.shadowRoot.removeChild(l.shadowRoot.firstChild);return l}case U.Text:return rl(e,{cache:a,doc:s,hackCss:i});case U.CDATA:return e.textContent.trim()===""?null:s.createCDATASection(e.textContent);case U.Comment:return s.createComment(e.textContent);default:return null}}function tt(e,t){const{doc:r,mirror:s,skipChild:i=!1,hackCss:a=!0,afterAppend:o,cache:l}=t;if(s.has(e.id)){const u=s.getNode(e.id),n=s.getMeta(u);if(ga(n,e))return s.getNode(e.id)}let d=sl(e,{doc:r,hackCss:a,cache:l});if(!d)return null;if(e.rootId&&s.getNode(e.rootId)!==r&&s.replace(e.rootId,r),e.type===U.Document&&(r.close(),r.open(),e.compatMode==="BackCompat"&&e.childNodes&&e.childNodes[0].type!==U.DocumentType&&(e.childNodes[0].type===U.Element&&"xmlns"in e.childNodes[0].attributes&&e.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),d=r),s.add(d,e),(e.type===U.Document||e.type===U.Element)&&!i)for(const u of e.childNodes){const n=tt(u,{doc:r,mirror:s,skipChild:!1,hackCss:a,afterAppend:o,cache:l});if(!n){console.warn("Failed to rebuild",u);continue}if(u.isShadow&&ls(d)&&d.shadowRoot)d.shadowRoot.appendChild(n);else if(e.type===U.Document&&u.type==U.Element){const f=n;let c=null;f.childNodes.forEach(h=>{h.nodeName==="BODY"&&(c=h)}),c?(f.removeChild(c),d.appendChild(n),f.appendChild(c)):d.appendChild(n)}else d.appendChild(n);o&&o(n,u.id)}return d}function il(e,t){function r(s){t(s)}for(const s of e.getIds())e.has(s)&&r(e.getNode(s))}function nl(e,t){const r=t.getMeta(e);if((r==null?void 0:r.type)!==U.Element)return;const s=e;for(const i in r.attributes){if(!(Object.prototype.hasOwnProperty.call(r.attributes,i)&&i.startsWith("rr_")))continue;const a=r.attributes[i];i==="rr_scrollLeft"&&(s.scrollLeft=a),i==="rr_scrollTop"&&(s.scrollTop=a)}}function ol(e,t){const{doc:r,onVisit:s,hackCss:i=!0,afterAppend:a,cache:o,mirror:l=new us}=t,d=tt(e,{doc:r,mirror:l,skipChild:!1,hackCss:i,afterAppend:a,cache:o});return il(l,u=>{s&&s(u),nl(u,l)}),d}var al=Object.defineProperty,ll=(e,t,r)=>t in e?al(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,A=(e,t,r)=>ll(e,typeof t!="symbol"?t+"":t,r),ul=Object.defineProperty,cl=(e,t,r)=>t in e?ul(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ki=(e,t,r)=>cl(e,typeof t!="symbol"?t+"":t,r);let hl=class{constructor(){ki(this,"idNodeMap",new Map),ki(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const s=(r=this.getMeta(t))==null?void 0:r.id;return s!=null?s:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const s=r.id;this.idNodeMap.set(s,t),this.nodeMetaMap.set(t,r)}replace(t,r){const s=this.getNode(t);if(s){const i=this.nodeMetaMap.get(s);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function fl(){return new hl}function dl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function pl(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function s(){return this instanceof s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(r,s,i.get?i:{enumerable:!0,get:function(){return e[s]}})}),r}var mt={exports:{}},Li;function ml(){if(Li)return mt.exports;Li=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return mt.exports=t(),mt.exports.createColors=t,mt.exports}const gl={},yl=Object.freeze(Object.defineProperty({__proto__:null,default:gl},Symbol.toStringTag,{value:"Module"})),pe=pl(yl);var Cr,Fi;function Ss(){if(Fi)return Cr;Fi=1;let e=ml(),t=pe;class r extends Error{constructor(i,a,o,l,d,u){super(i),this.name="CssSyntaxError",this.reason=i,d&&(this.file=d),l&&(this.source=l),u&&(this.plugin=u),typeof a!="undefined"&&typeof o!="undefined"&&(typeof a=="number"?(this.line=a,this.column=o):(this.line=a.line,this.column=a.column,this.endLine=o.line,this.endColumn=o.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}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(i){if(!this.source)return"";let a=this.source;i==null&&(i=e.isColorSupported);let o=h=>h,l=h=>h,d=h=>h;if(i){let{bold:h,gray:m,red:p}=e.createColors(!0);l=g=>h(p(g)),o=g=>m(g),t&&(d=g=>t(g))}let u=a.split(/\r?\n/),n=Math.max(this.line-3,0),f=Math.min(this.line+2,u.length),c=String(f).length;return u.slice(n,f).map((h,m)=>{let p=n+1+m,g=" "+(" "+p).slice(-c)+" | ";if(p===this.line){if(h.length>160){let y=20,b=Math.max(0,this.column-y),C=Math.max(this.column+y,this.endColumn+y),v=h.slice(b,C),S=o(g.replace(/\d/g," "))+h.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return l(">")+o(g)+d(v)+`
43
43
  `+S+l("^")}let w=o(g.replace(/\d/g," "))+h.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+o(g)+d(h)+`
44
44
  `+w+l("^")}return" "+o(g)+d(h)}).join(`
45
45
  `)}toString(){let i=this.showSourceCode();return i&&(i=`
46
46
 
47
47
  `+i+`
48
- `),this.name+": "+this.message+i}}return Cr=r,r.default=r,Cr}var Er,Bi;function ro(){if(Bi)return Er;Bi=1;const e={after:`
48
+ `),this.name+": "+this.message+i}}return Cr=r,r.default=r,Cr}var Er,Ui;function ro(){if(Ui)return Er;Ui=1;const e={after:`
49
49
  `,beforeClose:`
50
50
  `,beforeComment:`
51
51
  `,beforeDecl:`
@@ -56,19 +56,19 @@ https://www.w3ctech.com/topic/2226`));let O=v(...I);return O.postcssPlugin=C,O.p
56
56
  `)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o=="undefined"?o=this.raw(a,null,"beforeDecl"):o&&(o=o.replace(/\S/g,"")),o}rawBeforeDecl(i,a){let o;return i.walkDecls(l=>{if(typeof l.raws.before!="undefined")return o=l.raws.before,o.includes(`
57
57
  `)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o=="undefined"?o=this.raw(a,null,"beforeRule"):o&&(o=o.replace(/\S/g,"")),o}rawBeforeOpen(i){let a;return i.walk(o=>{if(o.type!=="decl"&&(a=o.raws.between,typeof a!="undefined"))return!1}),a}rawBeforeRule(i){let a;return i.walk(o=>{if(o.nodes&&(o.parent!==i||i.first!==o)&&typeof o.raws.before!="undefined")return a=o.raws.before,a.includes(`
58
58
  `)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawColon(i){let a;return i.walkDecls(o=>{if(typeof o.raws.between!="undefined")return a=o.raws.between.replace(/[^\s:]/g,""),!1}),a}rawEmptyBody(i){let a;return i.walk(o=>{if(o.nodes&&o.nodes.length===0&&(a=o.raws.after,typeof a!="undefined"))return!1}),a}rawIndent(i){if(i.raws.indent)return i.raws.indent;let a;return i.walk(o=>{let l=o.parent;if(l&&l!==i&&l.parent&&l.parent===i&&typeof o.raws.before!="undefined"){let d=o.raws.before.split(`
59
- `);return a=d[d.length-1],a=a.replace(/\S/g,""),!1}}),a}rawSemicolon(i){let a;return i.walk(o=>{if(o.nodes&&o.nodes.length&&o.last.type==="decl"&&(a=o.raws.semicolon,typeof a!="undefined"))return!1}),a}rawValue(i,a){let o=i[a],l=i.raws[a];return l&&l.value===o?l.raw:o}root(i){this.body(i),i.raws.after&&this.builder(i.raws.after)}rule(i){this.block(i,this.rawValue(i,"selector")),i.raws.ownSemicolon&&this.builder(i.raws.ownSemicolon,i,"end")}stringify(i,a){if(!this[i.type])throw new Error("Unknown AST node type "+i.type+". Maybe you need to change PostCSS stringifier.");this[i.type](i,a)}}return Er=r,r.default=r,Er}var Rr,$i;function Ut(){if($i)return Rr;$i=1;let e=ro();function t(r,s){new e(s).stringify(r)}return Rr=t,t.default=t,Rr}var gt={},Wi;function Cs(){return Wi||(Wi=1,gt.isClean=Symbol("isClean"),gt.my=Symbol("my")),gt}var xr,zi;function Bt(){if(zi)return xr;zi=1;let e=Ss(),t=ro(),r=Ut(),{isClean:s,my:i}=Cs();function a(d,u){let n=new d.constructor;for(let f in d){if(!Object.prototype.hasOwnProperty.call(d,f)||f==="proxyCache")continue;let c=d[f],h=typeof c;f==="parent"&&h==="object"?u&&(n[f]=u):f==="source"?n[f]=c:Array.isArray(c)?n[f]=c.map(m=>a(m,n)):(h==="object"&&c!==null&&(c=a(c)),n[f]=c)}return n}function o(d,u){if(u&&typeof u.offset!="undefined")return u.offset;let n=1,f=1,c=0;for(let h=0;h<d.length;h++){if(f===u.line&&n===u.column){c=h;break}d[h]===`
59
+ `);return a=d[d.length-1],a=a.replace(/\S/g,""),!1}}),a}rawSemicolon(i){let a;return i.walk(o=>{if(o.nodes&&o.nodes.length&&o.last.type==="decl"&&(a=o.raws.semicolon,typeof a!="undefined"))return!1}),a}rawValue(i,a){let o=i[a],l=i.raws[a];return l&&l.value===o?l.raw:o}root(i){this.body(i),i.raws.after&&this.builder(i.raws.after)}rule(i){this.block(i,this.rawValue(i,"selector")),i.raws.ownSemicolon&&this.builder(i.raws.ownSemicolon,i,"end")}stringify(i,a){if(!this[i.type])throw new Error("Unknown AST node type "+i.type+". Maybe you need to change PostCSS stringifier.");this[i.type](i,a)}}return Er=r,r.default=r,Er}var Rr,Bi;function Ut(){if(Bi)return Rr;Bi=1;let e=ro();function t(r,s){new e(s).stringify(r)}return Rr=t,t.default=t,Rr}var gt={},$i;function Cs(){return $i||($i=1,gt.isClean=Symbol("isClean"),gt.my=Symbol("my")),gt}var xr,Wi;function Bt(){if(Wi)return xr;Wi=1;let e=Ss(),t=ro(),r=Ut(),{isClean:s,my:i}=Cs();function a(d,u){let n=new d.constructor;for(let f in d){if(!Object.prototype.hasOwnProperty.call(d,f)||f==="proxyCache")continue;let c=d[f],h=typeof c;f==="parent"&&h==="object"?u&&(n[f]=u):f==="source"?n[f]=c:Array.isArray(c)?n[f]=c.map(m=>a(m,n)):(h==="object"&&c!==null&&(c=a(c)),n[f]=c)}return n}function o(d,u){if(u&&typeof u.offset!="undefined")return u.offset;let n=1,f=1,c=0;for(let h=0;h<d.length;h++){if(f===u.line&&n===u.column){c=h;break}d[h]===`
60
60
  `?(n=1,f+=1):n+=1}return c}class l{constructor(u={}){this.raws={},this[s]=!1,this[i]=!0;for(let n in u)if(n==="nodes"){this.nodes=[];for(let f of u[n])typeof f.clone=="function"?this.append(f.clone()):this.append(f)}else this[n]=u[n]}addToError(u){if(u.postcssNode=this,u.stack&&this.source&&/\n\s{4}at /.test(u.stack)){let n=this.source;u.stack=u.stack.replace(/\n\s{4}at /,`$&${n.input.from}:${n.start.line}:${n.start.column}$&`)}return u}after(u){return this.parent.insertAfter(this,u),this}assign(u={}){for(let n in u)this[n]=u[n];return this}before(u){return this.parent.insertBefore(this,u),this}cleanRaws(u){delete this.raws.before,delete this.raws.after,u||delete this.raws.between}clone(u={}){let n=a(this);for(let f in u)n[f]=u[f];return n}cloneAfter(u={}){let n=this.clone(u);return this.parent.insertAfter(this,n),n}cloneBefore(u={}){let n=this.clone(u);return this.parent.insertBefore(this,n),n}error(u,n={}){if(this.source){let{end:f,start:c}=this.rangeBy(n);return this.source.input.error(u,{column:c.column,line:c.line},{column:f.column,line:f.line},n)}return new e(u)}getProxyProcessor(){return{get(u,n){return n==="proxyOf"?u:n==="root"?()=>u.root().toProxy():u[n]},set(u,n,f){return u[n]===f||(u[n]=f,(n==="prop"||n==="value"||n==="name"||n==="params"||n==="important"||n==="text")&&u.markDirty()),!0}}}markClean(){this[s]=!0}markDirty(){if(this[s]){this[s]=!1;let u=this;for(;u=u.parent;)u[s]=!1}}next(){if(!this.parent)return;let u=this.parent.index(this);return this.parent.nodes[u+1]}positionBy(u){let n=this.source.start;if(u.index)n=this.positionInside(u.index);else if(u.word){let f="document"in this.source.input?this.source.input.document:this.source.input.css,h=f.slice(o(f,this.source.start),o(f,this.source.end)).indexOf(u.word);h!==-1&&(n=this.positionInside(h))}return n}positionInside(u){let n=this.source.start.column,f=this.source.start.line,c="document"in this.source.input?this.source.input.document:this.source.input.css,h=o(c,this.source.start),m=h+u;for(let p=h;p<m;p++)c[p]===`
61
- `?(n=1,f+=1):n+=1;return{column:n,line:f}}prev(){if(!this.parent)return;let u=this.parent.index(this);return this.parent.nodes[u-1]}rangeBy(u){let n={column:this.source.start.column,line:this.source.start.line},f=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:n.column+1,line:n.line};if(u.word){let c="document"in this.source.input?this.source.input.document:this.source.input.css,m=c.slice(o(c,this.source.start),o(c,this.source.end)).indexOf(u.word);m!==-1&&(n=this.positionInside(m),f=this.positionInside(m+u.word.length))}else u.start?n={column:u.start.column,line:u.start.line}:u.index&&(n=this.positionInside(u.index)),u.end?f={column:u.end.column,line:u.end.line}:typeof u.endIndex=="number"?f=this.positionInside(u.endIndex):u.index&&(f=this.positionInside(u.index+1));return(f.line<n.line||f.line===n.line&&f.column<=n.column)&&(f={column:n.column+1,line:n.line}),{end:f,start:n}}raw(u,n){return new t().raw(this,u,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...u){if(this.parent){let n=this,f=!1;for(let c of u)c===this?f=!0:f?(this.parent.insertAfter(n,c),n=c):this.parent.insertBefore(n,c);f||this.remove()}return this}root(){let u=this;for(;u.parent&&u.parent.type!=="document";)u=u.parent;return u}toJSON(u,n){let f={},c=n==null;n=n||new Map;let h=0;for(let m in this){if(!Object.prototype.hasOwnProperty.call(this,m)||m==="parent"||m==="proxyCache")continue;let p=this[m];if(Array.isArray(p))f[m]=p.map(g=>typeof g=="object"&&g.toJSON?g.toJSON(null,n):g);else if(typeof p=="object"&&p.toJSON)f[m]=p.toJSON(null,n);else if(m==="source"){let g=n.get(p.input);g==null&&(g=h,n.set(p.input,h),h++),f[m]={end:p.end,inputId:g,start:p.start}}else f[m]=p}return c&&(f.inputs=[...n.keys()].map(m=>m.toJSON())),f}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(u=r){u.stringify&&(u=u.stringify);let n="";return u(this,f=>{n+=f}),n}warn(u,n,f){let c={node:this};for(let h in f)c[h]=f[h];return u.warn(n,c)}get proxyOf(){return this}}return xr=l,l.default=l,xr}var Mr,qi;function at(){if(qi)return Mr;qi=1;let e=Bt();class t extends e{constructor(s){super(s),this.type="comment"}}return Mr=t,t.default=t,Mr}var Or,Vi;function $t(){if(Vi)return Or;Vi=1;let e=Bt();class t extends e{constructor(s){s&&typeof s.value!="undefined"&&typeof s.value!="string"&&(s=se(L({},s),{value:String(s.value)})),super(s),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return Or=t,t.default=t,Or}var Nr,ji;function Le(){if(ji)return Nr;ji=1;let e=at(),t=$t(),r=Bt(),{isClean:s,my:i}=Cs(),a,o,l,d;function u(c){return c.map(h=>(h.nodes&&(h.nodes=u(h.nodes)),delete h.source,h))}function n(c){if(c[s]=!1,c.proxyOf.nodes)for(let h of c.proxyOf.nodes)n(h)}class f extends r{append(...h){for(let m of h){let p=this.normalize(m,this.last);for(let g of p)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(h){if(super.cleanRaws(h),this.nodes)for(let m of this.nodes)m.cleanRaws(h)}each(h){if(!this.proxyOf.nodes)return;let m=this.getIterator(),p,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(p=this.indexes[m],g=h(this.proxyOf.nodes[p],p),g!==!1);)this.indexes[m]+=1;return delete this.indexes[m],g}every(h){return this.nodes.every(h)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let h=this.lastEach;return this.indexes[h]=0,h}getProxyProcessor(){return{get(h,m){return m==="proxyOf"?h:h[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...p)=>h[m](...p.map(g=>typeof g=="function"?(w,y)=>g(w.toProxy(),y):g)):m==="every"||m==="some"?p=>h[m]((g,...w)=>p(g.toProxy(),...w)):m==="root"?()=>h.root().toProxy():m==="nodes"?h.nodes.map(p=>p.toProxy()):m==="first"||m==="last"?h[m].toProxy():h[m]:h[m]},set(h,m,p){return h[m]===p||(h[m]=p,(m==="name"||m==="params"||m==="selector")&&h.markDirty()),!0}}}index(h){return typeof h=="number"?h:(h.proxyOf&&(h=h.proxyOf),this.proxyOf.nodes.indexOf(h))}insertAfter(h,m){let p=this.index(h),g=this.normalize(m,this.proxyOf.nodes[p]).reverse();p=this.index(h);for(let y of g)this.proxyOf.nodes.splice(p+1,0,y);let w;for(let y in this.indexes)w=this.indexes[y],p<w&&(this.indexes[y]=w+g.length);return this.markDirty(),this}insertBefore(h,m){let p=this.index(h),g=p===0?"prepend":!1,w=this.normalize(m,this.proxyOf.nodes[p],g).reverse();p=this.index(h);for(let b of w)this.proxyOf.nodes.splice(p,0,b);let y;for(let b in this.indexes)y=this.indexes[b],p<=y&&(this.indexes[b]=y+w.length);return this.markDirty(),this}normalize(h,m){if(typeof h=="string")h=u(o(h).nodes);else if(typeof h=="undefined")h=[];else if(Array.isArray(h)){h=h.slice(0);for(let g of h)g.parent&&g.parent.removeChild(g,"ignore")}else if(h.type==="root"&&this.type!=="document"){h=h.nodes.slice(0);for(let g of h)g.parent&&g.parent.removeChild(g,"ignore")}else if(h.type)h=[h];else if(h.prop){if(typeof h.value=="undefined")throw new Error("Value field is missed in node creation");typeof h.value!="string"&&(h.value=String(h.value)),h=[new t(h)]}else if(h.selector||h.selectors)h=[new d(h)];else if(h.name)h=[new a(h)];else if(h.text)h=[new e(h)];else throw new Error("Unknown node type in node creation");return h.map(g=>(g[i]||f.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[s]&&n(g),g.raws||(g.raws={}),typeof g.raws.before=="undefined"&&m&&typeof m.raws.before!="undefined"&&(g.raws.before=m.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...h){h=h.reverse();for(let m of h){let p=this.normalize(m,this.first,"prepend").reverse();for(let g of p)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+p.length}return this.markDirty(),this}push(h){return h.parent=this,this.proxyOf.nodes.push(h),this}removeAll(){for(let h of this.proxyOf.nodes)h.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(h){h=this.index(h),this.proxyOf.nodes[h].parent=void 0,this.proxyOf.nodes.splice(h,1);let m;for(let p in this.indexes)m=this.indexes[p],m>=h&&(this.indexes[p]=m-1);return this.markDirty(),this}replaceValues(h,m,p){return p||(p=m,m={}),this.walkDecls(g=>{m.props&&!m.props.includes(g.prop)||m.fast&&!g.value.includes(m.fast)||(g.value=g.value.replace(h,p))}),this.markDirty(),this}some(h){return this.nodes.some(h)}walk(h){return this.each((m,p)=>{let g;try{g=h(m,p)}catch(w){throw m.addToError(w)}return g!==!1&&m.walk&&(g=m.walk(h)),g})}walkAtRules(h,m){return m?h instanceof RegExp?this.walk((p,g)=>{if(p.type==="atrule"&&h.test(p.name))return m(p,g)}):this.walk((p,g)=>{if(p.type==="atrule"&&p.name===h)return m(p,g)}):(m=h,this.walk((p,g)=>{if(p.type==="atrule")return m(p,g)}))}walkComments(h){return this.walk((m,p)=>{if(m.type==="comment")return h(m,p)})}walkDecls(h,m){return m?h instanceof RegExp?this.walk((p,g)=>{if(p.type==="decl"&&h.test(p.prop))return m(p,g)}):this.walk((p,g)=>{if(p.type==="decl"&&p.prop===h)return m(p,g)}):(m=h,this.walk((p,g)=>{if(p.type==="decl")return m(p,g)}))}walkRules(h,m){return m?h instanceof RegExp?this.walk((p,g)=>{if(p.type==="rule"&&h.test(p.selector))return m(p,g)}):this.walk((p,g)=>{if(p.type==="rule"&&p.selector===h)return m(p,g)}):(m=h,this.walk((p,g)=>{if(p.type==="rule")return m(p,g)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return f.registerParse=c=>{o=c},f.registerRule=c=>{d=c},f.registerAtRule=c=>{a=c},f.registerRoot=c=>{l=c},Nr=f,f.default=f,f.rebuild=c=>{c.type==="atrule"?Object.setPrototypeOf(c,a.prototype):c.type==="rule"?Object.setPrototypeOf(c,d.prototype):c.type==="decl"?Object.setPrototypeOf(c,t.prototype):c.type==="comment"?Object.setPrototypeOf(c,e.prototype):c.type==="root"&&Object.setPrototypeOf(c,l.prototype),c[i]=!0,c.nodes&&c.nodes.forEach(h=>{f.rebuild(h)})},Nr}var Ir,Gi;function Es(){if(Gi)return Ir;Gi=1;let e=Le();class t extends e{constructor(s){super(s),this.type="atrule"}append(...s){return this.proxyOf.nodes||(this.nodes=[]),super.append(...s)}prepend(...s){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...s)}}return Ir=t,t.default=t,e.registerAtRule(t),Ir}var Dr,Hi;function Rs(){if(Hi)return Dr;Hi=1;let e=Le(),t,r;class s extends e{constructor(a){super(L({type:"document"},a)),this.nodes||(this.nodes=[])}toResult(a={}){return new t(new r,this,a).stringify()}}return s.registerLazyResult=i=>{t=i},s.registerProcessor=i=>{r=i},Dr=s,s.default=s,Dr}var Ar,Yi;function yl(){if(Yi)return Ar;Yi=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return Ar={nanoid:(s=21)=>{let i="",a=s|0;for(;a--;)i+=e[Math.random()*64|0];return i},customAlphabet:(s,i=21)=>(a=i)=>{let o="",l=a|0;for(;l--;)o+=s[Math.random()*s.length|0];return o}},Ar}var Tr,Ji;function so(){if(Ji)return Tr;Ji=1;let{existsSync:e,readFileSync:t}=pe,{dirname:r,join:s}=pe,{SourceMapConsumer:i,SourceMapGenerator:a}=pe;function o(d){return Buffer?Buffer.from(d,"base64").toString():window.atob(d)}class l{constructor(u,n){if(n.map===!1)return;this.loadAnnotation(u),this.inline=this.startWith(this.annotation,"data:");let f=n.map?n.map.prev:void 0,c=this.loadMap(n.from,f);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=r(this.mapFile)),c&&(this.text=c)}consumer(){return this.consumerCache||(this.consumerCache=new i(this.text)),this.consumerCache}decodeInline(u){let n=/^data:application\/json;charset=utf-?8;base64,/,f=/^data:application\/json;base64,/,c=/^data:application\/json;charset=utf-?8,/,h=/^data:application\/json,/,m=u.match(c)||u.match(h);if(m)return decodeURIComponent(u.substr(m[0].length));let p=u.match(n)||u.match(f);if(p)return o(u.substr(p[0].length));let g=u.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+g)}getAnnotationURL(u){return u.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(u){return typeof u!="object"?!1:typeof u.mappings=="string"||typeof u._mappings=="string"||Array.isArray(u.sections)}loadAnnotation(u){let n=u.match(/\/\*\s*# sourceMappingURL=/g);if(!n)return;let f=u.lastIndexOf(n.pop()),c=u.indexOf("*/",f);f>-1&&c>-1&&(this.annotation=this.getAnnotationURL(u.substring(f,c)))}loadFile(u){if(this.root=r(u),e(u))return this.mapFile=u,t(u,"utf-8").toString().trim()}loadMap(u,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let f=n(u);if(f){let c=this.loadFile(f);if(!c)throw new Error("Unable to load previous source map: "+f.toString());return c}}else{if(n instanceof i)return a.fromSourceMap(n).toString();if(n instanceof a)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let f=this.annotation;return u&&(f=s(r(u),f)),this.loadFile(f)}}}startWith(u,n){return u?u.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Tr=l,l.default=l,Tr}var _r,Xi;function Wt(){if(Xi)return _r;Xi=1;let{nanoid:e}=yl(),{isAbsolute:t,resolve:r}=pe,{SourceMapConsumer:s,SourceMapGenerator:i}=pe,{fileURLToPath:a,pathToFileURL:o}=pe,l=Ss(),d=so(),u=pe,n=Symbol("fromOffsetCache"),f=!!(s&&i),c=!!(r&&t);class h{constructor(p,g={}){if(p===null||typeof p=="undefined"||typeof p=="object"&&!p.toString)throw new Error(`PostCSS received ${p} instead of CSS string`);if(this.css=p.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,g.document&&(this.document=g.document.toString()),g.from&&(!c||/^\w+:\/\//.test(g.from)||t(g.from)?this.file=g.from:this.file=r(g.from)),c&&f){let w=new d(this.css,g);if(w.text){this.map=w;let y=w.consumer().file;!this.file&&y&&(this.file=this.mapResolve(y))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(p,g,w,y={}){let b,C,v;if(g&&typeof g=="object"){let E=g,R=w;if(typeof E.offset=="number"){let I=this.fromOffset(E.offset);g=I.line,w=I.col}else g=E.line,w=E.column;if(typeof R.offset=="number"){let I=this.fromOffset(R.offset);C=I.line,b=I.col}else C=R.line,b=R.column}else if(!w){let E=this.fromOffset(g);g=E.line,w=E.col}let S=this.origin(g,w,C,b);return S?v=new l(p,S.endLine===void 0?S.line:{column:S.column,line:S.line},S.endLine===void 0?S.column:{column:S.endColumn,line:S.endLine},S.source,S.file,y.plugin):v=new l(p,C===void 0?g:{column:w,line:g},C===void 0?w:{column:b,line:C},this.css,this.file,y.plugin),v.input={column:w,endColumn:b,endLine:C,line:g,source:this.css},this.file&&(o&&(v.input.url=o(this.file).toString()),v.input.file=this.file),v}fromOffset(p){let g,w;if(this[n])w=this[n];else{let b=this.css.split(`
62
- `);w=new Array(b.length);let C=0;for(let v=0,S=b.length;v<S;v++)w[v]=C,C+=b[v].length+1;this[n]=w}g=w[w.length-1];let y=0;if(p>=g)y=w.length-1;else{let b=w.length-2,C;for(;y<b;)if(C=y+(b-y>>1),p<w[C])b=C-1;else if(p>=w[C+1])y=C+1;else{y=C;break}}return{col:p-w[y]+1,line:y+1}}mapResolve(p){return/^\w+:\/\//.test(p)?p:r(this.map.consumer().sourceRoot||this.map.root||".",p)}origin(p,g,w,y){if(!this.map)return!1;let b=this.map.consumer(),C=b.originalPositionFor({column:g,line:p});if(!C.source)return!1;let v;typeof w=="number"&&(v=b.originalPositionFor({column:y,line:w}));let S;t(C.source)?S=o(C.source):S=new URL(C.source,this.map.consumer().sourceRoot||o(this.map.mapFile));let E={column:C.column,endColumn:v&&v.column,endLine:v&&v.line,line:C.line,url:S.toString()};if(S.protocol==="file:")if(a)E.file=a(S);else throw new Error("file: protocol is not available in this PostCSS build");let R=b.sourceContentFor(C.source);return R&&(E.source=R),E}toJSON(){let p={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(p[g]=this[g]);return this.map&&(p.map=L({},this.map),p.map.consumerCache&&(p.map.consumerCache=void 0)),p}get from(){return this.file||this.id}}return _r=h,h.default=h,u&&u.registerInput&&u.registerInput(h),_r}var Pr,Qi;function lt(){if(Qi)return Pr;Qi=1;let e=Le(),t,r;class s extends e{constructor(a){super(a),this.type="root",this.nodes||(this.nodes=[])}normalize(a,o,l){let d=super.normalize(a);if(o){if(l==="prepend")this.nodes.length>1?o.raws.before=this.nodes[1].raws.before:delete o.raws.before;else if(this.first!==o)for(let u of d)u.raws.before=o.raws.before}return d}removeChild(a,o){let l=this.index(a);return!o&&l===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[l].raws.before),super.removeChild(a)}toResult(a={}){return new t(new r,this,a).stringify()}}return s.registerLazyResult=i=>{t=i},s.registerProcessor=i=>{r=i},Pr=s,s.default=s,e.registerRoot(s),Pr}var kr,Ki;function io(){if(Ki)return kr;Ki=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let r=[" ",`
63
- `," "];return e.split(t,r)},split(t,r,s){let i=[],a="",o=!1,l=0,d=!1,u="",n=!1;for(let f of t)n?n=!1:f==="\\"?n=!0:d?f===u&&(d=!1):f==='"'||f==="'"?(d=!0,u=f):f==="("?l+=1:f===")"?l>0&&(l-=1):l===0&&r.includes(f)&&(o=!0),o?(a!==""&&i.push(a.trim()),a="",o=!1):a+=f;return(s||a!=="")&&i.push(a.trim()),i}};return kr=e,e.default=e,kr}var Lr,Zi;function xs(){if(Zi)return Lr;Zi=1;let e=Le(),t=io();class r extends e{constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(i){let a=this.selector?this.selector.match(/,\s*/):null,o=a?a[0]:","+this.raw("between","beforeOpen");this.selector=i.join(o)}}return Lr=r,r.default=r,e.registerRule(r),Lr}var Fr,en;function wl(){if(en)return Fr;en=1;let e=Es(),t=at(),r=$t(),s=Wt(),i=so(),a=lt(),o=xs();function l(d,u){if(Array.isArray(d))return d.map(m=>l(m));let c=d,{inputs:n}=c,f=Ue(c,["inputs"]);if(n){u=[];for(let m of n){let p=se(L({},m),{__proto__:s.prototype});p.map&&(p.map=se(L({},p.map),{__proto__:i.prototype})),u.push(p)}}if(f.nodes&&(f.nodes=d.nodes.map(m=>l(m,u))),f.source){let h=f.source,{inputId:m}=h,p=Ue(h,["inputId"]);f.source=p,m!=null&&(f.source.input=u[m])}if(f.type==="root")return new a(f);if(f.type==="decl")return new r(f);if(f.type==="rule")return new o(f);if(f.type==="comment")return new t(f);if(f.type==="atrule")return new e(f);throw new Error("Unknown node type: "+d.type)}return Fr=l,l.default=l,Fr}var Ur,tn;function no(){if(tn)return Ur;tn=1;let{dirname:e,relative:t,resolve:r,sep:s}=pe,{SourceMapConsumer:i,SourceMapGenerator:a}=pe,{pathToFileURL:o}=pe,l=Wt(),d=!!(i&&a),u=!!(e&&r&&t&&s);class n{constructor(c,h,m,p){this.stringify=c,this.mapOpts=m.map||{},this.root=h,this.opts=m,this.css=p,this.originalCSS=p,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let c;this.isInline()?c="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?c=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?c=this.mapOpts.annotation(this.opts.to,this.root):c=this.outputFile()+".map";let h=`
61
+ `?(n=1,f+=1):n+=1;return{column:n,line:f}}prev(){if(!this.parent)return;let u=this.parent.index(this);return this.parent.nodes[u-1]}rangeBy(u){let n={column:this.source.start.column,line:this.source.start.line},f=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:n.column+1,line:n.line};if(u.word){let c="document"in this.source.input?this.source.input.document:this.source.input.css,m=c.slice(o(c,this.source.start),o(c,this.source.end)).indexOf(u.word);m!==-1&&(n=this.positionInside(m),f=this.positionInside(m+u.word.length))}else u.start?n={column:u.start.column,line:u.start.line}:u.index&&(n=this.positionInside(u.index)),u.end?f={column:u.end.column,line:u.end.line}:typeof u.endIndex=="number"?f=this.positionInside(u.endIndex):u.index&&(f=this.positionInside(u.index+1));return(f.line<n.line||f.line===n.line&&f.column<=n.column)&&(f={column:n.column+1,line:n.line}),{end:f,start:n}}raw(u,n){return new t().raw(this,u,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...u){if(this.parent){let n=this,f=!1;for(let c of u)c===this?f=!0:f?(this.parent.insertAfter(n,c),n=c):this.parent.insertBefore(n,c);f||this.remove()}return this}root(){let u=this;for(;u.parent&&u.parent.type!=="document";)u=u.parent;return u}toJSON(u,n){let f={},c=n==null;n=n||new Map;let h=0;for(let m in this){if(!Object.prototype.hasOwnProperty.call(this,m)||m==="parent"||m==="proxyCache")continue;let p=this[m];if(Array.isArray(p))f[m]=p.map(g=>typeof g=="object"&&g.toJSON?g.toJSON(null,n):g);else if(typeof p=="object"&&p.toJSON)f[m]=p.toJSON(null,n);else if(m==="source"){let g=n.get(p.input);g==null&&(g=h,n.set(p.input,h),h++),f[m]={end:p.end,inputId:g,start:p.start}}else f[m]=p}return c&&(f.inputs=[...n.keys()].map(m=>m.toJSON())),f}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(u=r){u.stringify&&(u=u.stringify);let n="";return u(this,f=>{n+=f}),n}warn(u,n,f){let c={node:this};for(let h in f)c[h]=f[h];return u.warn(n,c)}get proxyOf(){return this}}return xr=l,l.default=l,xr}var Mr,zi;function at(){if(zi)return Mr;zi=1;let e=Bt();class t extends e{constructor(s){super(s),this.type="comment"}}return Mr=t,t.default=t,Mr}var Nr,qi;function $t(){if(qi)return Nr;qi=1;let e=Bt();class t extends e{constructor(s){s&&typeof s.value!="undefined"&&typeof s.value!="string"&&(s=se(L({},s),{value:String(s.value)})),super(s),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return Nr=t,t.default=t,Nr}var Or,Vi;function Le(){if(Vi)return Or;Vi=1;let e=at(),t=$t(),r=Bt(),{isClean:s,my:i}=Cs(),a,o,l,d;function u(c){return c.map(h=>(h.nodes&&(h.nodes=u(h.nodes)),delete h.source,h))}function n(c){if(c[s]=!1,c.proxyOf.nodes)for(let h of c.proxyOf.nodes)n(h)}class f extends r{append(...h){for(let m of h){let p=this.normalize(m,this.last);for(let g of p)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(h){if(super.cleanRaws(h),this.nodes)for(let m of this.nodes)m.cleanRaws(h)}each(h){if(!this.proxyOf.nodes)return;let m=this.getIterator(),p,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(p=this.indexes[m],g=h(this.proxyOf.nodes[p],p),g!==!1);)this.indexes[m]+=1;return delete this.indexes[m],g}every(h){return this.nodes.every(h)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let h=this.lastEach;return this.indexes[h]=0,h}getProxyProcessor(){return{get(h,m){return m==="proxyOf"?h:h[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...p)=>h[m](...p.map(g=>typeof g=="function"?(w,y)=>g(w.toProxy(),y):g)):m==="every"||m==="some"?p=>h[m]((g,...w)=>p(g.toProxy(),...w)):m==="root"?()=>h.root().toProxy():m==="nodes"?h.nodes.map(p=>p.toProxy()):m==="first"||m==="last"?h[m].toProxy():h[m]:h[m]},set(h,m,p){return h[m]===p||(h[m]=p,(m==="name"||m==="params"||m==="selector")&&h.markDirty()),!0}}}index(h){return typeof h=="number"?h:(h.proxyOf&&(h=h.proxyOf),this.proxyOf.nodes.indexOf(h))}insertAfter(h,m){let p=this.index(h),g=this.normalize(m,this.proxyOf.nodes[p]).reverse();p=this.index(h);for(let y of g)this.proxyOf.nodes.splice(p+1,0,y);let w;for(let y in this.indexes)w=this.indexes[y],p<w&&(this.indexes[y]=w+g.length);return this.markDirty(),this}insertBefore(h,m){let p=this.index(h),g=p===0?"prepend":!1,w=this.normalize(m,this.proxyOf.nodes[p],g).reverse();p=this.index(h);for(let b of w)this.proxyOf.nodes.splice(p,0,b);let y;for(let b in this.indexes)y=this.indexes[b],p<=y&&(this.indexes[b]=y+w.length);return this.markDirty(),this}normalize(h,m){if(typeof h=="string")h=u(o(h).nodes);else if(typeof h=="undefined")h=[];else if(Array.isArray(h)){h=h.slice(0);for(let g of h)g.parent&&g.parent.removeChild(g,"ignore")}else if(h.type==="root"&&this.type!=="document"){h=h.nodes.slice(0);for(let g of h)g.parent&&g.parent.removeChild(g,"ignore")}else if(h.type)h=[h];else if(h.prop){if(typeof h.value=="undefined")throw new Error("Value field is missed in node creation");typeof h.value!="string"&&(h.value=String(h.value)),h=[new t(h)]}else if(h.selector||h.selectors)h=[new d(h)];else if(h.name)h=[new a(h)];else if(h.text)h=[new e(h)];else throw new Error("Unknown node type in node creation");return h.map(g=>(g[i]||f.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[s]&&n(g),g.raws||(g.raws={}),typeof g.raws.before=="undefined"&&m&&typeof m.raws.before!="undefined"&&(g.raws.before=m.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...h){h=h.reverse();for(let m of h){let p=this.normalize(m,this.first,"prepend").reverse();for(let g of p)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+p.length}return this.markDirty(),this}push(h){return h.parent=this,this.proxyOf.nodes.push(h),this}removeAll(){for(let h of this.proxyOf.nodes)h.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(h){h=this.index(h),this.proxyOf.nodes[h].parent=void 0,this.proxyOf.nodes.splice(h,1);let m;for(let p in this.indexes)m=this.indexes[p],m>=h&&(this.indexes[p]=m-1);return this.markDirty(),this}replaceValues(h,m,p){return p||(p=m,m={}),this.walkDecls(g=>{m.props&&!m.props.includes(g.prop)||m.fast&&!g.value.includes(m.fast)||(g.value=g.value.replace(h,p))}),this.markDirty(),this}some(h){return this.nodes.some(h)}walk(h){return this.each((m,p)=>{let g;try{g=h(m,p)}catch(w){throw m.addToError(w)}return g!==!1&&m.walk&&(g=m.walk(h)),g})}walkAtRules(h,m){return m?h instanceof RegExp?this.walk((p,g)=>{if(p.type==="atrule"&&h.test(p.name))return m(p,g)}):this.walk((p,g)=>{if(p.type==="atrule"&&p.name===h)return m(p,g)}):(m=h,this.walk((p,g)=>{if(p.type==="atrule")return m(p,g)}))}walkComments(h){return this.walk((m,p)=>{if(m.type==="comment")return h(m,p)})}walkDecls(h,m){return m?h instanceof RegExp?this.walk((p,g)=>{if(p.type==="decl"&&h.test(p.prop))return m(p,g)}):this.walk((p,g)=>{if(p.type==="decl"&&p.prop===h)return m(p,g)}):(m=h,this.walk((p,g)=>{if(p.type==="decl")return m(p,g)}))}walkRules(h,m){return m?h instanceof RegExp?this.walk((p,g)=>{if(p.type==="rule"&&h.test(p.selector))return m(p,g)}):this.walk((p,g)=>{if(p.type==="rule"&&p.selector===h)return m(p,g)}):(m=h,this.walk((p,g)=>{if(p.type==="rule")return m(p,g)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return f.registerParse=c=>{o=c},f.registerRule=c=>{d=c},f.registerAtRule=c=>{a=c},f.registerRoot=c=>{l=c},Or=f,f.default=f,f.rebuild=c=>{c.type==="atrule"?Object.setPrototypeOf(c,a.prototype):c.type==="rule"?Object.setPrototypeOf(c,d.prototype):c.type==="decl"?Object.setPrototypeOf(c,t.prototype):c.type==="comment"?Object.setPrototypeOf(c,e.prototype):c.type==="root"&&Object.setPrototypeOf(c,l.prototype),c[i]=!0,c.nodes&&c.nodes.forEach(h=>{f.rebuild(h)})},Or}var Ir,ji;function Es(){if(ji)return Ir;ji=1;let e=Le();class t extends e{constructor(s){super(s),this.type="atrule"}append(...s){return this.proxyOf.nodes||(this.nodes=[]),super.append(...s)}prepend(...s){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...s)}}return Ir=t,t.default=t,e.registerAtRule(t),Ir}var Dr,Gi;function Rs(){if(Gi)return Dr;Gi=1;let e=Le(),t,r;class s extends e{constructor(a){super(L({type:"document"},a)),this.nodes||(this.nodes=[])}toResult(a={}){return new t(new r,this,a).stringify()}}return s.registerLazyResult=i=>{t=i},s.registerProcessor=i=>{r=i},Dr=s,s.default=s,Dr}var Ar,Hi;function wl(){if(Hi)return Ar;Hi=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return Ar={nanoid:(s=21)=>{let i="",a=s|0;for(;a--;)i+=e[Math.random()*64|0];return i},customAlphabet:(s,i=21)=>(a=i)=>{let o="",l=a|0;for(;l--;)o+=s[Math.random()*s.length|0];return o}},Ar}var Tr,Yi;function so(){if(Yi)return Tr;Yi=1;let{existsSync:e,readFileSync:t}=pe,{dirname:r,join:s}=pe,{SourceMapConsumer:i,SourceMapGenerator:a}=pe;function o(d){return Buffer?Buffer.from(d,"base64").toString():window.atob(d)}class l{constructor(u,n){if(n.map===!1)return;this.loadAnnotation(u),this.inline=this.startWith(this.annotation,"data:");let f=n.map?n.map.prev:void 0,c=this.loadMap(n.from,f);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=r(this.mapFile)),c&&(this.text=c)}consumer(){return this.consumerCache||(this.consumerCache=new i(this.text)),this.consumerCache}decodeInline(u){let n=/^data:application\/json;charset=utf-?8;base64,/,f=/^data:application\/json;base64,/,c=/^data:application\/json;charset=utf-?8,/,h=/^data:application\/json,/,m=u.match(c)||u.match(h);if(m)return decodeURIComponent(u.substr(m[0].length));let p=u.match(n)||u.match(f);if(p)return o(u.substr(p[0].length));let g=u.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+g)}getAnnotationURL(u){return u.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(u){return typeof u!="object"?!1:typeof u.mappings=="string"||typeof u._mappings=="string"||Array.isArray(u.sections)}loadAnnotation(u){let n=u.match(/\/\*\s*# sourceMappingURL=/g);if(!n)return;let f=u.lastIndexOf(n.pop()),c=u.indexOf("*/",f);f>-1&&c>-1&&(this.annotation=this.getAnnotationURL(u.substring(f,c)))}loadFile(u){if(this.root=r(u),e(u))return this.mapFile=u,t(u,"utf-8").toString().trim()}loadMap(u,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let f=n(u);if(f){let c=this.loadFile(f);if(!c)throw new Error("Unable to load previous source map: "+f.toString());return c}}else{if(n instanceof i)return a.fromSourceMap(n).toString();if(n instanceof a)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let f=this.annotation;return u&&(f=s(r(u),f)),this.loadFile(f)}}}startWith(u,n){return u?u.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Tr=l,l.default=l,Tr}var _r,Ji;function Wt(){if(Ji)return _r;Ji=1;let{nanoid:e}=wl(),{isAbsolute:t,resolve:r}=pe,{SourceMapConsumer:s,SourceMapGenerator:i}=pe,{fileURLToPath:a,pathToFileURL:o}=pe,l=Ss(),d=so(),u=pe,n=Symbol("fromOffsetCache"),f=!!(s&&i),c=!!(r&&t);class h{constructor(p,g={}){if(p===null||typeof p=="undefined"||typeof p=="object"&&!p.toString)throw new Error(`PostCSS received ${p} instead of CSS string`);if(this.css=p.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,g.document&&(this.document=g.document.toString()),g.from&&(!c||/^\w+:\/\//.test(g.from)||t(g.from)?this.file=g.from:this.file=r(g.from)),c&&f){let w=new d(this.css,g);if(w.text){this.map=w;let y=w.consumer().file;!this.file&&y&&(this.file=this.mapResolve(y))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(p,g,w,y={}){let b,C,v;if(g&&typeof g=="object"){let E=g,R=w;if(typeof E.offset=="number"){let I=this.fromOffset(E.offset);g=I.line,w=I.col}else g=E.line,w=E.column;if(typeof R.offset=="number"){let I=this.fromOffset(R.offset);C=I.line,b=I.col}else C=R.line,b=R.column}else if(!w){let E=this.fromOffset(g);g=E.line,w=E.col}let S=this.origin(g,w,C,b);return S?v=new l(p,S.endLine===void 0?S.line:{column:S.column,line:S.line},S.endLine===void 0?S.column:{column:S.endColumn,line:S.endLine},S.source,S.file,y.plugin):v=new l(p,C===void 0?g:{column:w,line:g},C===void 0?w:{column:b,line:C},this.css,this.file,y.plugin),v.input={column:w,endColumn:b,endLine:C,line:g,source:this.css},this.file&&(o&&(v.input.url=o(this.file).toString()),v.input.file=this.file),v}fromOffset(p){let g,w;if(this[n])w=this[n];else{let b=this.css.split(`
62
+ `);w=new Array(b.length);let C=0;for(let v=0,S=b.length;v<S;v++)w[v]=C,C+=b[v].length+1;this[n]=w}g=w[w.length-1];let y=0;if(p>=g)y=w.length-1;else{let b=w.length-2,C;for(;y<b;)if(C=y+(b-y>>1),p<w[C])b=C-1;else if(p>=w[C+1])y=C+1;else{y=C;break}}return{col:p-w[y]+1,line:y+1}}mapResolve(p){return/^\w+:\/\//.test(p)?p:r(this.map.consumer().sourceRoot||this.map.root||".",p)}origin(p,g,w,y){if(!this.map)return!1;let b=this.map.consumer(),C=b.originalPositionFor({column:g,line:p});if(!C.source)return!1;let v;typeof w=="number"&&(v=b.originalPositionFor({column:y,line:w}));let S;t(C.source)?S=o(C.source):S=new URL(C.source,this.map.consumer().sourceRoot||o(this.map.mapFile));let E={column:C.column,endColumn:v&&v.column,endLine:v&&v.line,line:C.line,url:S.toString()};if(S.protocol==="file:")if(a)E.file=a(S);else throw new Error("file: protocol is not available in this PostCSS build");let R=b.sourceContentFor(C.source);return R&&(E.source=R),E}toJSON(){let p={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(p[g]=this[g]);return this.map&&(p.map=L({},this.map),p.map.consumerCache&&(p.map.consumerCache=void 0)),p}get from(){return this.file||this.id}}return _r=h,h.default=h,u&&u.registerInput&&u.registerInput(h),_r}var Pr,Xi;function lt(){if(Xi)return Pr;Xi=1;let e=Le(),t,r;class s extends e{constructor(a){super(a),this.type="root",this.nodes||(this.nodes=[])}normalize(a,o,l){let d=super.normalize(a);if(o){if(l==="prepend")this.nodes.length>1?o.raws.before=this.nodes[1].raws.before:delete o.raws.before;else if(this.first!==o)for(let u of d)u.raws.before=o.raws.before}return d}removeChild(a,o){let l=this.index(a);return!o&&l===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[l].raws.before),super.removeChild(a)}toResult(a={}){return new t(new r,this,a).stringify()}}return s.registerLazyResult=i=>{t=i},s.registerProcessor=i=>{r=i},Pr=s,s.default=s,e.registerRoot(s),Pr}var kr,Qi;function io(){if(Qi)return kr;Qi=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let r=[" ",`
63
+ `," "];return e.split(t,r)},split(t,r,s){let i=[],a="",o=!1,l=0,d=!1,u="",n=!1;for(let f of t)n?n=!1:f==="\\"?n=!0:d?f===u&&(d=!1):f==='"'||f==="'"?(d=!0,u=f):f==="("?l+=1:f===")"?l>0&&(l-=1):l===0&&r.includes(f)&&(o=!0),o?(a!==""&&i.push(a.trim()),a="",o=!1):a+=f;return(s||a!=="")&&i.push(a.trim()),i}};return kr=e,e.default=e,kr}var Lr,Ki;function xs(){if(Ki)return Lr;Ki=1;let e=Le(),t=io();class r extends e{constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(i){let a=this.selector?this.selector.match(/,\s*/):null,o=a?a[0]:","+this.raw("between","beforeOpen");this.selector=i.join(o)}}return Lr=r,r.default=r,e.registerRule(r),Lr}var Fr,Zi;function bl(){if(Zi)return Fr;Zi=1;let e=Es(),t=at(),r=$t(),s=Wt(),i=so(),a=lt(),o=xs();function l(d,u){if(Array.isArray(d))return d.map(m=>l(m));let c=d,{inputs:n}=c,f=Ue(c,["inputs"]);if(n){u=[];for(let m of n){let p=se(L({},m),{__proto__:s.prototype});p.map&&(p.map=se(L({},p.map),{__proto__:i.prototype})),u.push(p)}}if(f.nodes&&(f.nodes=d.nodes.map(m=>l(m,u))),f.source){let h=f.source,{inputId:m}=h,p=Ue(h,["inputId"]);f.source=p,m!=null&&(f.source.input=u[m])}if(f.type==="root")return new a(f);if(f.type==="decl")return new r(f);if(f.type==="rule")return new o(f);if(f.type==="comment")return new t(f);if(f.type==="atrule")return new e(f);throw new Error("Unknown node type: "+d.type)}return Fr=l,l.default=l,Fr}var Ur,en;function no(){if(en)return Ur;en=1;let{dirname:e,relative:t,resolve:r,sep:s}=pe,{SourceMapConsumer:i,SourceMapGenerator:a}=pe,{pathToFileURL:o}=pe,l=Wt(),d=!!(i&&a),u=!!(e&&r&&t&&s);class n{constructor(c,h,m,p){this.stringify=c,this.mapOpts=m.map||{},this.root=h,this.opts=m,this.css=p,this.originalCSS=p,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let c;this.isInline()?c="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?c=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?c=this.mapOpts.annotation(this.opts.to,this.root):c=this.outputFile()+".map";let h=`
64
64
  `;this.css.includes(`\r
65
65
  `)&&(h=`\r
66
66
  `),this.css+=h+"/*# sourceMappingURL="+c+" */"}applyPrevMaps(){for(let c of this.previous()){let h=this.toUrl(this.path(c.file)),m=c.root||e(c.file),p;this.mapOpts.sourcesContent===!1?(p=new i(c.text),p.sourcesContent&&(p.sourcesContent=null)):p=c.consumer(),this.map.applySourceMap(p,h,this.toUrl(this.path(m)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let c;for(let h=this.root.nodes.length-1;h>=0;h--)c=this.root.nodes[h],c.type==="comment"&&c.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(h)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),u&&d&&this.isMap())return this.generateMap();{let c="";return this.stringify(this.root,h=>{c+=h}),[c]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let c=this.previous()[0].consumer();c.file=this.outputFile(),this.map=a.fromSourceMap(c,{ignoreInvalidMapping:!0})}else this.map=new a({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 a({file:this.outputFile(),ignoreInvalidMapping:!0});let c=1,h=1,m="<no source>",p={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,w;this.stringify(this.root,(y,b,C)=>{if(this.css+=y,b&&C!=="end"&&(p.generated.line=c,p.generated.column=h-1,b.source&&b.source.start?(p.source=this.sourcePath(b),p.original.line=b.source.start.line,p.original.column=b.source.start.column-1,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,this.map.addMapping(p))),w=y.match(/\n/g),w?(c+=w.length,g=y.lastIndexOf(`
67
- `),h=y.length-g):h+=y.length,b&&C!=="start"){let v=b.parent||{raws:{}};(!(b.type==="decl"||b.type==="atrule"&&!b.nodes)||b!==v.last||v.raws.semicolon)&&(b.source&&b.source.end?(p.source=this.sourcePath(b),p.original.line=b.source.end.line,p.original.column=b.source.end.column-1,p.generated.line=c,p.generated.column=h-2,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,p.generated.line=c,p.generated.column=h-1,this.map.addMapping(p)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(c=>c.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let c=this.mapOpts.annotation;return typeof c!="undefined"&&c!==!0?!1:this.previous().length?this.previous().some(h=>h.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(c=>c.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(c){if(this.mapOpts.absolute||c.charCodeAt(0)===60||/^\w+:\/\//.test(c))return c;let h=this.memoizedPaths.get(c);if(h)return h;let m=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=e(r(m,this.mapOpts.annotation)));let p=t(m,c);return this.memoizedPaths.set(c,p),p}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(c=>{if(c.source&&c.source.input.map){let h=c.source.input.map;this.previousMaps.includes(h)||this.previousMaps.push(h)}});else{let c=new l(this.originalCSS,this.opts);c.map&&this.previousMaps.push(c.map)}return this.previousMaps}setSourcesContent(){let c={};if(this.root)this.root.walk(h=>{if(h.source){let m=h.source.input.from;if(m&&!c[m]){c[m]=!0;let p=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(p,h.source.input.css)}}});else if(this.css){let h=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(h,this.css)}}sourcePath(c){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(c.source.input.from):this.toUrl(this.path(c.source.input.from))}toBase64(c){return Buffer?Buffer.from(c).toString("base64"):window.btoa(unescape(encodeURIComponent(c)))}toFileUrl(c){let h=this.memoizedFileURLs.get(c);if(h)return h;if(o){let m=o(c).toString();return this.memoizedFileURLs.set(c,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(c){let h=this.memoizedURLs.get(c);if(h)return h;s==="\\"&&(c=c.replace(/\\/g,"/"));let m=encodeURI(c).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(c,m),m}}return Ur=n,Ur}var Br,rn;function oo(){if(rn)return Br;rn=1;const e=39,t=34,r=92,s=47,i=10,a=32,o=12,l=9,d=13,u=91,n=93,f=40,c=41,h=123,m=125,p=59,g=42,w=58,y=64,b=/[\t\n\f\r "#'()/;[\\\]{}]/g,C=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,v=/.[\r\n"'(/\\]/,S=/[\da-f]/i;return Br=function(R,I={}){let O=R.css.valueOf(),F=I.ignoreErrors,D,re,ie,x,Z,P,V,ee,X,be,Ee=O.length,N=0,ge=[],ce=[];function Qe(){return N}function le(k){throw R.error("Unclosed "+k,N)}function he(){return ce.length===0&&N>=Ee}function _e(k){if(ce.length)return ce.pop();if(N>=Ee)return;let te=k?k.ignoreUnclosed:!1;switch(D=O.charCodeAt(N),D){case i:case a:case l:case d:case o:{x=N;do x+=1,D=O.charCodeAt(x);while(D===a||D===i||D===l||D===d||D===o);P=["space",O.slice(N,x)],N=x-1;break}case u:case n:case h:case m:case w:case p:case c:{let j=String.fromCharCode(D);P=[j,j,N];break}case f:{if(be=ge.length?ge.pop()[1]:"",X=O.charCodeAt(N+1),be==="url"&&X!==e&&X!==t&&X!==a&&X!==i&&X!==l&&X!==o&&X!==d){x=N;do{if(V=!1,x=O.indexOf(")",x+1),x===-1)if(F||te){x=N;break}else le("bracket");for(ee=x;O.charCodeAt(ee-1)===r;)ee-=1,V=!V}while(V);P=["brackets",O.slice(N,x+1),N,x],N=x}else x=O.indexOf(")",N+1),re=O.slice(N,x+1),x===-1||v.test(re)?P=["(","(",N]:(P=["brackets",re,N,x],N=x);break}case e:case t:{Z=D===e?"'":'"',x=N;do{if(V=!1,x=O.indexOf(Z,x+1),x===-1)if(F||te){x=N+1;break}else le("string");for(ee=x;O.charCodeAt(ee-1)===r;)ee-=1,V=!V}while(V);P=["string",O.slice(N,x+1),N,x],N=x;break}case y:{b.lastIndex=N+1,b.test(O),b.lastIndex===0?x=O.length-1:x=b.lastIndex-2,P=["at-word",O.slice(N,x+1),N,x],N=x;break}case r:{for(x=N,ie=!0;O.charCodeAt(x+1)===r;)x+=1,ie=!ie;if(D=O.charCodeAt(x+1),ie&&D!==s&&D!==a&&D!==i&&D!==l&&D!==d&&D!==o&&(x+=1,S.test(O.charAt(x)))){for(;S.test(O.charAt(x+1));)x+=1;O.charCodeAt(x+1)===a&&(x+=1)}P=["word",O.slice(N,x+1),N,x],N=x;break}default:{D===s&&O.charCodeAt(N+1)===g?(x=O.indexOf("*/",N+2)+1,x===0&&(F||te?x=O.length:le("comment")),P=["comment",O.slice(N,x+1),N,x],N=x):(C.lastIndex=N+1,C.test(O),C.lastIndex===0?x=O.length-1:x=C.lastIndex-2,P=["word",O.slice(N,x+1),N,x],ge.push(P),N=x);break}}return N++,P}function Re(k){ce.push(k)}return{back:Re,endOfFile:he,nextToken:_e,position:Qe}},Br}var $r,sn;function ao(){if(sn)return $r;sn=1;let e=Es(),t=at(),r=$t(),s=lt(),i=xs(),a=oo();const o={empty:!0,space:!0};function l(u){for(let n=u.length-1;n>=0;n--){let f=u[n],c=f[3]||f[2];if(c)return c}}class d{constructor(n){this.input=n,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:n,start:{column:1,line:1,offset:0}}}atrule(n){let f=new e;f.name=n[1].slice(1),f.name===""&&this.unnamedAtrule(f,n),this.init(f,n[2]);let c,h,m,p=!1,g=!1,w=[],y=[];for(;!this.tokenizer.endOfFile();){if(n=this.tokenizer.nextToken(),c=n[0],c==="("||c==="["?y.push(c==="("?")":"]"):c==="{"&&y.length>0?y.push("}"):c===y[y.length-1]&&y.pop(),y.length===0)if(c===";"){f.source.end=this.getPosition(n[2]),f.source.end.offset++,this.semicolon=!0;break}else if(c==="{"){g=!0;break}else if(c==="}"){if(w.length>0){for(m=w.length-1,h=w[m];h&&h[0]==="space";)h=w[--m];h&&(f.source.end=this.getPosition(h[3]||h[2]),f.source.end.offset++)}this.end(n);break}else w.push(n);else w.push(n);if(this.tokenizer.endOfFile()){p=!0;break}}f.raws.between=this.spacesAndCommentsFromEnd(w),w.length?(f.raws.afterName=this.spacesAndCommentsFromStart(w),this.raw(f,"params",w),p&&(n=w[w.length-1],f.source.end=this.getPosition(n[3]||n[2]),f.source.end.offset++,this.spaces=f.raws.between,f.raws.between="")):(f.raws.afterName="",f.params=""),g&&(f.nodes=[],this.current=f)}checkMissedSemicolon(n){let f=this.colon(n);if(f===!1)return;let c=0,h;for(let m=f-1;m>=0&&(h=n[m],!(h[0]!=="space"&&(c+=1,c===2)));m--);throw this.input.error("Missed semicolon",h[0]==="word"?h[3]+1:h[2])}colon(n){let f=0,c,h,m;for(let[p,g]of n.entries()){if(h=g,m=h[0],m==="("&&(f+=1),m===")"&&(f-=1),f===0&&m===":")if(!c)this.doubleColon(h);else{if(c[0]==="word"&&c[1]==="progid")continue;return p}c=h}return!1}comment(n){let f=new t;this.init(f,n[2]),f.source.end=this.getPosition(n[3]||n[2]),f.source.end.offset++;let c=n[1].slice(2,-2);if(/^\s*$/.test(c))f.text="",f.raws.left=c,f.raws.right="";else{let h=c.match(/^(\s*)([^]*\S)(\s*)$/);f.text=h[2],f.raws.left=h[1],f.raws.right=h[3]}}createTokenizer(){this.tokenizer=a(this.input)}decl(n,f){let c=new r;this.init(c,n[0][2]);let h=n[n.length-1];for(h[0]===";"&&(this.semicolon=!0,n.pop()),c.source.end=this.getPosition(h[3]||h[2]||l(n)),c.source.end.offset++;n[0][0]!=="word";)n.length===1&&this.unknownWord(n),c.raws.before+=n.shift()[1];for(c.source.start=this.getPosition(n[0][2]),c.prop="";n.length;){let y=n[0][0];if(y===":"||y==="space"||y==="comment")break;c.prop+=n.shift()[1]}c.raws.between="";let m;for(;n.length;)if(m=n.shift(),m[0]===":"){c.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),c.raws.between+=m[1];(c.prop[0]==="_"||c.prop[0]==="*")&&(c.raws.before+=c.prop[0],c.prop=c.prop.slice(1));let p=[],g;for(;n.length&&(g=n[0][0],!(g!=="space"&&g!=="comment"));)p.push(n.shift());this.precheckMissedSemicolon(n);for(let y=n.length-1;y>=0;y--){if(m=n[y],m[1].toLowerCase()==="!important"){c.important=!0;let b=this.stringFrom(n,y);b=this.spacesFromEnd(n)+b,b!==" !important"&&(c.raws.important=b);break}else if(m[1].toLowerCase()==="important"){let b=n.slice(0),C="";for(let v=y;v>0;v--){let S=b[v][0];if(C.trim().startsWith("!")&&S!=="space")break;C=b.pop()[1]+C}C.trim().startsWith("!")&&(c.important=!0,c.raws.important=C,n=b)}if(m[0]!=="space"&&m[0]!=="comment")break}n.some(y=>y[0]!=="space"&&y[0]!=="comment")&&(c.raws.between+=p.map(y=>y[1]).join(""),p=[]),this.raw(c,"value",p.concat(n),f),c.value.includes(":")&&!f&&this.checkMissedSemicolon(n)}doubleColon(n){throw this.input.error("Double colon",{offset:n[2]},{offset:n[2]+n[1].length})}emptyRule(n){let f=new i;this.init(f,n[2]),f.selector="",f.raws.between="",this.current=f}end(n){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(n[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(n)}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(n){if(this.spaces+=n[1],this.current.nodes){let f=this.current.nodes[this.current.nodes.length-1];f&&f.type==="rule"&&!f.raws.ownSemicolon&&(f.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(n){let f=this.input.fromOffset(n);return{column:f.col,line:f.line,offset:n}}init(n,f){this.current.push(n),n.source={input:this.input,start:this.getPosition(f)},n.raws.before=this.spaces,this.spaces="",n.type!=="comment"&&(this.semicolon=!1)}other(n){let f=!1,c=null,h=!1,m=null,p=[],g=n[1].startsWith("--"),w=[],y=n;for(;y;){if(c=y[0],w.push(y),c==="("||c==="[")m||(m=y),p.push(c==="("?")":"]");else if(g&&h&&c==="{")m||(m=y),p.push("}");else if(p.length===0)if(c===";")if(h){this.decl(w,g);return}else break;else if(c==="{"){this.rule(w);return}else if(c==="}"){this.tokenizer.back(w.pop()),f=!0;break}else c===":"&&(h=!0);else c===p[p.length-1]&&(p.pop(),p.length===0&&(m=null));y=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(f=!0),p.length>0&&this.unclosedBracket(m),f&&h){if(!g)for(;w.length&&(y=w[w.length-1][0],!(y!=="space"&&y!=="comment"));)this.tokenizer.back(w.pop());this.decl(w,g)}else this.unknownWord(w)}parse(){let n;for(;!this.tokenizer.endOfFile();)switch(n=this.tokenizer.nextToken(),n[0]){case"space":this.spaces+=n[1];break;case";":this.freeSemicolon(n);break;case"}":this.end(n);break;case"comment":this.comment(n);break;case"at-word":this.atrule(n);break;case"{":this.emptyRule(n);break;default:this.other(n);break}this.endFile()}precheckMissedSemicolon(){}raw(n,f,c,h){let m,p,g=c.length,w="",y=!0,b,C;for(let v=0;v<g;v+=1)m=c[v],p=m[0],p==="space"&&v===g-1&&!h?y=!1:p==="comment"?(C=c[v-1]?c[v-1][0]:"empty",b=c[v+1]?c[v+1][0]:"empty",!o[C]&&!o[b]?w.slice(-1)===","?y=!1:w+=m[1]:y=!1):w+=m[1];if(!y){let v=c.reduce((S,E)=>S+E[1],"");n.raws[f]={raw:v,value:w}}n[f]=w}rule(n){n.pop();let f=new i;this.init(f,n[0][2]),f.raws.between=this.spacesAndCommentsFromEnd(n),this.raw(f,"selector",n),this.current=f}spacesAndCommentsFromEnd(n){let f,c="";for(;n.length&&(f=n[n.length-1][0],!(f!=="space"&&f!=="comment"));)c=n.pop()[1]+c;return c}spacesAndCommentsFromStart(n){let f,c="";for(;n.length&&(f=n[0][0],!(f!=="space"&&f!=="comment"));)c+=n.shift()[1];return c}spacesFromEnd(n){let f,c="";for(;n.length&&(f=n[n.length-1][0],f==="space");)c=n.pop()[1]+c;return c}stringFrom(n,f){let c="";for(let h=f;h<n.length;h++)c+=n[h][1];return n.splice(f,n.length-f),c}unclosedBlock(){let n=this.current.source.start;throw this.input.error("Unclosed block",n.line,n.column)}unclosedBracket(n){throw this.input.error("Unclosed bracket",{offset:n[2]},{offset:n[2]+1})}unexpectedClose(n){throw this.input.error("Unexpected }",{offset:n[2]},{offset:n[2]+1})}unknownWord(n){throw this.input.error("Unknown word",{offset:n[0][2]},{offset:n[0][2]+n[0][1].length})}unnamedAtrule(n,f){throw this.input.error("At-rule without name",{offset:f[2]},{offset:f[2]+f[1].length})}}return $r=d,$r}var Wr,nn;function Ms(){if(nn)return Wr;nn=1;let e=Le(),t=Wt(),r=ao();function s(i,a){let o=new t(i,a),l=new r(o);try{l.parse()}catch(d){throw d}return l.root}return Wr=s,s.default=s,e.registerParse(s),Wr}var zr,on;function lo(){if(on)return zr;on=1;class e{constructor(r,s={}){if(this.type="warning",this.text=r,s.node&&s.node.source){let i=s.node.rangeBy(s);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in s)this[i]=s[i]}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}}return zr=e,e.default=e,zr}var qr,an;function Os(){if(an)return qr;an=1;let e=lo();class t{constructor(s,i,a){this.processor=s,this.messages=[],this.root=i,this.opts=a,this.css=void 0,this.map=void 0}toString(){return this.css}warn(s,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let a=new e(s,i);return this.messages.push(a),a}warnings(){return this.messages.filter(s=>s.type==="warning")}get content(){return this.css}}return qr=t,t.default=t,qr}var Vr,ln;function uo(){if(ln)return Vr;ln=1;let e={};return Vr=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},Vr}var jr,un;function co(){if(un)return jr;un=1;let e=Le(),t=Rs(),r=no(),s=Ms(),i=Os(),a=lt(),o=Ut(),{isClean:l,my:d}=Cs(),u=uo();const n={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},f={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},c={Once:!0,postcssPlugin:!0,prepare:!0},h=0;function m(C){return typeof C=="object"&&typeof C.then=="function"}function p(C){let v=!1,S=n[C.type];return C.type==="decl"?v=C.prop.toLowerCase():C.type==="atrule"&&(v=C.name.toLowerCase()),v&&C.append?[S,S+"-"+v,h,S+"Exit",S+"Exit-"+v]:v?[S,S+"-"+v,S+"Exit",S+"Exit-"+v]:C.append?[S,h,S+"Exit"]:[S,S+"Exit"]}function g(C){let v;return C.type==="document"?v=["Document",h,"DocumentExit"]:C.type==="root"?v=["Root",h,"RootExit"]:v=p(C),{eventIndex:0,events:v,iterator:0,node:C,visitorIndex:0,visitors:[]}}function w(C){return C[l]=!1,C.nodes&&C.nodes.forEach(v=>w(v)),C}let y={};class b{constructor(v,S,E){this.stringified=!1,this.processed=!1;let R;if(typeof S=="object"&&S!==null&&(S.type==="root"||S.type==="document"))R=w(S);else if(S instanceof b||S instanceof i)R=w(S.root),S.map&&(typeof E.map=="undefined"&&(E.map={}),E.map.inline||(E.map.inline=!1),E.map.prev=S.map);else{let I=s;E.syntax&&(I=E.syntax.parse),E.parser&&(I=E.parser),I.parse&&(I=I.parse);try{R=I(S,E)}catch(O){this.processed=!0,this.error=O}R&&!R[d]&&e.rebuild(R)}this.result=new i(v,R,E),this.helpers=se(L({},y),{postcss:y,result:this.result}),this.plugins=this.processor.plugins.map(I=>typeof I=="object"&&I.prepare?L(L({},I),I.prepare(this.result)):I)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(v){return this.async().catch(v)}finally(v){return this.async().then(v,v)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(v,S){let E=this.result.lastPlugin;try{S&&S.addToError(v),this.error=v,v.name==="CssSyntaxError"&&!v.plugin?(v.plugin=E.postcssPlugin,v.setMessage()):E.postcssVersion}catch(R){console&&console.error&&console.error(R)}return v}prepareVisitors(){this.listeners={};let v=(S,E,R)=>{this.listeners[E]||(this.listeners[E]=[]),this.listeners[E].push([S,R])};for(let S of this.plugins)if(typeof S=="object")for(let E in S){if(!f[E]&&/^[A-Z]/.test(E))throw new Error(`Unknown event ${E} in ${S.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!c[E])if(typeof S[E]=="object")for(let R in S[E])R==="*"?v(S,E,S[E][R]):v(S,E+"-"+R.toLowerCase(),S[E][R]);else typeof S[E]=="function"&&v(S,E,S[E])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let v=0;v<this.plugins.length;v++){let S=this.plugins[v],E=this.runOnRoot(S);if(m(E))try{await E}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let v=this.result.root;for(;!v[l];){v[l]=!0;let S=[g(v)];for(;S.length>0;){let E=this.visitTick(S);if(m(E))try{await E}catch(R){let I=S[S.length-1].node;throw this.handleError(R,I)}}}if(this.listeners.OnceExit)for(let[S,E]of this.listeners.OnceExit){this.result.lastPlugin=S;try{if(v.type==="document"){let R=v.nodes.map(I=>E(I,this.helpers));await Promise.all(R)}else await E(v,this.helpers)}catch(R){throw this.handleError(R)}}}return this.processed=!0,this.stringify()}runOnRoot(v){this.result.lastPlugin=v;try{if(typeof v=="object"&&v.Once){if(this.result.root.type==="document"){let S=this.result.root.nodes.map(E=>v.Once(E,this.helpers));return m(S[0])?Promise.all(S):S}return v.Once(this.result.root,this.helpers)}else if(typeof v=="function")return v(this.result.root,this.result)}catch(S){throw this.handleError(S)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let v=this.result.opts,S=o;v.syntax&&(S=v.syntax.stringify),v.stringifier&&(S=v.stringifier),S.stringify&&(S=S.stringify);let R=new r(S,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let v of this.plugins){let S=this.runOnRoot(v);if(m(S))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let v=this.result.root;for(;!v[l];)v[l]=!0,this.walkSync(v);if(this.listeners.OnceExit)if(v.type==="document")for(let S of v.nodes)this.visitSync(this.listeners.OnceExit,S);else this.visitSync(this.listeners.OnceExit,v)}return this.result}then(v,S){return this.async().then(v,S)}toString(){return this.css}visitSync(v,S){for(let[E,R]of v){this.result.lastPlugin=E;let I;try{I=R(S,this.helpers)}catch(O){throw this.handleError(O,S.proxyOf)}if(S.type!=="root"&&S.type!=="document"&&!S.parent)return!0;if(m(I))throw this.getAsyncError()}}visitTick(v){let S=v[v.length-1],{node:E,visitors:R}=S;if(E.type!=="root"&&E.type!=="document"&&!E.parent){v.pop();return}if(R.length>0&&S.visitorIndex<R.length){let[O,F]=R[S.visitorIndex];S.visitorIndex+=1,S.visitorIndex===R.length&&(S.visitors=[],S.visitorIndex=0),this.result.lastPlugin=O;try{return F(E.toProxy(),this.helpers)}catch(D){throw this.handleError(D,E)}}if(S.iterator!==0){let O=S.iterator,F;for(;F=E.nodes[E.indexes[O]];)if(E.indexes[O]+=1,!F[l]){F[l]=!0,v.push(g(F));return}S.iterator=0,delete E.indexes[O]}let I=S.events;for(;S.eventIndex<I.length;){let O=I[S.eventIndex];if(S.eventIndex+=1,O===h){E.nodes&&E.nodes.length&&(E[l]=!0,S.iterator=E.getIterator());return}else if(this.listeners[O]){S.visitors=this.listeners[O];return}}v.pop()}walkSync(v){v[l]=!0;let S=p(v);for(let E of S)if(E===h)v.nodes&&v.each(R=>{R[l]||this.walkSync(R)});else{let R=this.listeners[E];if(R&&this.visitSync(R,v.toProxy()))return}}warnings(){return this.sync().warnings()}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"}}return b.registerPostcss=C=>{y=C},jr=b,b.default=b,a.registerLazyResult(b),t.registerLazyResult(b),jr}var Gr,cn;function bl(){if(cn)return Gr;cn=1;let e=no(),t=Ms();const r=Os();let s=Ut(),i=uo();class a{constructor(l,d,u){d=d.toString(),this.stringified=!1,this._processor=l,this._css=d,this._opts=u,this._map=void 0;let n,f=s;this.result=new r(this._processor,n,this._opts),this.result.css=d;let c=this;Object.defineProperty(this.result,"root",{get(){return c.root}});let h=new e(f,n,this._opts,d);if(h.isMap()){let[m,p]=h.generate();m&&(this.result.css=m),p&&(this.result.map=p)}else h.clearAnnotation(),this.result.css=h.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(l){return this.async().catch(l)}finally(l){return this.async().then(l,l)}sync(){if(this.error)throw this.error;return this.result}then(l,d){return this.async().then(l,d)}toString(){return this._css}warnings(){return[]}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 l,d=t;try{l=d(this._css,this._opts)}catch(u){this.error=u}if(this.error)throw this.error;return this._root=l,l}get[Symbol.toStringTag](){return"NoWorkResult"}}return Gr=a,a.default=a,Gr}var Hr,hn;function vl(){if(hn)return Hr;hn=1;let e=Rs(),t=co(),r=bl(),s=lt();class i{constructor(o=[]){this.version="8.5.1",this.plugins=this.normalize(o)}normalize(o){let l=[];for(let d of o)if(d.postcss===!0?d=d():d.postcss&&(d=d.postcss),typeof d=="object"&&Array.isArray(d.plugins))l=l.concat(d.plugins);else if(typeof d=="object"&&d.postcssPlugin)l.push(d);else if(typeof d=="function")l.push(d);else if(!(typeof d=="object"&&(d.parse||d.stringify)))throw new Error(d+" is not a PostCSS plugin");return l}process(o,l={}){return!this.plugins.length&&!l.parser&&!l.stringifier&&!l.syntax?new r(this,o,l):new t(this,o,l)}use(o){return this.plugins=this.plugins.concat(this.normalize([o])),this}}return Hr=i,i.default=i,s.registerProcessor(i),e.registerProcessor(i),Hr}var Yr,fn;function ho(){if(fn)return Yr;fn=1;let e=Es(),t=at(),r=Le(),s=Ss(),i=$t(),a=Rs(),o=wl(),l=Wt(),d=co(),u=io(),n=Bt(),f=Ms(),c=vl(),h=Os(),m=lt(),p=xs(),g=Ut(),w=lo();function y(...b){return b.length===1&&Array.isArray(b[0])&&(b=b[0]),new c(b)}return y.plugin=function(C,v){let S=!1;function E(...I){console&&console.warn&&!S&&(S=!0,console.warn(C+`: postcss.plugin was deprecated. Migration guide:
67
+ `),h=y.length-g):h+=y.length,b&&C!=="start"){let v=b.parent||{raws:{}};(!(b.type==="decl"||b.type==="atrule"&&!b.nodes)||b!==v.last||v.raws.semicolon)&&(b.source&&b.source.end?(p.source=this.sourcePath(b),p.original.line=b.source.end.line,p.original.column=b.source.end.column-1,p.generated.line=c,p.generated.column=h-2,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,p.generated.line=c,p.generated.column=h-1,this.map.addMapping(p)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(c=>c.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let c=this.mapOpts.annotation;return typeof c!="undefined"&&c!==!0?!1:this.previous().length?this.previous().some(h=>h.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(c=>c.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(c){if(this.mapOpts.absolute||c.charCodeAt(0)===60||/^\w+:\/\//.test(c))return c;let h=this.memoizedPaths.get(c);if(h)return h;let m=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=e(r(m,this.mapOpts.annotation)));let p=t(m,c);return this.memoizedPaths.set(c,p),p}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(c=>{if(c.source&&c.source.input.map){let h=c.source.input.map;this.previousMaps.includes(h)||this.previousMaps.push(h)}});else{let c=new l(this.originalCSS,this.opts);c.map&&this.previousMaps.push(c.map)}return this.previousMaps}setSourcesContent(){let c={};if(this.root)this.root.walk(h=>{if(h.source){let m=h.source.input.from;if(m&&!c[m]){c[m]=!0;let p=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(p,h.source.input.css)}}});else if(this.css){let h=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(h,this.css)}}sourcePath(c){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(c.source.input.from):this.toUrl(this.path(c.source.input.from))}toBase64(c){return Buffer?Buffer.from(c).toString("base64"):window.btoa(unescape(encodeURIComponent(c)))}toFileUrl(c){let h=this.memoizedFileURLs.get(c);if(h)return h;if(o){let m=o(c).toString();return this.memoizedFileURLs.set(c,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(c){let h=this.memoizedURLs.get(c);if(h)return h;s==="\\"&&(c=c.replace(/\\/g,"/"));let m=encodeURI(c).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(c,m),m}}return Ur=n,Ur}var Br,tn;function oo(){if(tn)return Br;tn=1;const e=39,t=34,r=92,s=47,i=10,a=32,o=12,l=9,d=13,u=91,n=93,f=40,c=41,h=123,m=125,p=59,g=42,w=58,y=64,b=/[\t\n\f\r "#'()/;[\\\]{}]/g,C=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,v=/.[\r\n"'(/\\]/,S=/[\da-f]/i;return Br=function(R,I={}){let N=R.css.valueOf(),F=I.ignoreErrors,D,re,ie,x,Z,P,V,ee,X,be,Ee=N.length,O=0,ge=[],ce=[];function Qe(){return O}function le(k){throw R.error("Unclosed "+k,O)}function he(){return ce.length===0&&O>=Ee}function _e(k){if(ce.length)return ce.pop();if(O>=Ee)return;let te=k?k.ignoreUnclosed:!1;switch(D=N.charCodeAt(O),D){case i:case a:case l:case d:case o:{x=O;do x+=1,D=N.charCodeAt(x);while(D===a||D===i||D===l||D===d||D===o);P=["space",N.slice(O,x)],O=x-1;break}case u:case n:case h:case m:case w:case p:case c:{let j=String.fromCharCode(D);P=[j,j,O];break}case f:{if(be=ge.length?ge.pop()[1]:"",X=N.charCodeAt(O+1),be==="url"&&X!==e&&X!==t&&X!==a&&X!==i&&X!==l&&X!==o&&X!==d){x=O;do{if(V=!1,x=N.indexOf(")",x+1),x===-1)if(F||te){x=O;break}else le("bracket");for(ee=x;N.charCodeAt(ee-1)===r;)ee-=1,V=!V}while(V);P=["brackets",N.slice(O,x+1),O,x],O=x}else x=N.indexOf(")",O+1),re=N.slice(O,x+1),x===-1||v.test(re)?P=["(","(",O]:(P=["brackets",re,O,x],O=x);break}case e:case t:{Z=D===e?"'":'"',x=O;do{if(V=!1,x=N.indexOf(Z,x+1),x===-1)if(F||te){x=O+1;break}else le("string");for(ee=x;N.charCodeAt(ee-1)===r;)ee-=1,V=!V}while(V);P=["string",N.slice(O,x+1),O,x],O=x;break}case y:{b.lastIndex=O+1,b.test(N),b.lastIndex===0?x=N.length-1:x=b.lastIndex-2,P=["at-word",N.slice(O,x+1),O,x],O=x;break}case r:{for(x=O,ie=!0;N.charCodeAt(x+1)===r;)x+=1,ie=!ie;if(D=N.charCodeAt(x+1),ie&&D!==s&&D!==a&&D!==i&&D!==l&&D!==d&&D!==o&&(x+=1,S.test(N.charAt(x)))){for(;S.test(N.charAt(x+1));)x+=1;N.charCodeAt(x+1)===a&&(x+=1)}P=["word",N.slice(O,x+1),O,x],O=x;break}default:{D===s&&N.charCodeAt(O+1)===g?(x=N.indexOf("*/",O+2)+1,x===0&&(F||te?x=N.length:le("comment")),P=["comment",N.slice(O,x+1),O,x],O=x):(C.lastIndex=O+1,C.test(N),C.lastIndex===0?x=N.length-1:x=C.lastIndex-2,P=["word",N.slice(O,x+1),O,x],ge.push(P),O=x);break}}return O++,P}function Re(k){ce.push(k)}return{back:Re,endOfFile:he,nextToken:_e,position:Qe}},Br}var $r,rn;function ao(){if(rn)return $r;rn=1;let e=Es(),t=at(),r=$t(),s=lt(),i=xs(),a=oo();const o={empty:!0,space:!0};function l(u){for(let n=u.length-1;n>=0;n--){let f=u[n],c=f[3]||f[2];if(c)return c}}class d{constructor(n){this.input=n,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:n,start:{column:1,line:1,offset:0}}}atrule(n){let f=new e;f.name=n[1].slice(1),f.name===""&&this.unnamedAtrule(f,n),this.init(f,n[2]);let c,h,m,p=!1,g=!1,w=[],y=[];for(;!this.tokenizer.endOfFile();){if(n=this.tokenizer.nextToken(),c=n[0],c==="("||c==="["?y.push(c==="("?")":"]"):c==="{"&&y.length>0?y.push("}"):c===y[y.length-1]&&y.pop(),y.length===0)if(c===";"){f.source.end=this.getPosition(n[2]),f.source.end.offset++,this.semicolon=!0;break}else if(c==="{"){g=!0;break}else if(c==="}"){if(w.length>0){for(m=w.length-1,h=w[m];h&&h[0]==="space";)h=w[--m];h&&(f.source.end=this.getPosition(h[3]||h[2]),f.source.end.offset++)}this.end(n);break}else w.push(n);else w.push(n);if(this.tokenizer.endOfFile()){p=!0;break}}f.raws.between=this.spacesAndCommentsFromEnd(w),w.length?(f.raws.afterName=this.spacesAndCommentsFromStart(w),this.raw(f,"params",w),p&&(n=w[w.length-1],f.source.end=this.getPosition(n[3]||n[2]),f.source.end.offset++,this.spaces=f.raws.between,f.raws.between="")):(f.raws.afterName="",f.params=""),g&&(f.nodes=[],this.current=f)}checkMissedSemicolon(n){let f=this.colon(n);if(f===!1)return;let c=0,h;for(let m=f-1;m>=0&&(h=n[m],!(h[0]!=="space"&&(c+=1,c===2)));m--);throw this.input.error("Missed semicolon",h[0]==="word"?h[3]+1:h[2])}colon(n){let f=0,c,h,m;for(let[p,g]of n.entries()){if(h=g,m=h[0],m==="("&&(f+=1),m===")"&&(f-=1),f===0&&m===":")if(!c)this.doubleColon(h);else{if(c[0]==="word"&&c[1]==="progid")continue;return p}c=h}return!1}comment(n){let f=new t;this.init(f,n[2]),f.source.end=this.getPosition(n[3]||n[2]),f.source.end.offset++;let c=n[1].slice(2,-2);if(/^\s*$/.test(c))f.text="",f.raws.left=c,f.raws.right="";else{let h=c.match(/^(\s*)([^]*\S)(\s*)$/);f.text=h[2],f.raws.left=h[1],f.raws.right=h[3]}}createTokenizer(){this.tokenizer=a(this.input)}decl(n,f){let c=new r;this.init(c,n[0][2]);let h=n[n.length-1];for(h[0]===";"&&(this.semicolon=!0,n.pop()),c.source.end=this.getPosition(h[3]||h[2]||l(n)),c.source.end.offset++;n[0][0]!=="word";)n.length===1&&this.unknownWord(n),c.raws.before+=n.shift()[1];for(c.source.start=this.getPosition(n[0][2]),c.prop="";n.length;){let y=n[0][0];if(y===":"||y==="space"||y==="comment")break;c.prop+=n.shift()[1]}c.raws.between="";let m;for(;n.length;)if(m=n.shift(),m[0]===":"){c.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),c.raws.between+=m[1];(c.prop[0]==="_"||c.prop[0]==="*")&&(c.raws.before+=c.prop[0],c.prop=c.prop.slice(1));let p=[],g;for(;n.length&&(g=n[0][0],!(g!=="space"&&g!=="comment"));)p.push(n.shift());this.precheckMissedSemicolon(n);for(let y=n.length-1;y>=0;y--){if(m=n[y],m[1].toLowerCase()==="!important"){c.important=!0;let b=this.stringFrom(n,y);b=this.spacesFromEnd(n)+b,b!==" !important"&&(c.raws.important=b);break}else if(m[1].toLowerCase()==="important"){let b=n.slice(0),C="";for(let v=y;v>0;v--){let S=b[v][0];if(C.trim().startsWith("!")&&S!=="space")break;C=b.pop()[1]+C}C.trim().startsWith("!")&&(c.important=!0,c.raws.important=C,n=b)}if(m[0]!=="space"&&m[0]!=="comment")break}n.some(y=>y[0]!=="space"&&y[0]!=="comment")&&(c.raws.between+=p.map(y=>y[1]).join(""),p=[]),this.raw(c,"value",p.concat(n),f),c.value.includes(":")&&!f&&this.checkMissedSemicolon(n)}doubleColon(n){throw this.input.error("Double colon",{offset:n[2]},{offset:n[2]+n[1].length})}emptyRule(n){let f=new i;this.init(f,n[2]),f.selector="",f.raws.between="",this.current=f}end(n){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(n[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(n)}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(n){if(this.spaces+=n[1],this.current.nodes){let f=this.current.nodes[this.current.nodes.length-1];f&&f.type==="rule"&&!f.raws.ownSemicolon&&(f.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(n){let f=this.input.fromOffset(n);return{column:f.col,line:f.line,offset:n}}init(n,f){this.current.push(n),n.source={input:this.input,start:this.getPosition(f)},n.raws.before=this.spaces,this.spaces="",n.type!=="comment"&&(this.semicolon=!1)}other(n){let f=!1,c=null,h=!1,m=null,p=[],g=n[1].startsWith("--"),w=[],y=n;for(;y;){if(c=y[0],w.push(y),c==="("||c==="[")m||(m=y),p.push(c==="("?")":"]");else if(g&&h&&c==="{")m||(m=y),p.push("}");else if(p.length===0)if(c===";")if(h){this.decl(w,g);return}else break;else if(c==="{"){this.rule(w);return}else if(c==="}"){this.tokenizer.back(w.pop()),f=!0;break}else c===":"&&(h=!0);else c===p[p.length-1]&&(p.pop(),p.length===0&&(m=null));y=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(f=!0),p.length>0&&this.unclosedBracket(m),f&&h){if(!g)for(;w.length&&(y=w[w.length-1][0],!(y!=="space"&&y!=="comment"));)this.tokenizer.back(w.pop());this.decl(w,g)}else this.unknownWord(w)}parse(){let n;for(;!this.tokenizer.endOfFile();)switch(n=this.tokenizer.nextToken(),n[0]){case"space":this.spaces+=n[1];break;case";":this.freeSemicolon(n);break;case"}":this.end(n);break;case"comment":this.comment(n);break;case"at-word":this.atrule(n);break;case"{":this.emptyRule(n);break;default:this.other(n);break}this.endFile()}precheckMissedSemicolon(){}raw(n,f,c,h){let m,p,g=c.length,w="",y=!0,b,C;for(let v=0;v<g;v+=1)m=c[v],p=m[0],p==="space"&&v===g-1&&!h?y=!1:p==="comment"?(C=c[v-1]?c[v-1][0]:"empty",b=c[v+1]?c[v+1][0]:"empty",!o[C]&&!o[b]?w.slice(-1)===","?y=!1:w+=m[1]:y=!1):w+=m[1];if(!y){let v=c.reduce((S,E)=>S+E[1],"");n.raws[f]={raw:v,value:w}}n[f]=w}rule(n){n.pop();let f=new i;this.init(f,n[0][2]),f.raws.between=this.spacesAndCommentsFromEnd(n),this.raw(f,"selector",n),this.current=f}spacesAndCommentsFromEnd(n){let f,c="";for(;n.length&&(f=n[n.length-1][0],!(f!=="space"&&f!=="comment"));)c=n.pop()[1]+c;return c}spacesAndCommentsFromStart(n){let f,c="";for(;n.length&&(f=n[0][0],!(f!=="space"&&f!=="comment"));)c+=n.shift()[1];return c}spacesFromEnd(n){let f,c="";for(;n.length&&(f=n[n.length-1][0],f==="space");)c=n.pop()[1]+c;return c}stringFrom(n,f){let c="";for(let h=f;h<n.length;h++)c+=n[h][1];return n.splice(f,n.length-f),c}unclosedBlock(){let n=this.current.source.start;throw this.input.error("Unclosed block",n.line,n.column)}unclosedBracket(n){throw this.input.error("Unclosed bracket",{offset:n[2]},{offset:n[2]+1})}unexpectedClose(n){throw this.input.error("Unexpected }",{offset:n[2]},{offset:n[2]+1})}unknownWord(n){throw this.input.error("Unknown word",{offset:n[0][2]},{offset:n[0][2]+n[0][1].length})}unnamedAtrule(n,f){throw this.input.error("At-rule without name",{offset:f[2]},{offset:f[2]+f[1].length})}}return $r=d,$r}var Wr,sn;function Ms(){if(sn)return Wr;sn=1;let e=Le(),t=Wt(),r=ao();function s(i,a){let o=new t(i,a),l=new r(o);try{l.parse()}catch(d){throw d}return l.root}return Wr=s,s.default=s,e.registerParse(s),Wr}var zr,nn;function lo(){if(nn)return zr;nn=1;class e{constructor(r,s={}){if(this.type="warning",this.text=r,s.node&&s.node.source){let i=s.node.rangeBy(s);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in s)this[i]=s[i]}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}}return zr=e,e.default=e,zr}var qr,on;function Ns(){if(on)return qr;on=1;let e=lo();class t{constructor(s,i,a){this.processor=s,this.messages=[],this.root=i,this.opts=a,this.css=void 0,this.map=void 0}toString(){return this.css}warn(s,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let a=new e(s,i);return this.messages.push(a),a}warnings(){return this.messages.filter(s=>s.type==="warning")}get content(){return this.css}}return qr=t,t.default=t,qr}var Vr,an;function uo(){if(an)return Vr;an=1;let e={};return Vr=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},Vr}var jr,ln;function co(){if(ln)return jr;ln=1;let e=Le(),t=Rs(),r=no(),s=Ms(),i=Ns(),a=lt(),o=Ut(),{isClean:l,my:d}=Cs(),u=uo();const n={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},f={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},c={Once:!0,postcssPlugin:!0,prepare:!0},h=0;function m(C){return typeof C=="object"&&typeof C.then=="function"}function p(C){let v=!1,S=n[C.type];return C.type==="decl"?v=C.prop.toLowerCase():C.type==="atrule"&&(v=C.name.toLowerCase()),v&&C.append?[S,S+"-"+v,h,S+"Exit",S+"Exit-"+v]:v?[S,S+"-"+v,S+"Exit",S+"Exit-"+v]:C.append?[S,h,S+"Exit"]:[S,S+"Exit"]}function g(C){let v;return C.type==="document"?v=["Document",h,"DocumentExit"]:C.type==="root"?v=["Root",h,"RootExit"]:v=p(C),{eventIndex:0,events:v,iterator:0,node:C,visitorIndex:0,visitors:[]}}function w(C){return C[l]=!1,C.nodes&&C.nodes.forEach(v=>w(v)),C}let y={};class b{constructor(v,S,E){this.stringified=!1,this.processed=!1;let R;if(typeof S=="object"&&S!==null&&(S.type==="root"||S.type==="document"))R=w(S);else if(S instanceof b||S instanceof i)R=w(S.root),S.map&&(typeof E.map=="undefined"&&(E.map={}),E.map.inline||(E.map.inline=!1),E.map.prev=S.map);else{let I=s;E.syntax&&(I=E.syntax.parse),E.parser&&(I=E.parser),I.parse&&(I=I.parse);try{R=I(S,E)}catch(N){this.processed=!0,this.error=N}R&&!R[d]&&e.rebuild(R)}this.result=new i(v,R,E),this.helpers=se(L({},y),{postcss:y,result:this.result}),this.plugins=this.processor.plugins.map(I=>typeof I=="object"&&I.prepare?L(L({},I),I.prepare(this.result)):I)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(v){return this.async().catch(v)}finally(v){return this.async().then(v,v)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(v,S){let E=this.result.lastPlugin;try{S&&S.addToError(v),this.error=v,v.name==="CssSyntaxError"&&!v.plugin?(v.plugin=E.postcssPlugin,v.setMessage()):E.postcssVersion}catch(R){console&&console.error&&console.error(R)}return v}prepareVisitors(){this.listeners={};let v=(S,E,R)=>{this.listeners[E]||(this.listeners[E]=[]),this.listeners[E].push([S,R])};for(let S of this.plugins)if(typeof S=="object")for(let E in S){if(!f[E]&&/^[A-Z]/.test(E))throw new Error(`Unknown event ${E} in ${S.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!c[E])if(typeof S[E]=="object")for(let R in S[E])R==="*"?v(S,E,S[E][R]):v(S,E+"-"+R.toLowerCase(),S[E][R]);else typeof S[E]=="function"&&v(S,E,S[E])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let v=0;v<this.plugins.length;v++){let S=this.plugins[v],E=this.runOnRoot(S);if(m(E))try{await E}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let v=this.result.root;for(;!v[l];){v[l]=!0;let S=[g(v)];for(;S.length>0;){let E=this.visitTick(S);if(m(E))try{await E}catch(R){let I=S[S.length-1].node;throw this.handleError(R,I)}}}if(this.listeners.OnceExit)for(let[S,E]of this.listeners.OnceExit){this.result.lastPlugin=S;try{if(v.type==="document"){let R=v.nodes.map(I=>E(I,this.helpers));await Promise.all(R)}else await E(v,this.helpers)}catch(R){throw this.handleError(R)}}}return this.processed=!0,this.stringify()}runOnRoot(v){this.result.lastPlugin=v;try{if(typeof v=="object"&&v.Once){if(this.result.root.type==="document"){let S=this.result.root.nodes.map(E=>v.Once(E,this.helpers));return m(S[0])?Promise.all(S):S}return v.Once(this.result.root,this.helpers)}else if(typeof v=="function")return v(this.result.root,this.result)}catch(S){throw this.handleError(S)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let v=this.result.opts,S=o;v.syntax&&(S=v.syntax.stringify),v.stringifier&&(S=v.stringifier),S.stringify&&(S=S.stringify);let R=new r(S,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let v of this.plugins){let S=this.runOnRoot(v);if(m(S))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let v=this.result.root;for(;!v[l];)v[l]=!0,this.walkSync(v);if(this.listeners.OnceExit)if(v.type==="document")for(let S of v.nodes)this.visitSync(this.listeners.OnceExit,S);else this.visitSync(this.listeners.OnceExit,v)}return this.result}then(v,S){return this.async().then(v,S)}toString(){return this.css}visitSync(v,S){for(let[E,R]of v){this.result.lastPlugin=E;let I;try{I=R(S,this.helpers)}catch(N){throw this.handleError(N,S.proxyOf)}if(S.type!=="root"&&S.type!=="document"&&!S.parent)return!0;if(m(I))throw this.getAsyncError()}}visitTick(v){let S=v[v.length-1],{node:E,visitors:R}=S;if(E.type!=="root"&&E.type!=="document"&&!E.parent){v.pop();return}if(R.length>0&&S.visitorIndex<R.length){let[N,F]=R[S.visitorIndex];S.visitorIndex+=1,S.visitorIndex===R.length&&(S.visitors=[],S.visitorIndex=0),this.result.lastPlugin=N;try{return F(E.toProxy(),this.helpers)}catch(D){throw this.handleError(D,E)}}if(S.iterator!==0){let N=S.iterator,F;for(;F=E.nodes[E.indexes[N]];)if(E.indexes[N]+=1,!F[l]){F[l]=!0,v.push(g(F));return}S.iterator=0,delete E.indexes[N]}let I=S.events;for(;S.eventIndex<I.length;){let N=I[S.eventIndex];if(S.eventIndex+=1,N===h){E.nodes&&E.nodes.length&&(E[l]=!0,S.iterator=E.getIterator());return}else if(this.listeners[N]){S.visitors=this.listeners[N];return}}v.pop()}walkSync(v){v[l]=!0;let S=p(v);for(let E of S)if(E===h)v.nodes&&v.each(R=>{R[l]||this.walkSync(R)});else{let R=this.listeners[E];if(R&&this.visitSync(R,v.toProxy()))return}}warnings(){return this.sync().warnings()}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"}}return b.registerPostcss=C=>{y=C},jr=b,b.default=b,a.registerLazyResult(b),t.registerLazyResult(b),jr}var Gr,un;function vl(){if(un)return Gr;un=1;let e=no(),t=Ms();const r=Ns();let s=Ut(),i=uo();class a{constructor(l,d,u){d=d.toString(),this.stringified=!1,this._processor=l,this._css=d,this._opts=u,this._map=void 0;let n,f=s;this.result=new r(this._processor,n,this._opts),this.result.css=d;let c=this;Object.defineProperty(this.result,"root",{get(){return c.root}});let h=new e(f,n,this._opts,d);if(h.isMap()){let[m,p]=h.generate();m&&(this.result.css=m),p&&(this.result.map=p)}else h.clearAnnotation(),this.result.css=h.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(l){return this.async().catch(l)}finally(l){return this.async().then(l,l)}sync(){if(this.error)throw this.error;return this.result}then(l,d){return this.async().then(l,d)}toString(){return this._css}warnings(){return[]}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 l,d=t;try{l=d(this._css,this._opts)}catch(u){this.error=u}if(this.error)throw this.error;return this._root=l,l}get[Symbol.toStringTag](){return"NoWorkResult"}}return Gr=a,a.default=a,Gr}var Hr,cn;function Sl(){if(cn)return Hr;cn=1;let e=Rs(),t=co(),r=vl(),s=lt();class i{constructor(o=[]){this.version="8.5.1",this.plugins=this.normalize(o)}normalize(o){let l=[];for(let d of o)if(d.postcss===!0?d=d():d.postcss&&(d=d.postcss),typeof d=="object"&&Array.isArray(d.plugins))l=l.concat(d.plugins);else if(typeof d=="object"&&d.postcssPlugin)l.push(d);else if(typeof d=="function")l.push(d);else if(!(typeof d=="object"&&(d.parse||d.stringify)))throw new Error(d+" is not a PostCSS plugin");return l}process(o,l={}){return!this.plugins.length&&!l.parser&&!l.stringifier&&!l.syntax?new r(this,o,l):new t(this,o,l)}use(o){return this.plugins=this.plugins.concat(this.normalize([o])),this}}return Hr=i,i.default=i,s.registerProcessor(i),e.registerProcessor(i),Hr}var Yr,hn;function ho(){if(hn)return Yr;hn=1;let e=Es(),t=at(),r=Le(),s=Ss(),i=$t(),a=Rs(),o=bl(),l=Wt(),d=co(),u=io(),n=Bt(),f=Ms(),c=Sl(),h=Ns(),m=lt(),p=xs(),g=Ut(),w=lo();function y(...b){return b.length===1&&Array.isArray(b[0])&&(b=b[0]),new c(b)}return y.plugin=function(C,v){let S=!1;function E(...I){console&&console.warn&&!S&&(S=!0,console.warn(C+`: postcss.plugin was deprecated. Migration guide:
68
68
  https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(C+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
69
- https://www.w3ctech.com/topic/2226`));let O=v(...I);return O.postcssPlugin=C,O.postcssVersion=new c().version,O}let R;return Object.defineProperty(E,"postcss",{get(){return R||(R=E()),R}}),E.process=function(I,O,F){return y([E(F)]).process(I,O)},E},y.stringify=g,y.parse=f,y.fromJSON=o,y.list=u,y.comment=b=>new t(b),y.atRule=b=>new e(b),y.decl=b=>new i(b),y.rule=b=>new p(b),y.root=b=>new m(b),y.document=b=>new a(b),y.CssSyntaxError=s,y.Declaration=i,y.Container=r,y.Processor=c,y.Document=a,y.Comment=t,y.Warning=w,y.AtRule=e,y.Result=h,y.Input=l,y.Rule=p,y.Root=m,y.Node=n,d.registerPostcss(y),Yr=y,y.default=y,Yr}var Jr,dn;function Sl(){if(dn)return Jr;dn=1;let e=at(),t=ao(),r=oo();class s extends t{checkMissedSemicolon(){}comment(a){let o=new e;this.init(o,a[2]);let l=this.input.fromOffset(a[3])||this.input.fromOffset(this.input.css.length-1);o.source.end={column:l.col,line:l.line,offset:a[3]+1};let d=a[1].slice(2);if(d.slice(-2)==="*/"&&(d=d.slice(0,-2)),/^\s*$/.test(d))o.text="",o.raws.left=d,o.raws.right="";else{let u=d.match(/^(\s*)([^]*\S)(\s*)$/);o.text=u[2],o.raws.left=u[1],o.raws.right=u[3]}}createTokenizer(){this.tokenizer=r(this.input,{ignoreErrors:!0})}decl(a){a.length>1&&a.some(o=>o[0]==="word")&&super.decl(a)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(a){let o=this.colon(a);if(o===!1)return;let l,d;for(l=o-1;l>=0&&a[l][0]!=="word";l--);if(l===0||l<0)return;for(d=l-1;d>=0;d--)if(a[d][0]!=="space"){d+=1;break}let u=a.slice(l),n=a.slice(d,l);a.splice(d,a.length-d),this.spaces=n.map(f=>f[1]).join(""),this.decl(u)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(a){this.spaces+=a.map(o=>o[1]).join("")}unnamedAtrule(a){a.name=""}}return Jr=s,Jr}var Xr,pn;function Cl(){if(pn)return Xr;pn=1;let{Input:e}=ho(),t=Sl();return Xr=function(s,i){let a=new e(s,i),o=new t(a);return o.parse(),o.root},Xr}Cl();var El=ho();const J=fl(El);J.stringify;J.fromJSON;J.plugin;J.parse;J.list;J.document;J.comment;J.atRule;J.rule;J.decl;J.root;J.CssSyntaxError;J.Declaration;J.Container;J.Processor;J.Document;J.Comment;J.Warning;J.AtRule;J.Result;J.Input;J.Rule;J.Root;J.Node;var $=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))($||{});function Rl(e){const t={},r=/;(?![^(]*\))/g,s=/:(.+)/,i=/\/\*.*?\*\//g;return e.replace(i,"").split(r).forEach(function(a){if(a){const o=a.split(s);o.length>1&&(t[rs(o[0].trim())]=o[1].trim())}}),t}function mn(e){const t=[];for(const r in e){const s=e[r];if(typeof s!="string")continue;const i=Nl(r);t.push(`${i}: ${s};`)}return t.join(" ")}const xl=/-([a-z])/g,Ml=/^--[a-zA-Z0-9-]+$/,rs=e=>Ml.test(e)?e:e.replace(xl,(t,r)=>r?r.toUpperCase():""),Ol=/\B([A-Z])/g,Nl=e=>e.replace(Ol,"-$1").toLowerCase();class me{constructor(...t){A(this,"parentElement",null),A(this,"parentNode",null),A(this,"ownerDocument"),A(this,"firstChild",null),A(this,"lastChild",null),A(this,"previousSibling",null),A(this,"nextSibling",null),A(this,"ELEMENT_NODE",1),A(this,"TEXT_NODE",3),A(this,"nodeType"),A(this,"nodeName"),A(this,"RRNodeType")}get childNodes(){const t=[];let r=this.firstChild;for(;r;)t.push(r),r=r.nextSibling;return t}contains(t){if(t instanceof me){if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0}else return!1;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,r){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}class Ns extends me{constructor(...t){super(t),A(this,"nodeType",9),A(this,"nodeName","#document"),A(this,"compatMode","CSS1Compat"),A(this,"RRNodeType",$.Document),A(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(t=>t.RRNodeType===$.Element&&t.tagName==="HTML")||null}get body(){var t;return((t=this.documentElement)==null?void 0:t.childNodes.find(r=>r.RRNodeType===$.Element&&r.tagName==="BODY"))||null}get head(){var t;return((t=this.documentElement)==null?void 0:t.childNodes.find(r=>r.RRNodeType===$.Element&&r.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(t){const r=t.RRNodeType;if((r===$.Element||r===$.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${r===$.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const s=Is(this,t);return s.parentElement=null,s}insertBefore(t,r){const s=t.RRNodeType;if((s===$.Element||s===$.DocumentType)&&this.childNodes.some(a=>a.RRNodeType===s))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${s===$.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const i=yo(this,t,r);return i.parentElement=null,i}removeChild(t){return wo(this,t)}open(){this.firstChild=null,this.lastChild=null}close(){}write(t){let r;if(t==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?r="-//W3C//DTD XHTML 1.0 Transitional//EN":t==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(r="-//W3C//DTD HTML 4.0 Transitional//EN"),r){const s=this.createDocumentType("html",r,"");this.open(),this.appendChild(s)}}createDocument(t,r,s){return new Ns}createDocumentType(t,r,s){const i=new fo(t,r,s);return i.ownerDocument=this,i}createElement(t){const r=new zt(t);return r.ownerDocument=this,r}createElementNS(t,r){return this.createElement(r)}createTextNode(t){const r=new po(t);return r.ownerDocument=this,r}createComment(t){const r=new mo(t);return r.ownerDocument=this,r}createCDATASection(t){const r=new go(t);return r.ownerDocument=this,r}toString(){return"RRDocument"}}class fo extends me{constructor(t,r,s){super(),A(this,"nodeType",10),A(this,"RRNodeType",$.DocumentType),A(this,"name"),A(this,"publicId"),A(this,"systemId"),A(this,"textContent",null),this.name=t,this.publicId=r,this.systemId=s,this.nodeName=t}toString(){return"RRDocumentType"}}class zt extends me{constructor(t){super(),A(this,"nodeType",1),A(this,"RRNodeType",$.Element),A(this,"tagName"),A(this,"attributes",{}),A(this,"shadowRoot",null),A(this,"scrollLeft"),A(this,"scrollTop"),this.tagName=t.toUpperCase(),this.nodeName=t.toUpperCase()}get textContent(){let t="";return this.childNodes.forEach(r=>t+=r.textContent),t}set textContent(t){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(t))}get classList(){return new Al(this.attributes.class,t=>{this.attributes.class=t})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const t=this.attributes.style?Rl(this.attributes.style):{},r=/\B([A-Z])/g;return t.setProperty=(s,i,a)=>{if(r.test(s))return;const o=rs(s);i?t[o]=i:delete t[o],a==="important"&&(t[o]+=" !important"),this.attributes.style=mn(t)},t.removeProperty=s=>{if(r.test(s))return"";const i=rs(s),a=t[i]||"";return delete t[i],this.attributes.style=mn(t),a},t}getAttribute(t){return this.attributes[t]===void 0?null:this.attributes[t]}setAttribute(t,r){this.attributes[t]=r}setAttributeNS(t,r,s){this.setAttribute(r,s)}removeAttribute(t){delete this.attributes[t]}appendChild(t){return Is(this,t)}insertBefore(t,r){return yo(this,t,r)}removeChild(t){return wo(this,t)}attachShadow(t){const r=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=r,r}dispatchEvent(t){return!0}toString(){let t="";for(const r in this.attributes)t+=`${r}="${this.attributes[r]}" `;return`${this.tagName} ${t}`}}class Il extends zt{constructor(){super(...arguments),A(this,"currentTime"),A(this,"volume"),A(this,"paused"),A(this,"muted"),A(this,"playbackRate"),A(this,"loop")}attachShadow(t){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}class Dl extends zt{constructor(){super(...arguments),A(this,"tagName","DIALOG"),A(this,"nodeName","DIALOG")}get isModal(){return this.getAttribute("rr_open_mode")==="modal"}get open(){return this.getAttribute("open")!==null}close(){this.removeAttribute("open"),this.removeAttribute("rr_open_mode")}show(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","non-modal")}showModal(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","modal")}}class po extends me{constructor(t){super(),A(this,"nodeType",3),A(this,"nodeName","#text"),A(this,"RRNodeType",$.Text),A(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRText text=${JSON.stringify(this.data)}`}}class mo extends me{constructor(t){super(),A(this,"nodeType",8),A(this,"nodeName","#comment"),A(this,"RRNodeType",$.Comment),A(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}class go extends me{constructor(t){super(),A(this,"nodeName","#cdata-section"),A(this,"nodeType",4),A(this,"RRNodeType",$.CDATA),A(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}class Al{constructor(t,r){if(A(this,"onChange"),A(this,"classes",[]),A(this,"add",(...s)=>{for(const i of s){const a=String(i);this.classes.indexOf(a)>=0||this.classes.push(a)}this.onChange&&this.onChange(this.classes.join(" "))}),A(this,"remove",(...s)=>{this.classes=this.classes.filter(i=>s.indexOf(i)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),t){const s=t.trim().split(/\s+/);this.classes.push(...s)}this.onChange=r}}function Is(e,t){return t.parentNode&&t.parentNode.removeChild(t),e.lastChild?(e.lastChild.nextSibling=t,t.previousSibling=e.lastChild):(e.firstChild=t,t.previousSibling=null),e.lastChild=t,t.nextSibling=null,t.parentNode=e,t.parentElement=e,t.ownerDocument=e.ownerDocument,t}function yo(e,t,r){if(!r)return Is(e,t);if(r.parentNode!==e)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return t===r||(t.parentNode&&t.parentNode.removeChild(t),t.previousSibling=r.previousSibling,r.previousSibling=t,t.nextSibling=r,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,t.parentElement=e,t.parentNode=e,t.ownerDocument=e.ownerDocument),t}function wo(e,t){if(t.parentNode!==e)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return t.previousSibling?t.previousSibling.nextSibling=t.nextSibling:e.firstChild=t.nextSibling,t.nextSibling?t.nextSibling.previousSibling=t.previousSibling:e.lastChild=t.previousSibling,t.previousSibling=null,t.nextSibling=null,t.parentElement=null,t.parentNode=null,t}var ue=(e=>(e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",e))(ue||{});const ss={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},Tl={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};let we=null;function Nt(e,t,r,s=t.mirror||t.ownerDocument.mirror){e=_l(e,t,r,s),bo(e,t,r,s),Pl(e,t,r)}function _l(e,t,r,s){var i;if(r.afterAppend&&!we&&(we=new WeakSet,setTimeout(()=>{we=null},0)),!Ds(e,t)){const a=It(t,r.mirror,s);(i=e.parentNode)==null||i.replaceChild(a,e),e=a}switch(t.RRNodeType){case $.Document:{if(!$e(e,t,r.mirror,s)){const a=s.getMeta(t);a&&(r.mirror.removeNodeFromMap(e),e.close(),e.open(),r.mirror.add(e,a),we==null||we.add(e))}break}case $.Element:{const a=e,o=t;switch(o.tagName){case"IFRAME":{const l=e.contentDocument;if(!l)break;Nt(l,t.contentDocument,r,s);break}}o.shadowRoot&&(a.shadowRoot||a.attachShadow({mode:"open"}),bo(a.shadowRoot,o.shadowRoot,r,s)),kl(a,o,s);break}}return e}function Pl(e,t,r){var s;switch(t.RRNodeType){case $.Document:{const i=t.scrollData;i&&r.applyScroll(i,!0);break}case $.Element:{const i=e,a=t;switch(a.scrollData&&r.applyScroll(a.scrollData,!0),a.inputData&&r.applyInput(a.inputData),a.tagName){case"AUDIO":case"VIDEO":{const o=e,l=a;l.paused!==void 0&&(l.paused?o.pause():o.play()),l.muted!==void 0&&(o.muted=l.muted),l.volume!==void 0&&(o.volume=l.volume),l.currentTime!==void 0&&(o.currentTime=l.currentTime),l.playbackRate!==void 0&&(o.playbackRate=l.playbackRate),l.loop!==void 0&&(o.loop=l.loop);break}case"CANVAS":{const o=t;if(o.rr_dataURL!==null){const l=document.createElement("img");l.onload=()=>{const d=i.getContext("2d");d&&d.drawImage(l,0,0,l.width,l.height)},l.src=o.rr_dataURL}o.canvasMutations.forEach(l=>r.applyCanvas(l.event,l.mutation,e));break}case"STYLE":{const o=i.sheet;o&&t.rules.forEach(l=>r.applyStyleSheetMutation(l,o));break}case"DIALOG":{const o=i,l=a,d=o.open,u=o.matches("dialog:modal"),n=l.open,f=l.isModal,c=u!==f,h=d!==n;if((c||d&&h)&&o.close(),n&&(h||c))try{f?o.showModal():o.show()}catch(m){console.warn(m)}break}}break}case $.Text:case $.Comment:case $.CDATA:{e.textContent!==t.data&&(e.textContent=t.data);break}}we!=null&&we.has(e)&&(we.delete(e),(s=r.afterAppend)==null||s.call(r,e,r.mirror.getId(e)))}function kl(e,t,r){const s=e.attributes,i=t.attributes;for(const a in i){const o=i[a],l=r.getMeta(t);if(l!=null&&l.isSVG&&ss[a])e.setAttributeNS(ss[a],a,o);else if(t.tagName==="CANVAS"&&a==="rr_dataURL"){const d=document.createElement("img");d.src=o,d.onload=()=>{const u=e.getContext("2d");u&&u.drawImage(d,0,0,d.width,d.height)}}else{if(t.tagName==="IFRAME"&&a==="srcdoc")continue;try{e.setAttribute(a,o)}catch(d){console.warn(d)}}}for(const{name:a}of Array.from(s))a in i||e.removeAttribute(a);t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}function bo(e,t,r,s){const i=Array.from(e.childNodes),a=t.childNodes;if(i.length===0&&a.length===0)return;let o=0,l=i.length-1,d=0,u=a.length-1,n=i[o],f=i[l],c=a[d],h=a[u],m,p;for(;o<=l&&d<=u;)if(n===void 0)n=i[++o];else if(f===void 0)f=i[--l];else if($e(n,c,r.mirror,s))n=i[++o],c=a[++d];else if($e(f,h,r.mirror,s))f=i[--l],h=a[--u];else if($e(n,h,r.mirror,s)){try{e.insertBefore(n,f.nextSibling)}catch(y){console.warn(y)}n=i[++o],h=a[--u]}else if($e(f,c,r.mirror,s)){try{e.insertBefore(f,n)}catch(y){console.warn(y)}f=i[--l],c=a[++d]}else{if(!m){m={};for(let b=o;b<=l;b++){const C=i[b];C&&r.mirror.hasNode(C)&&(m[r.mirror.getId(C)]=b)}}p=m[s.getId(c)];const y=i[p];if(p!==void 0&&y&&$e(y,c,r.mirror,s)){try{e.insertBefore(y,n)}catch(b){console.warn(b)}i[p]=void 0}else{const b=It(c,r.mirror,s);e.nodeName==="#document"&&n&&(b.nodeType===b.DOCUMENT_TYPE_NODE&&n.nodeType===n.DOCUMENT_TYPE_NODE||b.nodeType===b.ELEMENT_NODE&&n.nodeType===n.ELEMENT_NODE)&&(e.removeChild(n),r.mirror.removeNodeFromMap(n),n=i[++o]);try{e.insertBefore(b,n||null)}catch(C){console.warn(C)}}c=a[++d]}if(o>l){const y=a[u+1];let b=null;for(y&&(b=r.mirror.getNode(s.getId(y)));d<=u;++d){const C=It(a[d],r.mirror,s);try{e.insertBefore(C,b)}catch(v){console.warn(v)}}}else if(d>u)for(;o<=l;o++){const y=i[o];if(!(!y||y.parentNode!==e))try{e.removeChild(y),r.mirror.removeNodeFromMap(y)}catch(b){console.warn(b)}}let g=e.firstChild,w=t.firstChild;for(;g!==null&&w!==null;)Nt(g,w,r,s),g=g.nextSibling,w=w.nextSibling}function It(e,t,r){const s=r.getId(e),i=r.getMeta(e);let a=null;if(s>-1&&(a=t.getNode(s)),a!==null&&Ds(a,e))return a;switch(e.RRNodeType){case $.Document:a=new Document;break;case $.DocumentType:a=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case $.Element:{let o=e.tagName.toLowerCase();o=Tl[o]||o,i&&"isSVG"in i&&(i!=null&&i.isSVG)?a=document.createElementNS(ss.svg,o):a=document.createElement(e.tagName);break}case $.Text:a=document.createTextNode(e.data);break;case $.Comment:a=document.createComment(e.data);break;case $.CDATA:a=document.createCDATASection(e.data);break}i&&t.add(a,L({},i));try{we==null||we.add(a)}catch(o){}return a}function Ds(e,t){return e.nodeType!==t.nodeType?!1:e.nodeType!==e.ELEMENT_NODE||e.tagName.toUpperCase()===t.tagName}function $e(e,t,r,s){const i=r.getId(e),a=s.getId(t);return i===-1||i!==a?!1:Ds(e,t)}class Xe extends Ns{constructor(t){super(),A(this,"UNSERIALIZED_STARTING_ID",-2),A(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),A(this,"mirror",Hl()),A(this,"scrollData",null),t&&(this.mirror=t)}get unserializedId(){return this._unserializedId--}createDocument(t,r,s){return new Xe}createDocumentType(t,r,s){const i=new Ll(t,r,s);return i.ownerDocument=this,i}createElement(t){const r=t.toUpperCase();let s;switch(r){case"AUDIO":case"VIDEO":s=new Fl(r);break;case"IFRAME":s=new Wl(r,this.mirror);break;case"CANVAS":s=new Bl(r);break;case"STYLE":s=new $l(r);break;case"DIALOG":s=new Ul(r);break;default:s=new qt(r);break}return s.ownerDocument=this,s}createComment(t){const r=new ql(t);return r.ownerDocument=this,r}createCDATASection(t){const r=new Vl(t);return r.ownerDocument=this,r}createTextNode(t){const r=new zl(t);return r.ownerDocument=this,r}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}const Ll=fo;class qt extends zt{constructor(){super(...arguments),A(this,"inputData",null),A(this,"scrollData",null)}}class Fl extends Il{}class Ul extends Dl{}class Bl extends qt{constructor(){super(...arguments),A(this,"rr_dataURL",null),A(this,"canvasMutations",[])}getContext(){return null}}class $l extends qt{constructor(){super(...arguments),A(this,"rules",[])}}class Wl extends qt{constructor(t,r){super(t),A(this,"contentDocument",new Xe),this.contentDocument.mirror=r}}const zl=po,ql=mo,Vl=go;function jl(e){return e instanceof HTMLFormElement?"FORM":e.tagName.toUpperCase()}function vo(e,t,r,s){let i;switch(e.nodeType){case ue.DOCUMENT_NODE:s&&s.nodeName==="IFRAME"?i=s.contentDocument:(i=t,i.compatMode=e.compatMode);break;case ue.DOCUMENT_TYPE_NODE:{const o=e;i=t.createDocumentType(o.name,o.publicId,o.systemId);break}case ue.ELEMENT_NODE:{const o=e,l=jl(o);i=t.createElement(l);const d=i;for(const{name:u,value:n}of Array.from(o.attributes))d.attributes[u]=n;o.scrollLeft&&(d.scrollLeft=o.scrollLeft),o.scrollTop&&(d.scrollTop=o.scrollTop);break}case ue.TEXT_NODE:i=t.createTextNode(e.textContent||"");break;case ue.CDATA_SECTION_NODE:i=t.createCDATASection(e.data);break;case ue.COMMENT_NODE:i=t.createComment(e.textContent||"");break;case ue.DOCUMENT_FRAGMENT_NODE:i=s.attachShadow({mode:"open"});break;default:return null}let a=r.getMeta(e);return t instanceof Xe&&(a||(a=So(i,t.unserializedId),r.add(e,a)),t.mirror.add(i,L({},a))),i}function Gl(e,t=hl(),r=new Xe){function s(i,a){const o=vo(i,r,t,a);if(o!==null)if((a==null?void 0:a.nodeName)!=="IFRAME"&&i.nodeType!==ue.DOCUMENT_FRAGMENT_NODE&&(a==null||a.appendChild(o),o.parentNode=a,o.parentElement=a),i.nodeName==="IFRAME"){const l=i.contentDocument;l&&s(l,o)}else(i.nodeType===ue.DOCUMENT_NODE||i.nodeType===ue.ELEMENT_NODE||i.nodeType===ue.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===ue.ELEMENT_NODE&&i.shadowRoot&&s(i.shadowRoot,o),i.childNodes.forEach(l=>s(l,o)))}return s(e,null),r}function Hl(){return new Yl}class Yl{constructor(){A(this,"idNodeMap",new Map),A(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const s=(r=this.getMeta(t))==null?void 0:r.id;return s!=null?s:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const s=r.id;this.idNodeMap.set(s,t),this.nodeMetaMap.set(t,r)}replace(t,r){const s=this.getNode(t);if(s){const i=this.nodeMetaMap.get(s);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function So(e,t){switch(e.RRNodeType){case $.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case $.DocumentType:{const r=e;return{id:t,type:e.RRNodeType,name:r.name,publicId:r.publicId,systemId:r.systemId}}case $.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case $.Text:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case $.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case $.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}const gn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},yn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},yt={};function Jl(e){var t,r;const s=(r=(t=globalThis==null?void 0:globalThis.Zone)==null?void 0:t.__symbol__)==null?void 0:r.call(t,e);if(s&&globalThis[s])return globalThis[s]}function As(e){if(yt[e])return yt[e];const t=Jl(e)||globalThis[e],r=t.prototype,s=e in gn?gn[e]:void 0,i=!!(s&&s.every(l=>{var d,u;return!!((u=(d=Object.getOwnPropertyDescriptor(r,l))==null?void 0:d.get)!=null&&u.toString().includes("[native code]"))})),a=e in yn?yn[e]:void 0,o=!!(a&&a.every(l=>{var d;return typeof r[l]=="function"&&((d=r[l])==null?void 0:d.toString().includes("[native code]"))}));if(i&&o)return yt[e]=t.prototype,t.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const d=l.contentWindow;if(!d)return t.prototype;const u=d[e].prototype;return document.body.removeChild(l),u?yt[e]=u:r}catch(l){return r}}const Qr={};function Ae(e,t,r){var s;const i=`${e}.${String(r)}`;if(Qr[i])return Qr[i].call(t);const a=As(e),o=(s=Object.getOwnPropertyDescriptor(a,r))==null?void 0:s.get;return o?(Qr[i]=o,o.call(t)):t[r]}const Kr={};function Co(e,t,r){const s=`${e}.${String(r)}`;if(Kr[s])return Kr[s].bind(t);const a=As(e)[r];return typeof a!="function"?t[r]:(Kr[s]=a,a.bind(t))}function Xl(e){return Ae("Node",e,"childNodes")}function Ql(e){return Ae("Node",e,"parentNode")}function Kl(e){return Ae("Node",e,"parentElement")}function Zl(e){return Ae("Node",e,"textContent")}function eu(e,t){return Co("Node",e,"contains")(t)}function tu(e){return Co("Node",e,"getRootNode")()}function ru(e){return!e||!("host"in e)?null:Ae("ShadowRoot",e,"host")}function su(e){return e.styleSheets}function iu(e){return!e||!("shadowRoot"in e)?null:Ae("Element",e,"shadowRoot")}function nu(e,t){return Ae("Element",e,"querySelector")(t)}function ou(e,t){return Ae("Element",e,"querySelectorAll")(t)}function Eo(){return As("MutationObserver").constructor}function Fe(e,t,r){try{if(!(t in e))return()=>{};const s=e[t],i=r(s);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:s}})),e[t]=i,()=>{e[t]=s}}catch(s){return()=>{}}}const B={childNodes:Xl,parentNode:Ql,parentElement:Kl,textContent:Zl,contains:eu,getRootNode:tu,host:ru,styleSheets:su,shadowRoot:iu,querySelector:nu,querySelectorAll:ou,mutationObserver:Eo,patch:Fe};function oe(e,t,r=document){const s={capture:!0,passive:!0};return r.addEventListener(e,t,s),()=>r.removeEventListener(e,t,s)}const We=`Please stop import mirror directly. Instead of that,\r
69
+ https://www.w3ctech.com/topic/2226`));let N=v(...I);return N.postcssPlugin=C,N.postcssVersion=new c().version,N}let R;return Object.defineProperty(E,"postcss",{get(){return R||(R=E()),R}}),E.process=function(I,N,F){return y([E(F)]).process(I,N)},E},y.stringify=g,y.parse=f,y.fromJSON=o,y.list=u,y.comment=b=>new t(b),y.atRule=b=>new e(b),y.decl=b=>new i(b),y.rule=b=>new p(b),y.root=b=>new m(b),y.document=b=>new a(b),y.CssSyntaxError=s,y.Declaration=i,y.Container=r,y.Processor=c,y.Document=a,y.Comment=t,y.Warning=w,y.AtRule=e,y.Result=h,y.Input=l,y.Rule=p,y.Root=m,y.Node=n,d.registerPostcss(y),Yr=y,y.default=y,Yr}var Jr,fn;function Cl(){if(fn)return Jr;fn=1;let e=at(),t=ao(),r=oo();class s extends t{checkMissedSemicolon(){}comment(a){let o=new e;this.init(o,a[2]);let l=this.input.fromOffset(a[3])||this.input.fromOffset(this.input.css.length-1);o.source.end={column:l.col,line:l.line,offset:a[3]+1};let d=a[1].slice(2);if(d.slice(-2)==="*/"&&(d=d.slice(0,-2)),/^\s*$/.test(d))o.text="",o.raws.left=d,o.raws.right="";else{let u=d.match(/^(\s*)([^]*\S)(\s*)$/);o.text=u[2],o.raws.left=u[1],o.raws.right=u[3]}}createTokenizer(){this.tokenizer=r(this.input,{ignoreErrors:!0})}decl(a){a.length>1&&a.some(o=>o[0]==="word")&&super.decl(a)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(a){let o=this.colon(a);if(o===!1)return;let l,d;for(l=o-1;l>=0&&a[l][0]!=="word";l--);if(l===0||l<0)return;for(d=l-1;d>=0;d--)if(a[d][0]!=="space"){d+=1;break}let u=a.slice(l),n=a.slice(d,l);a.splice(d,a.length-d),this.spaces=n.map(f=>f[1]).join(""),this.decl(u)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(a){this.spaces+=a.map(o=>o[1]).join("")}unnamedAtrule(a){a.name=""}}return Jr=s,Jr}var Xr,dn;function El(){if(dn)return Xr;dn=1;let{Input:e}=ho(),t=Cl();return Xr=function(s,i){let a=new e(s,i),o=new t(a);return o.parse(),o.root},Xr}El();var Rl=ho();const J=dl(Rl);J.stringify;J.fromJSON;J.plugin;J.parse;J.list;J.document;J.comment;J.atRule;J.rule;J.decl;J.root;J.CssSyntaxError;J.Declaration;J.Container;J.Processor;J.Document;J.Comment;J.Warning;J.AtRule;J.Result;J.Input;J.Rule;J.Root;J.Node;var $=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))($||{});function xl(e){const t={},r=/;(?![^(]*\))/g,s=/:(.+)/,i=/\/\*.*?\*\//g;return e.replace(i,"").split(r).forEach(function(a){if(a){const o=a.split(s);o.length>1&&(t[rs(o[0].trim())]=o[1].trim())}}),t}function pn(e){const t=[];for(const r in e){const s=e[r];if(typeof s!="string")continue;const i=Il(r);t.push(`${i}: ${s};`)}return t.join(" ")}const Ml=/-([a-z])/g,Nl=/^--[a-zA-Z0-9-]+$/,rs=e=>Nl.test(e)?e:e.replace(Ml,(t,r)=>r?r.toUpperCase():""),Ol=/\B([A-Z])/g,Il=e=>e.replace(Ol,"-$1").toLowerCase();class me{constructor(...t){A(this,"parentElement",null),A(this,"parentNode",null),A(this,"ownerDocument"),A(this,"firstChild",null),A(this,"lastChild",null),A(this,"previousSibling",null),A(this,"nextSibling",null),A(this,"ELEMENT_NODE",1),A(this,"TEXT_NODE",3),A(this,"nodeType"),A(this,"nodeName"),A(this,"RRNodeType")}get childNodes(){const t=[];let r=this.firstChild;for(;r;)t.push(r),r=r.nextSibling;return t}contains(t){if(t instanceof me){if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0}else return!1;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,r){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}class Os extends me{constructor(...t){super(t),A(this,"nodeType",9),A(this,"nodeName","#document"),A(this,"compatMode","CSS1Compat"),A(this,"RRNodeType",$.Document),A(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(t=>t.RRNodeType===$.Element&&t.tagName==="HTML")||null}get body(){var t;return((t=this.documentElement)==null?void 0:t.childNodes.find(r=>r.RRNodeType===$.Element&&r.tagName==="BODY"))||null}get head(){var t;return((t=this.documentElement)==null?void 0:t.childNodes.find(r=>r.RRNodeType===$.Element&&r.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(t){const r=t.RRNodeType;if((r===$.Element||r===$.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${r===$.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const s=Is(this,t);return s.parentElement=null,s}insertBefore(t,r){const s=t.RRNodeType;if((s===$.Element||s===$.DocumentType)&&this.childNodes.some(a=>a.RRNodeType===s))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${s===$.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const i=yo(this,t,r);return i.parentElement=null,i}removeChild(t){return wo(this,t)}open(){this.firstChild=null,this.lastChild=null}close(){}write(t){let r;if(t==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?r="-//W3C//DTD XHTML 1.0 Transitional//EN":t==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(r="-//W3C//DTD HTML 4.0 Transitional//EN"),r){const s=this.createDocumentType("html",r,"");this.open(),this.appendChild(s)}}createDocument(t,r,s){return new Os}createDocumentType(t,r,s){const i=new fo(t,r,s);return i.ownerDocument=this,i}createElement(t){const r=new zt(t);return r.ownerDocument=this,r}createElementNS(t,r){return this.createElement(r)}createTextNode(t){const r=new po(t);return r.ownerDocument=this,r}createComment(t){const r=new mo(t);return r.ownerDocument=this,r}createCDATASection(t){const r=new go(t);return r.ownerDocument=this,r}toString(){return"RRDocument"}}class fo extends me{constructor(t,r,s){super(),A(this,"nodeType",10),A(this,"RRNodeType",$.DocumentType),A(this,"name"),A(this,"publicId"),A(this,"systemId"),A(this,"textContent",null),this.name=t,this.publicId=r,this.systemId=s,this.nodeName=t}toString(){return"RRDocumentType"}}class zt extends me{constructor(t){super(),A(this,"nodeType",1),A(this,"RRNodeType",$.Element),A(this,"tagName"),A(this,"attributes",{}),A(this,"shadowRoot",null),A(this,"scrollLeft"),A(this,"scrollTop"),this.tagName=t.toUpperCase(),this.nodeName=t.toUpperCase()}get textContent(){let t="";return this.childNodes.forEach(r=>t+=r.textContent),t}set textContent(t){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(t))}get classList(){return new Tl(this.attributes.class,t=>{this.attributes.class=t})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const t=this.attributes.style?xl(this.attributes.style):{},r=/\B([A-Z])/g;return t.setProperty=(s,i,a)=>{if(r.test(s))return;const o=rs(s);i?t[o]=i:delete t[o],a==="important"&&(t[o]+=" !important"),this.attributes.style=pn(t)},t.removeProperty=s=>{if(r.test(s))return"";const i=rs(s),a=t[i]||"";return delete t[i],this.attributes.style=pn(t),a},t}getAttribute(t){return this.attributes[t]===void 0?null:this.attributes[t]}setAttribute(t,r){this.attributes[t]=r}setAttributeNS(t,r,s){this.setAttribute(r,s)}removeAttribute(t){delete this.attributes[t]}appendChild(t){return Is(this,t)}insertBefore(t,r){return yo(this,t,r)}removeChild(t){return wo(this,t)}attachShadow(t){const r=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=r,r}dispatchEvent(t){return!0}toString(){let t="";for(const r in this.attributes)t+=`${r}="${this.attributes[r]}" `;return`${this.tagName} ${t}`}}class Dl extends zt{constructor(){super(...arguments),A(this,"currentTime"),A(this,"volume"),A(this,"paused"),A(this,"muted"),A(this,"playbackRate"),A(this,"loop")}attachShadow(t){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}class Al extends zt{constructor(){super(...arguments),A(this,"tagName","DIALOG"),A(this,"nodeName","DIALOG")}get isModal(){return this.getAttribute("rr_open_mode")==="modal"}get open(){return this.getAttribute("open")!==null}close(){this.removeAttribute("open"),this.removeAttribute("rr_open_mode")}show(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","non-modal")}showModal(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","modal")}}class po extends me{constructor(t){super(),A(this,"nodeType",3),A(this,"nodeName","#text"),A(this,"RRNodeType",$.Text),A(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRText text=${JSON.stringify(this.data)}`}}class mo extends me{constructor(t){super(),A(this,"nodeType",8),A(this,"nodeName","#comment"),A(this,"RRNodeType",$.Comment),A(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}class go extends me{constructor(t){super(),A(this,"nodeName","#cdata-section"),A(this,"nodeType",4),A(this,"RRNodeType",$.CDATA),A(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}class Tl{constructor(t,r){if(A(this,"onChange"),A(this,"classes",[]),A(this,"add",(...s)=>{for(const i of s){const a=String(i);this.classes.indexOf(a)>=0||this.classes.push(a)}this.onChange&&this.onChange(this.classes.join(" "))}),A(this,"remove",(...s)=>{this.classes=this.classes.filter(i=>s.indexOf(i)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),t){const s=t.trim().split(/\s+/);this.classes.push(...s)}this.onChange=r}}function Is(e,t){return t.parentNode&&t.parentNode.removeChild(t),e.lastChild?(e.lastChild.nextSibling=t,t.previousSibling=e.lastChild):(e.firstChild=t,t.previousSibling=null),e.lastChild=t,t.nextSibling=null,t.parentNode=e,t.parentElement=e,t.ownerDocument=e.ownerDocument,t}function yo(e,t,r){if(!r)return Is(e,t);if(r.parentNode!==e)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return t===r||(t.parentNode&&t.parentNode.removeChild(t),t.previousSibling=r.previousSibling,r.previousSibling=t,t.nextSibling=r,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,t.parentElement=e,t.parentNode=e,t.ownerDocument=e.ownerDocument),t}function wo(e,t){if(t.parentNode!==e)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return t.previousSibling?t.previousSibling.nextSibling=t.nextSibling:e.firstChild=t.nextSibling,t.nextSibling?t.nextSibling.previousSibling=t.previousSibling:e.lastChild=t.previousSibling,t.previousSibling=null,t.nextSibling=null,t.parentElement=null,t.parentNode=null,t}var ue=(e=>(e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",e))(ue||{});const ss={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},_l={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};let we=null;function Ot(e,t,r,s=t.mirror||t.ownerDocument.mirror){e=Pl(e,t,r,s),bo(e,t,r,s),kl(e,t,r)}function Pl(e,t,r,s){var i;if(r.afterAppend&&!we&&(we=new WeakSet,setTimeout(()=>{we=null},0)),!Ds(e,t)){const a=It(t,r.mirror,s);(i=e.parentNode)==null||i.replaceChild(a,e),e=a}switch(t.RRNodeType){case $.Document:{if(!$e(e,t,r.mirror,s)){const a=s.getMeta(t);a&&(r.mirror.removeNodeFromMap(e),e.close(),e.open(),r.mirror.add(e,a),we==null||we.add(e))}break}case $.Element:{const a=e,o=t;switch(o.tagName){case"IFRAME":{const l=e.contentDocument;if(!l)break;Ot(l,t.contentDocument,r,s);break}}o.shadowRoot&&(a.shadowRoot||a.attachShadow({mode:"open"}),bo(a.shadowRoot,o.shadowRoot,r,s)),Ll(a,o,s);break}}return e}function kl(e,t,r){var s;switch(t.RRNodeType){case $.Document:{const i=t.scrollData;i&&r.applyScroll(i,!0);break}case $.Element:{const i=e,a=t;switch(a.scrollData&&r.applyScroll(a.scrollData,!0),a.inputData&&r.applyInput(a.inputData),a.tagName){case"AUDIO":case"VIDEO":{const o=e,l=a;l.paused!==void 0&&(l.paused?o.pause():o.play()),l.muted!==void 0&&(o.muted=l.muted),l.volume!==void 0&&(o.volume=l.volume),l.currentTime!==void 0&&(o.currentTime=l.currentTime),l.playbackRate!==void 0&&(o.playbackRate=l.playbackRate),l.loop!==void 0&&(o.loop=l.loop);break}case"CANVAS":{const o=t;if(o.rr_dataURL!==null){const l=document.createElement("img");l.onload=()=>{const d=i.getContext("2d");d&&d.drawImage(l,0,0,l.width,l.height)},l.src=o.rr_dataURL}o.canvasMutations.forEach(l=>r.applyCanvas(l.event,l.mutation,e));break}case"STYLE":{const o=i.sheet;o&&t.rules.forEach(l=>r.applyStyleSheetMutation(l,o));break}case"DIALOG":{const o=i,l=a,d=o.open,u=o.matches("dialog:modal"),n=l.open,f=l.isModal,c=u!==f,h=d!==n;if((c||d&&h)&&o.close(),n&&(h||c))try{f?o.showModal():o.show()}catch(m){console.warn(m)}break}}break}case $.Text:case $.Comment:case $.CDATA:{e.textContent!==t.data&&(e.textContent=t.data);break}}we!=null&&we.has(e)&&(we.delete(e),(s=r.afterAppend)==null||s.call(r,e,r.mirror.getId(e)))}function Ll(e,t,r){const s=e.attributes,i=t.attributes;for(const a in i){const o=i[a],l=r.getMeta(t);if(l!=null&&l.isSVG&&ss[a])e.setAttributeNS(ss[a],a,o);else if(t.tagName==="CANVAS"&&a==="rr_dataURL"){const d=document.createElement("img");d.src=o,d.onload=()=>{const u=e.getContext("2d");u&&u.drawImage(d,0,0,d.width,d.height)}}else{if(t.tagName==="IFRAME"&&a==="srcdoc")continue;try{e.setAttribute(a,o)}catch(d){console.warn(d)}}}for(const{name:a}of Array.from(s))a in i||e.removeAttribute(a);t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}function bo(e,t,r,s){const i=Array.from(e.childNodes),a=t.childNodes;if(i.length===0&&a.length===0)return;let o=0,l=i.length-1,d=0,u=a.length-1,n=i[o],f=i[l],c=a[d],h=a[u],m,p;for(;o<=l&&d<=u;)if(n===void 0)n=i[++o];else if(f===void 0)f=i[--l];else if($e(n,c,r.mirror,s))n=i[++o],c=a[++d];else if($e(f,h,r.mirror,s))f=i[--l],h=a[--u];else if($e(n,h,r.mirror,s)){try{e.insertBefore(n,f.nextSibling)}catch(y){console.warn(y)}n=i[++o],h=a[--u]}else if($e(f,c,r.mirror,s)){try{e.insertBefore(f,n)}catch(y){console.warn(y)}f=i[--l],c=a[++d]}else{if(!m){m={};for(let b=o;b<=l;b++){const C=i[b];C&&r.mirror.hasNode(C)&&(m[r.mirror.getId(C)]=b)}}p=m[s.getId(c)];const y=i[p];if(p!==void 0&&y&&$e(y,c,r.mirror,s)){try{e.insertBefore(y,n)}catch(b){console.warn(b)}i[p]=void 0}else{const b=It(c,r.mirror,s);e.nodeName==="#document"&&n&&(b.nodeType===b.DOCUMENT_TYPE_NODE&&n.nodeType===n.DOCUMENT_TYPE_NODE||b.nodeType===b.ELEMENT_NODE&&n.nodeType===n.ELEMENT_NODE)&&(e.removeChild(n),r.mirror.removeNodeFromMap(n),n=i[++o]);try{e.insertBefore(b,n||null)}catch(C){console.warn(C)}}c=a[++d]}if(o>l){const y=a[u+1];let b=null;for(y&&(b=r.mirror.getNode(s.getId(y)));d<=u;++d){const C=It(a[d],r.mirror,s);try{e.insertBefore(C,b)}catch(v){console.warn(v)}}}else if(d>u)for(;o<=l;o++){const y=i[o];if(!(!y||y.parentNode!==e))try{e.removeChild(y),r.mirror.removeNodeFromMap(y)}catch(b){console.warn(b)}}let g=e.firstChild,w=t.firstChild;for(;g!==null&&w!==null;)Ot(g,w,r,s),g=g.nextSibling,w=w.nextSibling}function It(e,t,r){const s=r.getId(e),i=r.getMeta(e);let a=null;if(s>-1&&(a=t.getNode(s)),a!==null&&Ds(a,e))return a;switch(e.RRNodeType){case $.Document:a=new Document;break;case $.DocumentType:a=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case $.Element:{let o=e.tagName.toLowerCase();o=_l[o]||o,i&&"isSVG"in i&&(i!=null&&i.isSVG)?a=document.createElementNS(ss.svg,o):a=document.createElement(e.tagName);break}case $.Text:a=document.createTextNode(e.data);break;case $.Comment:a=document.createComment(e.data);break;case $.CDATA:a=document.createCDATASection(e.data);break}i&&t.add(a,L({},i));try{we==null||we.add(a)}catch(o){}return a}function Ds(e,t){return e.nodeType!==t.nodeType?!1:e.nodeType!==e.ELEMENT_NODE||e.tagName.toUpperCase()===t.tagName}function $e(e,t,r,s){const i=r.getId(e),a=s.getId(t);return i===-1||i!==a?!1:Ds(e,t)}class Xe extends Os{constructor(t){super(),A(this,"UNSERIALIZED_STARTING_ID",-2),A(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),A(this,"mirror",Yl()),A(this,"scrollData",null),t&&(this.mirror=t)}get unserializedId(){return this._unserializedId--}createDocument(t,r,s){return new Xe}createDocumentType(t,r,s){const i=new Fl(t,r,s);return i.ownerDocument=this,i}createElement(t){const r=t.toUpperCase();let s;switch(r){case"AUDIO":case"VIDEO":s=new Ul(r);break;case"IFRAME":s=new zl(r,this.mirror);break;case"CANVAS":s=new $l(r);break;case"STYLE":s=new Wl(r);break;case"DIALOG":s=new Bl(r);break;default:s=new qt(r);break}return s.ownerDocument=this,s}createComment(t){const r=new Vl(t);return r.ownerDocument=this,r}createCDATASection(t){const r=new jl(t);return r.ownerDocument=this,r}createTextNode(t){const r=new ql(t);return r.ownerDocument=this,r}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}const Fl=fo;class qt extends zt{constructor(){super(...arguments),A(this,"inputData",null),A(this,"scrollData",null)}}class Ul extends Dl{}class Bl extends Al{}class $l extends qt{constructor(){super(...arguments),A(this,"rr_dataURL",null),A(this,"canvasMutations",[])}getContext(){return null}}class Wl extends qt{constructor(){super(...arguments),A(this,"rules",[])}}class zl extends qt{constructor(t,r){super(t),A(this,"contentDocument",new Xe),this.contentDocument.mirror=r}}const ql=po,Vl=mo,jl=go;function Gl(e){return e instanceof HTMLFormElement?"FORM":e.tagName.toUpperCase()}function vo(e,t,r,s){let i;switch(e.nodeType){case ue.DOCUMENT_NODE:s&&s.nodeName==="IFRAME"?i=s.contentDocument:(i=t,i.compatMode=e.compatMode);break;case ue.DOCUMENT_TYPE_NODE:{const o=e;i=t.createDocumentType(o.name,o.publicId,o.systemId);break}case ue.ELEMENT_NODE:{const o=e,l=Gl(o);i=t.createElement(l);const d=i;for(const{name:u,value:n}of Array.from(o.attributes))d.attributes[u]=n;o.scrollLeft&&(d.scrollLeft=o.scrollLeft),o.scrollTop&&(d.scrollTop=o.scrollTop);break}case ue.TEXT_NODE:i=t.createTextNode(e.textContent||"");break;case ue.CDATA_SECTION_NODE:i=t.createCDATASection(e.data);break;case ue.COMMENT_NODE:i=t.createComment(e.textContent||"");break;case ue.DOCUMENT_FRAGMENT_NODE:i=s.attachShadow({mode:"open"});break;default:return null}let a=r.getMeta(e);return t instanceof Xe&&(a||(a=So(i,t.unserializedId),r.add(e,a)),t.mirror.add(i,L({},a))),i}function Hl(e,t=fl(),r=new Xe){function s(i,a){const o=vo(i,r,t,a);if(o!==null)if((a==null?void 0:a.nodeName)!=="IFRAME"&&i.nodeType!==ue.DOCUMENT_FRAGMENT_NODE&&(a==null||a.appendChild(o),o.parentNode=a,o.parentElement=a),i.nodeName==="IFRAME"){const l=i.contentDocument;l&&s(l,o)}else(i.nodeType===ue.DOCUMENT_NODE||i.nodeType===ue.ELEMENT_NODE||i.nodeType===ue.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===ue.ELEMENT_NODE&&i.shadowRoot&&s(i.shadowRoot,o),i.childNodes.forEach(l=>s(l,o)))}return s(e,null),r}function Yl(){return new Jl}class Jl{constructor(){A(this,"idNodeMap",new Map),A(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const s=(r=this.getMeta(t))==null?void 0:r.id;return s!=null?s:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const s=r.id;this.idNodeMap.set(s,t),this.nodeMetaMap.set(t,r)}replace(t,r){const s=this.getNode(t);if(s){const i=this.nodeMetaMap.get(s);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function So(e,t){switch(e.RRNodeType){case $.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case $.DocumentType:{const r=e;return{id:t,type:e.RRNodeType,name:r.name,publicId:r.publicId,systemId:r.systemId}}case $.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case $.Text:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case $.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case $.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}const mn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},gn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},yt={};function Xl(e){var t,r;const s=(r=(t=globalThis==null?void 0:globalThis.Zone)==null?void 0:t.__symbol__)==null?void 0:r.call(t,e);if(s&&globalThis[s])return globalThis[s]}function As(e){if(yt[e])return yt[e];const t=Xl(e)||globalThis[e],r=t.prototype,s=e in mn?mn[e]:void 0,i=!!(s&&s.every(l=>{var d,u;return!!((u=(d=Object.getOwnPropertyDescriptor(r,l))==null?void 0:d.get)!=null&&u.toString().includes("[native code]"))})),a=e in gn?gn[e]:void 0,o=!!(a&&a.every(l=>{var d;return typeof r[l]=="function"&&((d=r[l])==null?void 0:d.toString().includes("[native code]"))}));if(i&&o)return yt[e]=t.prototype,t.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const d=l.contentWindow;if(!d)return t.prototype;const u=d[e].prototype;return document.body.removeChild(l),u?yt[e]=u:r}catch(l){return r}}const Qr={};function Ae(e,t,r){var s;const i=`${e}.${String(r)}`;if(Qr[i])return Qr[i].call(t);const a=As(e),o=(s=Object.getOwnPropertyDescriptor(a,r))==null?void 0:s.get;return o?(Qr[i]=o,o.call(t)):t[r]}const Kr={};function Co(e,t,r){const s=`${e}.${String(r)}`;if(Kr[s])return Kr[s].bind(t);const a=As(e)[r];return typeof a!="function"?t[r]:(Kr[s]=a,a.bind(t))}function Ql(e){return Ae("Node",e,"childNodes")}function Kl(e){return Ae("Node",e,"parentNode")}function Zl(e){return Ae("Node",e,"parentElement")}function eu(e){return Ae("Node",e,"textContent")}function tu(e,t){return Co("Node",e,"contains")(t)}function ru(e){return Co("Node",e,"getRootNode")()}function su(e){return!e||!("host"in e)?null:Ae("ShadowRoot",e,"host")}function iu(e){return e.styleSheets}function nu(e){return!e||!("shadowRoot"in e)?null:Ae("Element",e,"shadowRoot")}function ou(e,t){return Ae("Element",e,"querySelector")(t)}function au(e,t){return Ae("Element",e,"querySelectorAll")(t)}function Eo(){return As("MutationObserver").constructor}function Fe(e,t,r){try{if(!(t in e))return()=>{};const s=e[t],i=r(s);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:s}})),e[t]=i,()=>{e[t]=s}}catch(s){return()=>{}}}const B={childNodes:Ql,parentNode:Kl,parentElement:Zl,textContent:eu,contains:tu,getRootNode:ru,host:su,styleSheets:iu,shadowRoot:nu,querySelector:ou,querySelectorAll:au,mutationObserver:Eo,patch:Fe};function oe(e,t,r=document){const s={capture:!0,passive:!0};return r.addEventListener(e,t,s),()=>r.removeEventListener(e,t,s)}const We=`Please stop import mirror directly. Instead of that,\r
70
70
  now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
71
- or you can use record.mirror to access the mirror instance during recording.`;exports.mirror={map:{},getId(){return console.error(We),-1},getNode(){return console.error(We),null},removeNodeFromMap(){console.error(We)},has(){return console.error(We),!1},reset(){console.error(We)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(exports.mirror=new Proxy(exports.mirror,{get(e,t,r){return t==="map"&&console.error(We),Reflect.get(e,t,r)}}));function Je(e,t,r={}){let s=null,i=0;return function(...a){const o=Date.now();!i&&r.leading===!1&&(i=o);const l=t-(o-i),d=this;l<=0||l>t?(s&&(clearTimeout(s),s=null),i=o,e.apply(d,a)):!s&&r.trailing!==!1&&(s=setTimeout(()=>{i=r.leading===!1?0:Date.now(),s=null,e.apply(d,a)},l))}}function ut(e,t,r,s,i=window){const a=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,s?r:{set(o){setTimeout(()=>{r.set.call(this,o)},0),a&&a.set&&a.set.call(this,o)}}),()=>ut(e,t,a||{},!0)}let it=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(it=()=>new Date().getTime());function Ts(e){var t,r,s,i;const a=e.document;return{left:a.scrollingElement?a.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:a.documentElement.scrollLeft||(a==null?void 0:a.body)&&((t=B.parentElement(a.body))==null?void 0:t.scrollLeft)||((r=a==null?void 0:a.body)==null?void 0:r.scrollLeft)||0,top:a.scrollingElement?a.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(a==null?void 0:a.documentElement.scrollTop)||(a==null?void 0:a.body)&&((s=B.parentElement(a.body))==null?void 0:s.scrollTop)||((i=a==null?void 0:a.body)==null?void 0:i.scrollTop)||0}}function _s(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ps(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ks(e){return e?e.nodeType===e.ELEMENT_NODE?e:B.parentElement(e):null}function ae(e,t,r,s){if(!e)return!1;const i=ks(e);if(!i)return!1;try{if(typeof t=="string"){if(i.classList.contains(t)||s&&i.closest("."+t)!==null)return!0}else if(Ot(i,t,s))return!0}catch(a){}return!!(r&&(i.matches(r)||s&&i.closest(r)!==null))}function Ro(e,t){return t.getId(e)!==-1}function Ct(e,t,r){return e.tagName==="TITLE"&&r.headTitleMutations?!0:t.getId(e)===st}function Ls(e,t){if(Ze(e))return!1;const r=t.getId(e);if(!t.has(r))return!0;const s=B.parentNode(e);return s&&s.nodeType===e.DOCUMENT_NODE?!1:s?Ls(s,t):!0}function Dt(e){return!!e.changedTouches}function Fs(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function xo(e){const t={},r=(i,a)=>{const o={value:i,parent:a,children:[]};return t[i.node.id]=o,o},s=[];for(const i of e){const{nextId:a,parentId:o}=i;if(a&&a in t){const l=t[a];if(l.parent){const d=l.parent.children.indexOf(l);l.parent.children.splice(d,0,r(i,l.parent))}else{const d=s.indexOf(l);s.splice(d,0,r(i,null))}continue}if(o in t){const l=t[o];l.children.push(r(i,l));continue}s.push(r(i,null))}return s}function Us(e,t){t(e.value);for(let r=e.children.length-1;r>=0;r--)Us(e.children[r],t)}function Ye(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Bs(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function $s(e,t){var r,s;const i=(s=(r=e.ownerDocument)==null?void 0:r.defaultView)==null?void 0:s.frameElement;if(!i||i===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};const a=i.getBoundingClientRect(),o=$s(i,t),l=a.height/i.clientHeight;return{x:a.x*o.relativeScale+o.x,y:a.y*o.relativeScale+o.y,relativeScale:l,absoluteScale:o.absoluteScale*l}}function Oe(e){return e?e instanceof me&&"shadowRoot"in e?!!e.shadowRoot:!!B.shadowRoot(e):!1}function je(e,t){const r=e[t[0]];return t.length===1?r:je(r.cssRules[t[1]].cssRules,t.slice(2))}function is(e){const t=[...e],r=t.pop();return{positions:t,index:r}}function Mo(e){const t=new Set,r=[];for(let s=e.length;s--;){const i=e[s];t.has(i.id)||(r.push(i),t.add(i.id))}return r}class Ws{constructor(){M(this,"id",1),M(this,"styleIDMap",new WeakMap),M(this,"idStyleMap",new Map)}getId(t){var r;return(r=this.styleIDMap.get(t))!=null?r:-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let s;return r===void 0?s=this.id++:s=r,this.styleIDMap.set(t,s),this.idStyleMap.set(s,t),s}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function zs(e){var t;let r=null;return"getRootNode"in e&&((t=B.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&B.host(B.getRootNode(e))&&(r=B.host(B.getRootNode(e))),r}function Oo(e){let t=e,r;for(;r=zs(t);)t=r;return t}function No(e){const t=e.ownerDocument;if(!t)return!1;const r=Oo(e);return B.contains(t,r)}function qs(e){const t=e.ownerDocument;return t?B.contains(t,e)||No(e):!1}const au=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:Ws,get _mirror(){return exports.mirror},closestElementOfNode:ks,getBaseDimension:$s,getNestedRule:je,getPositionsAndIndex:is,getRootShadowHost:Oo,getShadowHost:zs,getWindowHeight:_s,getWindowScroll:Ts,getWindowWidth:Ps,hasShadowRoot:Oe,hookSetter:ut,inDom:qs,isAncestorRemoved:Ls,isBlocked:ae,isIgnored:Ct,isSerialized:Ro,isSerializedIframe:Ye,isSerializedStylesheet:Bs,iterateResolveTree:Us,legacy_isTouchEvent:Dt,get nowTimestamp(){return it},on:oe,polyfill:Fs,queueToResolveTrees:xo,shadowHostInDom:No,throttle:Je,uniqueTextMutations:Mo},Symbol.toStringTag,{value:"Module"}));var _=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(_||{}),T=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(T||{}),q=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(q||{}),ve=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(ve||{}),Ce=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Ce||{}),Me=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Me||{}),z=(e=>(e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e.Destroy="destroy",e))(z||{}),Se=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Se||{});function wn(e){return"__ln"in e}class lu{constructor(){M(this,"length",0),M(this,"head",null),M(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let s=0;s<t;s++)r=(r==null?void 0:r.next)||null;return r}addNode(t){const r={value:t,previous:null,next:null};if(t.__ln=r,t.previousSibling&&wn(t.previousSibling)){const s=t.previousSibling.__ln.next;r.next=s,r.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=r,s&&(s.previous=r)}else if(t.nextSibling&&wn(t.nextSibling)&&t.nextSibling.__ln.previous){const s=t.nextSibling.__ln.previous;r.previous=s,r.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=r,s&&(s.next=r)}else this.head&&(this.head.previous=r),r.next=this.head,this.head=r;r.next===null&&(this.tail=r),this.length++}removeNode(t){const r=t.__ln;this.head&&(r.previous?(r.previous.next=r.next,r.next?r.next.previous=r.previous:this.tail=r.previous):(this.head=r.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const bn=(e,t)=>`${e}@${t}`;class uu{constructor(){M(this,"frozen",!1),M(this,"locked",!1),M(this,"texts",[]),M(this,"attributes",[]),M(this,"attributeMap",new WeakMap),M(this,"removes",[]),M(this,"mapRemoves",[]),M(this,"movedMap",{}),M(this,"addedSet",new Set),M(this,"movedSet",new Set),M(this,"droppedSet",new Set),M(this,"removesSubTreeCache",new Set),M(this,"mutationCb"),M(this,"blockClass"),M(this,"blockSelector"),M(this,"maskTextClass"),M(this,"maskTextSelector"),M(this,"inlineStylesheet"),M(this,"maskInputOptions"),M(this,"maskTextFn"),M(this,"maskInputFn"),M(this,"keepIframeSrcFn"),M(this,"recordCanvas"),M(this,"inlineImages"),M(this,"slimDOMOptions"),M(this,"dataURLOptions"),M(this,"doc"),M(this,"mirror"),M(this,"iframeManager"),M(this,"stylesheetManager"),M(this,"shadowDomManager"),M(this,"canvasManager"),M(this,"processedNodeManager"),M(this,"unattachedDoc"),M(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),M(this,"emit",()=>{if(this.frozen||this.locked)return;const t=[],r=new Set,s=new lu,i=d=>{let u=d,n=st;for(;n===st;)u=u&&u.nextSibling,n=u&&this.mirror.getId(u);return n},a=d=>{const u=B.parentNode(d);if(!u||!qs(d)||u.tagName==="TEXTAREA")return;const n=Ze(u)?this.mirror.getId(zs(d)):this.mirror.getId(u),f=i(d);if(n===-1||f===-1)return s.addNode(d);const c=Ve(d,{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:h=>{Ye(h,this.mirror)&&this.iframeManager.addIframe(h),Bs(h,this.mirror)&&this.stylesheetManager.trackLinkElement(h),Oe(d)&&this.shadowDomManager.addShadowRoot(B.shadowRoot(d),this.doc)},onIframeLoad:(h,m)=>{this.iframeManager.attachIframe(h,m),this.shadowDomManager.observeAttachShadow(h)},onStylesheetLoad:(h,m)=>{this.stylesheetManager.attachLinkElement(h,m)}});c&&(t.push({parentId:n,nextId:f,node:c}),r.add(c.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const d of this.movedSet)vn(this.removesSubTreeCache,d,this.mirror)&&!this.movedSet.has(B.parentNode(d))||a(d);for(const d of this.addedSet)!Sn(this.droppedSet,d)&&!vn(this.removesSubTreeCache,d,this.mirror)||Sn(this.movedSet,d)?a(d):this.droppedSet.add(d);let o=null;for(;s.length;){let d=null;if(o){const u=this.mirror.getId(B.parentNode(o.value)),n=i(o.value);u!==-1&&n!==-1&&(d=o)}if(!d){let u=s.tail;for(;u;){const n=u;if(u=u.previous,n){const f=this.mirror.getId(B.parentNode(n.value));if(i(n.value)===-1)continue;if(f!==-1){d=n;break}else{const h=n.value,m=B.parentNode(h);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const p=B.host(m);if(this.mirror.getId(p)!==-1){d=n;break}}}}}}if(!d){for(;s.head;)s.removeNode(s.head.value);break}o=d.previous,s.removeNode(d.value),a(d.value)}const l={texts:this.texts.map(d=>{const u=d.node,n=B.parentNode(u);return n&&n.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(n),{id:this.mirror.getId(u),value:d.value}}).filter(d=>!r.has(d.id)).filter(d=>this.mirror.has(d.id)),attributes:this.attributes.map(d=>{const{attributes:u}=d;if(typeof u.style=="string"){const n=JSON.stringify(d.styleDiff),f=JSON.stringify(d._unchangedStyles);n.length<u.style.length&&(n+f).split("var(").length===u.style.split("var(").length&&(u.style=d.styleDiff)}return{id:this.mirror.getId(d.node),attributes:u}}).filter(d=>!r.has(d.id)).filter(d=>this.mirror.has(d.id)),removes:this.removes,adds:t};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(l))}),M(this,"genTextAreaValueMutation",t=>{let r=this.attributeMap.get(t);r||(r={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(r),this.attributeMap.set(t,r)),r.attributes.value=Array.from(B.childNodes(t),s=>B.textContent(s)||"").join("")}),M(this,"processMutation",t=>{if(!Ct(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{const r=B.textContent(t.target);!ae(t.target,this.blockClass,this.blockSelector,!1)&&r!==t.oldValue&&this.texts.push({value:Vn(t.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,ks(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{const r=t.target;let s=t.attributeName,i=t.target.getAttribute(s);if(s==="value"){const o=hs(r);i=cs({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:o,value:i,maskInputFn:this.maskInputFn})}if(ae(t.target,this.blockClass,this.blockSelector,!1)||i===t.oldValue)return;let a=this.attributeMap.get(t.target);if(r.tagName==="IFRAME"&&s==="src"&&!this.keepIframeSrcFn(i))if(!r.contentDocument)s="rr_src";else return;if(a||(a={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(a),this.attributeMap.set(t.target,a)),s==="type"&&r.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!qn(r.tagName,s))if(a.attributes[s]=zn(this.doc,Ie(r.tagName),Ie(s),i),s==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(l){this.unattachedDoc=this.doc}const o=this.unattachedDoc.createElement("span");t.oldValue&&o.setAttribute("style",t.oldValue);for(const l of Array.from(r.style)){const d=r.style.getPropertyValue(l),u=r.style.getPropertyPriority(l);d!==o.style.getPropertyValue(l)||u!==o.style.getPropertyPriority(l)?u===""?a.styleDiff[l]=d:a.styleDiff[l]=[d,u]:a._unchangedStyles[l]=[d,u]}for(const l of Array.from(o.style))r.style.getPropertyValue(l)===""&&(a.styleDiff[l]=!1)}else s==="open"&&r.tagName==="DIALOG"&&(r.matches("dialog:modal")?a.attributes.rr_open_mode="modal":a.attributes.rr_open_mode="non-modal");break}case"childList":{if(ae(t.target,this.blockClass,this.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{const s=this.mirror.getId(r),i=Ze(t.target)?this.mirror.getId(B.host(t.target)):this.mirror.getId(t.target);ae(t.target,this.blockClass,this.blockSelector,!1)||Ct(r,this.mirror,this.slimDOMOptions)||!Ro(r,this.mirror)||(this.addedSet.has(r)?(ns(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&s===-1||Ls(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[bn(s,i)]?ns(this.movedSet,r):(this.removes.push({parentId:i,id:s,isShadow:Ze(t.target)&&et(t.target)?!0:void 0}),cu(r,this.removesSubTreeCache))),this.mapRemoves.push(r))});break}}}),M(this,"genAdds",(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Ct(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let s=null;r&&this.mirror.hasNode(r)&&(s=this.mirror.getId(r)),s&&s!==-1&&(this.movedMap[bn(this.mirror.getId(t),s)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);ae(t,this.blockClass,this.blockSelector,!1)||(B.childNodes(t).forEach(s=>this.genAdds(s)),Oe(t)&&B.childNodes(B.shadowRoot(t)).forEach(s=>{this.processedNodeManager.add(s,this),this.genAdds(s,t)}))}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(r=>{this[r]=t[r]})}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 ns(e,t){e.delete(t),B.childNodes(t).forEach(r=>ns(e,r))}function cu(e,t){const r=[e];for(;r.length;){const s=r.pop();t.has(s)||(t.add(s),B.childNodes(s).forEach(i=>r.push(i)))}}function vn(e,t,r){return e.size===0?!1:hu(e,t)}function hu(e,t,r){const s=B.parentNode(t);return s?e.has(s):!1}function Sn(e,t){return e.size===0?!1:Io(e,t)}function Io(e,t){const r=B.parentNode(t);return r?e.has(r)?!0:Io(e,r):!1}let rt;function fu(e){rt=e}function du(){rt=void 0}const W=e=>rt?(...r)=>{try{return e(...r)}catch(s){if(rt&&rt(s)===!0)return;throw s}}:e,Pe=[];function ct(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(t){}return e&&e.target}function Do(e,t){const r=new uu;Pe.push(r),r.init(e);const s=new(Eo())(W(r.processMutations.bind(r)));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function pu({mousemoveCb:e,sampling:t,doc:r,mirror:s}){if(t.mousemove===!1)return()=>{};const i=typeof t.mousemove=="number"?t.mousemove:50,a=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let o=[],l;const d=Je(W(f=>{const c=Date.now()-l;e(o.map(h=>(h.timeOffset-=c,h)),f),o=[],l=null}),a),u=W(Je(W(f=>{const c=ct(f),{clientX:h,clientY:m}=Dt(f)?f.changedTouches[0]:f;l||(l=it()),o.push({x:h,y:m,id:s.getId(c),timeOffset:it()-l}),d(typeof DragEvent!="undefined"&&f instanceof DragEvent?T.Drag:f instanceof MouseEvent?T.MouseMove:T.TouchMove)}),i,{trailing:!1})),n=[oe("mousemove",u,r),oe("touchmove",u,r),oe("drag",u,r)];return W(()=>{n.forEach(f=>f())})}function mu({mouseInteractionCb:e,doc:t,mirror:r,blockClass:s,blockSelector:i,sampling:a}){if(a.mouseInteraction===!1)return()=>{};const o=a.mouseInteraction===!0||a.mouseInteraction===void 0?{}:a.mouseInteraction,l=[];let d=null;const u=n=>f=>{const c=ct(f);if(ae(c,s,i,!0))return;let h=null,m=n;if("pointerType"in f){switch(f.pointerType){case"mouse":h=ve.Mouse;break;case"touch":h=ve.Touch;break;case"pen":h=ve.Pen;break}h===ve.Touch?q[n]===q.MouseDown?m="TouchStart":q[n]===q.MouseUp&&(m="TouchEnd"):ve.Pen}else Dt(f)&&(h=ve.Touch);h!==null?(d=h,(m.startsWith("Touch")&&h===ve.Touch||m.startsWith("Mouse")&&h===ve.Mouse)&&(h=null)):q[n]===q.Click&&(h=d,d=null);const p=Dt(f)?f.changedTouches[0]:f;if(!p)return;const g=r.getId(c),{clientX:w,clientY:y}=p;W(e)(L({type:q[m],id:g,x:w,y},h!==null&&{pointerType:h}))};return Object.keys(q).filter(n=>Number.isNaN(Number(n))&&!n.endsWith("_Departed")&&o[n]!==!1).forEach(n=>{let f=Ie(n);const c=u(n);if(window.PointerEvent)switch(q[n]){case q.MouseDown:case q.MouseUp:f=f.replace("mouse","pointer");break;case q.TouchStart:case q.TouchEnd:return}l.push(oe(f,c,t))}),W(()=>{l.forEach(n=>n())})}function Ao({scrollCb:e,doc:t,mirror:r,blockClass:s,blockSelector:i,sampling:a}){const o=W(Je(W(l=>{const d=ct(l);if(!d||ae(d,s,i,!0))return;const u=r.getId(d);if(d===t&&t.defaultView){const n=Ts(t.defaultView);e({id:u,x:n.left,y:n.top})}else e({id:u,x:d.scrollLeft,y:d.scrollTop})}),a.scroll||100));return oe("scroll",o,t)}function gu({viewportResizeCb:e},{win:t}){let r=-1,s=-1;const i=W(Je(W(()=>{const a=_s(),o=Ps();(r!==a||s!==o)&&(e({width:Number(o),height:Number(a)}),r=a,s=o)}),200));return oe("resize",i,t)}const yu=["INPUT","TEXTAREA","SELECT"],Cn=new WeakMap;function wu({inputCb:e,doc:t,mirror:r,blockClass:s,blockSelector:i,ignoreClass:a,ignoreSelector:o,maskInputOptions:l,maskInputFn:d,sampling:u,userTriggeredOnInput:n}){function f(y){let b=ct(y);const C=y.isTrusted,v=b&&b.tagName;if(b&&v==="OPTION"&&(b=B.parentElement(b)),!b||!v||yu.indexOf(v)<0||ae(b,s,i,!0)||b.classList.contains(a)||o&&b.matches(o))return;let S=b.value,E=!1;const R=hs(b)||"";R==="radio"||R==="checkbox"?E=b.checked:(l[v.toLowerCase()]||l[R])&&(S=cs({element:b,maskInputOptions:l,tagName:v,type:R,value:S,maskInputFn:d})),c(b,n?{text:S,isChecked:E,userTriggered:C}:{text:S,isChecked:E});const I=b.name;R==="radio"&&I&&E&&t.querySelectorAll(`input[type="radio"][name="${I}"]`).forEach(O=>{if(O!==b){const F=O.value;c(O,n?{text:F,isChecked:!E,userTriggered:!1}:{text:F,isChecked:!E})}})}function c(y,b){const C=Cn.get(y);if(!C||C.text!==b.text||C.isChecked!==b.isChecked){Cn.set(y,b);const v=r.getId(y);W(e)(se(L({},b),{id:v}))}}const m=(u.input==="last"?["change"]:["input","change"]).map(y=>oe(y,W(f),t)),p=t.defaultView;if(!p)return()=>{m.forEach(y=>y())};const g=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),w=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&m.push(...w.map(y=>ut(y[0],y[1],{set(){W(f)({target:this,isTrusted:!1})}},!1,p))),W(()=>{m.forEach(y=>y())})}function At(e){const t=[];function r(s,i){if(wt("CSSGroupingRule")&&s.parentRule instanceof CSSGroupingRule||wt("CSSMediaRule")&&s.parentRule instanceof CSSMediaRule||wt("CSSSupportsRule")&&s.parentRule instanceof CSSSupportsRule||wt("CSSConditionRule")&&s.parentRule instanceof CSSConditionRule){const o=Array.from(s.parentRule.cssRules).indexOf(s);i.unshift(o)}else if(s.parentStyleSheet){const o=Array.from(s.parentStyleSheet.cssRules).indexOf(s);i.unshift(o)}return i}return r(e,t)}function xe(e,t,r){let s,i;return e?(e.ownerNode?s=t.getId(e.ownerNode):i=r.getId(e),{styleId:i,id:s}):{}}function bu({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:s}){if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};const i=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:W((n,f,c)=>{const[h,m]=c,{id:p,styleId:g}=xe(f,t,r.styleMirror);return(p&&p!==-1||g&&g!==-1)&&e({id:p,styleId:g,adds:[{rule:h,index:m}]}),n.apply(f,c)})}),s.CSSStyleSheet.prototype.addRule=function(n,f,c=this.cssRules.length){const h=`${n} { ${f} }`;return s.CSSStyleSheet.prototype.insertRule.apply(this,[h,c])};const a=s.CSSStyleSheet.prototype.deleteRule;s.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:W((n,f,c)=>{const[h]=c,{id:m,styleId:p}=xe(f,t,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,removes:[{index:h}]}),n.apply(f,c)})}),s.CSSStyleSheet.prototype.removeRule=function(n){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[n])};let o;s.CSSStyleSheet.prototype.replace&&(o=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:W((n,f,c)=>{const[h]=c,{id:m,styleId:p}=xe(f,t,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,replace:h}),n.apply(f,c)})}));let l;s.CSSStyleSheet.prototype.replaceSync&&(l=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:W((n,f,c)=>{const[h]=c,{id:m,styleId:p}=xe(f,t,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,replaceSync:h}),n.apply(f,c)})}));const d={};bt("CSSGroupingRule")?d.CSSGroupingRule=s.CSSGroupingRule:(bt("CSSMediaRule")&&(d.CSSMediaRule=s.CSSMediaRule),bt("CSSConditionRule")&&(d.CSSConditionRule=s.CSSConditionRule),bt("CSSSupportsRule")&&(d.CSSSupportsRule=s.CSSSupportsRule));const u={};return Object.entries(d).forEach(([n,f])=>{u[n]={insertRule:f.prototype.insertRule,deleteRule:f.prototype.deleteRule},f.prototype.insertRule=new Proxy(u[n].insertRule,{apply:W((c,h,m)=>{const[p,g]=m,{id:w,styleId:y}=xe(h.parentStyleSheet,t,r.styleMirror);return(w&&w!==-1||y&&y!==-1)&&e({id:w,styleId:y,adds:[{rule:p,index:[...At(h),g||0]}]}),c.apply(h,m)})}),f.prototype.deleteRule=new Proxy(u[n].deleteRule,{apply:W((c,h,m)=>{const[p]=m,{id:g,styleId:w}=xe(h.parentStyleSheet,t,r.styleMirror);return(g&&g!==-1||w&&w!==-1)&&e({id:g,styleId:w,removes:[{index:[...At(h),p]}]}),c.apply(h,m)})})}),W(()=>{s.CSSStyleSheet.prototype.insertRule=i,s.CSSStyleSheet.prototype.deleteRule=a,o&&(s.CSSStyleSheet.prototype.replace=o),l&&(s.CSSStyleSheet.prototype.replaceSync=l),Object.entries(d).forEach(([n,f])=>{f.prototype.insertRule=u[n].insertRule,f.prototype.deleteRule=u[n].deleteRule})})}function To({mirror:e,stylesheetManager:t},r){var s,i,a;let o=null;r.nodeName==="#document"?o=e.getId(r):o=e.getId(B.host(r));const l=r.nodeName==="#document"?(s=r.defaultView)==null?void 0:s.Document:(a=(i=r.ownerDocument)==null?void 0:i.defaultView)==null?void 0:a.ShadowRoot,d=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!l||!d?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:d.configurable,enumerable:d.enumerable,get(){var u;return(u=d.get)==null?void 0:u.call(this)},set(u){var n;const f=(n=d.set)==null?void 0:n.call(this,u);if(o!==null&&o!==-1)try{t.adoptStyleSheets(u,o)}catch(c){}return f}}),W(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:d.configurable,enumerable:d.enumerable,get:d.get,set:d.set})}))}function vu({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:s},{win:i}){const a=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:W((l,d,u)=>{var n;const[f,c,h]=u;if(r.has(f))return a.apply(d,[f,c,h]);const{id:m,styleId:p}=xe((n=d.parentRule)==null?void 0:n.parentStyleSheet,t,s.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,set:{property:f,value:c,priority:h},index:At(d.parentRule)}),l.apply(d,u)})});const o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:W((l,d,u)=>{var n;const[f]=u;if(r.has(f))return o.apply(d,[f]);const{id:c,styleId:h}=xe((n=d.parentRule)==null?void 0:n.parentStyleSheet,t,s.styleMirror);return(c&&c!==-1||h&&h!==-1)&&e({id:c,styleId:h,remove:{property:f},index:At(d.parentRule)}),l.apply(d,u)})}),W(()=>{i.CSSStyleDeclaration.prototype.setProperty=a,i.CSSStyleDeclaration.prototype.removeProperty=o})}function Su({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:s,sampling:i,doc:a}){const o=W(d=>Je(W(u=>{const n=ct(u);if(!n||ae(n,t,r,!0))return;const{currentTime:f,volume:c,muted:h,playbackRate:m,loop:p}=n;e({type:d,id:s.getId(n),currentTime:f,volume:c,muted:h,playbackRate:m,loop:p})}),i.media||500)),l=[oe("play",o(Me.Play),a),oe("pause",o(Me.Pause),a),oe("seeked",o(Me.Seeked),a),oe("volumechange",o(Me.VolumeChange),a),oe("ratechange",o(Me.RateChange),a)];return W(()=>{l.forEach(d=>d())})}function Cu({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const s=[],i=new WeakMap,a=r.FontFace;r.FontFace=function(d,u,n){const f=new a(d,u,n);return i.set(f,{family:d,buffer:typeof u!="string",descriptors:n,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),f};const o=Fe(t.fonts,"add",function(l){return function(d){return setTimeout(W(()=>{const u=i.get(d);u&&(e(u),i.delete(d))}),0),l.apply(this,[d])}});return s.push(()=>{r.FontFace=a}),s.push(o),W(()=>{s.forEach(l=>l())})}function Eu(e){const{doc:t,mirror:r,blockClass:s,blockSelector:i,selectionCb:a}=e;let o=!0;const l=W(()=>{const d=t.getSelection();if(!d||o&&(d!=null&&d.isCollapsed))return;o=d.isCollapsed||!1;const u=[],n=d.rangeCount||0;for(let f=0;f<n;f++){const c=d.getRangeAt(f),{startContainer:h,startOffset:m,endContainer:p,endOffset:g}=c;ae(h,s,i,!0)||ae(p,s,i,!0)||u.push({start:r.getId(h),startOffset:m,end:r.getId(p),endOffset:g})}a({ranges:u})});return l(),oe("selectionchange",l)}function Ru({doc:e,customElementCb:t}){const r=e.defaultView;return!r||!r.customElements?()=>{}:Fe(r.customElements,"define",function(i){return function(a,o,l){try{t({define:{name:a}})}catch(d){console.warn(`Custom element callback failed for ${a}`)}return i.apply(this,[a,o,l])}})}function xu(e,t){const{mutationCb:r,mousemoveCb:s,mouseInteractionCb:i,scrollCb:a,viewportResizeCb:o,inputCb:l,mediaInteractionCb:d,styleSheetRuleCb:u,styleDeclarationCb:n,canvasMutationCb:f,fontCb:c,selectionCb:h,customElementCb:m}=e;e.mutationCb=(...p)=>{t.mutation&&t.mutation(...p),r(...p)},e.mousemoveCb=(...p)=>{t.mousemove&&t.mousemove(...p),s(...p)},e.mouseInteractionCb=(...p)=>{t.mouseInteraction&&t.mouseInteraction(...p),i(...p)},e.scrollCb=(...p)=>{t.scroll&&t.scroll(...p),a(...p)},e.viewportResizeCb=(...p)=>{t.viewportResize&&t.viewportResize(...p),o(...p)},e.inputCb=(...p)=>{t.input&&t.input(...p),l(...p)},e.mediaInteractionCb=(...p)=>{t.mediaInteaction&&t.mediaInteaction(...p),d(...p)},e.styleSheetRuleCb=(...p)=>{t.styleSheetRule&&t.styleSheetRule(...p),u(...p)},e.styleDeclarationCb=(...p)=>{t.styleDeclaration&&t.styleDeclaration(...p),n(...p)},e.canvasMutationCb=(...p)=>{t.canvasMutation&&t.canvasMutation(...p),f(...p)},e.fontCb=(...p)=>{t.font&&t.font(...p),c(...p)},e.selectionCb=(...p)=>{t.selection&&t.selection(...p),h(...p)},e.customElementCb=(...p)=>{t.customElement&&t.customElement(...p),m(...p)}}function Mu(e,t={}){const r=e.doc.defaultView;if(!r)return()=>{};xu(e,t);let s;e.recordDOM&&(s=Do(e,e.doc));const i=pu(e),a=mu(e),o=Ao(e),l=gu(e,{win:r}),d=wu(e),u=Su(e);let n=()=>{},f=()=>{},c=()=>{},h=()=>{};e.recordDOM&&(n=bu(e,{win:r}),f=To(e,e.doc),c=vu(e,{win:r}),e.collectFonts&&(h=Cu(e)));const m=Eu(e),p=Ru(e),g=[];for(const w of e.plugins)g.push(w.observer(w.callback,r,w.options));return W(()=>{Pe.forEach(w=>w.reset()),s==null||s.disconnect(),i(),a(),o(),l(),d(),u(),n(),f(),c(),h(),m(),p(),g.forEach(w=>w())})}function wt(e){return typeof window[e]!="undefined"}function bt(e){return!!(typeof window[e]!="undefined"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class En{constructor(t){M(this,"iframeIdToRemoteIdMap",new WeakMap),M(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,r,s,i){const a=s||this.getIdToRemoteIdMap(t),o=i||this.getRemoteIdToIdMap(t);let l=a.get(r);return l||(l=this.generateIdFn(),a.set(r,l),o.set(l,r)),l}getIds(t,r){const s=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return r.map(a=>this.getId(t,a,s,i))}getRemoteId(t,r,s){const i=s||this.getRemoteIdToIdMap(t);if(typeof r!="number")return r;const a=i.get(r);return a||-1}getRemoteIds(t,r){const s=this.getRemoteIdToIdMap(t);return r.map(i=>this.getRemoteId(t,i,s))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let r=this.iframeIdToRemoteIdMap.get(t);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(t,r)),r}getRemoteIdToIdMap(t){let r=this.iframeRemoteIdToIdMap.get(t);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(t,r)),r}}class Ou{constructor(t){M(this,"iframes",new WeakMap),M(this,"crossOriginIframeMap",new WeakMap),M(this,"crossOriginIframeMirror",new En(Wn)),M(this,"crossOriginIframeStyleMirror"),M(this,"crossOriginIframeRootIdMap",new WeakMap),M(this,"mirror"),M(this,"mutationCb"),M(this,"wrappedEmit"),M(this,"loadListener"),M(this,"stylesheetManager"),M(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new En(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,r){var s,i;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((s=t.contentWindow)==null||s.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const r=t;if(r.data.type!=="rrweb"||r.origin!==r.data.origin||!t.source)return;const i=this.crossOriginIframeMap.get(t.source);if(!i)return;const a=this.transformCrossOriginEvent(i,r.data.event);a&&this.wrappedEmit(a,r.data.isCheckout)}transformCrossOriginEvent(t,r){var s;switch(r.type){case _.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(r.data.node,t);const i=r.data.node.id;return this.crossOriginIframeRootIdMap.set(t,i),this.patchRootIdOnNode(r.data.node,i),{timestamp:r.timestamp,type:_.IncrementalSnapshot,data:{source:T.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case _.Meta:case _.Load:case _.DomContentLoaded:return!1;case _.Plugin:return r;case _.Custom:return this.replaceIds(r.data.payload,t,["id","parentId","previousId","nextId"]),r;case _.IncrementalSnapshot:switch(r.data.source){case T.Mutation:return r.data.adds.forEach(i=>{this.replaceIds(i,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,t);const a=this.crossOriginIframeRootIdMap.get(t);a&&this.patchRootIdOnNode(i.node,a)}),r.data.removes.forEach(i=>{this.replaceIds(i,t,["parentId","id"])}),r.data.attributes.forEach(i=>{this.replaceIds(i,t,["id"])}),r.data.texts.forEach(i=>{this.replaceIds(i,t,["id"])}),r;case T.Drag:case T.TouchMove:case T.MouseMove:return r.data.positions.forEach(i=>{this.replaceIds(i,t,["id"])}),r;case T.ViewportResize:return!1;case T.MediaInteraction:case T.MouseInteraction:case T.Scroll:case T.CanvasMutation:case T.Input:return this.replaceIds(r.data,t,["id"]),r;case T.StyleSheetRule:case T.StyleDeclaration:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleId"]),r;case T.Font:return r;case T.Selection:return r.data.ranges.forEach(i=>{this.replaceIds(i,t,["start","end"])}),r;case T.AdoptedStyleSheet:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleIds"]),(s=r.data.styles)==null||s.forEach(i=>{this.replaceStyleIds(i,t,["styleId"])}),r}}return!1}replace(t,r,s,i){for(const a of i)!Array.isArray(r[a])&&typeof r[a]!="number"||(Array.isArray(r[a])?r[a]=t.getIds(s,r[a]):r[a]=t.getId(s,r[a]));return r}replaceIds(t,r,s){return this.replace(this.crossOriginIframeMirror,t,r,s)}replaceStyleIds(t,r,s){return this.replace(this.crossOriginIframeStyleMirror,t,r,s)}replaceIdOnNode(t,r){this.replaceIds(t,r,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(s=>{this.replaceIdOnNode(s,r)})}patchRootIdOnNode(t,r){t.type!==Se.Document&&!t.rootId&&(t.rootId=r),"childNodes"in t&&t.childNodes.forEach(s=>{this.patchRootIdOnNode(s,r)})}}class Nu{constructor(t){M(this,"shadowDoms",new WeakSet),M(this,"mutationCb"),M(this,"scrollCb"),M(this,"bypassOptions"),M(this,"mirror"),M(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,r){if(!et(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const s=Do(se(L({},this.bypassOptions),{doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push(()=>s.disconnect()),this.restoreHandlers.push(Ao(se(L({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(B.host(t))),this.restoreHandlers.push(To({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,r){const s=this;this.restoreHandlers.push(Fe(t.prototype,"attachShadow",function(i){return function(a){const o=i.call(this,a),l=B.shadowRoot(this);return l&&qs(this)&&s.addShadowRoot(l,r),o}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch(r){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Ge="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ke=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var vt=0;vt<Ge.length;vt++)Ke[Ge.charCodeAt(vt)]=vt;var Iu=function(e){var t=new Uint8Array(e),r,s=t.length,i="";for(r=0;r<s;r+=3)i+=Ge[t[r]>>2],i+=Ge[(t[r]&3)<<4|t[r+1]>>4],i+=Ge[(t[r+1]&15)<<2|t[r+2]>>6],i+=Ge[t[r+2]&63];return s%3===2?i=i.substring(0,i.length-1)+"=":s%3===1&&(i=i.substring(0,i.length-2)+"=="),i},Du=function(e){var t=e.length*.75,r=e.length,s,i=0,a,o,l,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);var u=new ArrayBuffer(t),n=new Uint8Array(u);for(s=0;s<r;s+=4)a=Ke[e.charCodeAt(s)],o=Ke[e.charCodeAt(s+1)],l=Ke[e.charCodeAt(s+2)],d=Ke[e.charCodeAt(s+3)],n[i++]=a<<2|o>>4,n[i++]=(o&15)<<4|l>>2,n[i++]=(l&3)<<6|d&63;return u};const Rn=new Map;function Au(e,t){let r=Rn.get(e);return r||(r=new Map,Rn.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}const _o=(e,t,r)=>{if(!e||!(ko(e,t)||typeof e=="object"))return;const s=e.constructor.name,i=Au(r,s);let a=i.indexOf(e);return a===-1&&(a=i.length,i.push(e)),a};function Et(e,t,r){if(e instanceof Array)return e.map(s=>Et(s,t,r));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const s=e.constructor.name,i=Iu(e);return{rr_type:s,base64:i}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Et(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const s=e.constructor.name,{src:i}=e;return{rr_type:s,src:i}}else if(e instanceof HTMLCanvasElement){const s="HTMLImageElement",i=e.toDataURL();return{rr_type:s,src:i}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Et(e.data,t,r),e.width,e.height]};if(ko(e,t)||typeof e=="object"){const s=e.constructor.name,i=_o(e,t,r);return{rr_type:s,index:i}}}}return e}const Po=(e,t,r)=>e.map(s=>Et(s,t,r)),ko=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof t[i]=="function").find(i=>e instanceof t[i]);function Tu(e,t,r,s){const i=[],a=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const o of a)try{if(typeof t.CanvasRenderingContext2D.prototype[o]!="function")continue;const l=Fe(t.CanvasRenderingContext2D.prototype,o,function(d){return function(...u){return ae(this.canvas,r,s,!0)||setTimeout(()=>{const n=Po(u,t,this);e(this.canvas,{type:Ce["2D"],property:o,args:n})},0),d.apply(this,u)}});i.push(l)}catch(l){const d=ut(t.CanvasRenderingContext2D.prototype,o,{set(u){e(this.canvas,{type:Ce["2D"],property:o,args:[u],setter:!0})}});i.push(d)}return()=>{i.forEach(o=>o())}}function _u(e){return e==="experimental-webgl"?"webgl":e}function xn(e,t,r,s){const i=[];try{const a=Fe(e.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...d){if(!ae(this,t,r,!0)){const u=_u(l);if("__context"in this||(this.__context=u),s&&["webgl","webgl2"].includes(u))if(d[0]&&typeof d[0]=="object"){const n=d[0];n.preserveDrawingBuffer||(n.preserveDrawingBuffer=!0)}else d.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[l,...d])}});i.push(a)}catch(a){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(a=>a())}}function Mn(e,t,r,s,i,a){const o=[],l=Object.getOwnPropertyNames(e);for(const d of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(d))try{if(typeof e[d]!="function")continue;const u=Fe(e,d,function(n){return function(...f){const c=n.apply(this,f);if(_o(c,a,this),"tagName"in this.canvas&&!ae(this.canvas,s,i,!0)){const h=Po(f,a,this),m={type:t,property:d,args:h};r(this.canvas,m)}return c}});o.push(u)}catch(u){const n=ut(e,d,{set(f){r(this.canvas,{type:t,property:d,args:[f],setter:!0})}});o.push(n)}return o}function Pu(e,t,r,s){const i=[];return i.push(...Mn(t.WebGLRenderingContext.prototype,Ce.WebGL,e,r,s,t)),typeof t.WebGL2RenderingContext!="undefined"&&i.push(...Mn(t.WebGL2RenderingContext.prototype,Ce.WebGL2,e,r,s,t)),()=>{i.forEach(a=>a())}}const Lo=`(function() {
71
+ or you can use record.mirror to access the mirror instance during recording.`;exports.mirror={map:{},getId(){return console.error(We),-1},getNode(){return console.error(We),null},removeNodeFromMap(){console.error(We)},has(){return console.error(We),!1},reset(){console.error(We)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(exports.mirror=new Proxy(exports.mirror,{get(e,t,r){return t==="map"&&console.error(We),Reflect.get(e,t,r)}}));function Je(e,t,r={}){let s=null,i=0;return function(...a){const o=Date.now();!i&&r.leading===!1&&(i=o);const l=t-(o-i),d=this;l<=0||l>t?(s&&(clearTimeout(s),s=null),i=o,e.apply(d,a)):!s&&r.trailing!==!1&&(s=setTimeout(()=>{i=r.leading===!1?0:Date.now(),s=null,e.apply(d,a)},l))}}function ut(e,t,r,s,i=window){const a=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,s?r:{set(o){setTimeout(()=>{r.set.call(this,o)},0),a&&a.set&&a.set.call(this,o)}}),()=>ut(e,t,a||{},!0)}let it=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(it=()=>new Date().getTime());function Ts(e){var t,r,s,i;const a=e.document;return{left:a.scrollingElement?a.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:a.documentElement.scrollLeft||(a==null?void 0:a.body)&&((t=B.parentElement(a.body))==null?void 0:t.scrollLeft)||((r=a==null?void 0:a.body)==null?void 0:r.scrollLeft)||0,top:a.scrollingElement?a.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(a==null?void 0:a.documentElement.scrollTop)||(a==null?void 0:a.body)&&((s=B.parentElement(a.body))==null?void 0:s.scrollTop)||((i=a==null?void 0:a.body)==null?void 0:i.scrollTop)||0}}function _s(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ps(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ks(e){return e?e.nodeType===e.ELEMENT_NODE?e:B.parentElement(e):null}function ae(e,t,r,s){if(!e)return!1;const i=ks(e);if(!i)return!1;try{if(typeof t=="string"){if(i.classList.contains(t)||s&&i.closest("."+t)!==null)return!0}else if(Nt(i,t,s))return!0}catch(a){}return!!(r&&(i.matches(r)||s&&i.closest(r)!==null))}function Ro(e,t){return t.getId(e)!==-1}function Ct(e,t,r){return e.tagName==="TITLE"&&r.headTitleMutations?!0:t.getId(e)===st}function Ls(e,t){if(Ze(e))return!1;const r=t.getId(e);if(!t.has(r))return!0;const s=B.parentNode(e);return s&&s.nodeType===e.DOCUMENT_NODE?!1:s?Ls(s,t):!0}function Dt(e){return!!e.changedTouches}function Fs(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function xo(e){const t={},r=(i,a)=>{const o={value:i,parent:a,children:[]};return t[i.node.id]=o,o},s=[];for(const i of e){const{nextId:a,parentId:o}=i;if(a&&a in t){const l=t[a];if(l.parent){const d=l.parent.children.indexOf(l);l.parent.children.splice(d,0,r(i,l.parent))}else{const d=s.indexOf(l);s.splice(d,0,r(i,null))}continue}if(o in t){const l=t[o];l.children.push(r(i,l));continue}s.push(r(i,null))}return s}function Us(e,t){t(e.value);for(let r=e.children.length-1;r>=0;r--)Us(e.children[r],t)}function Ye(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Bs(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function $s(e,t){var r,s;const i=(s=(r=e.ownerDocument)==null?void 0:r.defaultView)==null?void 0:s.frameElement;if(!i||i===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};const a=i.getBoundingClientRect(),o=$s(i,t),l=a.height/i.clientHeight;return{x:a.x*o.relativeScale+o.x,y:a.y*o.relativeScale+o.y,relativeScale:l,absoluteScale:o.absoluteScale*l}}function Ne(e){return e?e instanceof me&&"shadowRoot"in e?!!e.shadowRoot:!!B.shadowRoot(e):!1}function je(e,t){const r=e[t[0]];return t.length===1?r:je(r.cssRules[t[1]].cssRules,t.slice(2))}function is(e){const t=[...e],r=t.pop();return{positions:t,index:r}}function Mo(e){const t=new Set,r=[];for(let s=e.length;s--;){const i=e[s];t.has(i.id)||(r.push(i),t.add(i.id))}return r}class Ws{constructor(){M(this,"id",1),M(this,"styleIDMap",new WeakMap),M(this,"idStyleMap",new Map)}getId(t){var r;return(r=this.styleIDMap.get(t))!=null?r:-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let s;return r===void 0?s=this.id++:s=r,this.styleIDMap.set(t,s),this.idStyleMap.set(s,t),s}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function zs(e){var t;let r=null;return"getRootNode"in e&&((t=B.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&B.host(B.getRootNode(e))&&(r=B.host(B.getRootNode(e))),r}function No(e){let t=e,r;for(;r=zs(t);)t=r;return t}function Oo(e){const t=e.ownerDocument;if(!t)return!1;const r=No(e);return B.contains(t,r)}function qs(e){const t=e.ownerDocument;return t?B.contains(t,e)||Oo(e):!1}const lu=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:Ws,get _mirror(){return exports.mirror},closestElementOfNode:ks,getBaseDimension:$s,getNestedRule:je,getPositionsAndIndex:is,getRootShadowHost:No,getShadowHost:zs,getWindowHeight:_s,getWindowScroll:Ts,getWindowWidth:Ps,hasShadowRoot:Ne,hookSetter:ut,inDom:qs,isAncestorRemoved:Ls,isBlocked:ae,isIgnored:Ct,isSerialized:Ro,isSerializedIframe:Ye,isSerializedStylesheet:Bs,iterateResolveTree:Us,legacy_isTouchEvent:Dt,get nowTimestamp(){return it},on:oe,polyfill:Fs,queueToResolveTrees:xo,shadowHostInDom:Oo,throttle:Je,uniqueTextMutations:Mo},Symbol.toStringTag,{value:"Module"}));var _=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(_||{}),T=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(T||{}),q=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(q||{}),ve=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(ve||{}),Ce=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Ce||{}),Me=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Me||{}),z=(e=>(e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e.Destroy="destroy",e))(z||{}),Se=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Se||{});function yn(e){return"__ln"in e}class uu{constructor(){M(this,"length",0),M(this,"head",null),M(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let s=0;s<t;s++)r=(r==null?void 0:r.next)||null;return r}addNode(t){const r={value:t,previous:null,next:null};if(t.__ln=r,t.previousSibling&&yn(t.previousSibling)){const s=t.previousSibling.__ln.next;r.next=s,r.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=r,s&&(s.previous=r)}else if(t.nextSibling&&yn(t.nextSibling)&&t.nextSibling.__ln.previous){const s=t.nextSibling.__ln.previous;r.previous=s,r.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=r,s&&(s.next=r)}else this.head&&(this.head.previous=r),r.next=this.head,this.head=r;r.next===null&&(this.tail=r),this.length++}removeNode(t){const r=t.__ln;this.head&&(r.previous?(r.previous.next=r.next,r.next?r.next.previous=r.previous:this.tail=r.previous):(this.head=r.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const wn=(e,t)=>`${e}@${t}`;class cu{constructor(){M(this,"frozen",!1),M(this,"locked",!1),M(this,"texts",[]),M(this,"attributes",[]),M(this,"attributeMap",new WeakMap),M(this,"removes",[]),M(this,"mapRemoves",[]),M(this,"movedMap",{}),M(this,"addedSet",new Set),M(this,"movedSet",new Set),M(this,"droppedSet",new Set),M(this,"removesSubTreeCache",new Set),M(this,"mutationCb"),M(this,"blockClass"),M(this,"blockSelector"),M(this,"maskTextClass"),M(this,"maskTextSelector"),M(this,"inlineStylesheet"),M(this,"maskInputOptions"),M(this,"maskTextFn"),M(this,"maskInputFn"),M(this,"keepIframeSrcFn"),M(this,"recordCanvas"),M(this,"inlineImages"),M(this,"slimDOMOptions"),M(this,"dataURLOptions"),M(this,"doc"),M(this,"mirror"),M(this,"iframeManager"),M(this,"stylesheetManager"),M(this,"shadowDomManager"),M(this,"canvasManager"),M(this,"processedNodeManager"),M(this,"unattachedDoc"),M(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),M(this,"emit",()=>{if(this.frozen||this.locked)return;const t=[],r=new Set,s=new uu,i=d=>{let u=d,n=st;for(;n===st;)u=u&&u.nextSibling,n=u&&this.mirror.getId(u);return n},a=d=>{const u=B.parentNode(d);if(!u||!qs(d)||u.tagName==="TEXTAREA")return;const n=Ze(u)?this.mirror.getId(zs(d)):this.mirror.getId(u),f=i(d);if(n===-1||f===-1)return s.addNode(d);const c=Ve(d,{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:h=>{Ye(h,this.mirror)&&this.iframeManager.addIframe(h),Bs(h,this.mirror)&&this.stylesheetManager.trackLinkElement(h),Ne(d)&&this.shadowDomManager.addShadowRoot(B.shadowRoot(d),this.doc)},onIframeLoad:(h,m)=>{this.iframeManager.attachIframe(h,m),this.shadowDomManager.observeAttachShadow(h)},onStylesheetLoad:(h,m)=>{this.stylesheetManager.attachLinkElement(h,m)}});c&&(t.push({parentId:n,nextId:f,node:c}),r.add(c.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const d of this.movedSet)bn(this.removesSubTreeCache,d,this.mirror)&&!this.movedSet.has(B.parentNode(d))||a(d);for(const d of this.addedSet)!vn(this.droppedSet,d)&&!bn(this.removesSubTreeCache,d,this.mirror)||vn(this.movedSet,d)?a(d):this.droppedSet.add(d);let o=null;for(;s.length;){let d=null;if(o){const u=this.mirror.getId(B.parentNode(o.value)),n=i(o.value);u!==-1&&n!==-1&&(d=o)}if(!d){let u=s.tail;for(;u;){const n=u;if(u=u.previous,n){const f=this.mirror.getId(B.parentNode(n.value));if(i(n.value)===-1)continue;if(f!==-1){d=n;break}else{const h=n.value,m=B.parentNode(h);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const p=B.host(m);if(this.mirror.getId(p)!==-1){d=n;break}}}}}}if(!d){for(;s.head;)s.removeNode(s.head.value);break}o=d.previous,s.removeNode(d.value),a(d.value)}const l={texts:this.texts.map(d=>{const u=d.node,n=B.parentNode(u);return n&&n.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(n),{id:this.mirror.getId(u),value:d.value}}).filter(d=>!r.has(d.id)).filter(d=>this.mirror.has(d.id)),attributes:this.attributes.map(d=>{const{attributes:u}=d;if(typeof u.style=="string"){const n=JSON.stringify(d.styleDiff),f=JSON.stringify(d._unchangedStyles);n.length<u.style.length&&(n+f).split("var(").length===u.style.split("var(").length&&(u.style=d.styleDiff)}return{id:this.mirror.getId(d.node),attributes:u}}).filter(d=>!r.has(d.id)).filter(d=>this.mirror.has(d.id)),removes:this.removes,adds:t};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(l))}),M(this,"genTextAreaValueMutation",t=>{let r=this.attributeMap.get(t);r||(r={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(r),this.attributeMap.set(t,r)),r.attributes.value=Array.from(B.childNodes(t),s=>B.textContent(s)||"").join("")}),M(this,"processMutation",t=>{if(!Ct(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{const r=B.textContent(t.target);!ae(t.target,this.blockClass,this.blockSelector,!1)&&r!==t.oldValue&&this.texts.push({value:qn(t.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,ks(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{const r=t.target;let s=t.attributeName,i=t.target.getAttribute(s);if(s==="value"){const o=hs(r);i=cs({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:o,value:i,maskInputFn:this.maskInputFn})}if(ae(t.target,this.blockClass,this.blockSelector,!1)||i===t.oldValue)return;let a=this.attributeMap.get(t.target);if(r.tagName==="IFRAME"&&s==="src"&&!this.keepIframeSrcFn(i))if(!r.contentDocument)s="rr_src";else return;if(a||(a={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(a),this.attributeMap.set(t.target,a)),s==="type"&&r.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!zn(r.tagName,s))if(a.attributes[s]=Wn(this.doc,Ie(r.tagName),Ie(s),i),s==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(l){this.unattachedDoc=this.doc}const o=this.unattachedDoc.createElement("span");t.oldValue&&o.setAttribute("style",t.oldValue);for(const l of Array.from(r.style)){const d=r.style.getPropertyValue(l),u=r.style.getPropertyPriority(l);d!==o.style.getPropertyValue(l)||u!==o.style.getPropertyPriority(l)?u===""?a.styleDiff[l]=d:a.styleDiff[l]=[d,u]:a._unchangedStyles[l]=[d,u]}for(const l of Array.from(o.style))r.style.getPropertyValue(l)===""&&(a.styleDiff[l]=!1)}else s==="open"&&r.tagName==="DIALOG"&&(r.matches("dialog:modal")?a.attributes.rr_open_mode="modal":a.attributes.rr_open_mode="non-modal");break}case"childList":{if(ae(t.target,this.blockClass,this.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{const s=this.mirror.getId(r),i=Ze(t.target)?this.mirror.getId(B.host(t.target)):this.mirror.getId(t.target);ae(t.target,this.blockClass,this.blockSelector,!1)||Ct(r,this.mirror,this.slimDOMOptions)||!Ro(r,this.mirror)||(this.addedSet.has(r)?(ns(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&s===-1||Ls(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[wn(s,i)]?ns(this.movedSet,r):(this.removes.push({parentId:i,id:s,isShadow:Ze(t.target)&&et(t.target)?!0:void 0}),hu(r,this.removesSubTreeCache))),this.mapRemoves.push(r))});break}}}),M(this,"genAdds",(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Ct(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let s=null;r&&this.mirror.hasNode(r)&&(s=this.mirror.getId(r)),s&&s!==-1&&(this.movedMap[wn(this.mirror.getId(t),s)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);ae(t,this.blockClass,this.blockSelector,!1)||(B.childNodes(t).forEach(s=>this.genAdds(s)),Ne(t)&&B.childNodes(B.shadowRoot(t)).forEach(s=>{this.processedNodeManager.add(s,this),this.genAdds(s,t)}))}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(r=>{this[r]=t[r]})}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 ns(e,t){e.delete(t),B.childNodes(t).forEach(r=>ns(e,r))}function hu(e,t){const r=[e];for(;r.length;){const s=r.pop();t.has(s)||(t.add(s),B.childNodes(s).forEach(i=>r.push(i)))}}function bn(e,t,r){return e.size===0?!1:fu(e,t)}function fu(e,t,r){const s=B.parentNode(t);return s?e.has(s):!1}function vn(e,t){return e.size===0?!1:Io(e,t)}function Io(e,t){const r=B.parentNode(t);return r?e.has(r)?!0:Io(e,r):!1}let rt;function du(e){rt=e}function pu(){rt=void 0}const W=e=>rt?(...r)=>{try{return e(...r)}catch(s){if(rt&&rt(s)===!0)return;throw s}}:e,Pe=[];function ct(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(t){}return e&&e.target}function Do(e,t){const r=new cu;Pe.push(r),r.init(e);const s=new(Eo())(W(r.processMutations.bind(r)));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function mu({mousemoveCb:e,sampling:t,doc:r,mirror:s}){if(t.mousemove===!1)return()=>{};const i=typeof t.mousemove=="number"?t.mousemove:50,a=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let o=[],l;const d=Je(W(f=>{const c=Date.now()-l;e(o.map(h=>(h.timeOffset-=c,h)),f),o=[],l=null}),a),u=W(Je(W(f=>{const c=ct(f),{clientX:h,clientY:m}=Dt(f)?f.changedTouches[0]:f;l||(l=it()),o.push({x:h,y:m,id:s.getId(c),timeOffset:it()-l}),d(typeof DragEvent!="undefined"&&f instanceof DragEvent?T.Drag:f instanceof MouseEvent?T.MouseMove:T.TouchMove)}),i,{trailing:!1})),n=[oe("mousemove",u,r),oe("touchmove",u,r),oe("drag",u,r)];return W(()=>{n.forEach(f=>f())})}function gu({mouseInteractionCb:e,doc:t,mirror:r,blockClass:s,blockSelector:i,sampling:a}){if(a.mouseInteraction===!1)return()=>{};const o=a.mouseInteraction===!0||a.mouseInteraction===void 0?{}:a.mouseInteraction,l=[];let d=null;const u=n=>f=>{const c=ct(f);if(ae(c,s,i,!0))return;let h=null,m=n;if("pointerType"in f){switch(f.pointerType){case"mouse":h=ve.Mouse;break;case"touch":h=ve.Touch;break;case"pen":h=ve.Pen;break}h===ve.Touch?q[n]===q.MouseDown?m="TouchStart":q[n]===q.MouseUp&&(m="TouchEnd"):ve.Pen}else Dt(f)&&(h=ve.Touch);h!==null?(d=h,(m.startsWith("Touch")&&h===ve.Touch||m.startsWith("Mouse")&&h===ve.Mouse)&&(h=null)):q[n]===q.Click&&(h=d,d=null);const p=Dt(f)?f.changedTouches[0]:f;if(!p)return;const g=r.getId(c),{clientX:w,clientY:y}=p;W(e)(L({type:q[m],id:g,x:w,y},h!==null&&{pointerType:h}))};return Object.keys(q).filter(n=>Number.isNaN(Number(n))&&!n.endsWith("_Departed")&&o[n]!==!1).forEach(n=>{let f=Ie(n);const c=u(n);if(window.PointerEvent)switch(q[n]){case q.MouseDown:case q.MouseUp:f=f.replace("mouse","pointer");break;case q.TouchStart:case q.TouchEnd:return}l.push(oe(f,c,t))}),W(()=>{l.forEach(n=>n())})}function Ao({scrollCb:e,doc:t,mirror:r,blockClass:s,blockSelector:i,sampling:a}){const o=W(Je(W(l=>{const d=ct(l);if(!d||ae(d,s,i,!0))return;const u=r.getId(d);if(d===t&&t.defaultView){const n=Ts(t.defaultView);e({id:u,x:n.left,y:n.top})}else e({id:u,x:d.scrollLeft,y:d.scrollTop})}),a.scroll||100));return oe("scroll",o,t)}function yu({viewportResizeCb:e},{win:t}){let r=-1,s=-1;const i=W(Je(W(()=>{const a=_s(),o=Ps();(r!==a||s!==o)&&(e({width:Number(o),height:Number(a)}),r=a,s=o)}),200));return oe("resize",i,t)}const wu=["INPUT","TEXTAREA","SELECT"],Sn=new WeakMap;function bu({inputCb:e,doc:t,mirror:r,blockClass:s,blockSelector:i,ignoreClass:a,ignoreSelector:o,maskInputOptions:l,maskInputFn:d,sampling:u,userTriggeredOnInput:n}){function f(y){let b=ct(y);const C=y.isTrusted,v=b&&b.tagName;if(b&&v==="OPTION"&&(b=B.parentElement(b)),!b||!v||wu.indexOf(v)<0||ae(b,s,i,!0)||b.classList.contains(a)||o&&b.matches(o))return;let S=b.value,E=!1;const R=hs(b)||"";R==="radio"||R==="checkbox"?E=b.checked:(l[v.toLowerCase()]||l[R])&&(S=cs({element:b,maskInputOptions:l,tagName:v,type:R,value:S,maskInputFn:d})),c(b,n?{text:S,isChecked:E,userTriggered:C}:{text:S,isChecked:E});const I=b.name;R==="radio"&&I&&E&&t.querySelectorAll(`input[type="radio"][name="${I}"]`).forEach(N=>{if(N!==b){const F=N.value;c(N,n?{text:F,isChecked:!E,userTriggered:!1}:{text:F,isChecked:!E})}})}function c(y,b){const C=Sn.get(y);if(!C||C.text!==b.text||C.isChecked!==b.isChecked){Sn.set(y,b);const v=r.getId(y);W(e)(se(L({},b),{id:v}))}}const m=(u.input==="last"?["change"]:["input","change"]).map(y=>oe(y,W(f),t)),p=t.defaultView;if(!p)return()=>{m.forEach(y=>y())};const g=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),w=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&m.push(...w.map(y=>ut(y[0],y[1],{set(){W(f)({target:this,isTrusted:!1})}},!1,p))),W(()=>{m.forEach(y=>y())})}function At(e){const t=[];function r(s,i){if(wt("CSSGroupingRule")&&s.parentRule instanceof CSSGroupingRule||wt("CSSMediaRule")&&s.parentRule instanceof CSSMediaRule||wt("CSSSupportsRule")&&s.parentRule instanceof CSSSupportsRule||wt("CSSConditionRule")&&s.parentRule instanceof CSSConditionRule){const o=Array.from(s.parentRule.cssRules).indexOf(s);i.unshift(o)}else if(s.parentStyleSheet){const o=Array.from(s.parentStyleSheet.cssRules).indexOf(s);i.unshift(o)}return i}return r(e,t)}function xe(e,t,r){let s,i;return e?(e.ownerNode?s=t.getId(e.ownerNode):i=r.getId(e),{styleId:i,id:s}):{}}function vu({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:s}){if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};const i=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:W((n,f,c)=>{const[h,m]=c,{id:p,styleId:g}=xe(f,t,r.styleMirror);return(p&&p!==-1||g&&g!==-1)&&e({id:p,styleId:g,adds:[{rule:h,index:m}]}),n.apply(f,c)})}),s.CSSStyleSheet.prototype.addRule=function(n,f,c=this.cssRules.length){const h=`${n} { ${f} }`;return s.CSSStyleSheet.prototype.insertRule.apply(this,[h,c])};const a=s.CSSStyleSheet.prototype.deleteRule;s.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:W((n,f,c)=>{const[h]=c,{id:m,styleId:p}=xe(f,t,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,removes:[{index:h}]}),n.apply(f,c)})}),s.CSSStyleSheet.prototype.removeRule=function(n){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[n])};let o;s.CSSStyleSheet.prototype.replace&&(o=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:W((n,f,c)=>{const[h]=c,{id:m,styleId:p}=xe(f,t,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,replace:h}),n.apply(f,c)})}));let l;s.CSSStyleSheet.prototype.replaceSync&&(l=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:W((n,f,c)=>{const[h]=c,{id:m,styleId:p}=xe(f,t,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,replaceSync:h}),n.apply(f,c)})}));const d={};bt("CSSGroupingRule")?d.CSSGroupingRule=s.CSSGroupingRule:(bt("CSSMediaRule")&&(d.CSSMediaRule=s.CSSMediaRule),bt("CSSConditionRule")&&(d.CSSConditionRule=s.CSSConditionRule),bt("CSSSupportsRule")&&(d.CSSSupportsRule=s.CSSSupportsRule));const u={};return Object.entries(d).forEach(([n,f])=>{u[n]={insertRule:f.prototype.insertRule,deleteRule:f.prototype.deleteRule},f.prototype.insertRule=new Proxy(u[n].insertRule,{apply:W((c,h,m)=>{const[p,g]=m,{id:w,styleId:y}=xe(h.parentStyleSheet,t,r.styleMirror);return(w&&w!==-1||y&&y!==-1)&&e({id:w,styleId:y,adds:[{rule:p,index:[...At(h),g||0]}]}),c.apply(h,m)})}),f.prototype.deleteRule=new Proxy(u[n].deleteRule,{apply:W((c,h,m)=>{const[p]=m,{id:g,styleId:w}=xe(h.parentStyleSheet,t,r.styleMirror);return(g&&g!==-1||w&&w!==-1)&&e({id:g,styleId:w,removes:[{index:[...At(h),p]}]}),c.apply(h,m)})})}),W(()=>{s.CSSStyleSheet.prototype.insertRule=i,s.CSSStyleSheet.prototype.deleteRule=a,o&&(s.CSSStyleSheet.prototype.replace=o),l&&(s.CSSStyleSheet.prototype.replaceSync=l),Object.entries(d).forEach(([n,f])=>{f.prototype.insertRule=u[n].insertRule,f.prototype.deleteRule=u[n].deleteRule})})}function To({mirror:e,stylesheetManager:t},r){var s,i,a;let o=null;r.nodeName==="#document"?o=e.getId(r):o=e.getId(B.host(r));const l=r.nodeName==="#document"?(s=r.defaultView)==null?void 0:s.Document:(a=(i=r.ownerDocument)==null?void 0:i.defaultView)==null?void 0:a.ShadowRoot,d=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!l||!d?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:d.configurable,enumerable:d.enumerable,get(){var u;return(u=d.get)==null?void 0:u.call(this)},set(u){var n;const f=(n=d.set)==null?void 0:n.call(this,u);if(o!==null&&o!==-1)try{t.adoptStyleSheets(u,o)}catch(c){}return f}}),W(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:d.configurable,enumerable:d.enumerable,get:d.get,set:d.set})}))}function Su({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:s},{win:i}){const a=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:W((l,d,u)=>{var n;const[f,c,h]=u;if(r.has(f))return a.apply(d,[f,c,h]);const{id:m,styleId:p}=xe((n=d.parentRule)==null?void 0:n.parentStyleSheet,t,s.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,set:{property:f,value:c,priority:h},index:At(d.parentRule)}),l.apply(d,u)})});const o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:W((l,d,u)=>{var n;const[f]=u;if(r.has(f))return o.apply(d,[f]);const{id:c,styleId:h}=xe((n=d.parentRule)==null?void 0:n.parentStyleSheet,t,s.styleMirror);return(c&&c!==-1||h&&h!==-1)&&e({id:c,styleId:h,remove:{property:f},index:At(d.parentRule)}),l.apply(d,u)})}),W(()=>{i.CSSStyleDeclaration.prototype.setProperty=a,i.CSSStyleDeclaration.prototype.removeProperty=o})}function Cu({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:s,sampling:i,doc:a}){const o=W(d=>Je(W(u=>{const n=ct(u);if(!n||ae(n,t,r,!0))return;const{currentTime:f,volume:c,muted:h,playbackRate:m,loop:p}=n;e({type:d,id:s.getId(n),currentTime:f,volume:c,muted:h,playbackRate:m,loop:p})}),i.media||500)),l=[oe("play",o(Me.Play),a),oe("pause",o(Me.Pause),a),oe("seeked",o(Me.Seeked),a),oe("volumechange",o(Me.VolumeChange),a),oe("ratechange",o(Me.RateChange),a)];return W(()=>{l.forEach(d=>d())})}function Eu({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const s=[],i=new WeakMap,a=r.FontFace;r.FontFace=function(d,u,n){const f=new a(d,u,n);return i.set(f,{family:d,buffer:typeof u!="string",descriptors:n,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),f};const o=Fe(t.fonts,"add",function(l){return function(d){return setTimeout(W(()=>{const u=i.get(d);u&&(e(u),i.delete(d))}),0),l.apply(this,[d])}});return s.push(()=>{r.FontFace=a}),s.push(o),W(()=>{s.forEach(l=>l())})}function Ru(e){const{doc:t,mirror:r,blockClass:s,blockSelector:i,selectionCb:a}=e;let o=!0;const l=W(()=>{const d=t.getSelection();if(!d||o&&(d!=null&&d.isCollapsed))return;o=d.isCollapsed||!1;const u=[],n=d.rangeCount||0;for(let f=0;f<n;f++){const c=d.getRangeAt(f),{startContainer:h,startOffset:m,endContainer:p,endOffset:g}=c;ae(h,s,i,!0)||ae(p,s,i,!0)||u.push({start:r.getId(h),startOffset:m,end:r.getId(p),endOffset:g})}a({ranges:u})});return l(),oe("selectionchange",l)}function xu({doc:e,customElementCb:t}){const r=e.defaultView;return!r||!r.customElements?()=>{}:Fe(r.customElements,"define",function(i){return function(a,o,l){try{t({define:{name:a}})}catch(d){console.warn(`Custom element callback failed for ${a}`)}return i.apply(this,[a,o,l])}})}function Mu(e,t){const{mutationCb:r,mousemoveCb:s,mouseInteractionCb:i,scrollCb:a,viewportResizeCb:o,inputCb:l,mediaInteractionCb:d,styleSheetRuleCb:u,styleDeclarationCb:n,canvasMutationCb:f,fontCb:c,selectionCb:h,customElementCb:m}=e;e.mutationCb=(...p)=>{t.mutation&&t.mutation(...p),r(...p)},e.mousemoveCb=(...p)=>{t.mousemove&&t.mousemove(...p),s(...p)},e.mouseInteractionCb=(...p)=>{t.mouseInteraction&&t.mouseInteraction(...p),i(...p)},e.scrollCb=(...p)=>{t.scroll&&t.scroll(...p),a(...p)},e.viewportResizeCb=(...p)=>{t.viewportResize&&t.viewportResize(...p),o(...p)},e.inputCb=(...p)=>{t.input&&t.input(...p),l(...p)},e.mediaInteractionCb=(...p)=>{t.mediaInteaction&&t.mediaInteaction(...p),d(...p)},e.styleSheetRuleCb=(...p)=>{t.styleSheetRule&&t.styleSheetRule(...p),u(...p)},e.styleDeclarationCb=(...p)=>{t.styleDeclaration&&t.styleDeclaration(...p),n(...p)},e.canvasMutationCb=(...p)=>{t.canvasMutation&&t.canvasMutation(...p),f(...p)},e.fontCb=(...p)=>{t.font&&t.font(...p),c(...p)},e.selectionCb=(...p)=>{t.selection&&t.selection(...p),h(...p)},e.customElementCb=(...p)=>{t.customElement&&t.customElement(...p),m(...p)}}function Nu(e,t={}){const r=e.doc.defaultView;if(!r)return()=>{};Mu(e,t);let s;e.recordDOM&&(s=Do(e,e.doc));const i=mu(e),a=gu(e),o=Ao(e),l=yu(e,{win:r}),d=bu(e),u=Cu(e);let n=()=>{},f=()=>{},c=()=>{},h=()=>{};e.recordDOM&&(n=vu(e,{win:r}),f=To(e,e.doc),c=Su(e,{win:r}),e.collectFonts&&(h=Eu(e)));const m=Ru(e),p=xu(e),g=[];for(const w of e.plugins)g.push(w.observer(w.callback,r,w.options));return W(()=>{Pe.forEach(w=>w.reset()),s==null||s.disconnect(),i(),a(),o(),l(),d(),u(),n(),f(),c(),h(),m(),p(),g.forEach(w=>w())})}function wt(e){return typeof window[e]!="undefined"}function bt(e){return!!(typeof window[e]!="undefined"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Cn{constructor(t){M(this,"iframeIdToRemoteIdMap",new WeakMap),M(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,r,s,i){const a=s||this.getIdToRemoteIdMap(t),o=i||this.getRemoteIdToIdMap(t);let l=a.get(r);return l||(l=this.generateIdFn(),a.set(r,l),o.set(l,r)),l}getIds(t,r){const s=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return r.map(a=>this.getId(t,a,s,i))}getRemoteId(t,r,s){const i=s||this.getRemoteIdToIdMap(t);if(typeof r!="number")return r;const a=i.get(r);return a||-1}getRemoteIds(t,r){const s=this.getRemoteIdToIdMap(t);return r.map(i=>this.getRemoteId(t,i,s))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let r=this.iframeIdToRemoteIdMap.get(t);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(t,r)),r}getRemoteIdToIdMap(t){let r=this.iframeRemoteIdToIdMap.get(t);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(t,r)),r}}class Ou{constructor(t){M(this,"iframes",new WeakMap),M(this,"crossOriginIframeMap",new WeakMap),M(this,"crossOriginIframeMirror",new Cn($n)),M(this,"crossOriginIframeStyleMirror"),M(this,"crossOriginIframeRootIdMap",new WeakMap),M(this,"mirror"),M(this,"mutationCb"),M(this,"wrappedEmit"),M(this,"loadListener"),M(this,"stylesheetManager"),M(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Cn(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,r){var s,i;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((s=t.contentWindow)==null||s.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const r=t;if(r.data.type!=="rrweb"||r.origin!==r.data.origin||!t.source)return;const i=this.crossOriginIframeMap.get(t.source);if(!i)return;const a=this.transformCrossOriginEvent(i,r.data.event);a&&this.wrappedEmit(a,r.data.isCheckout)}transformCrossOriginEvent(t,r){var s;switch(r.type){case _.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(r.data.node,t);const i=r.data.node.id;return this.crossOriginIframeRootIdMap.set(t,i),this.patchRootIdOnNode(r.data.node,i),{timestamp:r.timestamp,type:_.IncrementalSnapshot,data:{source:T.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case _.Meta:case _.Load:case _.DomContentLoaded:return!1;case _.Plugin:return r;case _.Custom:return this.replaceIds(r.data.payload,t,["id","parentId","previousId","nextId"]),r;case _.IncrementalSnapshot:switch(r.data.source){case T.Mutation:return r.data.adds.forEach(i=>{this.replaceIds(i,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,t);const a=this.crossOriginIframeRootIdMap.get(t);a&&this.patchRootIdOnNode(i.node,a)}),r.data.removes.forEach(i=>{this.replaceIds(i,t,["parentId","id"])}),r.data.attributes.forEach(i=>{this.replaceIds(i,t,["id"])}),r.data.texts.forEach(i=>{this.replaceIds(i,t,["id"])}),r;case T.Drag:case T.TouchMove:case T.MouseMove:return r.data.positions.forEach(i=>{this.replaceIds(i,t,["id"])}),r;case T.ViewportResize:return!1;case T.MediaInteraction:case T.MouseInteraction:case T.Scroll:case T.CanvasMutation:case T.Input:return this.replaceIds(r.data,t,["id"]),r;case T.StyleSheetRule:case T.StyleDeclaration:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleId"]),r;case T.Font:return r;case T.Selection:return r.data.ranges.forEach(i=>{this.replaceIds(i,t,["start","end"])}),r;case T.AdoptedStyleSheet:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleIds"]),(s=r.data.styles)==null||s.forEach(i=>{this.replaceStyleIds(i,t,["styleId"])}),r}}return!1}replace(t,r,s,i){for(const a of i)!Array.isArray(r[a])&&typeof r[a]!="number"||(Array.isArray(r[a])?r[a]=t.getIds(s,r[a]):r[a]=t.getId(s,r[a]));return r}replaceIds(t,r,s){return this.replace(this.crossOriginIframeMirror,t,r,s)}replaceStyleIds(t,r,s){return this.replace(this.crossOriginIframeStyleMirror,t,r,s)}replaceIdOnNode(t,r){this.replaceIds(t,r,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(s=>{this.replaceIdOnNode(s,r)})}patchRootIdOnNode(t,r){t.type!==Se.Document&&!t.rootId&&(t.rootId=r),"childNodes"in t&&t.childNodes.forEach(s=>{this.patchRootIdOnNode(s,r)})}}class Iu{constructor(t){M(this,"shadowDoms",new WeakSet),M(this,"mutationCb"),M(this,"scrollCb"),M(this,"bypassOptions"),M(this,"mirror"),M(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,r){if(!et(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const s=Do(se(L({},this.bypassOptions),{doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push(()=>s.disconnect()),this.restoreHandlers.push(Ao(se(L({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(B.host(t))),this.restoreHandlers.push(To({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,r){const s=this;this.restoreHandlers.push(Fe(t.prototype,"attachShadow",function(i){return function(a){const o=i.call(this,a),l=B.shadowRoot(this);return l&&qs(this)&&s.addShadowRoot(l,r),o}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch(r){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Ge="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ke=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var vt=0;vt<Ge.length;vt++)Ke[Ge.charCodeAt(vt)]=vt;var Du=function(e){var t=new Uint8Array(e),r,s=t.length,i="";for(r=0;r<s;r+=3)i+=Ge[t[r]>>2],i+=Ge[(t[r]&3)<<4|t[r+1]>>4],i+=Ge[(t[r+1]&15)<<2|t[r+2]>>6],i+=Ge[t[r+2]&63];return s%3===2?i=i.substring(0,i.length-1)+"=":s%3===1&&(i=i.substring(0,i.length-2)+"=="),i},Au=function(e){var t=e.length*.75,r=e.length,s,i=0,a,o,l,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);var u=new ArrayBuffer(t),n=new Uint8Array(u);for(s=0;s<r;s+=4)a=Ke[e.charCodeAt(s)],o=Ke[e.charCodeAt(s+1)],l=Ke[e.charCodeAt(s+2)],d=Ke[e.charCodeAt(s+3)],n[i++]=a<<2|o>>4,n[i++]=(o&15)<<4|l>>2,n[i++]=(l&3)<<6|d&63;return u};const En=new Map;function Tu(e,t){let r=En.get(e);return r||(r=new Map,En.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}const _o=(e,t,r)=>{if(!e||!(ko(e,t)||typeof e=="object"))return;const s=e.constructor.name,i=Tu(r,s);let a=i.indexOf(e);return a===-1&&(a=i.length,i.push(e)),a};function Et(e,t,r){if(e instanceof Array)return e.map(s=>Et(s,t,r));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const s=e.constructor.name,i=Du(e);return{rr_type:s,base64:i}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Et(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const s=e.constructor.name,{src:i}=e;return{rr_type:s,src:i}}else if(e instanceof HTMLCanvasElement){const s="HTMLImageElement",i=e.toDataURL();return{rr_type:s,src:i}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Et(e.data,t,r),e.width,e.height]};if(ko(e,t)||typeof e=="object"){const s=e.constructor.name,i=_o(e,t,r);return{rr_type:s,index:i}}}}return e}const Po=(e,t,r)=>e.map(s=>Et(s,t,r)),ko=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof t[i]=="function").find(i=>e instanceof t[i]);function _u(e,t,r,s){const i=[],a=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const o of a)try{if(typeof t.CanvasRenderingContext2D.prototype[o]!="function")continue;const l=Fe(t.CanvasRenderingContext2D.prototype,o,function(d){return function(...u){return ae(this.canvas,r,s,!0)||setTimeout(()=>{const n=Po(u,t,this);e(this.canvas,{type:Ce["2D"],property:o,args:n})},0),d.apply(this,u)}});i.push(l)}catch(l){const d=ut(t.CanvasRenderingContext2D.prototype,o,{set(u){e(this.canvas,{type:Ce["2D"],property:o,args:[u],setter:!0})}});i.push(d)}return()=>{i.forEach(o=>o())}}function Pu(e){return e==="experimental-webgl"?"webgl":e}function Rn(e,t,r,s){const i=[];try{const a=Fe(e.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...d){if(!ae(this,t,r,!0)){const u=Pu(l);if("__context"in this||(this.__context=u),s&&["webgl","webgl2"].includes(u))if(d[0]&&typeof d[0]=="object"){const n=d[0];n.preserveDrawingBuffer||(n.preserveDrawingBuffer=!0)}else d.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[l,...d])}});i.push(a)}catch(a){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(a=>a())}}function xn(e,t,r,s,i,a){const o=[],l=Object.getOwnPropertyNames(e);for(const d of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(d))try{if(typeof e[d]!="function")continue;const u=Fe(e,d,function(n){return function(...f){const c=n.apply(this,f);if(_o(c,a,this),"tagName"in this.canvas&&!ae(this.canvas,s,i,!0)){const h=Po(f,a,this),m={type:t,property:d,args:h};r(this.canvas,m)}return c}});o.push(u)}catch(u){const n=ut(e,d,{set(f){r(this.canvas,{type:t,property:d,args:[f],setter:!0})}});o.push(n)}return o}function ku(e,t,r,s){const i=[];return i.push(...xn(t.WebGLRenderingContext.prototype,Ce.WebGL,e,r,s,t)),typeof t.WebGL2RenderingContext!="undefined"&&i.push(...xn(t.WebGL2RenderingContext.prototype,Ce.WebGL2,e,r,s,t)),()=>{i.forEach(a=>a())}}const Lo=`(function() {
72
72
  "use strict";
73
73
  var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
74
74
  var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
@@ -143,7 +143,7 @@ or you can use record.mirror to access the mirror instance during recording.`;ex
143
143
  };
144
144
  })();
145
145
  //# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map
146
- `,On=typeof self!="undefined"&&self.Blob&&new Blob([Lo],{type:"text/javascript;charset=utf-8"});function ku(e){let t;try{if(t=On&&(self.URL||self.webkitURL).createObjectURL(On),!t)throw"";const r=new Worker(t,{name:e==null?void 0:e.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch(r){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Lo),{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}class Lu{constructor(t){M(this,"pendingCanvasMutations",new Map),M(this,"rafStamps",{latestId:0,invokeId:null}),M(this,"mirror"),M(this,"mutationCb"),M(this,"resetObservers"),M(this,"frozen",!1),M(this,"locked",!1),M(this,"processMutation",(d,u)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(d)||this.pendingCanvasMutations.set(d,[]),this.pendingCanvasMutations.get(d).push(u)});const{sampling:r="all",win:s,blockClass:i,blockSelector:a,recordCanvas:o,dataURLOptions:l}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,o&&r==="all"&&this.initCanvasMutationObserver(s,i,a),o&&typeof r=="number"&&this.initCanvasFPSObserver(r,s,i,a,{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(t,r,s,i,a){const o=xn(r,s,i,!0),l=new Map,d=new ku;d.onmessage=m=>{const{id:p}=m.data;if(l.set(p,!1),!("base64"in m.data))return;const{base64:g,type:w,width:y,height:b}=m.data;this.mutationCb({id:p,type:Ce["2D"],commands:[{property:"clearRect",args:[0,0,y,b]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:g}],type:w}]},0,0]}]})};const u=1e3/t;let n=0,f;const c=()=>{const m=[],p=g=>{g.querySelectorAll("canvas").forEach(w=>{ae(w,s,i,!0)||m.push(w)}),g.querySelectorAll("*").forEach(w=>{w.shadowRoot&&p(w.shadowRoot)})};return p(r.document),m},h=m=>{if(n&&m-n<u){f=requestAnimationFrame(h);return}n=m,c().forEach(async p=>{var g;const w=this.mirror.getId(p);if(l.get(w)||p.width===0||p.height===0)return;if(l.set(w,!0),["webgl","webgl2"].includes(p.__context)){const v=p.getContext(p.__context);((g=v==null?void 0:v.getContextAttributes())==null?void 0:g.preserveDrawingBuffer)===!1&&v.clear(v.COLOR_BUFFER_BIT)}const y=p.clientWidth||p.width,b=p.clientHeight||p.height,C=await createImageBitmap(p,{resizeWidth:y,resizeHeight:b});d.postMessage({id:w,bitmap:C,width:y,height:b,dataURLOptions:a.dataURLOptions},[C])}),f=requestAnimationFrame(h)};f=requestAnimationFrame(h),this.resetObservers=()=>{o(),cancelAnimationFrame(f)}}initCanvasMutationObserver(t,r,s){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=xn(t,r,s,!1),a=Tu(this.processMutation.bind(this),t,r,s),o=Pu(this.processMutation.bind(this),t,r,s);this.resetObservers=()=>{i(),a(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=r=>{this.rafStamps.latestId=r,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,r)=>{const s=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,s)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,r){if(this.frozen||this.locked)return;const s=this.pendingCanvasMutations.get(t);if(!s||r===-1)return;const i=s.map(o=>{const u=o,{type:l}=u;return Ue(u,["type"])}),{type:a}=s[0];this.mutationCb({id:r,type:a,commands:i}),this.pendingCanvasMutations.delete(t)}}class Fu{constructor(t){M(this,"trackedLinkElements",new WeakSet),M(this,"mutationCb"),M(this,"adoptedStyleSheetCb"),M(this,"styleMirror",new Ws),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,r){if(t.length===0)return;const s={id:r,styleIds:[]},i=[];for(const a of t){let o;this.styleMirror.has(a)?o=this.styleMirror.getId(a):(o=this.styleMirror.add(a),i.push({styleId:o,rules:Array.from(a.rules||CSSRule,(l,d)=>({rule:Bn(l,a.href),index:d}))})),s.styleIds.push(o)}i.length>0&&(s.styles=i),this.adoptedStyleSheetCb(s)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class Uu{constructor(){M(this,"nodeMap",new WeakMap),M(this,"active",!1)}inOtherBuffer(t,r){const s=this.nodeMap.get(t);return s&&Array.from(s).some(i=>i!==r)}add(t,r){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(r))}destroy(){}}let K,Rt,Zr,Tt=!1;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((Hs=e.contentWindow)==null?void 0:Hs.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const fe=$n();function Te(e={}){const{emit:t,checkoutEveryNms:r,checkoutEveryNth:s,blockClass:i="rr-block",blockSelector:a=null,ignoreClass:o="rr-ignore",ignoreSelector:l=null,maskTextClass:d="rr-mask",maskTextSelector:u=null,inlineStylesheet:n=!0,maskAllInputs:f,maskInputOptions:c,slimDOMOptions:h,maskInputFn:m,maskTextFn:p,hooks:g,packFn:w,sampling:y={},dataURLOptions:b={},mousemoveWait:C,recordDOM:v=!0,recordCanvas:S=!1,recordCrossOriginIframes:E=!1,recordAfter:R=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:I=!1,collectFonts:O=!1,inlineImages:F=!1,plugins:D,keepIframeSrcFn:re=()=>!1,ignoreCSSAttributes:ie=new Set([]),errorHandler:x}=e;fu(x);const Z=E?window.parent===window:!0;let P=!1;if(!Z)try{window.parent.document&&(P=!1)}catch(k){P=!0}if(Z&&!t)throw new Error("emit function is required");if(!Z&&!P)return()=>{};C!==void 0&&y.mousemove===void 0&&(y.mousemove=C),fe.reset();const V=f===!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}:c!==void 0?c:{password:!0},ee=h===!0||h==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:h==="all",headMetaDescKeywords:h==="all",headTitleMutations:h==="all"}:h||{};Fs();let X,be=0;const Ee=k=>{for(const te of D||[])te.eventProcessor&&(k=te.eventProcessor(k));return w&&!P&&(k=w(k)),k};K=(k,te)=>{var j;const Q=k;if(Q.timestamp=it(),(j=Pe[0])!=null&&j.isFrozen()&&Q.type!==_.FullSnapshot&&!(Q.type===_.IncrementalSnapshot&&Q.data.source===T.Mutation)&&Pe.forEach(ye=>ye.unfreeze()),Z)t==null||t(Ee(Q),te);else if(P){const ye={type:"rrweb",event:Ee(Q),origin:window.location.origin,isCheckout:te};window.parent.postMessage(ye,"*")}if(Q.type===_.FullSnapshot)X=Q,be=0;else if(Q.type===_.IncrementalSnapshot){if(Q.data.source===T.Mutation&&Q.data.isAttachIframe)return;be++;const ye=s&&be>=s,G=r&&Q.timestamp-X.timestamp>r;(ye||G)&&Rt(!0)}};const N=k=>{K({type:_.IncrementalSnapshot,data:L({source:T.Mutation},k)})},ge=k=>K({type:_.IncrementalSnapshot,data:L({source:T.Scroll},k)}),ce=k=>K({type:_.IncrementalSnapshot,data:L({source:T.CanvasMutation},k)}),Qe=k=>K({type:_.IncrementalSnapshot,data:L({source:T.AdoptedStyleSheet},k)}),le=new Fu({mutationCb:N,adoptedStyleSheetCb:Qe}),he=new Ou({mirror:fe,mutationCb:N,stylesheetManager:le,recordCrossOriginIframes:E,wrappedEmit:K});for(const k of D||[])k.getMirror&&k.getMirror({nodeMirror:fe,crossOriginIframeMirror:he.crossOriginIframeMirror,crossOriginIframeStyleMirror:he.crossOriginIframeStyleMirror});const _e=new Uu;Zr=new Lu({recordCanvas:S,mutationCb:ce,win:window,blockClass:i,blockSelector:a,mirror:fe,sampling:y.canvas,dataURLOptions:b});const Re=new Nu({mutationCb:N,scrollCb:ge,bypassOptions:{blockClass:i,blockSelector:a,maskTextClass:d,maskTextSelector:u,inlineStylesheet:n,maskInputOptions:V,dataURLOptions:b,maskTextFn:p,maskInputFn:m,recordCanvas:S,inlineImages:F,sampling:y,slimDOMOptions:ee,iframeManager:he,stylesheetManager:le,canvasManager:Zr,keepIframeSrcFn:re,processedNodeManager:_e},mirror:fe});Rt=(k=!1)=>{if(!v)return;K({type:_.Meta,data:{href:window.location.href,width:Ps(),height:_s()}},k),le.reset(),Re.init(),Pe.forEach(j=>j.lock());const te=Ua(document,{mirror:fe,blockClass:i,blockSelector:a,maskTextClass:d,maskTextSelector:u,inlineStylesheet:n,maskAllInputs:V,maskTextFn:p,maskInputFn:m,slimDOM:ee,dataURLOptions:b,recordCanvas:S,inlineImages:F,onSerialize:j=>{Ye(j,fe)&&he.addIframe(j),Bs(j,fe)&&le.trackLinkElement(j),Oe(j)&&Re.addShadowRoot(B.shadowRoot(j),document)},onIframeLoad:(j,Q)=>{he.attachIframe(j,Q),Re.observeAttachShadow(j)},onStylesheetLoad:(j,Q)=>{le.attachLinkElement(j,Q)},keepIframeSrcFn:re});if(!te)return console.warn("Failed to snapshot the document");K({type:_.FullSnapshot,data:{node:te,initialOffset:Ts(window)}},k),Pe.forEach(j=>j.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&le.adoptStyleSheets(document.adoptedStyleSheets,fe.getId(document))};try{const k=[],te=Q=>{var ye;return W(Mu)({mutationCb:N,mousemoveCb:(G,Vt)=>K({type:_.IncrementalSnapshot,data:{source:Vt,positions:G}}),mouseInteractionCb:G=>K({type:_.IncrementalSnapshot,data:L({source:T.MouseInteraction},G)}),scrollCb:ge,viewportResizeCb:G=>K({type:_.IncrementalSnapshot,data:L({source:T.ViewportResize},G)}),inputCb:G=>K({type:_.IncrementalSnapshot,data:L({source:T.Input},G)}),mediaInteractionCb:G=>K({type:_.IncrementalSnapshot,data:L({source:T.MediaInteraction},G)}),styleSheetRuleCb:G=>K({type:_.IncrementalSnapshot,data:L({source:T.StyleSheetRule},G)}),styleDeclarationCb:G=>K({type:_.IncrementalSnapshot,data:L({source:T.StyleDeclaration},G)}),canvasMutationCb:ce,fontCb:G=>K({type:_.IncrementalSnapshot,data:L({source:T.Font},G)}),selectionCb:G=>{K({type:_.IncrementalSnapshot,data:L({source:T.Selection},G)})},customElementCb:G=>{K({type:_.IncrementalSnapshot,data:L({source:T.CustomElement},G)})},blockClass:i,ignoreClass:o,ignoreSelector:l,maskTextClass:d,maskTextSelector:u,maskInputOptions:V,inlineStylesheet:n,sampling:y,recordDOM:v,recordCanvas:S,inlineImages:F,userTriggeredOnInput:I,collectFonts:O,doc:Q,maskInputFn:m,maskTextFn:p,keepIframeSrcFn:re,blockSelector:a,slimDOMOptions:ee,dataURLOptions:b,mirror:fe,iframeManager:he,stylesheetManager:le,shadowDomManager:Re,processedNodeManager:_e,canvasManager:Zr,ignoreCSSAttributes:ie,plugins:((ye=D==null?void 0:D.filter(G=>G.observer))==null?void 0:ye.map(G=>({observer:G.observer,options:G.options,callback:Vt=>K({type:_.Plugin,data:{plugin:G.name,payload:Vt}})})))||[]},g)};he.addLoadListener(Q=>{try{k.push(te(Q.contentDocument))}catch(ye){console.warn(ye)}});const j=()=>{Rt(),k.push(te(document)),Tt=!0};return document.readyState==="interactive"||document.readyState==="complete"?j():(k.push(oe("DOMContentLoaded",()=>{K({type:_.DomContentLoaded,data:{}}),R==="DOMContentLoaded"&&j()})),k.push(oe("load",()=>{K({type:_.Load,data:{}}),R==="load"&&j()},window))),()=>{k.forEach(Q=>Q()),_e.destroy(),Tt=!1,du()}}catch(k){console.warn(k)}}Te.addCustomEvent=(e,t)=>{if(!Tt)throw new Error("please add custom event after start recording");K({type:_.Custom,data:{tag:e,payload:t}})};Te.freezePage=()=>{Pe.forEach(e=>e.freeze())};Te.takeFullSnapshot=e=>{if(!Tt)throw new Error("please take full snapshot after start recording");Rt(e)};Te.mirror=fe;function Fo(e){return{all:e=e||new Map,on:function(t,r){var s=e.get(t);s?s.push(r):e.set(t,[r])},off:function(t,r){var s=e.get(t);s&&(r?s.splice(s.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var s=e.get(t);s&&s.slice().map(function(i){i(r)}),(s=e.get("*"))&&s.slice().map(function(i){i(t,r)})}}}const Bu=Object.freeze(Object.defineProperty({__proto__:null,default:Fo},Symbol.toStringTag,{value:"Module"}));function $u(e=window,t=document){if("scrollBehavior"in t.documentElement.style&&e.__forceSmoothScrollPolyfill__!==!0)return;const r=e.HTMLElement||e.Element,s=468,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||d,scrollIntoView:r.prototype.scrollIntoView},a=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now;function o(w){const y=["MSIE ","Trident/","Edge/"];return new RegExp(y.join("|")).test(w)}const l=o(e.navigator.userAgent)?1:0;function d(w,y){this.scrollLeft=w,this.scrollTop=y}function u(w){return .5*(1-Math.cos(Math.PI*w))}function n(w){if(w===null||typeof w!="object"||w.behavior===void 0||w.behavior==="auto"||w.behavior==="instant")return!0;if(typeof w=="object"&&w.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+w.behavior+" is not a valid value for enumeration ScrollBehavior.")}function f(w,y){if(y==="Y")return w.clientHeight+l<w.scrollHeight;if(y==="X")return w.clientWidth+l<w.scrollWidth}function c(w,y){const b=e.getComputedStyle(w,null)["overflow"+y];return b==="auto"||b==="scroll"}function h(w){const y=f(w,"Y")&&c(w,"Y"),b=f(w,"X")&&c(w,"X");return y||b}function m(w){for(;w!==t.body&&h(w)===!1;)w=w.parentNode||w.host;return w}function p(w){const y=a();let b,C,v,S=(y-w.startTime)/s;S=S>1?1:S,b=u(S),C=w.startX+(w.x-w.startX)*b,v=w.startY+(w.y-w.startY)*b,w.method.call(w.scrollable,C,v),(C!==w.x||v!==w.y)&&e.requestAnimationFrame(p.bind(e,w))}function g(w,y,b){let C,v,S,E;const R=a();w===t.body?(C=e,v=e.scrollX||e.pageXOffset,S=e.scrollY||e.pageYOffset,E=i.scroll):(C=w,v=w.scrollLeft,S=w.scrollTop,E=d),p({scrollable:C,method:E,startTime:R,startX:v,startY:S,x:y,y:b})}e.scroll=e.scrollTo=function(){if(arguments[0]!==void 0){if(n(arguments[0])===!0){i.scroll.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:e.scrollY||e.pageYOffset);return}g.call(e,t.body,arguments[0].left!==void 0?~~arguments[0].left:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:e.scrollY||e.pageYOffset)}},e.scrollBy=function(){if(arguments[0]!==void 0){if(n(arguments[0])){i.scrollBy.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}g.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset))}},r.prototype.scroll=r.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(n(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}const w=arguments[0].left,y=arguments[0].top;g.call(this,this,typeof w=="undefined"?this.scrollLeft:~~w,typeof y=="undefined"?this.scrollTop:~~y)},r.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(n(arguments[0])===!0){i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},r.prototype.scrollIntoView=function(){if(n(arguments[0])===!0){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const w=m(this),y=w.getBoundingClientRect(),b=this.getBoundingClientRect();w!==t.body?(g.call(this,w,w.scrollLeft+b.left-y.left,w.scrollTop+b.top-y.top),e.getComputedStyle(w).position!=="fixed"&&e.scrollBy({left:y.left,top:y.top,behavior:"smooth"})):e.scrollBy({left:b.left,top:b.top,behavior:"smooth"})}}class Wu{constructor(t=[],r){M(this,"timeOffset",0),M(this,"speed"),M(this,"actions"),M(this,"raf",null),M(this,"lastTimestamp"),this.actions=t,this.speed=r.speed}addAction(t){const r=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=t.delay)this.actions.push(t);else{const s=this.findActionIndex(t);this.actions.splice(s,0,t)}r&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){const t=performance.now();for(this.timeOffset+=(t-this.lastTimestamp)*this.speed,this.lastTimestamp=t;this.actions.length;){const r=this.actions[0];if(this.timeOffset>=r.delay)this.actions.shift(),r.doAction();else break}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}clear(){this.raf&&(this.raf!==!0&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(t){this.speed=t}isActive(){return this.raf!==null}findActionIndex(t){let r=0,s=this.actions.length-1;for(;r<=s;){const i=Math.floor((r+s)/2);if(this.actions[i].delay<t.delay)r=i+1;else if(this.actions[i].delay>t.delay)s=i-1;else return i+1}return r}}function Nn(e,t){if(e.type===_.IncrementalSnapshot&&e.data.source===T.MouseMove&&e.data.positions&&e.data.positions.length){const r=e.data.positions[0].timeOffset,s=e.timestamp+r;return e.delay=s-t,s-t}return e.delay=e.timestamp-t,e.delay}/*! *****************************************************************************
146
+ `,Mn=typeof self!="undefined"&&self.Blob&&new Blob([Lo],{type:"text/javascript;charset=utf-8"});function Lu(e){let t;try{if(t=Mn&&(self.URL||self.webkitURL).createObjectURL(Mn),!t)throw"";const r=new Worker(t,{name:e==null?void 0:e.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch(r){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Lo),{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}class Fu{constructor(t){M(this,"pendingCanvasMutations",new Map),M(this,"rafStamps",{latestId:0,invokeId:null}),M(this,"mirror"),M(this,"mutationCb"),M(this,"resetObservers"),M(this,"frozen",!1),M(this,"locked",!1),M(this,"processMutation",(d,u)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(d)||this.pendingCanvasMutations.set(d,[]),this.pendingCanvasMutations.get(d).push(u)});const{sampling:r="all",win:s,blockClass:i,blockSelector:a,recordCanvas:o,dataURLOptions:l}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,o&&r==="all"&&this.initCanvasMutationObserver(s,i,a),o&&typeof r=="number"&&this.initCanvasFPSObserver(r,s,i,a,{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(t,r,s,i,a){const o=Rn(r,s,i,!0),l=new Map,d=new Lu;d.onmessage=m=>{const{id:p}=m.data;if(l.set(p,!1),!("base64"in m.data))return;const{base64:g,type:w,width:y,height:b}=m.data;this.mutationCb({id:p,type:Ce["2D"],commands:[{property:"clearRect",args:[0,0,y,b]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:g}],type:w}]},0,0]}]})};const u=1e3/t;let n=0,f;const c=()=>{const m=[],p=g=>{g.querySelectorAll("canvas").forEach(w=>{ae(w,s,i,!0)||m.push(w)}),g.querySelectorAll("*").forEach(w=>{w.shadowRoot&&p(w.shadowRoot)})};return p(r.document),m},h=m=>{if(n&&m-n<u){f=requestAnimationFrame(h);return}n=m,c().forEach(async p=>{var g;const w=this.mirror.getId(p);if(l.get(w)||p.width===0||p.height===0)return;if(l.set(w,!0),["webgl","webgl2"].includes(p.__context)){const v=p.getContext(p.__context);((g=v==null?void 0:v.getContextAttributes())==null?void 0:g.preserveDrawingBuffer)===!1&&v.clear(v.COLOR_BUFFER_BIT)}const y=p.clientWidth||p.width,b=p.clientHeight||p.height,C=await createImageBitmap(p,{resizeWidth:y,resizeHeight:b});d.postMessage({id:w,bitmap:C,width:y,height:b,dataURLOptions:a.dataURLOptions},[C])}),f=requestAnimationFrame(h)};f=requestAnimationFrame(h),this.resetObservers=()=>{o(),cancelAnimationFrame(f)}}initCanvasMutationObserver(t,r,s){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=Rn(t,r,s,!1),a=_u(this.processMutation.bind(this),t,r,s),o=ku(this.processMutation.bind(this),t,r,s);this.resetObservers=()=>{i(),a(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=r=>{this.rafStamps.latestId=r,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,r)=>{const s=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,s)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,r){if(this.frozen||this.locked)return;const s=this.pendingCanvasMutations.get(t);if(!s||r===-1)return;const i=s.map(o=>{const u=o,{type:l}=u;return Ue(u,["type"])}),{type:a}=s[0];this.mutationCb({id:r,type:a,commands:i}),this.pendingCanvasMutations.delete(t)}}class Uu{constructor(t){M(this,"trackedLinkElements",new WeakSet),M(this,"mutationCb"),M(this,"adoptedStyleSheetCb"),M(this,"styleMirror",new Ws),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,r){if(t.length===0)return;const s={id:r,styleIds:[]},i=[];for(const a of t){let o;this.styleMirror.has(a)?o=this.styleMirror.getId(a):(o=this.styleMirror.add(a),i.push({styleId:o,rules:Array.from(a.rules||CSSRule,(l,d)=>({rule:Un(l,a.href),index:d}))})),s.styleIds.push(o)}i.length>0&&(s.styles=i),this.adoptedStyleSheetCb(s)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class Bu{constructor(){M(this,"nodeMap",new WeakMap),M(this,"active",!1)}inOtherBuffer(t,r){const s=this.nodeMap.get(t);return s&&Array.from(s).some(i=>i!==r)}add(t,r){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(r))}destroy(){}}let K,Rt,Zr,Tt=!1;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((Hs=e.contentWindow)==null?void 0:Hs.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const fe=Bn();function Te(e={}){const{emit:t,checkoutEveryNms:r,checkoutEveryNth:s,blockClass:i="rr-block",blockSelector:a=null,ignoreClass:o="rr-ignore",ignoreSelector:l=null,maskTextClass:d="rr-mask",maskTextSelector:u=null,inlineStylesheet:n=!0,maskAllInputs:f,maskInputOptions:c,slimDOMOptions:h,maskInputFn:m,maskTextFn:p,hooks:g,packFn:w,sampling:y={},dataURLOptions:b={},mousemoveWait:C,recordDOM:v=!0,recordCanvas:S=!1,recordCrossOriginIframes:E=!1,recordAfter:R=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:I=!1,collectFonts:N=!1,inlineImages:F=!1,plugins:D,keepIframeSrcFn:re=()=>!1,ignoreCSSAttributes:ie=new Set([]),errorHandler:x}=e;du(x);const Z=E?window.parent===window:!0;let P=!1;if(!Z)try{window.parent.document&&(P=!1)}catch(k){P=!0}if(Z&&!t)throw new Error("emit function is required");if(!Z&&!P)return()=>{};C!==void 0&&y.mousemove===void 0&&(y.mousemove=C),fe.reset();const V=f===!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}:c!==void 0?c:{password:!0},ee=h===!0||h==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:h==="all",headMetaDescKeywords:h==="all",headTitleMutations:h==="all"}:h||{};Fs();let X,be=0;const Ee=k=>{for(const te of D||[])te.eventProcessor&&(k=te.eventProcessor(k));return w&&!P&&(k=w(k)),k};K=(k,te)=>{var j;const Q=k;if(Q.timestamp=it(),(j=Pe[0])!=null&&j.isFrozen()&&Q.type!==_.FullSnapshot&&!(Q.type===_.IncrementalSnapshot&&Q.data.source===T.Mutation)&&Pe.forEach(ye=>ye.unfreeze()),Z)t==null||t(Ee(Q),te);else if(P){const ye={type:"rrweb",event:Ee(Q),origin:window.location.origin,isCheckout:te};window.parent.postMessage(ye,"*")}if(Q.type===_.FullSnapshot)X=Q,be=0;else if(Q.type===_.IncrementalSnapshot){if(Q.data.source===T.Mutation&&Q.data.isAttachIframe)return;be++;const ye=s&&be>=s,G=r&&Q.timestamp-X.timestamp>r;(ye||G)&&Rt(!0)}};const O=k=>{K({type:_.IncrementalSnapshot,data:L({source:T.Mutation},k)})},ge=k=>K({type:_.IncrementalSnapshot,data:L({source:T.Scroll},k)}),ce=k=>K({type:_.IncrementalSnapshot,data:L({source:T.CanvasMutation},k)}),Qe=k=>K({type:_.IncrementalSnapshot,data:L({source:T.AdoptedStyleSheet},k)}),le=new Uu({mutationCb:O,adoptedStyleSheetCb:Qe}),he=new Ou({mirror:fe,mutationCb:O,stylesheetManager:le,recordCrossOriginIframes:E,wrappedEmit:K});for(const k of D||[])k.getMirror&&k.getMirror({nodeMirror:fe,crossOriginIframeMirror:he.crossOriginIframeMirror,crossOriginIframeStyleMirror:he.crossOriginIframeStyleMirror});const _e=new Bu;Zr=new Fu({recordCanvas:S,mutationCb:ce,win:window,blockClass:i,blockSelector:a,mirror:fe,sampling:y.canvas,dataURLOptions:b});const Re=new Iu({mutationCb:O,scrollCb:ge,bypassOptions:{blockClass:i,blockSelector:a,maskTextClass:d,maskTextSelector:u,inlineStylesheet:n,maskInputOptions:V,dataURLOptions:b,maskTextFn:p,maskInputFn:m,recordCanvas:S,inlineImages:F,sampling:y,slimDOMOptions:ee,iframeManager:he,stylesheetManager:le,canvasManager:Zr,keepIframeSrcFn:re,processedNodeManager:_e},mirror:fe});Rt=(k=!1)=>{if(!v)return;K({type:_.Meta,data:{href:window.location.href,width:Ps(),height:_s()}},k),le.reset(),Re.init(),Pe.forEach(j=>j.lock());const te=Ua(document,{mirror:fe,blockClass:i,blockSelector:a,maskTextClass:d,maskTextSelector:u,inlineStylesheet:n,maskAllInputs:V,maskTextFn:p,maskInputFn:m,slimDOM:ee,dataURLOptions:b,recordCanvas:S,inlineImages:F,onSerialize:j=>{Ye(j,fe)&&he.addIframe(j),Bs(j,fe)&&le.trackLinkElement(j),Ne(j)&&Re.addShadowRoot(B.shadowRoot(j),document)},onIframeLoad:(j,Q)=>{he.attachIframe(j,Q),Re.observeAttachShadow(j)},onStylesheetLoad:(j,Q)=>{le.attachLinkElement(j,Q)},keepIframeSrcFn:re});if(!te)return console.warn("Failed to snapshot the document");K({type:_.FullSnapshot,data:{node:te,initialOffset:Ts(window)}},k),Pe.forEach(j=>j.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&le.adoptStyleSheets(document.adoptedStyleSheets,fe.getId(document))};try{const k=[],te=Q=>{var ye;return W(Nu)({mutationCb:O,mousemoveCb:(G,Vt)=>K({type:_.IncrementalSnapshot,data:{source:Vt,positions:G}}),mouseInteractionCb:G=>K({type:_.IncrementalSnapshot,data:L({source:T.MouseInteraction},G)}),scrollCb:ge,viewportResizeCb:G=>K({type:_.IncrementalSnapshot,data:L({source:T.ViewportResize},G)}),inputCb:G=>K({type:_.IncrementalSnapshot,data:L({source:T.Input},G)}),mediaInteractionCb:G=>K({type:_.IncrementalSnapshot,data:L({source:T.MediaInteraction},G)}),styleSheetRuleCb:G=>K({type:_.IncrementalSnapshot,data:L({source:T.StyleSheetRule},G)}),styleDeclarationCb:G=>K({type:_.IncrementalSnapshot,data:L({source:T.StyleDeclaration},G)}),canvasMutationCb:ce,fontCb:G=>K({type:_.IncrementalSnapshot,data:L({source:T.Font},G)}),selectionCb:G=>{K({type:_.IncrementalSnapshot,data:L({source:T.Selection},G)})},customElementCb:G=>{K({type:_.IncrementalSnapshot,data:L({source:T.CustomElement},G)})},blockClass:i,ignoreClass:o,ignoreSelector:l,maskTextClass:d,maskTextSelector:u,maskInputOptions:V,inlineStylesheet:n,sampling:y,recordDOM:v,recordCanvas:S,inlineImages:F,userTriggeredOnInput:I,collectFonts:N,doc:Q,maskInputFn:m,maskTextFn:p,keepIframeSrcFn:re,blockSelector:a,slimDOMOptions:ee,dataURLOptions:b,mirror:fe,iframeManager:he,stylesheetManager:le,shadowDomManager:Re,processedNodeManager:_e,canvasManager:Zr,ignoreCSSAttributes:ie,plugins:((ye=D==null?void 0:D.filter(G=>G.observer))==null?void 0:ye.map(G=>({observer:G.observer,options:G.options,callback:Vt=>K({type:_.Plugin,data:{plugin:G.name,payload:Vt}})})))||[]},g)};he.addLoadListener(Q=>{try{k.push(te(Q.contentDocument))}catch(ye){console.warn(ye)}});const j=()=>{Rt(),k.push(te(document)),Tt=!0};return document.readyState==="interactive"||document.readyState==="complete"?j():(k.push(oe("DOMContentLoaded",()=>{K({type:_.DomContentLoaded,data:{}}),R==="DOMContentLoaded"&&j()})),k.push(oe("load",()=>{K({type:_.Load,data:{}}),R==="load"&&j()},window))),()=>{k.forEach(Q=>Q()),_e.destroy(),Tt=!1,pu()}}catch(k){console.warn(k)}}Te.addCustomEvent=(e,t)=>{if(!Tt)throw new Error("please add custom event after start recording");K({type:_.Custom,data:{tag:e,payload:t}})};Te.freezePage=()=>{Pe.forEach(e=>e.freeze())};Te.takeFullSnapshot=e=>{if(!Tt)throw new Error("please take full snapshot after start recording");Rt(e)};Te.mirror=fe;function Fo(e){return{all:e=e||new Map,on:function(t,r){var s=e.get(t);s?s.push(r):e.set(t,[r])},off:function(t,r){var s=e.get(t);s&&(r?s.splice(s.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var s=e.get(t);s&&s.slice().map(function(i){i(r)}),(s=e.get("*"))&&s.slice().map(function(i){i(t,r)})}}}const $u=Object.freeze(Object.defineProperty({__proto__:null,default:Fo},Symbol.toStringTag,{value:"Module"}));function Wu(e=window,t=document){if("scrollBehavior"in t.documentElement.style&&e.__forceSmoothScrollPolyfill__!==!0)return;const r=e.HTMLElement||e.Element,s=468,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||d,scrollIntoView:r.prototype.scrollIntoView},a=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now;function o(w){const y=["MSIE ","Trident/","Edge/"];return new RegExp(y.join("|")).test(w)}const l=o(e.navigator.userAgent)?1:0;function d(w,y){this.scrollLeft=w,this.scrollTop=y}function u(w){return .5*(1-Math.cos(Math.PI*w))}function n(w){if(w===null||typeof w!="object"||w.behavior===void 0||w.behavior==="auto"||w.behavior==="instant")return!0;if(typeof w=="object"&&w.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+w.behavior+" is not a valid value for enumeration ScrollBehavior.")}function f(w,y){if(y==="Y")return w.clientHeight+l<w.scrollHeight;if(y==="X")return w.clientWidth+l<w.scrollWidth}function c(w,y){const b=e.getComputedStyle(w,null)["overflow"+y];return b==="auto"||b==="scroll"}function h(w){const y=f(w,"Y")&&c(w,"Y"),b=f(w,"X")&&c(w,"X");return y||b}function m(w){for(;w!==t.body&&h(w)===!1;)w=w.parentNode||w.host;return w}function p(w){const y=a();let b,C,v,S=(y-w.startTime)/s;S=S>1?1:S,b=u(S),C=w.startX+(w.x-w.startX)*b,v=w.startY+(w.y-w.startY)*b,w.method.call(w.scrollable,C,v),(C!==w.x||v!==w.y)&&e.requestAnimationFrame(p.bind(e,w))}function g(w,y,b){let C,v,S,E;const R=a();w===t.body?(C=e,v=e.scrollX||e.pageXOffset,S=e.scrollY||e.pageYOffset,E=i.scroll):(C=w,v=w.scrollLeft,S=w.scrollTop,E=d),p({scrollable:C,method:E,startTime:R,startX:v,startY:S,x:y,y:b})}e.scroll=e.scrollTo=function(){if(arguments[0]!==void 0){if(n(arguments[0])===!0){i.scroll.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:e.scrollY||e.pageYOffset);return}g.call(e,t.body,arguments[0].left!==void 0?~~arguments[0].left:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:e.scrollY||e.pageYOffset)}},e.scrollBy=function(){if(arguments[0]!==void 0){if(n(arguments[0])){i.scrollBy.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}g.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset))}},r.prototype.scroll=r.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(n(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}const w=arguments[0].left,y=arguments[0].top;g.call(this,this,typeof w=="undefined"?this.scrollLeft:~~w,typeof y=="undefined"?this.scrollTop:~~y)},r.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(n(arguments[0])===!0){i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},r.prototype.scrollIntoView=function(){if(n(arguments[0])===!0){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const w=m(this),y=w.getBoundingClientRect(),b=this.getBoundingClientRect();w!==t.body?(g.call(this,w,w.scrollLeft+b.left-y.left,w.scrollTop+b.top-y.top),e.getComputedStyle(w).position!=="fixed"&&e.scrollBy({left:y.left,top:y.top,behavior:"smooth"})):e.scrollBy({left:b.left,top:b.top,behavior:"smooth"})}}class zu{constructor(t=[],r){M(this,"timeOffset",0),M(this,"speed"),M(this,"actions"),M(this,"raf",null),M(this,"lastTimestamp"),this.actions=t,this.speed=r.speed}addAction(t){const r=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=t.delay)this.actions.push(t);else{const s=this.findActionIndex(t);this.actions.splice(s,0,t)}r&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){const t=performance.now();for(this.timeOffset+=(t-this.lastTimestamp)*this.speed,this.lastTimestamp=t;this.actions.length;){const r=this.actions[0];if(this.timeOffset>=r.delay)this.actions.shift(),r.doAction();else break}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}clear(){this.raf&&(this.raf!==!0&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(t){this.speed=t}isActive(){return this.raf!==null}findActionIndex(t){let r=0,s=this.actions.length-1;for(;r<=s;){const i=Math.floor((r+s)/2);if(this.actions[i].delay<t.delay)r=i+1;else if(this.actions[i].delay>t.delay)s=i-1;else return i+1}return r}}function Nn(e,t){if(e.type===_.IncrementalSnapshot&&e.data.source===T.MouseMove&&e.data.positions&&e.data.positions.length){const r=e.data.positions[0].timeOffset,s=e.timestamp+r;return e.delay=s-t,s-t}return e.delay=e.timestamp-t,e.delay}/*! *****************************************************************************
147
147
  Copyright (c) Microsoft Corporation.
148
148
 
149
149
  Permission to use, copy, modify, and/or distribute this software for any
@@ -156,7 +156,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
156
156
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
157
157
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
158
158
  PERFORMANCE OF THIS SOFTWARE.
159
- ***************************************************************************** */function In(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var s,i,a=r.call(e),o=[];try{for(;(t===void 0||t-- >0)&&!(s=a.next()).done;)o.push(s.value)}catch(l){i={error:l}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return o}var He;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(He||(He={}));var Uo={type:"xstate.init"};function es(e){return e===void 0?[]:[].concat(e)}function ze(e){return{type:"xstate.assign",assignment:e}}function Dn(e,t){return typeof(e=typeof e=="string"&&t&&t[e]?t[e]:e)=="string"?{type:e}:typeof e=="function"?{type:e.name,exec:e}:e}function _t(e){return function(t){return e===t}}function Bo(e){return typeof e=="string"?{type:e}:e}function An(e,t){return{value:e,context:t,actions:[],changed:!1,matches:_t(e)}}function Tn(e,t,r){var s=t,i=!1;return[e.filter(function(a){if(a.type==="xstate.assign"){i=!0;var o=Object.assign({},s);return typeof a.assignment=="function"?o=a.assignment(s,r):Object.keys(a.assignment).forEach(function(l){o[l]=typeof a.assignment[l]=="function"?a.assignment[l](s,r):a.assignment[l]}),s=o,!1}return!0}),s,i]}function $o(e,t){t===void 0&&(t={});var r=In(Tn(es(e.states[e.initial].entry).map(function(o){return Dn(o,t.actions)}),e.context,Uo),2),s=r[0],i=r[1],a={config:e,_options:t,initialState:{value:e.initial,actions:s,context:i,matches:_t(e.initial)},transition:function(o,l){var d,u,n=typeof o=="string"?{value:o,context:e.context}:o,f=n.value,c=n.context,h=Bo(l),m=e.states[f];if(m.on){var p=es(m.on[h.type]);try{for(var g=function(P){var V=typeof Symbol=="function"&&Symbol.iterator,ee=V&&P[V],X=0;if(ee)return ee.call(P);if(P&&typeof P.length=="number")return{next:function(){return P&&X>=P.length&&(P=void 0),{value:P&&P[X++],done:!P}}};throw new TypeError(V?"Object is not iterable.":"Symbol.iterator is not defined.")}(p),w=g.next();!w.done;w=g.next()){var y=w.value;if(y===void 0)return An(f,c);var b=typeof y=="string"?{target:y}:y,C=b.target,v=b.actions,S=v===void 0?[]:v,E=b.cond,R=E===void 0?function(){return!0}:E,I=C===void 0,O=C!=null?C:f,F=e.states[O];if(R(c,h)){var D=In(Tn((I?es(S):[].concat(m.exit,S,F.entry).filter(function(P){return P})).map(function(P){return Dn(P,a._options.actions)}),c,h),3),re=D[0],ie=D[1],x=D[2],Z=C!=null?C:f;return{value:Z,context:ie,actions:re,changed:C!==f||re.length>0||x,matches:_t(Z)}}}}catch(P){d={error:P}}finally{try{w&&!w.done&&(u=g.return)&&u.call(g)}finally{if(d)throw d.error}}}return An(f,c)}};return a}var _n=function(e,t){return e.actions.forEach(function(r){var s=r.exec;return s&&s(e.context,t)})};function Wo(e){var t=e.initialState,r=He.NotStarted,s=new Set,i={_machine:e,send:function(a){r===He.Running&&(t=e.transition(t,a),_n(t,Bo(a)),s.forEach(function(o){return o(t)}))},subscribe:function(a){return s.add(a),a(t),{unsubscribe:function(){return s.delete(a)}}},start:function(a){if(a){var o=typeof a=="object"?a:{context:e.config.context,value:a};t={value:o.value,actions:[],context:o.context,matches:_t(o.value)}}return r=He.Running,_n(t,Uo),i},stop:function(){return r=He.Stopped,s.clear(),i},get state(){return t},get status(){return r}};return i}function zu(e,t){for(let r=e.length-1;r>=0;r--){const s=e[r];if(s.type===_.Meta&&s.timestamp<=t)return e.slice(r)}return e}function qu(e,{getCastFn:t,applyEventsSynchronously:r,emitter:s}){const i=$o({id:"player",context:e,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:ze({lastPlayedEvent:(a,o)=>o.type==="CAST_EVENT"?o.payload.event:a.lastPlayedEvent}),recordTimeOffset:ze((a,o)=>{let l=a.timeOffset;return"payload"in o&&"timeOffset"in o.payload&&(l=o.payload.timeOffset),se(L({},a),{timeOffset:l,baselineTime:a.events[0].timestamp+l})}),play(a){var o;const{timer:l,events:d,baselineTime:u,lastPlayedEvent:n}=a;l.clear();for(const m of d)Nn(m,u);const f=zu(d,u);let c=n==null?void 0:n.timestamp;(n==null?void 0:n.type)===_.IncrementalSnapshot&&n.data.source===T.MouseMove&&(c=n.timestamp+((o=n.data.positions[0])==null?void 0:o.timeOffset)),u<(c||0)&&s.emit(z.PlayBack);const h=new Array;for(const m of f)if(!(c&&c<u&&(m.timestamp<=c||m===n)))if(m.timestamp<u)h.push(m);else{const p=t(m,!1);l.addAction({doAction:()=>{p()},delay:m.delay})}r(h),s.emit(z.Flush),l.start()},pause(a){a.timer.clear()},resetLastPlayedEvent:ze(a=>se(L({},a),{lastPlayedEvent:null})),startLive:ze({baselineTime:(a,o)=>(a.timer.start(),o.type==="TO_LIVE"&&o.payload.baselineTime?o.payload.baselineTime:Date.now())}),addEvent:ze((a,o)=>{const{baselineTime:l,timer:d,events:u}=a;if(o.type==="ADD_EVENT"){const{event:n}=o.payload;Nn(n,l);let f=u.length-1;if(!u[f]||u[f].timestamp<=n.timestamp)u.push(n);else{let m=-1,p=0;for(;p<=f;){const g=Math.floor((p+f)/2);u[g].timestamp<=n.timestamp?p=g+1:f=g-1}m===-1&&(m=p),u.splice(m,0,n)}const c=n.timestamp<l,h=t(n,c);c?h():d.isActive()&&d.addAction({doAction:()=>{h()},delay:n.delay})}return se(L({},a),{events:u})})}});return Wo(i)}function Vu(e){const t=$o({id:"speed",context:e,initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:(r,s)=>{"payload"in s&&r.timer.setSpeed(s.payload.speed)},recordSpeed:ze({normalSpeed:r=>r.timer.speed}),restoreSpeed:r=>{r.timer.setSpeed(r.normalSpeed)}}});return Wo(t)}const ju=e=>[`.${e} { background: currentColor }`,"noscript { display: none !important; }"],Pn=new Map;function zo(e,t){let r=Pn.get(e);return r||(r=new Map,Pn.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}function Ne(e,t,r){return async s=>{if(s&&typeof s=="object"&&"rr_type"in s)if(r&&(r.isUnchanged=!1),s.rr_type==="ImageBitmap"&&"args"in s){const i=await Ne(e,t,r)(s.args);return await createImageBitmap.apply(null,i)}else if("index"in s){if(r||t===null)return s;const{rr_type:i,index:a}=s;return zo(t,i)[a]}else if("args"in s){const{rr_type:i,args:a}=s,o=window[i];return new o(...await Promise.all(a.map(Ne(e,t,r))))}else{if("base64"in s)return Du(s.base64);if("src"in s){const i=e.get(s.src);if(i)return i;{const a=new Image;return a.src=s.src,e.set(s.src,a),a}}else if("data"in s&&s.rr_type==="Blob"){const i=await Promise.all(s.data.map(Ne(e,t,r)));return new Blob(i,{type:s.type})}}else if(Array.isArray(s))return await Promise.all(s.map(Ne(e,t,r)));return s}}function Gu(e,t){try{return t===Ce.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch(r){return null}}const Hu=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function Yu(e,t){if(!(t!=null&&t.constructor))return;const{name:r}=t.constructor;if(!Hu.includes(r))return;const s=zo(e,r);s.includes(t)||s.push(t)}async function Ju({mutation:e,target:t,type:r,imageMap:s,errorHandler:i}){try{const a=Gu(t,r);if(!a)return;if(e.setter){a[e.property]=e.args[0];return}const o=a[e.property],l=await Promise.all(e.args.map(Ne(s,a))),d=o.apply(a,l);Yu(a,d);const u=!1}catch(a){i(e,a)}}async function Xu({event:e,mutations:t,target:r,imageMap:s,errorHandler:i}){const a=r.getContext("2d");if(!a){i(t[0],new Error("Canvas context is null"));return}const o=t.map(async d=>Promise.all(d.args.map(Ne(s,a))));(await Promise.all(o)).forEach((d,u)=>{const n=t[u];try{if(n.setter){a[n.property]=n.args[0];return}const f=a[n.property];n.property==="drawImage"&&typeof n.args[0]=="string"?(s.get(e),f.apply(a,n.args)):f.apply(a,d)}catch(f){i(n,f)}})}async function os({event:e,mutation:t,target:r,imageMap:s,canvasEventMap:i,errorHandler:a}){try{const o=i.get(e)||t,l="commands"in o?o.commands:[o];if([Ce.WebGL,Ce.WebGL2].includes(t.type)){for(let d=0;d<l.length;d++){const u=l[d];await Ju({mutation:u,type:t.type,target:r,imageMap:s,errorHandler:a})}return}await Xu({event:e,mutations:l,target:r,imageMap:s,errorHandler:a})}catch(o){a(t,o)}}const kn=["AUDIO","VIDEO"];class Qu{constructor(t){M(this,"mediaMap",new Map),M(this,"warn"),M(this,"service"),M(this,"speedService"),M(this,"emitter"),M(this,"getCurrentTime"),M(this,"metadataCallbackMap",new Map),this.warn=t.warn,this.service=t.service,this.speedService=t.speedService,this.emitter=t.emitter,this.getCurrentTime=t.getCurrentTime,this.emitter.on(z.Start,this.start.bind(this)),this.emitter.on(z.SkipStart,this.start.bind(this)),this.emitter.on(z.Pause,this.pause.bind(this)),this.emitter.on(z.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(t={pause:!1}){this.mediaMap.forEach((r,s)=>{this.syncTargetWithState(s),t.pause&&s.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:t,target:r,mediaState:s}){if(s.isPlaying){const a=(t-s.lastInteractionTimeOffset)/1e3*s.playbackRate,o="duration"in r&&r.duration;if(Number.isNaN(o)){this.waitForMetadata(r);return}let l=s.currentTimeAtLastInteraction+a;r.loop&&o!==!1&&(l=l%o),r.currentTime=l}else r.pause(),r.currentTime=s.currentTimeAtLastInteraction}waitForMetadata(t){if(this.metadataCallbackMap.has(t)||!("addEventListener"in t))return;const r=()=>{this.metadataCallbackMap.delete(t);const s=this.mediaMap.get(t);s&&this.seekTo({time:this.getCurrentTime(),target:t,mediaState:s})};this.metadataCallbackMap.set(t,r),t.addEventListener("loadedmetadata",r,{once:!0})}getMediaStateFromMutation({target:t,timeOffset:r,mutation:s}){var h,m,p,g,w;const i=this.mediaMap.get(t),{type:a,playbackRate:o,currentTime:l,muted:d,volume:u,loop:n}=s;return{isPlaying:a===Me.Play||a!==Me.Pause&&((i==null?void 0:i.isPlaying)||t.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(h=l!=null?l:i==null?void 0:i.currentTimeAtLastInteraction)!=null?h:0,lastInteractionTimeOffset:r,playbackRate:(m=o!=null?o:i==null?void 0:i.playbackRate)!=null?m:1,volume:(p=u!=null?u:i==null?void 0:i.volume)!=null?p:1,muted:(g=d!=null?d:i==null?void 0:i.muted)!=null?g:t.getAttribute("muted")===null,loop:(w=n!=null?n:i==null?void 0:i.loop)!=null?w:t.getAttribute("loop")===null}}syncTargetWithState(t){const r=this.mediaMap.get(t);if(!r)return;const{muted:s,loop:i,volume:a,isPlaying:o}=r,l=this.service.state.matches("paused"),d=r.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:t,mediaState:r}),t.volume!==a&&(t.volume=a),t.muted=s,t.loop=i,t.playbackRate!==d&&(t.playbackRate=d),o&&!l?t.play():t.pause()}catch(u){this.warn(`Failed to replay media interactions: ${u.message||u}`)}}addMediaElements(t,r,s){if(!this.isSupportedMediaElement(t))return;const i=t,a=s.getMeta(i);if(!a||!("attributes"in a))return;const o=this.service.state.matches("paused"),l=a.attributes;let d=!1;l.rr_mediaState?d=l.rr_mediaState==="played":d=i.getAttribute("autoplay")!==null,d&&o&&i.pause();let u=1;typeof l.rr_mediaPlaybackRate=="number"&&(u=l.rr_mediaPlaybackRate);let n=!1;typeof l.rr_mediaMuted=="boolean"?n=l.rr_mediaMuted:n=i.getAttribute("muted")!==null;let f=!1;typeof l.rr_mediaLoop=="boolean"?f=l.rr_mediaLoop:f=i.getAttribute("loop")!==null;let c=1;typeof l.rr_mediaVolume=="number"&&(c=l.rr_mediaVolume);let h=0;typeof l.rr_mediaCurrentTime=="number"&&(h=l.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:d,currentTimeAtLastInteraction:h,lastInteractionTimeOffset:r,playbackRate:u,volume:c,muted:n,loop:f}),this.syncTargetWithState(i)}mediaMutation({target:t,timeOffset:r,mutation:s}){kn.includes(t.nodeName)&&(this.mediaMap.set(t,this.getMediaStateFromMutation({target:t,timeOffset:r,mutation:s})),this.syncTargetWithState(t))}isSupportedMediaElement(t){return kn.includes(t.nodeName)}reset(){this.mediaMap.clear()}}function St(e,t){if(e.nodeName!=="DIALOG"||e instanceof me)return;const r=e,s=r.open,i=s&&r.matches("dialog:modal"),a=r.getAttribute("rr_open_mode"),o=typeof(t==null?void 0:t.attributes.open)=="string"||typeof r.getAttribute("open")=="string",l=a==="modal";if(!(s&&!(i&&a==="non-modal"||!i&&l))){if(!r.isConnected){console.warn("dialog is not attached to the dom",r);return}s&&r.close(),o&&(l?r.showModal():r.show())}}function Ku(e,t){if(e.nodeName!=="DIALOG"||e instanceof me)return;const r=e;if(!r.isConnected){console.warn("dialog is not attached to the dom",r);return}t.attributes.open===null&&(r.removeAttribute("open"),r.removeAttribute("rr_open_mode"))}const Zu=5*1e3,ec=Fo||Bu,Ln="[replayer]",ts={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Fn(e){return e.type==_.IncrementalSnapshot&&(e.data.source==T.TouchMove||e.data.source==T.MouseInteraction&&e.data.type==q.TouchStart)}class tc{constructor(t,r){if(M(this,"wrapper"),M(this,"iframe"),M(this,"service"),M(this,"speedService"),M(this,"config"),M(this,"usingVirtualDom",!1),M(this,"virtualDom",new Xe),M(this,"mouse"),M(this,"mouseTail",null),M(this,"tailPositions",[]),M(this,"emitter",ec()),M(this,"nextUserInteractionEvent"),M(this,"legacy_missingNodeRetryMap",{}),M(this,"cache",ki()),M(this,"imageMap",new Map),M(this,"canvasEventMap",new Map),M(this,"mirror",$n()),M(this,"styleMirror",new Ws),M(this,"mediaManager"),M(this,"firstFullSnapshot",null),M(this,"newDocumentQueue",[]),M(this,"mousePos",null),M(this,"touchActive",null),M(this,"lastMouseDownEvent",null),M(this,"lastHoveredRootNode"),M(this,"lastSelectionData",null),M(this,"constructedStyleMutations",[]),M(this,"adoptedStyleSheets",[]),M(this,"handleResize",l=>{this.iframe.style.display="inherit";for(const d of[this.mouseTail,this.iframe])d&&(d.setAttribute("width",String(l.width)),d.setAttribute("height",String(l.height)))}),M(this,"applyEventsSynchronously",l=>{for(const d of l){switch(d.type){case _.DomContentLoaded:case _.Load:case _.Custom:continue;case _.FullSnapshot:case _.Meta:case _.Plugin:case _.IncrementalSnapshot:break}this.getCastFn(d,!0)()}}),M(this,"getCastFn",(l,d=!1)=>{let u;switch(l.type){case _.DomContentLoaded:case _.Load:break;case _.Custom:u=()=>{this.emitter.emit(z.CustomEvent,l)};break;case _.Meta:u=()=>this.emitter.emit(z.Resize,{width:l.data.width,height:l.data.height});break;case _.FullSnapshot:u=()=>{var f;if(this.firstFullSnapshot){if(this.firstFullSnapshot===l){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(l,d),(f=this.iframe.contentWindow)==null||f.scrollTo(l.data.initialOffset)};break;case _.IncrementalSnapshot:u=()=>{if(this.applyIncremental(l,d),!d&&(l===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(const f of this.service.state.context.events)if(!(f.timestamp<=l.timestamp)&&this.isUserInteraction(f)){f.delay-l.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=f);break}if(this.nextUserInteractionEvent){const f=this.nextUserInteractionEvent.delay-l.delay,c={speed:Math.min(Math.round(f/Zu),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:c}),this.emitter.emit(z.SkipStart,c)}}};break}return()=>{u&&u();for(const c of this.config.plugins||[])c.handler&&c.handler(l,d,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:l}});const f=this.service.state.context.events.length-1;if(!this.config.liveMode&&l===this.service.state.context.events[f]){const c=()=>{f<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(z.Finish))};let h=50;l.type===_.IncrementalSnapshot&&l.data.source===T.MouseMove&&l.data.positions.length&&(h+=Math.max(0,-l.data.positions[0].timeOffset)),setTimeout(c,h)}this.emitter.emit(z.EventCast,l)}}),!(r!=null&&r.liveMode)&&t.length<2)throw new Error("Replayer need at least 2 events.");const s={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:10*1e3,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:ts,useVirtualDom:!0,logger:console};this.config=Object.assign({},s,r),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(z.Resize,this.handleResize),this.setupDom();for(const l of this.config.plugins||[])l.getMirror&&l.getMirror({nodeMirror:this.mirror});this.emitter.on(z.Flush,()=>{if(this.usingVirtualDom){const l={mirror:this.mirror,applyCanvas:(d,u,n)=>{os({event:d,mutation:u,target:n,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(d,u)=>{d.source===T.StyleSheetRule?this.applyStyleSheetRule(d,u):d.source===T.StyleDeclaration&&this.applyStyleDeclaration(d,u)},afterAppend:(d,u)=>{for(const n of this.config.plugins||[])n.onBuild&&n.onBuild(d,{id:u,replayer:this})}};if(this.iframe.contentDocument)try{Nt(this.iframe.contentDocument,this.virtualDom,l,this.virtualDom.mirror)}catch(d){console.warn(d)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const d in this.legacy_missingNodeRetryMap)try{const u=this.legacy_missingNodeRetryMap[d],n=It(u.node,this.mirror,this.virtualDom.mirror);Nt(n,u.node,l,this.virtualDom.mirror),u.node=n}catch(u){this.warn(u)}this.constructedStyleMutations.forEach(d=>{this.applyStyleSheetMutation(d)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(d=>{this.applyAdoptedStyleSheet(d)}),this.adoptedStyleSheets=[]}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),this.touchActive===!0?this.mouse.classList.add("touch-active"):this.touchActive===!1&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){const[l,d]=this.lastMouseDownEvent;l.dispatchEvent(d)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(z.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});const i=new Wu([],{speed:this.config.speed});this.service=qu({events:t.map(l=>r&&r.unpackFn?r.unpackFn(l):l).sort((l,d)=>l.timestamp-d.timestamp),timer:i,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(l=>{this.emitter.emit(z.StateChange,{player:l})}),this.speedService=Vu({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(l=>{this.emitter.emit(z.StateChange,{speed:l})}),this.mediaManager=new Qu({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const a=this.service.state.context.events.find(l=>l.type===_.Meta),o=this.service.state.context.events.find(l=>l.type===_.FullSnapshot);if(a){const{width:l,height:d}=a.data;setTimeout(()=>{this.emitter.emit(z.Resize,{width:l,height:d})},0)}o&&setTimeout(()=>{var l;this.firstFullSnapshot||(this.firstFullSnapshot=o,this.rebuildFullSnapshot(o),(l=this.iframe.contentWindow)==null||l.scrollTo(o.data.initialOffset))},1),this.service.state.context.events.find(Fn)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(t,r){return this.emitter.on(t,r),this}off(t,r){return this.emitter.off(t,r),this}setConfig(t){Object.keys(t).forEach(r=>{t[r],this.config[r]=t[r]}),this.config.skipInactive||this.backToNormal(),typeof t.speed!="undefined"&&this.speedService.send({type:"SET_SPEED",payload:{speed:t.speed}}),typeof t.mouseTail!="undefined"&&(t.mouseTail===!1?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){const t=this.service.state.context.events[0],r=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:t.timestamp,endTime:r.timestamp,totalTime:r.timestamp-t.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){const{baselineTime:t,events:r}=this.service.state.context;return t-r[0].timestamp}getMirror(){return this.mirror}play(t=0){var r,s;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:t}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:t}})),(s=(r=this.iframe.contentDocument)==null?void 0:r.getElementsByTagName("html")[0])==null||s.classList.remove("rrweb-paused"),this.emitter.emit(z.Start)}pause(t){var r,s;t===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof t=="number"&&(this.play(t),this.service.send({type:"PAUSE"})),(s=(r=this.iframe.contentDocument)==null?void 0:r.getElementsByTagName("html")[0])==null||s.classList.add("rrweb-paused"),this.emitter.emit(z.Pause)}resume(t=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(t),this.emitter.emit(z.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(z.Destroy)}startLive(t){this.service.send({type:"TO_LIVE",payload:{baselineTime:t}})}addEvent(t){const r=this.config.unpackFn?this.config.unpackFn(t):t;Fn(r)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:r}}))}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=ki()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.config.mouseTail!==!1&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");const t=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&t.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",t.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&($u(this.iframe.contentWindow,this.iframe.contentDocument),Fs(this.iframe.contentWindow))}rebuildFullSnapshot(t,r=!1){if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};const s=[],i=new Set,a=(d,u)=>{if(d.nodeName==="DIALOG"&&i.add(d),this.collectIframeAndAttachDocument(s,d),this.mediaManager.isSupportedMediaElement(d)){const{events:n}=this.service.state.context;this.mediaManager.addMediaElements(d,t.timestamp-n[0].timestamp,this.mirror)}for(const n of this.config.plugins||[])n.onBuild&&n.onBuild(d,{id:u,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),nl(t.data.node,{doc:this.iframe.contentDocument,afterAppend:a,cache:this.cache,mirror:this.mirror}),a(this.iframe.contentDocument,t.data.node.id);for(const{mutationInQueue:d,builtNode:u}of s)this.attachDocumentToIframe(d,u),this.newDocumentQueue=this.newDocumentQueue.filter(n=>n!==d);const{documentElement:o,head:l}=this.iframe.contentDocument;this.insertStyleRules(o,l),i.forEach(d=>St(d)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(z.FullsnapshotRebuilded,t),r||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(t,r){var s;const i=ju(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),this.usingVirtualDom){const a=this.virtualDom.createElement("style");this.virtualDom.mirror.add(a,So(a,this.virtualDom.unserializedId)),t.insertBefore(a,r),a.rules.push({source:T.StyleSheetRule,adds:i.map((o,l)=>({rule:o,index:l}))})}else{const a=document.createElement("style");t.insertBefore(a,r);for(let o=0;o<i.length;o++)(s=a.sheet)==null||s.insertRule(i[o],o)}}attachDocumentToIframe(t,r){const s=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],a=new Set,o=(l,d)=>{l.nodeName==="DIALOG"&&a.add(l),this.collectIframeAndAttachDocument(i,l);const u=s.getMeta(l);if((u==null?void 0:u.type)===Se.Element&&(u==null?void 0:u.tagName.toUpperCase())==="HTML"){const{documentElement:n,head:f}=r.contentDocument;this.insertStyleRules(n,f)}if(!this.usingVirtualDom)for(const n of this.config.plugins||[])n.onBuild&&n.onBuild(l,{id:d,replayer:this})};tt(t.node,{doc:r.contentDocument,mirror:s,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(r.contentDocument,t.node.id);for(const{mutationInQueue:l,builtNode:d}of i)this.attachDocumentToIframe(l,d),this.newDocumentQueue=this.newDocumentQueue.filter(u=>u!==l);a.forEach(l=>St(l))}collectIframeAndAttachDocument(t,r){if(Ye(r,this.mirror)){const s=this.newDocumentQueue.find(i=>i.parentId===this.mirror.getId(r));s&&t.push({mutationInQueue:s,builtNode:r})}}waitForStylesheetLoad(){var t;const r=(t=this.iframe.contentDocument)==null?void 0:t.head;if(r){const s=new Set;let i,a=this.service.state;const o=()=>{a=this.service.state};this.emitter.on(z.Start,o),this.emitter.on(z.Pause,o);const l=()=>{this.emitter.off(z.Start,o),this.emitter.off(z.Pause,o)};r.querySelectorAll('link[rel="stylesheet"]').forEach(d=>{d.sheet||(s.add(d),d.addEventListener("load",()=>{s.delete(d),s.size===0&&i!==-1&&(a.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(z.LoadStylesheetEnd),i&&clearTimeout(i),l())}))}),s.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(z.LoadStylesheetStart),i=setTimeout(()=>{a.matches("playing")&&this.play(this.getCurrentTime()),i=-1,l()},this.config.loadTimeout))}}async preloadAllImages(){const t=[];for(const r of this.service.state.context.events)r.type===_.IncrementalSnapshot&&r.data.source===T.CanvasMutation&&(t.push(this.deserializeAndPreloadCanvasEvents(r.data,r)),("commands"in r.data?r.data.commands:[r.data]).forEach(i=>{this.preloadImages(i,r)}));return Promise.all(t)}preloadImages(t,r){if(t.property==="drawImage"&&typeof t.args[0]=="string"&&!this.imageMap.has(r)){const s=document.createElement("canvas"),i=s.getContext("2d"),a=i==null?void 0:i.createImageData(s.width,s.height);i==null||i.putImageData(a,0,0)}}async deserializeAndPreloadCanvasEvents(t,r){if(!this.canvasEventMap.has(r)){const s={isUnchanged:!0};if("commands"in t){const i=await Promise.all(t.commands.map(async a=>{const o=await Promise.all(a.args.map(Ne(this.imageMap,null,s)));return se(L({},a),{args:o})}));s.isUnchanged===!1&&this.canvasEventMap.set(r,se(L({},t),{commands:i}))}else{const i=await Promise.all(t.args.map(Ne(this.imageMap,null,s)));s.isUnchanged===!1&&this.canvasEventMap.set(r,se(L({},t),{args:i}))}}}applyIncremental(t,r){var s,i,a;const{data:o}=t;switch(o.source){case T.Mutation:{try{this.applyMutation(o,r)}catch(l){this.warn(`Exception in mutation ${l.message||l}`,o)}break}case T.Drag:case T.TouchMove:case T.MouseMove:if(r){const l=o.positions[o.positions.length-1];this.mousePos={x:l.x,y:l.y,id:l.id,debugData:o}}else o.positions.forEach(l=>{const d={doAction:()=>{this.moveAndHover(l.x,l.y,l.id,r,o)},delay:l.timeOffset+t.timestamp-this.service.state.context.baselineTime};this.timer.addAction(d)}),this.timer.addAction({doAction(){},delay:t.delay-((s=o.positions[0])==null?void 0:s.timeOffset)});break;case T.MouseInteraction:{if(o.id===-1)break;const l=new Event(Ie(q[o.type])),d=this.mirror.getNode(o.id);if(!d)return this.debugNodeNotFound(o,o.id);this.emitter.emit(z.MouseInteraction,{type:o.type,target:d});const{triggerFocus:u}=this.config;switch(o.type){case q.Blur:"blur"in d&&d.blur();break;case q.Focus:u&&d.focus&&d.focus({preventScroll:!0});break;case q.Click:case q.TouchStart:case q.TouchEnd:case q.MouseDown:case q.MouseUp:r?(o.type===q.TouchStart?this.touchActive=!0:o.type===q.TouchEnd&&(this.touchActive=!1),o.type===q.MouseDown?this.lastMouseDownEvent=[d,l]:o.type===q.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:o.x||0,y:o.y||0,id:o.id,debugData:o}):(o.type===q.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(o.x||0,o.y||0,o.id,r,o),o.type===q.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):o.type===q.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):o.type===q.TouchEnd?this.mouse.classList.remove("touch-active"):d.dispatchEvent(l));break;case q.TouchCancel:r?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:d.dispatchEvent(l)}break}case T.Scroll:{if(o.id===-1)break;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.scrollData=o;break}this.applyScroll(o,r);break}case T.ViewportResize:this.emitter.emit(z.Resize,{width:o.width,height:o.height});break;case T.Input:{if(o.id===-1)break;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.inputData=o;break}this.applyInput(o);break}case T.MediaInteraction:{const l=this.usingVirtualDom?this.virtualDom.mirror.getNode(o.id):this.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);const d=l,{events:u}=this.service.state.context;this.mediaManager.mediaMutation({target:d,timeOffset:t.timestamp-u[0].timestamp,mutation:o});break}case T.StyleSheetRule:case T.StyleDeclaration:{this.usingVirtualDom?o.styleId?this.constructedStyleMutations.push(o):o.id&&((i=this.virtualDom.mirror.getNode(o.id))==null||i.rules.push(o)):this.applyStyleSheetMutation(o);break}case T.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.canvasMutations.push({event:t,mutation:o})}else{const l=this.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);os({event:t,mutation:o,target:l,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case T.Font:{try{const l=new FontFace(o.family,o.buffer?new Uint8Array(JSON.parse(o.fontSource)):o.fontSource,o.descriptors);(a=this.iframe.contentDocument)==null||a.fonts.add(l)}catch(l){this.warn(l)}break}case T.Selection:{if(r){this.lastSelectionData=o;break}this.applySelection(o);break}case T.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(o):this.applyAdoptedStyleSheet(o);break}}}applyMutation(t,r){if(this.config.useVirtualDom&&!this.usingVirtualDom&&r&&(this.usingVirtualDom=!0,Gl(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const u in this.legacy_missingNodeRetryMap)try{const n=this.legacy_missingNodeRetryMap[u],f=vo(n.node,this.virtualDom,this.mirror);f&&(n.node=f)}catch(n){this.warn(n)}const s=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;t.removes=t.removes.filter(u=>s.getNode(u.id)?!0:(this.warnNodeNotFound(t,u.id),!1)),t.removes.forEach(u=>{var n;const f=s.getNode(u.id);if(!f)return;let c=s.getNode(u.parentId);if(!c)return this.warnNodeNotFound(t,u.parentId);if(u.isShadow&&Oe(c)&&(c=c.shadowRoot),s.removeNodeFromMap(f),c)try{c.removeChild(f),this.usingVirtualDom&&f.nodeName==="#text"&&c.nodeName==="STYLE"&&((n=c.rules)==null?void 0:n.length)>0&&(c.rules=[])}catch(h){if(h instanceof DOMException)this.warn("parent could not remove child in mutation",c,f,t);else throw h}});const i=L({},this.legacy_missingNodeRetryMap),a=[],o=u=>{let n=null;return u.nextId&&(n=s.getNode(u.nextId)),u.nextId!==null&&u.nextId!==void 0&&u.nextId!==-1&&!n},l=u=>{var n,f;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let c=s.getNode(u.parentId);if(!c)return u.node.type===Se.Document?this.newDocumentQueue.push(u):a.push(u);u.node.isShadow&&(Oe(c)||c.attachShadow({mode:"open"}),c=c.shadowRoot);let h=null,m=null;if(u.previousId&&(h=s.getNode(u.previousId)),u.nextId&&(m=s.getNode(u.nextId)),o(u))return a.push(u);if(u.node.rootId&&!s.getNode(u.node.rootId))return;const p=u.node.rootId?s.getNode(u.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Ye(c,s)){this.attachDocumentToIframe(u,c);return}const g=(b,C)=>{if(!this.usingVirtualDom){St(b);for(const v of this.config.plugins||[])v.onBuild&&v.onBuild(b,{id:C,replayer:this})}},w=tt(u.node,{doc:p,mirror:s,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:g});if(u.previousId===-1||u.nextId===-1){i[u.node.id]={node:w,mutation:u};return}const y=s.getMeta(c);if(y&&y.type===Se.Element&&u.node.type===Se.Text){const b=Array.isArray(c.childNodes)?c.childNodes:Array.from(c.childNodes);if(y.tagName==="textarea")for(const C of b)C.nodeType===c.TEXT_NODE&&c.removeChild(C);else if(y.tagName==="style"&&b.length===1)for(const C of b)C.nodeType===c.TEXT_NODE&&!s.hasNode(C)&&(w.textContent=C.textContent,c.removeChild(C))}else if((y==null?void 0:y.type)===Se.Document){const b=c;u.node.type===Se.DocumentType&&((n=b.childNodes[0])==null?void 0:n.nodeType)===Node.DOCUMENT_TYPE_NODE&&b.removeChild(b.childNodes[0]),w.nodeName==="HTML"&&b.documentElement&&b.removeChild(b.documentElement)}if(h&&h.nextSibling&&h.nextSibling.parentNode?c.insertBefore(w,h.nextSibling):m&&m.parentNode?c.contains(m)?c.insertBefore(w,m):c.insertBefore(w,null):c.appendChild(w),g(w,u.node.id),this.usingVirtualDom&&w.nodeName==="#text"&&c.nodeName==="STYLE"&&((f=c.rules)==null?void 0:f.length)>0&&(c.rules=[]),Ye(w,this.mirror)){const b=this.mirror.getId(w),C=this.newDocumentQueue.find(v=>v.parentId===b);C&&(this.attachDocumentToIframe(C,w),this.newDocumentQueue=this.newDocumentQueue.filter(v=>v!==C))}(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(i,c,w,u)};t.adds.forEach(u=>{l(u)});const d=Date.now();for(;a.length;){const u=xo(a);if(a.length=0,Date.now()-d>500){this.warn("Timeout in the loop, please check the resolve tree data:",u);break}for(const n of u)s.getNode(n.value.parentId)?Us(n,c=>{l(c)}):this.debug("Drop resolve tree since there is no parent for the root node.",n)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),Mo(t.texts).forEach(u=>{var n;const f=s.getNode(u.id);if(!f)return t.removes.find(c=>c.id===u.id)?void 0:this.warnNodeNotFound(t,u.id);if(f.textContent=u.value,this.usingVirtualDom){const c=f.parentNode;((n=c==null?void 0:c.rules)==null?void 0:n.length)>0&&(c.rules=[])}}),t.attributes.forEach(u=>{var n;const f=s.getNode(u.id);if(!f)return t.removes.find(c=>c.id===u.id)?void 0:this.warnNodeNotFound(t,u.id);for(const c in u.attributes)if(typeof c=="string"){const h=u.attributes[c];if(h===null)f.removeAttribute(c),c==="open"&&Ku(f,u);else if(typeof h=="string")try{if(c==="_cssText"&&(f.nodeName==="LINK"||f.nodeName==="STYLE"))try{const m=s.getMeta(f);Object.assign(m.attributes,u.attributes);const p=tt(m,{doc:f.ownerDocument,mirror:s,skipChild:!0,hackCss:!0,cache:this.cache}),g=f.nextSibling,w=f.parentNode;if(p&&w){w.removeChild(f),w.insertBefore(p,g),s.replace(u.id,p);break}}catch(m){}if(c==="value"&&f.nodeName==="TEXTAREA"){const m=f;m.childNodes.forEach(g=>m.removeChild(g));const p=(n=f.ownerDocument)==null?void 0:n.createTextNode(h);p&&m.appendChild(p)}else f.setAttribute(c,h);c==="rr_open_mode"&&f.nodeName==="DIALOG"&&St(f,u)}catch(m){this.warn("An error occurred may due to the checkout feature.",m)}else if(c==="style"){const m=h,p=f;for(const g in m)if(m[g]===!1)p.style.removeProperty(g);else if(m[g]instanceof Array){const w=m[g];p.style.setProperty(g,w[0],w[1])}else{const w=m[g];p.style.setProperty(g,w)}}}})}applyScroll(t,r){var s,i;const a=this.mirror.getNode(t.id);if(!a)return this.debugNodeNotFound(t,t.id);const o=this.mirror.getMeta(a);if(a===this.iframe.contentDocument)(s=this.iframe.contentWindow)==null||s.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"});else if((o==null?void 0:o.type)===Se.Document)(i=a.defaultView)==null||i.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"});else try{a.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"})}catch(l){}}applyInput(t){const r=this.mirror.getNode(t.id);if(!r)return this.debugNodeNotFound(t,t.id);try{r.checked=t.isChecked,r.value=t.text}catch(s){}}applySelection(t){try{const r=new Set,s=t.ranges.map(({start:i,startOffset:a,end:o,endOffset:l})=>{const d=this.mirror.getNode(i),u=this.mirror.getNode(o);if(!d||!u)return;const n=new Range;n.setStart(d,a),n.setEnd(u,l);const f=d.ownerDocument,c=f==null?void 0:f.getSelection();return c&&r.add(c),{range:n,selection:c}});r.forEach(i=>i.removeAllRanges()),s.forEach(i=>{var a;return i&&((a=i.selection)==null?void 0:a.addRange(i.range))})}catch(r){}}applyStyleSheetMutation(t){var r;let s=null;t.styleId?s=this.styleMirror.getStyle(t.styleId):t.id&&(s=((r=this.mirror.getNode(t.id))==null?void 0:r.sheet)||null),s&&(t.source===T.StyleSheetRule?this.applyStyleSheetRule(t,s):t.source===T.StyleDeclaration&&this.applyStyleDeclaration(t,s))}applyStyleSheetRule(t,r){var s,i,a,o;if((s=t.adds)==null||s.forEach(({rule:l,index:d})=>{try{if(Array.isArray(d)){const{positions:u,index:n}=is(d);je(r.cssRules,u).insertRule(l,n)}else{const u=d===void 0?void 0:Math.min(d,r.cssRules.length);r==null||r.insertRule(l,u)}}catch(u){}}),(i=t.removes)==null||i.forEach(({index:l})=>{try{if(Array.isArray(l)){const{positions:d,index:u}=is(l);je(r.cssRules,d).deleteRule(u||0)}else r==null||r.deleteRule(l)}catch(d){}}),t.replace)try{(a=r.replace)==null||a.call(r,t.replace)}catch(l){}if(t.replaceSync)try{(o=r.replaceSync)==null||o.call(r,t.replaceSync)}catch(l){}}applyStyleDeclaration(t,r){t.set&&je(r.rules,t.index).style.setProperty(t.set.property,t.set.value,t.set.priority),t.remove&&je(r.rules,t.index).style.removeProperty(t.remove.property)}applyAdoptedStyleSheet(t){var r;const s=this.mirror.getNode(t.id);if(!s)return;(r=t.styles)==null||r.forEach(l=>{var d;let u=null,n=null;if(Oe(s)?n=((d=s.ownerDocument)==null?void 0:d.defaultView)||null:s.nodeName==="#document"&&(n=s.defaultView),!!n)try{u=new n.CSSStyleSheet,this.styleMirror.add(u,l.styleId),this.applyStyleSheetRule({source:T.StyleSheetRule,adds:l.rules},u)}catch(f){}});const i=10;let a=0;const o=(l,d)=>{const u=d.map(n=>this.styleMirror.getStyle(n)).filter(n=>n!==null);Oe(l)?l.shadowRoot.adoptedStyleSheets=u:l.nodeName==="#document"&&(l.adoptedStyleSheets=u),u.length!==d.length&&a<i&&(setTimeout(()=>o(l,d),0+100*a),a++)};o(s,t.styleIds)}legacy_resolveMissingNode(t,r,s,i){const{previousId:a,nextId:o}=i,l=a&&t[a],d=o&&t[o];if(l){const{node:u,mutation:n}=l;r.insertBefore(u,s),delete t[n.node.id],delete this.legacy_missingNodeRetryMap[n.node.id],(n.previousId||n.nextId)&&this.legacy_resolveMissingNode(t,r,u,n)}if(d){const{node:u,mutation:n}=d;r.insertBefore(u,s.nextSibling),delete t[n.node.id],delete this.legacy_missingNodeRetryMap[n.node.id],(n.previousId||n.nextId)&&this.legacy_resolveMissingNode(t,r,u,n)}}moveAndHover(t,r,s,i,a){const o=this.mirror.getNode(s);if(!o)return this.debugNodeNotFound(a,s);const l=$s(o,this.iframe),d=t*l.absoluteScale+l.x,u=r*l.absoluteScale+l.y;this.mouse.style.left=`${d}px`,this.mouse.style.top=`${u}px`,i||this.drawMouseTail({x:d,y:u}),this.hoverElements(o)}drawMouseTail(t){if(!this.mouseTail)return;const{lineCap:r,lineWidth:s,strokeStyle:i,duration:a}=this.config.mouseTail===!0?ts:Object.assign({},ts,this.config.mouseTail),o=()=>{if(!this.mouseTail)return;const l=this.mouseTail.getContext("2d");!l||!this.tailPositions.length||(l.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),l.beginPath(),l.lineWidth=s,l.lineCap=r,l.strokeStyle=i,l.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(d=>l.lineTo(d.x,d.y)),l.stroke())};this.tailPositions.push(t),o(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(l=>l!==t),o()},a/this.speedService.state.context.timer.speed)}hoverElements(t){var r;(r=this.lastHoveredRootNode||this.iframe.contentDocument)==null||r.querySelectorAll(".\\:hover").forEach(i=>{i.classList.remove(":hover")}),this.lastHoveredRootNode=t.getRootNode();let s=t;for(;s;)s.classList&&s.classList.add(":hover"),s=s.parentElement}isUserInteraction(t){return t.type!==_.IncrementalSnapshot?!1:t.data.source>T.Mutation&&t.data.source<=T.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(z.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(t,r){this.warn(`Node with id '${r}' not found. `,t)}warnCanvasMutationFailed(t,r){this.warn("Has error on canvas update",r,"canvas mutation:",t)}debugNodeNotFound(t,r){this.debug(`Node with id '${r}' not found. `,t)}warn(...t){this.config.showWarning&&this.config.logger.warn(Ln,...t)}debug(...t){this.config.showDebug&&this.config.logger.log(Ln,...t)}}const{addCustomEvent:rc}=Te,{freezePage:sc}=Te,{takeFullSnapshot:ic}=Te;exports.EventType=_;exports.IncrementalSource=T;exports.MouseInteractions=q;exports.Replayer=tc;exports.ReplayerEvents=z;exports.addCustomEvent=rc;exports.canvasMutation=os;exports.freezePage=sc;exports.record=Te;exports.takeFullSnapshot=ic;exports.utils=au;
159
+ ***************************************************************************** */function On(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var s,i,a=r.call(e),o=[];try{for(;(t===void 0||t-- >0)&&!(s=a.next()).done;)o.push(s.value)}catch(l){i={error:l}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return o}var He;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(He||(He={}));var Uo={type:"xstate.init"};function es(e){return e===void 0?[]:[].concat(e)}function ze(e){return{type:"xstate.assign",assignment:e}}function In(e,t){return typeof(e=typeof e=="string"&&t&&t[e]?t[e]:e)=="string"?{type:e}:typeof e=="function"?{type:e.name,exec:e}:e}function _t(e){return function(t){return e===t}}function Bo(e){return typeof e=="string"?{type:e}:e}function Dn(e,t){return{value:e,context:t,actions:[],changed:!1,matches:_t(e)}}function An(e,t,r){var s=t,i=!1;return[e.filter(function(a){if(a.type==="xstate.assign"){i=!0;var o=Object.assign({},s);return typeof a.assignment=="function"?o=a.assignment(s,r):Object.keys(a.assignment).forEach(function(l){o[l]=typeof a.assignment[l]=="function"?a.assignment[l](s,r):a.assignment[l]}),s=o,!1}return!0}),s,i]}function $o(e,t){t===void 0&&(t={});var r=On(An(es(e.states[e.initial].entry).map(function(o){return In(o,t.actions)}),e.context,Uo),2),s=r[0],i=r[1],a={config:e,_options:t,initialState:{value:e.initial,actions:s,context:i,matches:_t(e.initial)},transition:function(o,l){var d,u,n=typeof o=="string"?{value:o,context:e.context}:o,f=n.value,c=n.context,h=Bo(l),m=e.states[f];if(m.on){var p=es(m.on[h.type]);try{for(var g=function(P){var V=typeof Symbol=="function"&&Symbol.iterator,ee=V&&P[V],X=0;if(ee)return ee.call(P);if(P&&typeof P.length=="number")return{next:function(){return P&&X>=P.length&&(P=void 0),{value:P&&P[X++],done:!P}}};throw new TypeError(V?"Object is not iterable.":"Symbol.iterator is not defined.")}(p),w=g.next();!w.done;w=g.next()){var y=w.value;if(y===void 0)return Dn(f,c);var b=typeof y=="string"?{target:y}:y,C=b.target,v=b.actions,S=v===void 0?[]:v,E=b.cond,R=E===void 0?function(){return!0}:E,I=C===void 0,N=C!=null?C:f,F=e.states[N];if(R(c,h)){var D=On(An((I?es(S):[].concat(m.exit,S,F.entry).filter(function(P){return P})).map(function(P){return In(P,a._options.actions)}),c,h),3),re=D[0],ie=D[1],x=D[2],Z=C!=null?C:f;return{value:Z,context:ie,actions:re,changed:C!==f||re.length>0||x,matches:_t(Z)}}}}catch(P){d={error:P}}finally{try{w&&!w.done&&(u=g.return)&&u.call(g)}finally{if(d)throw d.error}}}return Dn(f,c)}};return a}var Tn=function(e,t){return e.actions.forEach(function(r){var s=r.exec;return s&&s(e.context,t)})};function Wo(e){var t=e.initialState,r=He.NotStarted,s=new Set,i={_machine:e,send:function(a){r===He.Running&&(t=e.transition(t,a),Tn(t,Bo(a)),s.forEach(function(o){return o(t)}))},subscribe:function(a){return s.add(a),a(t),{unsubscribe:function(){return s.delete(a)}}},start:function(a){if(a){var o=typeof a=="object"?a:{context:e.config.context,value:a};t={value:o.value,actions:[],context:o.context,matches:_t(o.value)}}return r=He.Running,Tn(t,Uo),i},stop:function(){return r=He.Stopped,s.clear(),i},get state(){return t},get status(){return r}};return i}function qu(e,t){for(let r=e.length-1;r>=0;r--){const s=e[r];if(s.type===_.Meta&&s.timestamp<=t)return e.slice(r)}return e}function Vu(e,{getCastFn:t,applyEventsSynchronously:r,emitter:s}){const i=$o({id:"player",context:e,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:ze({lastPlayedEvent:(a,o)=>o.type==="CAST_EVENT"?o.payload.event:a.lastPlayedEvent}),recordTimeOffset:ze((a,o)=>{let l=a.timeOffset;return"payload"in o&&"timeOffset"in o.payload&&(l=o.payload.timeOffset),se(L({},a),{timeOffset:l,baselineTime:a.events[0].timestamp+l})}),play(a){var o;const{timer:l,events:d,baselineTime:u,lastPlayedEvent:n}=a;l.clear();for(const m of d)Nn(m,u);const f=qu(d,u);let c=n==null?void 0:n.timestamp;(n==null?void 0:n.type)===_.IncrementalSnapshot&&n.data.source===T.MouseMove&&(c=n.timestamp+((o=n.data.positions[0])==null?void 0:o.timeOffset)),u<(c||0)&&s.emit(z.PlayBack);const h=new Array;for(const m of f)if(!(c&&c<u&&(m.timestamp<=c||m===n)))if(m.timestamp<u)h.push(m);else{const p=t(m,!1);l.addAction({doAction:()=>{p()},delay:m.delay})}r(h),s.emit(z.Flush),l.start()},pause(a){a.timer.clear()},resetLastPlayedEvent:ze(a=>se(L({},a),{lastPlayedEvent:null})),startLive:ze({baselineTime:(a,o)=>(a.timer.start(),o.type==="TO_LIVE"&&o.payload.baselineTime?o.payload.baselineTime:Date.now())}),addEvent:ze((a,o)=>{const{baselineTime:l,timer:d,events:u}=a;if(o.type==="ADD_EVENT"){const{event:n}=o.payload;Nn(n,l);let f=u.length-1;if(!u[f]||u[f].timestamp<=n.timestamp)u.push(n);else{let m=-1,p=0;for(;p<=f;){const g=Math.floor((p+f)/2);u[g].timestamp<=n.timestamp?p=g+1:f=g-1}m===-1&&(m=p),u.splice(m,0,n)}const c=n.timestamp<l,h=t(n,c);c?h():d.isActive()&&d.addAction({doAction:()=>{h()},delay:n.delay})}return se(L({},a),{events:u})})}});return Wo(i)}function ju(e){const t=$o({id:"speed",context:e,initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:(r,s)=>{"payload"in s&&r.timer.setSpeed(s.payload.speed)},recordSpeed:ze({normalSpeed:r=>r.timer.speed}),restoreSpeed:r=>{r.timer.setSpeed(r.normalSpeed)}}});return Wo(t)}const Gu=e=>[`.${e} { background: currentColor }`,"noscript { display: none !important; }"],_n=new Map;function zo(e,t){let r=_n.get(e);return r||(r=new Map,_n.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}function Oe(e,t,r){return async s=>{if(s&&typeof s=="object"&&"rr_type"in s)if(r&&(r.isUnchanged=!1),s.rr_type==="ImageBitmap"&&"args"in s){const i=await Oe(e,t,r)(s.args);return await createImageBitmap.apply(null,i)}else if("index"in s){if(r||t===null)return s;const{rr_type:i,index:a}=s;return zo(t,i)[a]}else if("args"in s){const{rr_type:i,args:a}=s,o=window[i];return new o(...await Promise.all(a.map(Oe(e,t,r))))}else{if("base64"in s)return Au(s.base64);if("src"in s){const i=e.get(s.src);if(i)return i;{const a=new Image;return a.src=s.src,e.set(s.src,a),a}}else if("data"in s&&s.rr_type==="Blob"){const i=await Promise.all(s.data.map(Oe(e,t,r)));return new Blob(i,{type:s.type})}}else if(Array.isArray(s))return await Promise.all(s.map(Oe(e,t,r)));return s}}function Hu(e,t){try{return t===Ce.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch(r){return null}}const Yu=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function Ju(e,t){if(!(t!=null&&t.constructor))return;const{name:r}=t.constructor;if(!Yu.includes(r))return;const s=zo(e,r);s.includes(t)||s.push(t)}async function Xu({mutation:e,target:t,type:r,imageMap:s,errorHandler:i}){try{const a=Hu(t,r);if(!a)return;if(e.setter){a[e.property]=e.args[0];return}const o=a[e.property],l=await Promise.all(e.args.map(Oe(s,a))),d=o.apply(a,l);Ju(a,d);const u=!1}catch(a){i(e,a)}}async function Qu({event:e,mutations:t,target:r,imageMap:s,errorHandler:i}){const a=r.getContext("2d");if(!a){i(t[0],new Error("Canvas context is null"));return}const o=t.map(async d=>Promise.all(d.args.map(Oe(s,a))));(await Promise.all(o)).forEach((d,u)=>{const n=t[u];try{if(n.setter){a[n.property]=n.args[0];return}const f=a[n.property];n.property==="drawImage"&&typeof n.args[0]=="string"?(s.get(e),f.apply(a,n.args)):f.apply(a,d)}catch(f){i(n,f)}})}async function os({event:e,mutation:t,target:r,imageMap:s,canvasEventMap:i,errorHandler:a}){try{const o=i.get(e)||t,l="commands"in o?o.commands:[o];if([Ce.WebGL,Ce.WebGL2].includes(t.type)){for(let d=0;d<l.length;d++){const u=l[d];await Xu({mutation:u,type:t.type,target:r,imageMap:s,errorHandler:a})}return}await Qu({event:e,mutations:l,target:r,imageMap:s,errorHandler:a})}catch(o){a(t,o)}}const Pn=["AUDIO","VIDEO"];class Ku{constructor(t){M(this,"mediaMap",new Map),M(this,"warn"),M(this,"service"),M(this,"speedService"),M(this,"emitter"),M(this,"getCurrentTime"),M(this,"metadataCallbackMap",new Map),this.warn=t.warn,this.service=t.service,this.speedService=t.speedService,this.emitter=t.emitter,this.getCurrentTime=t.getCurrentTime,this.emitter.on(z.Start,this.start.bind(this)),this.emitter.on(z.SkipStart,this.start.bind(this)),this.emitter.on(z.Pause,this.pause.bind(this)),this.emitter.on(z.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(t={pause:!1}){this.mediaMap.forEach((r,s)=>{this.syncTargetWithState(s),t.pause&&s.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:t,target:r,mediaState:s}){if(s.isPlaying){const a=(t-s.lastInteractionTimeOffset)/1e3*s.playbackRate,o="duration"in r&&r.duration;if(Number.isNaN(o)){this.waitForMetadata(r);return}let l=s.currentTimeAtLastInteraction+a;r.loop&&o!==!1&&(l=l%o),r.currentTime=l}else r.pause(),r.currentTime=s.currentTimeAtLastInteraction}waitForMetadata(t){if(this.metadataCallbackMap.has(t)||!("addEventListener"in t))return;const r=()=>{this.metadataCallbackMap.delete(t);const s=this.mediaMap.get(t);s&&this.seekTo({time:this.getCurrentTime(),target:t,mediaState:s})};this.metadataCallbackMap.set(t,r),t.addEventListener("loadedmetadata",r,{once:!0})}getMediaStateFromMutation({target:t,timeOffset:r,mutation:s}){var h,m,p,g,w;const i=this.mediaMap.get(t),{type:a,playbackRate:o,currentTime:l,muted:d,volume:u,loop:n}=s;return{isPlaying:a===Me.Play||a!==Me.Pause&&((i==null?void 0:i.isPlaying)||t.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(h=l!=null?l:i==null?void 0:i.currentTimeAtLastInteraction)!=null?h:0,lastInteractionTimeOffset:r,playbackRate:(m=o!=null?o:i==null?void 0:i.playbackRate)!=null?m:1,volume:(p=u!=null?u:i==null?void 0:i.volume)!=null?p:1,muted:(g=d!=null?d:i==null?void 0:i.muted)!=null?g:t.getAttribute("muted")===null,loop:(w=n!=null?n:i==null?void 0:i.loop)!=null?w:t.getAttribute("loop")===null}}syncTargetWithState(t){const r=this.mediaMap.get(t);if(!r)return;const{muted:s,loop:i,volume:a,isPlaying:o}=r,l=this.service.state.matches("paused"),d=r.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:t,mediaState:r}),t.volume!==a&&(t.volume=a),t.muted=s,t.loop=i,t.playbackRate!==d&&(t.playbackRate=d),o&&!l?t.play():t.pause()}catch(u){this.warn(`Failed to replay media interactions: ${u.message||u}`)}}addMediaElements(t,r,s){if(!this.isSupportedMediaElement(t))return;const i=t,a=s.getMeta(i);if(!a||!("attributes"in a))return;const o=this.service.state.matches("paused"),l=a.attributes;let d=!1;l.rr_mediaState?d=l.rr_mediaState==="played":d=i.getAttribute("autoplay")!==null,d&&o&&i.pause();let u=1;typeof l.rr_mediaPlaybackRate=="number"&&(u=l.rr_mediaPlaybackRate);let n=!1;typeof l.rr_mediaMuted=="boolean"?n=l.rr_mediaMuted:n=i.getAttribute("muted")!==null;let f=!1;typeof l.rr_mediaLoop=="boolean"?f=l.rr_mediaLoop:f=i.getAttribute("loop")!==null;let c=1;typeof l.rr_mediaVolume=="number"&&(c=l.rr_mediaVolume);let h=0;typeof l.rr_mediaCurrentTime=="number"&&(h=l.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:d,currentTimeAtLastInteraction:h,lastInteractionTimeOffset:r,playbackRate:u,volume:c,muted:n,loop:f}),this.syncTargetWithState(i)}mediaMutation({target:t,timeOffset:r,mutation:s}){Pn.includes(t.nodeName)&&(this.mediaMap.set(t,this.getMediaStateFromMutation({target:t,timeOffset:r,mutation:s})),this.syncTargetWithState(t))}isSupportedMediaElement(t){return Pn.includes(t.nodeName)}reset(){this.mediaMap.clear()}}function St(e,t){if(e.nodeName!=="DIALOG"||e instanceof me)return;const r=e,s=r.open,i=s&&r.matches("dialog:modal"),a=r.getAttribute("rr_open_mode"),o=typeof(t==null?void 0:t.attributes.open)=="string"||typeof r.getAttribute("open")=="string",l=a==="modal";if(!(s&&!(i&&a==="non-modal"||!i&&l))){if(!r.isConnected){console.warn("dialog is not attached to the dom",r);return}s&&r.close(),o&&(l?r.showModal():r.show())}}function Zu(e,t){if(e.nodeName!=="DIALOG"||e instanceof me)return;const r=e;if(!r.isConnected){console.warn("dialog is not attached to the dom",r);return}t.attributes.open===null&&(r.removeAttribute("open"),r.removeAttribute("rr_open_mode"))}const ec=5*1e3,tc=Fo||$u,kn="[replayer]",ts={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Ln(e){return e.type==_.IncrementalSnapshot&&(e.data.source==T.TouchMove||e.data.source==T.MouseInteraction&&e.data.type==q.TouchStart)}class rc{constructor(t,r){if(M(this,"wrapper"),M(this,"iframe"),M(this,"service"),M(this,"speedService"),M(this,"config"),M(this,"usingVirtualDom",!1),M(this,"virtualDom",new Xe),M(this,"mouse"),M(this,"mouseTail",null),M(this,"tailPositions",[]),M(this,"emitter",tc()),M(this,"nextUserInteractionEvent"),M(this,"legacy_missingNodeRetryMap",{}),M(this,"cache",Pi()),M(this,"imageMap",new Map),M(this,"canvasEventMap",new Map),M(this,"mirror",Bn()),M(this,"styleMirror",new Ws),M(this,"mediaManager"),M(this,"firstFullSnapshot",null),M(this,"newDocumentQueue",[]),M(this,"mousePos",null),M(this,"touchActive",null),M(this,"lastMouseDownEvent",null),M(this,"lastHoveredRootNode"),M(this,"lastSelectionData",null),M(this,"constructedStyleMutations",[]),M(this,"adoptedStyleSheets",[]),M(this,"handleResize",l=>{this.iframe.style.display="inherit";for(const d of[this.mouseTail,this.iframe])d&&(d.setAttribute("width",String(l.width)),d.setAttribute("height",String(l.height)))}),M(this,"applyEventsSynchronously",l=>{for(const d of l){switch(d.type){case _.DomContentLoaded:case _.Load:case _.Custom:continue;case _.FullSnapshot:case _.Meta:case _.Plugin:case _.IncrementalSnapshot:break}this.getCastFn(d,!0)()}}),M(this,"getCastFn",(l,d=!1)=>{let u;switch(l.type){case _.DomContentLoaded:case _.Load:break;case _.Custom:u=()=>{this.emitter.emit(z.CustomEvent,l)};break;case _.Meta:u=()=>this.emitter.emit(z.Resize,{width:l.data.width,height:l.data.height});break;case _.FullSnapshot:u=()=>{var f;if(this.firstFullSnapshot){if(this.firstFullSnapshot===l){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(l,d),(f=this.iframe.contentWindow)==null||f.scrollTo(l.data.initialOffset)};break;case _.IncrementalSnapshot:u=()=>{if(this.applyIncremental(l,d),!d&&(l===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(const f of this.service.state.context.events)if(!(f.timestamp<=l.timestamp)&&this.isUserInteraction(f)){f.delay-l.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=f);break}if(this.nextUserInteractionEvent){const f=this.nextUserInteractionEvent.delay-l.delay,c={speed:Math.min(Math.round(f/ec),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:c}),this.emitter.emit(z.SkipStart,c)}}};break}return()=>{u&&u();for(const c of this.config.plugins||[])c.handler&&c.handler(l,d,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:l}});const f=this.service.state.context.events.length-1;if(!this.config.liveMode&&l===this.service.state.context.events[f]){const c=()=>{f<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(z.Finish))};let h=50;l.type===_.IncrementalSnapshot&&l.data.source===T.MouseMove&&l.data.positions.length&&(h+=Math.max(0,-l.data.positions[0].timeOffset)),setTimeout(c,h)}this.emitter.emit(z.EventCast,l)}}),!(r!=null&&r.liveMode)&&t.length<2)throw new Error("Replayer need at least 2 events.");const s={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:10*1e3,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:ts,useVirtualDom:!0,logger:console};this.config=Object.assign({},s,r),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(z.Resize,this.handleResize),this.setupDom();for(const l of this.config.plugins||[])l.getMirror&&l.getMirror({nodeMirror:this.mirror});this.emitter.on(z.Flush,()=>{if(this.usingVirtualDom){const l={mirror:this.mirror,applyCanvas:(d,u,n)=>{os({event:d,mutation:u,target:n,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(d,u)=>{d.source===T.StyleSheetRule?this.applyStyleSheetRule(d,u):d.source===T.StyleDeclaration&&this.applyStyleDeclaration(d,u)},afterAppend:(d,u)=>{for(const n of this.config.plugins||[])n.onBuild&&n.onBuild(d,{id:u,replayer:this})}};if(this.iframe.contentDocument)try{Ot(this.iframe.contentDocument,this.virtualDom,l,this.virtualDom.mirror)}catch(d){console.warn(d)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const d in this.legacy_missingNodeRetryMap)try{const u=this.legacy_missingNodeRetryMap[d],n=It(u.node,this.mirror,this.virtualDom.mirror);Ot(n,u.node,l,this.virtualDom.mirror),u.node=n}catch(u){this.warn(u)}this.constructedStyleMutations.forEach(d=>{this.applyStyleSheetMutation(d)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(d=>{this.applyAdoptedStyleSheet(d)}),this.adoptedStyleSheets=[]}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),this.touchActive===!0?this.mouse.classList.add("touch-active"):this.touchActive===!1&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){const[l,d]=this.lastMouseDownEvent;l.dispatchEvent(d)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(z.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});const i=new zu([],{speed:this.config.speed});this.service=Vu({events:t.map(l=>r&&r.unpackFn?r.unpackFn(l):l).sort((l,d)=>l.timestamp-d.timestamp),timer:i,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(l=>{this.emitter.emit(z.StateChange,{player:l})}),this.speedService=ju({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(l=>{this.emitter.emit(z.StateChange,{speed:l})}),this.mediaManager=new Ku({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const a=this.service.state.context.events.find(l=>l.type===_.Meta),o=this.service.state.context.events.find(l=>l.type===_.FullSnapshot);if(a){const{width:l,height:d}=a.data;setTimeout(()=>{this.emitter.emit(z.Resize,{width:l,height:d})},0)}o&&setTimeout(()=>{var l;this.firstFullSnapshot||(this.firstFullSnapshot=o,this.rebuildFullSnapshot(o),(l=this.iframe.contentWindow)==null||l.scrollTo(o.data.initialOffset))},1),this.service.state.context.events.find(Ln)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(t,r){return this.emitter.on(t,r),this}off(t,r){return this.emitter.off(t,r),this}setConfig(t){Object.keys(t).forEach(r=>{t[r],this.config[r]=t[r]}),this.config.skipInactive||this.backToNormal(),typeof t.speed!="undefined"&&this.speedService.send({type:"SET_SPEED",payload:{speed:t.speed}}),typeof t.mouseTail!="undefined"&&(t.mouseTail===!1?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){const t=this.service.state.context.events[0],r=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:t.timestamp,endTime:r.timestamp,totalTime:r.timestamp-t.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){const{baselineTime:t,events:r}=this.service.state.context;return t-r[0].timestamp}getMirror(){return this.mirror}play(t=0){var r,s;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:t}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:t}})),(s=(r=this.iframe.contentDocument)==null?void 0:r.getElementsByTagName("html")[0])==null||s.classList.remove("rrweb-paused"),this.emitter.emit(z.Start)}pause(t){var r,s;t===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof t=="number"&&(this.play(t),this.service.send({type:"PAUSE"})),(s=(r=this.iframe.contentDocument)==null?void 0:r.getElementsByTagName("html")[0])==null||s.classList.add("rrweb-paused"),this.emitter.emit(z.Pause)}resume(t=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(t),this.emitter.emit(z.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(z.Destroy)}startLive(t){this.service.send({type:"TO_LIVE",payload:{baselineTime:t}})}addEvent(t){const r=this.config.unpackFn?this.config.unpackFn(t):t;Ln(r)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:r}}))}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=Pi()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.config.mouseTail!==!1&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");const t=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&t.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",t.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(Wu(this.iframe.contentWindow,this.iframe.contentDocument),Fs(this.iframe.contentWindow))}rebuildFullSnapshot(t,r=!1){if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};const s=[],i=new Set,a=(d,u)=>{if(d.nodeName==="DIALOG"&&i.add(d),this.collectIframeAndAttachDocument(s,d),this.mediaManager.isSupportedMediaElement(d)){const{events:n}=this.service.state.context;this.mediaManager.addMediaElements(d,t.timestamp-n[0].timestamp,this.mirror)}for(const n of this.config.plugins||[])n.onBuild&&n.onBuild(d,{id:u,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),ol(t.data.node,{doc:this.iframe.contentDocument,afterAppend:a,cache:this.cache,mirror:this.mirror}),a(this.iframe.contentDocument,t.data.node.id);for(const{mutationInQueue:d,builtNode:u}of s)this.attachDocumentToIframe(d,u),this.newDocumentQueue=this.newDocumentQueue.filter(n=>n!==d);const{documentElement:o,head:l}=this.iframe.contentDocument;this.insertStyleRules(o,l),i.forEach(d=>St(d)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(z.FullsnapshotRebuilded,t),r||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(t,r){var s;const i=Gu(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),this.usingVirtualDom){const a=this.virtualDom.createElement("style");this.virtualDom.mirror.add(a,So(a,this.virtualDom.unserializedId)),t.insertBefore(a,r),a.rules.push({source:T.StyleSheetRule,adds:i.map((o,l)=>({rule:o,index:l}))})}else{const a=document.createElement("style");t.insertBefore(a,r);for(let o=0;o<i.length;o++)(s=a.sheet)==null||s.insertRule(i[o],o)}}attachDocumentToIframe(t,r){const s=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],a=new Set,o=(l,d)=>{l.nodeName==="DIALOG"&&a.add(l),this.collectIframeAndAttachDocument(i,l);const u=s.getMeta(l);if((u==null?void 0:u.type)===Se.Element&&(u==null?void 0:u.tagName.toUpperCase())==="HTML"){const{documentElement:n,head:f}=r.contentDocument;this.insertStyleRules(n,f)}if(!this.usingVirtualDom)for(const n of this.config.plugins||[])n.onBuild&&n.onBuild(l,{id:d,replayer:this})};tt(t.node,{doc:r.contentDocument,mirror:s,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(r.contentDocument,t.node.id);for(const{mutationInQueue:l,builtNode:d}of i)this.attachDocumentToIframe(l,d),this.newDocumentQueue=this.newDocumentQueue.filter(u=>u!==l);a.forEach(l=>St(l))}collectIframeAndAttachDocument(t,r){if(Ye(r,this.mirror)){const s=this.newDocumentQueue.find(i=>i.parentId===this.mirror.getId(r));s&&t.push({mutationInQueue:s,builtNode:r})}}waitForStylesheetLoad(){var t;const r=(t=this.iframe.contentDocument)==null?void 0:t.head;if(r){const s=new Set;let i,a=this.service.state;const o=()=>{a=this.service.state};this.emitter.on(z.Start,o),this.emitter.on(z.Pause,o);const l=()=>{this.emitter.off(z.Start,o),this.emitter.off(z.Pause,o)};r.querySelectorAll('link[rel="stylesheet"]').forEach(d=>{d.sheet||(s.add(d),d.addEventListener("load",()=>{s.delete(d),s.size===0&&i!==-1&&(a.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(z.LoadStylesheetEnd),i&&clearTimeout(i),l())}))}),s.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(z.LoadStylesheetStart),i=setTimeout(()=>{a.matches("playing")&&this.play(this.getCurrentTime()),i=-1,l()},this.config.loadTimeout))}}async preloadAllImages(){const t=[];for(const r of this.service.state.context.events)r.type===_.IncrementalSnapshot&&r.data.source===T.CanvasMutation&&(t.push(this.deserializeAndPreloadCanvasEvents(r.data,r)),("commands"in r.data?r.data.commands:[r.data]).forEach(i=>{this.preloadImages(i,r)}));return Promise.all(t)}preloadImages(t,r){if(t.property==="drawImage"&&typeof t.args[0]=="string"&&!this.imageMap.has(r)){const s=document.createElement("canvas"),i=s.getContext("2d"),a=i==null?void 0:i.createImageData(s.width,s.height);i==null||i.putImageData(a,0,0)}}async deserializeAndPreloadCanvasEvents(t,r){if(!this.canvasEventMap.has(r)){const s={isUnchanged:!0};if("commands"in t){const i=await Promise.all(t.commands.map(async a=>{const o=await Promise.all(a.args.map(Oe(this.imageMap,null,s)));return se(L({},a),{args:o})}));s.isUnchanged===!1&&this.canvasEventMap.set(r,se(L({},t),{commands:i}))}else{const i=await Promise.all(t.args.map(Oe(this.imageMap,null,s)));s.isUnchanged===!1&&this.canvasEventMap.set(r,se(L({},t),{args:i}))}}}applyIncremental(t,r){var s,i,a;const{data:o}=t;switch(o.source){case T.Mutation:{try{this.applyMutation(o,r)}catch(l){this.warn(`Exception in mutation ${l.message||l}`,o)}break}case T.Drag:case T.TouchMove:case T.MouseMove:if(r){const l=o.positions[o.positions.length-1];this.mousePos={x:l.x,y:l.y,id:l.id,debugData:o}}else o.positions.forEach(l=>{const d={doAction:()=>{this.moveAndHover(l.x,l.y,l.id,r,o)},delay:l.timeOffset+t.timestamp-this.service.state.context.baselineTime};this.timer.addAction(d)}),this.timer.addAction({doAction(){},delay:t.delay-((s=o.positions[0])==null?void 0:s.timeOffset)});break;case T.MouseInteraction:{if(o.id===-1)break;const l=new Event(Ie(q[o.type])),d=this.mirror.getNode(o.id);if(!d)return this.debugNodeNotFound(o,o.id);this.emitter.emit(z.MouseInteraction,{type:o.type,target:d});const{triggerFocus:u}=this.config;switch(o.type){case q.Blur:"blur"in d&&d.blur();break;case q.Focus:u&&d.focus&&d.focus({preventScroll:!0});break;case q.Click:case q.TouchStart:case q.TouchEnd:case q.MouseDown:case q.MouseUp:r?(o.type===q.TouchStart?this.touchActive=!0:o.type===q.TouchEnd&&(this.touchActive=!1),o.type===q.MouseDown?this.lastMouseDownEvent=[d,l]:o.type===q.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:o.x||0,y:o.y||0,id:o.id,debugData:o}):(o.type===q.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(o.x||0,o.y||0,o.id,r,o),o.type===q.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):o.type===q.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):o.type===q.TouchEnd?this.mouse.classList.remove("touch-active"):d.dispatchEvent(l));break;case q.TouchCancel:r?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:d.dispatchEvent(l)}break}case T.Scroll:{if(o.id===-1)break;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.scrollData=o;break}this.applyScroll(o,r);break}case T.ViewportResize:this.emitter.emit(z.Resize,{width:o.width,height:o.height});break;case T.Input:{if(o.id===-1)break;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.inputData=o;break}this.applyInput(o);break}case T.MediaInteraction:{const l=this.usingVirtualDom?this.virtualDom.mirror.getNode(o.id):this.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);const d=l,{events:u}=this.service.state.context;this.mediaManager.mediaMutation({target:d,timeOffset:t.timestamp-u[0].timestamp,mutation:o});break}case T.StyleSheetRule:case T.StyleDeclaration:{this.usingVirtualDom?o.styleId?this.constructedStyleMutations.push(o):o.id&&((i=this.virtualDom.mirror.getNode(o.id))==null||i.rules.push(o)):this.applyStyleSheetMutation(o);break}case T.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.canvasMutations.push({event:t,mutation:o})}else{const l=this.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);os({event:t,mutation:o,target:l,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case T.Font:{try{const l=new FontFace(o.family,o.buffer?new Uint8Array(JSON.parse(o.fontSource)):o.fontSource,o.descriptors);(a=this.iframe.contentDocument)==null||a.fonts.add(l)}catch(l){this.warn(l)}break}case T.Selection:{if(r){this.lastSelectionData=o;break}this.applySelection(o);break}case T.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(o):this.applyAdoptedStyleSheet(o);break}}}applyMutation(t,r){if(this.config.useVirtualDom&&!this.usingVirtualDom&&r&&(this.usingVirtualDom=!0,Hl(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const u in this.legacy_missingNodeRetryMap)try{const n=this.legacy_missingNodeRetryMap[u],f=vo(n.node,this.virtualDom,this.mirror);f&&(n.node=f)}catch(n){this.warn(n)}const s=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;t.removes=t.removes.filter(u=>s.getNode(u.id)?!0:(this.warnNodeNotFound(t,u.id),!1)),t.removes.forEach(u=>{var n;const f=s.getNode(u.id);if(!f)return;let c=s.getNode(u.parentId);if(!c)return this.warnNodeNotFound(t,u.parentId);if(u.isShadow&&Ne(c)&&(c=c.shadowRoot),s.removeNodeFromMap(f),c)try{c.removeChild(f),this.usingVirtualDom&&f.nodeName==="#text"&&c.nodeName==="STYLE"&&((n=c.rules)==null?void 0:n.length)>0&&(c.rules=[])}catch(h){if(h instanceof DOMException)this.warn("parent could not remove child in mutation",c,f,t);else throw h}});const i=L({},this.legacy_missingNodeRetryMap),a=[],o=u=>{let n=null;return u.nextId&&(n=s.getNode(u.nextId)),u.nextId!==null&&u.nextId!==void 0&&u.nextId!==-1&&!n},l=u=>{var n,f;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let c=s.getNode(u.parentId);if(!c)return u.node.type===Se.Document?this.newDocumentQueue.push(u):a.push(u);u.node.isShadow&&(Ne(c)||c.attachShadow({mode:"open"}),c=c.shadowRoot);let h=null,m=null;if(u.previousId&&(h=s.getNode(u.previousId)),u.nextId&&(m=s.getNode(u.nextId)),o(u))return a.push(u);if(u.node.rootId&&!s.getNode(u.node.rootId))return;const p=u.node.rootId?s.getNode(u.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Ye(c,s)){this.attachDocumentToIframe(u,c);return}const g=(b,C)=>{if(!this.usingVirtualDom){St(b);for(const v of this.config.plugins||[])v.onBuild&&v.onBuild(b,{id:C,replayer:this})}},w=tt(u.node,{doc:p,mirror:s,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:g});if(u.previousId===-1||u.nextId===-1){i[u.node.id]={node:w,mutation:u};return}const y=s.getMeta(c);if(y&&y.type===Se.Element&&u.node.type===Se.Text){const b=Array.isArray(c.childNodes)?c.childNodes:Array.from(c.childNodes);if(y.tagName==="textarea")for(const C of b)C.nodeType===c.TEXT_NODE&&c.removeChild(C);else if(y.tagName==="style"&&b.length===1)for(const C of b)C.nodeType===c.TEXT_NODE&&!s.hasNode(C)&&(w.textContent=C.textContent,c.removeChild(C))}else if((y==null?void 0:y.type)===Se.Document){const b=c;u.node.type===Se.DocumentType&&((n=b.childNodes[0])==null?void 0:n.nodeType)===Node.DOCUMENT_TYPE_NODE&&b.removeChild(b.childNodes[0]),w.nodeName==="HTML"&&b.documentElement&&b.removeChild(b.documentElement)}if(h&&h.nextSibling&&h.nextSibling.parentNode?c.insertBefore(w,h.nextSibling):m&&m.parentNode?c.contains(m)?c.insertBefore(w,m):c.insertBefore(w,null):c.appendChild(w),g(w,u.node.id),this.usingVirtualDom&&w.nodeName==="#text"&&c.nodeName==="STYLE"&&((f=c.rules)==null?void 0:f.length)>0&&(c.rules=[]),Ye(w,this.mirror)){const b=this.mirror.getId(w),C=this.newDocumentQueue.find(v=>v.parentId===b);C&&(this.attachDocumentToIframe(C,w),this.newDocumentQueue=this.newDocumentQueue.filter(v=>v!==C))}(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(i,c,w,u)};t.adds.forEach(u=>{l(u)});const d=Date.now();for(;a.length;){const u=xo(a);if(a.length=0,Date.now()-d>500){this.warn("Timeout in the loop, please check the resolve tree data:",u);break}for(const n of u)s.getNode(n.value.parentId)?Us(n,c=>{l(c)}):this.debug("Drop resolve tree since there is no parent for the root node.",n)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),Mo(t.texts).forEach(u=>{var n;const f=s.getNode(u.id);if(!f)return t.removes.find(c=>c.id===u.id)?void 0:this.warnNodeNotFound(t,u.id);if(f.textContent=u.value,this.usingVirtualDom){const c=f.parentNode;((n=c==null?void 0:c.rules)==null?void 0:n.length)>0&&(c.rules=[])}}),t.attributes.forEach(u=>{var n;const f=s.getNode(u.id);if(!f)return t.removes.find(c=>c.id===u.id)?void 0:this.warnNodeNotFound(t,u.id);for(const c in u.attributes)if(typeof c=="string"){const h=u.attributes[c];if(h===null)f.removeAttribute(c),c==="open"&&Zu(f,u);else if(typeof h=="string")try{if(c==="_cssText"&&(f.nodeName==="LINK"||f.nodeName==="STYLE"))try{const m=s.getMeta(f);Object.assign(m.attributes,u.attributes);const p=tt(m,{doc:f.ownerDocument,mirror:s,skipChild:!0,hackCss:!0,cache:this.cache}),g=f.nextSibling,w=f.parentNode;if(p&&w){w.removeChild(f),w.insertBefore(p,g),s.replace(u.id,p);break}}catch(m){}if(c==="value"&&f.nodeName==="TEXTAREA"){const m=f;m.childNodes.forEach(g=>m.removeChild(g));const p=(n=f.ownerDocument)==null?void 0:n.createTextNode(h);p&&m.appendChild(p)}else f.setAttribute(c,h);c==="rr_open_mode"&&f.nodeName==="DIALOG"&&St(f,u)}catch(m){this.warn("An error occurred may due to the checkout feature.",m)}else if(c==="style"){const m=h,p=f;for(const g in m)if(m[g]===!1)p.style.removeProperty(g);else if(m[g]instanceof Array){const w=m[g];p.style.setProperty(g,w[0],w[1])}else{const w=m[g];p.style.setProperty(g,w)}}}})}applyScroll(t,r){var s,i;const a=this.mirror.getNode(t.id);if(!a)return this.debugNodeNotFound(t,t.id);const o=this.mirror.getMeta(a);if(a===this.iframe.contentDocument)(s=this.iframe.contentWindow)==null||s.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"});else if((o==null?void 0:o.type)===Se.Document)(i=a.defaultView)==null||i.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"});else try{a.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"})}catch(l){}}applyInput(t){const r=this.mirror.getNode(t.id);if(!r)return this.debugNodeNotFound(t,t.id);try{r.checked=t.isChecked,r.value=t.text}catch(s){}}applySelection(t){try{const r=new Set,s=t.ranges.map(({start:i,startOffset:a,end:o,endOffset:l})=>{const d=this.mirror.getNode(i),u=this.mirror.getNode(o);if(!d||!u)return;const n=new Range;n.setStart(d,a),n.setEnd(u,l);const f=d.ownerDocument,c=f==null?void 0:f.getSelection();return c&&r.add(c),{range:n,selection:c}});r.forEach(i=>i.removeAllRanges()),s.forEach(i=>{var a;return i&&((a=i.selection)==null?void 0:a.addRange(i.range))})}catch(r){}}applyStyleSheetMutation(t){var r;let s=null;t.styleId?s=this.styleMirror.getStyle(t.styleId):t.id&&(s=((r=this.mirror.getNode(t.id))==null?void 0:r.sheet)||null),s&&(t.source===T.StyleSheetRule?this.applyStyleSheetRule(t,s):t.source===T.StyleDeclaration&&this.applyStyleDeclaration(t,s))}applyStyleSheetRule(t,r){var s,i,a,o;if((s=t.adds)==null||s.forEach(({rule:l,index:d})=>{try{if(Array.isArray(d)){const{positions:u,index:n}=is(d);je(r.cssRules,u).insertRule(l,n)}else{const u=d===void 0?void 0:Math.min(d,r.cssRules.length);r==null||r.insertRule(l,u)}}catch(u){}}),(i=t.removes)==null||i.forEach(({index:l})=>{try{if(Array.isArray(l)){const{positions:d,index:u}=is(l);je(r.cssRules,d).deleteRule(u||0)}else r==null||r.deleteRule(l)}catch(d){}}),t.replace)try{(a=r.replace)==null||a.call(r,t.replace)}catch(l){}if(t.replaceSync)try{(o=r.replaceSync)==null||o.call(r,t.replaceSync)}catch(l){}}applyStyleDeclaration(t,r){t.set&&je(r.rules,t.index).style.setProperty(t.set.property,t.set.value,t.set.priority),t.remove&&je(r.rules,t.index).style.removeProperty(t.remove.property)}applyAdoptedStyleSheet(t){var r;const s=this.mirror.getNode(t.id);if(!s)return;(r=t.styles)==null||r.forEach(l=>{var d;let u=null,n=null;if(Ne(s)?n=((d=s.ownerDocument)==null?void 0:d.defaultView)||null:s.nodeName==="#document"&&(n=s.defaultView),!!n)try{u=new n.CSSStyleSheet,this.styleMirror.add(u,l.styleId),this.applyStyleSheetRule({source:T.StyleSheetRule,adds:l.rules},u)}catch(f){}});const i=10;let a=0;const o=(l,d)=>{const u=d.map(n=>this.styleMirror.getStyle(n)).filter(n=>n!==null);Ne(l)?l.shadowRoot.adoptedStyleSheets=u:l.nodeName==="#document"&&(l.adoptedStyleSheets=u),u.length!==d.length&&a<i&&(setTimeout(()=>o(l,d),0+100*a),a++)};o(s,t.styleIds)}legacy_resolveMissingNode(t,r,s,i){const{previousId:a,nextId:o}=i,l=a&&t[a],d=o&&t[o];if(l){const{node:u,mutation:n}=l;r.insertBefore(u,s),delete t[n.node.id],delete this.legacy_missingNodeRetryMap[n.node.id],(n.previousId||n.nextId)&&this.legacy_resolveMissingNode(t,r,u,n)}if(d){const{node:u,mutation:n}=d;r.insertBefore(u,s.nextSibling),delete t[n.node.id],delete this.legacy_missingNodeRetryMap[n.node.id],(n.previousId||n.nextId)&&this.legacy_resolveMissingNode(t,r,u,n)}}moveAndHover(t,r,s,i,a){const o=this.mirror.getNode(s);if(!o)return this.debugNodeNotFound(a,s);const l=$s(o,this.iframe),d=t*l.absoluteScale+l.x,u=r*l.absoluteScale+l.y;this.mouse.style.left=`${d}px`,this.mouse.style.top=`${u}px`,i||this.drawMouseTail({x:d,y:u}),this.hoverElements(o)}drawMouseTail(t){if(!this.mouseTail)return;const{lineCap:r,lineWidth:s,strokeStyle:i,duration:a}=this.config.mouseTail===!0?ts:Object.assign({},ts,this.config.mouseTail),o=()=>{if(!this.mouseTail)return;const l=this.mouseTail.getContext("2d");!l||!this.tailPositions.length||(l.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),l.beginPath(),l.lineWidth=s,l.lineCap=r,l.strokeStyle=i,l.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(d=>l.lineTo(d.x,d.y)),l.stroke())};this.tailPositions.push(t),o(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(l=>l!==t),o()},a/this.speedService.state.context.timer.speed)}hoverElements(t){var r;(r=this.lastHoveredRootNode||this.iframe.contentDocument)==null||r.querySelectorAll(".\\:hover").forEach(i=>{i.classList.remove(":hover")}),this.lastHoveredRootNode=t.getRootNode();let s=t;for(;s;)s.classList&&s.classList.add(":hover"),s=s.parentElement}isUserInteraction(t){return t.type!==_.IncrementalSnapshot?!1:t.data.source>T.Mutation&&t.data.source<=T.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(z.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(t,r){this.warn(`Node with id '${r}' not found. `,t)}warnCanvasMutationFailed(t,r){this.warn("Has error on canvas update",r,"canvas mutation:",t)}debugNodeNotFound(t,r){this.debug(`Node with id '${r}' not found. `,t)}warn(...t){this.config.showWarning&&this.config.logger.warn(kn,...t)}debug(...t){this.config.showDebug&&this.config.logger.log(kn,...t)}}const{addCustomEvent:sc}=Te,{freezePage:ic}=Te,{takeFullSnapshot:nc}=Te;exports.EventType=_;exports.IncrementalSource=T;exports.MouseInteractions=q;exports.Replayer=rc;exports.ReplayerEvents=z;exports.addCustomEvent=sc;exports.canvasMutation=os;exports.freezePage=ic;exports.record=Te;exports.takeFullSnapshot=nc;exports.utils=lu;
160
160
  if (typeof module.exports == "object" && typeof exports == "object") {
161
161
  var __cp = (to, from, except, desc) => {
162
162
  if ((from && typeof from === "object") || typeof from === "function") {