@appsurify-testmap/rrweb-record 2.1.0-alpha.7 → 2.1.1-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/rrweb-record.cjs +574 -149
- package/dist/rrweb-record.cjs.map +1 -1
- package/dist/rrweb-record.js +574 -149
- package/dist/rrweb-record.js.map +1 -1
- package/dist/rrweb-record.umd.cjs +577 -151
- package/dist/rrweb-record.umd.cjs.map +3 -3
- package/dist/rrweb-record.umd.min.cjs +26 -26
- package/dist/rrweb-record.umd.min.cjs.map +3 -3
- package/package.json +4 -4
|
@@ -11,59 +11,59 @@
|
|
|
11
11
|
}(this, () => {
|
|
12
12
|
var exports = {};
|
|
13
13
|
var module = { exports };
|
|
14
|
-
"use strict";var ea=Object.defineProperty,ta=Object.defineProperties;var ra=Object.getOwnPropertyDescriptors;var mt=Object.getOwnPropertySymbols;var Ks=Object.prototype.hasOwnProperty,Qs=Object.prototype.propertyIsEnumerable;var Xs=(s,e,t)=>e in s?ea(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,R=(s,e)=>{for(var t in e||(e={}))Ks.call(e,t)&&Xs(s,t,e[t]);if(mt)for(var t of mt(e))Qs.call(e,t)&&Xs(s,t,e[t]);return s},q=(s,e)=>ta(s,ra(e));var Re=(s,e)=>{var t={};for(var r in s)Ks.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&mt)for(var r of mt(s))e.indexOf(r)<0&&Qs.call(s,r)&&(t[r]=s[r]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var sa=Object.defineProperty,ia=(s,e,t)=>e in s?sa(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,w=(s,e,t)=>ia(s,typeof e!="symbol"?e+"":e,t),qs,na=Object.defineProperty,oa=(s,e,t)=>e in s?na(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,ei=(s,e,t)=>oa(s,typeof e!="symbol"?e+"":e,t),Y=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(Y||{});const ti={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ri={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},gt={},aa=()=>!!globalThis.Zone;function Cs(s){if(gt[s])return gt[s];const e=globalThis[s],t=e.prototype,r=s in ti?ti[s]:void 0,i=!!(r&&r.every(l=>{var a,u;return!!((u=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&u.toString().includes("[native code]"))})),n=s in ri?ri[s]:void 0,o=!!(n&&n.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(i&&o&&!aa())return gt[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const a=l.contentWindow;if(!a)return e.prototype;const u=a[s].prototype;return document.body.removeChild(l),u?gt[s]=u:t}catch(l){return t}}const Ir={};function be(s,e,t){var r;const i=`${s}.${String(t)}`;if(Ir[i])return Ir[i].call(e);const n=Cs(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(Ir[i]=o,o.call(e)):e[t]}const xr={};function en(s,e,t){const r=`${s}.${String(t)}`;if(xr[r])return xr[r].bind(e);const n=Cs(s)[t];return typeof n!="function"?e[t]:(xr[r]=n,n.bind(e))}function la(s){return be("Node",s,"childNodes")}function ua(s){return be("Node",s,"parentNode")}function ca(s){return be("Node",s,"parentElement")}function ha(s){return be("Node",s,"textContent")}function fa(s,e){return en("Node",s,"contains")(e)}function pa(s){return en("Node",s,"getRootNode")()}function da(s){return!s||!("host"in s)?null:be("ShadowRoot",s,"host")}function ma(s){return s.styleSheets}function ga(s){return!s||!("shadowRoot"in s)?null:be("Element",s,"shadowRoot")}function ya(s,e){return be("Element",s,"querySelector")(e)}function wa(s,e){return be("Element",s,"querySelectorAll")(e)}function ba(){return Cs("MutationObserver").constructor}function Sa(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch(r){return()=>{}}}const Z={childNodes:la,parentNode:ua,parentElement:ca,textContent:ha,contains:fa,getRootNode:pa,host:da,styleSheets:ma,shadowRoot:ga,querySelector:ya,querySelectorAll:wa,mutationObserver:ba,patch:Sa};function tn(s){return s.nodeType===s.ELEMENT_NODE}function Ze(s){const e=s&&"host"in s&&"mode"in s&&Z.host(s)||null;return!!(e&&"shadowRoot"in e&&Z.shadowRoot(e)===s)}function Je(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function Ca(s){return s.includes(" background-clip: text;")&&!s.includes(" -webkit-background-clip: text;")&&(s=s.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),s}function va(s){const{cssText:e}=s;if(e.split('"').length<3)return e;const t=["@import",`url(${JSON.stringify(s.href)})`];return s.layerName===""?t.push("layer"):s.layerName&&t.push(`layer(${s.layerName})`),s.supportsText&&t.push(`supports(${s.supportsText})`),s.media.length&&t.push(s.media.mediaText),t.join(" ")+";"}function Ur(s){try{const e=s.rules||s.cssRules;if(!e)return null;let t=s.href;!t&&s.ownerNode&&s.ownerNode.ownerDocument&&(t=s.ownerNode.ownerDocument.location.href);const r=Array.from(e,i=>rn(i,t)).join("");return Ca(r)}catch(e){return null}}function rn(s,e){if(xa(s)){let t;try{t=Ur(s.styleSheet)||va(s)}catch(r){t=s.cssText}return s.styleSheet.href?Zt(t,s.styleSheet.href):t}else{let t=s.cssText;return Oa(s)&&s.selectorText.includes(":")&&(t=Ia(t)),e?Zt(t,e):t}}function Ia(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function xa(s){return"styleSheet"in s}function Oa(s){return"selectorText"in s}class sn{constructor(){ei(this,"idNodeMap",new Map),ei(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;const r=(t=this.getMeta(e))==null?void 0:t.id;return r!=null?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Ea(){return new sn}function Ht({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:n}){let o=i||"";const l=r&&xe(r);return(e[t.toLowerCase()]||l&&e[l])&&(n?o=n(o,s):o="*".repeat(o.length)),o}function xe(s){return s.toLowerCase()}const si="__rrweb_original__";function Aa(s){const e=s.getContext("2d");if(!e)return!0;const t=50;for(let r=0;r<s.width;r+=t)for(let i=0;i<s.height;i+=t){const n=e.getImageData,o=si in n?n[si]:n;if(new Uint32Array(o.call(e,r,i,Math.min(t,s.width-r),Math.min(t,s.height-i)).data.buffer).some(a=>a!==0))return!1}return!0}function Yt(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?xe(e):null}function nn(s,e){var n;let t;try{t=new URL(s,e!=null?e:window.location.href)}catch(o){return null}const r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return(n=i==null?void 0:i[1])!=null?n:null}function Ra(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const Ma=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,$a=/^(?:[a-z+]+:)?\/\//i,Na=/^www\..*/i,ka=/^(data:)([^,]*),(.*)/i;function Zt(s,e){return(s||"").replace(Ma,(t,r,i,n,o,l)=>{const a=i||o||l,u=r||n||"";if(!a)return t;if($a.test(a)||Na.test(a))return`url(${u}${a}${u})`;if(ka.test(a))return`url(${u}${a}${u})`;if(a[0]==="/")return`url(${u}${Ra(e)+a}${u})`;const c=e.split("/"),h=a.split("/");c.pop();for(const p of h)p!=="."&&(p===".."?c.pop():c.push(p));return`url(${u}${c.join("/")}${u})`})}function yt(s,e=!1){return e?s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Pa(s,e,t=!1){const r=Array.from(e.childNodes),i=[];let n=0;if(r.length>1&&s&&typeof s=="string"){let o=yt(s,t);const l=o.length/s.length;for(let a=1;a<r.length;a++)if(r[a].textContent&&typeof r[a].textContent=="string"){const u=yt(r[a].textContent,t),c=100;let h=3;for(;h<u.length&&(u[h].match(/[a-zA-Z0-9]/)||u.indexOf(u.substring(0,h),1)!==-1);h++);for(;h<u.length;h++){let p=u.substring(0,h),g=o.split(p),m=-1;if(g.length===2)m=g[0].length;else if(g.length>2&&g[0]===""&&r[a-1].textContent!=="")m=o.indexOf(p,1);else if(g.length===1){if(p=p.substring(0,p.length-1),g=o.split(p),g.length<=1)return i.push(s),i;h=c+1}else h===u.length-1&&(m=o.indexOf(p));if(g.length>=2&&h>c){const f=r[a-1].textContent;if(f&&typeof f=="string"){const d=yt(f).length;m=o.indexOf(p,d)}m===-1&&(m=g[0].length)}if(m!==-1){let f=Math.floor(m/l);for(;f>0&&f<s.length;){if(n+=1,n>50*r.length)return i.push(s),i;const d=yt(s.substring(0,f),t);if(d.length===m){i.push(s.substring(0,f)),s=s.substring(f),o=o.substring(m);break}else d.length<m?f+=Math.max(1,Math.floor((m-d.length)/l)):f-=Math.max(1,Math.floor((d.length-m)*l))}break}}}}return i.push(s),i}function Ta(s,e){return Pa(s,e).join("/* rr_split */")}function Ye(s){if(s.nodeType===Node.DOCUMENT_NODE)return"/";if(s.nodeType===Node.DOCUMENT_TYPE_NODE)return"/html/doctype";if(s.nodeType===Node.ELEMENT_NODE){const e=s;if(e.id)return`//*[@id="${e.id}"]`;if(e.tagName&&e.tagName.toLowerCase()==="html")return"/html";if(e===document.head)return"/html/head";if(e===document.body)return"/html/body";const t=e.parentNode;if(!t)return"";const r=Array.from(t.children).filter(n=>n.tagName===e.tagName),i=r.length>1?`[${r.indexOf(e)+1}]`:"";return`${Ye(t)}/${e.tagName.toLowerCase()}${i}`}if(s.nodeType===Node.TEXT_NODE){const e=s.parentNode;if(!e)return"";const t=Array.from(e.childNodes).filter(i=>i.nodeType===Node.TEXT_NODE),r=t.length>1?`[${t.indexOf(s)+1}]`:"";return`${Ye(e)}/text()${r}`}if(s.nodeType===Node.CDATA_SECTION_NODE){const e=s.parentNode;if(!e)return"";const t=Array.from(e.childNodes).filter(i=>i.nodeType===Node.CDATA_SECTION_NODE),r=t.length>1?`[${t.indexOf(s)+1}]`:"";return`${Ye(e)}/text()${r}`}if(s.nodeType===Node.COMMENT_NODE){const e=s.parentNode;if(!e)return"";const t=Array.from(e.childNodes).filter(i=>i.nodeType===Node.COMMENT_NODE),r=t.length>1?`[${t.indexOf(s)+1}]`:"";return`${Ye(e)}/comment()${r}`}return""}function Da(s){var e;const t=Z.parentNode(s),r=t&&t;return!r||!on(r)?!1:((e=s.textContent)==null?void 0:e.trim())!==""}function on(s){var l;var e;const t=(l=(e=s.ownerDocument)==null?void 0:e.defaultView)!=null?l:null,r=t?t.getComputedStyle(s):null,i=r!=null&&r.display!=="none"&&r.visibility!=="hidden"&&parseFloat(r.opacity)!==0,n=s.getBoundingClientRect();return i&&La(n)}function La(s,e=window){var a,u,c,h;var t,r,i,n;const o=(u=(a=e==null?void 0:e.innerHeight)!=null?a:(r=(t=e==null?void 0:e.document)==null?void 0:t.documentElement)==null?void 0:r.clientHeight)!=null?u:0,l=(h=(c=e==null?void 0:e.innerWidth)!=null?c:(n=(i=e==null?void 0:e.document)==null?void 0:i.documentElement)==null?void 0:n.clientWidth)!=null?h:0;return s.width>0&&s.height>0&&s.top>=0&&s.left>=0&&s.bottom<=o&&s.right<=l}const _a=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],Fa=["a","button","input","select","textarea","label","details","summary","dialog","video","audio"],Ua=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],vs=new WeakSet,Ba=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(s,e,t){if(Ba.call(this,s,e,t),this instanceof Element){const r=s.toLowerCase();_a.includes(r)&&vs.add(this)}};const Wa=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(s,e,t){Wa.call(this,s,e,t)};function za(s){return s instanceof Element&&vs.has(s)}function an(s){if(s.nodeType===Node.ELEMENT_NODE){const e=s,t=e.tagName.toLowerCase();if(Fa.includes(t))return!0;const r=e.hasAttribute("tabindex")&&e.getAttribute("tabindex")!=="-1",i=["button","link","checkbox","switch","menuitem"].includes(e.getAttribute("role")||"");return za(e)||r||i||e instanceof HTMLAnchorElement&&e.hasAttribute("href")||e instanceof HTMLButtonElement&&!e.disabled}return!1}function ii(){document.querySelectorAll("*").forEach(e=>{Ua.forEach(t=>{e.hasAttribute(t)&&vs.add(e)})})}document.readyState==="complete"||document.readyState==="interactive"?ii():document.addEventListener("DOMContentLoaded",ii);let Va=1;const Ga=new RegExp("[^a-z0-9-_:]"),Ke=-2;function ln(){return Va++}function ja(s){if(s instanceof HTMLFormElement)return"form";const e=xe(s.tagName);return Ga.test(e)?"div":e}let Me,ni;const Ha=/^[^ \t\n\r\u000c]+/,Ya=/^[, \t\n\r\u000c]+/;function Za(s,e){if(e.trim()==="")return e;let t=0;function r(n){let o;const l=n.exec(e.substring(t));return l?(o=l[0],t+=o.length,o):""}const i=[];for(;r(Ya),!(t>=e.length);){let n=r(Ha);if(n.slice(-1)===",")n=ke(s,n.substring(0,n.length-1)),i.push(n);else{let o="";n=ke(s,n);let l=!1;for(;;){const a=e.charAt(t);if(a===""){i.push((n+o).trim());break}else if(l)a===")"&&(l=!1);else if(a===","){t+=1,i.push((n+o).trim());break}else a==="("&&(l=!0);o+=a,t+=1}}}return i.join(", ")}const oi=new WeakMap;function ke(s,e){return!e||e.trim()===""?e:Is(s,e)}function Ja(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function Is(s,e){let t=oi.get(s);if(t||(t=s.createElement("a"),oi.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function un(s,e,t,r){return r&&(t==="src"||t==="href"&&!(e==="use"&&r[0]==="#")||t==="xlink:href"&&r[0]!=="#"||t==="background"&&(e==="table"||e==="td"||e==="th")?ke(s,r):t==="srcset"?Za(s,r):t==="style"?Zt(r,Is(s)):e==="object"&&t==="data"?ke(s,r):r)}function cn(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function Xa(s,e){return typeof e=="string"?s.includes(e):e.test(s)}function hn(s,e){return typeof e=="string"?s.includes(e):e.test(s)}function Ka(s,e,t){try{if(typeof e=="string"){if(s.classList.contains(e))return!0}else for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}if(t)return s.matches(t)}catch(r){}return!1}function Jt(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?Jt(Z.parentNode(s),e,t):!1;for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}return t?Jt(Z.parentNode(s),e,t):!1}function fn(s,e,t,r){let i;if(tn(s)){if(i=s,!Z.childNodes(i).length)return!1}else{if(Z.parentElement(s)===null)return!1;i=Z.parentElement(s)}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(Jt(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch(n){}return!1}function Qa(s,e,t){const r=s.contentWindow;if(!r)return;let i=!1,n;try{n=r.document.readyState}catch(l){return}if(n!=="complete"){const l=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener("load",()=>{clearTimeout(l),i=!0,e()});return}const o="about:blank";if(r.location.href!==o||s.src===o||s.src==="")return setTimeout(e,0),s.addEventListener("load",e);s.addEventListener("load",e)}function qa(s,e,t){let r=!1,i;try{i=s.sheet}catch(o){return}if(i)return;const n=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener("load",()=>{clearTimeout(n),r=!0,e()})}function el(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,excludeAttribute:o,includeAttribute:l,needsMask:a,inlineStylesheet:u,maskInputOptions:c={},maskTextFn:h,maskInputFn:p,dataURLOptions:g={},inlineImages:m,recordCanvas:f,keepIframeSrcFn:d,newlyAddedElement:C=!1,cssCaptured:S=!1}=e,y=tl(t,r),v=Ye(s);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:Y.Document,childNodes:[],xPath:v,compatMode:s.compatMode}:{type:Y.Document,childNodes:[],xPath:v};case s.DOCUMENT_TYPE_NODE:return{type:Y.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:y,xPath:v};case s.ELEMENT_NODE:return sl(s,{doc:t,blockClass:i,blockSelector:n,excludeAttribute:o,includeAttribute:l,inlineStylesheet:u,maskInputOptions:c,maskInputFn:p,dataURLOptions:g,inlineImages:m,recordCanvas:f,keepIframeSrcFn:d,newlyAddedElement:C,rootId:y,xPath:v});case s.TEXT_NODE:return rl(s,{doc:t,needsMask:a,maskTextFn:h,rootId:y,cssCaptured:S,xPath:v});case s.CDATA_SECTION_NODE:return{type:Y.CDATA,textContent:"",rootId:y,xPath:v};case s.COMMENT_NODE:return{type:Y.Comment,textContent:Z.textContent(s)||"",rootId:y,xPath:v};default:return!1}}function tl(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}function rl(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:n,xPath:o}=e,l=Z.parentNode(s),a=l&&l.tagName;let u="";const c=a==="STYLE"?!0:void 0,h=a==="SCRIPT"?!0:void 0;h?u="SCRIPT_PLACEHOLDER":n||(u=Z.textContent(s),c&&u&&(u=Zt(u,Is(e.doc)))),!c&&!h&&u&&t&&(u=r?r(u,Z.parentElement(s)):u.replace(/[\S]/g,"*"));const p=Da(s),g=an(s);return{type:Y.Text,textContent:u||"",rootId:i,isVisible:p,isInteractive:g,xPath:o}}function sl(s,e){const{doc:t,blockClass:r,blockSelector:i,excludeAttribute:n,includeAttribute:o,inlineStylesheet:l,maskInputOptions:a={},maskInputFn:u,dataURLOptions:c={},inlineImages:h,recordCanvas:p,keepIframeSrcFn:g,newlyAddedElement:m=!1,rootId:f,xPath:d}=e,C=Ka(s,r,i),S=ja(s);let y={};const v=s.attributes.length;for(let b=0;b<v;b++){const x=s.attributes[b];hn(x.name,n)&&!Xa(x.name,o)||cn(S,x.name,x.value)||(y[x.name]=un(t,S,xe(x.name),x.value))}if(S==="link"&&l){const b=Array.from(t.styleSheets).find(z=>z.href===s.href);let x=null;b&&(x=Ur(b)),x&&(delete y.rel,delete y.href,y._cssText=x)}if(S==="style"&&s.sheet){let b=Ur(s.sheet);b&&(s.childNodes.length>1&&(b=Ta(b,s)),y._cssText=b)}if(S==="input"||S==="textarea"||S==="select"){const b=s.value,x=s.checked;y.type!=="radio"&&y.type!=="checkbox"&&y.type!=="submit"&&y.type!=="button"&&b?y.value=Ht({element:s,type:Yt(s),tagName:S,value:b,maskInputOptions:a,maskInputFn:u}):x&&(y.checked=x)}if(S==="option"&&(s.selected&&!a.select?y.selected=!0:delete y.selected),S==="dialog"&&s.open&&(y.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),S==="canvas"&&p){if(s.__context==="2d")Aa(s)||(y.rr_dataURL=s.toDataURL(c.type,c.quality));else if(!("__context"in s)){const b=s.toDataURL(c.type,c.quality),x=t.createElement("canvas");x.width=s.width,x.height=s.height;const z=x.toDataURL(c.type,c.quality);b!==z&&(y.rr_dataURL=b)}}if(S==="img"&&h){Me||(Me=t.createElement("canvas"),ni=Me.getContext("2d"));const b=s,x=b.currentSrc||b.getAttribute("src")||"<unknown-src>",z=b.crossOrigin,H=()=>{b.removeEventListener("load",H);try{Me.width=b.naturalWidth,Me.height=b.naturalHeight,ni.drawImage(b,0,0),y.rr_dataURL=Me.toDataURL(c.type,c.quality)}catch(te){if(b.crossOrigin!=="anonymous"){b.crossOrigin="anonymous",b.complete&&b.naturalWidth!==0?H():b.addEventListener("load",H);return}else console.warn(`Cannot inline img src=${x}! Error: ${te}`)}b.crossOrigin==="anonymous"&&(z?y.crossOrigin=z:b.removeAttribute("crossorigin"))};b.complete&&b.naturalWidth!==0?H():b.addEventListener("load",H)}if(S==="audio"||S==="video"){const b=y;b.rr_mediaState=s.paused?"paused":"played",b.rr_mediaCurrentTime=s.currentTime,b.rr_mediaPlaybackRate=s.playbackRate,b.rr_mediaMuted=s.muted,b.rr_mediaLoop=s.loop,b.rr_mediaVolume=s.volume}if(m||(s.scrollLeft&&(y.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(y.rr_scrollTop=s.scrollTop)),C){const{width:b,height:x}=s.getBoundingClientRect();y={class:y.class,rr_width:`${b}px`,rr_height:`${x}px`}}S==="iframe"&&!g(y.src)&&(s.contentDocument||(y.rr_src=y.src),delete y.src);let I;try{customElements.get(S)&&(I=!0)}catch(b){}const W=on(s),F=an(s);return{type:Y.Element,tagName:S,attributes:y,childNodes:[],isSVG:Ja(s)||void 0,needBlock:C,rootId:f,isCustom:I,isVisible:W,isInteractive:F,xPath:d}}function D(s){return s==null?"":s.toLowerCase()}function il(s,e){if(e.comment&&s.type===Y.Comment)return!0;if(s.type===Y.Element){if(e.script&&(s.tagName==="script"||s.tagName==="link"&&(s.attributes.rel==="preload"&&s.attributes.as==="script"||s.attributes.rel==="modulepreload")||s.tagName==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&nn(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(D(s.attributes.name).match(/^msapplication-tile(image|color)$/)||D(s.attributes.name)==="application-name"||D(s.attributes.rel)==="icon"||D(s.attributes.rel)==="apple-touch-icon"||D(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&D(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(D(s.attributes.property).match(/^(og|twitter|fb):/)||D(s.attributes.name).match(/^(og|twitter):/)||D(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(D(s.attributes.name)==="robots"||D(s.attributes.name)==="googlebot"||D(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(D(s.attributes.name)==="author"||D(s.attributes.name)==="generator"||D(s.attributes.name)==="framework"||D(s.attributes.name)==="publisher"||D(s.attributes.name)==="progid"||D(s.attributes.property).match(/^article:/)||D(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(D(s.attributes.name)==="google-site-verification"||D(s.attributes.name)==="yandex-verification"||D(s.attributes.name)==="csrf-token"||D(s.attributes.name)==="p:domain_verify"||D(s.attributes.name)==="verify-v1"||D(s.attributes.name)==="verification"||D(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Pe(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:l,excludeAttribute:a,includeAttribute:u,skipChild:c=!1,inlineStylesheet:h=!0,maskInputOptions:p={},maskTextFn:g,maskInputFn:m,slimDOMOptions:f,dataURLOptions:d={},inlineImages:C=!1,recordCanvas:S=!1,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:I=5e3,onStylesheetLoad:W,stylesheetLoadTimeout:F=5e3,keepIframeSrcFn:b=()=>!1,newlyAddedElement:x=!1,cssCaptured:z=!1}=e;let{needsMask:H}=e,{preserveWhiteSpace:te=!0}=e;H||(H=fn(s,o,l,H===void 0));const fe=el(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,excludeAttribute:a,includeAttribute:u,needsMask:H,inlineStylesheet:h,maskInputOptions:p,maskTextFn:g,maskInputFn:m,dataURLOptions:d,inlineImages:C,recordCanvas:S,keepIframeSrcFn:b,newlyAddedElement:x,cssCaptured:z});if(!fe)return console.warn(s,"not serialized"),null;let re;r.hasNode(s)?re=r.getId(s):il(fe,f)||!te&&fe.type===Y.Text&&!fe.textContent.replace(/^\s+|\s+$/gm,"").length?re=Ke:re=ln();const E=Object.assign(fe,{id:re});if(r.add(s,E),re===Ke)return null;y&&y(s);let pe=!c;if(E.type===Y.Element){pe=pe&&!E.needBlock,delete E.needBlock;const J=Z.shadowRoot(s);J&&Je(J)&&(E.isShadowHost=!0)}if((E.type===Y.Document||E.type===Y.Element)&&pe){f.headWhitespace&&E.type===Y.Element&&E.tagName==="head"&&(te=!1);const J={doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:H,maskTextClass:o,maskTextSelector:l,excludeAttribute:a,includeAttribute:u,skipChild:c,inlineStylesheet:h,maskInputOptions:p,maskTextFn:g,maskInputFn:m,slimDOMOptions:f,dataURLOptions:d,inlineImages:C,recordCanvas:S,preserveWhiteSpace:te,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:I,onStylesheetLoad:W,stylesheetLoadTimeout:F,keepIframeSrcFn:b,cssCaptured:!1};if(!(E.type===Y.Element&&E.tagName==="textarea"&&E.attributes.value!==void 0)){E.type===Y.Element&&E.attributes._cssText!==void 0&&typeof E.attributes._cssText=="string"&&(J.cssCaptured=!0);for(const de of Array.from(Z.childNodes(s))){const le=Pe(de,J);le&&E.childNodes.push(le)}}let se=null;if(tn(s)&&(se=Z.shadowRoot(s)))for(const de of Array.from(Z.childNodes(se))){const le=Pe(de,J);le&&(Je(se)&&(le.isShadow=!0),E.childNodes.push(le))}}const ze=Z.parentNode(s);return ze&&Ze(ze)&&Je(ze)&&(E.isShadow=!0),E.type===Y.Element&&E.tagName==="iframe"&&Qa(s,()=>{const J=s.contentDocument;if(J&&v){const se=Pe(J,{doc:J,mirror:r,blockClass:i,blockSelector:n,needsMask:H,maskTextClass:o,maskTextSelector:l,excludeAttribute:a,includeAttribute:u,skipChild:!1,inlineStylesheet:h,maskInputOptions:p,maskTextFn:g,maskInputFn:m,slimDOMOptions:f,dataURLOptions:d,inlineImages:C,recordCanvas:S,preserveWhiteSpace:te,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:I,onStylesheetLoad:W,stylesheetLoadTimeout:F,keepIframeSrcFn:b});se&&v(s,se)}},I),E.type===Y.Element&&E.tagName==="link"&&typeof E.attributes.rel=="string"&&(E.attributes.rel==="stylesheet"||E.attributes.rel==="preload"&&typeof E.attributes.href=="string"&&nn(E.attributes.href)==="css")&&qa(s,()=>{if(W){const J=Pe(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:H,maskTextClass:o,maskTextSelector:l,excludeAttribute:a,includeAttribute:u,skipChild:!1,inlineStylesheet:h,maskInputOptions:p,maskTextFn:g,maskInputFn:m,slimDOMOptions:f,dataURLOptions:d,inlineImages:C,recordCanvas:S,preserveWhiteSpace:te,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:I,onStylesheetLoad:W,stylesheetLoadTimeout:F,keepIframeSrcFn:b});J&&W(s,J)}},F),E}function nl(s,e){const{mirror:t=new sn,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:n="rr-mask",maskTextSelector:o=null,excludeAttribute:l=/^$a/,includeAttribute:a=/.+/i,inlineStylesheet:u=!0,inlineImages:c=!1,recordCanvas:h=!1,maskAllInputs:p=!1,maskTextFn:g,maskInputFn:m,slimDOM:f=!1,dataURLOptions:d,preserveWhiteSpace:C,onSerialize:S,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:I,stylesheetLoadTimeout:W,keepIframeSrcFn:F=()=>!1}=e||{};return Pe(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:n,maskTextSelector:o,excludeAttribute:l,includeAttribute:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:p===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:p===!1?{password:!0}:p,maskTextFn:g,maskInputFn:m,slimDOMOptions:f===!0||f==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:f==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:f===!1?{}:f,dataURLOptions:d,inlineImages:c,recordCanvas:h,preserveWhiteSpace:C,onSerialize:S,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:I,stylesheetLoadTimeout:W,keepIframeSrcFn:F,newlyAddedElement:!1})}function ol(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function al(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}var xs={exports:{}},L=String,pn=function(){return{isColorSupported:!1,reset:L,bold:L,dim:L,italic:L,underline:L,inverse:L,hidden:L,strikethrough:L,black:L,red:L,green:L,yellow:L,blue:L,magenta:L,cyan:L,white:L,gray:L,bgBlack:L,bgRed:L,bgGreen:L,bgYellow:L,bgBlue:L,bgMagenta:L,bgCyan:L,bgWhite:L}};xs.exports=pn();xs.exports.createColors=pn;var ll=xs.exports;const ul={},cl=Object.freeze(Object.defineProperty({__proto__:null,default:ul},Symbol.toStringTag,{value:"Module"})),oe=al(cl);let ai=ll,li=oe,Br=class dn extends Error{constructor(e,t,r,i,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),o&&(this.plugin=o),typeof t!="undefined"&&typeof r!="undefined"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,dn)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=ai.isColorSupported),li&&e&&(t=li(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),n=Math.min(this.line+2,r.length),o=String(n).length,l,a;if(e){let{bold:u,gray:c,red:h}=ai.createColors(!0);l=p=>u(h(p)),a=p=>c(p)}else l=a=u=>u;return r.slice(i,n).map((u,c)=>{let h=i+1+c,p=" "+(" "+h).slice(-o)+" | ";if(h===this.line){let g=a(p.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(p)+u+`
|
|
15
|
-
`+
|
|
14
|
+
"use strict";var ra=Object.defineProperty,sa=Object.defineProperties;var ia=Object.getOwnPropertyDescriptors;var gt=Object.getOwnPropertySymbols;var ri=Object.prototype.hasOwnProperty,si=Object.prototype.propertyIsEnumerable;var ti=(s,e,t)=>e in s?ra(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,O=(s,e)=>{for(var t in e||(e={}))ri.call(e,t)&&ti(s,t,e[t]);if(gt)for(var t of gt(e))si.call(e,t)&&ti(s,t,e[t]);return s},te=(s,e)=>sa(s,ia(e));var Re=(s,e)=>{var t={};for(var r in s)ri.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&>)for(var r of gt(s))e.indexOf(r)<0&&si.call(s,r)&&(t[r]=s[r]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var na=Object.defineProperty,oa=(s,e,t)=>e in s?na(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,y=(s,e,t)=>oa(s,typeof e!="symbol"?e+"":e,t),ii,aa=Object.defineProperty,la=(s,e,t)=>e in s?aa(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,ni=(s,e,t)=>la(s,typeof e!="symbol"?e+"":e,t),Y=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(Y||{});const oi={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ai={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},yt={},ua=()=>!!globalThis.Zone;function xs(s){if(yt[s])return yt[s];const e=globalThis[s],t=e.prototype,r=s in oi?oi[s]:void 0,i=!!(r&&r.every(l=>{var a,u;return!!((u=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&u.toString().includes("[native code]"))})),o=s in ai?ai[s]:void 0,n=!!(o&&o.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(i&&n&&!ua())return yt[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const a=l.contentWindow;if(!a)return e.prototype;const u=a[s].prototype;return document.body.removeChild(l),u?yt[s]=u:t}catch(l){return t}}const Mr={};function be(s,e,t){var r;const i=`${s}.${String(t)}`;if(Mr[i])return Mr[i].call(e);const o=xs(s),n=(r=Object.getOwnPropertyDescriptor(o,t))==null?void 0:r.get;return n?(Mr[i]=n,n.call(e)):e[t]}const Or={};function on(s,e,t){const r=`${s}.${String(t)}`;if(Or[r])return Or[r].bind(e);const o=xs(s)[t];return typeof o!="function"?e[t]:(Or[r]=o,o.bind(e))}function ca(s){return be("Node",s,"childNodes")}function ha(s){return be("Node",s,"parentNode")}function fa(s){return be("Node",s,"parentElement")}function da(s){return be("Node",s,"textContent")}function pa(s,e){return on("Node",s,"contains")(e)}function ma(s){return on("Node",s,"getRootNode")()}function ga(s){return!s||!("host"in s)?null:be("ShadowRoot",s,"host")}function ya(s){return s.styleSheets}function wa(s){return!s||!("shadowRoot"in s)?null:be("Element",s,"shadowRoot")}function ba(s,e){return be("Element",s,"querySelector")(e)}function Sa(s,e){return be("Element",s,"querySelectorAll")(e)}function Ca(){return xs("MutationObserver").constructor}function va(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch(r){return()=>{}}}function Ia(s){const e=s.tagName.toLowerCase(),t=s.id?`#${s.id}`:"",r=s.classList.length?"."+Array.from(s.classList).join("."):"";return`${e}${t}${r}`}function xa(s){var d;var e,t;const r=(d=(e=s.ownerDocument)==null?void 0:e.defaultView)!=null?d:window,i=s.getBoundingClientRect(),o=r.innerWidth||r.document.documentElement.clientWidth||0,n=r.innerHeight||r.document.documentElement.clientHeight||0,l=i.width>0&&i.height>0&&i.bottom>0&&i.right>0&&i.top<n&&i.left<o,a=(t=r.getComputedStyle)==null?void 0:t.call(r,s),c=!!a&&a.display!=="none"&&a.visibility!=="hidden"&&(parseFloat(a.opacity)||0)>0&&l;let f=0;if(c){const m=Math.max(0,Math.min(i.right,o)-Math.max(i.left,0)),p=Math.max(0,Math.min(i.bottom,n)-Math.max(i.top,0)),g=m*p,h=i.width*i.height;f=h>0?g/h:0}return{isVisible:c,ratio:f}}const Z={childNodes:ca,parentNode:ha,parentElement:fa,textContent:da,contains:pa,getRootNode:ma,host:ga,styleSheets:ya,shadowRoot:wa,querySelector:ba,querySelectorAll:Sa,mutationObserver:Ca,patch:va,describeNode:Ia,getElementVisibility:xa};function zt(s){return s.nodeType===s.ELEMENT_NODE}function Xe(s){const e=s&&"host"in s&&"mode"in s&&Z.host(s)||null;return!!(e&&"shadowRoot"in e&&Z.shadowRoot(e)===s)}function Ke(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function Ea(s){return s.includes(" background-clip: text;")&&!s.includes(" -webkit-background-clip: text;")&&(s=s.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),s}function Ma(s){const{cssText:e}=s;if(e.split('"').length<3)return e;const t=["@import",`url(${JSON.stringify(s.href)})`];return s.layerName===""?t.push("layer"):s.layerName&&t.push(`layer(${s.layerName})`),s.supportsText&&t.push(`supports(${s.supportsText})`),s.media.length&&t.push(s.media.mediaText),t.join(" ")+";"}function Wr(s){try{const e=s.rules||s.cssRules;if(!e)return null;let t=s.href;!t&&s.ownerNode&&s.ownerNode.ownerDocument&&(t=s.ownerNode.ownerDocument.location.href);const r=Array.from(e,i=>an(i,t)).join("");return Ea(r)}catch(e){return null}}function an(s,e){if(Aa(s)){let t;try{t=Wr(s.styleSheet)||Ma(s)}catch(r){t=s.cssText}return s.styleSheet.href?Xt(t,s.styleSheet.href):t}else{let t=s.cssText;return Ra(s)&&s.selectorText.includes(":")&&(t=Oa(t)),e?Xt(t,e):t}}function Oa(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function Aa(s){return"styleSheet"in s}function Ra(s){return"selectorText"in s}class ln{constructor(){ni(this,"idNodeMap",new Map),ni(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;const r=(t=this.getMeta(e))==null?void 0:t.id;return r!=null?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function $a(){return new ln}function Zt({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:o}){let n=i||"";const l=r&&xe(r);return(e[t.toLowerCase()]||l&&e[l])&&(o?n=o(n,s):n="*".repeat(n.length)),n}function xe(s){return s.toLowerCase()}const li="__rrweb_original__";function Na(s){const e=s.getContext("2d");if(!e)return!0;const t=50;for(let r=0;r<s.width;r+=t)for(let i=0;i<s.height;i+=t){const o=e.getImageData,n=li in o?o[li]:o;if(new Uint32Array(n.call(e,r,i,Math.min(t,s.width-r),Math.min(t,s.height-i)).data.buffer).some(a=>a!==0))return!1}return!0}function Jt(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?xe(e):null}function un(s,e){var o;let t;try{t=new URL(s,e!=null?e:window.location.href)}catch(n){return null}const r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return(o=i==null?void 0:i[1])!=null?o:null}function ka(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const Ta=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Pa=/^(?:[a-z+]+:)?\/\//i,La=/^www\..*/i,Da=/^(data:)([^,]*),(.*)/i;function Xt(s,e){return(s||"").replace(Ta,(t,r,i,o,n,l)=>{const a=i||n||l,u=r||o||"";if(!a)return t;if(Pa.test(a)||La.test(a))return`url(${u}${a}${u})`;if(Da.test(a))return`url(${u}${a}${u})`;if(a[0]==="/")return`url(${u}${ka(e)+a}${u})`;const c=e.split("/"),f=a.split("/");c.pop();for(const d of f)d!=="."&&(d===".."?c.pop():c.push(d));return`url(${u}${c.join("/")}${u})`})}function wt(s,e=!1){return e?s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function _a(s,e,t=!1){const r=Array.from(e.childNodes),i=[];let o=0;if(r.length>1&&s&&typeof s=="string"){let n=wt(s,t);const l=n.length/s.length;for(let a=1;a<r.length;a++)if(r[a].textContent&&typeof r[a].textContent=="string"){const u=wt(r[a].textContent,t),c=100;let f=3;for(;f<u.length&&(u[f].match(/[a-zA-Z0-9]/)||u.indexOf(u.substring(0,f),1)!==-1);f++);for(;f<u.length;f++){let d=u.substring(0,f),m=n.split(d),p=-1;if(m.length===2)p=m[0].length;else if(m.length>2&&m[0]===""&&r[a-1].textContent!=="")p=n.indexOf(d,1);else if(m.length===1){if(d=d.substring(0,d.length-1),m=n.split(d),m.length<=1)return i.push(s),i;f=c+1}else f===u.length-1&&(p=n.indexOf(d));if(m.length>=2&&f>c){const g=r[a-1].textContent;if(g&&typeof g=="string"){const h=wt(g).length;p=n.indexOf(d,h)}p===-1&&(p=m[0].length)}if(p!==-1){let g=Math.floor(p/l);for(;g>0&&g<s.length;){if(o+=1,o>50*r.length)return i.push(s),i;const h=wt(s.substring(0,g),t);if(h.length===p){i.push(s.substring(0,g)),s=s.substring(g),n=n.substring(p);break}else h.length<p?g+=Math.max(1,Math.floor((p-h.length)/l)):g-=Math.max(1,Math.floor((h.length-p)*l))}break}}}}return i.push(s),i}function Fa(s,e){return _a(s,e).join("/* rr_split */")}function Ba(s,e){try{const t=document.querySelectorAll(s);return t.length===1&&t[0]===e}catch(t){return!1}}function Ua(s){if(!(s instanceof Element))return null;if(s.id)return`#${CSS.escape(s.id)}`;const e=[],t=s.tagName.toLowerCase();s.classList.length&&e.push(...Array.from(s.classList).map(n=>`.${CSS.escape(n)}`)),Array.from(s.attributes).forEach(n=>{n.name.startsWith("data-")&&e.push(`[${n.name}="${CSS.escape(n.value)}"]`)});const r=`${t}${e.join("")}`;if(Ba(r,s))return r;const i=[];let o=s;for(;o&&o.nodeType===Node.ELEMENT_NODE;){const n=o.parentElement,l=o.tagName.toLowerCase();let a="";if(n){const u=Array.from(n.children).filter(c=>c.tagName.toLowerCase()===l);u.length>1&&(a=`:nth-of-type(${u.indexOf(o)+1})`)}i.unshift(`${l}${a}`),o=n}return i.join(" > ")||null}function Vr(s){switch(s.nodeType){case Node.DOCUMENT_NODE:return"/";case Node.DOCUMENT_TYPE_NODE:return"/html/doctype";case Node.ELEMENT_NODE:{const e=s;if(e.id)return`//*[@id="${CSS.escape(e.id)}"]`;if(e.tagName.toLowerCase()==="html")return"/html";if(e===document.head)return"/html/head";if(e===document.body)return"/html/body";const t=e.parentNode;if(!t)return"";const r=e.tagName.toLowerCase(),i=Array.from(t.children).filter(n=>n.tagName.toLowerCase()===r),o=i.length>1?`[${i.indexOf(e)+1}]`:"";return`${Vr(t)}/${r}${o}`}case Node.TEXT_NODE:case Node.CDATA_SECTION_NODE:case Node.COMMENT_NODE:{const e=s.parentNode;if(!e)return"";const t={[Node.TEXT_NODE]:"text()",[Node.CDATA_SECTION_NODE]:"text()",[Node.COMMENT_NODE]:"comment()"},r=Array.from(e.childNodes).filter(o=>o.nodeType===s.nodeType),i=r.length>1?`[${r.indexOf(s)}]`:"";return`${Vr(e)}/${t[s.nodeType]}${i}`}default:return""}}function za(s){var e;const t=Z.parentNode(s),r=t&&t;return!r||!Es(r)?!1:((e=s.textContent)==null?void 0:e.trim())!==""}function Es(s){return Z.getElementVisibility(s).isVisible}const Wa=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],Va=["a","button","input","select","textarea","label","details","summary","dialog","video","audio"],Ga=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],Ms=new WeakSet,ja=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(s,e,t){if(ja.call(this,s,e,t),this instanceof Element){const r=s.toLowerCase();Wa.includes(r)&&Ms.add(this)}};const Ha=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(s,e,t){Ha.call(this,s,e,t)};function Ya(s){return s instanceof Element&&Ms.has(s)}function Za(s){if(s.nodeType===Node.ELEMENT_NODE){const e=s,t=e.tagName.toLowerCase();if(Va.includes(t))return!0;const r=e.hasAttribute("tabindex")&&e.getAttribute("tabindex")!=="-1",i=["button","link","checkbox","switch","menuitem"].includes(e.getAttribute("role")||"");return Ya(e)||r||i||e instanceof HTMLAnchorElement&&e.hasAttribute("href")||e instanceof HTMLButtonElement&&!e.disabled}return!1}function ui(){document.querySelectorAll("*").forEach(e=>{Ga.forEach(t=>{e.hasAttribute(t)&&Ms.add(e)})})}document.readyState==="complete"||document.readyState==="interactive"?ui():document.addEventListener("DOMContentLoaded",ui);let Ja=1;const Xa=new RegExp("[^a-z0-9-_:]"),qe=-2;function cn(){return Ja++}function Ka(s){if(s instanceof HTMLFormElement)return"form";const e=xe(s.tagName);return Xa.test(e)?"div":e}let $e,ci;const Qa=/^[^ \t\n\r\u000c]+/,qa=/^[, \t\n\r\u000c]+/;function el(s,e){if(e.trim()==="")return e;let t=0;function r(o){let n;const l=o.exec(e.substring(t));return l?(n=l[0],t+=n.length,n):""}const i=[];for(;r(qa),!(t>=e.length);){let o=r(Qa);if(o.slice(-1)===",")o=Te(s,o.substring(0,o.length-1)),i.push(o);else{let n="";o=Te(s,o);let l=!1;for(;;){const a=e.charAt(t);if(a===""){i.push((o+n).trim());break}else if(l)a===")"&&(l=!1);else if(a===","){t+=1,i.push((o+n).trim());break}else a==="("&&(l=!0);n+=a,t+=1}}}return i.join(", ")}const hi=new WeakMap;function Te(s,e){return!e||e.trim()===""?e:Os(s,e)}function tl(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function Os(s,e){let t=hi.get(s);if(t||(t=s.createElement("a"),hi.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function hn(s,e,t,r){return r&&(t==="src"||t==="href"&&!(e==="use"&&r[0]==="#")||t==="xlink:href"&&r[0]!=="#"||t==="background"&&(e==="table"||e==="td"||e==="th")?Te(s,r):t==="srcset"?el(s,r):t==="style"?Xt(r,Os(s)):e==="object"&&t==="data"?Te(s,r):r)}function fn(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function Gr(s,e){return typeof e=="string"?s.includes(e):e.test(s)}function rl(s,e,t){try{if(typeof e=="string"){if(s.classList.contains(e))return!0}else for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}if(t)return s.matches(t)}catch(r){}return!1}function Kt(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?Kt(Z.parentNode(s),e,t):!1;for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}return t?Kt(Z.parentNode(s),e,t):!1}function dn(s,e,t,r){let i;if(zt(s)){if(i=s,!Z.childNodes(i).length)return!1}else{if(Z.parentElement(s)===null)return!1;i=Z.parentElement(s)}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(Kt(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch(o){}return!1}function sl(s,e,t){const r=s.contentWindow;if(!r)return;let i=!1,o;try{o=r.document.readyState}catch(l){return}if(o!=="complete"){const l=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener("load",()=>{clearTimeout(l),i=!0,e()});return}const n="about:blank";if(r.location.href!==n||s.src===n||s.src==="")return setTimeout(e,0),s.addEventListener("load",e);s.addEventListener("load",e)}function il(s,e,t){let r=!1,i;try{i=s.sheet}catch(n){return}if(i)return;const o=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener("load",()=>{clearTimeout(o),r=!0,e()})}function nl(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:o,excludeAttribute:n,needsMask:l,inlineStylesheet:a,maskInputOptions:u={},maskTextFn:c,maskInputFn:f,dataURLOptions:d={},inlineImages:m,recordCanvas:p,keepIframeSrcFn:g,newlyAddedElement:h=!1,cssCaptured:w=!1}=e,C=ol(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:Y.Document,childNodes:[],compatMode:s.compatMode}:{type:Y.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return{type:Y.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:C};case s.ELEMENT_NODE:return ll(s,{doc:t,blockClass:i,blockSelector:o,excludeAttribute:n,inlineStylesheet:a,maskInputOptions:u,maskInputFn:f,dataURLOptions:d,inlineImages:m,recordCanvas:p,keepIframeSrcFn:g,newlyAddedElement:h,rootId:C});case s.TEXT_NODE:return al(s,{doc:t,needsMask:l,maskTextFn:c,rootId:C,cssCaptured:w});case s.CDATA_SECTION_NODE:return{type:Y.CDATA,textContent:"",rootId:C};case s.COMMENT_NODE:return{type:Y.Comment,textContent:Z.textContent(s)||"",rootId:C};default:return!1}}function ol(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}function al(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:o}=e,n=Z.parentNode(s),l=n&&n.tagName;let a="";const u=l==="STYLE"?!0:void 0,c=l==="SCRIPT"?!0:void 0;return c?a="SCRIPT_PLACEHOLDER":o||(a=Z.textContent(s),u&&a&&(a=Xt(a,Os(e.doc)))),!u&&!c&&a&&t&&(a=r?r(a,Z.parentElement(s)):a.replace(/[\S]/g,"*")),{type:Y.Text,textContent:a||"",rootId:i}}function ll(s,e){const{doc:t,blockClass:r,blockSelector:i,excludeAttribute:o,inlineStylesheet:n,maskInputOptions:l={},maskInputFn:a,dataURLOptions:u={},inlineImages:c,recordCanvas:f,keepIframeSrcFn:d,newlyAddedElement:m=!1,rootId:p}=e,g=rl(s,r,i),h=Ka(s);let w={};const C=s.attributes.length;for(let b=0;b<C;b++){const S=s.attributes[b];Gr(S.name,o)||fn(h,S.name,S.value)||(w[S.name]=hn(t,h,xe(S.name),S.value))}if(h==="link"&&n){const b=Array.from(t.styleSheets).find(k=>k.href===s.href);let S=null;b&&(S=Wr(b)),S&&(delete w.rel,delete w.href,w._cssText=S)}if(h==="style"&&s.sheet){let b=Wr(s.sheet);b&&(s.childNodes.length>1&&(b=Fa(b,s)),w._cssText=b)}if(h==="input"||h==="textarea"||h==="select"){const b=s.value,S=s.checked;w.type!=="radio"&&w.type!=="checkbox"&&w.type!=="submit"&&w.type!=="button"&&b?w.value=Zt({element:s,type:Jt(s),tagName:h,value:b,maskInputOptions:l,maskInputFn:a}):S&&(w.checked=S)}if(h==="option"&&(s.selected&&!l.select?w.selected=!0:delete w.selected),h==="dialog"&&s.open&&(w.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),h==="canvas"&&f){if(s.__context==="2d")Na(s)||(w.rr_dataURL=s.toDataURL(u.type,u.quality));else if(!("__context"in s)){const b=s.toDataURL(u.type,u.quality),S=t.createElement("canvas");S.width=s.width,S.height=s.height;const k=S.toDataURL(u.type,u.quality);b!==k&&(w.rr_dataURL=b)}}if(h==="img"&&c){$e||($e=t.createElement("canvas"),ci=$e.getContext("2d"));const b=s,S=b.currentSrc||b.getAttribute("src")||"<unknown-src>",k=b.crossOrigin,N=()=>{b.removeEventListener("load",N);try{$e.width=b.naturalWidth,$e.height=b.naturalHeight,ci.drawImage(b,0,0),w.rr_dataURL=$e.toDataURL(u.type,u.quality)}catch(A){if(b.crossOrigin!=="anonymous"){b.crossOrigin="anonymous",b.complete&&b.naturalWidth!==0?N():b.addEventListener("load",N);return}else console.warn(`Cannot inline img src=${S}! Error: ${A}`)}b.crossOrigin==="anonymous"&&(k?w.crossOrigin=k:b.removeAttribute("crossorigin"))};b.complete&&b.naturalWidth!==0?N():b.addEventListener("load",N)}if(h==="audio"||h==="video"){const b=w;b.rr_mediaState=s.paused?"paused":"played",b.rr_mediaCurrentTime=s.currentTime,b.rr_mediaPlaybackRate=s.playbackRate,b.rr_mediaMuted=s.muted,b.rr_mediaLoop=s.loop,b.rr_mediaVolume=s.volume}if(m||(s.scrollLeft&&(w.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(w.rr_scrollTop=s.scrollTop)),g){const{width:b,height:S}=s.getBoundingClientRect();w={class:w.class,rr_width:`${b}px`,rr_height:`${S}px`}}h==="iframe"&&!d(w.src)&&(s.contentDocument||(w.rr_src=w.src),delete w.src);let v;try{customElements.get(h)&&(v=!0)}catch(b){}return{type:Y.Element,tagName:h,attributes:w,childNodes:[],isSVG:tl(s)||void 0,needBlock:g,rootId:p,isCustom:v}}function D(s){return s==null?"":s.toLowerCase()}function ul(s,e){if(e.comment&&s.type===Y.Comment)return!0;if(s.type===Y.Element){if(e.script&&(s.tagName==="script"||s.tagName==="link"&&(s.attributes.rel==="preload"&&s.attributes.as==="script"||s.attributes.rel==="modulepreload")||s.tagName==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&un(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(D(s.attributes.name).match(/^msapplication-tile(image|color)$/)||D(s.attributes.name)==="application-name"||D(s.attributes.rel)==="icon"||D(s.attributes.rel)==="apple-touch-icon"||D(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&D(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(D(s.attributes.property).match(/^(og|twitter|fb):/)||D(s.attributes.name).match(/^(og|twitter):/)||D(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(D(s.attributes.name)==="robots"||D(s.attributes.name)==="googlebot"||D(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(D(s.attributes.name)==="author"||D(s.attributes.name)==="generator"||D(s.attributes.name)==="framework"||D(s.attributes.name)==="publisher"||D(s.attributes.name)==="progid"||D(s.attributes.property).match(/^article:/)||D(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(D(s.attributes.name)==="google-site-verification"||D(s.attributes.name)==="yandex-verification"||D(s.attributes.name)==="csrf-token"||D(s.attributes.name)==="p:domain_verify"||D(s.attributes.name)==="verify-v1"||D(s.attributes.name)==="verification"||D(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Pe(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:o,maskTextClass:n,maskTextSelector:l,excludeAttribute:a,skipChild:u=!1,inlineStylesheet:c=!0,maskInputOptions:f={},maskTextFn:d,maskInputFn:m,slimDOMOptions:p,dataURLOptions:g={},inlineImages:h=!1,recordCanvas:w=!1,onSerialize:C,onIframeLoad:v,iframeLoadTimeout:b=5e3,onStylesheetLoad:S,stylesheetLoadTimeout:k=5e3,keepIframeSrcFn:N=()=>!1,newlyAddedElement:A=!1,cssCaptured:j=!1}=e;let{needsMask:W}=e,{preserveWhiteSpace:q=!0}=e;W||(W=dn(s,n,l,W===void 0));const ce=nl(s,{doc:t,mirror:r,blockClass:i,blockSelector:o,excludeAttribute:a,needsMask:W,inlineStylesheet:c,maskInputOptions:f,maskTextFn:d,maskInputFn:m,dataURLOptions:g,inlineImages:h,recordCanvas:w,keepIframeSrcFn:N,newlyAddedElement:A,cssCaptured:j});if(!ce)return console.warn(s,"not serialized"),null;let he;r.hasNode(s)?he=r.getId(s):ul(ce,p)||!q&&ce.type===Y.Text&&!ce.textContent.replace(/^\s+|\s+$/gm,"").length?he=qe:he=cn();const I=Object.assign(ce,{id:he});if(zt(s)||s.nodeType===Node.TEXT_NODE){if(I.xpath=Vr(s),zt(s)){const H=Ua(s);H&&(I.selector=H)}s.nodeType===Node.TEXT_NODE&&(I.isVisible=za(s)),s.nodeType===Node.ELEMENT_NODE&&(I.isVisible=Es(s),I.isInteractive=Za(s))}if(r.add(s,I),he===qe)return null;C&&C(s);let oe=!u;if(I.type===Y.Element){oe=oe&&!I.needBlock,delete I.needBlock;const H=Z.shadowRoot(s);H&&Ke(H)&&(I.isShadowHost=!0)}if((I.type===Y.Document||I.type===Y.Element)&&oe){p.headWhitespace&&I.type===Y.Element&&I.tagName==="head"&&(q=!1);const H={doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:W,maskTextClass:n,maskTextSelector:l,excludeAttribute:a,skipChild:u,inlineStylesheet:c,maskInputOptions:f,maskTextFn:d,maskInputFn:m,slimDOMOptions:p,dataURLOptions:g,inlineImages:h,recordCanvas:w,preserveWhiteSpace:q,onSerialize:C,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:k,keepIframeSrcFn:N,cssCaptured:!1};if(!(I.type===Y.Element&&I.tagName==="textarea"&&I.attributes.value!==void 0)){I.type===Y.Element&&I.attributes._cssText!==void 0&&typeof I.attributes._cssText=="string"&&(H.cssCaptured=!0);for(const ye of Array.from(Z.childNodes(s))){const ee=Pe(ye,H);ee&&I.childNodes.push(ee)}}let ge=null;if(zt(s)&&(ge=Z.shadowRoot(s)))for(const ye of Array.from(Z.childNodes(ge))){const ee=Pe(ye,H);ee&&(Ke(ge)&&(ee.isShadow=!0),I.childNodes.push(ee))}}const fe=Z.parentNode(s);return fe&&Xe(fe)&&Ke(fe)&&(I.isShadow=!0),I.type===Y.Element&&I.tagName==="iframe"&&sl(s,()=>{const H=s.contentDocument;if(H&&v){const ge=Pe(H,{doc:H,mirror:r,blockClass:i,blockSelector:o,needsMask:W,maskTextClass:n,maskTextSelector:l,excludeAttribute:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:f,maskTextFn:d,maskInputFn:m,slimDOMOptions:p,dataURLOptions:g,inlineImages:h,recordCanvas:w,preserveWhiteSpace:q,onSerialize:C,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:k,keepIframeSrcFn:N});ge&&v(s,ge)}},b),I.type===Y.Element&&I.tagName==="link"&&typeof I.attributes.rel=="string"&&(I.attributes.rel==="stylesheet"||I.attributes.rel==="preload"&&typeof I.attributes.href=="string"&&un(I.attributes.href)==="css")&&il(s,()=>{if(S){const H=Pe(s,{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:W,maskTextClass:n,maskTextSelector:l,excludeAttribute:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:f,maskTextFn:d,maskInputFn:m,slimDOMOptions:p,dataURLOptions:g,inlineImages:h,recordCanvas:w,preserveWhiteSpace:q,onSerialize:C,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:k,keepIframeSrcFn:N});H&&S(s,H)}},k),I}function cl(s,e){const{mirror:t=new ln,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:o="rr-mask",maskTextSelector:n=null,excludeAttribute:l=/.^/,inlineStylesheet:a=!0,inlineImages:u=!1,recordCanvas:c=!1,maskAllInputs:f=!1,maskTextFn:d,maskInputFn:m,slimDOM:p=!1,dataURLOptions:g,preserveWhiteSpace:h,onSerialize:w,onIframeLoad:C,iframeLoadTimeout:v,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:k=()=>!1}=e||{};return Pe(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:o,maskTextSelector:n,excludeAttribute:l,skipChild:!1,inlineStylesheet:a,maskInputOptions: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}:f===!1?{password:!0}:f,maskTextFn:d,maskInputFn:m,slimDOMOptions:p===!0||p==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:p==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:p===!1?{}:p,dataURLOptions:g,inlineImages:u,recordCanvas:c,preserveWhiteSpace:h,onSerialize:w,onIframeLoad:C,iframeLoadTimeout:v,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:k,newlyAddedElement:!1})}function hl(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function fl(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}var As={exports:{}},_=String,pn=function(){return{isColorSupported:!1,reset:_,bold:_,dim:_,italic:_,underline:_,inverse:_,hidden:_,strikethrough:_,black:_,red:_,green:_,yellow:_,blue:_,magenta:_,cyan:_,white:_,gray:_,bgBlack:_,bgRed:_,bgGreen:_,bgYellow:_,bgBlue:_,bgMagenta:_,bgCyan:_,bgWhite:_}};As.exports=pn();As.exports.createColors=pn;var dl=As.exports;const pl={},ml=Object.freeze(Object.defineProperty({__proto__:null,default:pl},Symbol.toStringTag,{value:"Module"})),ie=fl(ml);let fi=dl,di=ie,jr=class mn extends Error{constructor(e,t,r,i,o,n){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),n&&(this.plugin=n),typeof t!="undefined"&&typeof r!="undefined"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,mn)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=fi.isColorSupported),di&&e&&(t=di(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),n=String(o).length,l,a;if(e){let{bold:u,gray:c,red:f}=fi.createColors(!0);l=d=>u(f(d)),a=d=>c(d)}else l=a=u=>u;return r.slice(i,o).map((u,c)=>{let f=i+1+c,d=" "+(" "+f).slice(-n)+" | ";if(f===this.line){let m=a(d.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(d)+u+`
|
|
15
|
+
`+m+l("^")}return" "+a(d)+u}).join(`
|
|
16
16
|
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
17
17
|
|
|
18
18
|
`+e+`
|
|
19
|
-
`),this.name+": "+this.message+e}};var
|
|
19
|
+
`),this.name+": "+this.message+e}};var Rs=jr;jr.default=jr;var ut={};ut.isClean=Symbol("isClean");ut.my=Symbol("my");const pi={after:`
|
|
20
20
|
`,beforeClose:`
|
|
21
21
|
`,beforeComment:`
|
|
22
22
|
`,beforeDecl:`
|
|
23
23
|
`,beforeOpen:" ",beforeRule:`
|
|
24
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function
|
|
25
|
-
`)){let
|
|
24
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function gl(s){return s[0].toUpperCase()+s.slice(1)}let Hr=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?r+=e.raws.afterName:i&&(r+=" "),e.nodes)this.block(e,r+i);else{let o=(e.raws.between||"")+(t?";":"");this.builder(r+i+o,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let i=e.parent,o=0;for(;i&&i.type!=="root";)o+=1,i=i.parent;if(r.includes(`
|
|
25
|
+
`)){let n=this.raw(e,null,"indent");if(n.length)for(let l=0;l<o;l++)r+=n}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let o=e.nodes[i],n=this.raw(o,"before");n&&this.builder(n),this.stringify(o,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i!="undefined"))return i;let o=e.parent;if(r==="before"&&(!o||o.type==="root"&&o.first===e||o&&o.type==="document"))return"";if(!o)return pi[r];let n=e.root();if(n.rawCache||(n.rawCache={}),typeof n.rawCache[r]!="undefined")return n.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let l="raw"+gl(r);this[l]?i=this[l](n,e):n.walk(a=>{if(i=a.raws[t],typeof i!="undefined")return!1})}return typeof i=="undefined"&&(i=pi[r]),n.rawCache[r]=i,i}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after!="undefined")return t=r.raws.after,t.includes(`
|
|
26
26
|
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(i=>{if(typeof i.raws.before!="undefined")return r=i.raws.before,r.includes(`
|
|
27
27
|
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r=="undefined"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(i=>{if(typeof i.raws.before!="undefined")return r=i.raws.before,r.includes(`
|
|
28
28
|
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r=="undefined"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t!="undefined"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before!="undefined")return t=r.raws.before,t.includes(`
|
|
29
|
-
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between!="undefined")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t!="undefined"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof r.raws.before!="undefined"){let
|
|
30
|
-
`);return t=
|
|
31
|
-
`?(i=1,
|
|
32
|
-
`);r=new Array(
|
|
29
|
+
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between!="undefined")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t!="undefined"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof r.raws.before!="undefined"){let o=r.raws.before.split(`
|
|
30
|
+
`);return t=o[o.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var gn=Hr;Hr.default=Hr;let yl=gn;function Yr(s,e){new yl(e).stringify(s)}var ur=Yr;Yr.default=Yr;let{isClean:bt,my:wl}=ut,bl=Rs,Sl=gn,Cl=ur;function Zr(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let i=s[r],o=typeof i;r==="parent"&&o==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(n=>Zr(n,t)):(o==="object"&&i!==null&&(i=Zr(i)),t[r]=i)}return t}let Jr=class{constructor(e={}){this.raws={},this[bt]=!1,this[wl]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Zr(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new bl(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[bt]){this[bt]=!1;let e=this;for(;e=e.parent;)e[bt]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let i=t.indexOf(e.word);i!==-1&&(r=this.positionInside(i,t))}return r}positionInside(e,t){let r=t||this.toString(),i=this.source.start.column,o=this.source.start.line;for(let n=0;n<e;n++)r[n]===`
|
|
31
|
+
`?(i=1,o+=1):i+=1;return{column:i,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),o=i.indexOf(e.word);o!==-1&&(t=this.positionInside(o,i),r=this.positionInside(o+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new Sl().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let o=0;for(let n in this){if(!Object.prototype.hasOwnProperty.call(this,n)||n==="parent"||n==="proxyCache")continue;let l=this[n];if(Array.isArray(l))r[n]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)r[n]=l.toJSON(null,t);else if(n==="source"){let a=t.get(l.input);a==null&&(a=o,t.set(l.input,o),o++),r[n]={end:l.end,inputId:a,start:l.start}}else r[n]=l}return i&&(r.inputs=[...t.keys()].map(n=>n.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Cl){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let i={node:this};for(let o in r)i[o]=r[o];return e.warn(t,i)}get proxyOf(){return this}};var cr=Jr;Jr.default=Jr;let vl=cr,Xr=class extends vl{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=te(O({},e),{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var hr=Xr;Xr.default=Xr;let Il="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",xl=(s,e=21)=>(t=e)=>{let r="",i=t;for(;i--;)r+=s[Math.random()*s.length|0];return r},El=(s=21)=>{let e="",t=s;for(;t--;)e+=Il[Math.random()*64|0];return e};var Ml={nanoid:El,customAlphabet:xl};let{SourceMapConsumer:mi,SourceMapGenerator:gi}=ie,{existsSync:Ol,readFileSync:Al}=ie,{dirname:Ar,join:Rl}=ie;function $l(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let Kr=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Ar(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new mi(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,o=/^data:application\/json,/;if(i.test(e)||o.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return $l(e.substr(RegExp.lastMatch.length));let n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=Ar(e),Ol(e))return this.mapFile=e,Al(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof mi)return gi.fromSourceMap(t).toString();if(t instanceof gi)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=Rl(Ar(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var yn=Kr;Kr.default=Kr;let{SourceMapConsumer:Nl,SourceMapGenerator:kl}=ie,{fileURLToPath:yi,pathToFileURL:St}=ie,{isAbsolute:Qr,resolve:qr}=ie,{nanoid:Tl}=Ml,Rr=ie,wi=Rs,Pl=yn,$r=Symbol("fromOffsetCache"),Ll=!!(Nl&&kl),bi=!!(qr&&Qr),Qt=class{constructor(e,t={}){if(e===null||typeof e=="undefined"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!bi||/^\w+:\/\//.test(t.from)||Qr(t.from)?this.file=t.from:this.file=qr(t.from)),bi&&Ll){let r=new Pl(this.css,t);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+Tl(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let o,n,l;if(t&&typeof t=="object"){let u=t,c=r;if(typeof u.offset=="number"){let f=this.fromOffset(u.offset);t=f.line,r=f.col}else t=u.line,r=u.column;if(typeof c.offset=="number"){let f=this.fromOffset(c.offset);n=f.line,l=f.col}else n=c.line,l=c.column}else if(!r){let u=this.fromOffset(t);t=u.line,r=u.col}let a=this.origin(t,r,n,l);return a?o=new wi(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,i.plugin):o=new wi(e,n===void 0?t:{column:r,line:t},n===void 0?r:{column:l,line:n},this.css,this.file,i.plugin),o.input={column:r,endColumn:l,endLine:n,line:t,source:this.css},this.file&&(St&&(o.input.url=St(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[$r])r=this[$r];else{let o=this.css.split(`
|
|
32
|
+
`);r=new Array(o.length);let n=0;for(let l=0,a=o.length;l<a;l++)r[l]=n,n+=o[l].length+1;this[$r]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let o=r.length-2,n;for(;i<o;)if(n=i+(o-i>>1),e<r[n])o=n-1;else if(e>=r[n+1])i=n+1;else{i=n;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:qr(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let o=this.map.consumer(),n=o.originalPositionFor({column:t,line:e});if(!n.source)return!1;let l;typeof r=="number"&&(l=o.originalPositionFor({column:i,line:r}));let a;Qr(n.source)?a=St(n.source):a=new URL(n.source,this.map.consumer().sourceRoot||St(this.map.mapFile));let u={column:n.column,endColumn:l&&l.column,endLine:l&&l.line,line:n.line,url:a.toString()};if(a.protocol==="file:")if(yi)u.file=yi(a);else throw new Error("file: protocol is not available in this PostCSS build");let c=o.sourceContentFor(n.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=O({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var fr=Qt;Qt.default=Qt;Rr&&Rr.registerInput&&Rr.registerInput(Qt);let{SourceMapConsumer:wn,SourceMapGenerator:Wt}=ie,{dirname:Vt,relative:bn,resolve:Sn,sep:Cn}=ie,{pathToFileURL:Si}=ie,Dl=fr,_l=!!(wn&&Wt),Fl=!!(Vt&&Sn&&bn&&Cn),Bl=class{constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
|
|
33
33
|
`;this.css.includes(`\r
|
|
34
34
|
`)&&(t=`\r
|
|
35
|
-
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||
|
|
36
|
-
`),t=l.length-o):t+=l.length,a&&u!=="start"){let c=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==c.last||c.raws.semicolon)&&(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Wt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Wt(bn(r,this.mapOpts.annotation)));let i=wn(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Nl(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(mi){let r=mi(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;Sn==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var Cn=Tl;let Dl=ar,Jr=class extends Dl{constructor(e){super(e),this.type="comment"}};var cr=Jr;Jr.default=Jr;let{isClean:vn,my:In}=at,xn=lr,On=cr,Ll=ar,En,Es,As,An;function Rn(s){return s.map(e=>(e.nodes&&(e.nodes=Rn(e.nodes)),delete e.source,e))}function Mn(s){if(s[vn]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)Mn(e)}let ge=class $n extends Ll{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(n,o)=>i(n.toProxy(),o):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],r<n&&(this.indexes[o]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let l of n)this.proxyOf.nodes.splice(r,0,l);let o;for(let l in this.indexes)o=this.indexes[l],r<=o&&(this.indexes[l]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Rn(En(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new xn(e)]}else if(e.selector)e=[new Es(e)];else if(e.name)e=[new As(e)];else if(e.text)e=[new On(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[In]||$n.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[vn]&&Mn(i),typeof i.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}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]}};ge.registerParse=s=>{En=s};ge.registerRule=s=>{Es=s};ge.registerAtRule=s=>{As=s};ge.registerRoot=s=>{An=s};var Oe=ge;ge.default=ge;ge.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,As.prototype):s.type==="rule"?Object.setPrototypeOf(s,Es.prototype):s.type==="decl"?Object.setPrototypeOf(s,xn.prototype):s.type==="comment"?Object.setPrototypeOf(s,On.prototype):s.type==="root"&&Object.setPrototypeOf(s,An.prototype),s[In]=!0,s.nodes&&s.nodes.forEach(e=>{ge.rebuild(e)})};let _l=Oe,Nn,kn,Qe=class extends _l{constructor(e){super(R({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new Nn(new kn,this,e).stringify()}};Qe.registerLazyResult=s=>{Nn=s};Qe.registerProcessor=s=>{kn=s};var Rs=Qe;Qe.default=Qe;let Xr=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Pn=Xr;Xr.default=Xr;let Fl=Pn,Kr=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Fl(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var Ms=Kr;Kr.default=Kr;const Rr=39,gi=34,St=92,yi=47,Ct=10,Ve=32,vt=12,It=9,xt=13,Ul=91,Bl=93,Wl=40,zl=41,Vl=123,Gl=125,jl=59,Hl=42,Yl=58,Zl=64,Ot=/[\t\n\f\r "#'()/;[\\\]{}]/g,Et=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Jl=/.[\r\n"'(/\\]/,wi=/[\da-f]/i;var Xl=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,l,a,u,c,h,p,g,m,f=r.length,d=0,C=[],S=[];function y(){return d}function v(b){throw e.error("Unclosed "+b,d)}function I(){return S.length===0&&d>=f}function W(b){if(S.length)return S.pop();if(d>=f)return;let x=b?b.ignoreUnclosed:!1;switch(n=r.charCodeAt(d),n){case Ct:case Ve:case It:case xt:case vt:{o=d;do o+=1,n=r.charCodeAt(o);while(n===Ve||n===Ct||n===It||n===xt||n===vt);m=["space",r.slice(d,o)],d=o-1;break}case Ul:case Bl:case Vl:case Gl:case Yl:case jl:case zl:{let z=String.fromCharCode(n);m=[z,z,d];break}case Wl:{if(p=C.length?C.pop()[1]:"",g=r.charCodeAt(d+1),p==="url"&&g!==Rr&&g!==gi&&g!==Ve&&g!==Ct&&g!==It&&g!==vt&&g!==xt){o=d;do{if(c=!1,o=r.indexOf(")",o+1),o===-1)if(i||x){o=d;break}else v("bracket");for(h=o;r.charCodeAt(h-1)===St;)h-=1,c=!c}while(c);m=["brackets",r.slice(d,o+1),d,o],d=o}else o=r.indexOf(")",d+1),a=r.slice(d,o+1),o===-1||Jl.test(a)?m=["(","(",d]:(m=["brackets",a,d,o],d=o);break}case Rr:case gi:{l=n===Rr?"'":'"',o=d;do{if(c=!1,o=r.indexOf(l,o+1),o===-1)if(i||x){o=d+1;break}else v("string");for(h=o;r.charCodeAt(h-1)===St;)h-=1,c=!c}while(c);m=["string",r.slice(d,o+1),d,o],d=o;break}case Zl:{Ot.lastIndex=d+1,Ot.test(r),Ot.lastIndex===0?o=r.length-1:o=Ot.lastIndex-2,m=["at-word",r.slice(d,o+1),d,o],d=o;break}case St:{for(o=d,u=!0;r.charCodeAt(o+1)===St;)o+=1,u=!u;if(n=r.charCodeAt(o+1),u&&n!==yi&&n!==Ve&&n!==Ct&&n!==It&&n!==xt&&n!==vt&&(o+=1,wi.test(r.charAt(o)))){for(;wi.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Ve&&(o+=1)}m=["word",r.slice(d,o+1),d,o],d=o;break}default:{n===yi&&r.charCodeAt(d+1)===Hl?(o=r.indexOf("*/",d+2)+1,o===0&&(i||x?o=r.length:v("comment")),m=["comment",r.slice(d,o+1),d,o],d=o):(Et.lastIndex=d+1,Et.test(r),Et.lastIndex===0?o=r.length-1:o=Et.lastIndex-2,m=["word",r.slice(d,o+1),d,o],C.push(m),d=o);break}}return d++,m}function F(b){S.push(b)}return{back:F,endOfFile:I,nextToken:W,position:y}};let Tn=Oe,Kt=class extends Tn{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var $s=Kt;Kt.default=Kt;Tn.registerAtRule(Kt);let Dn=Oe,Ln,_n,De=class extends Dn{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of i)n.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Ln(new _n,this,e).stringify()}};De.registerLazyResult=s=>{Ln=s};De.registerProcessor=s=>{_n=s};var lt=De;De.default=De;Dn.registerRoot(De);let qe={comma(s){return qe.split(s,[","],!0)},space(s){let e=[" ",`
|
|
37
|
-
`," "];return qe.split(s,e)},split(s,e,t){let r=[],i="",n=!1,o=0,l=!1,a="",u=!1;for(let c of s)u?u=!1:c==="\\"?u=!0:l?c===a&&(l=!1):c==='"'||c==="'"?(l=!0,a=c):c==="("?o+=1:c===")"?o>0&&(o-=1):o===0&&e.includes(c)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}};var Fn=qe;qe.default=qe;let Un=Oe,Kl=Fn,Qt=class extends Un{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Kl.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var Ns=Qt;Qt.default=Qt;Un.registerRule(Qt);let Ql=lr,ql=Xl,eu=cr,tu=$s,ru=lt,bi=Ns;const Si={empty:!0,space:!0};function su(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let iu=class{constructor(e){this.input=e,this.root=new ru,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new tu;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,o=!1,l=!1,a=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){l=!0;break}else if(r==="}"){if(a.length>0){for(n=a.length-1,i=a[n];i&&i[0]==="space";)i=a[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[o,l]of e.entries()){if(r=l,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(e){let t=new eu;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=ql(this.input)}decl(e,t){let r=new Ql;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||su(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(r.raws.important=c);break}else if(n[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let p=u;p>0;p--){let g=c[p][0];if(h.trim().indexOf("!")===0&&g!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=h,e=c)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=o.map(u=>u[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new bi;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,n=null,o=[],l=e[1].startsWith("--"),a=[],u=e;for(;u;){if(r=u[0],a.push(u),r==="("||r==="[")n||(n=u),o.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=u),o.push("}");else if(o.length===0)if(r===";")if(i){this.decl(a,l);return}else break;else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop()),t=!0;break}else r===":"&&(i=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;a.length&&(u=a[a.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let n,o,l=r.length,a="",u=!0,c,h;for(let p=0;p<l;p+=1)n=r[p],o=n[0],o==="space"&&p===l-1&&!i?u=!1:o==="comment"?(h=r[p-1]?r[p-1][0]:"empty",c=r[p+1]?r[p+1][0]:"empty",!Si[h]&&!Si[c]?a.slice(-1)===","?u=!1:a+=n[1]:u=!1):a+=n[1];if(!u){let p=r.reduce((g,m)=>g+m[1],"");e.raws[t]={raw:p,value:a}}e[t]=a}rule(e){e.pop();let t=new bi;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var nu=iu;let ou=Oe,au=nu,lu=ur;function qt(s,e){let t=new lu(s,e),r=new au(t);try{r.parse()}catch(i){throw i}return r.root}var ks=qt;qt.default=qt;ou.registerParse(qt);let{isClean:ce,my:uu}=at,cu=Cn,hu=or,fu=Oe,pu=Rs;let Ci=Ms,du=ks,mu=lt;const gu={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},yu={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},wu={Once:!0,postcssPlugin:!0,prepare:!0},Le=0;function Ge(s){return typeof s=="object"&&typeof s.then=="function"}function Bn(s){let e=!1,t=gu[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,Le,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,Le,t+"Exit"]:[t,t+"Exit"]}function vi(s){let e;return s.type==="document"?e=["Document",Le,"DocumentExit"]:s.type==="root"?e=["Root",Le,"RootExit"]:e=Bn(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function Qr(s){return s[ce]=!1,s.nodes&&s.nodes.forEach(e=>Qr(e)),s}let qr={},_e=class Wn{constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=Qr(t);else if(t instanceof Wn||t instanceof Ci)i=Qr(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=du;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(o){this.processed=!0,this.error=o}i&&!i[uu]&&fu.rebuild(i)}this.result=new Ci(e,i,r),this.helpers=q(R({},qr),{postcss:qr,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?R(R({},n),n.prepare(this.result)):n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!yu[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!wu[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(Ge(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ce];){e[ce]=!0;let t=[vi(e)];for(;t.length>0;){let r=this.visitTick(t);if(Ge(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return Ge(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=hu;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new cu(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(Ge(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ce];)e[ce]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Ge(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[o,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(r.toProxy(),this.helpers)}catch(a){throw this.handleError(a,r)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!l[ce]){l[ce]=!0,e.push(vi(l));return}t.iterator=0,delete r.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===Le){r.nodes&&r.nodes.length&&(r[ce]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[ce]=!0;let t=Bn(e);for(let r of t)if(r===Le)e.nodes&&e.each(i=>{i[ce]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.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"}};_e.registerPostcss=s=>{qr=s};var zn=_e;_e.default=_e;mu.registerLazyResult(_e);pu.registerLazyResult(_e);let bu=Cn,Su=or;let Cu=ks;const vu=Ms;let es=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=Su;this.result=new vu(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new bu(n,i,this._opts,t);if(l.isMap()){let[a,u]=l.generate();a&&(this.result.css=a),u&&(this.result.map=u)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Cu;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Iu=es;es.default=es;let xu=Iu,Ou=zn,Eu=Rs,Au=lt,et=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new xu(this,e,t):new Ou(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Ru=et;et.default=et;Au.registerProcessor(et);Eu.registerProcessor(et);let Mu=lr,$u=gn,Nu=cr,ku=$s,Pu=ur,Tu=lt,Du=Ns;function tt(s,e){if(Array.isArray(s))return s.map(o=>tt(o));let i=s,{inputs:t}=i,r=Re(i,["inputs"]);if(t){e=[];for(let o of t){let l=q(R({},o),{__proto__:Pu.prototype});l.map&&(l.map=q(R({},l.map),{__proto__:$u.prototype})),e.push(l)}}if(r.nodes&&(r.nodes=s.nodes.map(o=>tt(o,e))),r.source){let n=r.source,{inputId:o}=n,l=Re(n,["inputId"]);r.source=l,o!=null&&(r.source.input=e[o])}if(r.type==="root")return new Tu(r);if(r.type==="decl")return new Mu(r);if(r.type==="rule")return new Du(r);if(r.type==="comment")return new Nu(r);if(r.type==="atrule")return new ku(r);throw new Error("Unknown node type: "+s.type)}var Lu=tt;tt.default=tt;let _u=Os,Vn=lr,Fu=zn,Uu=Oe,Ps=Ru,Bu=or,Wu=Lu,Gn=Rs,zu=Pn,jn=cr,Hn=$s,Vu=Ms,Gu=ur,ju=ks,Hu=Fn,Yn=Ns,Zn=lt,Yu=ar;function k(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Ps(s)}k.plugin=function(e,t){let r=!1;function i(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
35
|
+
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||Vt(e.file),i;this.mapOpts.sourcesContent===!1?(i=new wn(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Fl&&_l&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Wt.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Wt({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 Wt({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},o,n;this.stringify(this.root,(l,a,u)=>{if(this.css+=l,a&&u!=="end"&&(i.generated.line=e,i.generated.column=t-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),o=l.match(/\n/g),o?(e+=o.length,n=l.lastIndexOf(`
|
|
36
|
+
`),t=l.length-n):t+=l.length,a&&u!=="start"){let c=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==c.last||c.raws.semicolon)&&(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Vt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Vt(Sn(r,this.mapOpts.annotation)));let i=bn(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Dl(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Si){let r=Si(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;Cn==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var vn=Bl;let Ul=cr,es=class extends Ul{constructor(e){super(e),this.type="comment"}};var dr=es;es.default=es;let{isClean:In,my:xn}=ut,En=hr,Mn=dr,zl=cr,On,$s,Ns,An;function Rn(s){return s.map(e=>(e.nodes&&(e.nodes=Rn(e.nodes)),delete e.source,e))}function $n(s){if(s[In]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)$n(e)}let pe=class Nn extends zl{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(o,n)=>i(o.toProxy(),n):i)):t==="every"||t==="some"?r=>e[t]((i,...o)=>r(i.toProxy(),...o)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let n of i)this.proxyOf.nodes.splice(r+1,0,n);let o;for(let n in this.indexes)o=this.indexes[n],r<o&&(this.indexes[n]=o+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,o=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let l of o)this.proxyOf.nodes.splice(r,0,l);let n;for(let l in this.indexes)n=this.indexes[l],r<=n&&(this.indexes[l]=n+o.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Rn(On(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new En(e)]}else if(e.selector)e=[new $s(e)];else if(e.name)e=[new Ns(e)];else if(e.text)e=[new Mn(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[xn]||Nn.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[In]&&$n(i),typeof i.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(o){throw t.addToError(o)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}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]}};pe.registerParse=s=>{On=s};pe.registerRule=s=>{$s=s};pe.registerAtRule=s=>{Ns=s};pe.registerRoot=s=>{An=s};var Ee=pe;pe.default=pe;pe.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Ns.prototype):s.type==="rule"?Object.setPrototypeOf(s,$s.prototype):s.type==="decl"?Object.setPrototypeOf(s,En.prototype):s.type==="comment"?Object.setPrototypeOf(s,Mn.prototype):s.type==="root"&&Object.setPrototypeOf(s,An.prototype),s[xn]=!0,s.nodes&&s.nodes.forEach(e=>{pe.rebuild(e)})};let Wl=Ee,kn,Tn,et=class extends Wl{constructor(e){super(O({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new kn(new Tn,this,e).stringify()}};et.registerLazyResult=s=>{kn=s};et.registerProcessor=s=>{Tn=s};var ks=et;et.default=et;let ts=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Pn=ts;ts.default=ts;let Vl=Pn,rs=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Vl(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var Ts=rs;rs.default=rs;const Nr=39,Ci=34,Ct=92,vi=47,vt=10,je=32,It=12,xt=9,Et=13,Gl=91,jl=93,Hl=40,Yl=41,Zl=123,Jl=125,Xl=59,Kl=42,Ql=58,ql=64,Mt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Ot=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,eu=/.[\r\n"'(/\\]/,Ii=/[\da-f]/i;var tu=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,o,n,l,a,u,c,f,d,m,p,g=r.length,h=0,w=[],C=[];function v(){return h}function b(A){throw e.error("Unclosed "+A,h)}function S(){return C.length===0&&h>=g}function k(A){if(C.length)return C.pop();if(h>=g)return;let j=A?A.ignoreUnclosed:!1;switch(o=r.charCodeAt(h),o){case vt:case je:case xt:case Et:case It:{n=h;do n+=1,o=r.charCodeAt(n);while(o===je||o===vt||o===xt||o===Et||o===It);p=["space",r.slice(h,n)],h=n-1;break}case Gl:case jl:case Zl:case Jl:case Ql:case Xl:case Yl:{let W=String.fromCharCode(o);p=[W,W,h];break}case Hl:{if(d=w.length?w.pop()[1]:"",m=r.charCodeAt(h+1),d==="url"&&m!==Nr&&m!==Ci&&m!==je&&m!==vt&&m!==xt&&m!==It&&m!==Et){n=h;do{if(c=!1,n=r.indexOf(")",n+1),n===-1)if(i||j){n=h;break}else b("bracket");for(f=n;r.charCodeAt(f-1)===Ct;)f-=1,c=!c}while(c);p=["brackets",r.slice(h,n+1),h,n],h=n}else n=r.indexOf(")",h+1),a=r.slice(h,n+1),n===-1||eu.test(a)?p=["(","(",h]:(p=["brackets",a,h,n],h=n);break}case Nr:case Ci:{l=o===Nr?"'":'"',n=h;do{if(c=!1,n=r.indexOf(l,n+1),n===-1)if(i||j){n=h+1;break}else b("string");for(f=n;r.charCodeAt(f-1)===Ct;)f-=1,c=!c}while(c);p=["string",r.slice(h,n+1),h,n],h=n;break}case ql:{Mt.lastIndex=h+1,Mt.test(r),Mt.lastIndex===0?n=r.length-1:n=Mt.lastIndex-2,p=["at-word",r.slice(h,n+1),h,n],h=n;break}case Ct:{for(n=h,u=!0;r.charCodeAt(n+1)===Ct;)n+=1,u=!u;if(o=r.charCodeAt(n+1),u&&o!==vi&&o!==je&&o!==vt&&o!==xt&&o!==Et&&o!==It&&(n+=1,Ii.test(r.charAt(n)))){for(;Ii.test(r.charAt(n+1));)n+=1;r.charCodeAt(n+1)===je&&(n+=1)}p=["word",r.slice(h,n+1),h,n],h=n;break}default:{o===vi&&r.charCodeAt(h+1)===Kl?(n=r.indexOf("*/",h+2)+1,n===0&&(i||j?n=r.length:b("comment")),p=["comment",r.slice(h,n+1),h,n],h=n):(Ot.lastIndex=h+1,Ot.test(r),Ot.lastIndex===0?n=r.length-1:n=Ot.lastIndex-2,p=["word",r.slice(h,n+1),h,n],w.push(p),h=n);break}}return h++,p}function N(A){C.push(A)}return{back:N,endOfFile:S,nextToken:k,position:v}};let Ln=Ee,qt=class extends Ln{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Ps=qt;qt.default=qt;Ln.registerAtRule(qt);let Dn=Ee,_n,Fn,_e=class extends Dn{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let o of i)o.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new _n(new Fn,this,e).stringify()}};_e.registerLazyResult=s=>{_n=s};_e.registerProcessor=s=>{Fn=s};var ct=_e;_e.default=_e;Dn.registerRoot(_e);let tt={comma(s){return tt.split(s,[","],!0)},space(s){let e=[" ",`
|
|
37
|
+
`," "];return tt.split(s,e)},split(s,e,t){let r=[],i="",o=!1,n=0,l=!1,a="",u=!1;for(let c of s)u?u=!1:c==="\\"?u=!0:l?c===a&&(l=!1):c==='"'||c==="'"?(l=!0,a=c):c==="("?n+=1:c===")"?n>0&&(n-=1):n===0&&e.includes(c)&&(o=!0),o?(i!==""&&r.push(i.trim()),i="",o=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}};var Bn=tt;tt.default=tt;let Un=Ee,ru=Bn,er=class extends Un{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return ru.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var Ls=er;er.default=er;Un.registerRule(er);let su=hr,iu=tu,nu=dr,ou=Ps,au=ct,xi=Ls;const Ei={empty:!0,space:!0};function lu(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let uu=class{constructor(e){this.input=e,this.root=new au,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new ou;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,o,n=!1,l=!1,a=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){l=!0;break}else if(r==="}"){if(a.length>0){for(o=a.length-1,i=a[o];i&&i[0]==="space";)i=a[--o];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){n=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),n&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let o=t-1;o>=0&&(i=e[o],!(i[0]!=="space"&&(r+=1,r===2)));o--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,o;for(let[n,l]of e.entries()){if(r=l,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!o)this.doubleColon(r);else{if(o[0]==="word"&&o[1]==="progid")continue;return n}o=r}return!1}comment(e){let t=new nu;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=iu(this.input)}decl(e,t){let r=new su;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||lu(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let o;for(;e.length;)if(o=e.shift(),o[0]===":"){r.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),r.raws.between+=o[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let n=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)n.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(o=e[u],o[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(r.raws.important=c);break}else if(o[1].toLowerCase()==="important"){let c=e.slice(0),f="";for(let d=u;d>0;d--){let m=c[d][0];if(f.trim().indexOf("!")===0&&m!=="space")break;f=c.pop()[1]+f}f.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=f,e=c)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=n.map(u=>u[1]).join(""),n=[]),this.raw(r,"value",n.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new xi;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,o=null,n=[],l=e[1].startsWith("--"),a=[],u=e;for(;u;){if(r=u[0],a.push(u),r==="("||r==="[")o||(o=u),n.push(r==="("?")":"]");else if(l&&i&&r==="{")o||(o=u),n.push("}");else if(n.length===0)if(r===";")if(i){this.decl(a,l);return}else break;else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop()),t=!0;break}else r===":"&&(i=!0);else r===n[n.length-1]&&(n.pop(),n.length===0&&(o=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),n.length>0&&this.unclosedBracket(o),t&&i){if(!l)for(;a.length&&(u=a[a.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let o,n,l=r.length,a="",u=!0,c,f;for(let d=0;d<l;d+=1)o=r[d],n=o[0],n==="space"&&d===l-1&&!i?u=!1:n==="comment"?(f=r[d-1]?r[d-1][0]:"empty",c=r[d+1]?r[d+1][0]:"empty",!Ei[f]&&!Ei[c]?a.slice(-1)===","?u=!1:a+=o[1]:u=!1):a+=o[1];if(!u){let d=r.reduce((m,p)=>m+p[1],"");e.raws[t]={raw:d,value:a}}e[t]=a}rule(e){e.pop();let t=new xi;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var cu=uu;let hu=Ee,fu=cu,du=fr;function tr(s,e){let t=new du(s,e),r=new fu(t);try{r.parse()}catch(i){throw i}return r.root}var Ds=tr;tr.default=tr;hu.registerParse(tr);let{isClean:le,my:pu}=ut,mu=vn,gu=ur,yu=Ee,wu=ks;let Mi=Ts,bu=Ds,Su=ct;const Cu={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},vu={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},Iu={Once:!0,postcssPlugin:!0,prepare:!0},Fe=0;function He(s){return typeof s=="object"&&typeof s.then=="function"}function zn(s){let e=!1,t=Cu[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,Fe,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,Fe,t+"Exit"]:[t,t+"Exit"]}function Oi(s){let e;return s.type==="document"?e=["Document",Fe,"DocumentExit"]:s.type==="root"?e=["Root",Fe,"RootExit"]:e=zn(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function ss(s){return s[le]=!1,s.nodes&&s.nodes.forEach(e=>ss(e)),s}let is={},Be=class Wn{constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=ss(t);else if(t instanceof Wn||t instanceof Mi)i=ss(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let o=bu;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{i=o(t,r)}catch(n){this.processed=!0,this.error=n}i&&!i[pu]&&yu.rebuild(i)}this.result=new Mi(e,i,r),this.helpers=te(O({},is),{postcss:is,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?O(O({},o),o.prepare(this.result)):o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!vu[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Iu[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(He(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[le];){e[le]=!0;let t=[Oi(e)];for(;t.length>0;){let r=this.visitTick(t);if(He(r))try{await r}catch(i){let o=t[t.length-1].node;throw this.handleError(i,o)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(o=>r(o,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return He(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=gu;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new mu(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(He(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[le];)e[le]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let o;try{o=i(t,this.helpers)}catch(n){throw this.handleError(n,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(He(o))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[n,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=n;try{return l(r.toProxy(),this.helpers)}catch(a){throw this.handleError(a,r)}}if(t.iterator!==0){let n=t.iterator,l;for(;l=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!l[le]){l[le]=!0,e.push(Oi(l));return}t.iterator=0,delete r.indexes[n]}let o=t.events;for(;t.eventIndex<o.length;){let n=o[t.eventIndex];if(t.eventIndex+=1,n===Fe){r.nodes&&r.nodes.length&&(r[le]=!0,t.iterator=r.getIterator());return}else if(this.listeners[n]){t.visitors=this.listeners[n];return}}e.pop()}walkSync(e){e[le]=!0;let t=zn(e);for(let r of t)if(r===Fe)e.nodes&&e.each(i=>{i[le]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}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"}};Be.registerPostcss=s=>{is=s};var Vn=Be;Be.default=Be;Su.registerLazyResult(Be);wu.registerLazyResult(Be);let xu=vn,Eu=ur;let Mu=Ds;const Ou=Ts;let ns=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,o=Eu;this.result=new Ou(this._processor,i,this._opts),this.result.css=t;let n=this;Object.defineProperty(this.result,"root",{get(){return n.root}});let l=new xu(o,i,this._opts,t);if(l.isMap()){let[a,u]=l.generate();a&&(this.result.css=a),u&&(this.result.map=u)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Mu;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Au=ns;ns.default=ns;let Ru=Au,$u=Vn,Nu=ks,ku=ct,rt=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Ru(this,e,t):new $u(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Tu=rt;rt.default=rt;ku.registerProcessor(rt);Nu.registerProcessor(rt);let Pu=hr,Lu=yn,Du=dr,_u=Ps,Fu=fr,Bu=ct,Uu=Ls;function st(s,e){if(Array.isArray(s))return s.map(n=>st(n));let i=s,{inputs:t}=i,r=Re(i,["inputs"]);if(t){e=[];for(let n of t){let l=te(O({},n),{__proto__:Fu.prototype});l.map&&(l.map=te(O({},l.map),{__proto__:Lu.prototype})),e.push(l)}}if(r.nodes&&(r.nodes=s.nodes.map(n=>st(n,e))),r.source){let o=r.source,{inputId:n}=o,l=Re(o,["inputId"]);r.source=l,n!=null&&(r.source.input=e[n])}if(r.type==="root")return new Bu(r);if(r.type==="decl")return new Pu(r);if(r.type==="rule")return new Uu(r);if(r.type==="comment")return new Du(r);if(r.type==="atrule")return new _u(r);throw new Error("Unknown node type: "+s.type)}var zu=st;st.default=st;let Wu=Rs,Gn=hr,Vu=Vn,Gu=Ee,_s=Tu,ju=ur,Hu=zu,jn=ks,Yu=Pn,Hn=dr,Yn=Ps,Zu=Ts,Ju=fr,Xu=Ds,Ku=Bn,Zn=Ls,Jn=ct,Qu=cr;function T(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new _s(s)}T.plugin=function(e,t){let r=!1;function i(...n){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
38
38
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
39
|
-
https://www.w3ctech.com/topic/2226`));let l=t(...
|
|
40
|
-
`+
|
|
39
|
+
https://www.w3ctech.com/topic/2226`));let l=t(...n);return l.postcssPlugin=e,l.postcssVersion=new _s().version,l}let o;return Object.defineProperty(i,"postcss",{get(){return o||(o=i()),o}}),i.process=function(n,l,a){return T([i(a)]).process(n,l)},i};T.stringify=ju;T.parse=Xu;T.fromJSON=Hu;T.list=Ku;T.comment=s=>new Hn(s);T.atRule=s=>new Yn(s);T.decl=s=>new Gn(s);T.rule=s=>new Zn(s);T.root=s=>new Jn(s);T.document=s=>new jn(s);T.CssSyntaxError=Wu;T.Declaration=Gn;T.Container=Gu;T.Processor=_s;T.Document=jn;T.Comment=Hn;T.Warning=Yu;T.AtRule=Yn;T.Result=Zu;T.Input=Ju;T.Rule=Zn;T.Root=Jn;T.Node=Qu;Vu.registerPostcss(T);var qu=T;T.default=T;const U=hl(qu);U.stringify;U.fromJSON;U.plugin;U.parse;U.list;U.document;U.comment;U.atRule;U.rule;U.decl;U.root;U.CssSyntaxError;U.Declaration;U.Container;U.Processor;U.Document;U.Comment;U.Warning;U.AtRule;U.Result;U.Input;U.Rule;U.Root;U.Node;var ec=Object.defineProperty,tc=(s,e,t)=>e in s?ec(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,re=(s,e,t)=>tc(s,typeof e!="symbol"?e+"":e,t);const rc=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],sc=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],Xn=new WeakSet,ic=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(s,e,t){if(ic.call(this,s,e,t),this instanceof Element){const r=s.toLowerCase();rc.includes(r)&&Xn.add(this)}};const nc=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(s,e,t){nc.call(this,s,e,t)};function Ai(){document.querySelectorAll("*").forEach(e=>{sc.forEach(t=>{e.hasAttribute(t)&&Xn.add(e)})})}document.readyState==="complete"||document.readyState==="interactive"?Ai():document.addEventListener("DOMContentLoaded",Ai);function oc(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function ac(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}var Fs={exports:{}},F=String,Kn=function(){return{isColorSupported:!1,reset:F,bold:F,dim:F,italic:F,underline:F,inverse:F,hidden:F,strikethrough:F,black:F,red:F,green:F,yellow:F,blue:F,magenta:F,cyan:F,white:F,gray:F,bgBlack:F,bgRed:F,bgGreen:F,bgYellow:F,bgBlue:F,bgMagenta:F,bgCyan:F,bgWhite:F}};Fs.exports=Kn();Fs.exports.createColors=Kn;var lc=Fs.exports;const uc={},cc=Object.freeze(Object.defineProperty({__proto__:null,default:uc},Symbol.toStringTag,{value:"Module"})),ne=ac(cc);let Ri=lc,$i=ne,os=class Qn extends Error{constructor(e,t,r,i,o,n){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),n&&(this.plugin=n),typeof t!="undefined"&&typeof r!="undefined"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Qn)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=Ri.isColorSupported),$i&&e&&(t=$i(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),n=String(o).length,l,a;if(e){let{bold:u,gray:c,red:f}=Ri.createColors(!0);l=d=>u(f(d)),a=d=>c(d)}else l=a=u=>u;return r.slice(i,o).map((u,c)=>{let f=i+1+c,d=" "+(" "+f).slice(-n)+" | ";if(f===this.line){let m=a(d.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(d)+u+`
|
|
40
|
+
`+m+l("^")}return" "+a(d)+u}).join(`
|
|
41
41
|
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
42
42
|
|
|
43
43
|
`+e+`
|
|
44
|
-
`),this.name+": "+this.message+e}};var
|
|
44
|
+
`),this.name+": "+this.message+e}};var Bs=os;os.default=os;var ht={};ht.isClean=Symbol("isClean");ht.my=Symbol("my");const Ni={after:`
|
|
45
45
|
`,beforeClose:`
|
|
46
46
|
`,beforeComment:`
|
|
47
47
|
`,beforeDecl:`
|
|
48
48
|
`,beforeOpen:" ",beforeRule:`
|
|
49
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function
|
|
50
|
-
`)){let
|
|
49
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function hc(s){return s[0].toUpperCase()+s.slice(1)}let as=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?r+=e.raws.afterName:i&&(r+=" "),e.nodes)this.block(e,r+i);else{let o=(e.raws.between||"")+(t?";":"");this.builder(r+i+o,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let i=e.parent,o=0;for(;i&&i.type!=="root";)o+=1,i=i.parent;if(r.includes(`
|
|
50
|
+
`)){let n=this.raw(e,null,"indent");if(n.length)for(let l=0;l<o;l++)r+=n}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let o=e.nodes[i],n=this.raw(o,"before");n&&this.builder(n),this.stringify(o,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i!="undefined"))return i;let o=e.parent;if(r==="before"&&(!o||o.type==="root"&&o.first===e||o&&o.type==="document"))return"";if(!o)return Ni[r];let n=e.root();if(n.rawCache||(n.rawCache={}),typeof n.rawCache[r]!="undefined")return n.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let l="raw"+hc(r);this[l]?i=this[l](n,e):n.walk(a=>{if(i=a.raws[t],typeof i!="undefined")return!1})}return typeof i=="undefined"&&(i=Ni[r]),n.rawCache[r]=i,i}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after!="undefined")return t=r.raws.after,t.includes(`
|
|
51
51
|
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(i=>{if(typeof i.raws.before!="undefined")return r=i.raws.before,r.includes(`
|
|
52
52
|
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r=="undefined"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(i=>{if(typeof i.raws.before!="undefined")return r=i.raws.before,r.includes(`
|
|
53
53
|
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r=="undefined"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t!="undefined"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before!="undefined")return t=r.raws.before,t.includes(`
|
|
54
|
-
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between!="undefined")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t!="undefined"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof r.raws.before!="undefined"){let
|
|
55
|
-
`);return t=
|
|
56
|
-
`?(i=1,
|
|
57
|
-
`);r=new Array(
|
|
54
|
+
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between!="undefined")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t!="undefined"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof r.raws.before!="undefined"){let o=r.raws.before.split(`
|
|
55
|
+
`);return t=o[o.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var qn=as;as.default=as;let fc=qn;function ls(s,e){new fc(e).stringify(s)}var pr=ls;ls.default=ls;let{isClean:At,my:dc}=ht,pc=Bs,mc=qn,gc=pr;function us(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let i=s[r],o=typeof i;r==="parent"&&o==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(n=>us(n,t)):(o==="object"&&i!==null&&(i=us(i)),t[r]=i)}return t}let cs=class{constructor(e={}){this.raws={},this[At]=!1,this[dc]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=us(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new pc(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[At]){this[At]=!1;let e=this;for(;e=e.parent;)e[At]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let i=t.indexOf(e.word);i!==-1&&(r=this.positionInside(i,t))}return r}positionInside(e,t){let r=t||this.toString(),i=this.source.start.column,o=this.source.start.line;for(let n=0;n<e;n++)r[n]===`
|
|
56
|
+
`?(i=1,o+=1):i+=1;return{column:i,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),o=i.indexOf(e.word);o!==-1&&(t=this.positionInside(o,i),r=this.positionInside(o+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new mc().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let o=0;for(let n in this){if(!Object.prototype.hasOwnProperty.call(this,n)||n==="parent"||n==="proxyCache")continue;let l=this[n];if(Array.isArray(l))r[n]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)r[n]=l.toJSON(null,t);else if(n==="source"){let a=t.get(l.input);a==null&&(a=o,t.set(l.input,o),o++),r[n]={end:l.end,inputId:a,start:l.start}}else r[n]=l}return i&&(r.inputs=[...t.keys()].map(n=>n.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=gc){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let i={node:this};for(let o in r)i[o]=r[o];return e.warn(t,i)}get proxyOf(){return this}};var mr=cs;cs.default=cs;let yc=mr,hs=class extends yc{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=te(O({},e),{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var gr=hs;hs.default=hs;let wc="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",bc=(s,e=21)=>(t=e)=>{let r="",i=t;for(;i--;)r+=s[Math.random()*s.length|0];return r},Sc=(s=21)=>{let e="",t=s;for(;t--;)e+=wc[Math.random()*64|0];return e};var Cc={nanoid:Sc,customAlphabet:bc};let{SourceMapConsumer:ki,SourceMapGenerator:Ti}=ne,{existsSync:vc,readFileSync:Ic}=ne,{dirname:kr,join:xc}=ne;function Ec(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let fs=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=kr(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new ki(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,o=/^data:application\/json,/;if(i.test(e)||o.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return Ec(e.substr(RegExp.lastMatch.length));let n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=kr(e),vc(e))return this.mapFile=e,Ic(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof ki)return Ti.fromSourceMap(t).toString();if(t instanceof Ti)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=xc(kr(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var eo=fs;fs.default=fs;let{SourceMapConsumer:Mc,SourceMapGenerator:Oc}=ne,{fileURLToPath:Pi,pathToFileURL:Rt}=ne,{isAbsolute:ds,resolve:ps}=ne,{nanoid:Ac}=Cc,Tr=ne,Li=Bs,Rc=eo,Pr=Symbol("fromOffsetCache"),$c=!!(Mc&&Oc),Di=!!(ps&&ds),rr=class{constructor(e,t={}){if(e===null||typeof e=="undefined"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Di||/^\w+:\/\//.test(t.from)||ds(t.from)?this.file=t.from:this.file=ps(t.from)),Di&&$c){let r=new Rc(this.css,t);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+Ac(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let o,n,l;if(t&&typeof t=="object"){let u=t,c=r;if(typeof u.offset=="number"){let f=this.fromOffset(u.offset);t=f.line,r=f.col}else t=u.line,r=u.column;if(typeof c.offset=="number"){let f=this.fromOffset(c.offset);n=f.line,l=f.col}else n=c.line,l=c.column}else if(!r){let u=this.fromOffset(t);t=u.line,r=u.col}let a=this.origin(t,r,n,l);return a?o=new Li(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,i.plugin):o=new Li(e,n===void 0?t:{column:r,line:t},n===void 0?r:{column:l,line:n},this.css,this.file,i.plugin),o.input={column:r,endColumn:l,endLine:n,line:t,source:this.css},this.file&&(Rt&&(o.input.url=Rt(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[Pr])r=this[Pr];else{let o=this.css.split(`
|
|
57
|
+
`);r=new Array(o.length);let n=0;for(let l=0,a=o.length;l<a;l++)r[l]=n,n+=o[l].length+1;this[Pr]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let o=r.length-2,n;for(;i<o;)if(n=i+(o-i>>1),e<r[n])o=n-1;else if(e>=r[n+1])i=n+1;else{i=n;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ps(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let o=this.map.consumer(),n=o.originalPositionFor({column:t,line:e});if(!n.source)return!1;let l;typeof r=="number"&&(l=o.originalPositionFor({column:i,line:r}));let a;ds(n.source)?a=Rt(n.source):a=new URL(n.source,this.map.consumer().sourceRoot||Rt(this.map.mapFile));let u={column:n.column,endColumn:l&&l.column,endLine:l&&l.line,line:n.line,url:a.toString()};if(a.protocol==="file:")if(Pi)u.file=Pi(a);else throw new Error("file: protocol is not available in this PostCSS build");let c=o.sourceContentFor(n.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=O({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var yr=rr;rr.default=rr;Tr&&Tr.registerInput&&Tr.registerInput(rr);let{SourceMapConsumer:to,SourceMapGenerator:Gt}=ne,{dirname:jt,relative:ro,resolve:so,sep:io}=ne,{pathToFileURL:_i}=ne,Nc=yr,kc=!!(to&&Gt),Tc=!!(jt&&so&&ro&&io),Pc=class{constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
|
|
58
58
|
`;this.css.includes(`\r
|
|
59
59
|
`)&&(t=`\r
|
|
60
|
-
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||
|
|
61
|
-
`),t=l.length-o):t+=l.length,a&&u!=="start"){let c=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==c.last||c.raws.semicolon)&&(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Vt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Vt(ro(r,this.mapOpts.annotation)));let i=to(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Ec(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(ki){let r=ki(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;so==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var io=Mc;let $c=fr,cs=class extends $c{constructor(e){super(e),this.type="comment"}};var mr=cs;cs.default=cs;let{isClean:no,my:oo}=ut,ao=pr,lo=mr,Nc=fr,uo,Ls,_s,co;function ho(s){return s.map(e=>(e.nodes&&(e.nodes=ho(e.nodes)),delete e.source,e))}function fo(s){if(s[no]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)fo(e)}let ye=class po extends Nc{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(n,o)=>i(n.toProxy(),o):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],r<n&&(this.indexes[o]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let l of n)this.proxyOf.nodes.splice(r,0,l);let o;for(let l in this.indexes)o=this.indexes[l],r<=o&&(this.indexes[l]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=ho(uo(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new ao(e)]}else if(e.selector)e=[new Ls(e)];else if(e.name)e=[new _s(e)];else if(e.text)e=[new lo(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[oo]||po.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[no]&&fo(i),typeof i.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}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]}};ye.registerParse=s=>{uo=s};ye.registerRule=s=>{Ls=s};ye.registerAtRule=s=>{_s=s};ye.registerRoot=s=>{co=s};var Ee=ye;ye.default=ye;ye.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,_s.prototype):s.type==="rule"?Object.setPrototypeOf(s,Ls.prototype):s.type==="decl"?Object.setPrototypeOf(s,ao.prototype):s.type==="comment"?Object.setPrototypeOf(s,lo.prototype):s.type==="root"&&Object.setPrototypeOf(s,co.prototype),s[oo]=!0,s.nodes&&s.nodes.forEach(e=>{ye.rebuild(e)})};let kc=Ee,mo,go,rt=class extends kc{constructor(e){super(R({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new mo(new go,this,e).stringify()}};rt.registerLazyResult=s=>{mo=s};rt.registerProcessor=s=>{go=s};var Fs=rt;rt.default=rt;let hs=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var yo=hs;hs.default=hs;let Pc=yo,fs=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Pc(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var Us=fs;fs.default=fs;const kr=39,Pi=34,Mt=92,Ti=47,$t=10,je=32,Nt=12,kt=9,Pt=13,Tc=91,Dc=93,Lc=40,_c=41,Fc=123,Uc=125,Bc=59,Wc=42,zc=58,Vc=64,Tt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Dt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Gc=/.[\r\n"'(/\\]/,Di=/[\da-f]/i;var jc=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,l,a,u,c,h,p,g,m,f=r.length,d=0,C=[],S=[];function y(){return d}function v(b){throw e.error("Unclosed "+b,d)}function I(){return S.length===0&&d>=f}function W(b){if(S.length)return S.pop();if(d>=f)return;let x=b?b.ignoreUnclosed:!1;switch(n=r.charCodeAt(d),n){case $t:case je:case kt:case Pt:case Nt:{o=d;do o+=1,n=r.charCodeAt(o);while(n===je||n===$t||n===kt||n===Pt||n===Nt);m=["space",r.slice(d,o)],d=o-1;break}case Tc:case Dc:case Fc:case Uc:case zc:case Bc:case _c:{let z=String.fromCharCode(n);m=[z,z,d];break}case Lc:{if(p=C.length?C.pop()[1]:"",g=r.charCodeAt(d+1),p==="url"&&g!==kr&&g!==Pi&&g!==je&&g!==$t&&g!==kt&&g!==Nt&&g!==Pt){o=d;do{if(c=!1,o=r.indexOf(")",o+1),o===-1)if(i||x){o=d;break}else v("bracket");for(h=o;r.charCodeAt(h-1)===Mt;)h-=1,c=!c}while(c);m=["brackets",r.slice(d,o+1),d,o],d=o}else o=r.indexOf(")",d+1),a=r.slice(d,o+1),o===-1||Gc.test(a)?m=["(","(",d]:(m=["brackets",a,d,o],d=o);break}case kr:case Pi:{l=n===kr?"'":'"',o=d;do{if(c=!1,o=r.indexOf(l,o+1),o===-1)if(i||x){o=d+1;break}else v("string");for(h=o;r.charCodeAt(h-1)===Mt;)h-=1,c=!c}while(c);m=["string",r.slice(d,o+1),d,o],d=o;break}case Vc:{Tt.lastIndex=d+1,Tt.test(r),Tt.lastIndex===0?o=r.length-1:o=Tt.lastIndex-2,m=["at-word",r.slice(d,o+1),d,o],d=o;break}case Mt:{for(o=d,u=!0;r.charCodeAt(o+1)===Mt;)o+=1,u=!u;if(n=r.charCodeAt(o+1),u&&n!==Ti&&n!==je&&n!==$t&&n!==kt&&n!==Pt&&n!==Nt&&(o+=1,Di.test(r.charAt(o)))){for(;Di.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===je&&(o+=1)}m=["word",r.slice(d,o+1),d,o],d=o;break}default:{n===Ti&&r.charCodeAt(d+1)===Wc?(o=r.indexOf("*/",d+2)+1,o===0&&(i||x?o=r.length:v("comment")),m=["comment",r.slice(d,o+1),d,o],d=o):(Dt.lastIndex=d+1,Dt.test(r),Dt.lastIndex===0?o=r.length-1:o=Dt.lastIndex-2,m=["word",r.slice(d,o+1),d,o],C.push(m),d=o);break}}return d++,m}function F(b){S.push(b)}return{back:F,endOfFile:I,nextToken:W,position:y}};let wo=Ee,tr=class extends wo{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Bs=tr;tr.default=tr;wo.registerAtRule(tr);let bo=Ee,So,Co,Fe=class extends bo{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of i)n.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new So(new Co,this,e).stringify()}};Fe.registerLazyResult=s=>{So=s};Fe.registerProcessor=s=>{Co=s};var ct=Fe;Fe.default=Fe;bo.registerRoot(Fe);let st={comma(s){return st.split(s,[","],!0)},space(s){let e=[" ",`
|
|
62
|
-
`," "];return st.split(s,e)},split(s,e,t){let r=[],i="",n=!1,o=0,l=!1,a="",u=!1;for(let c of s)u?u=!1:c==="\\"?u=!0:l?c===a&&(l=!1):c==='"'||c==="'"?(l=!0,a=c):c==="("?o+=1:c===")"?o>0&&(o-=1):o===0&&e.includes(c)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}};var vo=st;st.default=st;let Io=Ee,Hc=vo,rr=class extends Io{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Hc.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var Ws=rr;rr.default=rr;Io.registerRule(rr);let Yc=pr,Zc=jc,Jc=mr,Xc=Bs,Kc=ct,Li=Ws;const _i={empty:!0,space:!0};function Qc(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let qc=class{constructor(e){this.input=e,this.root=new Kc,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new Xc;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,o=!1,l=!1,a=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){l=!0;break}else if(r==="}"){if(a.length>0){for(n=a.length-1,i=a[n];i&&i[0]==="space";)i=a[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[o,l]of e.entries()){if(r=l,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(e){let t=new Jc;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=Zc(this.input)}decl(e,t){let r=new Yc;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||Qc(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(r.raws.important=c);break}else if(n[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let p=u;p>0;p--){let g=c[p][0];if(h.trim().indexOf("!")===0&&g!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=h,e=c)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=o.map(u=>u[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Li;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,n=null,o=[],l=e[1].startsWith("--"),a=[],u=e;for(;u;){if(r=u[0],a.push(u),r==="("||r==="[")n||(n=u),o.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=u),o.push("}");else if(o.length===0)if(r===";")if(i){this.decl(a,l);return}else break;else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop()),t=!0;break}else r===":"&&(i=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;a.length&&(u=a[a.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let n,o,l=r.length,a="",u=!0,c,h;for(let p=0;p<l;p+=1)n=r[p],o=n[0],o==="space"&&p===l-1&&!i?u=!1:o==="comment"?(h=r[p-1]?r[p-1][0]:"empty",c=r[p+1]?r[p+1][0]:"empty",!_i[h]&&!_i[c]?a.slice(-1)===","?u=!1:a+=n[1]:u=!1):a+=n[1];if(!u){let p=r.reduce((g,m)=>g+m[1],"");e.raws[t]={raw:p,value:a}}e[t]=a}rule(e){e.pop();let t=new Li;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var eh=qc;let th=Ee,rh=eh,sh=dr;function sr(s,e){let t=new sh(s,e),r=new rh(t);try{r.parse()}catch(i){throw i}return r.root}var zs=sr;sr.default=sr;th.registerParse(sr);let{isClean:he,my:ih}=ut,nh=io,oh=hr,ah=Ee,lh=Fs;let Fi=Us,uh=zs,ch=ct;const hh={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},fh={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},ph={Once:!0,postcssPlugin:!0,prepare:!0},Ue=0;function He(s){return typeof s=="object"&&typeof s.then=="function"}function xo(s){let e=!1,t=hh[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,Ue,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,Ue,t+"Exit"]:[t,t+"Exit"]}function Ui(s){let e;return s.type==="document"?e=["Document",Ue,"DocumentExit"]:s.type==="root"?e=["Root",Ue,"RootExit"]:e=xo(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function ps(s){return s[he]=!1,s.nodes&&s.nodes.forEach(e=>ps(e)),s}let ds={},Be=class Oo{constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=ps(t);else if(t instanceof Oo||t instanceof Fi)i=ps(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=uh;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(o){this.processed=!0,this.error=o}i&&!i[ih]&&ah.rebuild(i)}this.result=new Fi(e,i,r),this.helpers=q(R({},ds),{postcss:ds,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?R(R({},n),n.prepare(this.result)):n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!fh[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!ph[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(He(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[he];){e[he]=!0;let t=[Ui(e)];for(;t.length>0;){let r=this.visitTick(t);if(He(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return He(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=oh;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new nh(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(He(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[he];)e[he]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(He(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[o,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(r.toProxy(),this.helpers)}catch(a){throw this.handleError(a,r)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!l[he]){l[he]=!0,e.push(Ui(l));return}t.iterator=0,delete r.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===Ue){r.nodes&&r.nodes.length&&(r[he]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[he]=!0;let t=xo(e);for(let r of t)if(r===Ue)e.nodes&&e.each(i=>{i[he]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.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"}};Be.registerPostcss=s=>{ds=s};var Eo=Be;Be.default=Be;ch.registerLazyResult(Be);lh.registerLazyResult(Be);let dh=io,mh=hr;let gh=zs;const yh=Us;let ms=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=mh;this.result=new yh(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new dh(n,i,this._opts,t);if(l.isMap()){let[a,u]=l.generate();a&&(this.result.css=a),u&&(this.result.map=u)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=gh;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var wh=ms;ms.default=ms;let bh=wh,Sh=Eo,Ch=Fs,vh=ct,it=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new bh(this,e,t):new Sh(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Ih=it;it.default=it;vh.registerProcessor(it);Ch.registerProcessor(it);let xh=pr,Oh=qn,Eh=mr,Ah=Bs,Rh=dr,Mh=ct,$h=Ws;function nt(s,e){if(Array.isArray(s))return s.map(o=>nt(o));let i=s,{inputs:t}=i,r=Re(i,["inputs"]);if(t){e=[];for(let o of t){let l=q(R({},o),{__proto__:Rh.prototype});l.map&&(l.map=q(R({},l.map),{__proto__:Oh.prototype})),e.push(l)}}if(r.nodes&&(r.nodes=s.nodes.map(o=>nt(o,e))),r.source){let n=r.source,{inputId:o}=n,l=Re(n,["inputId"]);r.source=l,o!=null&&(r.source.input=e[o])}if(r.type==="root")return new Mh(r);if(r.type==="decl")return new xh(r);if(r.type==="rule")return new $h(r);if(r.type==="comment")return new Eh(r);if(r.type==="atrule")return new Ah(r);throw new Error("Unknown node type: "+s.type)}var Nh=nt;nt.default=nt;let kh=Ds,Ao=pr,Ph=Eo,Th=Ee,Vs=Ih,Dh=hr,Lh=Nh,Ro=Fs,_h=yo,Mo=mr,$o=Bs,Fh=Us,Uh=dr,Bh=zs,Wh=vo,No=Ws,ko=ct,zh=fr;function P(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Vs(s)}P.plugin=function(e,t){let r=!1;function i(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
60
|
+
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||jt(e.file),i;this.mapOpts.sourcesContent===!1?(i=new to(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Tc&&kc&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Gt.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Gt({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 Gt({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},o,n;this.stringify(this.root,(l,a,u)=>{if(this.css+=l,a&&u!=="end"&&(i.generated.line=e,i.generated.column=t-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),o=l.match(/\n/g),o?(e+=o.length,n=l.lastIndexOf(`
|
|
61
|
+
`),t=l.length-n):t+=l.length,a&&u!=="start"){let c=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==c.last||c.raws.semicolon)&&(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?jt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=jt(so(r,this.mapOpts.annotation)));let i=ro(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Nc(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(_i){let r=_i(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;io==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var no=Pc;let Lc=mr,ms=class extends Lc{constructor(e){super(e),this.type="comment"}};var wr=ms;ms.default=ms;let{isClean:oo,my:ao}=ht,lo=gr,uo=wr,Dc=mr,co,Us,zs,ho;function fo(s){return s.map(e=>(e.nodes&&(e.nodes=fo(e.nodes)),delete e.source,e))}function po(s){if(s[oo]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)po(e)}let me=class mo extends Dc{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(o,n)=>i(o.toProxy(),n):i)):t==="every"||t==="some"?r=>e[t]((i,...o)=>r(i.toProxy(),...o)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let n of i)this.proxyOf.nodes.splice(r+1,0,n);let o;for(let n in this.indexes)o=this.indexes[n],r<o&&(this.indexes[n]=o+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,o=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let l of o)this.proxyOf.nodes.splice(r,0,l);let n;for(let l in this.indexes)n=this.indexes[l],r<=n&&(this.indexes[l]=n+o.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=fo(co(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new lo(e)]}else if(e.selector)e=[new Us(e)];else if(e.name)e=[new zs(e)];else if(e.text)e=[new uo(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[ao]||mo.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[oo]&&po(i),typeof i.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(o){throw t.addToError(o)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}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]}};me.registerParse=s=>{co=s};me.registerRule=s=>{Us=s};me.registerAtRule=s=>{zs=s};me.registerRoot=s=>{ho=s};var Me=me;me.default=me;me.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,zs.prototype):s.type==="rule"?Object.setPrototypeOf(s,Us.prototype):s.type==="decl"?Object.setPrototypeOf(s,lo.prototype):s.type==="comment"?Object.setPrototypeOf(s,uo.prototype):s.type==="root"&&Object.setPrototypeOf(s,ho.prototype),s[ao]=!0,s.nodes&&s.nodes.forEach(e=>{me.rebuild(e)})};let _c=Me,go,yo,it=class extends _c{constructor(e){super(O({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new go(new yo,this,e).stringify()}};it.registerLazyResult=s=>{go=s};it.registerProcessor=s=>{yo=s};var Ws=it;it.default=it;let gs=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var wo=gs;gs.default=gs;let Fc=wo,ys=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Fc(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var Vs=ys;ys.default=ys;const Lr=39,Fi=34,$t=92,Bi=47,Nt=10,Ye=32,kt=12,Tt=9,Pt=13,Bc=91,Uc=93,zc=40,Wc=41,Vc=123,Gc=125,jc=59,Hc=42,Yc=58,Zc=64,Lt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Dt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Jc=/.[\r\n"'(/\\]/,Ui=/[\da-f]/i;var Xc=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,o,n,l,a,u,c,f,d,m,p,g=r.length,h=0,w=[],C=[];function v(){return h}function b(A){throw e.error("Unclosed "+A,h)}function S(){return C.length===0&&h>=g}function k(A){if(C.length)return C.pop();if(h>=g)return;let j=A?A.ignoreUnclosed:!1;switch(o=r.charCodeAt(h),o){case Nt:case Ye:case Tt:case Pt:case kt:{n=h;do n+=1,o=r.charCodeAt(n);while(o===Ye||o===Nt||o===Tt||o===Pt||o===kt);p=["space",r.slice(h,n)],h=n-1;break}case Bc:case Uc:case Vc:case Gc:case Yc:case jc:case Wc:{let W=String.fromCharCode(o);p=[W,W,h];break}case zc:{if(d=w.length?w.pop()[1]:"",m=r.charCodeAt(h+1),d==="url"&&m!==Lr&&m!==Fi&&m!==Ye&&m!==Nt&&m!==Tt&&m!==kt&&m!==Pt){n=h;do{if(c=!1,n=r.indexOf(")",n+1),n===-1)if(i||j){n=h;break}else b("bracket");for(f=n;r.charCodeAt(f-1)===$t;)f-=1,c=!c}while(c);p=["brackets",r.slice(h,n+1),h,n],h=n}else n=r.indexOf(")",h+1),a=r.slice(h,n+1),n===-1||Jc.test(a)?p=["(","(",h]:(p=["brackets",a,h,n],h=n);break}case Lr:case Fi:{l=o===Lr?"'":'"',n=h;do{if(c=!1,n=r.indexOf(l,n+1),n===-1)if(i||j){n=h+1;break}else b("string");for(f=n;r.charCodeAt(f-1)===$t;)f-=1,c=!c}while(c);p=["string",r.slice(h,n+1),h,n],h=n;break}case Zc:{Lt.lastIndex=h+1,Lt.test(r),Lt.lastIndex===0?n=r.length-1:n=Lt.lastIndex-2,p=["at-word",r.slice(h,n+1),h,n],h=n;break}case $t:{for(n=h,u=!0;r.charCodeAt(n+1)===$t;)n+=1,u=!u;if(o=r.charCodeAt(n+1),u&&o!==Bi&&o!==Ye&&o!==Nt&&o!==Tt&&o!==Pt&&o!==kt&&(n+=1,Ui.test(r.charAt(n)))){for(;Ui.test(r.charAt(n+1));)n+=1;r.charCodeAt(n+1)===Ye&&(n+=1)}p=["word",r.slice(h,n+1),h,n],h=n;break}default:{o===Bi&&r.charCodeAt(h+1)===Hc?(n=r.indexOf("*/",h+2)+1,n===0&&(i||j?n=r.length:b("comment")),p=["comment",r.slice(h,n+1),h,n],h=n):(Dt.lastIndex=h+1,Dt.test(r),Dt.lastIndex===0?n=r.length-1:n=Dt.lastIndex-2,p=["word",r.slice(h,n+1),h,n],w.push(p),h=n);break}}return h++,p}function N(A){C.push(A)}return{back:N,endOfFile:S,nextToken:k,position:v}};let bo=Me,sr=class extends bo{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Gs=sr;sr.default=sr;bo.registerAtRule(sr);let So=Me,Co,vo,Ue=class extends So{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let o of i)o.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Co(new vo,this,e).stringify()}};Ue.registerLazyResult=s=>{Co=s};Ue.registerProcessor=s=>{vo=s};var ft=Ue;Ue.default=Ue;So.registerRoot(Ue);let nt={comma(s){return nt.split(s,[","],!0)},space(s){let e=[" ",`
|
|
62
|
+
`," "];return nt.split(s,e)},split(s,e,t){let r=[],i="",o=!1,n=0,l=!1,a="",u=!1;for(let c of s)u?u=!1:c==="\\"?u=!0:l?c===a&&(l=!1):c==='"'||c==="'"?(l=!0,a=c):c==="("?n+=1:c===")"?n>0&&(n-=1):n===0&&e.includes(c)&&(o=!0),o?(i!==""&&r.push(i.trim()),i="",o=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}};var Io=nt;nt.default=nt;let xo=Me,Kc=Io,ir=class extends xo{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Kc.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var js=ir;ir.default=ir;xo.registerRule(ir);let Qc=gr,qc=Xc,eh=wr,th=Gs,rh=ft,zi=js;const Wi={empty:!0,space:!0};function sh(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let ih=class{constructor(e){this.input=e,this.root=new rh,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new th;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,o,n=!1,l=!1,a=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){l=!0;break}else if(r==="}"){if(a.length>0){for(o=a.length-1,i=a[o];i&&i[0]==="space";)i=a[--o];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){n=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),n&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let o=t-1;o>=0&&(i=e[o],!(i[0]!=="space"&&(r+=1,r===2)));o--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,o;for(let[n,l]of e.entries()){if(r=l,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!o)this.doubleColon(r);else{if(o[0]==="word"&&o[1]==="progid")continue;return n}o=r}return!1}comment(e){let t=new eh;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=qc(this.input)}decl(e,t){let r=new Qc;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||sh(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let o;for(;e.length;)if(o=e.shift(),o[0]===":"){r.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),r.raws.between+=o[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let n=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)n.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(o=e[u],o[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(r.raws.important=c);break}else if(o[1].toLowerCase()==="important"){let c=e.slice(0),f="";for(let d=u;d>0;d--){let m=c[d][0];if(f.trim().indexOf("!")===0&&m!=="space")break;f=c.pop()[1]+f}f.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=f,e=c)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=n.map(u=>u[1]).join(""),n=[]),this.raw(r,"value",n.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new zi;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,o=null,n=[],l=e[1].startsWith("--"),a=[],u=e;for(;u;){if(r=u[0],a.push(u),r==="("||r==="[")o||(o=u),n.push(r==="("?")":"]");else if(l&&i&&r==="{")o||(o=u),n.push("}");else if(n.length===0)if(r===";")if(i){this.decl(a,l);return}else break;else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop()),t=!0;break}else r===":"&&(i=!0);else r===n[n.length-1]&&(n.pop(),n.length===0&&(o=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),n.length>0&&this.unclosedBracket(o),t&&i){if(!l)for(;a.length&&(u=a[a.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let o,n,l=r.length,a="",u=!0,c,f;for(let d=0;d<l;d+=1)o=r[d],n=o[0],n==="space"&&d===l-1&&!i?u=!1:n==="comment"?(f=r[d-1]?r[d-1][0]:"empty",c=r[d+1]?r[d+1][0]:"empty",!Wi[f]&&!Wi[c]?a.slice(-1)===","?u=!1:a+=o[1]:u=!1):a+=o[1];if(!u){let d=r.reduce((m,p)=>m+p[1],"");e.raws[t]={raw:d,value:a}}e[t]=a}rule(e){e.pop();let t=new zi;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var nh=ih;let oh=Me,ah=nh,lh=yr;function nr(s,e){let t=new lh(s,e),r=new ah(t);try{r.parse()}catch(i){throw i}return r.root}var Hs=nr;nr.default=nr;oh.registerParse(nr);let{isClean:ue,my:uh}=ht,ch=no,hh=pr,fh=Me,dh=Ws;let Vi=Vs,ph=Hs,mh=ft;const gh={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},yh={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},wh={Once:!0,postcssPlugin:!0,prepare:!0},ze=0;function Ze(s){return typeof s=="object"&&typeof s.then=="function"}function Eo(s){let e=!1,t=gh[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,ze,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,ze,t+"Exit"]:[t,t+"Exit"]}function Gi(s){let e;return s.type==="document"?e=["Document",ze,"DocumentExit"]:s.type==="root"?e=["Root",ze,"RootExit"]:e=Eo(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function ws(s){return s[ue]=!1,s.nodes&&s.nodes.forEach(e=>ws(e)),s}let bs={},We=class Mo{constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=ws(t);else if(t instanceof Mo||t instanceof Vi)i=ws(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let o=ph;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{i=o(t,r)}catch(n){this.processed=!0,this.error=n}i&&!i[uh]&&fh.rebuild(i)}this.result=new Vi(e,i,r),this.helpers=te(O({},bs),{postcss:bs,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?O(O({},o),o.prepare(this.result)):o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!yh[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!wh[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(Ze(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ue];){e[ue]=!0;let t=[Gi(e)];for(;t.length>0;){let r=this.visitTick(t);if(Ze(r))try{await r}catch(i){let o=t[t.length-1].node;throw this.handleError(i,o)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(o=>r(o,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return Ze(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=hh;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new ch(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(Ze(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ue];)e[ue]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let o;try{o=i(t,this.helpers)}catch(n){throw this.handleError(n,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Ze(o))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[n,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=n;try{return l(r.toProxy(),this.helpers)}catch(a){throw this.handleError(a,r)}}if(t.iterator!==0){let n=t.iterator,l;for(;l=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!l[ue]){l[ue]=!0,e.push(Gi(l));return}t.iterator=0,delete r.indexes[n]}let o=t.events;for(;t.eventIndex<o.length;){let n=o[t.eventIndex];if(t.eventIndex+=1,n===ze){r.nodes&&r.nodes.length&&(r[ue]=!0,t.iterator=r.getIterator());return}else if(this.listeners[n]){t.visitors=this.listeners[n];return}}e.pop()}walkSync(e){e[ue]=!0;let t=Eo(e);for(let r of t)if(r===ze)e.nodes&&e.each(i=>{i[ue]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}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"}};We.registerPostcss=s=>{bs=s};var Oo=We;We.default=We;mh.registerLazyResult(We);dh.registerLazyResult(We);let bh=no,Sh=pr;let Ch=Hs;const vh=Vs;let Ss=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,o=Sh;this.result=new vh(this._processor,i,this._opts),this.result.css=t;let n=this;Object.defineProperty(this.result,"root",{get(){return n.root}});let l=new bh(o,i,this._opts,t);if(l.isMap()){let[a,u]=l.generate();a&&(this.result.css=a),u&&(this.result.map=u)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Ch;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Ih=Ss;Ss.default=Ss;let xh=Ih,Eh=Oo,Mh=Ws,Oh=ft,ot=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new xh(this,e,t):new Eh(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Ah=ot;ot.default=ot;Oh.registerProcessor(ot);Mh.registerProcessor(ot);let Rh=gr,$h=eo,Nh=wr,kh=Gs,Th=yr,Ph=ft,Lh=js;function at(s,e){if(Array.isArray(s))return s.map(n=>at(n));let i=s,{inputs:t}=i,r=Re(i,["inputs"]);if(t){e=[];for(let n of t){let l=te(O({},n),{__proto__:Th.prototype});l.map&&(l.map=te(O({},l.map),{__proto__:$h.prototype})),e.push(l)}}if(r.nodes&&(r.nodes=s.nodes.map(n=>at(n,e))),r.source){let o=r.source,{inputId:n}=o,l=Re(o,["inputId"]);r.source=l,n!=null&&(r.source.input=e[n])}if(r.type==="root")return new Ph(r);if(r.type==="decl")return new Rh(r);if(r.type==="rule")return new Lh(r);if(r.type==="comment")return new Nh(r);if(r.type==="atrule")return new kh(r);throw new Error("Unknown node type: "+s.type)}var Dh=at;at.default=at;let _h=Bs,Ao=gr,Fh=Oo,Bh=Me,Ys=Ah,Uh=pr,zh=Dh,Ro=Ws,Wh=wo,$o=wr,No=Gs,Vh=Vs,Gh=yr,jh=Hs,Hh=Io,ko=js,To=ft,Yh=mr;function P(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Ys(s)}P.plugin=function(e,t){let r=!1;function i(...n){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
63
63
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
64
|
-
https://www.w3ctech.com/topic/2226`));let l=t(...
|
|
64
|
+
https://www.w3ctech.com/topic/2226`));let l=t(...n);return l.postcssPlugin=e,l.postcssVersion=new Ys().version,l}let o;return Object.defineProperty(i,"postcss",{get(){return o||(o=i()),o}}),i.process=function(n,l,a){return P([i(a)]).process(n,l)},i};P.stringify=Uh;P.parse=jh;P.fromJSON=zh;P.list=Hh;P.comment=s=>new $o(s);P.atRule=s=>new No(s);P.decl=s=>new Ao(s);P.rule=s=>new ko(s);P.root=s=>new To(s);P.document=s=>new Ro(s);P.CssSyntaxError=_h;P.Declaration=Ao;P.Container=Bh;P.Processor=Ys;P.Document=Ro;P.Comment=$o;P.Warning=Wh;P.AtRule=No;P.Result=Vh;P.Input=Gh;P.Rule=ko;P.Root=To;P.Node=Yh;Fh.registerPostcss(P);var Zh=P;P.default=P;const z=oc(Zh);z.stringify;z.fromJSON;z.plugin;z.parse;z.list;z.document;z.comment;z.atRule;z.rule;z.decl;z.root;z.CssSyntaxError;z.Declaration;z.Container;z.Processor;z.Document;z.Comment;z.Warning;z.AtRule;z.Result;z.Input;z.Rule;z.Root;z.Node;class Zs{constructor(...e){re(this,"parentElement",null),re(this,"parentNode",null),re(this,"ownerDocument"),re(this,"firstChild",null),re(this,"lastChild",null),re(this,"previousSibling",null),re(this,"nextSibling",null),re(this,"ELEMENT_NODE",1),re(this,"TEXT_NODE",3),re(this,"nodeType"),re(this,"nodeName"),re(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof Zs){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const ji={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Hi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},_t={},Jh=()=>!!globalThis.Zone;function Js(s){if(_t[s])return _t[s];const e=globalThis[s],t=e.prototype,r=s in ji?ji[s]:void 0,i=!!(r&&r.every(l=>{var a,u;return!!((u=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&u.toString().includes("[native code]"))})),o=s in Hi?Hi[s]:void 0,n=!!(o&&o.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(i&&n&&!Jh())return _t[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const a=l.contentWindow;if(!a)return e.prototype;const u=a[s].prototype;return document.body.removeChild(l),u?_t[s]=u:t}catch(l){return t}}const Dr={};function Se(s,e,t){var r;const i=`${s}.${String(t)}`;if(Dr[i])return Dr[i].call(e);const o=Js(s),n=(r=Object.getOwnPropertyDescriptor(o,t))==null?void 0:r.get;return n?(Dr[i]=n,n.call(e)):e[t]}const _r={};function Po(s,e,t){const r=`${s}.${String(t)}`;if(_r[r])return _r[r].bind(e);const o=Js(s)[t];return typeof o!="function"?e[t]:(_r[r]=o,o.bind(e))}function Xh(s){return Se("Node",s,"childNodes")}function Kh(s){return Se("Node",s,"parentNode")}function Qh(s){return Se("Node",s,"parentElement")}function qh(s){return Se("Node",s,"textContent")}function ef(s,e){return Po("Node",s,"contains")(e)}function tf(s){return Po("Node",s,"getRootNode")()}function rf(s){return!s||!("host"in s)?null:Se("ShadowRoot",s,"host")}function sf(s){return s.styleSheets}function nf(s){return!s||!("shadowRoot"in s)?null:Se("Element",s,"shadowRoot")}function of(s,e){return Se("Element",s,"querySelector")(e)}function af(s,e){return Se("Element",s,"querySelectorAll")(e)}function Lo(){return Js("MutationObserver").constructor}function Oe(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch(r){return()=>{}}}function lf(s){const e=s.tagName.toLowerCase(),t=s.id?`#${s.id}`:"",r=s.classList.length?"."+Array.from(s.classList).join("."):"";return`${e}${t}${r}`}function uf(s){var d;var e,t;const r=(d=(e=s.ownerDocument)==null?void 0:e.defaultView)!=null?d:window,i=s.getBoundingClientRect(),o=r.innerWidth||r.document.documentElement.clientWidth||0,n=r.innerHeight||r.document.documentElement.clientHeight||0,l=i.width>0&&i.height>0&&i.bottom>0&&i.right>0&&i.top<n&&i.left<o,a=(t=r.getComputedStyle)==null?void 0:t.call(r,s),c=!!a&&a.display!=="none"&&a.visibility!=="hidden"&&(parseFloat(a.opacity)||0)>0&&l;let f=0;if(c){const m=Math.max(0,Math.min(i.right,o)-Math.max(i.left,0)),p=Math.max(0,Math.min(i.bottom,n)-Math.max(i.top,0)),g=m*p,h=i.width*i.height;f=h>0?g/h:0}return{isVisible:c,ratio:f}}const x={childNodes:Xh,parentNode:Kh,parentElement:Qh,textContent:qh,contains:ef,getRootNode:tf,host:rf,styleSheets:sf,shadowRoot:nf,querySelector:of,querySelectorAll:af,mutationObserver:Lo,patch:Oe,describeNode:lf,getElementVisibility:uf};function J(s,e,t=document){const r={capture:!0,passive:!0};return t.addEventListener(s,e,r),()=>t.removeEventListener(s,e,r)}const Ne=`Please stop import mirror directly. Instead of that,\r
|
|
65
65
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
66
|
-
or you can use record.mirror to access the mirror instance during recording.`;let zi={map:{},getId(){return console.error($e),-1},getNode(){return console.error($e),null},removeNodeFromMap(){console.error($e)},has(){return console.error($e),!1},reset(){console.error($e)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(zi=new Proxy(zi,{get(s,e,t){return e==="map"&&console.error($e),Reflect.get(s,e,t)}}));function ot(s,e,t={}){let r=null,i=0;return function(...n){const o=Date.now();!i&&t.leading===!1&&(i=o);const l=e-(o-i),a=this;l<=0||l>e?(r&&(clearTimeout(r),r=null),i=o,s.apply(a,n)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{i=t.leading===!1?0:Date.now(),r=null,s.apply(a,n)},l))}}function gr(s,e,t,r,i=window){const n=i.Object.getOwnPropertyDescriptor(s,e);return i.Object.defineProperty(s,e,r?t:{set(o){setTimeout(()=>{t.set.call(this,o)},0),n&&n.set&&n.set.call(this,o)}}),()=>gr(s,e,n||{},!0)}function gs(){return Math.round(performance.timeOrigin+performance.now())}function Do(s=window){var e,t,r,i;const n=s.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:s.pageXOffset!==void 0?s.pageXOffset:n.documentElement.scrollLeft||(n==null?void 0:n.body)&&((e=O.parentElement(n.body))==null?void 0:e.scrollLeft)||((t=n==null?void 0:n.body)==null?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:s.pageYOffset!==void 0?s.pageYOffset:(n==null?void 0:n.documentElement.scrollTop)||(n==null?void 0:n.body)&&((r=O.parentElement(n.body))==null?void 0:r.scrollTop)||((i=n==null?void 0:n.body)==null?void 0:i.scrollTop)||0}}function Lo(s=window){const e=s.document;return s.innerHeight||e.documentElement&&e.documentElement.clientHeight||e.body&&e.body.clientHeight||0}function _o(s=window){const e=s.document;return s.innerWidth||e.documentElement&&e.documentElement.clientWidth||e.body&&e.body.clientWidth||0}function Fo(s){return s?s.nodeType===s.ELEMENT_NODE?s:O.parentElement(s):null}function K(s,e,t,r){if(!s)return!1;const i=Fo(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(Jt(i,e,r))return!0}catch(n){}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function rf(s,e){return e.getId(s)!==-1}function Dr(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===Ke}function Uo(s,e){if(Ze(s))return!1;const t=e.getId(s);if(!e.has(t))return!0;const r=O.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?Uo(r,e):!0}function ys(s){return!!s.changedTouches}function sf(s=window){"NodeList"in s&&!s.NodeList.prototype.forEach&&(s.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in s&&!s.DOMTokenList.prototype.forEach&&(s.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function Bo(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function Wo(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function ws(s){return s?s instanceof Gs&&"shadowRoot"in s?!!s.shadowRoot:!!O.shadowRoot(s):!1}class nf{constructor(){w(this,"id",1),w(this,"styleIDMap",new WeakMap),w(this,"idStyleMap",new Map)}getId(e){var t;return(t=this.styleIDMap.get(e))!=null?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return t===void 0?r=this.id++:r=t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function zo(s){var e;let t=null;return"getRootNode"in s&&((e=O.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&O.host(O.getRootNode(s))&&(t=O.host(O.getRootNode(s))),t}function of(s){let e=s,t;for(;t=zo(e);)e=t;return e}function af(s){const e=s.ownerDocument;if(!e)return!1;const t=of(s);return O.contains(e,t)}function Vo(s){const e=s.ownerDocument;return e?O.contains(e,s)||af(s):!1}var $=(s=>(s[s.DomContentLoaded=0]="DomContentLoaded",s[s.Load=1]="Load",s[s.FullSnapshot=2]="FullSnapshot",s[s.IncrementalSnapshot=3]="IncrementalSnapshot",s[s.Meta=4]="Meta",s[s.Custom=5]="Custom",s[s.Plugin=6]="Plugin",s))($||{}),A=(s=>(s[s.Mutation=0]="Mutation",s[s.MouseMove=1]="MouseMove",s[s.MouseInteraction=2]="MouseInteraction",s[s.Scroll=3]="Scroll",s[s.ViewportResize=4]="ViewportResize",s[s.Input=5]="Input",s[s.TouchMove=6]="TouchMove",s[s.MediaInteraction=7]="MediaInteraction",s[s.StyleSheetRule=8]="StyleSheetRule",s[s.CanvasMutation=9]="CanvasMutation",s[s.Font=10]="Font",s[s.Log=11]="Log",s[s.Drag=12]="Drag",s[s.StyleDeclaration=13]="StyleDeclaration",s[s.Selection=14]="Selection",s[s.AdoptedStyleSheet=15]="AdoptedStyleSheet",s[s.CustomElement=16]="CustomElement",s))(A||{}),Q=(s=>(s[s.MouseUp=0]="MouseUp",s[s.MouseDown=1]="MouseDown",s[s.Click=2]="Click",s[s.ContextMenu=3]="ContextMenu",s[s.DblClick=4]="DblClick",s[s.Focus=5]="Focus",s[s.Blur=6]="Blur",s[s.TouchStart=7]="TouchStart",s[s.TouchMove_Departed=8]="TouchMove_Departed",s[s.TouchEnd=9]="TouchEnd",s[s.TouchCancel=10]="TouchCancel",s))(Q||{}),me=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(me||{}),We=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(We||{}),Ne=(s=>(s[s.Play=0]="Play",s[s.Pause=1]="Pause",s[s.Seeked=2]="Seeked",s[s.VolumeChange=3]="VolumeChange",s[s.RateChange=4]="RateChange",s))(Ne||{}),Go=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(Go||{});function Vi(s){return"__ln"in s}class lf{constructor(){w(this,"length",0),w(this,"head",null),w(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=(t==null?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Vi(e.previousSibling)){const r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&Vi(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const Gi=(s,e)=>`${s}@${e}`;class uf{constructor(){w(this,"frozen",!1),w(this,"locked",!1),w(this,"texts",[]),w(this,"attributes",[]),w(this,"attributeMap",new WeakMap),w(this,"removes",[]),w(this,"mapRemoves",[]),w(this,"movedMap",{}),w(this,"addedSet",new Set),w(this,"movedSet",new Set),w(this,"droppedSet",new Set),w(this,"removesSubTreeCache",new Set),w(this,"mutationCb"),w(this,"blockClass"),w(this,"blockSelector"),w(this,"maskTextClass"),w(this,"maskTextSelector"),w(this,"excludeAttribute"),w(this,"includeAttribute"),w(this,"inlineStylesheet"),w(this,"maskInputOptions"),w(this,"maskTextFn"),w(this,"maskInputFn"),w(this,"keepIframeSrcFn"),w(this,"recordCanvas"),w(this,"inlineImages"),w(this,"slimDOMOptions"),w(this,"dataURLOptions"),w(this,"doc"),w(this,"mirror"),w(this,"iframeManager"),w(this,"stylesheetManager"),w(this,"shadowDomManager"),w(this,"canvasManager"),w(this,"processedNodeManager"),w(this,"unattachedDoc"),w(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),w(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new lf,i=a=>{let u=a,c=Ke;for(;c===Ke;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},n=a=>{const u=O.parentNode(a);if(!u||!Vo(a))return;let c=!1;if(a.nodeType===Node.TEXT_NODE){const m=u.tagName;if(m==="TEXTAREA")return;m==="STYLE"&&this.addedSet.has(u)&&(c=!0)}const h=Ze(u)?this.mirror.getId(zo(a)):this.mirror.getId(u),p=i(a);if(h===-1||p===-1)return r.addNode(a);const g=Pe(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,excludeAttribute:this.excludeAttribute,includeAttribute:this.includeAttribute,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:m=>{Bo(m,this.mirror)&&this.iframeManager.addIframe(m),Wo(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),ws(a)&&this.shadowDomManager.addShadowRoot(O.shadowRoot(a),this.doc)},onIframeLoad:(m,f)=>{this.iframeManager.attachIframe(m,f),this.shadowDomManager.observeAttachShadow(m)},onStylesheetLoad:(m,f)=>{this.stylesheetManager.attachLinkElement(m,f)},cssCaptured:c});g&&(e.push({parentId:h,nextId:p,node:g}),t.add(g.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of this.movedSet)ji(this.removesSubTreeCache,a,this.mirror)&&!this.movedSet.has(O.parentNode(a))||n(a);for(const a of this.addedSet)!Hi(this.droppedSet,a)&&!ji(this.removesSubTreeCache,a,this.mirror)||Hi(this.movedSet,a)?n(a):this.droppedSet.add(a);let o=null;for(;r.length;){let a=null;if(o){const u=this.mirror.getId(O.parentNode(o.value)),c=i(o.value);u!==-1&&c!==-1&&(a=o)}if(!a){let u=r.tail;for(;u;){const c=u;if(u=u.previous,c){const h=this.mirror.getId(O.parentNode(c.value));if(i(c.value)===-1)continue;if(h!==-1){a=c;break}else{const g=c.value,m=O.parentNode(g);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const f=O.host(m);if(this.mirror.getId(f)!==-1){a=c;break}}}}}}if(!a){for(;r.head;)r.removeNode(r.head.value);break}o=a.previous,r.removeNode(a.value),n(a.value)}const l={texts:this.texts.map(a=>{const u=a.node,c=O.parentNode(u);return c&&c.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(c),{id:this.mirror.getId(u),value:a.value}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>{const{attributes:u}=a;if(typeof u.style=="string"){const c=JSON.stringify(a.styleDiff),h=JSON.stringify(a._unchangedStyles);c.length<u.style.length&&(c+h).split("var(").length===u.style.split("var(").length&&(u.style=a.styleDiff)}return{id:this.mirror.getId(a.node),attributes:u}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:e};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(l))}),w(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));const r=Array.from(O.childNodes(e),i=>O.textContent(i)||"").join("");t.attributes.value=Ht({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Yt(e),value:r,maskInputFn:this.maskInputFn})}),w(this,"processMutation",e=>{if(!Dr(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=O.textContent(e.target);!K(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:fn(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Fo(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,i=e.target.getAttribute(r);const n=t[r];if(i===null&&!t.hasAttribute(r)&&e.oldValue!==null&&(n===""||n===null||typeof n=="undefined")||hn(r,this.excludeAttribute))return;if(r==="value"){const a=Yt(t);i=Ht({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:a,value:i,maskInputFn:this.maskInputFn})}if(K(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let l=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(l||(l={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(l),this.attributeMap.set(e.target,l)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!cn(t.tagName,r)){if(l.attributes[r]=un(this.doc,xe(t.tagName),xe(r),i),i===l.attributes[r]){console.debug("[rrweb-record] A questionable mutation that needs to be investigated in the future.");return}if(r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(u){this.unattachedDoc=this.doc}const a=this.unattachedDoc.createElement("span");e.oldValue&&a.setAttribute("style",e.oldValue);for(const u of Array.from(t.style)){const c=t.style.getPropertyValue(u),h=t.style.getPropertyPriority(u);c!==a.style.getPropertyValue(u)||h!==a.style.getPropertyPriority(u)?h===""?l.styleDiff[u]=c:l.styleDiff[u]=[c,h]:l._unchangedStyles[u]=[c,h]}for(const u of Array.from(a.style))t.style.getPropertyValue(u)===""&&(l.styleDiff[u]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?l.attributes.rr_open_mode="modal":l.attributes.rr_open_mode="non-modal")}break}case"childList":{if(K(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const r=this.mirror.getId(t),i=Ze(e.target)?this.mirror.getId(O.host(e.target)):this.mirror.getId(e.target);K(e.target,this.blockClass,this.blockSelector,!1)||Dr(t,this.mirror,this.slimDOMOptions)||!rf(t,this.mirror)||(this.addedSet.has(t)?(bs(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||Uo(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Gi(r,i)]?bs(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:Ze(e.target)&&Je(e.target)?!0:void 0}),cf(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),w(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Dr(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&r!==-1&&(this.movedMap[Gi(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);K(e,this.blockClass,this.blockSelector,!1)||(O.childNodes(e).forEach(r=>this.genAdds(r)),ws(e)&&O.childNodes(O.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","excludeAttribute","includeAttribute","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function bs(s,e){s.delete(e),O.childNodes(e).forEach(t=>bs(s,t))}function cf(s,e){const t=[s];for(;t.length;){const r=t.pop();e.has(r)||(e.add(r),O.childNodes(r).forEach(i=>t.push(i)))}}function ji(s,e,t){return s.size===0?!1:hf(s,e)}function hf(s,e,t){const r=O.parentNode(e);return r?s.has(r):!1}function Hi(s,e){return s.size===0?!1:jo(s,e)}function jo(s,e){const t=O.parentNode(e);return t?s.has(t)?!0:jo(s,t):!1}let Xe;function ff(s){Xe=s}function pf(){Xe=void 0}const M=s=>Xe?(...t)=>{try{return s(...t)}catch(r){if(Xe&&Xe(r)===!0)return;throw r}}:s,Ie=[];function ht(s){try{if("composedPath"in s){const e=s.composedPath();if(e.length)return e[0]}else if("path"in s&&s.path.length)return s.path[0]}catch(e){}return s&&s.target}function Ho(s,e){const t=new uf;Ie.push(t),t.init(s);const r=new(To())(M(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function df({mousemoveCb:s,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};const i=typeof e.mousemove=="number"?e.mousemove:50,n=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let o=[],l;const a=ot(M(h=>{const p=Date.now()-l;s(o.map(g=>(g.timeOffset-=p,g)),h),o=[],l=null}),n),u=M(ot(M(h=>{const p=ht(h),{clientX:g,clientY:m}=ys(h)?h.changedTouches[0]:h;l||(l=gs()),o.push({x:g,y:m,id:r.getId(p),timeOffset:gs()-l}),a(typeof DragEvent!="undefined"&&h instanceof DragEvent?A.Drag:h instanceof MouseEvent?A.MouseMove:A.TouchMove)}),i,{trailing:!1})),c=[X("mousemove",u,t),X("touchmove",u,t),X("drag",u,t)];return M(()=>{c.forEach(h=>h())})}function mf({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){if(n.mouseInteraction===!1)return()=>{console.debug("MouseInteractionObserver: No operation needed")};const o=n.mouseInteraction===!0||n.mouseInteraction===void 0?{}:n.mouseInteraction,l=[];let a=null;const u=c=>h=>{const p=ht(h);if(K(p,r,i,!0))return;let g=null,m=c;if("pointerType"in h){switch(h.pointerType){case"mouse":g=me.Mouse;break;case"touch":g=me.Touch;break;case"pen":g=me.Pen;break}g===me.Touch?Q[c]===Q.MouseDown?m="TouchStart":Q[c]===Q.MouseUp&&(m="TouchEnd"):me.Pen}else ys(h)&&(g=me.Touch);g!==null?(a=g,(m.startsWith("Touch")&&g===me.Touch||m.startsWith("Mouse")&&g===me.Mouse)&&(g=null)):Q[c]===Q.Click&&(g=a,a=null);const f=ys(h)?h.changedTouches[0]:h;if(!f)return;const d=t.getId(p),{clientX:C,clientY:S}=f;M(s)(R({type:Q[m],id:d,x:C,y:S},g!==null&&{pointerType:g}))};return Object.keys(Q).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&o[c]!==!1).forEach(c=>{let h=xe(c);const p=u(c);if(window.PointerEvent)switch(Q[c]){case Q.MouseDown:case Q.MouseUp:h=h.replace("mouse","pointer");break;case Q.TouchStart:case Q.TouchEnd:return}l.push(X(h,p,e))}),M(()=>{l.forEach(c=>c())})}function Yo({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){const o=M(ot(M(l=>{const a=ht(l);if(!a||K(a,r,i,!0))return;const u=t.getId(a);if(a===e&&e.defaultView){const c=Do(e.defaultView);s({id:u,x:c.left,y:c.top})}else s({id:u,x:a.scrollLeft,y:a.scrollTop})}),n.scroll||100));return X("scroll",o,e)}function gf({viewportResizeCb:s},{win:e}){let t=-1,r=-1;const i=M(ot(M(()=>{const n=Lo(),o=_o();(t!==n||r!==o)&&(s({width:Number(o),height:Number(n)}),t=n,r=o)}),200));return X("resize",i,e)}const Lr=["INPUT","TEXTAREA","SELECT"],Yi=new WeakMap;function yf({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:n,ignoreSelector:o,maskInputOptions:l,maskInputFn:a,sampling:u,userTriggeredOnInput:c}){function h(S){let y=ht(S);const v=S.isTrusted,I=y&&y.tagName;if(y&&I==="OPTION"&&(y=O.parentElement(y)),!y||!I||Lr.indexOf(I)<0||K(y,r,i,!0)||y.classList.contains(n)||o&&y.matches(o))return;let W=y.value,F=!1;const b=Yt(y)||"";b==="radio"||b==="checkbox"?F=y.checked:(l[I.toLowerCase()]||l[b])&&(W=Ht({element:y,maskInputOptions:l,tagName:I,type:b,value:W,maskInputFn:a})),p(y,c?{text:W,isChecked:F,userTriggered:v}:{text:W,isChecked:F});const x=y.name;b==="radio"&&x&&F&&e.querySelectorAll(`input[type="radio"][name="${x}"]`).forEach(z=>{if(z!==y){const H=z.value;p(z,c?{text:H,isChecked:!F,userTriggered:!1}:{text:H,isChecked:!F})}})}function p(S,y){const v=Yi.get(S),I=S,W=I.hasAttribute("placeholder"),F=I.value==="",b=typeof I.defaultValue=="string"?I.defaultValue==="":!0,x=!y.userTriggered,z=!v||v.text==="",H=W&&F&&b&&z&&x&&!y.isChecked&&I.type!=="hidden"&&Lr.includes(I.tagName),te=I.tagName==="INPUT"&&I.type==="text"&&!y.userTriggered&&y.text===I.defaultValue&&!v&&I.hasAttribute("placeholder"),fe=!y.userTriggered&&I.value===I.defaultValue&&!v&&I.hasAttribute("placeholder")&&!y.isChecked&&I.type!=="hidden"&&Lr.includes(I.tagName),re=I.type==="checkbox"&&!y.userTriggered&&!y.isChecked&&!v,E=I.type==="radio"&&!y.userTriggered&&!y.isChecked&&!v;if(!(H||te||fe||re||E)&&(!v||v.text!==y.text||v.isChecked!==y.isChecked)){Yi.set(S,y);const pe=t.getId(S);M(s)(q(R({},y),{id:pe}))}}const m=(u.input==="last"?["change"]:["input","change"]).map(S=>X(S,M(h),e)),f=e.defaultView;if(!f)return()=>{m.forEach(S=>S())};const d=f.Object.getOwnPropertyDescriptor(f.HTMLInputElement.prototype,"value"),C=[[f.HTMLInputElement.prototype,"value"],[f.HTMLInputElement.prototype,"checked"],[f.HTMLSelectElement.prototype,"value"],[f.HTMLTextAreaElement.prototype,"value"],[f.HTMLSelectElement.prototype,"selectedIndex"],[f.HTMLOptionElement.prototype,"selected"]];return d&&d.set&&m.push(...C.map(S=>gr(S[0],S[1],{set(){M(h)({target:this,isTrusted:!1})}},!1,f))),M(()=>{m.forEach(S=>S())})}function ir(s){const e=[];function t(r,i){if(_t("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||_t("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||_t("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||_t("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const o=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(o)}else if(r.parentStyleSheet){const o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(o)}return i}return t(s,e)}function we(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function wf({styleSheetRuleCb:s,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:M((c,h,p)=>{const[g,m]=p,{id:f,styleId:d}=we(h,e,t.styleMirror);return(f&&f!==-1||d&&d!==-1)&&s({id:f,styleId:d,adds:[{rule:g,index:m}]}),c.apply(h,p)})}),r.CSSStyleSheet.prototype.addRule=function(c,h,p=this.cssRules.length){const g=`${c} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[g,p])};const n=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:M((c,h,p)=>{const[g]=p,{id:m,styleId:f}=we(h,e,t.styleMirror);return(m&&m!==-1||f&&f!==-1)&&s({id:m,styleId:f,removes:[{index:g}]}),c.apply(h,p)})}),r.CSSStyleSheet.prototype.removeRule=function(c){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[c])};let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:M((c,h,p)=>{const[g]=p,{id:m,styleId:f}=we(h,e,t.styleMirror);return(m&&m!==-1||f&&f!==-1)&&s({id:m,styleId:f,replace:g}),c.apply(h,p)})}));let l;r.CSSStyleSheet.prototype.replaceSync&&(l=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:M((c,h,p)=>{const[g]=p,{id:m,styleId:f}=we(h,e,t.styleMirror);return(m&&m!==-1||f&&f!==-1)&&s({id:m,styleId:f,replaceSync:g}),c.apply(h,p)})}));const a={};Ft("CSSGroupingRule")?a.CSSGroupingRule=r.CSSGroupingRule:(Ft("CSSMediaRule")&&(a.CSSMediaRule=r.CSSMediaRule),Ft("CSSConditionRule")&&(a.CSSConditionRule=r.CSSConditionRule),Ft("CSSSupportsRule")&&(a.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(a).forEach(([c,h])=>{u[c]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(u[c].insertRule,{apply:M((p,g,m)=>{const[f,d]=m,{id:C,styleId:S}=we(g.parentStyleSheet,e,t.styleMirror);return(C&&C!==-1||S&&S!==-1)&&s({id:C,styleId:S,adds:[{rule:f,index:[...ir(g),d||0]}]}),p.apply(g,m)})}),h.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:M((p,g,m)=>{const[f]=m,{id:d,styleId:C}=we(g.parentStyleSheet,e,t.styleMirror);return(d&&d!==-1||C&&C!==-1)&&s({id:d,styleId:C,removes:[{index:[...ir(g),f]}]}),p.apply(g,m)})})}),M(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=n,o&&(r.CSSStyleSheet.prototype.replace=o),l&&(r.CSSStyleSheet.prototype.replaceSync=l),Object.entries(a).forEach(([c,h])=>{h.prototype.insertRule=u[c].insertRule,h.prototype.deleteRule=u[c].deleteRule})})}function Zo({mirror:s,stylesheetManager:e},t){var r,i,n;let o=null;t.nodeName==="#document"?o=s.getId(t):o=s.getId(O.host(t));const l=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(n=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:n.ShadowRoot,a=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!l||!a?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){var u;return(u=a.get)==null?void 0:u.call(this)},set(u){var c;const h=(c=a.set)==null?void 0:c.call(this,u);if(o!==null&&o!==-1)try{e.adoptStyleSheets(u,o)}catch(p){}return h}}),M(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function bf({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){const n=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:M((l,a,u)=>{var c;const[h,p,g]=u;if(t.has(h))return n.apply(a,[h,p,g]);const{id:m,styleId:f}=we((c=a.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(m&&m!==-1||f&&f!==-1)&&s({id:m,styleId:f,set:{property:h,value:p,priority:g},index:ir(a.parentRule)}),l.apply(a,u)})});const o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:M((l,a,u)=>{var c;const[h]=u;if(t.has(h))return o.apply(a,[h]);const{id:p,styleId:g}=we((c=a.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(p&&p!==-1||g&&g!==-1)&&s({id:p,styleId:g,remove:{property:h},index:ir(a.parentRule)}),l.apply(a,u)})}),M(()=>{i.CSSStyleDeclaration.prototype.setProperty=n,i.CSSStyleDeclaration.prototype.removeProperty=o})}function Sf({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:n}){const o=M(a=>ot(M(u=>{const c=ht(u);if(!c||K(c,e,t,!0))return;const{currentTime:h,volume:p,muted:g,playbackRate:m,loop:f}=c;s({type:a,id:r.getId(c),currentTime:h,volume:p,muted:g,playbackRate:m,loop:f})}),i.media||500)),l=[X("play",o(Ne.Play),n),X("pause",o(Ne.Pause),n),X("seeked",o(Ne.Seeked),n),X("volumechange",o(Ne.VolumeChange),n),X("ratechange",o(Ne.RateChange),n)];return M(()=>{l.forEach(a=>a())})}function Cf({fontCb:s,doc:e}){const t=e.defaultView;if(!t)return()=>{};const r=[],i=new WeakMap,n=t.FontFace;t.FontFace=function(a,u,c){const h=new n(a,u,c);return i.set(h,{family:a,buffer:typeof u!="string",descriptors:c,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),h};const o=Ae(e.fonts,"add",function(l){return function(a){return setTimeout(M(()=>{const u=i.get(a);u&&(s(u),i.delete(a))}),0),l.apply(this,[a])}});return r.push(()=>{t.FontFace=n}),r.push(o),M(()=>{r.forEach(l=>l())})}function vf(s){const{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:n}=s;let o=!0;const l=M(()=>{const a=e.getSelection();if(!a||o&&(a!=null&&a.isCollapsed))return;o=a.isCollapsed||!1;const u=[],c=a.rangeCount||0;for(let h=0;h<c;h++){const p=a.getRangeAt(h),{startContainer:g,startOffset:m,endContainer:f,endOffset:d}=p;K(g,r,i,!0)||K(f,r,i,!0)||u.push({start:t.getId(g),startOffset:m,end:t.getId(f),endOffset:d})}n({ranges:u})});return l(),X("selectionchange",l)}function If({doc:s,customElementCb:e}){const t=s.defaultView;return!t||!t.customElements?()=>{}:Ae(t.customElements,"define",function(i){return function(n,o,l){try{e({define:{name:n}})}catch(a){console.warn(`Custom element callback failed for ${n}`)}return i.apply(this,[n,o,l])}})}function xf(s,e){const{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:n,viewportResizeCb:o,inputCb:l,mediaInteractionCb:a,styleSheetRuleCb:u,styleDeclarationCb:c,canvasMutationCb:h,fontCb:p,selectionCb:g,customElementCb:m}=s;s.mutationCb=(...f)=>{e.mutation&&e.mutation(...f),t(...f)},s.mousemoveCb=(...f)=>{e.mousemove&&e.mousemove(...f),r(...f)},s.mouseInteractionCb=(...f)=>{e.mouseInteraction&&e.mouseInteraction(...f),i(...f)},s.scrollCb=(...f)=>{e.scroll&&e.scroll(...f),n(...f)},s.viewportResizeCb=(...f)=>{e.viewportResize&&e.viewportResize(...f),o(...f)},s.inputCb=(...f)=>{e.input&&e.input(...f),l(...f)},s.mediaInteractionCb=(...f)=>{e.mediaInteaction&&e.mediaInteaction(...f),a(...f)},s.styleSheetRuleCb=(...f)=>{e.styleSheetRule&&e.styleSheetRule(...f),u(...f)},s.styleDeclarationCb=(...f)=>{e.styleDeclaration&&e.styleDeclaration(...f),c(...f)},s.canvasMutationCb=(...f)=>{e.canvasMutation&&e.canvasMutation(...f),h(...f)},s.fontCb=(...f)=>{e.font&&e.font(...f),p(...f)},s.selectionCb=(...f)=>{e.selection&&e.selection(...f),g(...f)},s.customElementCb=(...f)=>{e.customElement&&e.customElement(...f),m(...f)}}function Of(s,e={}){const t=s.doc.defaultView;if(!t)return()=>{};xf(s,e);let r;s.recordDOM&&(r=Ho(s,s.doc));const i=df(s),n=mf(s),o=Yo(s),l=gf(s,{win:t}),a=yf(s),u=Sf(s);let c=()=>{},h=()=>{},p=()=>{},g=()=>{};s.recordDOM&&(c=wf(s,{win:t}),h=Zo(s,s.doc),p=bf(s,{win:t}),s.collectFonts&&(g=Cf(s)));const m=vf(s),f=If(s),d=[];for(const C of s.plugins)d.push(C.observer(C.callback,t,C.options));return M(()=>{Ie.forEach(C=>C.reset()),r==null||r.disconnect(),i(),n(),o(),l(),a(),u(),c(),h(),p(),g(),m(),f(),d.forEach(C=>C())})}function _t(s){return typeof window[s]!="undefined"}function Ft(s){return!!(typeof window[s]!="undefined"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}class Zi{constructor(e){w(this,"iframeIdToRemoteIdMap",new WeakMap),w(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){const n=r||this.getIdToRemoteIdMap(e),o=i||this.getRemoteIdToIdMap(e);let l=n.get(t);return l||(l=this.generateIdFn(),n.set(t,l),o.set(l,t)),l}getIds(e,t){const r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(n=>this.getId(e,n,r,i))}getRemoteId(e,t,r){const i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const n=i.get(t);return n||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map(i=>this.getRemoteId(e,i,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class Ef{constructor(e){w(this,"iframes",new WeakMap),w(this,"crossOriginIframeMap",new WeakMap),w(this,"crossOriginIframeMirror",new Zi(ln)),w(this,"crossOriginIframeStyleMirror"),w(this,"crossOriginIframeRootIdMap",new WeakMap),w(this,"mirror"),w(this,"mutationCb"),w(this,"wrappedEmit"),w(this,"loadListener"),w(this,"stylesheetManager"),w(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Zi(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;const i=this.crossOriginIframeMap.get(e.source);if(!i)return;const n=this.transformCrossOriginEvent(i,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case $.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:$.IncrementalSnapshot,data:{source:A.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case $.Meta:case $.Load:case $.DomContentLoaded:return!1;case $.Plugin:return t;case $.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case $.IncrementalSnapshot:switch(t.data.source){case A.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(i.node,n)}),t.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),t.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),t.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case A.Drag:case A.TouchMove:case A.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case A.ViewportResize:return!1;case A.MediaInteraction:case A.MouseInteraction:case A.Scroll:case A.CanvasMutation:case A.Input:return this.replaceIds(t.data,e,["id"]),t;case A.StyleSheetRule:case A.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case A.Font:return t;case A.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case A.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),t}}return!1}replace(e,t,r,i){for(const n of i)!Array.isArray(t[n])&&typeof t[n]!="number"||(Array.isArray(t[n])?t[n]=e.getIds(r,t[n]):t[n]=e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,t)})}patchRootIdOnNode(e,t){e.type!==Go.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}class Af{constructor(e){w(this,"shadowDoms",new WeakSet),w(this,"mutationCb"),w(this,"scrollCb"),w(this,"bypassOptions"),w(this,"mirror"),w(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!Je(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Ho(q(R({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Yo(q(R({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(O.host(e))),this.restoreHandlers.push(Zo({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const r=this;this.restoreHandlers.push(Ae(e.prototype,"attachShadow",function(i){return function(n){const o=i.call(this,n),l=O.shadowRoot(this);return l&&Vo(this)&&r.addShadowRoot(l,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Te="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Rf=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var Ut=0;Ut<Te.length;Ut++)Rf[Te.charCodeAt(Ut)]=Ut;var Mf=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=Te[e[t]>>2],i+=Te[(e[t]&3)<<4|e[t+1]>>4],i+=Te[(e[t+1]&15)<<2|e[t+2]>>6],i+=Te[e[t+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i};const Ji=new Map;function $f(s,e){let t=Ji.get(s);return t||(t=new Map,Ji.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}const Jo=(s,e,t)=>{if(!s||!(Ko(s,e)||typeof s=="object"))return;const r=s.constructor.name,i=$f(t,r);let n=i.indexOf(s);return n===-1&&(n=i.length,i.push(s)),n};function Gt(s,e,t){if(s instanceof Array)return s.map(r=>Gt(r,e,t));if(s===null)return s;if(s instanceof Float32Array||s instanceof Float64Array||s instanceof Int32Array||s instanceof Uint32Array||s instanceof Uint8Array||s instanceof Uint16Array||s instanceof Int16Array||s instanceof Int8Array||s instanceof Uint8ClampedArray)return{rr_type:s.constructor.name,args:[Object.values(s)]};if(s instanceof ArrayBuffer){const r=s.constructor.name,i=Mf(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[Gt(s.buffer,e,t),s.byteOffset,s.byteLength]};if(s instanceof HTMLImageElement){const r=s.constructor.name,{src:i}=s;return{rr_type:r,src:i}}else if(s instanceof HTMLCanvasElement){const r="HTMLImageElement",i=s.toDataURL();return{rr_type:r,src:i}}else{if(s instanceof ImageData)return{rr_type:s.constructor.name,args:[Gt(s.data,e,t),s.width,s.height]};if(Ko(s,e)||typeof s=="object"){const r=s.constructor.name,i=Jo(s,e,t);return{rr_type:r,index:i}}}}return s}const Xo=(s,e,t)=>s.map(r=>Gt(r,e,t)),Ko=(s,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>s instanceof e[i]);function Nf(s,e,t,r){const i=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const o of n)try{if(typeof e.CanvasRenderingContext2D.prototype[o]!="function")continue;const l=Ae(e.CanvasRenderingContext2D.prototype,o,function(a){return function(...u){return K(this.canvas,t,r,!0)||setTimeout(()=>{const c=Xo(u,e,this);s(this.canvas,{type:We["2D"],property:o,args:c})},0),a.apply(this,u)}});i.push(l)}catch(l){const a=gr(e.CanvasRenderingContext2D.prototype,o,{set(u){s(this.canvas,{type:We["2D"],property:o,args:[u],setter:!0})}});i.push(a)}return()=>{i.forEach(o=>o())}}function kf(s){return s==="experimental-webgl"?"webgl":s}function Xi(s,e,t,r){const i=[];try{const n=Ae(s.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...a){if(!K(this,e,t,!0)){const u=kf(l);if("__context"in this||(this.__context=u),r&&["webgl","webgl2"].includes(u))if(a[0]&&typeof a[0]=="object"){const c=a[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[l,...a])}});i.push(n)}catch(n){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(n=>n())}}function Ki(s,e,t,r,i,n){const o=[],l=Object.getOwnPropertyNames(s);for(const a of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if(typeof s[a]!="function")continue;const u=Ae(s,a,function(c){return function(...h){const p=c.apply(this,h);if(Jo(p,n,this),"tagName"in this.canvas&&!K(this.canvas,r,i,!0)){const g=Xo(h,n,this),m={type:e,property:a,args:g};t(this.canvas,m)}return p}});o.push(u)}catch(u){const c=gr(s,a,{set(h){t(this.canvas,{type:e,property:a,args:[h],setter:!0})}});o.push(c)}return o}function Pf(s,e,t,r){const i=[];return i.push(...Ki(e.WebGLRenderingContext.prototype,We.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext!="undefined"&&i.push(...Ki(e.WebGL2RenderingContext.prototype,We.WebGL2,s,t,r,e)),()=>{i.forEach(n=>n())}}const Qo="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Tf=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),Qi=typeof window!="undefined"&&window.Blob&&new Blob([Tf(Qo)],{type:"text/javascript;charset=utf-8"});function Df(s){let e;try{if(e=Qi&&(window.URL||window.webkitURL).createObjectURL(Qi),!e)throw"";const t=new Worker(e,{name:s==null?void 0:s.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),t}catch(t){return new Worker("data:text/javascript;base64,"+Qo,{name:s==null?void 0:s.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class Lf{constructor(e){w(this,"pendingCanvasMutations",new Map),w(this,"rafStamps",{latestId:0,invokeId:null}),w(this,"mirror"),w(this,"mutationCb"),w(this,"resetObservers"),w(this,"frozen",!1),w(this,"locked",!1),w(this,"processMutation",(a,u)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(u)});const{sampling:t="all",win:r,blockClass:i,blockSelector:n,recordCanvas:o,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&t==="all"&&this.initCanvasMutationObserver(r,i,n),o&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,i,n,{dataURLOptions:l})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,i,n){const o=Xi(t,r,i,!0),l=new Map,a=new Df;a.onmessage=m=>{const{id:f}=m.data;if(l.set(f,!1),!("base64"in m.data))return;const{base64:d,type:C,width:S,height:y}=m.data;this.mutationCb({id:f,type:We["2D"],commands:[{property:"clearRect",args:[0,0,S,y]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:d}],type:C}]},0,0]}]})};const u=1e3/e;let c=0,h;const p=()=>{const m=[];return t.document.querySelectorAll("canvas").forEach(f=>{K(f,r,i,!0)||m.push(f)}),m},g=m=>{if(c&&m-c<u){h=requestAnimationFrame(g);return}c=m,p().forEach(async f=>{var d;const C=this.mirror.getId(f);if(l.get(C)||f.width===0||f.height===0)return;if(l.set(C,!0),["webgl","webgl2"].includes(f.__context)){const y=f.getContext(f.__context);((d=y==null?void 0:y.getContextAttributes())==null?void 0:d.preserveDrawingBuffer)===!1&&y.clear(y.COLOR_BUFFER_BIT)}const S=await createImageBitmap(f);a.postMessage({id:C,bitmap:S,width:f.width,height:f.height,dataURLOptions:n.dataURLOptions},[S])}),h=requestAnimationFrame(g)};h=requestAnimationFrame(g),this.resetObservers=()=>{o(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=Xi(e,t,r,!1),n=Nf(this.processMutation.bind(this),e,t,r),o=Pf(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),n(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;const i=r.map(o=>{const u=o,{type:l}=u;return Re(u,["type"])}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:i}),this.pendingCanvasMutations.delete(e)}}class _f{constructor(e){w(this,"trackedLinkElements",new WeakSet),w(this,"mutationCb"),w(this,"adoptedStyleSheetCb"),w(this,"styleMirror",new nf),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;const r={id:t,styleIds:[]},i=[];for(const n of e){let o;this.styleMirror.has(n)?o=this.styleMirror.getId(n):(o=this.styleMirror.add(n),i.push({styleId:o,rules:Array.from(n.rules||CSSRule,(l,a)=>({rule:rn(l,n.href),index:a}))})),r.styleIds.push(o)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Ff{constructor(){w(this,"nodeMap",new WeakMap),w(this,"active",!1)}inOtherBuffer(e,t){const r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let V,jt,_r,nr=!1;const Ss=[];try{if(Array.from([1],s=>s*2)[0]!==2){const s=document.createElement("iframe");document.body.appendChild(s),Array.from=((qs=s.contentWindow)==null?void 0:qs.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}const ne=Ea();function ft(s={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:n=null,ignoreClass:o="rr-ignore",ignoreSelector:l=null,excludeAttribute:a,includeAttribute:u,maskTextClass:c="rr-mask",maskTextSelector:h=null,inlineStylesheet:p=!0,maskAllInputs:g,maskInputOptions:m,slimDOMOptions:f,maskInputFn:d,maskTextFn:C,hooks:S,packFn:y,sampling:v={},dataURLOptions:I={},mousemoveWait:W,recordDOM:F=!0,recordCanvas:b=!1,recordCrossOriginIframes:x=!1,recordAfter:z=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",flushCustomQueue:H=s.flushCustomQueue!==void 0?s.flushCustomQueue:"after",userTriggeredOnInput:te=!1,collectFonts:fe=!1,inlineImages:re=!1,plugins:E,keepIframeSrcFn:pe=()=>!1,ignoreCSSAttributes:ze=new Set([]),errorHandler:J}=s;ff(J);const se=x?window.parent===window:!0;let de=!1;if(!se)try{window.parent.document&&(de=!1)}catch(N){de=!0}if(se&&!e)throw new Error("emit function is required");if(!se&&!de)return()=>{};W!==void 0&&v.mousemove===void 0&&(v.mousemove=W),ne.reset();const le=a===void 0?/^$a/:a,yr=u===void 0?/.+/i:u,wr=g===!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}:m!==void 0?m:{password:!0},br=f===!0||f==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:f==="all",headMetaDescKeywords:f==="all",headTitleMutations:f==="all"}:f||{};sf();let Hs,Sr=0;const Ys=N=>{for(const ie of E||[])ie.eventProcessor&&(N=ie.eventProcessor(N));return y&&!de&&(N=y(N)),N};V=(N,ie)=>{var G;const j=N;if(j.timestamp=gs(),(G=Ie[0])!=null&&G.isFrozen()&&j.type!==$.FullSnapshot&&!(j.type===$.IncrementalSnapshot&&j.data.source===A.Mutation)&&Ie.forEach(ue=>ue.unfreeze()),se)e==null||e(Ys(j),ie);else if(de){const ue={type:"rrweb",event:Ys(j),origin:window.location.origin,isCheckout:ie};window.parent.postMessage(ue,"*")}if(j.type===$.FullSnapshot)Hs=j,Sr=0;else if(j.type===$.IncrementalSnapshot){if(j.data.source===A.Mutation&&j.data.isAttachIframe)return;Sr++;const ue=r&&Sr>=r,T=t&&j.timestamp-Hs.timestamp>t;(ue||T)&&jt(!0)}};const pt=N=>{V({type:$.IncrementalSnapshot,data:R({source:A.Mutation},N)})},Zs=N=>V({type:$.IncrementalSnapshot,data:R({source:A.Scroll},N)}),Js=N=>V({type:$.IncrementalSnapshot,data:R({source:A.CanvasMutation},N)}),qo=N=>V({type:$.IncrementalSnapshot,data:R({source:A.AdoptedStyleSheet},N)}),Ce=new _f({mutationCb:pt,adoptedStyleSheetCb:qo}),ve=new Ef({mirror:ne,mutationCb:pt,stylesheetManager:Ce,recordCrossOriginIframes:x,wrappedEmit:V});for(const N of E||[])N.getMirror&&N.getMirror({nodeMirror:ne,crossOriginIframeMirror:ve.crossOriginIframeMirror,crossOriginIframeStyleMirror:ve.crossOriginIframeStyleMirror});const Cr=new Ff;_r=new Lf({recordCanvas:b,mutationCb:Js,win:window,blockClass:i,blockSelector:n,mirror:ne,sampling:v.canvas,dataURLOptions:I});const dt=new Af({mutationCb:pt,scrollCb:Zs,bypassOptions:{blockClass:i,blockSelector:n,maskTextClass:c,maskTextSelector:h,excludeAttribute:le,includeAttribute:yr,inlineStylesheet:p,maskInputOptions:wr,dataURLOptions:I,maskTextFn:C,maskInputFn:d,recordCanvas:b,inlineImages:re,sampling:v,slimDOMOptions:br,iframeManager:ve,stylesheetManager:Ce,canvasManager:_r,keepIframeSrcFn:pe,processedNodeManager:Cr},mirror:ne});jt=(N=!1)=>{if(!F)return;V({type:$.Meta,data:{href:window.location.href,width:_o(),height:Lo()}},N),Ce.reset(),dt.init(),Ie.forEach(G=>G.lock());const ie=nl(document,{mirror:ne,blockClass:i,blockSelector:n,maskTextClass:c,maskTextSelector:h,excludeAttribute:le,includeAttribute:yr,inlineStylesheet:p,maskAllInputs:wr,maskTextFn:C,maskInputFn:d,slimDOM:br,dataURLOptions:I,recordCanvas:b,inlineImages:re,onSerialize:G=>{Bo(G,ne)&&ve.addIframe(G),Wo(G,ne)&&Ce.trackLinkElement(G),ws(G)&&dt.addShadowRoot(O.shadowRoot(G),document)},onIframeLoad:(G,j)=>{ve.attachIframe(G,j),dt.observeAttachShadow(G)},onStylesheetLoad:(G,j)=>{Ce.attachLinkElement(G,j)},keepIframeSrcFn:pe});if(!ie)return console.warn("Failed to snapshot the document");V({type:$.FullSnapshot,data:{node:ie,initialOffset:Do(window)}},N),Ie.forEach(G=>G.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Ce.adoptStyleSheets(document.adoptedStyleSheets,ne.getId(document))};try{const N=[],ie=j=>{var ue;return M(Of)({mutationCb:pt,mousemoveCb:(T,vr)=>V({type:$.IncrementalSnapshot,data:{source:vr,positions:T}}),mouseInteractionCb:T=>V({type:$.IncrementalSnapshot,data:R({source:A.MouseInteraction},T)}),scrollCb:Zs,viewportResizeCb:T=>V({type:$.IncrementalSnapshot,data:R({source:A.ViewportResize},T)}),inputCb:T=>V({type:$.IncrementalSnapshot,data:R({source:A.Input},T)}),mediaInteractionCb:T=>V({type:$.IncrementalSnapshot,data:R({source:A.MediaInteraction},T)}),styleSheetRuleCb:T=>V({type:$.IncrementalSnapshot,data:R({source:A.StyleSheetRule},T)}),styleDeclarationCb:T=>V({type:$.IncrementalSnapshot,data:R({source:A.StyleDeclaration},T)}),canvasMutationCb:Js,fontCb:T=>V({type:$.IncrementalSnapshot,data:R({source:A.Font},T)}),selectionCb:T=>{V({type:$.IncrementalSnapshot,data:R({source:A.Selection},T)})},customElementCb:T=>{V({type:$.IncrementalSnapshot,data:R({source:A.CustomElement},T)})},blockClass:i,ignoreClass:o,ignoreSelector:l,maskTextClass:c,maskTextSelector:h,excludeAttribute:le,includeAttribute:yr,maskInputOptions:wr,inlineStylesheet:p,sampling:v,recordDOM:F,recordCanvas:b,inlineImages:re,userTriggeredOnInput:te,collectFonts:fe,doc:j,maskInputFn:d,maskTextFn:C,keepIframeSrcFn:pe,blockSelector:n,slimDOMOptions:br,dataURLOptions:I,mirror:ne,iframeManager:ve,stylesheetManager:Ce,shadowDomManager:dt,processedNodeManager:Cr,canvasManager:_r,ignoreCSSAttributes:ze,plugins:((ue=E==null?void 0:E.filter(T=>T.observer))==null?void 0:ue.map(T=>({observer:T.observer,options:T.options,callback:vr=>V({type:$.Plugin,data:{plugin:T.name,payload:vr}})})))||[]},S)};ve.addLoadListener(j=>{try{N.push(ie(j.contentDocument))}catch(ue){console.warn(ue)}});const G=()=>{H==="before"&&Fr(),jt(),N.push(ie(document)),nr=!0,H==="after"&&Fr()};return document.readyState==="interactive"||document.readyState==="complete"?G():(N.push(X("DOMContentLoaded",()=>{V({type:$.DomContentLoaded,data:{}}),z==="DOMContentLoaded"&&G()})),N.push(X("load",()=>{V({type:$.Load,data:{}}),z==="load"&&G()},window))),()=>{Fr(),N.forEach(j=>j()),Cr.destroy(),nr=!1,pf()}}catch(N){console.warn(N)}}function Fr(){for(const s of Ss)V(s);Ss.length=0}ft.addCustomEvent=(s,e)=>{const t={type:$.Custom,data:{tag:s,payload:e}};if(!nr){console.warn(`[rrweb] CustomEvent buffered before recording start: ${s}`),Ss.push(t);return}V(t)};ft.freezePage=()=>{Ie.forEach(s=>s.freeze())};ft.takeFullSnapshot=s=>{if(!nr)throw new Error("please take full snapshot after start recording");jt(s)};ft.mirror=ne;var qi;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(qi||(qi={}));exports.record=ft;
|
|
66
|
+
or you can use record.mirror to access the mirror instance during recording.`;let Yi={map:{},getId(){return console.error(Ne),-1},getNode(){return console.error(Ne),null},removeNodeFromMap(){console.error(Ne)},has(){return console.error(Ne),!1},reset(){console.error(Ne)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(Yi=new Proxy(Yi,{get(s,e,t){return e==="map"&&console.error(Ne),Reflect.get(s,e,t)}}));function lt(s,e,t={}){let r=null,i=0;return function(...o){const n=Date.now();!i&&t.leading===!1&&(i=n);const l=e-(n-i),a=this;l<=0||l>e?(r&&(clearTimeout(r),r=null),i=n,s.apply(a,o)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{i=t.leading===!1?0:Date.now(),r=null,s.apply(a,o)},l))}}function br(s,e,t,r,i=window){const o=i.Object.getOwnPropertyDescriptor(s,e);return i.Object.defineProperty(s,e,r?t:{set(n){setTimeout(()=>{t.set.call(this,n)},0),o&&o.set&&o.set.call(this,n)}}),()=>br(s,e,o||{},!0)}function De(){return Math.round(performance.timeOrigin+performance.now())}function Do(s=window){var e,t,r,i;const o=s.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:s.pageXOffset!==void 0?s.pageXOffset:o.documentElement.scrollLeft||(o==null?void 0:o.body)&&((e=x.parentElement(o.body))==null?void 0:e.scrollLeft)||((t=o==null?void 0:o.body)==null?void 0:t.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:s.pageYOffset!==void 0?s.pageYOffset:(o==null?void 0:o.documentElement.scrollTop)||(o==null?void 0:o.body)&&((r=x.parentElement(o.body))==null?void 0:r.scrollTop)||((i=o==null?void 0:o.body)==null?void 0:i.scrollTop)||0}}function _o(s=window){const e=s.document;return s.innerHeight||e.documentElement&&e.documentElement.clientHeight||e.body&&e.body.clientHeight||0}function Fo(s=window){const e=s.document;return s.innerWidth||e.documentElement&&e.documentElement.clientWidth||e.body&&e.body.clientWidth||0}function Bo(s){return s?s.nodeType===s.ELEMENT_NODE?s:x.parentElement(s):null}function X(s,e,t,r){if(!s)return!1;const i=Bo(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(Kt(i,e,r))return!0}catch(o){}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function cf(s,e){return e.getId(s)!==-1}function Fr(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===qe}function Uo(s,e){if(Xe(s))return!1;const t=e.getId(s);if(!e.has(t))return!0;const r=x.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?Uo(r,e):!0}function Cs(s){return!!s.changedTouches}function hf(s=window){"NodeList"in s&&!s.NodeList.prototype.forEach&&(s.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in s&&!s.DOMTokenList.prototype.forEach&&(s.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function zo(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function Wo(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function vs(s){return s?s instanceof Zs&&"shadowRoot"in s?!!s.shadowRoot:!!x.shadowRoot(s):!1}class ff{constructor(){y(this,"id",1),y(this,"styleIDMap",new WeakMap),y(this,"idStyleMap",new Map)}getId(e){var t;return(t=this.styleIDMap.get(e))!=null?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return t===void 0?r=this.id++:r=t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Vo(s){var e;let t=null;return"getRootNode"in s&&((e=x.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&x.host(x.getRootNode(s))&&(t=x.host(x.getRootNode(s))),t}function df(s){let e=s,t;for(;t=Vo(e);)e=t;return e}function pf(s){const e=s.ownerDocument;if(!e)return!1;const t=df(s);return x.contains(e,t)}function Go(s){const e=s.ownerDocument;return e?x.contains(e,s)||pf(s):!1}var R=(s=>(s[s.DomContentLoaded=0]="DomContentLoaded",s[s.Load=1]="Load",s[s.FullSnapshot=2]="FullSnapshot",s[s.IncrementalSnapshot=3]="IncrementalSnapshot",s[s.Meta=4]="Meta",s[s.Custom=5]="Custom",s[s.Plugin=6]="Plugin",s))(R||{}),M=(s=>(s[s.Mutation=0]="Mutation",s[s.MouseMove=1]="MouseMove",s[s.MouseInteraction=2]="MouseInteraction",s[s.Scroll=3]="Scroll",s[s.ViewportResize=4]="ViewportResize",s[s.Input=5]="Input",s[s.TouchMove=6]="TouchMove",s[s.MediaInteraction=7]="MediaInteraction",s[s.StyleSheetRule=8]="StyleSheetRule",s[s.CanvasMutation=9]="CanvasMutation",s[s.Font=10]="Font",s[s.Log=11]="Log",s[s.Drag=12]="Drag",s[s.StyleDeclaration=13]="StyleDeclaration",s[s.Selection=14]="Selection",s[s.AdoptedStyleSheet=15]="AdoptedStyleSheet",s[s.CustomElement=16]="CustomElement",s[s.VisibilityMutation=17]="VisibilityMutation",s))(M||{}),Q=(s=>(s[s.MouseUp=0]="MouseUp",s[s.MouseDown=1]="MouseDown",s[s.Click=2]="Click",s[s.ContextMenu=3]="ContextMenu",s[s.DblClick=4]="DblClick",s[s.Focus=5]="Focus",s[s.Blur=6]="Blur",s[s.TouchStart=7]="TouchStart",s[s.TouchMove_Departed=8]="TouchMove_Departed",s[s.TouchEnd=9]="TouchEnd",s[s.TouchCancel=10]="TouchCancel",s))(Q||{}),de=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(de||{}),Ve=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(Ve||{}),ke=(s=>(s[s.Play=0]="Play",s[s.Pause=1]="Pause",s[s.Seeked=2]="Seeked",s[s.VolumeChange=3]="VolumeChange",s[s.RateChange=4]="RateChange",s))(ke||{}),jo=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(jo||{});function Zi(s){return"__ln"in s}class mf{constructor(){y(this,"length",0),y(this,"head",null),y(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=(t==null?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Zi(e.previousSibling)){const r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&Zi(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const Ji=(s,e)=>`${s}@${e}`;class gf{constructor(){y(this,"frozen",!1),y(this,"locked",!1),y(this,"texts",[]),y(this,"attributes",[]),y(this,"attributeMap",new WeakMap),y(this,"removes",[]),y(this,"mapRemoves",[]),y(this,"movedMap",{}),y(this,"addedSet",new Set),y(this,"movedSet",new Set),y(this,"droppedSet",new Set),y(this,"removesSubTreeCache",new Set),y(this,"mutationCb"),y(this,"blockClass"),y(this,"blockSelector"),y(this,"maskTextClass"),y(this,"maskTextSelector"),y(this,"excludeAttribute"),y(this,"inlineStylesheet"),y(this,"maskInputOptions"),y(this,"maskTextFn"),y(this,"maskInputFn"),y(this,"keepIframeSrcFn"),y(this,"recordCanvas"),y(this,"inlineImages"),y(this,"slimDOMOptions"),y(this,"dataURLOptions"),y(this,"doc"),y(this,"mirror"),y(this,"iframeManager"),y(this,"stylesheetManager"),y(this,"shadowDomManager"),y(this,"canvasManager"),y(this,"visibilityManager"),y(this,"processedNodeManager"),y(this,"unattachedDoc"),y(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),y(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new mf,i=a=>{let u=a,c=qe;for(;c===qe;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},o=a=>{const u=x.parentNode(a);if(!u||!Go(a))return;let c=!1;if(a.nodeType===Node.TEXT_NODE){const p=u.tagName;if(p==="TEXTAREA")return;p==="STYLE"&&this.addedSet.has(u)&&(c=!0)}const f=Xe(u)?this.mirror.getId(Vo(a)):this.mirror.getId(u),d=i(a);if(f===-1||d===-1)return r.addNode(a);const m=Pe(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,excludeAttribute:this.excludeAttribute,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:p=>{zo(p,this.mirror)&&this.iframeManager.addIframe(p),Wo(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),vs(a)&&this.shadowDomManager.addShadowRoot(x.shadowRoot(a),this.doc)},onIframeLoad:(p,g)=>{this.iframeManager.attachIframe(p,g),this.shadowDomManager.observeAttachShadow(p)},onStylesheetLoad:(p,g)=>{this.stylesheetManager.attachLinkElement(p,g)},cssCaptured:c});m&&(e.push({parentId:f,nextId:d,node:m}),t.add(m.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of this.movedSet)Xi(this.removesSubTreeCache,a,this.mirror)&&!this.movedSet.has(x.parentNode(a))||o(a);for(const a of this.addedSet)!Ki(this.droppedSet,a)&&!Xi(this.removesSubTreeCache,a,this.mirror)||Ki(this.movedSet,a)?o(a):this.droppedSet.add(a);let n=null;for(;r.length;){let a=null;if(n){const u=this.mirror.getId(x.parentNode(n.value)),c=i(n.value);u!==-1&&c!==-1&&(a=n)}if(!a){let u=r.tail;for(;u;){const c=u;if(u=u.previous,c){const f=this.mirror.getId(x.parentNode(c.value));if(i(c.value)===-1)continue;if(f!==-1){a=c;break}else{const m=c.value,p=x.parentNode(m);if(p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const g=x.host(p);if(this.mirror.getId(g)!==-1){a=c;break}}}}}}if(!a){for(;r.head;)r.removeNode(r.head.value);break}n=a.previous,r.removeNode(a.value),o(a.value)}const l={texts:this.texts.map(a=>{const u=a.node,c=x.parentNode(u);return c&&c.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(c),{id:this.mirror.getId(u),value:a.value}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>{const{attributes:u}=a;if(typeof u.style=="string"){const c=JSON.stringify(a.styleDiff),f=JSON.stringify(a._unchangedStyles);c.length<u.style.length&&(c+f).split("var(").length===u.style.split("var(").length&&(u.style=a.styleDiff)}return{id:this.mirror.getId(a.node),attributes:u}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:e};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(l))}),y(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));const r=Array.from(x.childNodes(e),i=>x.textContent(i)||"").join("");t.attributes.value=Zt({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Jt(e),value:r,maskInputFn:this.maskInputFn})}),y(this,"processMutation",e=>{if(!Fr(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=x.textContent(e.target);!X(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:dn(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Bo(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,i=e.target.getAttribute(r);const n=t[r],l=typeof n=="boolean",a=document.contains(t),u=Es(t),c=Gr(r,this.excludeAttribute);if(i===null&&!t.hasAttribute(r)&&e.oldValue!==null&&(n===""||n===null||typeof n=="undefined")){console.debug(`[${De()}] [rrweb:record/mutation] \u26D4 phantom attribute mutation ignored`,{node:x.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:i,oldValue:e.oldValue,excludeAttribute:this.excludeAttribute,propValue:n,isBooleanAttr:l,inDOM:a,isVisible:u,isExcludeAttributeName:c});return}if(Gr(r,this.excludeAttribute)){console.debug(`[${De()}] [rrweb:record/mutation] \u26D4 excluded attribute mutation ignored`,{node:x.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:i,oldValue:e.oldValue,excludeAttribute:this.excludeAttribute,propValue:n,isBooleanAttr:l,inDOM:a,isVisible:u,isExcludeAttributeName:c});return}if(r==="value"){const m=Jt(t);i=Zt({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:m,value:i,maskInputFn:this.maskInputFn})}if(X(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let d=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(d||(d={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(d),this.attributeMap.set(e.target,d)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!fn(t.tagName,r))if(d.attributes[r]=hn(this.doc,xe(t.tagName),xe(r),i),r!=="class"&&(e.oldValue===null||i===""||i!==e.oldValue)&&console.debug(`[${De()}] [rrweb:record/mutation] \u26A0\uFE0F suspicious attribute mutation`,{reason:[i===e.oldValue?"no change in value":null,i===n?"mirrored in DOM property":null,i===d.attributes[r]?"redundant assignment":null].filter(Boolean).join(", ")||"uncategorized",node:x.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:i,oldValue:e.oldValue,transformedValue:d.attributes[r],excludeAttribute:this.excludeAttribute,propValue:n,isBooleanAttr:l,inDOM:a,isVisible:u,isExcludeAttributeName:c}),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(g){this.unattachedDoc=this.doc}const p=this.unattachedDoc.createElement("span");e.oldValue&&p.setAttribute("style",e.oldValue);for(const g of Array.from(t.style)){const h=t.style.getPropertyValue(g),w=t.style.getPropertyPriority(g);h!==p.style.getPropertyValue(g)||w!==p.style.getPropertyPriority(g)?w===""?d.styleDiff[g]=h:d.styleDiff[g]=[h,w]:d._unchangedStyles[g]=[h,w]}for(const g of Array.from(p.style))t.style.getPropertyValue(g)===""&&(d.styleDiff[g]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?d.attributes.rr_open_mode="modal":d.attributes.rr_open_mode="non-modal");break}case"childList":{if(X(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const r=this.mirror.getId(t),i=Xe(e.target)?this.mirror.getId(x.host(e.target)):this.mirror.getId(e.target);X(e.target,this.blockClass,this.blockSelector,!1)||Fr(t,this.mirror,this.slimDOMOptions)||!cf(t,this.mirror)||(this.addedSet.has(t)?(Is(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||Uo(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Ji(r,i)]?Is(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:Xe(e.target)&&Ke(e.target)?!0:void 0}),yf(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),y(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Fr(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&r!==-1&&(this.movedMap[Ji(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);X(e,this.blockClass,this.blockSelector,!1)||(x.childNodes(e).forEach(r=>this.genAdds(r)),vs(e)&&x.childNodes(x.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","excludeAttribute","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","visibilityManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze(),this.visibilityManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.visibilityManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock(),this.visibilityManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.visibilityManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset(),this.visibilityManager.reset()}}function Is(s,e){s.delete(e),x.childNodes(e).forEach(t=>Is(s,t))}function yf(s,e){const t=[s];for(;t.length;){const r=t.pop();e.has(r)||(e.add(r),x.childNodes(r).forEach(i=>t.push(i)))}}function Xi(s,e,t){return s.size===0?!1:wf(s,e)}function wf(s,e,t){const r=x.parentNode(e);return r?s.has(r):!1}function Ki(s,e){return s.size===0?!1:Ho(s,e)}function Ho(s,e){const t=x.parentNode(e);return t?s.has(t)?!0:Ho(s,t):!1}let Qe;function bf(s){Qe=s}function Sf(){Qe=void 0}const $=s=>Qe?(...t)=>{try{return s(...t)}catch(r){if(Qe&&Qe(r)===!0)return;throw r}}:s,Ie=[];function dt(s){try{if("composedPath"in s){const e=s.composedPath();if(e.length)return e[0]}else if("path"in s&&s.path.length)return s.path[0]}catch(e){}return s&&s.target}function Yo(s,e){const t=new gf;Ie.push(t),t.init(s);const r=new(Lo())($(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function Cf({mousemoveCb:s,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};const i=typeof e.mousemove=="number"?e.mousemove:50,o=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let n=[],l;const a=lt($(f=>{const d=Date.now()-l;s(n.map(m=>(m.timeOffset-=d,m)),f),n=[],l=null}),o),u=$(lt($(f=>{const d=dt(f),{clientX:m,clientY:p}=Cs(f)?f.changedTouches[0]:f;l||(l=De()),n.push({x:m,y:p,id:r.getId(d),timeOffset:De()-l}),a(typeof DragEvent!="undefined"&&f instanceof DragEvent?M.Drag:f instanceof MouseEvent?M.MouseMove:M.TouchMove)}),i,{trailing:!1})),c=[J("mousemove",u,t),J("touchmove",u,t),J("drag",u,t)];return $(()=>{c.forEach(f=>f())})}function vf({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{console.debug("MouseInteractionObserver: No operation needed")};const n=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,l=[];let a=null;const u=c=>f=>{const d=dt(f);if(X(d,r,i,!0))return;let m=null,p=c;if("pointerType"in f){switch(f.pointerType){case"mouse":m=de.Mouse;break;case"touch":m=de.Touch;break;case"pen":m=de.Pen;break}m===de.Touch?Q[c]===Q.MouseDown?p="TouchStart":Q[c]===Q.MouseUp&&(p="TouchEnd"):de.Pen}else Cs(f)&&(m=de.Touch);m!==null?(a=m,(p.startsWith("Touch")&&m===de.Touch||p.startsWith("Mouse")&&m===de.Mouse)&&(m=null)):Q[c]===Q.Click&&(m=a,a=null);const g=Cs(f)?f.changedTouches[0]:f;if(!g)return;const h=t.getId(d),{clientX:w,clientY:C}=g;$(s)(O({type:Q[p],id:h,x:w,y:C},m!==null&&{pointerType:m}))};return Object.keys(Q).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&n[c]!==!1).forEach(c=>{let f=xe(c);const d=u(c);if(window.PointerEvent)switch(Q[c]){case Q.MouseDown:case Q.MouseUp:f=f.replace("mouse","pointer");break;case Q.TouchStart:case Q.TouchEnd:return}l.push(J(f,d,e))}),$(()=>{l.forEach(c=>c())})}function Zo({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:o}){const n=$(lt($(l=>{const a=dt(l);if(!a||X(a,r,i,!0))return;const u=t.getId(a);if(a===e&&e.defaultView){const c=Do(e.defaultView);s({id:u,x:c.left,y:c.top})}else s({id:u,x:a.scrollLeft,y:a.scrollTop})}),o.scroll||100));return J("scroll",n,e)}function If({viewportResizeCb:s},{win:e}){let t=-1,r=-1;const i=$(lt($(()=>{const o=_o(),n=Fo();(t!==o||r!==n)&&(s({width:Number(n),height:Number(o)}),t=o,r=n)}),200));return J("resize",i,e)}const Br=["INPUT","TEXTAREA","SELECT"],Qi=new WeakMap;function xf({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:o,ignoreSelector:n,maskInputOptions:l,maskInputFn:a,sampling:u,userTriggeredOnInput:c}){function f(C){let v=dt(C);const b=C.isTrusted,S=v&&v.tagName;if(v&&S==="OPTION"&&(v=x.parentElement(v)),!v||!S||Br.indexOf(S)<0||X(v,r,i,!0)||v.classList.contains(o)||n&&v.matches(n))return;let k=v.value,N=!1;const A=Jt(v)||"";A==="radio"||A==="checkbox"?N=v.checked:(l[S.toLowerCase()]||l[A])&&(k=Zt({element:v,maskInputOptions:l,tagName:S,type:A,value:k,maskInputFn:a})),d(v,c?{text:k,isChecked:N,userTriggered:b}:{text:k,isChecked:N});const j=v.name;A==="radio"&&j&&N&&e.querySelectorAll(`input[type="radio"][name="${j}"]`).forEach(W=>{if(W!==v){const q=W.value;d(W,c?{text:q,isChecked:!N,userTriggered:!1}:{text:q,isChecked:!N})}})}function d(C,v){const b=Qi.get(C),S=C,k=S.hasAttribute("placeholder"),N=S.value==="",A=typeof S.defaultValue=="string"?S.defaultValue==="":!0,j=!v.userTriggered,W=!b||b.text==="",q=k&&N&&A&&W&&j&&!v.isChecked&&S.type!=="hidden"&&Br.includes(S.tagName),ce=S.tagName==="INPUT"&&S.type==="text"&&!v.userTriggered&&v.text===S.defaultValue&&!b&&S.hasAttribute("placeholder"),he=!v.userTriggered&&S.value===S.defaultValue&&!b&&S.hasAttribute("placeholder")&&!v.isChecked&&S.type!=="hidden"&&Br.includes(S.tagName),I=S.type==="checkbox"&&!v.userTriggered&&!v.isChecked&&!b,oe=S.type==="radio"&&!v.userTriggered&&!v.isChecked&&!b;if(!(q||ce||he||I||oe)&&(!b||b.text!==v.text||b.isChecked!==v.isChecked)){Qi.set(C,v);const fe=t.getId(C);$(s)(te(O({},v),{id:fe}))}}const p=(u.input==="last"?["change"]:["input","change"]).map(C=>J(C,$(f),e)),g=e.defaultView;if(!g)return()=>{p.forEach(C=>C())};const h=g.Object.getOwnPropertyDescriptor(g.HTMLInputElement.prototype,"value"),w=[[g.HTMLInputElement.prototype,"value"],[g.HTMLInputElement.prototype,"checked"],[g.HTMLSelectElement.prototype,"value"],[g.HTMLTextAreaElement.prototype,"value"],[g.HTMLSelectElement.prototype,"selectedIndex"],[g.HTMLOptionElement.prototype,"selected"]];return h&&h.set&&p.push(...w.map(C=>br(C[0],C[1],{set(){$(f)({target:this,isTrusted:!1})}},!1,g))),$(()=>{p.forEach(C=>C())})}function or(s){const e=[];function t(r,i){if(Ft("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Ft("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Ft("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Ft("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const n=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(n)}else if(r.parentStyleSheet){const n=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(n)}return i}return t(s,e)}function we(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function Ef({styleSheetRuleCb:s,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:$((c,f,d)=>{const[m,p]=d,{id:g,styleId:h}=we(f,e,t.styleMirror);return(g&&g!==-1||h&&h!==-1)&&s({id:g,styleId:h,adds:[{rule:m,index:p}]}),c.apply(f,d)})}),r.CSSStyleSheet.prototype.addRule=function(c,f,d=this.cssRules.length){const m=`${c} { ${f} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[m,d])};const o=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:$((c,f,d)=>{const[m]=d,{id:p,styleId:g}=we(f,e,t.styleMirror);return(p&&p!==-1||g&&g!==-1)&&s({id:p,styleId:g,removes:[{index:m}]}),c.apply(f,d)})}),r.CSSStyleSheet.prototype.removeRule=function(c){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[c])};let n;r.CSSStyleSheet.prototype.replace&&(n=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(n,{apply:$((c,f,d)=>{const[m]=d,{id:p,styleId:g}=we(f,e,t.styleMirror);return(p&&p!==-1||g&&g!==-1)&&s({id:p,styleId:g,replace:m}),c.apply(f,d)})}));let l;r.CSSStyleSheet.prototype.replaceSync&&(l=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:$((c,f,d)=>{const[m]=d,{id:p,styleId:g}=we(f,e,t.styleMirror);return(p&&p!==-1||g&&g!==-1)&&s({id:p,styleId:g,replaceSync:m}),c.apply(f,d)})}));const a={};Bt("CSSGroupingRule")?a.CSSGroupingRule=r.CSSGroupingRule:(Bt("CSSMediaRule")&&(a.CSSMediaRule=r.CSSMediaRule),Bt("CSSConditionRule")&&(a.CSSConditionRule=r.CSSConditionRule),Bt("CSSSupportsRule")&&(a.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(a).forEach(([c,f])=>{u[c]={insertRule:f.prototype.insertRule,deleteRule:f.prototype.deleteRule},f.prototype.insertRule=new Proxy(u[c].insertRule,{apply:$((d,m,p)=>{const[g,h]=p,{id:w,styleId:C}=we(m.parentStyleSheet,e,t.styleMirror);return(w&&w!==-1||C&&C!==-1)&&s({id:w,styleId:C,adds:[{rule:g,index:[...or(m),h||0]}]}),d.apply(m,p)})}),f.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:$((d,m,p)=>{const[g]=p,{id:h,styleId:w}=we(m.parentStyleSheet,e,t.styleMirror);return(h&&h!==-1||w&&w!==-1)&&s({id:h,styleId:w,removes:[{index:[...or(m),g]}]}),d.apply(m,p)})})}),$(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=o,n&&(r.CSSStyleSheet.prototype.replace=n),l&&(r.CSSStyleSheet.prototype.replaceSync=l),Object.entries(a).forEach(([c,f])=>{f.prototype.insertRule=u[c].insertRule,f.prototype.deleteRule=u[c].deleteRule})})}function Jo({mirror:s,stylesheetManager:e},t){var r,i,o;let n=null;t.nodeName==="#document"?n=s.getId(t):n=s.getId(x.host(t));const l=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(o=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:o.ShadowRoot,a=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return n===null||n===-1||!l||!a?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){var u;return(u=a.get)==null?void 0:u.call(this)},set(u){var c;const f=(c=a.set)==null?void 0:c.call(this,u);if(n!==null&&n!==-1)try{e.adoptStyleSheets(u,n)}catch(d){}return f}}),$(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function Mf({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){const o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:$((l,a,u)=>{var c;const[f,d,m]=u;if(t.has(f))return o.apply(a,[f,d,m]);const{id:p,styleId:g}=we((c=a.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(p&&p!==-1||g&&g!==-1)&&s({id:p,styleId:g,set:{property:f,value:d,priority:m},index:or(a.parentRule)}),l.apply(a,u)})});const n=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(n,{apply:$((l,a,u)=>{var c;const[f]=u;if(t.has(f))return n.apply(a,[f]);const{id:d,styleId:m}=we((c=a.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(d&&d!==-1||m&&m!==-1)&&s({id:d,styleId:m,remove:{property:f},index:or(a.parentRule)}),l.apply(a,u)})}),$(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=n})}function Of({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:o}){const n=$(a=>lt($(u=>{const c=dt(u);if(!c||X(c,e,t,!0))return;const{currentTime:f,volume:d,muted:m,playbackRate:p,loop:g}=c;s({type:a,id:r.getId(c),currentTime:f,volume:d,muted:m,playbackRate:p,loop:g})}),i.media||500)),l=[J("play",n(ke.Play),o),J("pause",n(ke.Pause),o),J("seeked",n(ke.Seeked),o),J("volumechange",n(ke.VolumeChange),o),J("ratechange",n(ke.RateChange),o)];return $(()=>{l.forEach(a=>a())})}function Af({fontCb:s,doc:e}){const t=e.defaultView;if(!t)return()=>{};const r=[],i=new WeakMap,o=t.FontFace;t.FontFace=function(a,u,c){const f=new o(a,u,c);return i.set(f,{family:a,buffer:typeof u!="string",descriptors:c,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),f};const n=Oe(e.fonts,"add",function(l){return function(a){return setTimeout($(()=>{const u=i.get(a);u&&(s(u),i.delete(a))}),0),l.apply(this,[a])}});return r.push(()=>{t.FontFace=o}),r.push(n),$(()=>{r.forEach(l=>l())})}function Rf(s){const{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:o}=s;let n=!0;const l=$(()=>{const a=e.getSelection();if(!a||n&&(a!=null&&a.isCollapsed))return;n=a.isCollapsed||!1;const u=[],c=a.rangeCount||0;for(let f=0;f<c;f++){const d=a.getRangeAt(f),{startContainer:m,startOffset:p,endContainer:g,endOffset:h}=d;X(m,r,i,!0)||X(g,r,i,!0)||u.push({start:t.getId(m),startOffset:p,end:t.getId(g),endOffset:h})}o({ranges:u})});return l(),J("selectionchange",l)}function $f({doc:s,customElementCb:e}){const t=s.defaultView;return!t||!t.customElements?()=>{}:Oe(t.customElements,"define",function(i){return function(o,n,l){try{e({define:{name:o}})}catch(a){console.warn(`Custom element callback failed for ${o}`)}return i.apply(this,[o,n,l])}})}function Nf(s,e){const{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:o,viewportResizeCb:n,inputCb:l,mediaInteractionCb:a,styleSheetRuleCb:u,styleDeclarationCb:c,canvasMutationCb:f,visibilityMutationCb:d,fontCb:m,selectionCb:p,customElementCb:g}=s;s.mutationCb=(...h)=>{e.mutation&&e.mutation(...h),t(...h)},s.mousemoveCb=(...h)=>{e.mousemove&&e.mousemove(...h),r(...h)},s.mouseInteractionCb=(...h)=>{e.mouseInteraction&&e.mouseInteraction(...h),i(...h)},s.scrollCb=(...h)=>{e.scroll&&e.scroll(...h),o(...h)},s.viewportResizeCb=(...h)=>{e.viewportResize&&e.viewportResize(...h),n(...h)},s.inputCb=(...h)=>{e.input&&e.input(...h),l(...h)},s.mediaInteractionCb=(...h)=>{e.mediaInteaction&&e.mediaInteaction(...h),a(...h)},s.styleSheetRuleCb=(...h)=>{e.styleSheetRule&&e.styleSheetRule(...h),u(...h)},s.styleDeclarationCb=(...h)=>{e.styleDeclaration&&e.styleDeclaration(...h),c(...h)},s.canvasMutationCb=(...h)=>{e.canvasMutation&&e.canvasMutation(...h),f(...h)},s.visibilityMutationCb=(...h)=>{e.visibilityMutation&&e.visibilityMutation(...h),d(...h)},s.fontCb=(...h)=>{e.font&&e.font(...h),m(...h)},s.selectionCb=(...h)=>{e.selection&&e.selection(...h),p(...h)},s.customElementCb=(...h)=>{e.customElement&&e.customElement(...h),g(...h)}}function kf(s,e={}){const t=s.doc.defaultView;if(!t)return()=>{};Nf(s,e);let r;s.recordDOM&&(r=Yo(s,s.doc));const i=Cf(s),o=vf(s),n=Zo(s),l=If(s,{win:t}),a=xf(s),u=Of(s);let c=()=>{},f=()=>{},d=()=>{},m=()=>{};s.recordDOM&&(c=Ef(s,{win:t}),f=Jo(s,s.doc),d=Mf(s,{win:t}),s.collectFonts&&(m=Af(s)));const p=Rf(s),g=$f(s),h=[];for(const w of s.plugins)h.push(w.observer(w.callback,t,w.options));return $(()=>{Ie.forEach(w=>w.reset()),r==null||r.disconnect(),i(),o(),n(),l(),a(),u(),c(),f(),d(),m(),p(),g(),h.forEach(w=>w())})}function Ft(s){return typeof window[s]!="undefined"}function Bt(s){return!!(typeof window[s]!="undefined"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}class qi{constructor(e){y(this,"iframeIdToRemoteIdMap",new WeakMap),y(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){const o=r||this.getIdToRemoteIdMap(e),n=i||this.getRemoteIdToIdMap(e);let l=o.get(t);return l||(l=this.generateIdFn(),o.set(t,l),n.set(l,t)),l}getIds(e,t){const r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(o=>this.getId(e,o,r,i))}getRemoteId(e,t,r){const i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const o=i.get(t);return o||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map(i=>this.getRemoteId(e,i,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class Tf{constructor(e){y(this,"iframes",new WeakMap),y(this,"crossOriginIframeMap",new WeakMap),y(this,"crossOriginIframeMirror",new qi(cn)),y(this,"crossOriginIframeStyleMirror"),y(this,"crossOriginIframeRootIdMap",new WeakMap),y(this,"mirror"),y(this,"mutationCb"),y(this,"wrappedEmit"),y(this,"loadListener"),y(this,"stylesheetManager"),y(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new qi(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;const i=this.crossOriginIframeMap.get(e.source);if(!i)return;const o=this.transformCrossOriginEvent(i,t.data.event);o&&this.wrappedEmit(o,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case R.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:R.IncrementalSnapshot,data:{source:M.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case R.Meta:case R.Load:case R.DomContentLoaded:return!1;case R.Plugin:return t;case R.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case R.IncrementalSnapshot:switch(t.data.source){case M.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);const o=this.crossOriginIframeRootIdMap.get(e);o&&this.patchRootIdOnNode(i.node,o)}),t.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),t.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),t.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case M.Drag:case M.TouchMove:case M.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case M.ViewportResize:return!1;case M.MediaInteraction:case M.MouseInteraction:case M.Scroll:case M.CanvasMutation:case M.Input:return this.replaceIds(t.data,e,["id"]),t;case M.StyleSheetRule:case M.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case M.Font:return t;case M.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case M.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),t}}return!1}replace(e,t,r,i){for(const o of i)!Array.isArray(t[o])&&typeof t[o]!="number"||(Array.isArray(t[o])?t[o]=e.getIds(r,t[o]):t[o]=e.getId(r,t[o]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,t)})}patchRootIdOnNode(e,t){e.type!==jo.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}class Pf{constructor(e){y(this,"shadowDoms",new WeakSet),y(this,"mutationCb"),y(this,"scrollCb"),y(this,"bypassOptions"),y(this,"mirror"),y(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!Ke(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Yo(te(O({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Zo(te(O({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(x.host(e))),this.restoreHandlers.push(Jo({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const r=this;this.restoreHandlers.push(Oe(e.prototype,"attachShadow",function(i){return function(o){const n=i.call(this,o),l=x.shadowRoot(this);return l&&Go(this)&&r.addShadowRoot(l,t),n}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Le="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Lf=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var Ut=0;Ut<Le.length;Ut++)Lf[Le.charCodeAt(Ut)]=Ut;var Df=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=Le[e[t]>>2],i+=Le[(e[t]&3)<<4|e[t+1]>>4],i+=Le[(e[t+1]&15)<<2|e[t+2]>>6],i+=Le[e[t+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i};const en=new Map;function _f(s,e){let t=en.get(s);return t||(t=new Map,en.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}const Xo=(s,e,t)=>{if(!s||!(Qo(s,e)||typeof s=="object"))return;const r=s.constructor.name,i=_f(t,r);let o=i.indexOf(s);return o===-1&&(o=i.length,i.push(s)),o};function Ht(s,e,t){if(s instanceof Array)return s.map(r=>Ht(r,e,t));if(s===null)return s;if(s instanceof Float32Array||s instanceof Float64Array||s instanceof Int32Array||s instanceof Uint32Array||s instanceof Uint8Array||s instanceof Uint16Array||s instanceof Int16Array||s instanceof Int8Array||s instanceof Uint8ClampedArray)return{rr_type:s.constructor.name,args:[Object.values(s)]};if(s instanceof ArrayBuffer){const r=s.constructor.name,i=Df(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[Ht(s.buffer,e,t),s.byteOffset,s.byteLength]};if(s instanceof HTMLImageElement){const r=s.constructor.name,{src:i}=s;return{rr_type:r,src:i}}else if(s instanceof HTMLCanvasElement){const r="HTMLImageElement",i=s.toDataURL();return{rr_type:r,src:i}}else{if(s instanceof ImageData)return{rr_type:s.constructor.name,args:[Ht(s.data,e,t),s.width,s.height]};if(Qo(s,e)||typeof s=="object"){const r=s.constructor.name,i=Xo(s,e,t);return{rr_type:r,index:i}}}}return s}const Ko=(s,e,t)=>s.map(r=>Ht(r,e,t)),Qo=(s,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>s instanceof e[i]);function Ff(s,e,t,r){const i=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const n of o)try{if(typeof e.CanvasRenderingContext2D.prototype[n]!="function")continue;const l=Oe(e.CanvasRenderingContext2D.prototype,n,function(a){return function(...u){return X(this.canvas,t,r,!0)||setTimeout(()=>{const c=Ko(u,e,this);s(this.canvas,{type:Ve["2D"],property:n,args:c})},0),a.apply(this,u)}});i.push(l)}catch(l){const a=br(e.CanvasRenderingContext2D.prototype,n,{set(u){s(this.canvas,{type:Ve["2D"],property:n,args:[u],setter:!0})}});i.push(a)}return()=>{i.forEach(n=>n())}}function Bf(s){return s==="experimental-webgl"?"webgl":s}function tn(s,e,t,r){const i=[];try{const o=Oe(s.HTMLCanvasElement.prototype,"getContext",function(n){return function(l,...a){if(!X(this,e,t,!0)){const u=Bf(l);if("__context"in this||(this.__context=u),r&&["webgl","webgl2"].includes(u))if(a[0]&&typeof a[0]=="object"){const c=a[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0})}return n.apply(this,[l,...a])}});i.push(o)}catch(o){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(o=>o())}}function rn(s,e,t,r,i,o){const n=[],l=Object.getOwnPropertyNames(s);for(const a of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if(typeof s[a]!="function")continue;const u=Oe(s,a,function(c){return function(...f){const d=c.apply(this,f);if(Xo(d,o,this),"tagName"in this.canvas&&!X(this.canvas,r,i,!0)){const m=Ko(f,o,this),p={type:e,property:a,args:m};t(this.canvas,p)}return d}});n.push(u)}catch(u){const c=br(s,a,{set(f){t(this.canvas,{type:e,property:a,args:[f],setter:!0})}});n.push(c)}return n}function Uf(s,e,t,r){const i=[];return i.push(...rn(e.WebGLRenderingContext.prototype,Ve.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext!="undefined"&&i.push(...rn(e.WebGL2RenderingContext.prototype,Ve.WebGL2,s,t,r,e)),()=>{i.forEach(o=>o())}}const qo="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",zf=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),sn=typeof window!="undefined"&&window.Blob&&new Blob([zf(qo)],{type:"text/javascript;charset=utf-8"});function Wf(s){let e;try{if(e=sn&&(window.URL||window.webkitURL).createObjectURL(sn),!e)throw"";const t=new Worker(e,{name:s==null?void 0:s.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),t}catch(t){return new Worker("data:text/javascript;base64,"+qo,{name:s==null?void 0:s.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class Vf{constructor(e){y(this,"pendingCanvasMutations",new Map),y(this,"rafStamps",{latestId:0,invokeId:null}),y(this,"mirror"),y(this,"mutationCb"),y(this,"resetObservers"),y(this,"frozen",!1),y(this,"locked",!1),y(this,"processMutation",(a,u)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(u)});const{sampling:t="all",win:r,blockClass:i,blockSelector:o,recordCanvas:n,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,n&&t==="all"&&this.initCanvasMutationObserver(r,i,o),n&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,i,o,{dataURLOptions:l})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,i,o){const n=tn(t,r,i,!0),l=new Map,a=new Wf;a.onmessage=p=>{const{id:g}=p.data;if(l.set(g,!1),!("base64"in p.data))return;const{base64:h,type:w,width:C,height:v}=p.data;this.mutationCb({id:g,type:Ve["2D"],commands:[{property:"clearRect",args:[0,0,C,v]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:h}],type:w}]},0,0]}]})};const u=1e3/e;let c=0,f;const d=()=>{const p=[];return t.document.querySelectorAll("canvas").forEach(g=>{X(g,r,i,!0)||p.push(g)}),p},m=p=>{if(c&&p-c<u){f=requestAnimationFrame(m);return}c=p,d().forEach(async g=>{var h;const w=this.mirror.getId(g);if(l.get(w)||g.width===0||g.height===0)return;if(l.set(w,!0),["webgl","webgl2"].includes(g.__context)){const v=g.getContext(g.__context);((h=v==null?void 0:v.getContextAttributes())==null?void 0:h.preserveDrawingBuffer)===!1&&v.clear(v.COLOR_BUFFER_BIT)}const C=await createImageBitmap(g);a.postMessage({id:w,bitmap:C,width:g.width,height:g.height,dataURLOptions:o.dataURLOptions},[C])}),f=requestAnimationFrame(m)};f=requestAnimationFrame(m),this.resetObservers=()=>{n(),cancelAnimationFrame(f)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=tn(e,t,r,!1),o=Ff(this.processMutation.bind(this),e,t,r),n=Uf(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),o(),n()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;const i=r.map(n=>{const u=n,{type:l}=u;return Re(u,["type"])}),{type:o}=r[0];this.mutationCb({id:t,type:o,commands:i}),this.pendingCanvasMutations.delete(e)}}class Gf{constructor(e){y(this,"trackedLinkElements",new WeakSet),y(this,"mutationCb"),y(this,"adoptedStyleSheetCb"),y(this,"styleMirror",new ff),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;const r={id:t,styleIds:[]},i=[];for(const o of e){let n;this.styleMirror.has(o)?n=this.styleMirror.getId(o):(n=this.styleMirror.add(o),i.push({styleId:n,rules:Array.from(o.rules||CSSRule,(l,a)=>({rule:an(l,o.href),index:a}))})),r.styleIds.push(n)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class jf{constructor(){y(this,"nodeMap",new WeakMap),y(this,"active",!1)}inOtherBuffer(e,t){const r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}function Hf(s,e,t){var c,f,d,m,p,g;const r=(c=t==null?void 0:t.root)!=null?c:null,i=(f=t==null?void 0:t.threshold)!=null?f:.5,o=(d=t==null?void 0:t.sensitivity)!=null?d:.05,n=Yf((m=t==null?void 0:t.rootMargin)!=null?m:"0px"),l=new Map,a=Zf(r),u=Jf(a,n);for(const h of s){const w=h.getBoundingClientRect();let C=Qf(),v=0;w.width>0&&w.height>0&&(C=Xf(w,u),v=Kf(w,C),v=Math.round(v*100)/100);const b=qf(h),S=(p=e.get(h))!=null?p:null,k=(g=S==null?void 0:S.intersectionRatio)!=null?g:0,N=v,A=(S==null?void 0:S.isStyleVisible)&&k>i,j=b&&N>i;!S||A!==j||A!==j&&Math.abs(N-k)>o?l.set(h,{target:h,isVisible:j,isStyleVisible:b,intersectionRatio:N,intersectionRect:C,oldValue:S}):l.set(h,S)}return l}function Yf(s){const e=s.trim().split(/\s+/),t=(r,i)=>r.endsWith("%")?parseFloat(r)/100*i:parseFloat(r)||0;return function(r){const i=t(e[0]||"0px",r.height),o=t(e[1]||e[0]||"0px",r.width),n=t(e[2]||e[0]||"0px",r.height),l=t(e[3]||e[1]||e[0]||"0px",r.width);return{top:i,right:o,bottom:n,left:l,width:0,height:0}}}function Zf(s){return s?s.getBoundingClientRect():new DOMRect(0,0,window.innerWidth,window.innerHeight)}function Jf(s,e){const t=e(s);return new DOMRect(s.left-t.left,s.top-t.top,s.width+t.left+t.right,s.height+t.top+t.bottom)}function Xf(s,e){const t=Math.max(s.top,e.top),r=Math.max(s.left,e.left),i=Math.min(s.bottom,e.bottom),o=Math.min(s.right,e.right),n=Math.max(0,o-r),l=Math.max(0,i-t);return{top:t,left:r,bottom:i,right:o,width:n,height:l}}function Kf(s,e){const t=s.width*s.height,r=e.width*e.height;return t>0?r/t:0}function Qf(){return{top:0,left:0,right:0,bottom:0,width:0,height:0}}function qf(s){const e=getComputedStyle(s);return e&&e.display!=="none"&&e.visibility!=="hidden"&&parseFloat(e.opacity||"1")>0}class ed{constructor(e){var u,c,f,d,m,p;y(this,"frozen",!1),y(this,"locked",!1),y(this,"pending",new Map),y(this,"mirror"),y(this,"mutationCb"),y(this,"rafId",null),y(this,"rafThrottle"),y(this,"lastFlushTime",0),y(this,"elements",new Set),y(this,"previousState",new Map),y(this,"root",null),y(this,"threshold"),y(this,"sensitivity"),y(this,"rootMargin"),y(this,"hasInitialized",!1),y(this,"mode","none"),y(this,"debounce",50),y(this,"throttle",100),y(this,"buffer",new Map),y(this,"debounceTimer",null),y(this,"lastThrottleTime",0),y(this,"disabled",!1),y(this,"notifyActivity");const{doc:t,mirror:r,sampling:i,mutationCb:o,notifyActivity:n}=e;if(this.mirror=r,this.mutationCb=o,this.notifyActivity=n,this.rootMargin="0px",i===!1){this.disabled=!0;return}const l=typeof i=="object"&&i!==null?i:{};this.mode=(u=l==null?void 0:l.mode)!=null?u:"none",this.debounce=Number((c=l==null?void 0:l.debounce)!=null?c:100),this.throttle=Number((f=l==null?void 0:l.throttle)!=null?f:100),this.threshold=Number((d=l==null?void 0:l.threshold)!=null?d:.5),this.sensitivity=Number((m=l==null?void 0:l.sensitivity)!=null?m:.05),this.rafThrottle=Number((p=l==null?void 0:l.rafThrottle)!=null?p:100),t.querySelectorAll("*").forEach(g=>this.observe(g)),new MutationObserver(g=>{g.forEach(h=>{h.addedNodes.forEach(w=>{w.nodeType===Node.ELEMENT_NODE&&(this.observe(w),w.querySelectorAll("*").forEach(C=>this.observe(C)))}),h.removedNodes.forEach(w=>{w.nodeType===Node.ELEMENT_NODE&&this.unobserve(w)})})}).observe(t.body,{childList:!0,subtree:!0}),this.startPendingFlushLoop()}startPendingFlushLoop(){if(this.disabled)return;const e=t=>{t-this.lastFlushTime>=this.rafThrottle&&(this.lastFlushTime=t,this.flushPendingVisibilityMutations()),this.rafId=requestAnimationFrame(e)};this.rafId=requestAnimationFrame(e)}flushPendingVisibilityMutations(){if(this.disabled||this.frozen||this.locked||this.elements.size===0)return;const e=Hf(this.elements,this.previousState,{root:this.root,threshold:this.threshold,sensitivity:this.sensitivity,rootMargin:this.rootMargin});for(const[t,r]of e.entries()){const i=this.previousState.get(t);if(!i||i.isVisible!==r.isVisible||Math.abs(i.intersectionRatio-r.intersectionRatio)>this.sensitivity){const n=this.mirror.getId(t);n!==-1&&this.buffer.set(t,{id:n,isVisible:r.isVisible,ratio:r.intersectionRatio}),this.previousState.set(t,r)}}if(this.previousState=e,!this.hasInitialized){this.hasInitialized=!0,this.buffer.clear();return}this.scheduleEmit()}scheduleEmit(){if(this.mode==="debounce")clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this.flushBuffer(),this.debounce);else if(this.mode==="throttle"){const e=performance.now();e-this.lastThrottleTime>=this.throttle&&(this.lastThrottleTime=e,this.flushBuffer())}else this.flushBuffer()}flushBuffer(){var e;this.buffer.size!==0&&((e=this.notifyActivity)==null||e.call(this,this.buffer.size),this.mutationCb({mutations:Array.from(this.buffer.values())}),this.buffer.clear())}observe(e){this.disabled||this.elements.add(e)}unobserve(e){this.disabled||(this.elements.delete(e),this.previousState.delete(e),this.pending.delete(e))}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}reset(){this.elements.clear(),this.previousState.clear(),this.pending.clear(),this.rafId&&cancelAnimationFrame(this.rafId)}}let B,Yt,Ur,zr,ar=!1;const lr=[];let Je;try{if(Array.from([1],s=>s*2)[0]!==2){const s=document.createElement("iframe");document.body.appendChild(s),Array.from=((ii=s.contentWindow)==null?void 0:ii.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}const se=$a();function Ge(s={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,checkoutEveryNvm:i,blockClass:o="rr-block",blockSelector:n=null,ignoreClass:l="rr-ignore",ignoreSelector:a=null,excludeAttribute:u,maskTextClass:c="rr-mask",maskTextSelector:f=null,inlineStylesheet:d=!0,maskAllInputs:m,maskInputOptions:p,slimDOMOptions:g,maskInputFn:h,maskTextFn:w,hooks:C,packFn:v,sampling:b={},dataURLOptions:S={},mousemoveWait:k,recordDOM:N=!0,recordCanvas:A=!1,recordCrossOriginIframes:j=!1,recordAfter:W=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",flushCustomEvent:q=s.flushCustomEvent!==void 0?s.flushCustomEvent:"after",userTriggeredOnInput:ce=!1,collectFonts:he=!1,inlineImages:I=!1,plugins:oe,keepIframeSrcFn:fe=()=>!1,ignoreCSSAttributes:H=new Set([]),errorHandler:ge}=s;bf(ge);const ye=j?window.parent===window:!0;let ee=!1;if(!ye)try{window.parent.document&&(ee=!1)}catch(E){ee=!0}if(ye&&!e)throw new Error("emit function is required");if(!ye&&!ee)return()=>{};k!==void 0&&b.mousemove===void 0&&(b.mousemove=k),se.reset();const Sr=u===void 0?/.^/:u,Cr=m===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:p!==void 0?p:{password:!0},vr=g===!0||g==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:g==="all",headMetaDescKeywords:g==="all",headTitleMutations:g==="all"}:g||{};hf();let Xs,Ir=0,xr=0;const ea=E=>{xr+=E},Ks=E=>{for(const K of oe||[])K.eventProcessor&&(E=K.eventProcessor(E));return v&&!ee&&(E=v(E)),E};B=(E,K)=>{var V;const G=E;if(G.timestamp=De(),(V=Ie[0])!=null&&V.isFrozen()&&G.type!==R.FullSnapshot&&!(G.type===R.IncrementalSnapshot&&G.data.source===M.Mutation)&&Ie.forEach(ae=>ae.unfreeze()),ye)e==null||e(Ks(G),K);else if(ee){const ae={type:"rrweb",event:Ks(G),origin:window.location.origin,isCheckout:K};window.parent.postMessage(ae,"*")}if(G.type===R.FullSnapshot)Xs=G,Ir=0;else if(G.type===R.IncrementalSnapshot){if(G.data.source===M.Mutation&&G.data.isAttachIframe)return;Ir++;const ae=r&&Ir>=r,L=t&&G.timestamp-Xs.timestamp>t,Ae=i&&xr>=i;(ae||L||Ae)&&(Ae&&(xr=0),Yt(!0))}};const pt=E=>{B({type:R.IncrementalSnapshot,data:O({source:M.Mutation},E)})},Qs=E=>B({type:R.IncrementalSnapshot,data:O({source:M.Scroll},E)}),qs=E=>B({type:R.IncrementalSnapshot,data:O({source:M.CanvasMutation},E)}),ei=E=>{var K;(K=C==null?void 0:C.visibilityMutation)==null||K.call(C,E),B({type:R.IncrementalSnapshot,data:O({source:M.VisibilityMutation},E)})},ta=E=>B({type:R.IncrementalSnapshot,data:O({source:M.AdoptedStyleSheet},E)}),Ce=new Gf({mutationCb:pt,adoptedStyleSheetCb:ta}),ve=new Tf({mirror:se,mutationCb:pt,stylesheetManager:Ce,recordCrossOriginIframes:j,wrappedEmit:B});for(const E of oe||[])E.getMirror&&E.getMirror({nodeMirror:se,crossOriginIframeMirror:ve.crossOriginIframeMirror,crossOriginIframeStyleMirror:ve.crossOriginIframeStyleMirror});const Er=new jf;Ur=new Vf({recordCanvas:A,mutationCb:qs,win:window,blockClass:o,blockSelector:n,mirror:se,sampling:b.canvas,dataURLOptions:S}),zr=new ed({doc:window.document,mirror:se,sampling:b.visibility,mutationCb:ei,notifyActivity:ea});const mt=new Pf({mutationCb:pt,scrollCb:Qs,bypassOptions:{blockClass:o,blockSelector:n,maskTextClass:c,maskTextSelector:f,excludeAttribute:Sr,inlineStylesheet:d,maskInputOptions:Cr,dataURLOptions:S,maskTextFn:w,maskInputFn:h,recordCanvas:A,inlineImages:I,sampling:b,slimDOMOptions:vr,iframeManager:ve,stylesheetManager:Ce,canvasManager:Ur,visibilityManager:zr,keepIframeSrcFn:fe,processedNodeManager:Er},mirror:se});Yt=(E=!1)=>{if(!N)return;B({type:R.Meta,data:{href:window.location.href,width:Fo(),height:_o()}},E),Ce.reset(),mt.init(),Ie.forEach(V=>V.lock());const K=cl(document,{mirror:se,blockClass:o,blockSelector:n,maskTextClass:c,maskTextSelector:f,excludeAttribute:Sr,inlineStylesheet:d,maskAllInputs:Cr,maskTextFn:w,maskInputFn:h,slimDOM:vr,dataURLOptions:S,recordCanvas:A,inlineImages:I,onSerialize:V=>{zo(V,se)&&ve.addIframe(V),Wo(V,se)&&Ce.trackLinkElement(V),vs(V)&&mt.addShadowRoot(x.shadowRoot(V),document)},onIframeLoad:(V,G)=>{ve.attachIframe(V,G),mt.observeAttachShadow(V)},onStylesheetLoad:(V,G)=>{Ce.attachLinkElement(V,G)},keepIframeSrcFn:fe});if(!K)return console.warn("Failed to snapshot the document");B({type:R.FullSnapshot,data:{node:K,initialOffset:Do(window)}},E),Ie.forEach(V=>V.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Ce.adoptStyleSheets(document.adoptedStyleSheets,se.getId(document))},Je=()=>{for(const E of lr)B(E);lr.length=0};try{const E=[],K=G=>{var ae;return $(kf)({mutationCb:pt,mousemoveCb:(L,Ae)=>B({type:R.IncrementalSnapshot,data:{source:Ae,positions:L}}),mouseInteractionCb:L=>B({type:R.IncrementalSnapshot,data:O({source:M.MouseInteraction},L)}),scrollCb:Qs,viewportResizeCb:L=>B({type:R.IncrementalSnapshot,data:O({source:M.ViewportResize},L)}),inputCb:L=>B({type:R.IncrementalSnapshot,data:O({source:M.Input},L)}),mediaInteractionCb:L=>B({type:R.IncrementalSnapshot,data:O({source:M.MediaInteraction},L)}),styleSheetRuleCb:L=>B({type:R.IncrementalSnapshot,data:O({source:M.StyleSheetRule},L)}),styleDeclarationCb:L=>B({type:R.IncrementalSnapshot,data:O({source:M.StyleDeclaration},L)}),canvasMutationCb:qs,visibilityMutationCb:ei,fontCb:L=>B({type:R.IncrementalSnapshot,data:O({source:M.Font},L)}),selectionCb:L=>{B({type:R.IncrementalSnapshot,data:O({source:M.Selection},L)})},customElementCb:L=>{B({type:R.IncrementalSnapshot,data:O({source:M.CustomElement},L)})},blockClass:o,ignoreClass:l,ignoreSelector:a,maskTextClass:c,maskTextSelector:f,excludeAttribute:Sr,maskInputOptions:Cr,inlineStylesheet:d,sampling:b,recordDOM:N,recordCanvas:A,inlineImages:I,userTriggeredOnInput:ce,collectFonts:he,doc:G,maskInputFn:h,maskTextFn:w,keepIframeSrcFn:fe,blockSelector:n,slimDOMOptions:vr,dataURLOptions:S,mirror:se,iframeManager:ve,stylesheetManager:Ce,shadowDomManager:mt,processedNodeManager:Er,canvasManager:Ur,visibilityManager:zr,ignoreCSSAttributes:H,plugins:((ae=oe==null?void 0:oe.filter(L=>L.observer))==null?void 0:ae.map(L=>({observer:L.observer,options:L.options,callback:Ae=>B({type:R.Plugin,data:{plugin:L.name,payload:Ae}})})))||[]},C)};ve.addLoadListener(G=>{try{E.push(K(G.contentDocument))}catch(ae){console.warn(ae)}});const V=()=>{q==="before"&&Je(),Yt(),E.push(K(document)),ar=!0,q==="after"&&Je()};return document.readyState==="interactive"||document.readyState==="complete"?V():(E.push(J("DOMContentLoaded",()=>{B({type:R.DomContentLoaded,data:{}}),W==="DOMContentLoaded"&&V()})),E.push(J("load",()=>{B({type:R.Load,data:{}}),W==="load"&&V()},window))),()=>{Je(),E.forEach(G=>G()),Er.destroy(),ar=!1,Sf()}}catch(E){console.warn(E)}}Ge.flushCustomEventQueue=()=>{console.warn(`[rrweb] CustomEvent flushing: ${lr.length} events`),Je()};Ge.addCustomEvent=(s,e)=>{const t={type:R.Custom,data:{tag:s,payload:e}};if(!ar){console.warn(`[rrweb] CustomEvent buffered before/after recording start: ${s}`),lr.push(t);return}B(t)};Ge.freezePage=()=>{Ie.forEach(s=>s.freeze())};Ge.takeFullSnapshot=s=>{if(!ar)throw new Error("please take full snapshot after start recording");Yt(s)};Ge.mirror=se;var nn;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(nn||(nn={}));exports.record=Ge;
|
|
67
67
|
if (typeof module.exports == "object" && typeof exports == "object") {
|
|
68
68
|
var __cp = (to, from, except, desc) => {
|
|
69
69
|
if ((from && typeof from === "object") || typeof from === "function") {
|