rrweb
Version:
record and replay the web
37 lines (36 loc) • 266 kB
JavaScript
(function (g, f) {
if ("object" == typeof exports && "object" == typeof module) {
module.exports = f();
} else if ("function" == typeof define && define.amd) {
define("rrweb", [], f);
} else if ("object" == typeof exports) {
exports["rrweb"] = f();
} else {
g["rrweb"] = f();
}
}(this, () => {
var exports = {};
var module = { exports };
"use strict";var To=Object.defineProperty,_o=Object.defineProperties;var ko=Object.getOwnPropertyDescriptors;var ut=Object.getOwnPropertySymbols;var qs=Object.prototype.hasOwnProperty,Vs=Object.prototype.propertyIsEnumerable;var zs=(e,t,r)=>t in e?To(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,P=(e,t)=>{for(var r in t||(t={}))qs.call(t,r)&&zs(e,r,t[r]);if(ut)for(var r of ut(t))Vs.call(t,r)&&zs(e,r,t[r]);return e},se=(e,t)=>_o(e,ko(t));var Ue=(e,t)=>{var r={};for(var s in e)qs.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&ut)for(var s of ut(e))t.indexOf(s)<0&&Vs.call(e,s)&&(r[s]=e[s]);return r};var Po=Object.defineProperty,Lo=(e,t,r)=>t in e?Po(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,M=(e,t,r)=>Lo(e,typeof t!="symbol"?t+"":t,r),js;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Fo=Object.defineProperty,Uo=(e,t,r)=>t in e?Fo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Gs=(e,t,r)=>Uo(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 Hs={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Ys={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ct={},Dn={},Bo=()=>!!globalThis.Zone;function as(e){if(ct[e])return ct[e];const t=globalThis[e],r=t.prototype,s=e in Hs?Hs[e]:void 0,i=!!(s&&s.every(u=>{var o,c;return!!((c=(o=Object.getOwnPropertyDescriptor(r,u))==null?void 0:o.get)!=null&&c.toString().includes("[native code]"))})),a=e in Ys?Ys[e]:void 0,l=!!(a&&a.every(u=>{var o;return typeof r[u]=="function"&&((o=r[u])==null?void 0:o.toString().includes("[native code]"))}));if(i&&l&&!Bo())return ct[e]=t.prototype,t.prototype;try{const u=document.createElement("iframe");u.style.display="none",document.body.appendChild(u);const o=u.contentWindow;if(!o)return t.prototype;const c=o[e].prototype;if(!c)return u.remove(),r;const n=navigator.userAgent;return n.includes("Safari")&&!n.includes("Chrome")?(u.classList.add("rr-block"),u.setAttribute("__rrwebUntaintedMutationObserver",""),Dn[e]=()=>u.remove()):u.remove(),ct[e]=c}catch(u){return r}}const Yt={};function Ee(e,t,r){var s;const i=`${e}.${String(r)}`;if(Yt[i])return Yt[i].call(t);const a=as(e),l=(s=Object.getOwnPropertyDescriptor(a,r))==null?void 0:s.get;return l?(Yt[i]=l,l.call(t)):t[r]}const Xt={};function An(e,t,r){const s=`${e}.${String(r)}`;if(Xt[s])return Xt[s].bind(t);const a=as(e)[r];return typeof a!="function"?t[r]:(Xt[s]=a,a.bind(t))}function $o(e){return Ee("Node",e,"ownerDocument")}function Wo(e){return Ee("Node",e,"childNodes")}function zo(e){return Ee("Node",e,"parentNode")}function qo(e){return Ee("Node",e,"parentElement")}function Vo(e){return Ee("Node",e,"textContent")}function jo(e,t){return An("Node",e,"contains")(t)}function Go(e){return An("Node",e,"getRootNode")()}function Ho(e){return!e||!("host"in e)?null:Ee("ShadowRoot",e,"host")}function Yo(e){return e.styleSheets}function Xo(e){return!e||!("shadowRoot"in e)?null:Ee("Element",e,"shadowRoot")}function Jo(e,t){return Ee("Element",e,"querySelector")(t)}function Qo(e,t){return Ee("Element",e,"querySelectorAll")(t)}function Zo(){var e;return[as("MutationObserver").constructor,(e=Dn.MutationObserver)!=null?e:()=>{}]}let Tn=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Tn=()=>new Date().getTime());function Ko(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 ie={ownerDocument:$o,childNodes:Wo,parentNode:zo,parentElement:qo,textContent:Vo,contains:jo,getRootNode:Go,host:Ho,styleSheets:Yo,shadowRoot:Xo,querySelector:Jo,querySelectorAll:Qo,nowTimestamp:Tn,mutationObserverCtor:Zo,patch:Ko};function ls(e){return e.nodeType===e.ELEMENT_NODE}function et(e){const t=e&&"host"in e&&"mode"in e&&ie.host(e)||null;return!!(t&&"shadowRoot"in t&&ie.shadowRoot(t)===e)}function tt(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function ea(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 ta(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 ts(e){try{const t=e.rules||e.cssRules;if(!t)return null;let r=e.href;!r&&e.ownerNode&&(r=e.ownerNode.baseURI);const s=Array.from(t,i=>_n(i,r)).join("");return ea(s)}catch(t){return null}}function _n(e,t){if(sa(e)){let r;try{r=ts(e.styleSheet)||ta(e)}catch(s){r=e.cssText}return e.styleSheet.href?Mt(r,e.styleSheet.href):r}else{let r=e.cssText;return ia(e)&&e.selectorText.includes(":")&&(r=ra(r)),t?Mt(r,t):r}}function ra(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function sa(e){return"styleSheet"in e}function ia(e){return"selectorText"in e}class us{constructor(){Gs(this,"idNodeMap",new Map),Gs(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 kn(){return new us}function xt({element:e,maskInputOptions:t,tagName:r,type:s,value:i,maskInputFn:a}){let l=i||"";const u=s&&Ae(s);return(t[r.toLowerCase()]||u&&t[u])&&(a?l=a(l,e):l="*".repeat(l.length)),l}function Ae(e){return e.toLowerCase()}const Xs="__rrweb_original__";function na(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,l=Xs in a?a[Xs]:a;if(new Uint32Array(l.call(t,s,i,Math.min(r,e.width-s),Math.min(r,e.height-i)).data.buffer).some(o=>o!==0))return!1}return!0}function oa(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 Rt(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Ae(t):null}function cs(e,t){var a;let r;try{r=new URL(e,t!=null?t:window.location.href)}catch(l){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 aa(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}const la=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ua=/^(?:[a-z+]+:)?\/\//i,ca=/^www\..*/i,ha=/^(data:)([^,]*),(.*)/i;function Mt(e,t){return(e||"").replace(la,(r,s,i,a,l,u)=>{const o=i||l||u,c=s||a||"";if(!o)return r;if(ua.test(o)||ca.test(o))return`url(${c}${o}${c})`;if(ha.test(o))return`url(${c}${o}${c})`;if(o[0]==="/")return`url(${c}${aa(t)+o}${c})`;const n=t.split("/"),d=o.split("/");n.pop();for(const h of d)h!=="."&&(h===".."?n.pop():n.push(h));return`url(${c}${n.join("/")}${c})`})}function ht(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function fa(e,t,r=!1){const s=Array.from(t.childNodes),i=[];let a=0;if(s.length>1&&e&&typeof e=="string"){let l=ht(e,r);const u=l.length/e.length;for(let o=1;o<s.length;o++)if(s[o].textContent&&typeof s[o].textContent=="string"){const c=ht(s[o].textContent,r),n=100;let d=3;for(;d<c.length&&(c[d].match(/[a-zA-Z0-9]/)||c.indexOf(c.substring(0,d),1)!==-1);d++);for(;d<c.length;d++){let h=c.substring(0,d),f=l.split(h),m=-1;if(f.length===2)m=f[0].length;else if(f.length>2&&f[0]===""&&s[o-1].textContent!=="")m=l.indexOf(h,1);else if(f.length===1){if(h=h.substring(0,h.length-1),f=l.split(h),f.length<=1)return i.push(e),i;d=n+1}else d===c.length-1&&(m=l.indexOf(h));if(f.length>=2&&d>n){const p=s[o-1].textContent;if(p&&typeof p=="string"){const g=ht(p).length;m=l.indexOf(h,g)}m===-1&&(m=f[0].length)}if(m!==-1){let p=Math.floor(m/u);for(;p>0&&p<e.length;){if(a+=1,a>50*s.length)return i.push(e),i;const g=ht(e.substring(0,p),r);if(g.length===m){i.push(e.substring(0,p)),e=e.substring(p),l=l.substring(m);break}else g.length<m?p+=Math.max(1,Math.floor((m-g.length)/u)):p-=Math.max(1,Math.floor((g.length-m)*u))}break}}}}return i.push(e),i}function da(e,t){return fa(e,t).join("/* rr_split */")}let pa=1;const ma=new RegExp("[^a-z0-9-_:]"),it=-2;function Pn(){return pa++}function ga(e){if(e instanceof HTMLFormElement)return"form";const t=Ae(e.tagName);return ma.test(t)?"div":t}let Be,Js;const ya=/^[^ \t\n\r\u000c]+/,wa=/^[, \t\n\r\u000c]+/;function ba(e,t){if(t.trim()==="")return t;let r=0;function s(a){let l;const u=a.exec(t.substring(r));return u?(l=u[0],r+=l.length,l):""}const i=[];for(;s(wa),!(r>=t.length);){let a=s(ya);if(a.slice(-1)===",")a=qe(e,a.substring(0,a.length-1)),i.push(a);else{let l="";a=qe(e,a);let u=!1;for(;;){const o=t.charAt(r);if(o===""){i.push((a+l).trim());break}else if(u)o===")"&&(u=!1);else if(o===","){r+=1,i.push((a+l).trim());break}else o==="("&&(u=!0);l+=o,r+=1}}}return i.join(", ")}const Qs=new WeakMap;function qe(e,t){return!t||t.trim()===""?t:hs(e,t)}function va(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function hs(e,t){let r=Qs.get(e);if(r||(r=e.createElement("a"),Qs.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function Ln(e,t,r,s){return s&&(r==="src"||r==="href"&&!(t==="use"&&s[0]==="#")||r==="xlink:href"&&s[0]!=="#"||r==="background"&&["table","td","th"].includes(t)?qe(e,s):r==="srcset"?ba(e,s):r==="style"?Mt(s,hs(e)):t==="object"&&r==="data"?qe(e,s):s)}function Fn(e,t,r){return["video","audio"].includes(e)&&t==="autoplay"}function Sa(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(ie.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(ie.parentNode(e),t,r):!1}function Un(e,t,r,s){let i;if(ls(e)){if(i=e,!ie.childNodes(i).length)return!1}else{if(ie.parentElement(e)===null)return!1;i=ie.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 Ca(e,t,r){const s=e.contentWindow;if(!s)return;let i=!1,a;try{a=s.document.readyState}catch(u){return}if(a!=="complete"){const u=setTimeout(()=>{i||(t(),i=!0)},r);e.addEventListener("load",()=>{clearTimeout(u),i=!0,t()});return}const l="about:blank";if(s.location.href!==l||e.src===l||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function Ea(e,t,r){let s=!1,i;try{i=e.sheet}catch(l){return}if(i)return;const a=setTimeout(()=>{s||(t(),s=!0)},r);e.addEventListener("load",()=>{clearTimeout(a),s=!0,t()})}function xa(e,t){const{doc:r,mirror:s,blockClass:i,blockSelector:a,needsMask:l,inlineStylesheet:u,maskInputOptions:o={},maskTextFn:c,maskInputFn:n,dataURLOptions:d={},inlineImages:h,recordCanvas:f,keepIframeSrcFn:m,newlyAddedElement:p=!1,cssCaptured:g=!1}=t,b=Ra(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:b};case e.ELEMENT_NODE:return Na(e,{doc:r,blockClass:i,blockSelector:a,inlineStylesheet:u,maskInputOptions:o,maskInputFn:n,dataURLOptions:d,inlineImages:h,recordCanvas:f,keepIframeSrcFn:m,newlyAddedElement:p,rootId:b});case e.TEXT_NODE:return Ma(e,{doc:r,needsMask:l,maskTextFn:c,rootId:b,cssCaptured:g});case e.CDATA_SECTION_NODE:return{type:U.CDATA,textContent:"",rootId:b};case e.COMMENT_NODE:return{type:U.Comment,textContent:ie.textContent(e)||"",rootId:b};default:return!1}}function Ra(e,t){if(!t.hasNode(e))return;const r=t.getId(e);return r===1?void 0:r}function Ma(e,t){const{needsMask:r,maskTextFn:s,rootId:i,cssCaptured:a}=t,l=ie.parentNode(e),u=l&&l.tagName;let o="";const c=u==="STYLE"?!0:void 0,n=u==="SCRIPT"?!0:void 0;return n?o="SCRIPT_PLACEHOLDER":a||(o=ie.textContent(e),c&&o&&(o=Mt(o,hs(t.doc)))),!c&&!n&&o&&r&&(o=s?s(o,ie.parentElement(e)):o.replace(/[\S]/g,"*")),{type:U.Text,textContent:o||"",rootId:i}}function Na(e,t){const{doc:r,blockClass:s,blockSelector:i,inlineStylesheet:a,maskInputOptions:l={},maskInputFn:u,dataURLOptions:o={},inlineImages:c,recordCanvas:n,keepIframeSrcFn:d,newlyAddedElement:h=!1,rootId:f}=t,m=Sa(e,s,i),p=ga(e);let g={};const b=e.attributes.length;for(let w=0;w<b;w++){const C=e.attributes[w];Fn(p,C.name,C.value)||(g[C.name]=Ln(r,p,Ae(C.name),C.value))}if(p==="link"&&a){const w=Array.from(r.styleSheets).find(v=>v.href===e.href);let C=null;w&&(C=ts(w)),C&&(delete g.rel,delete g.href,g._cssText=C)}if(p==="style"&&e.sheet){let w=ts(e.sheet);w&&(e.childNodes.length>1&&(w=da(w,e)),g._cssText=w)}if(["input","textarea","select"].includes(p)){const w=e.value,C=e.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&w?g.value=xt({element:e,type:Rt(e),tagName:p,value:w,maskInputOptions:l,maskInputFn:u}):C&&(g.checked=C)}if(p==="option"&&(e.selected&&!l.select?g.selected=!0:delete g.selected),p==="dialog"&&e.open&&(g.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),p==="canvas"&&n){if(e.__context==="2d")na(e)||(g.rr_dataURL=e.toDataURL(o.type,o.quality));else if(!("__context"in e)){const w=e.toDataURL(o.type,o.quality),C=r.createElement("canvas");C.width=e.width,C.height=e.height;const v=C.toDataURL(o.type,o.quality);w!==v&&(g.rr_dataURL=w)}}if(p==="img"&&c){Be||(Be=r.createElement("canvas"),Js=Be.getContext("2d"));const w=e,C=w.currentSrc||w.getAttribute("src")||"<unknown-src>",v=w.crossOrigin,S=()=>{w.removeEventListener("load",S);try{Be.width=w.naturalWidth,Be.height=w.naturalHeight,Js.drawImage(w,0,0),g.rr_dataURL=Be.toDataURL(o.type,o.quality)}catch(E){if(w.crossOrigin!=="anonymous"){w.crossOrigin="anonymous",w.complete&&w.naturalWidth!==0?S():w.addEventListener("load",S);return}else console.warn(`Cannot inline img src=${C}! Error: ${E}`)}w.crossOrigin==="anonymous"&&(v?g.crossOrigin=v:w.removeAttribute("crossorigin"))};w.complete&&w.naturalWidth!==0?S():w.addEventListener("load",S)}if(["audio","video"].includes(p)){const w=g;w.rr_mediaState=e.paused?"paused":"played",w.rr_mediaCurrentTime=e.currentTime,w.rr_mediaPlaybackRate=e.playbackRate,w.rr_mediaMuted=e.muted,w.rr_mediaLoop=e.loop,w.rr_mediaVolume=e.volume}if(h||(e.scrollLeft&&(g.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(g.rr_scrollTop=e.scrollTop)),m){const{width:w,height:C}=e.getBoundingClientRect();g={class:g.class,rr_width:`${w}px`,rr_height:`${C}px`}}p==="iframe"&&!d(g.src)&&(e.contentDocument||(g.rr_src=g.src),delete g.src);let y;try{customElements.get(p)&&(y=!0)}catch(w){}return{type:U.Element,tagName:p,attributes:g,childNodes:[],isSVG:va(e)||void 0,needBlock:m,rootId:f,isCustom:y}}function Y(e){return e==null?"":e.toLowerCase()}function Bn(e){return e===!0||e==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:e==="all",headMetaDescKeywords:e==="all",headTitleMutations:e==="all"}:e||{}}function Oa(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"&&cs(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(Y(e.attributes.name).match(/^msapplication-tile(image|color)$/)||Y(e.attributes.name)==="application-name"||Y(e.attributes.rel)==="icon"||Y(e.attributes.rel)==="apple-touch-icon"||Y(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&Y(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Y(e.attributes.property).match(/^(og|twitter|fb):/)||Y(e.attributes.name).match(/^(og|twitter):/)||Y(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(Y(e.attributes.name)==="robots"||Y(e.attributes.name)==="googlebot"||Y(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(Y(e.attributes.name)==="author"||Y(e.attributes.name)==="generator"||Y(e.attributes.name)==="framework"||Y(e.attributes.name)==="publisher"||Y(e.attributes.name)==="progid"||Y(e.attributes.property).match(/^article:/)||Y(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(Y(e.attributes.name)==="google-site-verification"||Y(e.attributes.name)==="yandex-verification"||Y(e.attributes.name)==="csrf-token"||Y(e.attributes.name)==="p:domain_verify"||Y(e.attributes.name)==="verify-v1"||Y(e.attributes.name)==="verification"||Y(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:l,maskTextSelector:u,skipChild:o=!1,inlineStylesheet:c=!0,maskInputOptions:n={},maskTextFn:d,maskInputFn:h,slimDOMOptions:f,dataURLOptions:m={},inlineImages:p=!1,recordCanvas:g=!1,onSerialize:b,onIframeLoad:y,iframeLoadTimeout:w=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:v=5e3,keepIframeSrcFn:S=()=>!1,newlyAddedElement:E=!1,cssCaptured:R=!1}=t;let{needsMask:I}=t,{preserveWhiteSpace:N=!0}=t;I||(I=Un(e,l,u,I===void 0));const F=xa(e,{doc:r,mirror:s,blockClass:i,blockSelector:a,needsMask:I,inlineStylesheet:c,maskInputOptions:n,maskTextFn:d,maskInputFn:h,dataURLOptions:m,inlineImages:p,recordCanvas:g,keepIframeSrcFn:S,newlyAddedElement:E,cssCaptured:R});if(!F)return console.warn(e,"not serialized"),null;let T;s.hasNode(e)?T=s.getId(e):Oa(F,f)||!N&&F.type===U.Text&&!F.textContent.replace(/^\s+|\s+$/gm,"").length?T=it:T=Pn();const x=Object.assign(F,{id:T});if(s.add(e,x),T===it)return null;b&&b(e);let ue=!o;if(x.type===U.Element){ue=ue&&!x.needBlock,delete x.needBlock;const V=ie.shadowRoot(e);V&&tt(V)&&(x.isShadowHost=!0)}if((x.type===U.Document||x.type===U.Element)&&ue){f.headWhitespace&&x.type===U.Element&&x.tagName==="head"&&(N=!1);const V={doc:r,mirror:s,blockClass:i,blockSelector:a,needsMask:I,maskTextClass:l,maskTextSelector:u,skipChild:o,inlineStylesheet:c,maskInputOptions:n,maskTextFn:d,maskInputFn:h,slimDOMOptions:f,dataURLOptions:m,inlineImages:p,recordCanvas:g,preserveWhiteSpace:N,onSerialize:b,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:C,stylesheetLoadTimeout:v,keepIframeSrcFn:S,cssCaptured:!1};if(!(x.type===U.Element&&x.tagName==="textarea"&&x.attributes.value!==void 0)){x.type===U.Element&&x.attributes._cssText!==void 0&&typeof x.attributes._cssText=="string"&&(V.cssCaptured=!0);for(const X of Array.from(ie.childNodes(e))){const te=Ve(X,V);te&&x.childNodes.push(te)}}let k=null;if(ls(e)&&(k=ie.shadowRoot(e)))for(const X of Array.from(ie.childNodes(k))){const te=Ve(X,V);te&&(tt(k)&&(te.isShadow=!0),x.childNodes.push(te))}}const ae=ie.parentNode(e);return ae&&et(ae)&&tt(ae)&&(x.isShadow=!0),x.type===U.Element&&x.tagName==="iframe"&&Ca(e,()=>{const V=e.contentDocument;if(V&&y){const k=Ve(V,{doc:V,mirror:s,blockClass:i,blockSelector:a,needsMask:I,maskTextClass:l,maskTextSelector:u,skipChild:!1,inlineStylesheet:c,maskInputOptions:n,maskTextFn:d,maskInputFn:h,slimDOMOptions:f,dataURLOptions:m,inlineImages:p,recordCanvas:g,preserveWhiteSpace:N,onSerialize:b,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:C,stylesheetLoadTimeout:v,keepIframeSrcFn:S});k&&y(e,k)}},w),x.type===U.Element&&x.tagName==="link"&&typeof x.attributes.rel=="string"&&(x.attributes.rel==="stylesheet"||x.attributes.rel==="preload"&&typeof x.attributes.href=="string"&&cs(x.attributes.href)==="css")&&Ea(e,()=>{if(C){const V=Ve(e,{doc:r,mirror:s,blockClass:i,blockSelector:a,needsMask:I,maskTextClass:l,maskTextSelector:u,skipChild:!1,inlineStylesheet:c,maskInputOptions:n,maskTextFn:d,maskInputFn:h,slimDOMOptions:f,dataURLOptions:m,inlineImages:p,recordCanvas:g,preserveWhiteSpace:N,onSerialize:b,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:C,stylesheetLoadTimeout:v,keepIframeSrcFn:S});V&&C(e,V)}},v),x}function Ia(e,t){const{mirror:r=new us,blockClass:s="rr-block",blockSelector:i=null,maskTextClass:a="rr-mask",maskTextSelector:l=null,inlineStylesheet:u=!0,inlineImages:o=!1,recordCanvas:c=!1,maskAllInputs:n=!1,maskTextFn:d,maskInputFn:h,slimDOM:f=!1,dataURLOptions:m,preserveWhiteSpace:p,onSerialize:g,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:w,stylesheetLoadTimeout:C,keepIframeSrcFn:v=()=>!1}=t,S=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,E=Bn(f);return Ve(e,{doc:e,mirror:r,blockClass:s,blockSelector:i,maskTextClass:a,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:S,maskTextFn:d,maskInputFn:h,slimDOMOptions:E,dataURLOptions:m,inlineImages:o,recordCanvas:c,preserveWhiteSpace:p,onSerialize:g,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:w,stylesheetLoadTimeout:C,keepIframeSrcFn:v,newlyAddedElement:!1})}const Da=/(max|min)-device-(width|height)/,Zs=new RegExp(Da.source,"g"),Aa={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(e){e.params.match(Zs)&&(e.params=e.params.replace(Zs,"$1-$2"))}}}},Ta={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+=`,
`+r.replace(/:hover/g,".\\:hover"))}))}}}};function _a(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ka(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 ft={exports:{}},Ks;function Pa(){if(Ks)return ft.exports;Ks=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}};return ft.exports=t(),ft.exports.createColors=t,ft.exports}const La={},Fa=Object.freeze(Object.defineProperty({__proto__:null,default:La},Symbol.toStringTag,{value:"Module"})),me=ka(Fa);var Jt,ei;function fs(){if(ei)return Jt;ei=1;let e=Pa(),t=me;class r extends Error{constructor(i,a,l,u,o,c){super(i),this.name="CssSyntaxError",this.reason=i,o&&(this.file=o),u&&(this.source=u),c&&(this.plugin=c),typeof a!="undefined"&&typeof l!="undefined"&&(typeof a=="number"?(this.line=a,this.column=l):(this.line=a.line,this.column=a.column,this.endLine=l.line,this.endColumn=l.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),t&&i&&(a=t(a));let l=a.split(/\r?\n/),u=Math.max(this.line-3,0),o=Math.min(this.line+2,l.length),c=String(o).length,n,d;if(i){let{bold:h,gray:f,red:m}=e.createColors(!0);n=p=>h(m(p)),d=p=>f(p)}else n=d=h=>h;return l.slice(u,o).map((h,f)=>{let m=u+1+f,p=" "+(" "+m).slice(-c)+" | ";if(m===this.line){let g=d(p.replace(/\d/g," "))+h.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+d(p)+h+`
`+g+n("^")}return" "+d(p)+h}).join(`
`)}toString(){let i=this.showSourceCode();return i&&(i=`
`+i+`
`),this.name+": "+this.message+i}}return Jt=r,r.default=r,Jt}var dt={},ti;function ds(){return ti||(ti=1,dt.isClean=Symbol("isClean"),dt.my=Symbol("my")),dt}var Qt,ri;function $n(){if(ri)return Qt;ri=1;const e={after:`
`,beforeClose:`
`,beforeComment:`
`,beforeDecl:`
`,beforeOpen:" ",beforeRule:`
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function t(s){return s[0].toUpperCase()+s.slice(1)}class r{constructor(i){this.builder=i}atrule(i,a){let l="@"+i.name,u=i.params?this.rawValue(i,"params"):"";if(typeof i.raws.afterName!="undefined"?l+=i.raws.afterName:u&&(l+=" "),i.nodes)this.block(i,l+u);else{let o=(i.raws.between||"")+(a?";":"");this.builder(l+u+o,i)}}beforeAfter(i,a){let l;i.type==="decl"?l=this.raw(i,null,"beforeDecl"):i.type==="comment"?l=this.raw(i,null,"beforeComment"):a==="before"?l=this.raw(i,null,"beforeRule"):l=this.raw(i,null,"beforeClose");let u=i.parent,o=0;for(;u&&u.type!=="root";)o+=1,u=u.parent;if(l.includes(`
`)){let c=this.raw(i,null,"indent");if(c.length)for(let n=0;n<o;n++)l+=c}return l}block(i,a){let l=this.raw(i,"between","beforeOpen");this.builder(a+l+"{",i,"start");let u;i.nodes&&i.nodes.length?(this.body(i),u=this.raw(i,"after")):u=this.raw(i,"after","emptyBody"),u&&this.builder(u),this.builder("}",i,"end")}body(i){let a=i.nodes.length-1;for(;a>0&&i.nodes[a].type==="comment";)a-=1;let l=this.raw(i,"semicolon");for(let u=0;u<i.nodes.length;u++){let o=i.nodes[u],c=this.raw(o,"before");c&&this.builder(c),this.stringify(o,a!==u||l)}}comment(i){let a=this.raw(i,"left","commentLeft"),l=this.raw(i,"right","commentRight");this.builder("/*"+a+i.text+l+"*/",i)}decl(i,a){let l=this.raw(i,"between","colon"),u=i.prop+l+this.rawValue(i,"value");i.important&&(u+=i.raws.important||" !important"),a&&(u+=";"),this.builder(u,i)}document(i){this.body(i)}raw(i,a,l){let u;if(l||(l=a),a&&(u=i.raws[a],typeof u!="undefined"))return u;let o=i.parent;if(l==="before"&&(!o||o.type==="root"&&o.first===i||o&&o.type==="document"))return"";if(!o)return e[l];let c=i.root();if(c.rawCache||(c.rawCache={}),typeof c.rawCache[l]!="undefined")return c.rawCache[l];if(l==="before"||l==="after")return this.beforeAfter(i,l);{let n="raw"+t(l);this[n]?u=this[n](c,i):c.walk(d=>{if(u=d.raws[a],typeof u!="undefined")return!1})}return typeof u=="undefined"&&(u=e[l]),c.rawCache[l]=u,u}rawBeforeClose(i){let a;return i.walk(l=>{if(l.nodes&&l.nodes.length>0&&typeof l.raws.after!="undefined")return a=l.raws.after,a.includes(`
`)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawBeforeComment(i,a){let l;return i.walkComments(u=>{if(typeof u.raws.before!="undefined")return l=u.raws.before,l.includes(`
`)&&(l=l.replace(/[^\n]+$/,"")),!1}),typeof l=="undefined"?l=this.raw(a,null,"beforeDecl"):l&&(l=l.replace(/\S/g,"")),l}rawBeforeDecl(i,a){let l;return i.walkDecls(u=>{if(typeof u.raws.before!="undefined")return l=u.raws.before,l.includes(`
`)&&(l=l.replace(/[^\n]+$/,"")),!1}),typeof l=="undefined"?l=this.raw(a,null,"beforeRule"):l&&(l=l.replace(/\S/g,"")),l}rawBeforeOpen(i){let a;return i.walk(l=>{if(l.type!=="decl"&&(a=l.raws.between,typeof a!="undefined"))return!1}),a}rawBeforeRule(i){let a;return i.walk(l=>{if(l.nodes&&(l.parent!==i||i.first!==l)&&typeof l.raws.before!="undefined")return a=l.raws.before,a.includes(`
`)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawColon(i){let a;return i.walkDecls(l=>{if(typeof l.raws.between!="undefined")return a=l.raws.between.replace(/[^\s:]/g,""),!1}),a}rawEmptyBody(i){let a;return i.walk(l=>{if(l.nodes&&l.nodes.length===0&&(a=l.raws.after,typeof a!="undefined"))return!1}),a}rawIndent(i){if(i.raws.indent)return i.raws.indent;let a;return i.walk(l=>{let u=l.parent;if(u&&u!==i&&u.parent&&u.parent===i&&typeof l.raws.before!="undefined"){let o=l.raws.before.split(`
`);return a=o[o.length-1],a=a.replace(/\S/g,""),!1}}),a}rawSemicolon(i){let a;return i.walk(l=>{if(l.nodes&&l.nodes.length&&l.last.type==="decl"&&(a=l.raws.semicolon,typeof a!="undefined"))return!1}),a}rawValue(i,a){let l=i[a],u=i.raws[a];return u&&u.value===l?u.raw:l}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 Qt=r,r.default=r,Qt}var Zt,si;function kt(){if(si)return Zt;si=1;let e=$n();function t(r,s){new e(s).stringify(r)}return Zt=t,t.default=t,Zt}var Kt,ii;function Pt(){if(ii)return Kt;ii=1;let{isClean:e,my:t}=ds(),r=fs(),s=$n(),i=kt();function a(u,o){let c=new u.constructor;for(let n in u){if(!Object.prototype.hasOwnProperty.call(u,n)||n==="proxyCache")continue;let d=u[n],h=typeof d;n==="parent"&&h==="object"?o&&(c[n]=o):n==="source"?c[n]=d:Array.isArray(d)?c[n]=d.map(f=>a(f,c)):(h==="object"&&d!==null&&(d=a(d)),c[n]=d)}return c}class l{constructor(o={}){this.raws={},this[e]=!1,this[t]=!0;for(let c in o)if(c==="nodes"){this.nodes=[];for(let n of o[c])typeof n.clone=="function"?this.append(n.clone()):this.append(n)}else this[c]=o[c]}addToError(o){if(o.postcssNode=this,o.stack&&this.source&&/\n\s{4}at /.test(o.stack)){let c=this.source;o.stack=o.stack.replace(/\n\s{4}at /,`$&${c.input.from}:${c.start.line}:${c.start.column}$&`)}return o}after(o){return this.parent.insertAfter(this,o),this}assign(o={}){for(let c in o)this[c]=o[c];return this}before(o){return this.parent.insertBefore(this,o),this}cleanRaws(o){delete this.raws.before,delete this.raws.after,o||delete this.raws.between}clone(o={}){let c=a(this);for(let n in o)c[n]=o[n];return c}cloneAfter(o={}){let c=this.clone(o);return this.parent.insertAfter(this,c),c}cloneBefore(o={}){let c=this.clone(o);return this.parent.insertBefore(this,c),c}error(o,c={}){if(this.source){let{end:n,start:d}=this.rangeBy(c);return this.source.input.error(o,{column:d.column,line:d.line},{column:n.column,line:n.line},c)}return new r(o)}getProxyProcessor(){return{get(o,c){return c==="proxyOf"?o:c==="root"?()=>o.root().toProxy():o[c]},set(o,c,n){return o[c]===n||(o[c]=n,(c==="prop"||c==="value"||c==="name"||c==="params"||c==="important"||c==="text")&&o.markDirty()),!0}}}markDirty(){if(this[e]){this[e]=!1;let o=this;for(;o=o.parent;)o[e]=!1}}next(){if(!this.parent)return;let o=this.parent.index(this);return this.parent.nodes[o+1]}positionBy(o,c){let n=this.source.start;if(o.index)n=this.positionInside(o.index,c);else if(o.word){c=this.toString();let d=c.indexOf(o.word);d!==-1&&(n=this.positionInside(d,c))}return n}positionInside(o,c){let n=c||this.toString(),d=this.source.start.column,h=this.source.start.line;for(let f=0;f<o;f++)n[f]===`
`?(d=1,h+=1):d+=1;return{column:d,line:h}}prev(){if(!this.parent)return;let o=this.parent.index(this);return this.parent.nodes[o-1]}rangeBy(o){let c={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:c.column+1,line:c.line};if(o.word){let d=this.toString(),h=d.indexOf(o.word);h!==-1&&(c=this.positionInside(h,d),n=this.positionInside(h+o.word.length,d))}else o.start?c={column:o.start.column,line:o.start.line}:o.index&&(c=this.positionInside(o.index)),o.end?n={column:o.end.column,line:o.end.line}:typeof o.endIndex=="number"?n=this.positionInside(o.endIndex):o.index&&(n=this.positionInside(o.index+1));return(n.line<c.line||n.line===c.line&&n.column<=c.column)&&(n={column:c.column+1,line:c.line}),{end:n,start:c}}raw(o,c){return new s().raw(this,o,c)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...o){if(this.parent){let c=this,n=!1;for(let d of o)d===this?n=!0:n?(this.parent.insertAfter(c,d),c=d):this.parent.insertBefore(c,d);n||this.remove()}return this}root(){let o=this;for(;o.parent&&o.parent.type!=="document";)o=o.parent;return o}toJSON(o,c){let n={},d=c==null;c=c||new Map;let h=0;for(let f in this){if(!Object.prototype.hasOwnProperty.call(this,f)||f==="parent"||f==="proxyCache")continue;let m=this[f];if(Array.isArray(m))n[f]=m.map(p=>typeof p=="object"&&p.toJSON?p.toJSON(null,c):p);else if(typeof m=="object"&&m.toJSON)n[f]=m.toJSON(null,c);else if(f==="source"){let p=c.get(m.input);p==null&&(p=h,c.set(m.input,h),h++),n[f]={end:m.end,inputId:p,start:m.start}}else n[f]=m}return d&&(n.inputs=[...c.keys()].map(f=>f.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(o=i){o.stringify&&(o=o.stringify);let c="";return o(this,n=>{c+=n}),c}warn(o,c,n){let d={node:this};for(let h in n)d[h]=n[h];return o.warn(c,d)}get proxyOf(){return this}}return Kt=l,l.default=l,Kt}var er,ni;function Lt(){if(ni)return er;ni=1;let e=Pt();class t extends e{constructor(s){s&&typeof s.value!="undefined"&&typeof s.value!="string"&&(s=se(P({},s),{value:String(s.value)})),super(s),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return er=t,t.default=t,er}var tr,oi;function Ua(){if(oi)return tr;oi=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return tr={nanoid:(s=21)=>{let i="",a=s;for(;a--;)i+=e[Math.random()*64|0];return i},customAlphabet:(s,i=21)=>(a=i)=>{let l="",u=a;for(;u--;)l+=s[Math.random()*s.length|0];return l}},tr}var rr,ai;function Wn(){if(ai)return rr;ai=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=me,{existsSync:r,readFileSync:s}=me,{dirname:i,join:a}=me;function l(o){return Buffer?Buffer.from(o,"base64").toString():window.atob(o)}class u{constructor(c,n){if(n.map===!1)return;this.loadAnnotation(c),this.inline=this.startWith(this.annotation,"data:");let d=n.map?n.map.prev:void 0,h=this.loadMap(n.from,d);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=i(this.mapFile)),h&&(this.text=h)}consumer(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}decodeInline(c){let n=/^data:application\/json;charset=utf-?8;base64,/,d=/^data:application\/json;base64,/,h=/^data:application\/json;charset=utf-?8,/,f=/^data:application\/json,/;if(h.test(c)||f.test(c))return decodeURIComponent(c.substr(RegExp.lastMatch.length));if(n.test(c)||d.test(c))return l(c.substr(RegExp.lastMatch.length));let m=c.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+m)}getAnnotationURL(c){return c.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(c){return typeof c!="object"?!1:typeof c.mappings=="string"||typeof c._mappings=="string"||Array.isArray(c.sections)}loadAnnotation(c){let n=c.match(/\/\*\s*# sourceMappingURL=/gm);if(!n)return;let d=c.lastIndexOf(n.pop()),h=c.indexOf("*/",d);d>-1&&h>-1&&(this.annotation=this.getAnnotationURL(c.substring(d,h)))}loadFile(c){if(this.root=i(c),r(c))return this.mapFile=c,s(c,"utf-8").toString().trim()}loadMap(c,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let d=n(c);if(d){let h=this.loadFile(d);if(!h)throw new Error("Unable to load previous source map: "+d.toString());return h}}else{if(n instanceof e)return t.fromSourceMap(n).toString();if(n instanceof t)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 d=this.annotation;return c&&(d=a(i(c),d)),this.loadFile(d)}}}startWith(c,n){return c?c.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return rr=u,u.default=u,rr}var sr,li;function Ft(){if(li)return sr;li=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=me,{fileURLToPath:r,pathToFileURL:s}=me,{isAbsolute:i,resolve:a}=me,{nanoid:l}=Ua(),u=me,o=fs(),c=Wn(),n=Symbol("fromOffsetCache"),d=!!(e&&t),h=!!(a&&i);class f{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,g.from&&(!h||/^\w+:\/\//.test(g.from)||i(g.from)?this.file=g.from:this.file=a(g.from)),h&&d){let b=new c(this.css,g);if(b.text){this.map=b;let y=b.consumer().file;!this.file&&y&&(this.file=this.mapResolve(y))}}this.file||(this.id="<input css "+l(6)+">"),this.map&&(this.map.file=this.from)}error(p,g,b,y={}){let w,C,v;if(g&&typeof g=="object"){let E=g,R=b;if(typeof E.offset=="number"){let I=this.fromOffset(E.offset);g=I.line,b=I.col}else g=E.line,b=E.column;if(typeof R.offset=="number"){let I=this.fromOffset(R.offset);C=I.line,v=I.col}else C=R.line,v=R.column}else if(!b){let E=this.fromOffset(g);g=E.line,b=E.col}let S=this.origin(g,b,C,v);return S?w=new o(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):w=new o(p,C===void 0?g:{column:b,line:g},C===void 0?b:{column:v,line:C},this.css,this.file,y.plugin),w.input={column:b,endColumn:v,endLine:C,line:g,source:this.css},this.file&&(s&&(w.input.url=s(this.file).toString()),w.input.file=this.file),w}fromOffset(p){let g,b;if(this[n])b=this[n];else{let w=this.css.split(`
`);b=new Array(w.length);let C=0;for(let v=0,S=w.length;v<S;v++)b[v]=C,C+=w[v].length+1;this[n]=b}g=b[b.length-1];let y=0;if(p>=g)y=b.length-1;else{let w=b.length-2,C;for(;y<w;)if(C=y+(w-y>>1),p<b[C])w=C-1;else if(p>=b[C+1])y=C+1;else{y=C;break}}return{col:p-b[y]+1,line:y+1}}mapResolve(p){return/^\w+:\/\//.test(p)?p:a(this.map.consumer().sourceRoot||this.map.root||".",p)}origin(p,g,b,y){if(!this.map)return!1;let w=this.map.consumer(),C=w.originalPositionFor({column:g,line:p});if(!C.source)return!1;let v;typeof b=="number"&&(v=w.originalPositionFor({column:y,line:b}));let S;i(C.source)?S=s(C.source):S=new URL(C.source,this.map.consumer().sourceRoot||s(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(r)E.file=r(S);else throw new Error("file: protocol is not available in this PostCSS build");let R=w.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=P({},this.map),p.map.consumerCache&&(p.map.consumerCache=void 0)),p}get from(){return this.file||this.id}}return sr=f,f.default=f,u&&u.registerInput&&u.registerInput(f),sr}var ir,ui;function zn(){if(ui)return ir;ui=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=me,{dirname:r,relative:s,resolve:i,sep:a}=me,{pathToFileURL:l}=me,u=Ft(),o=!!(e&&t),c=!!(r&&i&&s&&a);class n{constructor(h,f,m,p){this.stringify=h,this.mapOpts=m.map||{},this.root=f,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 h;this.isInline()?h="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?h=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?h=this.mapOpts.annotation(this.opts.to,this.root):h=this.outputFile()+".map";let f=`
`;this.css.includes(`\r
`)&&(f=`\r
`),this.css+=f+"/*# sourceMappingURL="+h+" */"}applyPrevMaps(){for(let h of this.previous()){let f=this.toUrl(this.path(h.file)),m=h.root||r(h.file),p;this.mapOpts.sourcesContent===!1?(p=new e(h.text),p.sourcesContent&&(p.sourcesContent=null)):p=h.consumer(),this.map.applySourceMap(p,f,this.toUrl(this.path(m)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let h;for(let f=this.root.nodes.length-1;f>=0;f--)h=this.root.nodes[f],h.type==="comment"&&h.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(f)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),c&&o&&this.isMap())return this.generateMap();{let h="";return this.stringify(this.root,f=>{h+=f}),[h]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let h=this.previous()[0].consumer();h.file=this.outputFile(),this.map=t.fromSourceMap(h,{ignoreInvalidMapping:!0})}else this.map=new t({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 t({file:this.outputFile(),ignoreInvalidMapping:!0});let h=1,f=1,m="<no source>",p={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,b;this.stringify(this.root,(y,w,C)=>{if(this.css+=y,w&&C!=="end"&&(p.generated.line=h,p.generated.column=f-1,w.source&&w.source.start?(p.source=this.sourcePath(w),p.original.line=w.source.start.line,p.original.column=w.source.start.column-1,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,this.map.addMapping(p))),g=y.match(/\n/g),g?(h+=g.length,b=y.lastIndexOf(`
`),f=y.length-b):f+=y.length,w&&C!=="start"){let v=w.parent||{raws:{}};(!(w.type==="decl"||w.type==="atrule"&&!w.nodes)||w!==v.last||v.raws.semicolon)&&(w.source&&w.source.end?(p.source=this.sourcePath(w),p.original.line=w.source.end.line,p.original.column=w.source.end.column-1,p.generated.line=h,p.generated.column=f-2,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,p.generated.line=h,p.generated.column=f-1,this.map.addMapping(p)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(h=>h.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let h=this.mapOpts.annotation;return typeof h!="undefined"&&h!==!0?!1:this.previous().length?this.previous().some(f=>f.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(h=>h.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(h){if(this.mapOpts.absolute||h.charCodeAt(0)===60||/^\w+:\/\//.test(h))return h;let f=this.memoizedPaths.get(h);if(f)return f;let m=this.opts.to?r(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=r(i(m,this.mapOpts.annotation)));let p=s(m,h);return this.memoizedPaths.set(h,p),p}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(h=>{if(h.source&&h.source.input.map){let f=h.source.input.map;this.previousMaps.includes(f)||this.previousMaps.push(f)}});else{let h=new u(this.originalCSS,this.opts);h.map&&this.previousMaps.push(h.map)}return this.previousMaps}setSourcesContent(){let h={};if(this.root)this.root.walk(f=>{if(f.source){let m=f.source.input.from;if(m&&!h[m]){h[m]=!0;let p=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(p,f.source.input.css)}}});else if(this.css){let f=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(f,this.css)}}sourcePath(h){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(h.source.input.from):this.toUrl(this.path(h.source.input.from))}toBase64(h){return Buffer?Buffer.from(h).toString("base64"):window.btoa(unescape(encodeURIComponent(h)))}toFileUrl(h){let f=this.memoizedFileURLs.get(h);if(f)return f;if(l){let m=l(h).toString();return this.memoizedFileURLs.set(h,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(h){let f=this.memoizedURLs.get(h);if(f)return f;a==="\\"&&(h=h.replace(/\\/g,"/"));let m=encodeURI(h).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(h,m),m}}return ir=n,ir}var nr,ci;function Ut(){if(ci)return nr;ci=1;let e=Pt();class t extends e{constructor(s){super(s),this.type="comment"}}return nr=t,t.default=t,nr}var or,hi;function Pe(){if(hi)return or;hi=1;let{isClean:e,my:t}=ds(),r=Lt(),s=Ut(),i=Pt(),a,l,u,o;function c(h){return h.map(f=>(f.nodes&&(f.nodes=c(f.nodes)),delete f.source,f))}function n(h){if(h[e]=!1,h.proxyOf.nodes)for(let f of h.proxyOf.nodes)n(f)}class d extends i{append(...f){for(let m of f){let p=this.normalize(m,this.last);for(let g of p)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(f){if(super.cleanRaws(f),this.nodes)for(let m of this.nodes)m.cleanRaws(f)}each(f){if(!this.proxyOf.nodes)return;let m=this.getIterator(),p,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(p=this.indexes[m],g=f(this.proxyOf.nodes[p],p),g!==!1);)this.indexes[m]+=1;return delete this.indexes[m],g}every(f){return this.nodes.every(f)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let f=this.lastEach;return this.indexes[f]=0,f}getProxyProcessor(){return{get(f,m){return m==="proxyOf"?f:f[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...p)=>f[m](...p.map(g=>typeof g=="function"?(b,y)=>g(b.toProxy(),y):g)):m==="every"||m==="some"?p=>f[m]((g,...b)=>p(g.toProxy(),...b)):m==="root"?()=>f.root().toProxy():m==="nodes"?f.nodes.map(p=>p.toProxy()):m==="first"||m==="last"?f[m].toProxy():f[m]:f[m]},set(f,m,p){return f[m]===p||(f[m]=p,(m==="name"||m==="params"||m==="selector")&&f.markDirty()),!0}}}index(f){return typeof f=="number"?f:(f.proxyOf&&(f=f.proxyOf),this.proxyOf.nodes.indexOf(f))}insertAfter(f,m){let p=this.index(f),g=this.normalize(m,this.proxyOf.nodes[p]).reverse();p=this.index(f);for(let y of g)this.proxyOf.nodes.splice(p+1,0,y);let b;for(let y in this.indexes)b=this.indexes[y],p<b&&(this.indexes[y]=b+g.length);return this.markDirty(),this}insertBefore(f,m){let p=this.index(f),g=p===0?"prepend":!1,b=this.normalize(m,this.proxyOf.nodes[p],g).reverse();p=this.index(f);for(let w of b)this.proxyOf.nodes.splice(p,0,w);let y;for(let w in this.indexes)y=this.indexes[w],p<=y&&(this.indexes[w]=y+b.length);return this.markDirty(),this}normalize(f,m){if(typeof f=="string")f=c(a(f).nodes);else if(typeof f=="undefined")f=[];else if(Array.isArray(f)){f=f.slice(0);for(let g of f)g.parent&&g.parent.removeChild(g,"ignore")}else if(f.type==="root"&&this.type!=="document"){f=f.nodes.slice(0);for(let g of f)g.parent&&g.parent.removeChild(g,"ignore")}else if(f.type)f=[f];else if(f.prop){if(typeof f.value=="undefined")throw new Error("Value field is missed in node creation");typeof f.value!="string"&&(f.value=String(f.value)),f=[new r(f)]}else if(f.selector)f=[new l(f)];else if(f.name)f=[new u(f)];else if(f.text)f=[new s(f)];else throw new Error("Unknown node type in node creation");return f.map(g=>(g[t]||d.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[e]&&n(g),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(...f){f=f.reverse();for(let m of f){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(f){return f.parent=this,this.proxyOf.nodes.push(f),this}removeAll(){for(let f of this.proxyOf.nodes)f.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(f){f=this.index(f),this.proxyOf.nodes[f].parent=void 0,this.proxyOf.nodes.splice(f,1);let m;for(let p in this.indexes)m=this.indexes[p],m>=f&&(this.indexes[p]=m-1);return this.markDirty(),this}replaceValues(f,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(f,p))}),this.markDirty(),this}some(f){return this.nodes.some(f)}walk(f){return this.each((